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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF19
-rw-r--r--discovery/org.eclipse.rse.discovery/about.html28
-rw-r--r--discovery/org.eclipse.rse.discovery/build.properties18
-rw-r--r--discovery/org.eclipse.rse.discovery/plugin.properties18
-rw-r--r--discovery/org.eclipse.rse.discovery/plugin.xml58
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Activator.java60
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Messages.java28
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoverySubSystemConfiguration.java60
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java199
-rw-r--r--discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/messages.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/.project17
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/build.properties23
-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.html256
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/feature.properties145
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/feature.xml178
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/.cvsignore7
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/.project11
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/META-INF/MANIFEST.MF8
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/book.css112
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/build.properties25
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/buildDoc.xml167
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/customBuildCallbacks.xml167
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/device.html25
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery.pngbin7681 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery_model.gifbin7727 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/images/list.pngbin13358 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/model.html27
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/network.html17
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/overview.html27
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/pair.html27
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/protocol.html26
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/service.html23
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/servicetype.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/transport.html26
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/usage.html46
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/guide/view.html37
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/notices.html22
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/options.txt41
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/plugin.properties16
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/plugin.xml19
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/provisional_api.html35
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/reference/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/.cvsignore1
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/index.html19
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/schema.css66
-rw-r--r--discovery/org.eclipse.tm.discovery.doc.isv/toc.xml45
-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/.project34
-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.prefs71
-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.MF18
-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.properties23
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/plugin.xml17
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/schema/discoveryProtocol.exsd118
-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/protocol/IProtocol.java62
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/ProtocolFactory.java167
-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.engine/src/org/eclipse/tm/internal/discovery/engine/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/Messages.java32
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java100
-rw-r--r--discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/messages.properties11
-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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/META-INF/MANIFEST.MF16
-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.properties31
-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/internal/discovery/model/provider/DeviceItemProvider.java218
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/DiscoveryModelEditPlugin.java88
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ModelItemProviderAdapterFactory.java271
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/NetworkItemProvider.java144
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/PairItemProvider.java198
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ServiceItemProvider.java175
-rw-r--r--discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.tm.discovery.model/META-INF/MANIFEST.MF18
-rw-r--r--discovery/org.eclipse.tm.discovery.model/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.model/build.properties19
-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/internal/discovery/model/impl/DeviceImpl.java258
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ModelFactoryImpl.java137
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ModelPackageImpl.java471
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/NetworkImpl.java144
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/PairImpl.java204
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ServiceImpl.java208
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ServiceTypeImpl.java208
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelAdapterFactory.java188
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelResourceFactoryImpl.java57
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelResourceImpl.java35
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelSwitch.java214
-rw-r--r--discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/META-INF/MANIFEST.MF17
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/build.properties18
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.xml21
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/DNSSDProtocol.java752
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Messages.java32
-rw-r--r--discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/META-INF/MANIFEST.MF15
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/build.properties18
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/plugin.xml21
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/discovery/transport/udp/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.tm.discovery.view/META-INF/MANIFEST.MF19
-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/internal/discovery/view/Activator.java71
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/Messages.java56
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java314
-rw-r--r--discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/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/.project34
-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.prefs71
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/HelpContexts.xml39
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/META-INF/MANIFEST.MF19
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/SDWizard.html39
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/about.html28
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/build.properties21
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/plugin.properties13
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/plugin.xml24
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Activator.java60
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Messages.java32
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java651
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardMainPage.java314
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/messages.properties35
-rw-r--r--discovery/org.eclipse.tm.discovery.wizard/toc.xml16
-rw-r--r--discovery/readme.txt4
-rw-r--r--releng/org.eclipse.rse.build/.cvsignore1
-rw-r--r--releng/org.eclipse.rse.build/.project11
-rw-r--r--releng/org.eclipse.rse.build/README_build.txt81
-rw-r--r--releng/org.eclipse.rse.build/about.html28
-rw-r--r--releng/org.eclipse.rse.build/archive/.cvsignore1
-rw-r--r--releng/org.eclipse.rse.build/archive/build_types.html84
-rw-r--r--releng/org.eclipse.rse.build/archive/dlconfig.txt2
-rw-r--r--releng/org.eclipse.rse.build/archive/index.php230
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/batch_sign.sh86
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/doit_irsbuild.sh153
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/doit_nightly.sh85
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/make_signed.sh132
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/rename_build.sh65
-rwxr-xr-xreleng/org.eclipse.rse.build/bin/update_global_cvs_tags.sh53
-rw-r--r--releng/org.eclipse.rse.build/bootstrap.sh242
-rw-r--r--releng/org.eclipse.rse.build/build.pl125
-rw-r--r--releng/org.eclipse.rse.build/build.properties53
-rw-r--r--releng/org.eclipse.rse.build/build.rb105
-rw-r--r--releng/org.eclipse.rse.build/copyrights/NOTES.txt66
-rw-r--r--releng/org.eclipse.rse.build/copyrights/ibmCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/copyrights/mvCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/copyrights/palmCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/copyrights/radoCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/copyrights/symbianCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/copyrights/takuyaCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/copyrights/wrCopyright.txt8
-rw-r--r--releng/org.eclipse.rse.build/customAssembly.xml82
-rw-r--r--releng/org.eclipse.rse.build/customTargets.xml577
-rw-r--r--releng/org.eclipse.rse.build/downloads/.cvsignore1
-rw-r--r--releng/org.eclipse.rse.build/downloads/build_types.html94
-rw-r--r--releng/org.eclipse.rse.build/downloads/dlconfig.txt2
-rw-r--r--releng/org.eclipse.rse.build/downloads/index.php242
-rwxr-xr-xreleng/org.eclipse.rse.build/fetchBuilder.pl31
-rwxr-xr-xreleng/org.eclipse.rse.build/go.sh78
-rw-r--r--releng/org.eclipse.rse.build/maps/discovery.map10
-rw-r--r--releng/org.eclipse.rse.build/maps/rse.map64
-rw-r--r--releng/org.eclipse.rse.build/maps/terminal.map13
-rw-r--r--releng/org.eclipse.rse.build/maps/testdrivers.map6
-rw-r--r--releng/org.eclipse.rse.build/maps/tmcore.map2
-rw-r--r--releng/org.eclipse.rse.build/maps/wince.map6
-rw-r--r--releng/org.eclipse.rse.build/message.in6
-rwxr-xr-xreleng/org.eclipse.rse.build/monitor.properties29
-rwxr-xr-xreleng/org.eclipse.rse.build/nightly.sh96
-rwxr-xr-xreleng/org.eclipse.rse.build/setup.sh245
-rw-r--r--releng/org.eclipse.rse.build/template/.cvsignore2
-rwxr-xr-xreleng/org.eclipse.rse.build/template/FAIL.gifbin117 -> 0 bytes
-rwxr-xr-xreleng/org.eclipse.rse.build/template/OK.gifbin139 -> 0 bytes
-rwxr-xr-xreleng/org.eclipse.rse.build/template/buildNotes.php180
-rw-r--r--releng/org.eclipse.rse.build/template/buildNotesGenerated.html19
-rw-r--r--releng/org.eclipse.rse.build/template/egg.gifbin1070 -> 0 bytes
-rw-r--r--releng/org.eclipse.rse.build/template/epl-v10.html256
-rwxr-xr-xreleng/org.eclipse.rse.build/template/index.php282
-rw-r--r--releng/org.eclipse.rse.build/template/notice.html79
-rwxr-xr-xreleng/org.eclipse.rse.build/template/package.count1
-rw-r--r--releng/org.eclipse.rse.releng.infocenter/.project11
-rw-r--r--releng/org.eclipse.rse.releng.infocenter/about.html28
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/doit_nightly.sh28
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/infocenter.sh38
-rw-r--r--releng/org.eclipse.rse.releng.infocenter/readme.txt41
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/setup.sh75
-rwxr-xr-xreleng/org.eclipse.rse.releng.infocenter/update.sh136
-rw-r--r--releng/org.eclipse.rse.updatesite/.cvsignore6
-rw-r--r--releng/org.eclipse.rse.updatesite/.project17
-rw-r--r--releng/org.eclipse.rse.updatesite/bin/.cvsignore1
-rwxr-xr-xreleng/org.eclipse.rse.updatesite/bin/mkTestUpdates.sh458
-rwxr-xr-xreleng/org.eclipse.rse.updatesite/bin/pack20015
-rwxr-xr-xreleng/org.eclipse.rse.updatesite/bin/sign.sh119
-rwxr-xr-xreleng/org.eclipse.rse.updatesite/bin/stageMilestones.sh67
-rw-r--r--releng/org.eclipse.rse.updatesite/index.html82
-rw-r--r--releng/org.eclipse.rse.updatesite/site.xml684
-rw-r--r--releng/org.eclipse.rse.updatesite/web/site.css12
-rw-r--r--releng/org.eclipse.rse.updatesite/web/site.xsl214
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/.project17
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/build.properties15
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/epl-v10.html256
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/feature.properties142
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/feature.xml68
-rw-r--r--releng/org.eclipse.tm.releng.master-feature/license.html79
-rw-r--r--releng/org.eclipse.tm.releng/.cvsignore1
-rw-r--r--releng/org.eclipse.tm.releng/build.xml27
-rw-r--r--releng/org.eclipse.tm.releng/buildAll.xml227
-rw-r--r--releng/org.eclipse.tm.releng/builder/discovery/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/discovery/customTargets.xml177
-rw-r--r--releng/org.eclipse.tm.releng/builder/doc/build.properties37
-rw-r--r--releng/org.eclipse.tm.releng/builder/doc/customTargets.xml186
-rw-r--r--releng/org.eclipse.tm.releng/builder/examples/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/examples/customTargets.xml186
-rw-r--r--releng/org.eclipse.tm.releng/builder/runtime/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml187
-rw-r--r--releng/org.eclipse.tm.releng/builder/sdk/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml186
-rw-r--r--releng/org.eclipse.tm.releng/builder/terminal/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/terminal/customTargets.xml177
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/build.properties36
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt2
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml44
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh278
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties57
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/customTargets.xml274
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html162
-rw-r--r--releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml118
-rw-r--r--releng/org.eclipse.tm.releng/maps/build.cfg1
-rw-r--r--releng/org.eclipse.tm.releng/maps/discovery.map10
-rw-r--r--releng/org.eclipse.tm.releng/maps/rse.map64
-rw-r--r--releng/org.eclipse.tm.releng/maps/terminal.map13
-rw-r--r--releng/org.eclipse.tm.releng/maps/testdrivers.map6
-rw-r--r--releng/org.eclipse.tm.releng/maps/tmcore.map2
-rw-r--r--releng/org.eclipse.tm.releng/maps/wince.map6
-rw-r--r--releng/org.eclipse.tm.releng/promoteToEclipse.rse.properties175
-rw-r--r--releng/org.eclipse.tm.releng/repoInfo.properties18
-rw-r--r--releng/org.eclipse.tm.releng/templateFiles/rse.map.template10
-rw-r--r--releng/org.eclipse.tm.releng/templateFiles/testManifest.xml.template50
-rw-r--r--releng/org.eclipse.tm.releng/testManifest.xml59
-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.MF7
-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.css112
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/build.properties24
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/buildDoc.xml153
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/customBuildCallbacks.xml167
-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.html158
-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.txt27
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/plugin.properties16
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/plugin.xml19
-rw-r--r--rse/doc/org.eclipse.dstore.doc.isv/provisional_api.html34
-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.html41
-rwxr-xr-xrse/doc/org.eclipse.dstore.doc.isv/toc.xml40
-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.xml170
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/customBuildCallbacks.xml168
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html231
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/Extensions.html84
-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.html23
-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.html1338
-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.html74
-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.html129
-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.html196
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html161
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html66
-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.html248
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/plugin/systemtype.html39
-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.html51
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_architecture.html83
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_connectorservices.html29
-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.html27
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/rse_int_overview.html49
-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.html33
-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.html36
-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.html212
-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.html172
-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.html45
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents2.html117
-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.html220
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/index.html17
-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.pngbin25947 -> 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.pngbin33062 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page2.pngbin32531 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.pngbin25164 -> 0 bytes
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProject.html105
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html163
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gifbin22392 -> 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.html86
-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.html246
-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.html56
-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.txt141
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/plugin.properties16
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/plugin.xml53
-rw-r--r--rse/doc/org.eclipse.rse.doc.isv/provisional_api.html34
-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.html32
-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.html119
-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.xml31
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Guide.xml45
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Questions.xml17
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml158
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.isv/topics_Samples.xml19
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/.project22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/META-INF/MANIFEST.MF7
-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.html72
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cfilters.html137
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cprofile.html109
-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.html64
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/concepts/cuseractions.html48
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/g1installing.html56
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/g2firststeps.html67
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/g_start.html58
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/gusing.html88
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/gettingstarted/gxtending.html107
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/images/ModelRSE.pngbin17799 -> 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.properties22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/plugin.xml22
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/ref/rrsepref.html82
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/ref/rsearch.html86
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tarchive.html99
-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
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/tasks/tbegindstore.html28
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginenv.html67
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginlinux.html186
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginpass.html70
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecond.html45
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecprofile.html31
-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.html81
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagepoolsref.html57
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tmanagesearch.html95
-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
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/tasks/tusingefs.html41
-rw-r--r--rse/doc/org.eclipse.rse.doc.user/tasks/tworkssl.html88
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/tworkuseract.html75
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/tasks/twrkcmdshl.html50
-rwxr-xr-xrse/doc/org.eclipse.rse.doc.user/toc.xml83
-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.properties17
-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.html256
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/feature.properties146
-rw-r--r--rse/examples/org.eclipse.rse.examples-feature/feature.xml78
-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/dsdp32.pngbin2275 -> 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/.project34
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.core.prefs71
-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.MF18
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/about.html28
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/build.properties20
-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.properties19
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/plugin.xml60
-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.java83
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.java39
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.properties23
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorService.java77
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java73
-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.java137
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/DaytimeService.java59
-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.java109
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java107
-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.java51
-rw-r--r--rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapter.java56
-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.dstore/.classpath8
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/.project28
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/META-INF/MANIFEST.MF20
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/build.properties8
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystem_obj.gifbin157 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystemlive_obj.gifbin224 -> 0 bytes
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/miners/org/eclipse/rse/examples/dstore/miners/SampleMiner.java123
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/plugin.properties17
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/plugin.xml33
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/readme.txt32
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/Activator.java62
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleContainer.java25
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleObject.java36
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleContainer.java18
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleObject.java22
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/SampleService.java105
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/RemoteSampleObject.java70
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleRootResource.java55
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystem.java128
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystemConfiguration.java63
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/RemoteSampleObjectAdapterFactory.java55
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleAdapter.java248
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapter.java21
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapterFactory.java64
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/NewSampleObjectAction.java71
-rw-r--r--rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/SampleAction.java70
-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/.project34
-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.MF22
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/about.html28
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/about.ini27
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/about.mappings6
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/about.properties25
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/build.properties25
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/dsdp32.pngbin2275 -> 0 bytes
-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.xml78
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/rseSamplesMessages.xml29
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java134
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesResources.java61
-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.java218
-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.properties58
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorService.java73
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java80
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperFilterStringEditPane.java224
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java233
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java108
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapter.java111
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java63
-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.java179
-rw-r--r--rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java275
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/.project11
-rw-r--r--rse/examples/org.eclipse.rse.remotecdt/README.txt4
-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.properties20
-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.html256
-rw-r--r--rse/features/org.eclipse.rse-feature/feature.properties144
-rw-r--r--rse/features/org.eclipse.rse-feature/feature.xml79
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.core-feature/feature.properties141
-rw-r--r--rse/features/org.eclipse.rse.core-feature/feature.xml152
-rw-r--r--rse/features/org.eclipse.rse.core-feature/license.html81
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/epl-v10.html256
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.core-patch/.project17
-rw-r--r--rse/features/org.eclipse.rse.core-patch/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.core-patch/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.core-patch/feature.properties142
-rw-r--r--rse/features/org.eclipse.rse.core-patch/feature.xml31
-rw-r--r--rse/features/org.eclipse.rse.core-patch/license.html79
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/feature.properties139
-rw-r--r--rse/features/org.eclipse.rse.dstore-feature/feature.xml94
-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.html256
-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/dsdp32.pngbin2275 -> 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.properties144
-rw-r--r--rse/features/org.eclipse.rse.efs-feature/feature.xml50
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/feature.properties143
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/feature.xml68
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.properties145
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.xml29
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.ftp-patch/.project17
-rw-r--r--rse/features/org.eclipse.rse.ftp-patch/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.ftp-patch/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.ftp-patch/feature.properties142
-rw-r--r--rse/features/org.eclipse.rse.ftp-patch/feature.xml31
-rw-r--r--rse/features/org.eclipse.rse.ftp-patch/license.html79
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.local-feature/feature.properties141
-rw-r--r--rse/features/org.eclipse.rse.local-feature/feature.xml81
-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.html256
-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/dsdp32.pngbin2275 -> 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/.project11
-rw-r--r--rse/features/org.eclipse.rse.remotecdt-feature/README.txt4
-rw-r--r--rse/features/org.eclipse.rse.remotecdt.wrapper-feature/.project11
-rw-r--r--rse/features/org.eclipse.rse.remotecdt.wrapper-feature/README.txt4
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/feature.properties144
-rw-r--r--rse/features/org.eclipse.rse.sdk-feature/feature.xml89
-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.html256
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/feature.properties140
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/feature.xml76
-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.html256
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/build.properties14
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/feature.properties143
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/feature.xml75
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.properties145
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.xml47
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.properties26
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/build.properties16
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/feature.properties139
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/feature.xml75
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/feature.properties145
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.properties29
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/plugin.properties16
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/build.properties17
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/feature.properties140
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/feature.xml67
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/feature.properties142
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.html33
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.properties26
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/build.properties13
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties13
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/build.properties17
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.properties140
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.xml59
-rw-r--r--rse/features/org.eclipse.rse.useractions.wrapper-feature/license.html79
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/.project17
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/build.properties17
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/epl-v10.html256
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/feature.properties140
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/feature.xml70
-rw-r--r--rse/features/org.eclipse.rse.wince.wrapper-feature/license.html79
-rw-r--r--rse/features/readme.txt2
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.classpath12
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.project34
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.settings/.api_filters18
-rw-r--r--rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF28
-rw-r--r--rse/plugins/org.eclipse.dstore.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.dstore.core/build.properties20
-rw-r--r--rse/plugins/org.eclipse.dstore.core/export.jardesc18
-rw-r--r--rse/plugins/org.eclipse.dstore.core/plugin.properties16
-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/ClientConnection.java929
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java154
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java212
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java81
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java33
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java142
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java57
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java30
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java57
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java502
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java43
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/Miner.java694
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java148
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java272
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java84
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java72
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java306
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java237
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java1687
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java4528
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java102
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java119
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java353
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java99
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java165
-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/IDataStoreCompatibilityHandler.java50
-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/IDataStorePreferenceListener.java31
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java23
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IExternalLoader.java34
-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/ISchemaRegistry.java50
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java304
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java528
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java54
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ISystemService.java41
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SecuredThread.java173
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java183
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java686
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java289
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java122
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SystemServiceManager.java70
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java318
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java220
-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/ssl/BaseSSLContext.java33
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java133
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/IDataStoreTrustManager.java38
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientAttributes.java58
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientCommandHandler.java395
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientReceiver.java78
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientSSLProperties.java107
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientUpdateHandler.java190
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/DefaultByteConverter.java95
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/SchemaRegistry.java96
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/MinerLoader.java426
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerAttributes.java73
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java583
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerReturnCodes.java40
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerSSLProperties.java148
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java480
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java234
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ExternalLoader.java109
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ISender.java28
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/MemoryManager.java161
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Pattern.java166
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sender.java346
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sorter.java72
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLgenerator.java694
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLparser.java1096
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreKeyManager.java69
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java112
-rw-r--r--rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.java154
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF16
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/about.html28
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/build.properties20
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/DomainEvent.java103
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDataElement.java37
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainListener.java27
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainNotifier.java29
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IElement.java25
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DataElementActionFilter.java60
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DesktopElement.java33
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DomainNotifier.java58
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IDesktopElement.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IPropertySource.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/PropertySource.java34
-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/DomainEvent.java103
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDataElement.java37
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainListener.java26
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainNotifier.java45
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IElement.java27
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DataElementActionFilter.java70
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DesktopElement.java84
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java97
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDataElementActionFilter.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDesktopElement.java25
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IPropertySource.java24
-rw-r--r--rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/PropertySource.java152
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath11
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/.api_filters11
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/META-INF/MANIFEST.MF24
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.xml25
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java1580
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java114
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java88
-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/util/ConnectionStatusListener.java284
-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.java495
-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.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/Activator.java130
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.java76
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties77
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.java49
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.properties37
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IConnectorServiceMessageIds.java59
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java24
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java1219
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ui/propertypages/DStorePreferencePage.java333
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/META-INF/MANIFEST.MF17
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/build.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/Activator.java71
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.java33
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ILocalSubSystem.java26
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorService.java97
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/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/.project34
-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.prefs71
-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.MF20
-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.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.xml23
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/Activator.java134
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/ISshConstants.java29
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/ISshSubSystem.java23
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/KeyboardInteractiveDialog.java185
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java54
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties43
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java645
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorServiceManager.java69
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/UserValidationDialog.java277
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/.options1
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/build.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/plugin.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/Activator.java97
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/ITelnetSubSystem.java22
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.java38
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java661
-rw-r--r--rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorServiceManager.java59
-rw-r--r--rse/plugins/org.eclipse.rse.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.core/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.core/.settings/.api_filters17
-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.prefs71
-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.MF33
-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.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.core/build.properties30
-rw-r--r--rse/plugins/org.eclipse.rse.core/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gifbin569 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gifbin591 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gifbin580 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gifbin592 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gifbin98 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gifbin145 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gifbin997 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gifbin1007 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.core/plugin.properties41
-rw-r--r--rse/plugins/org.eclipse.rse.core/plugin.xml173
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd137
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd120
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd166
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd252
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/systemTypeProviders.exsd129
-rw-r--r--rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd236
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java208
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java58
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java59
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInitListener.java27
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInteractionProvider.java143
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEModelInitializer.java32
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java83
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSERunnableWithProgress.java68
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java358
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java27
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeProvider.java39
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java55
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/ISystemResourceListener.java28
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java649
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java520
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java541
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java55
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemRemoteObjectMatcher.java590
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceHelpers.java777
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java369
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemTypeMatcher.java102
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java30
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java160
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvent.java45
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java113
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeListener.java40
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvent.java53
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java50
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeListener.java35
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvent.java82
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java178
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeListener.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvent.java108
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java360
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeListener.java34
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemRemoteChangeEvent.java285
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemResourceChangeEvent.java153
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java652
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java134
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java90
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java309
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java644
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java148
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java80
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java259
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java107
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java44
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java39
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java71
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java107
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java62
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java102
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java63
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterReference.java453
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterUtil.java29
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java121
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java267
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java602
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java275
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ILabeledObject.java34
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java111
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java183
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java104
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java65
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSECallback.java24
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java34
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java129
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java44
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurator.java46
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java63
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java40
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java242
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java81
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java162
-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.java1009
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java99
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java83
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java160
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyList.java64
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java212
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java87
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java165
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java138
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEPersistableObject.java77
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java48
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemEscapeCharHelper.java195
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java48
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java101
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemRemoteResourceSet.java95
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java125
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java201
-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/references/IRSEBasePersistableReferenceManager.java160
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java53
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java59
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java57
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java60
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java30
-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.java35
-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/references/SystemReferencedObject.java83
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObjectHelper.java78
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObject.java93
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObjectHelper.java88
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java531
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java184
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractCredentialsProvider.java84
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java814
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractResource.java80
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java306
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/BasicConnectorService.java224
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java45
-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.java48
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java427
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java35
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentials.java18
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentialsProvider.java142
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java28
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java76
-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.java112
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java105
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java71
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java178
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java48
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java97
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java50
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java692
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java758
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java139
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemDragDropAdapter.java112
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemRemoteObjectMatchProvider.java122
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java47
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java501
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java59
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java203
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLauncher.java130
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemHelpers.java113
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/IRemoteSystemsProject.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreMessages.java103
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreRegistry.java213
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java375
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSELocalConnectionInitializer.java60
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEPreferenceInitializer.java33
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSESystemType.java113
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RemoteSystemsProject.java98
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java47
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/HostOwnedFilterPoolPattern.java62
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/ISystemFilterConstants.java41
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilter.java952
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerCommonMethods.java503
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerReferenceCommonMethods.java200
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPool.java995
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolManager.java1347
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java299
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReferenceManager.java680
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapper.java63
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapperInformation.java129
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterSimple.java497
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java114
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterString.java314
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStringReference.java187
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/messages.properties97
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/ISystemProfileOperation.java29
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/RemoteObjectId.java126
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemHostPool.java673
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEvent.java117
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEventManager.java102
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPostableEventNotifier.java63
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeEvent.java99
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeManager.java100
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java310
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java528
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java3161
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRemoteChangeEventManager.java129
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemResourceChangeManager.java130
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/AbstractCacheManager.java44
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java333
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxyComparator.java47
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LogListener.java140
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java44
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/IRSEImportExportProvider.java62
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFConstants.java44
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemAnchor.java114
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemJob.java82
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemLocation.java157
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceAnchor.java51
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceLocation.java87
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceAnchor.java132
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceJob.java70
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceLocation.java157
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java904
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEEnvelope.java522
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java585
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/SerializingProvider.java211
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMExporter.java149
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMImporter.java77
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java492
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java680
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java314
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java43
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java57
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java93
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java66
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/Logger.java254
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/LoggerFactory.java64
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceManager.java152
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceProvider.java126
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java103
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOM.java91
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNode.java233
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java54
-rw-r--r--rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/package.html20
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/META-INF/MANIFEST.MF24
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/build.properties19
-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.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/plugin.xml57
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/ImageRegistry.java160
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalKeystoreProvider.java75
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityPlugin.java94
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.java84
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.properties73
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertPropertiesDialog.java56
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableContentProvider.java49
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableLabelProvider.java97
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableSorter.java194
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/Element.java55
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyElement.java62
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyPropertiesDialog.java29
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/NewCertDialog.java163
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/RenameCertDialog.java110
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/UniversalSecurityPreferencePage.java504
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificateElement.java217
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificatePropertiesDialog.java29
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/GridUtil.java69
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/StringModifier.java53
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificateForm.java186
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificatePropertiesForm.java294
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/NewCertTableLabelProvider.java97
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertAction.java52
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizard.java145
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardAliasPage.java204
-rw-r--r--rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardMainPage.java217
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/.project11
-rw-r--r--rse/plugins/org.eclipse.rse.eclipse.filesystem/moved_project.txt4
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/build.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/plugin.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/plugin.xml89
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java314
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/Messages.java28
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java138
-rw-r--r--rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/messages.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.efs/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.efs/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.efs/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.efs/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.efs/META-INF/MANIFEST.MF22
-rw-r--r--rse/plugins/org.eclipse.rse.efs/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.efs/build.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.efs/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.efs/plugin.xml27
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Activator.java102
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Messages.java37
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStore.java357
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java798
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java133
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java287
-rw-r--r--rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/messages.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.classpath12
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.settings/.api_filters29
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs71
-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.MF41
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/build.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/icons/full/elcl16/synced.gifbin160 -> 0 bytes
-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/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.properties63
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/plugin.xml501
-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/ISystemFileMessages.java37
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java585
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java533
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java249
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/FileDialogFactory.java51
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/ISaveAsDialog.java34
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java131
-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.java105
-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/resources/ISystemCachedRemoteResource.java86
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java108
-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.java57
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java43
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java221
-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.java57
-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/SystemEditableRemoteFile.java1996
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java221
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java800
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java450
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java3153
-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/SaveAsForm.java244
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java865
-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.java789
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java577
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java1078
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java623
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java203
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java429
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties418
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/ISystemFileConstants.java100
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java532
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/ShowResourceInSystemsViewDelegate.java91
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java249
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java55
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java56
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareFilesAction.java132
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareWithEditionAction.java39
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java599
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCreateEditActions.java272
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDoubleClickEditAction.java97
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDownloadConflictAction.java295
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java184
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileInPlaceAction.java84
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileLineAction.java130
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilePlatformAction.java84
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java215
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java386
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemFileUpdateFilterAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java367
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileAction.java88
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterAction.java134
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterFromFolderAction.java131
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFolderAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java214
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java564
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java149
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemReplaceWithEditionAction.java39
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchAction.java65
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java54
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java166
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java158
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java638
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SaveAsDialog.java87
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java609
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java101
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java651
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java474
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java676
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java1099
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java72
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/ISystemRemoteCoreConstants.java28
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemFileNameHelper.java81
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java894
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarker.java288
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerInfo.java236
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerManager.java405
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerSet.java357
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinition.java142
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java125
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemotePath.java99
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResource.java179
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceInfo.java92
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceManager.java87
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemOpenSearchPageAction.java62
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java1620
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderAction.java474
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderDialog.java67
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java46
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteObjectAPIProvider.java93
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java47
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesDialog.java133
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/DownloadAndOpenJob.java168
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java177
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java61
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java47
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewFileAdapterFactory.java65
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java3715
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java823
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java361
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultAdapterFactory.java81
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultSetAdapterFactory.java76
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/widgets/SystemFileTreeAndListGroup.java169
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemFileNewConnectionWizardPage.java234
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java488
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizardMainPage.java237
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java342
-rw-r--r--rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizardMainPage.java238
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/.settings/org.eclipse.jdt.core.prefs75
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/HelpContexts.xml32
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/META-INF/MANIFEST.MF31
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/build.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_export.gifbin187 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_import.gifbin189 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/icons/full/wizards/fsicon_wiz.gifbin173 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/export_wiz.gifbin2816 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/import_wiz.gifbin2960 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/plugin.properties58
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/plugin.xml259
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/IRemoteImportExportConstants.java71
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportDescriptionFilesViewerFilter.java93
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportPlugin.java90
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportProblemDialog.java141
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.java80
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.properties89
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportRunnable.java42
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportUtil.java143
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.java87
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties104
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Debug.java20
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemElement.java233
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemStructureProvider.java101
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IImportStructureProvider.java64
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionReader.java25
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionWriter.java25
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionReader.java25
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionWriter.java25
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/MinimizedFileSystemElement.java62
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizard.java131
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java985
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java156
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java182
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.java197
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java211
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java172
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportFromProjectActionDelegate.java31
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java573
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java187
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java230
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java202
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java174
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportExportActionDelegate.java119
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java691
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportToProjectActionDelegate.java31
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenExportWizardActionDelegate.java83
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenImportWizardActionDelegate.java83
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOverwriteQuery.java95
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizard.java128
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java1638
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeExpandDropListener.java89
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeScrollDropListener.java145
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java432
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java245
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/ISynchronizeData.java124
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSEResourceVariantComparator.java150
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSESyncUtils.java285
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/SynchronizeData.java205
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileModificationValidator.java104
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemOperations.java564
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemPlugin.java135
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProvider.java436
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProviderType.java36
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/Policy.java103
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/messages.properties46
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemMergeContext.java122
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemRemoteTree.java78
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemResourceVariant.java186
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSubscriber.java235
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSyncInfo.java70
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/CompoundResourceTraversal.java291
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemOperation.java181
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemSynchronizeParticipant.java296
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/GetOperation.java120
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/MergeOperation.java116
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelGetAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelMergeAction.java89
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelPutAction.java87
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/PutOperation.java136
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeByteCalculator.java52
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeConnectionManager.java42
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeFilter.java28
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeOperation.java76
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizePerspectiveSelector.java30
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizer.java34
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeConnectionManager.java33
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeFilter.java36
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeOperation.java82
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizePerspectiveSelector.java161
-rw-r--r--rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/Synchronizer.java158
-rw-r--r--rse/plugins/org.eclipse.rse.logging/.project11
-rw-r--r--rse/plugins/org.eclipse.rse.logging/decommissioned.txt5
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs71
-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.properties22
-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.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/plugin.xml101
-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/internal/processes/ui/ProcessesPlugin.java130
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.java97
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.properties87
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java374
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java114
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemProcessUpdateFilterAction.java52
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java175
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillDialog.java337
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableProvider.java79
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableRow.java151
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java96
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/ISystemProcessPropertyConstants.java37
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java69
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java61
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessStatesContentProvider.java136
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.java100
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.properties87
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewProcessAdapterFactory.java60
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java506
-rw-r--r--rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java760
-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.prefs71
-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.properties32
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/build.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.sdk/src/readme.txt1
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.classpath13
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.settings/.api_filters27
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs71
-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.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/build.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/dstore_miners.rmtjardesc14
-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/CommandMiner.java309
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/EnvironmentMiner.java251
-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.java155
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalProcessDataStoreConstants.java44
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalByteStreamHandler.java332
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java2119
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalProcessMiner.java427
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java101
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java1469
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java337
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/QueryPathThread.java151
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/CommandPattern.java78
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/OutputPattern.java107
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/ParsedOutput.java41
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/Patterns.java329
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java385
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ClassFileParser.java156
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyBatchThread.java260
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopySingleThread.java191
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java252
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFileThread.java193
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFolderThread.java188
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java262
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileClassifier.java1056
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileDescriptors.java26
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileQueryThread.java387
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/QueryThread.java171
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/RenameThread.java164
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java275
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java122
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java487
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/processes/ProcessDEComparator.java58
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/plugin.properties16
-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.dat287
-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.pl89
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl70
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl47
-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.sh44
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl90
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl70
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh44
-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/Activator.java61
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/IDStoreMessageIds.java49
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.java67
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.properties60
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java2485
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java434
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreInputStream.java218
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreOutputStream.java171
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreVirtualHostFile.java79
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreHostProcess.java522
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java396
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/rmtservice/DStoreRemoteServiceService.java43
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchResultConfiguration.java54
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java197
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostOutput.java45
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostShell.java96
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java188
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java222
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java301
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java470
-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/util/DStoreStatusMonitor.java393
-rw-r--r--rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java326
-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.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/.project34
-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.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/META-INF/MANIFEST.MF17
-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.properties32
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/build.properties23
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/Activator.java63
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java337
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java1805
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/IFTPService.java22
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigFactory.java32
-rw-r--r--rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigProxy.java35
-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/.project34
-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.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/META-INF/MANIFEST.MF18
-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.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/build.properties23
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/Activator.java75
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalMessageIds.java28
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalService.java23
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.java61
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.properties53
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java1835
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalHostFile.java154
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalVirtualHostFile.java121
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/processes/LocalProcessService.java155
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchHandler.java514
-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/search/LocalSearchService.java41
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalHostShell.java88
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java242
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellService.java125
-rw-r--r--rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java514
-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/.project34
-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.prefs71
-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.MF17
-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.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/build.properties23
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/plugin.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/readme.txt67
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/Activator.java119
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshService.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshSessionProvider.java32
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.java42
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java1344
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpHostFile.java274
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalService.java53
-rw-r--r--rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java244
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/META-INF/MANIFEST.MF16
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/about.properties32
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/build.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/Activator.java76
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetService.java23
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetSessionProvider.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.java35
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/EOFDetectingInputStreamWrapper.java80
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalService.java56
-rw-r--r--rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalShell.java293
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.services/.settings/.api_filters115
-rw-r--r--rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs71
-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.MF30
-rw-r--r--rse/plugins/org.eclipse.rse.services/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.services/build.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java39
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ITarConstants.java133
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemArchiveUtil.java68
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemUniversalZipEntry.java149
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/TgzFile.java65
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract4ByteNumericInfo.java52
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract8ByteNumericInfo.java71
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractAttributeInfo.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCPInfo.java56
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCommonInfo.java126
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractRefInfo.java71
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassFileUTF8Reader.java100
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassInfo.java52
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/DoubleInfo.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedClassLoader.java132
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedDataInputStream.java64
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldInfo.java36
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldRefInfo.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FloatInfo.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IClassFileConstants.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IntegerInfo.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/InterfaceMethodRefInfo.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/LongInfo.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodInfo.java36
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodRefInfo.java34
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/NameAndTypeInfo.java53
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/StringInfo.java51
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/UTF8Info.java71
-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.java76
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java74
-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.java38
-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/ISystemOperationMonitor.java60
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java469
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java259
-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.java456
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java334
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemOperationMonitor.java49
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemReentrantMutex.java228
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java207
-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.java139
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java620
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java627
-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.java2741
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTgzHandler.java64
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java2953
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarEntry.java555
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarFile.java363
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarOutputStream.java136
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java454
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java366
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java121
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java86
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties72
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java67
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java36
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SimpleSystemMessage.java225
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemElementNotFoundException.java74
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java54
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java456
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java70
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java864
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java83
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationCancelledException.java56
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationFailedException.java121
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteMessageException.java74
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteSecurityException.java80
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnexpectedErrorException.java49
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnsupportedOperationException.java49
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java519
-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.java139
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java195
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java52
-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.java52
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java253
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java314
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java127
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java294
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java145
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java188
-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.java135
-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.java191
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java111
-rw-r--r--rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java196
-rw-r--r--rse/plugins/org.eclipse.rse.services/patterns.dat283
-rw-r--r--rse/plugins/org.eclipse.rse.services/plugin.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.services/plugin.xml27
-rw-r--r--rse/plugins/org.eclipse.rse.services/schema/archivehandlers.exsd145
-rw-r--r--rse/plugins/org.eclipse.rse.services/schema/codePageConverters.exsd121
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/Activator.java206
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/RSEServicesMessages.java46
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/messages.properties38
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/CommandPattern.java62
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/OutputPattern.java100
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java160
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellOutputReader.java150
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellWriterThread.java101
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellAdapterFactory.java38
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellService.java111
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java145
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/AbstractService.java54
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java86
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java183
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/RemoteUtil.java138
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java306
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/CodePageConverterManager.java87
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/DefaultFileServiceCodePageConverter.java114
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/HostFilePermissions.java163
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFilePermissionsService.java73
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java657
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileServiceCodePageConverter.java69
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java172
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissions.java167
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissionsContainer.java39
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/PendingHostFilePermissions.java31
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java47
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java146
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java84
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java72
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java68
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/package.html32
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java300
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java109
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java149
-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.java224
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java57
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java287
-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.java95
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java142
-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.java37
-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.java196
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractShellService.java56
-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.java177
-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.java137
-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.java124
-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.services/src/org/eclipse/rse/services/terminals/AbstractDelegatingTerminalService.java67
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalService.java33
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalShell.java102
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/BaseShellDecorator.java79
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/IBaseShell.java154
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalService.java84
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalShell.java94
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/TerminalShellDecorator.java53
-rw-r--r--rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/package.html61
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.classpath12
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.settings/.api_filters12
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF33
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/build.properties19
-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/elcl16/exportshellhistory.gifbin590 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshelloutput.gifbin613 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/removeshell.gifbin580 -> 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/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/systemenvvar.gifbin206 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarlibpath.gifbin216 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarpath.gifbin216 -> 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/plugin.properties31
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/plugin.xml200
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.java101
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.properties95
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellsUIPlugin.java146
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java291
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemBaseShellAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java746
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellHistoryAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellOutputAction.java90
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemShowInShellViewAction.java59
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateRemoveShellAction.java59
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java95
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/handlers/LaunchShellCommandHandler.java41
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java150
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java112
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java692
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewWorkbook.java273
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java85
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java61
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsUI.java82
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java978
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewProvider.java38
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewOutputAdapterFactory.java87
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewRemoteErrorAdapter.java135
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java189
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java657
-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/ISystemCommandTextModifyListener.java35
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java445
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java321
-rw-r--r--rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java1195
-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/.classpath12
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF25
-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.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.xml89
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/schema/remoteFileTypes.exsd147
-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.java73
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java62
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/Activator.java65
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFileMessageIds.java36
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFilePreferencesConstants.java61
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemRemoteEditConstants.java55
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemTextEditorConstants.java50
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePermissionsAdapterFactory.java59
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePropertyTester.java40
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java163
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.java162
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.properties183
-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.java134
-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/internal/subsystems/files/core/model/RemotePath.java261
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePathUtil.java137
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeMapping.java170
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeRegistry.java561
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtility.java56
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtilityFactory.java45
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemIFileProperties.java548
-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.java67
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java43
-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.java426
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java143
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java244
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java1255
-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/FileSubSystemInputStream.java88
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemOutputStream.java73
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java43
-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.java58
-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.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java357
-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.java38
-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.java702
-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.java41
-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.java1230
-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.java217
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEncodingManager.java319
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java194
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java76
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java1495
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java467
-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.java212
-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.java223
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java180
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/META-INF/MANIFEST.MF23
-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.properties19
-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.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml54
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/Activator.java66
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java214
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileAdapter.java111
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java188
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreJavaLanguageUtility.java78
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreLanguageUtilityFactory.java80
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreSearchResult.java77
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreVirtualFile.java77
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/RemoteFilePropertyChangeListener.java256
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java208
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreWindowsFileSubSystemConfiguration.java98
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/package.html29
-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/.project34
-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.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/META-INF/MANIFEST.MF25
-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.properties20
-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.properties39
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml113
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/schema/ftpListingParsers.exsd275
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.java29
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java182
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java110
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/IFTPSubSystem.java21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPFileAdapter.java56
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPRemoteFile.java78
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigFactory.java255
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigProxy.java123
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSENTFTPEntryParser.java37
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEOS400FTPEntryParser.java31
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEVMSFTPEntryParser.java65
-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/package.html29
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/META-INF/MANIFEST.MF22
-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.properties19
-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.properties25
-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/internal/subsystems/files/local/Activator.java71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalJavaLanguageUtility.java64
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalLanguageUtilityFactory.java79
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java122
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFile.java80
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFileAdapter.java74
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalVirtualFile.java197
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java267
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/package.html29
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.core.prefs71
-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.MF21
-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.properties19
-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.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.xml32
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/Activator.java73
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/SftpFileAdapter.java54
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/SftpRemoteFile.java60
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileSubSystemConfiguration.java110
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/package.html29
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF24
-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.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java35
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties22
-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/impl/RemoteProcessContext.java157
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java282
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java146
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java196
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java25
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java50
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java196
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java82
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/META-INF/MANIFEST.MF23
-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.properties19
-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.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.xml43
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/DStoreProcessAdapter.java86
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java127
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/package.html29
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/META-INF/MANIFEST.MF21
-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.properties19
-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.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.xml42
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/internal/subsystems/processes/local/Activator.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/internal/subsystems/processes/local/LocalProcessAdapter.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java137
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/package.html29
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.ui.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/META-INF/MANIFEST.MF19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/build.properties20
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystem_obj.gifbin574 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystemlive_obj.gifbin594 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.xml31
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/Activator.java248
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/DelegatingShellProcessConnectorService.java66
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxHostProcess.java172
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java174
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.java37
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.properties22
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java293
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/ShellProcessAdapter.java81
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/WaiterJob.java46
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/ShellProcessSubSystemConfiguration.java84
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/package.html31
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/META-INF/MANIFEST.MF24
-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.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/Activator.java72
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.java45
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.properties31
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java112
-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/RemoteSystemEnvVar.java139
-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/model/ISystemOutputRemoteTypes.java101
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java179
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java322
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java358
-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/RemoteError.java40
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteOutput.java212
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java248
-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.java204
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java39
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java157
-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/RemoteCmdSubSystem.java1293
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java164
-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.java28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java36
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java133
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java256
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java74
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs71
-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.properties19
-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.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml40
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/Activator.java71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java267
-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/package.html29
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF23
-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.properties19
-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.properties25
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml38
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/internal/subsystems/shells/local/Activator.java71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/internal/subsystems/shells/local/model/LocalServiceCommandShell.java157
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java134
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/package.html29
-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/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.core.prefs71
-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.MF22
-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.properties19
-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.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.xml33
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/Activator.java71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java206
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java85
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/package.html29
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/META-INF/MANIFEST.MF23
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/build.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommands_obj.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommandslive_obj.gifbin246 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.properties23
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.xml41
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/Activator.java60
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/TelnetServiceCommandShell.java199
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/TelnetShellSubSystemConfiguration.java85
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/package.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/META-INF/MANIFEST.MF17
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommands_obj.gifbin938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommandslive_obj.gifbin938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.xml30
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalConnectorService.java66
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalService.java67
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemConfigurationImpl.java66
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemHelper.java75
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java38
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java43
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java219
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java70
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java86
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.html14
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/package.html22
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.classpath12
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/META-INF/MANIFEST.MF18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/build.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommands_obj.gifbin938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommandslive_obj.gifbin938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.xml31
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java79
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.classpath11
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.settings/.api_filters11
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF25
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/about.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/build.properties23
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/icons/removeterminal.gifbin580 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/icons/terminal_view.gifbin938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommands_obj.gifbin938 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommandslive_obj.gifbin250 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/plugin.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/plugin.xml125
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/Activator.java82
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalServiceHelper.java111
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java43
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties26
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/RemoveTerminalAction.java50
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/ShowInTerminalViewAction.java48
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/TerminalElementBaseAction.java70
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapter.java46
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapterFactory.java47
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/handlers/LaunchTerminalCommandHandler.java182
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/propertypages/TerminalServicesPropertyPage.java83
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectionThread.java110
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java49
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectorImpl.java99
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java183
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementsAdapterFactory.java49
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewTab.java462
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java233
-rw-r--r--rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalsUI.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui.capabilities/.project22
-rw-r--r--rse/plugins/org.eclipse.rse.ui.capabilities/META-INF/MANIFEST.MF7
-rw-r--r--rse/plugins/org.eclipse.rse.ui.capabilities/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.ui.capabilities/build.properties14
-rw-r--r--rse/plugins/org.eclipse.rse.ui.capabilities/plugin.properties17
-rw-r--r--rse/plugins/org.eclipse.rse.ui.capabilities/plugin.xml70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.classpath14
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.options1
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.settings/.api_filters17
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.ui/HelpContexts.xml944
-rw-r--r--rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF60
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/DefaultUIInteractionProvider.java179
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.java56
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.properties44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/PreferencesMapper.java205
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSESystemTypeAdapterFactory.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSEUIInitJob.java47
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemProfileForm.java263
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResourceListener.java819
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java1057
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties1099
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemSortableSelection.java133
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemTabFolderLayout.java62
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/ShowInSystemsViewDelegate.java396
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingBrowseWithAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingCompareWithAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingExpandToAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingGoToAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingNewAction.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingOpenWithAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingPulldownMenuAction.java107
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServerBaseAction.java140
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServersAction.java102
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingReplaceWithAction.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingViewAction.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingWorkWithAction.java50
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionCopyString.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionDeleteString.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringDown.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringUp.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionPasteString.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearAllPasswordsAction.java116
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearPasswordAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAction.java87
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java75
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java411
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonRenameAction.java244
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonSelectAllAction.java74
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java116
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAllSubSystemsAction.java155
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java251
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAction.java71
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java107
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExpandAction.java90
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExportConnectionAction.java134
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java137
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java129
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java367
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java328
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java496
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterAction.java154
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterPoolReferenceAction.java142
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java375
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java367
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java490
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterAction.java157
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterPoolReferenceAction.java142
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java176
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterPoolReferenceSelectAction.java85
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterRemoveFilterPoolReferenceAction.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java270
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java204
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java82
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemImportConnectionAction.java149
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java260
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveDownConnectionAction.java110
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveUpConnectionAction.java111
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemNewProfileAction.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenExplorerPerspectiveAction.java187
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenRSEPerspectiveAction.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceRestoreStateAction.java74
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceShowFilterPoolsAction.java76
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java222
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameSelectAction.java59
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStartAction.java59
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStopAction.java59
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemResolveFilterStringAction.java75
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRunAction.java96
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSeparatorAction.java60
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInMonitorAction.java105
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInTableAction.java104
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowPreferencesPageAction.java215
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemStringPromptAction.java99
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManager.java404
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManagerForTesting.java183
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTeamReloadAction.java77
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTestFilterStringAction.java96
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToAllAction.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToBaseAction.java100
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java176
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkWithProfilesAction.java56
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/CopyRunnable.java38
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java156
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyDialog.java156
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyProfileDialog.java281
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableProvider.java160
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableRow.java180
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteDialog.java323
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableProvider.java173
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableRow.java205
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameDialog.java696
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableProvider.java216
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableRow.java214
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemResolveFilterStringDialog.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemTestFilterStringDialog.java217
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemWorkWithHistoryDialog.java347
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolManagerUIProvider.java27
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java193
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java199
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java373
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java72
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java85
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWizardDialog.java77
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java662
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemUnNamedFilterDialog.java215
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.java30
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.properties30
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferencePage.java246
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/RemoteSystemsPreferencePage.java253
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerConnectionSecurityPropertyPage.java128
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerLauncherPropertyPage.java190
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java225
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java402
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectorServicesPropertyPage.java90
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolPropertyPage.java126
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolReferencePropertyPage.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPropertyPage.java137
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemLoggingPreferencePage.java36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemPreferenceInitializer.java42
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewProfilePropertyPage.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java146
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ContextObjectWithViewer.java77
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ElementComparer.java78
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ISystemMementoConstants.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java161
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SubSystemConfigurationAdapterFactory.java60
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxCellEditor.java225
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxPropertyDescriptor.java90
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java897
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDecoratingLabelProvider.java59
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDeferredTableTreeContentManager.java82
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java220
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java87
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritablePropertyData.java174
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextCellEditor.java517
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextPropertyDescriptor.java114
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveHelpers.java188
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveLayout.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPropertySheetForm.java225
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResolveFilterStringAPIProviderImpl.java41
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java657
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java194
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java631
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java2057
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java473
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java147
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewFilter.java105
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java2022
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewSorter.java186
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java128
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java6735
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java100
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java120
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java191
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java253
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java99
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAdapterFactory.java169
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewCompositeActionGroup.java105
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java785
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java447
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java424
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java45
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java593
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java299
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java416
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java1049
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterStringAdapter.java297
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewForm.java546
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewLabelAndContentProvider.java514
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMenuListener.java170
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMessageAdapter.java210
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewNewConnectionPromptAdapter.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java2038
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartFrameSource.java56
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartGotoActionGroup.java107
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPromptableAdapter.java227
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPropertyTester.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.java143
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.properties117
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewRootInputAdapter.java245
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewScratchpadAdapter.java284
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java818
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/BrowseAction.java55
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearAction.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearSelectedAction.java60
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java587
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java303
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorUI.java78
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java1142
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/TabFolderLayout.java62
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/BrowseAction.java54
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java105
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java1976
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java422
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewProvider.java269
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchClearHistoryAction.java53
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchCopyToClipboardAction.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchHistoryAction.java64
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveAllMatchesAction.java54
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java54
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableView.java387
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableViewProvider.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchUI.java73
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewContentProvider.java184
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewLabelProvider.java94
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java1324
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemResourceAdaptableProfile.java36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamView.java269
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryAdapter.java328
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryNode.java155
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewContentProvider.java245
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewInputProvider.java149
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewLabelProvider.java215
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeActiveProfileAction.java92
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java92
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java1585
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java401
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java258
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetNode.java146
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewRefreshAllAction.java80
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewResourceAdapterFactory.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java306
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java213
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/SSLForm.java118
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/ServerConnectionSecurityForm.java95
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java34
-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.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java318
-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.java338
-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.java235
-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.java80
-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/ISystemViewSupplier.java38
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java88
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java198
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java96
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java194
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java670
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java308
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java721
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemActionViewerFilter.java199
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java304
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java819
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java1543
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java397
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java561
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java1534
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java65
-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/ISystemViewMenuListener.java28
-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/LazyDownloadJob.java44
-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.java442
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java358
-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.java484
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java266
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java346
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java232
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java367
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java189
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java104
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java525
-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/ICredentialsValidator.java44
-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.java62
-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.java273
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java360
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java515
-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.java324
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java757
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java469
-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.java276
-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/SystemWizardDialog.java183
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java38
-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.java1459
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java51
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java42
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java730
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java173
-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.java253
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java233
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java496
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java89
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java493
-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.java123
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java366
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInputs.java32
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInterface.java36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogOutputs.java33
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java30
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java676
-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.java556
-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/SystemMessageDialog.java914
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java642
-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.java132
-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.java802
-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.java49
-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/SystemDeferredTreeContentManager.java132
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java643
-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.java219
-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/ISystemSubSystemPropertyPageCoreForm.java48
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java143
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java401
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java534
-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.java325
-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/SystemFilterStringPropertyPage.java342
-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.java641
-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.java411
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java111
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java559
-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.java49
-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.java74
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java103
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java41
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java143
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java102
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java99
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java157
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java145
-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.java96
-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.java127
-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.java92
-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.java67
-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.java122
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java363
-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/view/AbstractSystemRemoteAdapterFactory.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java2344
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ContextObject.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IContextObject.java54
-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/ISystemEditableRemoteObject.java165
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java36
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java128
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java147
-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/ISystemResourceSelectionInputProvider.java80
-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/ISystemSelectRemoteObjectAPIProvider.java101
-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/ISystemTableViewColumnManager.java26
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java238
-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.java482
-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/IViewLinker.java39
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java1234
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java239
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAdapterHelpers.java112
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java35
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java2145
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java389
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java609
-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.java265
-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.java112
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java661
-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.java452
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java718
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java1188
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java400
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java113
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java177
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java166
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java224
-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.java110
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java92
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java113
-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.java68
-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.java153
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java429
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java471
-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/RSEDialogPageMessageLine.java115
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java305
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java104
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java215
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSEDynamicNewConnectionWizard.java32
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSENewConnectionWizardDescriptor.java40
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/ISystemNewConnectionWizardPage.java44
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEAbstractNewConnectionWizard.java89
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java557
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java172
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java457
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java89
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardRegistry.java153
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java410
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java177
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeElement.java111
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardCategory.java26
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardDescriptor.java69
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardRegistryElement.java57
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardRegistry.java134
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardSelectionTreeDataManager.java75
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardCategory.java49
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardDescriptor.java116
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardRegistryElement.java101
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeContentProvider.java70
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java165
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeLabelProvider.java46
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreePatternFilter.java123
-rw-r--r--rse/plugins/org.eclipse.rse.ui/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.ui/build.properties31
-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/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/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/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/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/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/workwithfilterpools.gifbin217 -> 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/systemshowintable.gifbin338 -> 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/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/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/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/workwithfilterpools.gifbin353 -> 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/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/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/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/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/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/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/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/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/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/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/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/messageFile.dtd22
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java304
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java561
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRunnableContextWrapper.java175
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemScratchpad.java125
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemPromptableObject.java86
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemRegistryUI.java156
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemShellProvider.java32
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemRemoteElementResourceSet.java98
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemResourceChangeEventUI.java108
-rw-r--r--rse/plugins/org.eclipse.rse.ui/plugin.properties109
-rw-r--r--rse/plugins/org.eclipse.rse.ui/plugin.xml579
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/mountPathMappers.exsd135
-rw-r--r--rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizards.exsd234
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java3473
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java2883
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapter.java68
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapterFactory.java43
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemPropertyTester.java72
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/ISubSystemConfigurationAdapter.java330
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardConnectorService.java100
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardCredentialsProvider.java423
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/package.html23
-rw-r--r--rse/plugins/org.eclipse.rse.ui/systemmessages.xml626
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/.project34
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/META-INF/MANIFEST.MF38
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/about.ini27
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/about.mappings6
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/about.properties29
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/build.properties24
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gifbin241 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gifbin211 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gifbin217 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gifbin207 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gifbin366 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gifbin332 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gifbin345 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gifbin336 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibm_obj.gifbin596 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibmuser_obj.gifbin587 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_new_obj.gifbin597 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_user_obj.gifbin563 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_obj.gifbin338 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_user_obj.gifbin361 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_new_obj.gifbin370 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_obj.gifbin353 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_new_obj.gifbin574 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_obj.gifbin341 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_user_obj.gifbin577 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_new_obj.gifbin577 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_obj.gifbin341 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/plugin.properties27
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/plugin.xml134
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java83
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionContext.java45
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionModel.java66
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java39
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java39
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java32
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionContext.java172
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionModel.java231
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionRegistry.java205
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java110
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java212
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.java124
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.properties159
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/ISystemCompileManagerAdapter.java28
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/UniversalCompileManagerAdapter.java45
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/ISystemUDActionSubsystemAdapter.java29
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/UniversalSystemUDActionSubsystemAdapter.java44
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCascadingCompileAction.java100
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCompileAction.java205
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompileMenu.java142
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompilePromptMenu.java141
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemWorkWithCompileCommandsAction.java195
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/uda/SystemDynamicUserActionMenu.java125
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/CompilablePropertyTester.java58
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java46
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileProfile.java28
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompilableSource.java47
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java64
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileProfile.java44
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java55
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstitutor.java219
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommand.java44
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommands.java65
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java799
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemLocalFiles.java114
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemUniversalFiles.java113
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java60
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java49
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java42
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditPaneFiles.java69
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java591
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemCommandTextAdditionalGUIProvider.java32
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemSubstitutor.java32
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVar.java77
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVarList.java292
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandTextField.java319
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandViewerConfiguration.java209
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemEditCommandDialog.java141
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemPromptCommandDialog.java220
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneHoster.java30
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneListener.java26
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandSubstitutor.java26
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileXMLConstants.java153
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompilableSource.java231
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java134
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommand.java440
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionCopy.java54
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionDelete.java54
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveDown.java53
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveUp.java53
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionPaste.java54
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionRestoreDefaults.java54
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandContentProvider.java45
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java677
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java63
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributor.java137
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorManager.java70
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorReader.java53
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java429
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileMultipleSelectAction.java181
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileProfile.java614
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileRemoteObjectMatcher.java190
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileType.java348
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommand.java214
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommands.java196
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemNewCompileSrcTypeDialog.java217
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemPromptCompileCommandDialog.java84
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java1125
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAConstants.java79
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAEditPaneHoster.java40
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDSelectTypeListener.java32
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTreeView.java130
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTypeEditPaneTypesSelector.java108
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDWorkWithDialog.java63
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemXMLElementWrapperFactory.java33
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemPromptUDADialog.java79
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeAction.java102
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeByProfileAction.java77
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAFileTypesForName.java29
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResolvedTypes.java135
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.java267
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.properties423
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDARestoreDefaultsActions.java53
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java47
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java1195
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionElement.java303
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java200
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java1158
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java90
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAsBaseAction.java55
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java1347
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java820
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeViewLabelProvider.java54
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSelectTypesForm.java478
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java193
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionCopy.java52
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionDelete.java52
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveDown.java51
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveUp.java51
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionPaste.java52
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeViewNewItem.java118
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java536
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeElement.java86
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java250
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java134
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtension.java67
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtensionManager.java106
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDAsDialog.java450
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDTypeDialog.java426
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemXMLElementWrapper.java542
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java158
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java179
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/MatchStr.java97
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAFileTypesForName.java29
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAResolvedTypes.java76
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java148
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java125
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java126
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java152
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java123
-rw-r--r--rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java127
-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.prefs71
-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.properties32
-rw-r--r--rse/plugins/org.eclipse.rse/build.properties25
-rw-r--r--rse/plugins/org.eclipse.rse/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse/plugin.properties16
-rw-r--r--rse/plugins/org.eclipse.rse/src/readme.txt1
-rw-r--r--rse/plugins/readme.txt3
-rw-r--r--rse/readme.txt6
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/.project17
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/build.properties20
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/epl-v10.html256
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/feature.properties141
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/feature.xml101
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/license.html79
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/rootfiles/epl-v10.html256
-rw-r--r--rse/tests/org.eclipse.rse.tests-feature/rootfiles/notice.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.prefs71
-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.xml54
-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/.project34
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/META-INF/MANIFEST.MF22
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/about.html28
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/build.properties23
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.pngbin71369 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.pngbin36117 -> 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.html82
-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.xml126
-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/internal/tests/framework/BasicTestSuiteHolder.java43
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java37
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java64
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java40
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java62
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java128
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java53
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java38
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java93
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java100
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java50
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java96
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java59
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java133
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java117
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java49
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java32
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java31
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java51
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java32
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java44
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java57
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java89
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java30
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java31
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java63
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java437
-rw-r--r--rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java66
-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/toc.xml19
-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/.classpath11
-rw-r--r--rse/tests/org.eclipse.rse.tests/.project28
-rw-r--r--rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs7
-rw-r--r--rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.core.prefs71
-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/GVT/bra/test.txt20
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/chs/test.txt11
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/cht/test.txt19
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/deu/test.txt19
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/esp/test.txt20
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/fre/test.txt20
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/instructions.txt14
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/ita/test.txt20
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/jpn/test.txt34
-rw-r--r--rse/tests/org.eclipse.rse.tests/GVT/kor/test.txt21
-rw-r--r--rse/tests/org.eclipse.rse.tests/META-INF/MANIFEST.MF52
-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.properties36
-rw-r--r--rse/tests/org.eclipse.rse.tests/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/icons/branch.gifbin873 -> 0 bytes
-rw-r--r--rse/tests/org.eclipse.rse.tests/icons/leaf.gifbin960 -> 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.properties25
-rw-r--r--rse/tests/org.eclipse.rse.tests/plugin.xml132
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java73
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsPlugin.java237
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsResources.properties66
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/AllTests.java44
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/HostMoveTest.java193
-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.java52
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java954
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSEWaitAndDispatchUtil.java149
-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.java50
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEBaseConnectionTestCase.java215
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java283
-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/core/passwords/PasswordsTest.java137
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/passwords/PasswordsTestSuite.java53
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/RSERegistriesTestSuite.java55
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java141
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemInterfacesTest.java64
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/BadInitializer.java47
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/GoodInitializer.java46
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitListener.java36
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTest.java84
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTestSuite.java51
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/ListenerInitializer.java53
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/UglyInitializer.java69
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java345
-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.java222
-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.java57
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java183
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapter.java153
-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.java75
-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.java54
-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.java334
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/ExportImportTest.java201
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/MigrationTest.java37
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java270
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTestSuite.java61
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java102
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/RSEPreferencesTestSuite.java54
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTest.java147
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTestSuite.java58
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/CreateFileTestCase.java139
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPFileSubsystemTestCase.java167
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPWindowsFileSubSystemConfiguration.java23
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileOutputStreamTestCase.java253
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveBaseTest.java953
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTest.java1527
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStore.java1006
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStoreWindows.java128
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceBaseTest.java419
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceHelper.java86
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java433
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTgzArchiveTest.java27
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileSubsystemConsistencyTestCase.java501
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileStoreTest.java655
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileSubsystemTestSuite.java71
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/RSEShellSubsystemTestSuite.java64
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellOutputListener.java47
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java247
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellSubSystemTest.java174
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/TerminalShellServiceTest.java102
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/RSETestSubsystemTestSuite.java55
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java218
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/RSESynchronizeTest.java139
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/SynchronizeTestBase.java223
-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/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestCase.java54
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSimpleWizardPage.java144
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSuite.java56
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestWizard.java62
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTest.java73
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTestSuite.java53
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTest.java49
-rw-r--r--rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTestSuite.java53
-rw-r--r--rse/tests/org.eclipse.rse.tests/teamConfig/RSE Combined Test Suite.launch42
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/connectionDefault.properties36
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/ftpConnection.properties28
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/ftpSshConnection.properties28
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/ftpWindowsConnection.properties28
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/linuxConnection.properties44
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/localConnection.properties22
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/sshConnection.properties28
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties28
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/telnetConnection.properties28
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/testConnectionManager/connection.properties21
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/testFTPReadAccessToRemoteHost/connection.properties21
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/unixConnection.properties44
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.data/windowsConnection.properties31
-rw-r--r--rse/tests/org.eclipse.rse.tests/test.xml100
-rw-r--r--rse/tests/readme.txt2
-rw-r--r--rse/tools/org.eclipse.rse.tools.workspace/.project11
-rw-r--r--rse/tools/org.eclipse.rse.tools.workspace/extract-source/.cvsignore2
-rw-r--r--rse/tools/org.eclipse.rse.tools.workspace/extract-source/build.xml85
-rw-r--r--rse/tools/org.eclipse.rse.tools.workspace/readme.txt7
-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.html256
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.properties142
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.xml48
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html256
-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/dsdp32.pngbin2275 -> 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.properties20
-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.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties142
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml92
-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.html256
-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.html256
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.classpath11
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF18
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/README.txt64
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/plugin.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/plugin.xml21
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java65
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java28
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java212
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java230
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java44
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties49
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java113
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java163
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java193
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java162
-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.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml50
-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.html256
-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/dsdp32.pngbin2275 -> 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/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs71
-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.MF17
-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/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/plugin.properties13
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/plugin.xml22
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java94
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java26
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java78
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java185
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java364
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java121
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java97
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties53
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java119
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java118
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java277
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml37
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.core.prefs75
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/META-INF/MANIFEST.MF13
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/build.properties27
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/plugin.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/plugin.xml21
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/ITelnetSettings.java23
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/NetworkPortMap.java62
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetCodes.java94
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java118
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java690
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java157
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.java25
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.properties20
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetOption.java703
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetProperties.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettings.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettingsPage.java154
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/build.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/feature.xml46
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.project28
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs83
-rw-r--r--terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF22
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.test/build.properties28
-rw-r--r--terminal/org.eclipse.tm.terminal.test/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.test/plugin.properties17
-rw-r--r--terminal/org.eclipse.tm.terminal.test/plugin.xml23
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java270
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java62
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java237
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java175
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java1237
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java817
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java45
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java679
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java224
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java1344
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java191
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java481
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java108
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java116
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java104
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java62
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java68
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java110
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java103
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java333
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java87
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java35
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java72
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java21
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java15
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java43
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java49
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java253
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java127
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java32
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java113
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java37
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java116
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java32
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch16
-rw-r--r--terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch39
-rw-r--r--terminal/org.eclipse.tm.terminal.test/test.xml101
-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.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/feature.xml49
-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.html256
-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/dsdp32.pngbin2275 -> 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/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal.view/HelpContexts.xml26
-rw-r--r--terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF16
-rw-r--r--terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml19
-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.properties33
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/book.css1
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html46
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html78
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html101
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html64
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/notice.html30
-rw-r--r--terminal/org.eclipse.tm.terminal.view/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gifbin385 -> 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/lock_co.gifbin626 -> 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/command_input_field.gifbin239 -> 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/lock_co.gifbin588 -> 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/dlcl16/rem_co.gifbin159 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gifbin239 -> 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/lock_co.gifbin626 -> 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/elcl16/rem_co.gifbin163 -> 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.properties22
-rw-r--r--terminal/org.eclipse.tm.terminal.view/plugin.xml81
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java43
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties33
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java75
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java39
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java40
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java41
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java106
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java39
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java78
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java52
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java35
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java111
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java31
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java90
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java334
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java722
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java203
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java181
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java167
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java152
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java52
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties42
-rw-r--r--terminal/org.eclipse.tm.terminal.view/toc.xml21
-rw-r--r--terminal/readme.txt4
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/.classpath7
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/.cvsignore1
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/.project34
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/META-INF/MANIFEST.MF24
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/about.html28
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/about.ini27
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/about.mappings6
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/about.properties29
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/build.properties25
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/icons/systemfiles_obj.gifbin157 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/icons/systemfileslive_obj.gifbin224 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/icons/wince.gifbin884 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/icons/wincelive.gifbin884 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/plugin.properties21
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/plugin.xml39
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/IWinCESubSystem.java22
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/Messages.java26
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorService.java91
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorServiceManager.java46
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/messages.properties12
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IRapiSessionProvider.java22
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IWinCEService.java23
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/Messages.java26
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEFileService.java565
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEHostFile.java114
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/messages.properties12
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/Activator.java63
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCEFileAdapter.java51
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCERemoteFile.java42
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileServiceSubSystem.java85
-rw-r--r--wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileSubSystemConfiguration.java118
-rw-r--r--wince/org.eclipse.rse.wince-feature/.project17
-rw-r--r--wince/org.eclipse.rse.wince-feature/build.properties18
-rw-r--r--wince/org.eclipse.rse.wince-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.wince-feature/epl-v10.html256
-rw-r--r--wince/org.eclipse.rse.wince-feature/feature.properties140
-rw-r--r--wince/org.eclipse.rse.wince-feature/feature.xml75
-rw-r--r--wince/org.eclipse.rse.wince-feature/license.html79
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/feature.properties146
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/license.html79
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.html33
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.properties29
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/plugin.properties16
-rw-r--r--wince/org.eclipse.tm.rapi.examples/.classpath7
-rw-r--r--wince/org.eclipse.tm.rapi.examples/.cvsignore1
-rw-r--r--wince/org.eclipse.tm.rapi.examples/.project28
-rw-r--r--wince/org.eclipse.tm.rapi.examples/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--wince/org.eclipse.tm.rapi.examples/META-INF/MANIFEST.MF14
-rw-r--r--wince/org.eclipse.tm.rapi.examples/about.html28
-rw-r--r--wince/org.eclipse.tm.rapi.examples/build.properties18
-rw-r--r--wince/org.eclipse.tm.rapi.examples/plugin.properties17
-rw-r--r--wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/Activator.java64
-rw-r--r--wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/RapiExamples.java244
-rw-r--r--wince/org.eclipse.tm.rapi.tests/.classpath7
-rw-r--r--wince/org.eclipse.tm.rapi.tests/.cvsignore1
-rw-r--r--wince/org.eclipse.tm.rapi.tests/.project28
-rw-r--r--wince/org.eclipse.tm.rapi.tests/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--wince/org.eclipse.tm.rapi.tests/META-INF/MANIFEST.MF11
-rw-r--r--wince/org.eclipse.tm.rapi.tests/about.html28
-rw-r--r--wince/org.eclipse.tm.rapi.tests/build.properties18
-rw-r--r--wince/org.eclipse.tm.rapi.tests/plugin.properties17
-rw-r--r--wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/AllTests.java37
-rw-r--r--wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDesktopTest.java37
-rw-r--r--wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDeviceTest.java64
-rw-r--r--wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiEnumDevicesTest.java33
-rw-r--r--wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiSessionTest.java307
-rw-r--r--wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiTestCase.java54
-rw-r--r--wince/org.eclipse.tm.rapi/.classpath7
-rw-r--r--wince/org.eclipse.tm.rapi/.cvsignore1
-rw-r--r--wince/org.eclipse.tm.rapi/.project34
-rw-r--r--wince/org.eclipse.tm.rapi/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--wince/org.eclipse.tm.rapi/META-INF/MANIFEST.MF12
-rw-r--r--wince/org.eclipse.tm.rapi/about.html28
-rw-r--r--wince/org.eclipse.tm.rapi/build.properties21
-rw-r--r--wince/org.eclipse.tm.rapi/build/README.txt37
-rw-r--r--wince/org.eclipse.tm.rapi/build/build.xml36
-rw-r--r--wince/org.eclipse.tm.rapi/build/jrapi.sln20
-rw-r--r--wince/org.eclipse.tm.rapi/build/jrapi.vcproj239
-rw-r--r--wince/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dllbin16384 -> 0 bytes
-rw-r--r--wince/org.eclipse.tm.rapi/native/Rapi.cpp54
-rw-r--r--wince/org.eclipse.tm.rapi/native/RapiDesktop.cpp35
-rw-r--r--wince/org.eclipse.tm.rapi/native/RapiDevice.cpp151
-rw-r--r--wince/org.eclipse.tm.rapi/native/RapiEnumDevices.cpp35
-rw-r--r--wince/org.eclipse.tm.rapi/native/RapiSession.cpp611
-rw-r--r--wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDesktop.h31
-rw-r--r--wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDevice.h55
-rw-r--r--wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiEnumDevices.h31
-rw-r--r--wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiSession.h232
-rw-r--r--wince/org.eclipse.tm.rapi/native/org_eclipse_tm_rapi_Rapi.h147
-rw-r--r--wince/org.eclipse.tm.rapi/plugin.properties17
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDesktop.java43
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDevice.java75
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiEnumDevices.java43
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiSession.java365
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDesktop.java53
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDevice.java57
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiEnumDevices.java36
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiSession.java298
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IUnknown.java37
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/ProcessInformation.java24
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/Rapi.java132
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiConnectionInfo.java42
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiDeviceInfo.java25
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiException.java39
-rw-r--r--wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiFindData.java41
-rw-r--r--wince/readme.txt5
4057 files changed, 0 insertions, 512667 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 396a01849..000000000
--- a/discovery/org.eclipse.rse.discovery/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.rse.discovery/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF b/discovery/org.eclipse.rse.discovery/META-INF/MANIFEST.MF
deleted file mode 100644
index af856ef50..000000000
--- a/discovery/org.eclipse.rse.discovery/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.discovery;singleton:=true
-Bundle-Version: 3.0.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.discovery.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.tm.discovery.wizard;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.tm.discovery.model;bundle-version="[2.0.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.discovery;x-internal:=true
diff --git a/discovery/org.eclipse.rse.discovery/about.html b/discovery/org.eclipse.rse.discovery/about.html
deleted file mode 100644
index d4cc693f9..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 5, 2007</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 ff1dddb2a..000000000
--- a/discovery/org.eclipse.rse.discovery/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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
-src.includes = about.html
diff --git a/discovery/org.eclipse.rse.discovery/plugin.properties b/discovery/org.eclipse.rse.discovery/plugin.properties
deleted file mode 100644
index 3e1443acd..000000000
--- a/discovery/org.eclipse.rse.discovery/plugin.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Service Discovery RSE Plug-in
-providerName = Eclipse.org - DSDP
-
-DiscoverySystemLabel=Discovery
-DiscoverySystemDescription=Discovery
-
-NewConnectionWizard.discovery.name=Service Discovery Wizard
diff --git a/discovery/org.eclipse.rse.discovery/plugin.xml b/discovery/org.eclipse.rse.discovery/plugin.xml
deleted file mode 100644
index e69de9180..000000000
--- a/discovery/org.eclipse.rse.discovery/plugin.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-Copyright (c) 2006, 2007 Symbian Software Ltd. and others. All rights reserved.
-This program and the accompanying materials are made available under the terms
-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
- Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
- Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-
-<plugin>
-
- <extension
- point="org.eclipse.rse.ui.newConnectionWizards">
- <newConnectionWizard
- canFinishEarly="false"
- categoryId="org.eclipse.rse.ui.wizards.newconnection.default.category"
- class="org.eclipse.rse.internal.discovery.ServiceDiscoveryWizard"
- hasPages="true"
- id="org.eclipse.rse.discovery.ServiceDiscoveryWizard"
- name="%NewConnectionWizard.discovery.name"
- systemTypeIds="org.eclipse.rse.systemtype.discovery">
- </newConnectionWizard>
- </extension>
-
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <systemType
- description="%DiscoverySystemDescription"
- id="org.eclipse.rse.systemtype.discovery"
- label="%DiscoverySystemLabel"
- name="Discovery"
- />
- </extension>
-
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.systemtype.discovery"
- name="Discovery"
- description="Service Discovery Wizard"
- iconlive=""
- icon=""
- class="org.eclipse.rse.internal.discovery.ServiceDiscoverySubSystemConfiguration"
- vendor="%providerName"
- priority="100"
- id="Discovery">
- </configuration>
- </extension>
-
-</plugin>
-
-
-
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Activator.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Activator.java
deleted file mode 100644
index b923cef08..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/Messages.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Messages.java
deleted file mode 100644
index 6999c2587..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/Messages.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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
- * Javier Montalvo Orus (Symbian) - NLS Cleanup
- ********************************************************************************/
-
-package org.eclipse.rse.internal.discovery;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.discovery.messages"; //$NON-NLS-1$
-
- public static String ServiceDiscoveryWizard_DiscoveryPropertySet;
-
- public static String ServiceDiscoveryWizard_Port;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
-}
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoverySubSystemConfiguration.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoverySubSystemConfiguration.java
deleted file mode 100644
index ae86d1af0..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoverySubSystemConfiguration.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/ServiceDiscoveryWizard.java b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java
deleted file mode 100644
index bd7a12c78..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/ServiceDiscoveryWizard.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 Symbian Software Ltd. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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
- * Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.discovery;
-
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-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.IPropertySet;
-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.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.internal.discovery.wizard.ServiceDiscoveryWizardDisplayPage;
-import org.eclipse.tm.internal.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() {
-
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.rse.core","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$
- IConfigurationElement[] ce = ep.getConfigurationElements();
-
- SystemRefreshAllAction systemRefreshAllAction = new SystemRefreshAllAction(null);
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
-
- String[] addresses = serviceDiscoveryPage.getAddresses();
- for (int i = 0; i < addresses.length; i++) {
-
- String hostName = addresses[i];
- Vector discoveredServices = serviceDiscoveryPage.getSelectedServices(addresses[i]);
- Vector subSystemConfigurationVector = new Vector();
-
- Enumeration serviceEnumeration = discoveredServices.elements();
-
- IHost conn = null;
- try {
- IRSESystemType discoveryType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_DISCOVERY_ID);
- conn = registry.createHost(discoveryType, "Discovery@" + hostName, hostName, "Discovered services in "+hostName);//$NON-NLS-1$ //$NON-NLS-2$
- } catch (Exception e) {
- RSECorePlugin.getTheSystemRegistry().deleteHost(conn);
- return false;
- }
-
- while (serviceEnumeration.hasMoreElements()) {
-
- Service service = (Service) serviceEnumeration.nextElement();
-
- //discovered service name
- String serviceName = ((ServiceType) service.eContainer()).getName();
-
- //discovered transport (tcp, udp)
- String transport = null;
-
- Iterator pairIterator = service.getPair().iterator();
- while (pairIterator.hasNext()) {
-
- Pair pair = (Pair) pairIterator.next();
- if(pair.getKey().equals("transport")) //$NON-NLS-1$
- {
- transport = pair.getValue();
- }
- }
-
- //find the SubSystemConfiguration plugin that matches the name+transport
- for (int j = 0; j < ce.length; j++) {
- String typesList = ce[j].getAttribute("serviceType"); //$NON-NLS-1$
- if(typesList!=null)
- {
- String[] types = typesList.split(";"); //$NON-NLS-1$
-
- for (int k = 0; k < types.length; k++) {
- if(types[k].equals("_"+serviceName+"._"+transport)) //$NON-NLS-1$ //$NON-NLS-2$
- {
- ISubSystemConfiguration config = registry.getSubSystemConfiguration(ce[j].getAttribute("id")); //$NON-NLS-1$
- IConnectorService connector = config.getConnectorService(conn);
- IPropertySet propertySet;
- pairIterator = service.getPair().iterator();
-
- while (pairIterator.hasNext()) {
-
- Pair pair = (Pair) pairIterator.next();
-
- if((propertySet = connector.getPropertySet(Messages.ServiceDiscoveryWizard_DiscoveryPropertySet))==null)
- {
- propertySet = connector.createPropertySet(Messages.ServiceDiscoveryWizard_DiscoveryPropertySet);
- }
- propertySet.addProperty(pair.getKey(), pair.getValue());
- }
-
- subSystemConfigurationVector.add(config);
- }
- }
- }
- }
- }
-
- ISubSystemConfiguration[] subSystemConfiguration = new ISubSystemConfiguration[subSystemConfigurationVector.size()];
-
- for (int j = 0; j < subSystemConfiguration.length; j++) {
- subSystemConfiguration[j]=(ISubSystemConfiguration)subSystemConfigurationVector.elementAt(j);
- }
-
- ISubSystem[] subSystem = registry.createSubSystems(conn, subSystemConfiguration);
-
- for (int j = 0; j < subSystem.length; j++) {
-
-
- IConnectorService connector = subSystem[j].getConnectorService();
- IPropertySet propertySet = connector.getPropertySet(Messages.ServiceDiscoveryWizard_DiscoveryPropertySet);
- if(propertySet.getProperty(Messages.ServiceDiscoveryWizard_Port)!=null)
- {
- int port = Integer.parseInt(propertySet.getPropertyValue(Messages.ServiceDiscoveryWizard_Port));
- connector.setPort(port);
-
- }
- }
-
- RSEUIPlugin.getTheSystemRegistryUI().expandHost(conn);
- }
-
- systemRefreshAllAction.run();
-
- return true;
- }
-
-} \ No newline at end of file
diff --git a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/messages.properties b/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/messages.properties
deleted file mode 100644
index efc5ef7f6..000000000
--- a/discovery/org.eclipse.rse.discovery/src/org/eclipse/rse/internal/discovery/messages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2008 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
-# Javier Montalvo Orus (Symbian) - NLS Cleanup
-##################################################################################
-
-ServiceDiscoveryWizard_DiscoveryPropertySet=Discovery
-ServiceDiscoveryWizard_Port=port
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 710aaf385..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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.discovery.source=org.eclipse.rse.discovery
-generate.plugin@org.eclipse.tm.discovery.engine.source=org.eclipse.tm.discovery.engine
-generate.plugin@org.eclipse.tm.discovery.model.source=org.eclipse.tm.discovery.model
-generate.plugin@org.eclipse.tm.discovery.model.edit.source=org.eclipse.tm.discovery.model.edit
-generate.plugin@org.eclipse.tm.discovery.protocol.dnssd.source=org.eclipse.tm.discovery.protocol.dnssd
-generate.plugin@org.eclipse.tm.discovery.transport.udp.source=org.eclipse.tm.discovery.transport.udp
-generate.plugin@org.eclipse.tm.discovery.view.source=org.eclipse.tm.discovery.view
-generate.plugin@org.eclipse.tm.discovery.wizard.source=org.eclipse.tm.discovery.wizard
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 9321f4082..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 361cbbabf..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Service Discovery
-
-# "description" property - description of the feature
-description=A framework and Zeroconf / DNS-SD based implementation for \
-detecting remote network services. Includes Source.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2006, 2009 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 ####################################
-
-# "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(TM) 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 9a48d9d08..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/feature.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.tm.discovery"
- label="%featureName"
- version="3.0.100.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.ui.ide"/>
- <!-- Do not require RSE plugins because Discovery should run standalone
- <import plugin="org.eclipse.rse.core"/>
- <import plugin="org.eclipse.rse.ui"/>
- -->
- <!-- Feature dependency due to bug 175004 (UM doesnt use plugins for "Select Required" -->
- <!-- But take care of bug 154505 (UM "Select Required" selects container features) -->
- <!--
- <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.edit" version="2.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore.xmi" 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"/>
- </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.doc.isv"
- download-size="83"
- install-size="185"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.discovery.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.engine.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.model.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.model.edit.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.protocol.dnssd.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.transport.udp.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.view.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.discovery.wizard.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 01618c505..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Service Discovery Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Symbian Software Ltd. and others 2006, 2009. 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 7ef3fa39c..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/dsdp32.png b/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/dsdp32.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 f4e518d62..000000000
--- a/discovery/org.eclipse.tm.discovery-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Service Discovery Source
-providerName=Eclipse.org - DSDP
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/.cvsignore b/discovery/org.eclipse.tm.discovery.doc.isv/.cvsignore
deleted file mode 100644
index 0700bef2a..000000000
--- a/discovery/org.eclipse.tm.discovery.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/discovery/org.eclipse.tm.discovery.doc.isv/.project b/discovery/org.eclipse.tm.discovery.doc.isv/.project
deleted file mode 100644
index 4a0948038..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.discovery.doc.isv</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/META-INF/MANIFEST.MF b/discovery/org.eclipse.tm.discovery.doc.isv/META-INF/MANIFEST.MF
deleted file mode 100644
index 67e163a4a..000000000
--- a/discovery/org.eclipse.tm.discovery.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.tm.discovery.doc.isv;singleton:=true
-Bundle-Version: 3.0.100.qualifier
-Bundle-Localization: plugin
-Eclipse-LazyStart: false
-Bundle-Vendor: %providerName
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/about.html b/discovery/org.eclipse.tm.discovery.doc.isv/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/discovery/org.eclipse.tm.discovery.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 5, 2007</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.doc.isv/book.css b/discovery/org.eclipse.tm.discovery.doc.isv/book.css
deleted file mode 100644
index 9f3214354..000000000
--- a/discovery/org.eclipse.tm.discovery.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/discovery/org.eclipse.tm.discovery.doc.isv/build.properties b/discovery/org.eclipse.tm.discovery.doc.isv/build.properties
deleted file mode 100644
index 1134d6203..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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,\
- guide/,\
- icons/,\
- index/,\
- reference/,\
- provisional_api.html
-customBuildCallbacks = customBuildCallbacks.xml
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/buildDoc.xml b/discovery/org.eclipse.tm.discovery.doc.isv/buildDoc.xml
deleted file mode 100644
index 42931ef40..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/buildDoc.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<project name="TM Service Discovery 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.help*.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.junit*.jar"/>
- <include name="**/org.junit*/**/*.jar"/>
- <include name="**/com.ibm.icu*.jar"/>
- <include name="**/org.eclipse.emf*.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="info" 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>
- <unzip dest="${javadoc.link.location}/emf/">
- <patternset refid="package.list"/>
- <fileset dir="${safeBaseLocation}/plugins">
- <include name="org.eclipse.emf.doc_*/doc.zip"/>
- </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.tm.discovery.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.tm.discovery.engine/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" />
- <available file="/shared/dsdp/tm/ibm-java2-ppc64-50/bin/javadoc" property="javadoc" value="/shared/dsdp/tm/ibm-java2-ppc64-50/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}" />
- <replace file="${basedir}/${optionsFile}" token="@cp@" value="${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" resultproperty="javadocResult">
- <arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
- </exec>
- <echo message="javadoc result = ${javadocResult}"/>
- </target>
-
-</project>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/customBuildCallbacks.xml b/discovery/org.eclipse.tm.discovery.doc.isv/customBuildCallbacks.xml
deleted file mode 100644
index 772c7793b..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/customBuildCallbacks.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<!--
- Copyright (c) 2005, 2007 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
- -->
-<!-- ===================================================================== -->
-<!-- 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/discovery/org.eclipse.tm.discovery.doc.isv/guide/device.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/device.html
deleted file mode 100644
index 973624781..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/device.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Device</title>
-</head>
-<body>
-<h1>Device</h1>
-<p>
-Device represents a machine with a unique address in the network.<br/>
-It can contain as well a name for easier identification.
-A device contains a list of <a href="serviceType.html">service types</a>.
-</p>
-<p>
-<h3>Attributes</h3>
-<ul>
-<li>Address</li>
-<li>Name (optional)</li>
-</ul>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery.png b/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery.png
deleted file mode 100644
index 030ddbe93..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery.png
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery_model.gif b/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery_model.gif
deleted file mode 100644
index a3e530651..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/discovery_model.gif
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/list.png b/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/list.png
deleted file mode 100644
index e2012531c..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/images/list.png
+++ /dev/null
Binary files differ
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/model.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/model.html
deleted file mode 100644
index 1b6f13847..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/model.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Model</title>
-</head>
-<body>
-<h1>Model</h1>
-<p>
-Service discovery stores the information in a EMF model as following:
-</p>
-
-<p>
-<center>
-<img src="./images/discovery_model.gif"/>
-</center>
-</p>
-<p>
-The service discovery engine will fill this model using the provided protocol and transport implementations, and can be accessed after using the standard EMF methods.
-</p>
-</body>
-</html>
-
-
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/network.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/network.html
deleted file mode 100644
index 4f8cfa960..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/network.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Network</title>
-</head>
-<body>
-<h1>Network</h1>
-<p>
-The Network is the top level or root of the discovered services model. <br/>
-It contains a list of <a href="device.html">devices</a>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/overview.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/overview.html
deleted file mode 100644
index e1983ee56..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/overview.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Overview</title>
-</head>
-<body>
-<h1>Overview</h1>
-<p>
-<center>
-<img src="./images/discovery.png"/>
-</center>
-</p>
-<p>
-<center>
-<img src="./images/list.png"/>
-</center>
-</p>
-
-
-</body>
-</html>
-
-
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/pair.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/pair.html
deleted file mode 100644
index c4249b359..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/pair.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Pair</title>
-</head>
-<body>
-<h1>Pair</h1>
-<p>
-Each service can contain multiple pairs of keys and values to provide extra information about the service.<br/>
-</p>
-<p>
-Using service discovery with the Remote System Explorer requires a "tranport" key matching the transport specified in org.eclipse.rse.core.subsystemConfigurations.
-</p>
-
-<p>
-<h3>Attributes</h3>
-<ul>
-<li>Key</li>
-<li>Value</li>
-</ul>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/protocol.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/protocol.html
deleted file mode 100644
index d4ee7b4a7..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/protocol.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Protocol</title>
-</head>
-<body>
-<h1>Protocol</h1>
-<p>
-It specifies the protocol that will be used to interact with the remote devices.<br/>
-Protocols have to be specified as extensions of org.eclipse.tm.discovery.engine.discoveryProtocol.<br/>
-</p>
-<p>
-Examples of discovery protocols are:
-<ul>
-<li>DNS Service Discovery (DNS-SD)</li>
-<li>Service Location Protocol (SLP, srvloc)</li>
-<li>Simple Service Discovery Protocol (SSDP)</li>
-<li>...</li>
-</ul>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/service.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/service.html
deleted file mode 100644
index 0d870ef74..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/service.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Service</title>
-</head>
-<body>
-<h1>Service</h1>
-<p>
-Service represents a discovered service available in the remote device grouped under a common <a href="serviceType.html">service type</a>.<br/>
-</p>
-<p>
-<h3>Attributes</h3>
-<ul>
-<li>Name</li>
-</ul>
-
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/servicetype.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/servicetype.html
deleted file mode 100644
index 4ae97d891..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/servicetype.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Service Type</title>
-</head>
-<body>
-<h1>Service Type</h1>
-<p>
-A service type represents a group of services of the same kind discovered in the parent <a href="device.html">device</a>.<br/>
-Service type names should follow <a href="http://www.iana.org/assignments/port-numbers">standard service names</a> whenever possible.
-</p>
-
-
-<p>
-<h3>Attributes</h3>
-<ul>
-<li>Name</li>
-</ul>
-</p>
-
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/transport.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/transport.html
deleted file mode 100644
index ca9f91ebd..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/transport.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Transport</title>
-</head>
-<body>
-<h1>Transport</h1>
-<p>
-Transport defines how the remote devices are accessed to be queried for available services.<br/>
-Transports have to be specified as extensions of org.eclipse.tm.discovery.engine.discoveryTransport.<br/>
-</p>
-<p>
-Examples of transport are:
-<ul>
-<li>UDP</li>
-<li>TCP</li>
-<li>serial</li>
-<li>...</li>
-</ul>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/usage.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/usage.html
deleted file mode 100644
index ac381cf98..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/usage.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Programmatic usage</title>
-</head>
-<body>
-<h1>Programmatic usage</h1>
-<p>
-Perform service discovery session:
-</p>
-<pre>
-<samp>
-int timeout = 500; // milliseconds
-String query = "_services._dns-sd._udp.local."; //DNS-SD query
-
-//instantiate protocol by name attribute
-IProtocol protocol = ProtocolFactory.getProtocol("DNS-SD");
-
-//instantiate transport by name attribute
-ITransport transport = TransportFactory.getTransport("UDP", "224.0.0.251", timeout);
-
-//get engine instance and kick off discovery
-ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getInstance();
-serviceDiscoveryEngine.doServiceDiscovery(query, protocol,transport);
-</samp>
-</pre>
-<p>
-Access EMF model:
-</p>
-<pre>
-<samp>
-//get engine instance
-ServiceDiscoveryEngine serviceDiscoveryEngine = ServiceDiscoveryEngine.getInstance();
-
-//access org.eclipse.emf.ecore.resource.Resource
-Resource model = serviceDiscoveryEngine.getResource();
-</samp>
-</pre>
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/guide/view.html b/discovery/org.eclipse.tm.discovery.doc.isv/guide/view.html
deleted file mode 100644
index 1189ae0be..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/guide/view.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) Symbian Software Ltd 2007. 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>Discovery View</title>
-</head>
-<body>
-<h1>Discovery View</h1>
-<p>
-The Discovery view can be used to test new extensions and discover available services using the existing protocol and transport implementations.<br/>
-It can be accessed through the view "Service Discovery" -> "Service Discovery Properties".<br/>
-<br/>
-In the view, it's possible launching a wizard to select the protocol and transport to be used:
-</p>
-<p>
-<center>
-<img src="./images/discovery.png"/>
-</center>
-</p>
-<p>
-And inspect the discovered services and their attributes:</br>
-</p>
-<p>
-<center>
-<img src="./images/list.png"/>
-</center>
-</p>
-<p>
-Since the same model is used, launching multiple times the wizard adds new discovered services to the same model, even using different protocols and transports.
-</p>
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/notices.html b/discovery/org.eclipse.tm.discovery.doc.isv/notices.html
deleted file mode 100644
index 23cff8c5b..000000000
--- a/discovery/org.eclipse.tm.discovery.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) 2007 Symbian Software Ltd. and others. 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) 2007 Symbian Software Ltd. and others.
-</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/discovery/org.eclipse.tm.discovery.doc.isv/options.txt b/discovery/org.eclipse.tm.discovery.doc.isv/options.txt
deleted file mode 100644
index 1b3465b64..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/options.txt
+++ /dev/null
@@ -1,41 +0,0 @@
--quiet
--encoding "iso-8859-1"
--charset "iso-8859-1"
--source 1.4
--sourcepath "../org.eclipse.tm.discovery.engine/src
-;../org.eclipse.tm.discovery.model/src
-;../org.eclipse.tm.discovery.model.edit/src
-;../org.eclipse.tm.discovery.protocol.dnssd/src
-;../org.eclipse.tm.discovery.transport.udp/src
-;../org.eclipse.tm.discovery.view/src
-;../org.eclipse.tm.discovery.wizard/src
-;../org.eclipse.rse.discovery/src"
--d reference/api
--bootclasspath @rt@
--classpath @cp@
-;../org.eclipse.rse.core/@dot
-;../org.eclipse.rse.core/bin
-;../org.eclipse.rse.ui/@dot
-;../org.eclipse.rse.ui/bin
--breakiterator
--tag generated:X
--tag lastgen:X
--tag model:X
--tag ordered:X
--use
--splitIndex
--windowtitle "TM Service Discovery API Specification"
--doctitle "TM Service Discovery API Specification"
--header "<b>TM Service Discovery</b><br>Release 2.0"
--bottom "Copyright (c) 2007 Symbian Software Ltd. and others. All Rights Reserved."
--group "TM Service Discovery Core Plug-in Packages" "org.eclipse.tm.discovery.*"
--group "TM Service Discovery RSE Integration Plug-in Packages" "org.eclipse.rse.discovery"
--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/
--linkoffline ./../../../org.eclipse.emf.doc/references/javadoc @javadoc.link.location@/emf/references/javadoc/
--linkoffline ./../../../org.eclipse.rse.doc.isv/reference/api ../org.eclipse.rse.doc.isv/reference/api
--link http://bundles.osgi.org/javadoc/r4
-
-org.eclipse.tm.discovery.protocol
-org.eclipse.tm.discovery.transport
-org.eclipse.tm.discovery.model
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/plugin.properties b/discovery/org.eclipse.tm.discovery.doc.isv/plugin.properties
deleted file mode 100644
index 75e78c921..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=Target Management Service Discovery Developer Guide
-providerName=Eclipse.org - DSDP
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/plugin.xml b/discovery/org.eclipse.tm.discovery.doc.isv/plugin.xml
deleted file mode 100644
index 853daffd4..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<plugin>
-
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml" primary="true" category="DSDP.TM"/>
- <index path="index/"/>
- </extension>
-
-</plugin>
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/provisional_api.html b/discovery/org.eclipse.tm.discovery.doc.isv/provisional_api.html
deleted file mode 100644
index 9f4c8a903..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/provisional_api.html
+++ /dev/null
@@ -1,35 +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>TM Service Discovery API Status</title>
-<meta name="copyright" content="Copyright (c) 2007 Symbian Software Ltd. and others. 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>TM Service Discovery API Status</h1>
-<h2>Provisional API</h2>
-<div class="p">
-<p>Although Service Discovery API has been reviewed, 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 Service Discovery 2.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after
-Service Discovery 2.0 in a not backward compatible way.
-We will make every sensible effort to keep at least Source API
-Compatibility intact, but in cases where this would lead to unnecessary
-code bloat we will go with API breakage.
-All such API changes will be voted on by committers on the <a href="https://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 Service Discovery 3.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/discovery/org.eclipse.tm.discovery.doc.isv/reference/.cvsignore b/discovery/org.eclipse.tm.discovery.doc.isv/reference/.cvsignore
deleted file mode 100644
index 9e5bfb42d..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/reference/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-api \ No newline at end of file
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/.cvsignore b/discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/.cvsignore
deleted file mode 100644
index 9c59eabff..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-org_eclipse_*.html
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/index.html b/discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/index.html
deleted file mode 100644
index a4b01b0b3..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/reference/extension-points/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) 2007 Symbian Software Ltd. and others. 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>Service Discovery Extension Points</title>
-<link rel="stylesheet" type="text/css" HREF="../../book.css">
-</head>
-<body>
-<h1>Service Discovery Extension Points</h1>
-<p>The following extension points can be used to extend the capabilities of the
- Service Discovery infrastructure: </p>
-<ul>
- <li><a href="org_eclipse_tm_discovery_engine_discoveryProtocol.html">org.eclipse.tm.discovery.engine.discoveryProtocol</a></li>
- <li><a href="org_eclipse_tm_discovery_engine_discoveryTransport.html">org.eclipse.tm.discovery.engine.discoveryTransport</a></li>
-</ul>
-
-</body>
-</html>
diff --git a/discovery/org.eclipse.tm.discovery.doc.isv/schema.css b/discovery/org.eclipse.tm.discovery.doc.isv/schema.css
deleted file mode 100644
index 00f9d01bf..000000000
--- a/discovery/org.eclipse.tm.discovery.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/discovery/org.eclipse.tm.discovery.doc.isv/toc.xml b/discovery/org.eclipse.tm.discovery.doc.isv/toc.xml
deleted file mode 100644
index c52b64f22..000000000
--- a/discovery/org.eclipse.tm.discovery.doc.isv/toc.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
- <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<toc label="Service Discovery Developer Guide">
-
- <topic label="Guide">
- <topic label="Model" href="guide/model.html">
- <topic label="Network" href="guide/network.html"/>
- <topic label="Device" href="guide/device.html"/>
- <topic label="Service Type" href="guide/servicetype.html"/>
- <topic label="Service" href="guide/service.html"/>
- <topic label="Pair" href="guide/pair.html"/>
- </topic>
- <topic label="Transport" href="guide/transport.html" />
- <topic label="Protocol" href="guide/protocol.html" />
- <topic label="Usage">
- <topic label="Programmatically" href="guide/usage.html" />
- <topic label="Service Discovery View" href="guide/view.html" />
- </topic>
- <anchor id="sd_guide_additions"/>
- </topic>
- <topic label="Reference">
- <topic label="Service Discovery API Reference" href="provisional_api.html">
- <topic label="org.eclipse.tm.discovery.model" href="reference/api/org/eclipse/tm/discovery/model/package-summary.html" />
- <topic label="org.eclipse.tm.discovery.protocol" href="reference/api/org/eclipse/tm/discovery/protocol/package-summary.html" />
- <topic label="org.eclipse.tm.discovery.transport" href="reference/api/org/eclipse/tm/discovery/transport/package-summary.html" />
- </topic>
- <topic label="Extension Points Reference">
- <topic label="org.eclipse.tm.discovery.engine.discoveryProtocol" href="reference/extension-points/org_eclipse_tm_discovery_engine_discoveryProtocol.html" />
- <topic label="org.eclipse.tm.discovery.engine.discoveryTranport" href="reference/extension-points/org_eclipse_tm_discovery_engine_discoveryTransport.html" />
- </topic>
- <anchor id="sd_ref_additions"/>
- </topic>
- <topic label="Legal" href="notices.html"/>
-</toc>
diff --git a/discovery/org.eclipse.tm.discovery.engine/.classpath b/discovery/org.eclipse.tm.discovery.engine/.classpath
deleted file mode 100644
index ce7393340..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.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.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 a6b25bfb1..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 d4787d27f..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/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.engine;singleton:=true
-Bundle-Version: 2.0.200.qualifier
-Bundle-Activator: org.eclipse.tm.internal.discovery.engine.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.tm.discovery.model;bundle-version="[2.0.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.discovery.protocol,
- org.eclipse.tm.discovery.transport,
- org.eclipse.tm.internal.discovery.engine;x-friends:="org.eclipse.tm.discovery.view,org.eclipse.tm.discovery.wizard"
-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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 3d6c110f0..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Service Discovery\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Symbian Software Ltd. and others 2006, 2009. 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 117f117ff..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2009 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,\
- dsdp32.png
-src.includes = schema/,\
- about.html
diff --git a/discovery/org.eclipse.tm.discovery.engine/dsdp32.png b/discovery/org.eclipse.tm.discovery.engine/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/dsdp32.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 4fdd7ad90..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Service Discovery Engine
-providerName = Eclipse.org - DSDP
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 b5f161deb..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<!--
-Copyright (c) 2006, 2007 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
--->
-
-<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 fa8444f8e..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/schema/discoveryProtocol.exsd
+++ /dev/null
@@ -1,118 +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>
- <attribute name="multicast" type="string">
- <annotation>
- <documentation>
- Allows specifying semicolon separated multicast addresses to be used with specific transports in the format &lt;transport&gt;:&lt;address&gt;
-An example would be:
-&lt;code&gt;&quot;transportName1:address1;transportName2:address2;UDP:224.0.0.251&quot;&lt;/code&gt;
- </documentation>
- </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/protocol/IProtocol.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/IProtocol.java
deleted file mode 100644
index 3a749bf34..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, 2008 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 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 8087a6121..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/discovery/protocol/ProtocolFactory.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.net.URI;
-import java.net.URISyntaxException;
-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 protocol
- * @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;
- }
-
- /**
- * Gets the multicast address given a protocol name and a transport name or returns null if this information is not available
- *
- * @param protocolName
- * Name of the protocol
- * @param transportName
- * Name of the transport
- * @return
- * String representing the multicast address of the given protocol and transport or null if not available
- * @throws CoreException
- *
- * @see IProtocol
- */
- public static String getMulticastAddress(String protocolName, String transportName) throws CoreException {
-
- String multiCastAddress = 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))
- {
- String multicastAddresses = ce[i].getAttribute("multicast"); //$NON-NLS-1$
- if(multicastAddresses==null)
- break;
-
- String[] pairs = multicastAddresses.split(";"); //$NON-NLS-1$
- for (int j = 0; j < pairs.length; j++) {
-
- URI uri=null;
- try {
- uri = new URI(pairs[j]);
- } catch (URISyntaxException e) {}
-
- if(uri!=null)
- {
- if(uri.getScheme().equals(transportName))
- {
- multiCastAddress = uri.getSchemeSpecificPart();
- break;
- }
- }
- }
- }
- }
- return multiCastAddress;
- }
-
-}
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 7f1c48662..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, 2007 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 87cab8fc0..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, 2007 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;
-
-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.engine/src/org/eclipse/tm/internal/discovery/engine/Activator.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/Activator.java
deleted file mode 100644
index 1338457fd..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/engine/Messages.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/Messages.java
deleted file mode 100644
index 3e2867763..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.discovery.engine;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.tm.internal.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/internal/discovery/engine/ServiceDiscoveryEngine.java b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java
deleted file mode 100644
index 92b9e9c77..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/ServiceDiscoveryEngine.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 Symbian Software Ltd. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-package org.eclipse.tm.internal.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.protocol.IProtocol;
-import org.eclipse.tm.discovery.transport.ITransport;
-import org.eclipse.tm.internal.discovery.model.util.ModelResourceFactoryImpl;
-
-/**
- * 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 getInstance() {
- 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/internal/discovery/engine/messages.properties b/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/messages.properties
deleted file mode 100644
index 454c8ffb0..000000000
--- a/discovery/org.eclipse.tm.discovery.engine/src/org/eclipse/tm/internal/discovery/engine/messages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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
-##################################################################################
-
-ServiceDiscoveryEngine.DiscoveryModelFileURI=discoveryModel.xml
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 95db698ad..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 6d6bdde17..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/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.discovery.model.edit;singleton:=true
-Bundle-Version: 3.0.100.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.tm.internal.discovery.model.provider.DiscoveryModelEditPlugin$Implementation
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.internal.discovery.model.provider;x-friends:="org.eclipse.tm.discovery.view,org.eclipse.tm.discovery.wizard"
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.edit;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.tm.discovery.model;bundle-version="[2.0.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
-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 d4cc693f9..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 5, 2007</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 52514d636..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/plugin.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2009 Symbian Software Ltd. and others. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# 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 = Target Management Service Discovery Edit Support
-providerName = Eclipse.org - DSDP
-
-
-
-
-
- \ 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 d1da234ef..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, 2007 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.internal.discovery.model.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/internal/discovery/model/provider/DeviceItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/DeviceItemProvider.java
deleted file mode 100644
index 7a17210b9..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/DeviceItemProvider.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/provider/DiscoveryModelEditPlugin.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/DiscoveryModelEditPlugin.java
deleted file mode 100644
index f97831199..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/DiscoveryModelEditPlugin.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/provider/ModelItemProviderAdapterFactory.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ModelItemProviderAdapterFactory.java
deleted file mode 100644
index f8a963b6c..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ModelItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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/internal/discovery/model/provider/NetworkItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/NetworkItemProvider.java
deleted file mode 100644
index 99c137468..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/NetworkItemProvider.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/provider/PairItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/PairItemProvider.java
deleted file mode 100644
index 07083c5c0..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/PairItemProvider.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/provider/ServiceItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ServiceItemProvider.java
deleted file mode 100644
index 29fec2bfd..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ServiceItemProvider.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/provider/ServiceTypeItemProvider.java b/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ServiceTypeItemProvider.java
deleted file mode 100644
index 5002338ac..000000000
--- a/discovery/org.eclipse.tm.discovery.model.edit/src/org/eclipse/tm/internal/discovery/model/provider/ServiceTypeItemProvider.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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 ce7393340..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.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/.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 3182ba07c..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 af5a8f953..000000000
--- a/discovery/org.eclipse.tm.discovery.model/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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=ignore
-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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 be34d47d3..000000000
--- a/discovery/org.eclipse.tm.discovery.model/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.model;singleton:=true
-Bundle-Version: 2.0.200.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)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.discovery.model,
- org.eclipse.tm.internal.discovery.model.impl;x-internal:=true,
- org.eclipse.tm.internal.discovery.model.util;x-friends:="org.eclipse.tm.discovery.engine,org.eclipse.tm.discovery.model.edit"
-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 d4cc693f9..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 5, 2007</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 e5e150a15..000000000
--- a/discovery/org.eclipse.tm.discovery.model/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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/,\
- about.html
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 e070b7601..000000000
--- a/discovery/org.eclipse.tm.discovery.model/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2009 Symbian Software Ltd. and others. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# 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 = Target Management Service Discovery Model
-providerName = Eclipse.org - DSDP
-
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 7ca408544..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, 2007 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
--->
-
-<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.internal.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 c8ad9accd..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, 2007 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;
-
-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 691f67f9b..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, 2007 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;
-
-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 820c190e8..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, 2007 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;
-
-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.internal.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 087602be9..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, 2007 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;
-
-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.internal.discovery.model.impl.ModelPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.tm.internal.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.DeviceImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.NetworkImpl <em>Network</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.NetworkImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.PairImpl <em>Pair</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.PairImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.ServiceImpl <em>Service</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.ServiceImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.ServiceTypeImpl <em>Service Type</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.ServiceTypeImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.DeviceImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.NetworkImpl <em>Network</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.NetworkImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.PairImpl <em>Pair</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.PairImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.ServiceImpl <em>Service</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.ServiceImpl
- * @see org.eclipse.tm.internal.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.internal.discovery.model.impl.ServiceTypeImpl <em>Service Type</em>}' class.
- *
- * @see org.eclipse.tm.internal.discovery.model.impl.ServiceTypeImpl
- * @see org.eclipse.tm.internal.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 2fc8cd1a4..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, 2007 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;
-
-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 b085eec75..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, 2007 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;
-
-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 108dbe214..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, 2007 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;
-
-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 3ec0b8c69..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, 2007 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;
-
-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/internal/discovery/model/impl/DeviceImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/DeviceImpl.java
deleted file mode 100644
index 39a159659..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/DeviceImpl.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.discovery.model.impl.DeviceImpl#getServiceType <em>Service Type</em>}</li>
- * <li>{@link org.eclipse.tm.internal.discovery.model.impl.DeviceImpl#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.tm.internal.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/internal/discovery/model/impl/ModelFactoryImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ModelFactoryImpl.java
deleted file mode 100644
index 791eabafb..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ModelFactoryImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/impl/ModelPackageImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ModelPackageImpl.java
deleted file mode 100644
index 4e4a542a3..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ModelPackageImpl.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/impl/NetworkImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/NetworkImpl.java
deleted file mode 100644
index 8b06e0a8f..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/NetworkImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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/internal/discovery/model/impl/PairImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/PairImpl.java
deleted file mode 100644
index 17810b4c4..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/PairImpl.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.discovery.model.impl.PairImpl#getKey <em>Key</em>}</li>
- * <li>{@link org.eclipse.tm.internal.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/internal/discovery/model/impl/ServiceImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ServiceImpl.java
deleted file mode 100644
index 90c8cc24c..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ServiceImpl.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.discovery.model.impl.ServiceImpl#getPair <em>Pair</em>}</li>
- * <li>{@link org.eclipse.tm.internal.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/internal/discovery/model/impl/ServiceTypeImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ServiceTypeImpl.java
deleted file mode 100644
index 5b27ddfe0..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/impl/ServiceTypeImpl.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.discovery.model.impl.ServiceTypeImpl#getService <em>Service</em>}</li>
- * <li>{@link org.eclipse.tm.internal.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/internal/discovery/model/util/ModelAdapterFactory.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelAdapterFactory.java
deleted file mode 100644
index 7b6544736..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelAdapterFactory.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/util/ModelResourceFactoryImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelResourceFactoryImpl.java
deleted file mode 100644
index 1e32b69b1..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelResourceFactoryImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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/internal/discovery/model/util/ModelResourceImpl.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelResourceImpl.java
deleted file mode 100644
index 3275b0e99..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelResourceImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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/internal/discovery/model/util/ModelSwitch.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelSwitch.java
deleted file mode 100644
index 9da418db2..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelSwitch.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/model/util/ModelXMLProcessor.java b/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelXMLProcessor.java
deleted file mode 100644
index 38f0bfeab..000000000
--- a/discovery/org.eclipse.tm.discovery.model/src/org/eclipse/tm/internal/discovery/model/util/ModelXMLProcessor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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 48c8c2010..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 2ad4f781c..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/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.protocol.dnssd;singleton:=true
-Bundle-Version: 2.0.200.qualifier
-Bundle-Activator: org.eclipse.tm.internal.discovery.protocol.dnssd.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.discovery.engine;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.tm.discovery.model;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.tm.internal.discovery.protocol.dnssd;x-internal:=true
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 d4cc693f9..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 5, 2007</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 ff1dddb2a..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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
-src.includes = about.html
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 e41ea49bd..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Service Discovery DNS-SD Protocol
-providerName = Eclipse.org - DSDP
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 077fd8792..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<!--
-Copyright (c) 2006, 2007 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
--->
-
-<plugin>
- <extension point="org.eclipse.tm.discovery.engine.discoveryProtocol">
- <protocol
- class="org.eclipse.tm.internal.discovery.protocol.dnssd.DNSSDProtocol"
- multicast="UDP:224.0.0.251"
- name="DNS-SD"/>
- </extension>
-</plugin>
diff --git a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Activator.java b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Activator.java
deleted file mode 100644
index c695ffeec..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/protocol/dnssd/DNSSDProtocol.java b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/DNSSDProtocol.java
deleted file mode 100644
index a11cc47b1..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/DNSSDProtocol.java
+++ /dev/null
@@ -1,752 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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
- * Javier Montalvo Orus (Symbian) - added transport key
- * Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
- * Javier Montalvo Orus (Symbian) - [191207] DNS-SD adds duplicated transport attribute when discovery is refreshed
- ********************************************************************************/
-
-package org.eclipse.tm.internal.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 final String TRANSPORT_KEY = "transport"; //$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;
- String serviceTransport = 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);
- serviceTransport = matcher.group(3);
- }
-
-
- 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);
- }
-
- //add or update discovered transport if available in response
- if(serviceTransport != null)
- {
-
- Iterator pairIterator = service.getPair().iterator();
- found = false;
- while (pairIterator.hasNext()) {
- Pair aPair = (Pair) pairIterator.next();
- if (aPair != null) {
- if (TRANSPORT_KEY.equals(aPair.getKey())) {
-
- //update transport value
- aPair.setValue(serviceTransport);
- found = true;
- break;
- }
- }
- }
-
- if (!found) {
- Pair transportPair = ModelFactory.eINSTANCE.createPair();
- transportPair.setKey(TRANSPORT_KEY);
- transportPair.setValue(serviceTransport);
- service.getPair().add(transportPair);
- }
-
-
- }
-
- //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/internal/discovery/protocol/dnssd/Messages.java b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Messages.java
deleted file mode 100644
index 5fbd9f98a..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.discovery.protocol.dnssd;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.tm.internal.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/internal/discovery/protocol/dnssd/messages.properties b/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/messages.properties
deleted file mode 100644
index 05ed2428d..000000000
--- a/discovery/org.eclipse.tm.discovery.protocol.dnssd/src/org/eclipse/tm/internal/discovery/protocol/dnssd/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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
-##################################################################################
-
-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 ce23ef667..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 36997a1ee..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/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.transport.udp;singleton:=true
-Bundle-Version: 2.0.200.qualifier
-Bundle-Activator: org.eclipse.tm.internal.discovery.transport.udp.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.discovery.engine;bundle-version="[2.0.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.tm.internal.discovery.transport.udp;x-internal:=true
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 d4cc693f9..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 5, 2007</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 ff1dddb2a..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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
-src.includes = about.html
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 84ec0537a..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Service Discovery UDP Transport
-providerName = Eclipse.org - DSDP
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 b97d9d216..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<!--
-Copyright (c) 2006, 2007 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
--->
-
-<plugin>
- <extension
- point="org.eclipse.tm.discovery.engine.discoveryTransport">
- <transport
- class="org.eclipse.tm.internal.discovery.transport.udp.UDPTransport"
- name="UDP"/>
- </extension>
-</plugin>
diff --git a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/discovery/transport/udp/Activator.java b/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/discovery/transport/udp/Activator.java
deleted file mode 100644
index f7255a7b9..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/discovery/transport/udp/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/transport/udp/UDPTransport.java b/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/discovery/transport/udp/UDPTransport.java
deleted file mode 100644
index efbf78375..000000000
--- a/discovery/org.eclipse.tm.discovery.transport.udp/src/org/eclipse/tm/internal/discovery/transport/udp/UDPTransport.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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 c0798ca6a..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.tm.discovery.view/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 8cfd5a451..000000000
--- a/discovery/org.eclipse.tm.discovery.view/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.view;singleton:=true
-Bundle-Version: 2.0.200.qualifier
-Bundle-Activator: org.eclipse.tm.internal.discovery.view.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui.forms,
- org.eclipse.tm.discovery.engine;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.tm.discovery.model;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.tm.discovery.model.edit;bundle-version="[2.0.0,4.0.0)",
- org.eclipse.core.resources,
- org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.tm.discovery.wizard;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.ui.ide
-Export-Package: org.eclipse.tm.internal.discovery.view;x-internal:=true
-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 d4cc693f9..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 5, 2007</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 7d435511c..000000000
--- a/discovery/org.eclipse.tm.discovery.view/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Service Discovery View
-providerName = Eclipse.org - DSDP
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 cacf9dcc6..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, 2007 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
--->
-
-<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.internal.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/internal/discovery/view/Activator.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/Activator.java
deleted file mode 100644
index 7c1fed5da..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/view/Messages.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/Messages.java
deleted file mode 100644
index a5564273c..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/Messages.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.discovery.view;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.tm.internal.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/internal/discovery/view/ServiceDiscoveryView.java b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java
deleted file mode 100644
index c69a91a20..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/ServiceDiscoveryView.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 Symbian Software Ltd. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-package org.eclipse.tm.internal.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.model.Service;
-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.internal.discovery.engine.ServiceDiscoveryEngine;
-import org.eclipse.tm.internal.discovery.model.provider.ModelItemProviderAdapterFactory;
-import org.eclipse.tm.internal.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.getInstance();
-
-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/internal/discovery/view/messages.properties b/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/messages.properties
deleted file mode 100644
index dfe2dd58c..000000000
--- a/discovery/org.eclipse.tm.discovery.view/src/org/eclipse/tm/internal/discovery/view/messages.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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 14a36156f..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/discovery/org.eclipse.tm.discovery.wizard/HelpContexts.xml b/discovery/org.eclipse.tm.discovery.wizard/HelpContexts.xml
deleted file mode 100644
index a2f7a7c67..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/HelpContexts.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2007 Symbian Software Ltd. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms 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
--->
-<contexts>
- <context id="general">
- <description> Service Discovery allows detecting remote servers using different protocol and transports.</description>
- <topic href="SDWizard.html" label="Service Discovery Wizard"/>
- </context>
-
- <context id="address">
- <description>The address can be a multicast address or a multicast address can be suggested by checking the "multicast" checkbox.</description>
- </context>
-
- <context id="transport">
- <description>Transport to be used to query the remote device.</description>
- </context>
-
- <context id="protocol">
- <description>Discovery protocol to be used to query the remote device.</description>
- </context>
-
- <context id="query">
- <description>Message to be sent to the remote device to start the discovery process. It can be empty in some protocols.</description>
- </context>
-
- <context id="timeout">
- <description>Maximum amount of time (in ms) between replies before ending the discovery session.</description>
- </context>
-
-</contexts>
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 252a2dac7..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/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.wizard;singleton:=true
-Bundle-Version: 2.0.200.qualifier
-Bundle-Activator: org.eclipse.tm.internal.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;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.tm.discovery.model;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.tm.discovery.model.edit;bundle-version="[2.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.tm.internal.discovery.wizard;x-friends:="org.eclipse.rse.discovery,org.eclipse.tm.discovery.view"
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/discovery/org.eclipse.tm.discovery.wizard/SDWizard.html b/discovery/org.eclipse.tm.discovery.wizard/SDWizard.html
deleted file mode 100644
index 8fd432f13..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/SDWizard.html
+++ /dev/null
@@ -1,39 +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) 2007 Symbian Software Ltd. and others. This page is made available under license. For full details see the about.html file in the plugin that contains this page." />
-<meta http-equiv="Content-Style-Type" content="text/css"/>
-<title>Service Discovery Wizard</title>
-</head>
-<body id="sdwizard"><a name="sdwizard"><!-- --></a>
-<h1 class="topictitle1">Service Discovery Wizard</h1>
-
-<p>
-<h3>Address</h3>
-Address of the device to be queried.
-The address can be a multicast address or a multicast address can be suggested by checking the "multicast" checkbox.
-</p>
-<p>
-<h3>Transport</h3>
-Transport to be used to query the remote device.
-</p>
-<p>
-<h3>Protocol</h3>
-Discovery protocol to be used to query the remote device.
-</p>
-<p>
-<h3>Discovery Query</h3>
-Message to be sent to the remote device to start the discovery process. It can be empty in some protocols.
-</p>
-<p>
-<h3>Timeout</h3>
-Maximum amount of time (in ms) between replies before ending the discovery session.
-</p>
-<br/>
-
-When clicking the <strong>"Next"</strong> button, the discovery process will start, and the discovered services and their attributes will be shown in a tree.
-
-</body>
-</html>
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 d4cc693f9..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 5, 2007</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 8225e115d..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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,\
- .,\
- HelpContexts.xml,\
- SDWizard.html,\
- plugin.xml,\
- toc.xml
-src.includes = about.html
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 695408b45..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Service Discovery Wizard
-providerName = Eclipse.org - DSDP
diff --git a/discovery/org.eclipse.tm.discovery.wizard/plugin.xml b/discovery/org.eclipse.tm.discovery.wizard/plugin.xml
deleted file mode 100644
index a8f37b6a3..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-Copyright (c) 2007 Symbian Software Ltd. and others. All rights reserved.
-This program and the accompanying materials are made available under the terms
-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
--->
-
-<plugin>
- <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/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Activator.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Activator.java
deleted file mode 100644
index 340aa608b..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/discovery/wizard/Messages.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Messages.java
deleted file mode 100644
index a4c01b015..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.discovery.wizard;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.tm.internal.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/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
deleted file mode 100644
index c68be8855..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardDisplayPage.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 Symbian Software Ltd. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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
- * Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
- * Javier Montalvo Orus (Symbian) - [186652] Next button should not be enabled on final page of discovery wizard
- ********************************************************************************/
-
-package org.eclipse.tm.internal.discovery.wizard;
-
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-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.Button;
-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.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.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.internal.discovery.engine.ServiceDiscoveryEngine;
-import org.eclipse.tm.internal.discovery.model.provider.ModelItemProviderAdapterFactory;
-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.getInstance();
-
- //service discovery settings
- private String query = null;
- private String address = null;
- private String transportName = null;
- private String protocolName = null;
- private int timeOut = 500;
-
- //format of serviceType attribute list of names and transports
- //of extension point org.eclipse.core.subsystemConfigurations
- private final Pattern serviceTypeFormat = Pattern.compile("_(.+)\\._(.+)"); //$NON-NLS-1$
-
- private Service lastSelectedService = null;
-
- private Hashtable supportedServicesType = new Hashtable();
-
- /**
- * 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","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
- String type = ce[i].getAttribute("serviceType"); //$NON-NLS-1$
-
- if(type!=null)
- {
- String[] variants = type.split(";"); //$NON-NLS-1$
-
- for (int j = 0; j < variants.length; j++) {
- Matcher match = serviceTypeFormat.matcher(variants[j]);
- if(match.matches())
- {
- String name = match.group(1);
- String transport = match.group(2);
- if(supportedServicesType.containsKey(name))
- {
- //insert new transport
- ((Vector)supportedServicesType.get(name)).add(transport);
- }
- else
- {
- //create vector with new transport
- Vector transports = new Vector();
- transports.add(transport);
- supportedServicesType.put(name,transports);
- }
- }
- }
- }
- }
-
- 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) {
-
- //check if the service type is in the supported list
- String serviceTypeName = ((ServiceType)element).getName();
- if(!supportedServicesType.containsKey(serviceTypeName))
- {
- supported = false;
- }
- }
-
- if(element instanceof Service) {
-
- //if the discovered transport value is not contained in the list of supported transports filter this service
- supported = false;
-
- String serviceTypeName = ((ServiceType)((Service)element).eContainer()).getName();
-
- //check if the transport service is supported
- Vector transports = (Vector)supportedServicesType.get(serviceTypeName);
- Iterator it = ((Service)element).getPair().iterator();
- while(it.hasNext())
- {
- Pair pair = (Pair)it.next();
- if(pair.getKey().equalsIgnoreCase("transport")) //$NON-NLS-1$
- {
- String transport = pair.getValue();
-
- for (int i = 0; i < transports.size(); i++) {
- if(((String)transports.elementAt(i)).equalsIgnoreCase(transport))
- {
- //found a supported transport
- supported = true;
- }
- }
- }
-
- }
-
- }
- 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 false;
- }
-
-}
diff --git a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardMainPage.java b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardMainPage.java
deleted file mode 100644
index c384c1468..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/ServiceDiscoveryWizardMainPage.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.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;
-import org.eclipse.tm.discovery.protocol.ProtocolFactory;
-import org.eclipse.tm.discovery.transport.TransportFactory;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * 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;
- private Button multicastButton;
-
- private String tempAddress;
-
- /**
- * 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) {
-
-
- Composite comp = new Composite(parent,SWT.NULL);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- comp.setLayout(layout);
-
- //GridData
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = SWT.BEGINNING;
- data.grabExcessVerticalSpace = false;
-
- comp.setLayoutData(data);
-
- 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);
- }
-
- }
- });
-
- addressText.setLayoutData(data);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(addressText,"org.eclipse.tm.discovery.wizard.address"); //$NON-NLS-1$
-
- Composite comp2 = new Composite(comp,SWT.NULL);
- GridLayout layout2 = new GridLayout();
- layout2.numColumns = 2;
- comp2.setLayout(layout2);
-
- multicastButton = new Button(comp2,SWT.CHECK);
-
- multicastButton.addSelectionListener(new SelectionListener(){
-
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
-
- Object src = e.getSource();
- if(((Button)src).getSelection())
- {
- String multicastAddress = null;
-
- try {
- multicastAddress = ProtocolFactory.getMulticastAddress(protocolCombo.getText(), transportCombo.getText());
- } catch (CoreException e1) {}
-
- if(multicastAddress!=null)
- {
- tempAddress = addressText.getText();
- addressText.setText(multicastAddress);
- }
- else
- {
- ((Button)src).setSelection(false);
- }
- }
- else
- {
- if(tempAddress!=null)
- addressText.setText(tempAddress);
- }
- }
- });
-
- new Label(comp2,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.MuticastAddressLabel0")); //$NON-NLS-1$
-
-
- 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);
-
- transportCombo.addSelectionListener(new SelectionListener(){
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void widgetSelected(SelectionEvent event) {
-
- if(multicastButton.getSelection())
- {
- String multicastAddress = null;
-
- try {
- multicastAddress = ProtocolFactory.getMulticastAddress(protocolCombo.getText(), transportCombo.getText());
- } catch (CoreException e1) {}
-
- if(multicastAddress!=null)
- {
- tempAddress = addressText.getText();
- addressText.setText(multicastAddress);
- }
- }
- }
- });
-
- transportCombo.setLayoutData(data);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(transportCombo,"org.eclipse.tm.discovery.wizard.transport"); //$NON-NLS-1$
-
- 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);
-
- if(multicastButton.getSelection())
- {
- String multicastAddress = null;
-
- try {
- multicastAddress = ProtocolFactory.getMulticastAddress(protocolCombo.getText(), transportCombo.getText());
- } catch (CoreException e1) {}
-
- if(multicastAddress!=null)
- {
- tempAddress = addressText.getText();
- addressText.setText(multicastAddress);
- }
- }
- }
- });
-
- protocolCombo.setLayoutData(data);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(protocolCombo,"org.eclipse.tm.discovery.wizard.protocol"); //$NON-NLS-1$
-
- 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);
-
- queryCombo.setLayoutData(data);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(queryCombo,"org.eclipse.tm.discovery.wizard.query"); //$NON-NLS-1$
-
- 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();
-
- timeOutText.setLayoutData(data);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(timeOutText,"org.eclipse.tm.discovery.wizard.timeout"); //$NON-NLS-1$
-
- setPageComplete(false);
-
- setControl(comp);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), "org.eclipse.tm.discovery.wizard.general"); //$NON-NLS-1$
-
-
- }
-
- /**
- * 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/internal/discovery/wizard/messages.properties b/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/messages.properties
deleted file mode 100644
index bc79f987d..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/src/org/eclipse/tm/internal/discovery/wizard/messages.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-##################################################################################
-# Copyright (c) 2006, 2007 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
-##################################################################################
-
-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.
-ServiceDiscoveryWizardMainPage.MuticastAddressLabel0=multicast address
-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/discovery/org.eclipse.tm.discovery.wizard/toc.xml b/discovery/org.eclipse.tm.discovery.wizard/toc.xml
deleted file mode 100644
index 43f21cb63..000000000
--- a/discovery/org.eclipse.tm.discovery.wizard/toc.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!--
-Copyright (c) 2006, 2007 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="Service Discovery Wizard">
- <topic label="Service Discovery Wizard" href="SDWizard.html"/>
-</toc> \ No newline at end of file
diff --git a/discovery/readme.txt b/discovery/readme.txt
deleted file mode 100644
index 28c4d2e1f..000000000
--- a/discovery/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The "discovery" folder holds the DSDP-TM Discovery Component.
-It depends on Eclipse Platform and Eclipse Modeling Framework (EMF).
-All these CVS modules should be named "org.eclipse.tm.discovery.*".
-See http://www.eclipse.org/dsdp/tm
diff --git a/releng/org.eclipse.rse.build/.cvsignore b/releng/org.eclipse.rse.build/.cvsignore
deleted file mode 100644
index f8b5b8240..000000000
--- a/releng/org.eclipse.rse.build/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-go.rb
diff --git a/releng/org.eclipse.rse.build/.project b/releng/org.eclipse.rse.build/.project
deleted file mode 100644
index a594b49dd..000000000
--- a/releng/org.eclipse.rse.build/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.build</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/releng/org.eclipse.rse.build/README_build.txt b/releng/org.eclipse.rse.build/README_build.txt
deleted file mode 100644
index 9377bfdb1..000000000
--- a/releng/org.eclipse.rse.build/README_build.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-Instructions for building TM and RSE
-------------------------------------
-
-1. Set up the build workspace
------------------------------
-ssh build.eclipse.org
-cd /shared/dsdp/tm/
-mkdir ws2_user
-cd ws2_user
-ln -s `pwd` $HOME/ws2
-ln -s /home/data/httpd/download.eclipse.org/dsdp/tm $HOME/downloads-tm
-cp -R ../ws2/IBMJava2-ppc-142 .
-wget -O setup.sh "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.rse/releng/org.eclipse.rse.build/setup.sh?rev=HEAD&cvsroot=DSDP_Project&content-type=text/plain"
-chmod a+x setup.sh
-./setup.sh
-
-
-2. Do an N-build
-----------------
-cd $HOME/ws2
-./doit_nightly.sh
-
-
-3. Do an I-build
-----------------
-On a local client PC, install Eclipse Platform Releng.Tools
-Have all TM plugins in the workspace (import tm-all-committer.psf)
-Synchronize CVS Workspace to HEAD
-Review all incoming changes
-Right-click > Team > Release...
-Select Mapfile "org.eclipse.rse.build"
-Press next ... tag and commit the Mapfiles
-ssh build.eclipse.org
-cd ws2
-./doit_irsbuild.sh I
-When build worked ok, tag org.eclipse.rse.build: e.g. I20070605-1200
-
-3a) Do an S-build
------------------
-Just like I-build, but also update
- org.eclipse.rse.build/template/buildNotes.php
-ssh build.eclipse.org
-cd ws2
-./doit_irsbuild.sh S 2.0RC3
-
-3b) Promote an S-build to official
-----------------------------------
-After testing the "invisible" S-build:
-ssh build.eclipse.org
-cd ws2/publish/S-3.1RC3*
-mv package.count.orig package.count
-
-3c) Promote an update site
---------------------------
-Any build generates its update site in $HOME/downlads-tm/testUpdates
-and $HOME/downloads-tm/signedUpdates . You need to manually copy these
-to its target repository, then re-generate repository metadata:
-
-cd $HOME/downloads-tm/updates/3.1milestones
-rm -rf plugins features
-cp -R ../../signedUpdates/plugins .
-cp -R ../../signedUpdates/features .
-cd bin
-cvs update
-./mkTestUpdates
-
-3d) Promote an S-build to Galileo
---------------------------------
-After S-build has been prepared (on signedUpdates)
-On local Eclipse client, checkout Galileo projects according to
- http://wiki.eclipse.org/Galileo_Build
-and edit the build contribution.
-
-4) Convert a download to "signed" form
---------------------------------------
-Normally, only the TM update site is signed whereas the downloadable ZIPs
-are not. Downloadable ZIPs can be converted to signed, if the signed
-update site is available and installed. See
-
- org.eclipse.rse.build/bin/make_signed.sh
- \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/about.html b/releng/org.eclipse.rse.build/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/releng/org.eclipse.rse.build/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 5, 2007</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/releng/org.eclipse.rse.build/archive/.cvsignore b/releng/org.eclipse.rse.build/archive/.cvsignore
deleted file mode 100644
index a17291e0f..000000000
--- a/releng/org.eclipse.rse.build/archive/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-drops
diff --git a/releng/org.eclipse.rse.build/archive/build_types.html b/releng/org.eclipse.rse.build/archive/build_types.html
deleted file mode 100644
index 131c40e84..000000000
--- a/releng/org.eclipse.rse.build/archive/build_types.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<title>Eclipse Corner</title>
-<link rel="stylesheet" href="http://www.eclipse.org/default_style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body text="#000000" bgcolor="#ffffff" link="#0000ee" vlink="#551a8b" alink="#ff0000">
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
- <tr>
- <td align=left valign=top colspan="2" bgcolor="#0080c0"><b><font face="Arial,Helvetica" color="#ffffff">Eclipse
- Project Build Types</font></b></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td>
- <p><b><font face="arial,helvetica,geneva" size="-1">Releases</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva">Releases are builds
- that have been declared major releases by the development team - for example
- &quot;R1.0&quot;. Releases are the right builds for people who want to
- be on a stable, tested release, and don't need the latest greatest features
- and improvements. Release builds always have an &quot;R&quot; at the beginning
- of the name i.e. R1.0, R2.0 etc. Non-release builds are named according to the
- date of the build - for example 20060427 is the build from April 27, 2006.</font><br>
- </p>
- </td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">Stable Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Stable builds are integration
- builds that have been found to be stable enough for most people to use.
- They are promoted from integration build to stable build by the architecture
- team after they have been used for a few days and deemed reasonably stable.
- The latest stable build is the right build for people who want to stay up
- to date with what is going on in the latest development stream, and don't
- mind putting up with a few problems n in order to get the latest greatest
- features and bug fixes. The latest stable build is the one the development
- team likes people to be using, because of the valuable and timely feedback.
- </font></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td>
- <p><b><font face="arial,helvetica,geneva" size="-1">Integration Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Periodically, component
- teams version off their work in what they believe is a stable, consistent
- state, and they update the build configuration to indicate that the next
- integration build should take this version of the component. Integration
- builds are built from these stable component versions that have been specified
- by each component team as the best version available. Integration builds
- may be promoted to stable builds after a few days of testing. Integration
- builds are built whenever new stable component versions are released into
- the build.</font></p>
- </td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">Nightly Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Nightly builds are produced
- every night from whatever has been released into the HEAD stream of the
- CVS repository. They are completely untested and will almost always have
- major problems. Many will not work at all. These drops are normally only
- useful to developers actually working on the Eclipse Project.</font></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">Maintenance Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Maintenance builds are produced
- periodically to incorporate fixes into an existing release. They are typically
- built from tagged plug-in and feature pojects in a maintenance stream of the CVS
- repository (i.e. R1_0_maintenance). Maintenance builds are promoted to a minor
- or service release (i.e. R1.1 or R1.0.1) after development teams have deemed one
- to be stable following one or more test-fix pass cycles.</font></td>
- </tr>
-</table>
-<h3>&nbsp;</h3>
-</body>
-</html>
diff --git a/releng/org.eclipse.rse.build/archive/dlconfig.txt b/releng/org.eclipse.rse.build/archive/dlconfig.txt
deleted file mode 100644
index dd682ba91..000000000
--- a/releng/org.eclipse.rse.build/archive/dlconfig.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-dropPrefix[]=R&dropPrefix[]=S&
-dropType[]=Archived Release&dropType[]=Archived Stable Build&
diff --git a/releng/org.eclipse.rse.build/archive/index.php b/releng/org.eclipse.rse.build/archive/index.php
deleted file mode 100644
index 1414801a0..000000000
--- a/releng/org.eclipse.rse.build/archive/index.php
+++ /dev/null
@@ -1,230 +0,0 @@
-<html><head>
-<link rel="stylesheet" href="http://www.eclipse.org/default_style.css">
-<title>Target Management Project Archived Downloads</title></head>
-<body>
-
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
- <tr>
- <td align=left width="72%"> <font class=indextop>Target Management project<br/>archived downloads</font>
- <br>
- <font class=indexsub>archived downloads from the dsdp-tm project</font><br>
-</td>
- <td width="28%"><img src="http://www.eclipse.org/images/Idea.jpg" height=86 width=120></td>
- </tr>
-
-</table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
-
- <tr>
- <td align=LEFT valign=TOP colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Archived Downloads</font></b></td>
- </tr>
-
- <tr> <td> <p>On this
-page you can find the archived
-<a href="build_types.html">builds</a> for the Remote System Explorer (RSE),
-provided by the
-<a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> project.
-Archived builds consist of older releases and not propagated to Eclipse mirrors.
-<!--
-To get started run the program and go through the
-user and developer documentation provided in the online help system.
--->
-To get started, see the build notes provided with each drop, run the
-program and go through the online user and developer documentation,
-or take a look at the project's online
-<a href="http://www.eclipse.org/dsdp/tm/tutorial/index.php">getting started</a>
-pages.
-
-If you have problems downloading the drops, contact the
-<font face="arial,helvetica,geneva" size="-1"><a href="mailto:webmaster@eclipse.org">webmaster</a></font>.
-If you have problems installing or getting the workbench to run,
-check out the
-<a href="http://wiki.eclipse.org/TM_and_RSE_FAQ">Target Management FAQ</a>,
-or try posting a question to the
-<a href="http://www.eclipse.org/newsgroups">newsgroup</a>,
-<a href="news://news.eclipse.org/eclipse.dsdp.tm">eclipse.dsdp.tm</a>.
-All downloads are provided under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/epl/notice.php">Eclipse.org
-Software User Agreement</a> unless otherwise specified. </p>
-
-<p>
-Current builds are available
-<a href="http://download.eclipse.org/dsdp/tm/downloads/index.php">here</a>.
-For information about different kinds of builds look
-<a href="build_types.html" target="_top">here</a>.
-</p>
-
-<p/>
-</td></tr>
-
- <tr>
- <td align=LEFT valign=TOP colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Archived
- Downloads</font></b></td>
- </tr>
- </table>
- <?php
- $fileHandle = fopen("dlconfig.txt", "r");
- while (!feof($fileHandle)) {
- $aLine = fgets($fileHandle, 4096);
- parse_str($aLine);
- }
- fclose($fileHandle);
-
- for ($i = 0; $i < count($dropType); $i++) {
- $typeToPrefix[$dropType[$i]] = $dropPrefix[$i];
- }
-
- $aDirectory = dir("drops");
- while ($anEntry = $aDirectory->read()) {
-
- // Short cut because we know aDirectory only contains other directories.
- if ($anEntry != "." && $anEntry!="..") {
- $aDropDirectory = dir("drops/".$anEntry);
- $fileCount = 0;
- while ($aDropEntry = $aDropDirectory->read()) {
- if (stristr($aDropEntry, ".zip") || stristr($aDropEntry, ".tar")) {
- // Count the files in the directory
- $fileCount = $fileCount + 1;
- }
- }
- //See http://at2.php.net/manual/en/class.dir.php
- $aDropDirectory->close();
- // Read the count file
- $countFile = "drops/".$anEntry."/package.count";
- $indexFile = "drops/".$anEntry."/index.php";
- if (file_exists($countFile) && file_exists($indexFile)) {
- $anArray = file($countFile);
-
- // If a match - process the directory
- if ($anArray[0] == $fileCount) {
- $parts = explode("-", $anEntry);
- if (count($parts) == 2) {
-
- //N-builds and I-builds
- $datePart = $parts[0];
- $timePart = $parts[1];
- $buildtype = substr($datePart, 0, 1);
- $buckets[$buildtype][] = $anEntry;
-
- $year = substr($datePart, 1, 4);
- $month = substr($datePart, 5, 2);
- $day = substr($datePart, 7, 2);
- $hour = substr($timePart,0,2);
- $minute = substr($timePart,2,2);
- $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
-
- $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
-
- if ($timeStamp > $latestTimeStamp[$buildtype]) {
- $latestTimeStamp[$buildtype] = $timeStamp;
- $latestFile[$buildtype] = $anEntry;
- }
-
- } else if (count($parts) == 3) {
-
- //S-builds and R-builds
- $buckets[$parts[0]][] = $anEntry;
-
- $timePart = $parts[2];
- $year = substr($timePart, 0, 4);
- $month = substr($timePart, 4, 2);
- $day = substr($timePart, 6, 2);
- $hour = substr($timePart,8,2);
- $minute = substr($timePart,10,2);
- $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
-
- $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
-
- if ($timeStamp > $latestTimeStamp[$parts[0]]) {
- $latestTimeStamp[$parts[0]] = $timeStamp;
- $latestFile[$parts[0]] = $anEntry;
- }
- }
- }
- }
- }
- }
- $aDirectory->close();
- ?>
-
-<table width="100%" cellspacing=0 cellpadding=3 align=center>
-<td align=left>
-<TABLE width="100%" CELLSPACING=0 CELLPADDING=3>
-<tr>
- <td width=\"30%\"><b>Build Type</b></td>
- <td><b>Build Name</b></td>
- <td><b>Build Date</b></td>
-</tr>
-
-<?php
- foreach($dropType as $value) {
- $prefix=$typeToPrefix[$value];
- $fileName = $latestFile[$prefix];
- echo "<tr>
- <td width=\"30%\">$value</td>";
-
- $parts = explode("-", $fileName);
- if (count($parts) == 2) {
- $buildName=$fileName;
- } else {
- $buildName=$parts[1];
- }
-
- // Uncomment the line below if we need click through licenses.
- // echo "<td><a href=license.php?license=drops/$fileName>$buildName</a></td>";
-
- // Comment the line below if we need click through licenses.
- echo "<td><a href=\"drops/$fileName/index.php\">$buildName</a></td>";
-
- echo "<td>$timeStamps[$fileName]</td>";
- echo "</tr>";
- }
-?>
-</table>
-</table>
-&nbsp;
-<?php
- foreach($dropType as $value) {
- $prefix=$typeToPrefix[$value];
- echo "
- <table width=\"100%\" cellspacing=0 cellpadding=3 align=center>
- <tr bgcolor=\"#999999\">
- <td align=left width=\"30%\"><b><a name=\"$value\"><font color=\"#FFFFFF\" face=\"Arial,Helvetica\">$value";
- echo "s</font></b></a></td>
- </TR>
- <TR>
- <td align=left>
- <TABLE width=\"100%\" CELLSPACING=0 CELLPADDING=3>
- <tr>
- <td width=\"30%\"><b>Build Name</b></td>
- <td><b>Build Date</b></td>
- </tr>";
-
- $aBucket = $buckets[$prefix];
- if (isset($aBucket)) {
- rsort($aBucket);
- foreach($aBucket as $innerValue) {
- $parts = explode("-", $innerValue);
- if (count($parts) == 2) {
- $buildName=$innerValue;
- } else {
- $buildName=$parts[1];
- }
- echo "<tr>";
-
- // Uncomment the line below if we need click through licenses.
- // echo "<td><a href=\"license.php?license=drops/$innerValue\">$buildName</a></td>";
-
- // Comment the line below if we need click through licenses.
- echo "<td><a href=\"drops/$innerValue/index.php\">$buildName</a></td>";
-
- echo "<td>$timeStamps[$innerValue]</td>
- </tr>";
- }
- }
- echo "</table></table>&nbsp;";
- }
-?>
-
-&nbsp;
-</body></html>
diff --git a/releng/org.eclipse.rse.build/bin/batch_sign.sh b/releng/org.eclipse.rse.build/bin/batch_sign.sh
deleted file mode 100755
index e6aee686d..000000000
--- a/releng/org.eclipse.rse.build/bin/batch_sign.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-#:#
-#:# Script to sign all ZIP files in a directory
-#:#
-#:# Usage:
-#:# batch_sign.sh {directory}
-#:# Examples:
-#:# batch_sign.sh publish/S-1.0M5-200611100500
-
-#nothing we do should be hidden from the world
-umask 22
-
-#Use Java5 on build.eclipse.org
-#export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-#export PATH=${HOME}/ws2/IBMJava2-ppc-142/bin:$PATH
-
-curdir=`pwd`
-
-#Get parameters
-dirToSign=$1
-usage=0
-if [ "$dirToSign" = "" ]; then
- usage=1
-elif [ ! -d "$dirToSign" ]; then
- usage=1
-fi
-if [ $usage = 1 ]; then
- grep '^#:#' $0 | grep -v grep | sed -e 's,^#:#,,'
- exit 0
-fi
-
-#sign the zipfiles
-cd "$dirToSign"
-RDIR=`pwd`
-mkdir -p signed
-nameToSign=`basename $RDIR`
-ZIPS=`ls *.zip *.jar`
-STAGING=/home/data/httpd/download-staging.priv/dsdp/tm
-STDIR=${STAGING}/${nameToSign}
-mkdir -p ${STDIR}
-cp ${ZIPS} ${STDIR}
-cd ${STDIR}
-mkdir out
-for x in $ZIPS ; do
- sign $x nomail ${STDIR}/out
-done
-echo "Waiting for signature..."
-sleep 300
-TRIES=20
-MISSING="$ZIPS"
-while [ "$MISSING" != "" -a ${TRIES} -gt 0 ]; do
- MISSING_NEW=""
- sleep 60
- for x in $MISSING ; do
- if [ -f ${STDIR}/out/$x ]; then
- echo "Done: TRIES=${TRIES}, $x"
- cp -f ${STDIR}/out/$x ${RDIR}/signed/$x
- chmod ugo+r ${RDIR}/signed/$x
- else
- MISSING_NEW="${MISSING_NEW} $x"
- fi
- done
- echo "Signed: TRIES=${TRIES}, Missing ${MISSING_NEW}"
- MISSING="${MISSING_NEW}"
- TRIES=`expr $TRIES - 1`
-done
-rm -rf ${STDIR}
-
-cd "$curdir"
-if [ "$MISSING" != "" ]; then
- echo "batch_sign failed: ${MISSING}"
- exit 1
-fi
-echo "batch_sign complete"
-exit 0
diff --git a/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh b/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh
deleted file mode 100755
index 5f4285c4f..000000000
--- a/releng/org.eclipse.rse.build/bin/doit_irsbuild.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-#:#
-#:# Bootstrapping script to perform S-builds and R-builds on build.eclipse.org
-#:# Will build based on HEAD of all mapfiles, and update the testUpdates as well
-#:#
-#:# Usage:
-#:# doit_irsbuild.sh {buildType} [buildId] [maptag]
-#:# Examples:
-#:# doit_irsbuild.sh R 1.0
-#:# doit_irsbuild.sh S 1.0M5 S1_0M5
-#:# doit_irsbuild.sh I
-
-#nothing we do should be hidden from the world
-umask 22
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-echo ${mydir}
-
-#Use Java5 on build.eclipse.org
-#export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-#export PATH=${HOME}/ws2/IBMJava2-ppc-142/bin:$PATH
-
-
-#Get parameters
-mapTag=HEAD
-buildType=$1
-buildId=$2
-case x$buildType in
- xP|xN|xI|xS|xR) ok=1 ;;
- xM|xJ) mapTag=R3_1_maintenance ; ok=1 ;;
- xK|xL) mapTag=R3_0_maintenance ; ok=1 ;;
- *) ok=0 ;;
-esac
-if [ "$3" != "" ]; then
- mapTag=$3
-fi
-if [ $ok != 1 ]; then
- grep '^#:#' $0 | grep -v grep | sed -e 's,^#:#,,'
- cd ${curdir}
- exit 0
-fi
-
-#Remove old logs and builds
-echo "Removing old logs and builds..."
-cd $HOME/ws2
-#rm log-*.txt
-if [ -d working/build ]; then
- rm -rf working/build
-fi
-if [ -d working/package ]; then
- rm -rf working/package
-fi
-
-#Do the main job
-echo "Updating builder from CVS..."
-cd org.eclipse.rse.build
-stamp=`date +'%Y%m%d-%H%M'`
-CHANGES=`cvs -nq update -r ${mapTag} | head -1`
-if [ "${CHANGES}" = "" ]; then
- echo "Build ${buildType}${buildId} : ${mapTag} : ${stamp}"
- echo "Build canceled, no mapfile or config changed in org.eclipse.rse.build."
- exit 0
-fi
-log=$HOME/ws2/log-${buildType}$stamp.txt
-touch $log
-#cvs -q update -RPd >> $log 2>&1
-cvs -q update -r ${mapTag} -RPd >> $log 2>&1
-daystamp=`date +'%Y%m%d*%H'`
-
-echo "Running the builder..."
-./nightly.sh ${mapTag} ${buildType} ${buildId} >> $log 2>&1
-tail -30 $log
-
-#update the main download and archive pages: build.eclipse.org only
-if [ -d /home/data/httpd/archive.eclipse.org/dsdp/tm/downloads ]; then
- cd /home/data/httpd/archive.eclipse.org/dsdp/tm/downloads
- cvs -q update -RPd >> $log 2>&1
- chgrp dsdp-tmadmin * CVS/* 2>/dev/null
- cd /home/data/httpd/download.eclipse.org/dsdp/tm/downloads
- cvs -q update -RPd >> $log 2>&1
- chgrp dsdp-tmadmin * CVS/*
-
- #Fixup permissions and group id on download.eclpse.org (just to be safe)
- echo "Fixup: chgrp -R dsdp-tmadmin drops/${buildType}*${daystamp}*"
- chgrp -R dsdp-tmadmin drops/${buildType}*${daystamp}*
- chmod -R g+w drops/${buildType}*${daystamp}*
-fi
-
-#Check the publishing
-cd $HOME/ws2/publish
-DIRS=`ls -dt ${buildType}*${daystamp}* | head -1 2>/dev/null`
-cd ${DIRS}
-FILES=`ls RSE-SDK-*.zip 2>/dev/null`
-echo "FILES=$FILES"
-if [ -f package.count -a "$FILES" != "" ]; then
- echo "package.count found, release seems ok"
- if [ ${buildType} = S -o ${buildType} = R ]; then
- #hide the release for now until it is tested
- #mirrors will still pick it up
- mv package.count package.count.orig
- #DO_SIGN=1
- fi
-
- if [ "$DO_SIGN" = "1" ]; then
- #sign the zipfiles
- ${mydir}/batch_sign.sh `pwd`
- fi
-
- if [ ${buildType} = N -a -d ../N.latest ]; then
- #update the doc server
- rm -f ../N.latest/RSE-*.zip
- rm -f ../N.latest/TM-*.zip
- cp -f RSE-SDK-*.zip ../N.latest/RSE-SDK-latest.zip
- cp -f TM-discovery-*.zip ../N.latest/TM-discovery-latest.zip
- chgrp dsdp-tmadmin ../N.latest/*.zip
- chmod g+w ../N.latest/*.zip
- if [ -d /shared/dsdp/public_html/tm/downloads/drops/N.latest ]; then
- cp -f ../N.latest/* /shared/dsdp/public_html/tm/downloads/drops/N.latest/
- chmod -R g+w /shared/dsdp/public_html/tm/downloads/drops
- fi
- fi
-
- if [ ${buildType} != N ]; then
- #Update the testUpdates site
- echo "Refreshing update site"
- cd $HOME/downloads-tm/testUpdates/bin
- cvs update
- ./mkTestUpdates.sh
- #Update the signedUpdates site
- echo "Refreshing signedUpdates site"
- cd $HOME/downloads-tm/signedUpdates/bin
- cvs update
- ./mkTestUpdates.sh
- fi
-
- cd "$curdir"
-else
- echo "package.count missing, release seems failed"
-fi
-chgrp dsdp-tm-rse $log
diff --git a/releng/org.eclipse.rse.build/bin/doit_nightly.sh b/releng/org.eclipse.rse.build/bin/doit_nightly.sh
deleted file mode 100755
index f6db6b611..000000000
--- a/releng/org.eclipse.rse.build/bin/doit_nightly.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-#Bootstrapping script to perform N-builds on build.eclipse.org
-
-#nothing we do should be hidden from the world
-umask 22
-
-#Use Java5 on build.eclipse.org
-#export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-#export PATH=${HOME}/ws2/IBMJava2-ppc-142/bin:$PATH
-
-curdir=`pwd`
-
-#Remove old logs and builds
-echo "Removing old logs and builds..."
-cd $HOME/ws2
-rm log-N*.txt
-if [ -d working/build ]; then
- rm -rf working/build
-fi
-if [ -d working/package ]; then
- rm -rf working/package
-fi
-
-#Do the main job
-echo "Updating builder from CVS..."
-cd org.eclipse.rse.build
-stamp=`date +'%Y%m%d-%H%M'`
-log=$HOME/ws2/log-N$stamp.txt
-touch $log
-cvs -q update -RPd >> $log 2>&1
-daystamp=`date +'%Y%m%d-%H'`
-
-echo "Running the builder..."
-./nightly.sh >> $log 2>&1
-tail -30 $log
-
-#update the main download and archive pages: build.eclipse.org only
-if [ -d /home/data/httpd/archive.eclipse.org/dsdp/tm/downloads ]; then
- cd /home/data/httpd/archive.eclipse.org/dsdp/tm/downloads
- cvs -q update -RPd >> $log 2>&1
- chgrp dsdp-tmadmin * CVS/* 2>/dev/null
- cd /home/data/httpd/download.eclipse.org/dsdp/tm/downloads
- cvs -q update -RPd >> $log 2>&1
- chgrp dsdp-tmadmin * CVS/* 2>/dev/null
-
- #Fixup permissions and group id on download.eclpse.org (just to be safe)
- chgrp -R dsdp-tmadmin drops/${buildType}*${daystamp}* 2>/dev/null
- chmod -R g+w drops/${buildType}*${daystamp}* 2>/dev/null
-fi
-
-#Copy latest SDK in order to give access to DOC server
-cd $HOME/ws2/publish
-if [ -d N.latest ]; then
- FILES=`ls -t N${daystamp}*/RSE-SDK-N${daystamp}*.zip | head -1 2>/dev/null`
- echo "FILES=$FILES"
- if [ "$FILES" != "" ]; then
- rm N.latest/RSE-SDK-N*.zip 2>/dev/null
- cd `dirname ${FILES}`
- cp -f RSE-SDK-N*.zip ../N.latest/RSE-SDK-latest.zip
- cp -f TM-discovery-*.zip ../N.latest/TM-discovery-latest.zip
- cd ../N.latest
- chgrp dsdp-tmadmin *.zip
- chmod g+w *.zip
- if [ -d /shared/dsdp/public_html/tm/downloads/drops/N.latest ]; then
- cp -f * /shared/dsdp/public_html/tm/downloads/drops/N.latest/
- chmod -R g+w /shared/dsdp/public_html/tm/downloads/drops
- fi
- fi
-fi
-
-#Cleanup old nightly builds (leave only last 5 in place)
-cd $HOME/ws2/publish
-ls -d N200* | sort | head -n-5 | xargs rm -rf
-
diff --git a/releng/org.eclipse.rse.build/bin/make_signed.sh b/releng/org.eclipse.rse.build/bin/make_signed.sh
deleted file mode 100755
index dfa6c7ee0..000000000
--- a/releng/org.eclipse.rse.build/bin/make_signed.sh
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2008, 2009 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
-#*******************************************************************************
-#
-# Usage: make sure that appropriate signed update site is referenced in UPDATE_SITE,
-# and current directory is a download. Will create signed downloads in subdirectory.
-#
-
-UPDATE_SITE=$HOME/downloads-tm/updates/3.1milestones
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-cd "${curdir}"
-
-#Use Java5 on build.eclipse.org
-#export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-#export PATH=${HOME}/ws2/IBMJava2-ppc-142/bin:$PATH
-
-SIGNED_JAR_SOURCE=${mydir}/eclipse_ext/tm
-##SIGNED_JAR_SOURCE=${mydir}/eclipse_ext
-OUTPUT=${curdir}/output.$$
-RESULT=${curdir}/result.$$
-TMP=${curdir}/tmp.$$
-BASEBUILDER=$HOME/ws2/eclipse
-
-# Provision update site into SIGNED_JAR_SOURCE
-if [ ! -d "${SIGNED_JAR_SOURCE}" ]; then
- mkdir -p "${SIGNED_JAR_SOURCE}"
- ${BASEBUILDER}/eclipse -nosplash \
- -data install-ws -consolelog -clean \
- -application org.eclipse.equinox.p2.repository.repo2runnable \
- -source file:${UPDATE_SITE} \
- -destination file:${SIGNED_JAR_SOURCE} \
- -vmargs \
- -Xms128M -Xmx256M -XX:PermSize=128M -XX:MaxPermSize=256M
- retval=$?
- echo "result: ${retval}"
- exit ${retval}
-fi
-
-if [ ! -d ${SIGNED_JAR_SOURCE}/server ]; then
- mkdir ${SIGNED_JAR_SOURCE}/server
-fi
-have_server=`ls "${SIGNED_JAR_SOURCE}"/server/*.jar 2>/dev/null`
-if [ "${have_server}" = "" ]; then
- cd ${SIGNED_JAR_SOURCE}/server
- unzip ${curdir}/rseserver-*-signed.zip
- have_server=`ls *.jar 2>/dev/null`
- cd "${curdir}"
- if [ "${have_server}" = "" ]; then
- echo 'ERROR: signed rseserver-*-signed.zip not found!'
- echo "Please sign a server zip on build.eclipse.org, upload and retry."
- exit 1
- fi
-fi
-
-if [ ! -d ${TMP} ]; then
- mkdir -p ${TMP}
-fi
-if [ ! -d ${OUTPUT} ]; then
- mkdir -p ${OUTPUT}
-fi
-if [ ! -d ${RESULT} ]; then
- mkdir -p ${RESULT}
-fi
-for zip in `ls *.zip *.tar` ; do
- cd ${TMP}
- case ${zip} in
- *.zip) unzip -q ${curdir}/${zip} ;;
- *.tar) tar xf ${curdir}/${zip} ;;
- esac
- case ${zip} in
- rseserver*) SIGNED_JARS=${SIGNED_JAR_SOURCE}/server ;;
- *) SIGNED_JARS=${SIGNED_JAR_SOURCE} ;;
- esac
- REF=`find . -name 'epl-v10.html'`
- FILES=`find . -name '*.jar' -o -name 'META-INF'`
- for f in ${FILES} ; do
- printf "${f}: "
- if [ -f ${SIGNED_JARS}/${f} ]; then
- cp -f ${SIGNED_JARS}/${f} ./${f}
- touch -r ${REF} ./${f}
- echo "signed"
- elif [ -d ${SIGNED_JARS}/${f} ]; then
- cp -Rf ${SIGNED_JARS}/${f}/* ${f}
- touch -r ${REF} ${f}/*
- echo "signed"
- else
- echo "."
- fi
- done
- ##cp ${curdir}/${zip} ${OUTPUT}
- case ${zip} in
- *.zip) zip -r -o -q ${OUTPUT}/${zip} * ;;
- *.tar) tar cfv ${OUTPUT}/${zip} * ; touch -r ${REF} ${OUTPUT}/${zip};
- esac
- rm -rf *
- rm "${OUTPUT}"/rseserver-*-signed.zip
- cd ${RESULT}
- case ${zip} in
- rseserver*) mkdir ${zip} ; cd ${zip} ;
- case ${zip} in
- *.zip) unzip -q -o ${OUTPUT}/${zip} ;;
- *.tar) tar xf ${OUTPUT}/${zip} ;;
- esac
- ;;
- *) unzip -q -o ${OUTPUT}/${zip} ;;
- esac
-done
-rm -rf ${TMP}
-
-echo "--------------------------------------"
-echo "DONE"
-echo "--------------------------------------"
-cd "${curdir}"
-echo "MAIN:---------------------------------"
-diff -r ${RESULT} ${SIGNED_JAR_SOURCE}
-for f in `ls rseserver-*.zip rseserver-*.tar` ; do
- echo "${f}:-----------------------------------"
- diff -r -b ${RESULT}/${f} ${SIGNED_JAR_SOURCE}/server
-done
-
diff --git a/releng/org.eclipse.rse.build/bin/rename_build.sh b/releng/org.eclipse.rse.build/bin/rename_build.sh
deleted file mode 100755
index d39d2672e..000000000
--- a/releng/org.eclipse.rse.build/bin/rename_build.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-#
-## Rename a build for release
-## usage:
-## cd drops/I20090916-0905
-## rename_build.sh R 3.1.1 200909160905
-##
-## Creates ../R-3.1.1-200909160905 and prepares renamed build there
-#
-case x$1 in
- xR) tgtBuild=Release ;;
- xM) tgtBuild=Maintenance ;;
- xI) tgtBuild=Integration ;;
- xS) tgtBuild=Stable ;;
- *) grep '^##' $0
- exit 0
- ;;
-esac
-tgtType=$1
-tgtVer=$2
-tgtDate=$3
-tgtDir=${tgtType}-${tgtVer}-${tgtDate}
-
-if [ ! -f package.count ]; then
- echo ERROR: package.count not found. Please cd to source build before running.
- exit 1
-fi
-if [ -d ../$tgtDir ]; then
- echo ERROR: target dir ../$tgtDir already exists
- exit 1
-fi
-srcVer=`ls RSE-SDK-*.zip | sed -e 's,RSE-SDK-,,' -e 's,\.zip,,'`
-if [ ! -f RSE-runtime-${srcVer}.zip ]; then
- echo ERROR: RSE-runtime-${srcVer}.zip not found, incorrect source?
- exit 1
-fi
-echo "Renaming Release: ${srcVer} --> ${tgtVer} into ../${tgtDir}"
-
-mkdir ../${tgtDir}
-for x in `ls` ; do
- if [ -f ${x} ]; then
- case $x in
- *-signed.zip)
- ;;
- *.zip|*.tar)
- y=`echo $x | sed -e "s,${srcVer},${tgtVer},"`
- cp ${x} ../${tgtDir}/${y}
- ;;
- index.php|buildNotes.php)
- cat ${x} | sed -e "s,/${srcVer},/${tgtDir},g" \
- -e "s,${srcVer},${tgtVer},g" \
- -e "/TM/s,Integration,${tgtBuild},g" \
- -e "/TM/s,Maintenance,${tgtBuild},g" \
- -e "/TM/s,Stable,${tgtBuild},g" \
- > ../${tgtDir}/${x}
- ;;
- package.count)
- cp ${x} ../${tgtDir}/${x}.orig
- ;;
- *)
- cp ${x} ../${tgtDir}/${x}
- ;;
- esac
- fi
-done
diff --git a/releng/org.eclipse.rse.build/bin/update_global_cvs_tags.sh b/releng/org.eclipse.rse.build/bin/update_global_cvs_tags.sh
deleted file mode 100755
index 3143f4f44..000000000
--- a/releng/org.eclipse.rse.build/bin/update_global_cvs_tags.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2007, 2008 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
-#*******************************************************************************
-#
-# This script can be used to apply a release tag or branch tag globally
-# to those files of the TM CVS Repository that are usually not seen. It
-# needs to run from command-line because under Eclipse, these top-level
-# modules and files would require checking out the entire TM module tree;
-# from commandline, this works with checking out the top-level directories
-# only.
-#
-# These files are named "readme.txt" in the top-level CVS modules, and
-# contribute to the tags shown in the Eclipse CVS Repository Explorer
-# when expanding the "Branches" or the "Tags" node.
-#
-# Before running this script, customize the "cvs tag" commands below.
-#
-curdir=`pwd`
-CVSROOT=:ext:moberhuber@dev.eclipse.org:/cvsroot/dsdp
-export CVSROOT
-TOPMODULES="\
- org.eclipse.tm.rse \
- org.eclipse.tm.rse/doc \
- org.eclipse.tm.rse/examples \
- org.eclipse.tm.rse/features \
- org.eclipse.tm.rse/plugins \
- org.eclipse.tm.rse/releng \
- org.eclipse.tm.rse/tests \
- org.eclipse.tm.core \
- org.eclipse.tm.core/discovery \
- org.eclipse.tm.core/terminal \
- org.eclipse.tm.core/wince \
-"
-### org.eclipse.tm.core/thirdparty \
-cvs co -l $TOPMODULES
-##exit 0
-for topmod in $TOPMODULES ; do
- cd $topmod
- #cvs update -l -r R1_0 .
- #cvs tag -b R1_0_maintenance readme.txt
- #cvs tag -d v20060630 readme.txt
- cvs update -l -A .
- cvs tag R3_1_1
- cd $curdir
-done
diff --git a/releng/org.eclipse.rse.build/bootstrap.sh b/releng/org.eclipse.rse.build/bootstrap.sh
deleted file mode 100644
index b826892b5..000000000
--- a/releng/org.eclipse.rse.build/bootstrap.sh
+++ /dev/null
@@ -1,242 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2005, 2007 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) - Adapt for TM / RSE
-#*******************************************************************************
-# User specific environment and startup programs
-umask 002
-
-BASE_PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin
-LD_LIBRARY_PATH=.
-BASH_ENV=$HOME/.bashrc
-USERNAME=`whoami`
-xhost +$HOSTNAME
-DISPLAY=:0.0
-CVS_RSH=ssh
-ulimit -c unlimited
-export CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY
-
-proc=$$
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-
-#notification list
-recipients=
-
-#sets skip.performance.tests Ant property
-skipPerf=""
-
-#sets skip.tests Ant property
-skipTest=""
-
-#sets sign Ant property
-sign=""
-
-tagMaps=""
-
-#sets fetchTag="HEAD" for nightly builds if required
-tag=""
-
-#Basebuilder for Eclipse 3.2.1 maintenance
-#buildProjectTags=v20060529
-buildProjectTags=r321_v20060830
-
-#updateSite property setting
-updateSite=""
-
-#flag indicating whether or not mail should be sent to indicate build has started
-mail=""
-
-#flag used to build based on changes in map files
-compareMaps=""
-
-#buildId - build name
-buildId=""
-
-#buildLabel - name parsed in php scripts <buildType>-<buildId>-<datestamp>
-buildLabel=""
-
-# tag for build contribution project containing .map files
-mapVersionTag=HEAD
-
-# directory in which to export builder projects
-#builderDir=/builds/eclipsebuilder
-builderDir=$mydir/../working/build
-
-# buildtype determines whether map file tags are used as entered or are replaced with HEAD
-buildType=N
-
-# directory where to copy build
-#postingDirectory=/builds/transfer/files/master/downloads/drops
-postingDirectory=$mydir/../publish
-
-
-# flag to indicate if test build
-testBuild=""
-
-# path to javadoc executable
-javadoc=""
-
-# value used in buildLabel and for text replacement in index.php template file
-builddate=`date +%Y%m%d`
-buildtime=`date +%H%M`
-timestamp=$builddate$buildtime
-
-
-# process command line arguments
-usage="usage: $0 [-notify emailaddresses][-test][-buildDirectory directory][-buildId name][-buildLabel directory name][-tagMapFiles][-mapVersionTag tag][-builderTag tag][-bootclasspath path][-compareMaps][-skipPerf] [-skipTest][-updateSite site][-sign] M|N|I|S|R"
-
-if [ $# -lt 1 ]
-then
- echo >&2 "$usage"
- exit 1
-fi
-
-while [ $# -gt 0 ]
-do
- case "$1" in
- -buildId) buildId="$2"; shift;;
- -buildLabel) buildLabel="$2"; shift;;
- -mapVersionTag) mapVersionTag="$2"; shift;;
- -tagMapFiles) tagMaps="-DtagMaps=true";;
- -skipPerf) skipPerf="-Dskip.performance.tests=true";;
- -skipTest) skipTest="-Dskip.tests=true";;
- -buildDirectory) builderDir="$2"; shift;;
- -notify) recipients="$2"; shift;;
- -test) postingDirectory="/builds/transfer/files/bogus/downloads/drops";testBuild="-Dtest=true";;
- -builderTag) buildProjectTags="$2"; shift;;
- -compareMaps) compareMaps="-DcompareMaps=true";;
- -updateSite) updateSite="-DupdateSite=$2";shift;;
- -sign) sign="-Dsign=true";;
- -*)
- echo >&2 $usage
- exit 1;;
- *) break;; # terminate while loop
- esac
- shift
-done
-
-# After the above the build type is left in $1.
-buildType=$1
-
-# Set default buildId and buildLabel if none explicitly set
-if [ "$buildId" = "" ]
-then
- buildId=$buildType$builddate-$buildtime
-fi
-
-if [ "$buildLabel" = "" ]
-then
- buildLabel=$buildId
-fi
-
-#Set the tag to HEAD for Nightly builds
-if [ "$buildType" = "N" ]
-then
- tag="-DfetchTag=HEAD"
- versionQualifier="-DforceContextQualifier=$buildId"
-fi
-
-# tag for eclipseInternalBuildTools on ottcvs1
-internalToolsTag=$buildProjectTags
-
-# tag for exporting org.eclipse.releng.basebuilder
-baseBuilderTag=$buildProjectTags
-
-# tag for exporting the custom builder
-customBuilderTag=$buildProjectTags
-
-if [ -e $builderDir ]
-then
- builderDir=$builderDir$timestamp
-fi
-
-# directory where features and plugins will be compiled
-buildDirectory=$builderDir/src
-
-mkdir -p $builderDir
-cd $builderDir
-
-#check out org.eclipse.releng.basebuilder
-cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co -r $baseBuilderTag org.eclipse.releng.basebuilder
-
-#check out org.eclipse.rse.build
-cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp co -r $customBuilderTag org.eclipse.tm.rse/releng/org.eclipse.rse.build
-if [ "$tagMaps" == "-DtagMaps=true" ]; then
- cvs -d moberhuber@dev.eclipse.org:/cvsroot/dsdp rtag -r $customBuilderTag v$buildId org.eclipse.tm.rse/releng/org.eclipse.rse.build
-fi
-
-if [ "$HOSTNAME" == "utils" ]
-then
- #Running on build.eclipse.org
- java15_home=/shared/dsdp/tm/ibm-java2-ppc64-50
- #java14_home=/shared/webtools/apps/IBMJava2-ppc64-142
- java14_home=/shared/webtools/apps/IBMJava2-ppc-142
- javadoc="-Djavadoc15=$java15_home/bin/javadoc"
- PATH=$java15_home/jre/bin:$PATH;export PATH
-elif [ "$HOSTNAME" == "parser.wrs.com" ]
-then
- #Running on parser
- java15_home=/opt/jdk1.5.0_06
- java14_home=/opt/j2sdk1.4.2_12
- javadoc="-Djavadoc15=$java15_home/bin/javadoc"
- PATH=$java15_home/jre/bin:$PATH;export PATH
-fi
-
-mkdir -p $postingDirectory/$buildLabel
-chmod -R 755 $builderDir
-
-#default value of the bootclasspath attribute used in ant javac calls.
-bootclasspath="$java14_home/jre/lib/rt.jar:$java14_home/jre/lib/jsse.jar"
-bootclasspath_15="$java15_home/jre/lib/rt.jar"
-
-cd $builderDir/org.eclipse.rse.build
-
-echo buildId=$buildId >> monitor.properties
-echo timestamp=$timestamp >> monitor.properties
-echo buildLabel=$buildLabel >> monitor.properties
-echo recipients=$recipients >> monitor.properties
-echo log=$postingDirectory/$buildLabel/index.php >> monitor.properties
-
-#the base command used to run AntRunner headless
-antRunner="`which java` -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
-
-#clean drop directories
-# $antRunner -buildfile eclipse/helper.xml cleanSites
-
-echo recipients=$recipients
-echo postingDirectory=$postingDirectory
-echo builderTag=$buildProjectTags
-echo buildDirectory=$buildDirectory
-echo bootclasspath=$bootclasspath
-echo bootclasspath_15=$bootclasspath_15
-
-#full command with args
-buildCommand="$antRunner -q -buildfile buildAll.xml $mail $testBuild $compareMaps -DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory -Dbootclasspath=$bootclasspath -DbuildType=$buildType -D$buildType=true -DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildLabel -Dtimestamp=$timestamp -DmapCvsRoot=:ext:sdimitro@dev.eclipse.org:/cvsroot/eclipse $skipPerf $skipTest $tagMaps -DJ2SE-1.5=$bootclasspath_15 -DJ2SE-1.4=$bootclasspath -DCDC-1.0/Foundation-1.0=$bootclasspath_foundation -DlogExtension=.xml $javadoc $updateSite $sign -DgenerateFeatureVersionSuffix=true -Djava15-home=$builderDir/jdk/linuxppc/ibm-java2-ppc-50/jre -listener org.eclipse.releng.build.listeners.EclipseBuildListener"
-
-#capture command used to run the build
-echo $buildCommand>command.txt
-
-#run the build
-$buildCommand
-retCode=$?
-
-if [ $retCode != 0 ]
-then
- echo "Build failed (error code $retCode)."
- exit -1
-fi
-
-#clean up
-rm -rf $builderDir
-
-
diff --git a/releng/org.eclipse.rse.build/build.pl b/releng/org.eclipse.rse.build/build.pl
deleted file mode 100644
index 55d79ed15..000000000
--- a/releng/org.eclipse.rse.build/build.pl
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/perl
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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 API and implementation
-# Martin Oberhuber (Wind River) - ongoing maintenance
-#*******************************************************************************
-
-# Build script for Remote System Explorer
-# Authors: Dave Dykstal, Kushal Munir
-# java and cvs have to be in the path
-
-use warnings;
-use File::Spec;
-
-sub ask($$) {
- my ($question, $default, $message, $ans);
- ($question, $default) = @_;
- $message = "${question} (default is ${default}): ";
- print STDERR $message;
- $ans = <STDIN>;
- chomp $ans;
- $ans = $ans ? $ans : $default;
- return $ans;
-}
-
-sub makeAbsolute($) {
- my $path = File::Spec->canonpath($_[0]);
- if (!File::Spec->file_name_is_absolute($path)) {
- $current = `pwd`;
- chomp($current);
- $path = File::Spec->catdir($current, $path);
- $path = File::Spec->canonpath($path);
- }
- return $path;
-}
-
-# $eclipse is the location of the basic PDE and plugins to compile against
-# This should include the org.eclipse.pde.build project
-$eclipse = "../eclipse";
-
-# $basebuilder" is the location of the Eclipse Releng basebuilder
-# This can also be set to ${eclipse}
-$basebuilder = "../org.eclipse.releng.basebuilder";
-
-# $builder is the location of the custom build scripts customTargets.xml and build.properties
-# (i.e. the contents of org.eclipse.rse.build)
-$builder = ".";
-
-# $working is where the build is actually done, does not need to exist
-$working = "../working";
-
-# make these absolute paths
-$eclipse = makeAbsolute($eclipse);
-$basebuilder = makeAbsolute($basebuilder);
-$builder = makeAbsolute($builder);
-$working = makeAbsolute($working);
-$plugins = File::Spec->catdir($basebuilder, "plugins");
-$pdeBuildGlob = File::Spec->catdir($plugins, "org.eclipse.pde.build*");
-
-# Find the base build scripts: genericTargets.xml and build.xml
-@candidates = glob($pdeBuildGlob);
-$n = @candidates;
-if ($n == 0) {
- die("PDE Build was not found.");
-}
-if ($n > 1) {
- die("Too many versions of PDE Build were found.");
-}
-$pdeBuild = $candidates[0];
-
-$buildDirectory = "$working/build";
-$packageDirectory = "$working/package";
-$publishDirectory = "$working/publish";
-
-$tag = ask("Enter tag to fetch from CVS", "HEAD");
-$buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable, J/M=Maintenance, K/L=Legacy)", "P");
-($sec, $minute, $hour, $mday, $mon, $year) = localtime();
-$mydstamp = sprintf("%4.4d%2.2d%2.2d", $year + 1900, ($mon + 1), $mday);
-$mytstamp = sprintf("%2.2d%2.2d", $hour, $minute, $sec);
-$timeStamp = "${mydstamp}-${mytstamp}";
-$buildId = $buildType . $timeStamp;
-$buildId = ask("Enter the build id", $buildType . $timeStamp);
-
-# default value of the bootclasspath attribute used in ant javac calls.
-# these pathes are valid on build.eclipse.org
-$bootclasspath = "/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/rt.jar:/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/jsse.jar";
-$bootclasspath_15 = "/shared/common/jdk-1.5.0_16/jre/lib/rt.jar";
-#$bootclasspath_16 = "$builderDir/jdk/win32_16/jdk6/jre/lib/rt.jar";
-#$bootclasspath_foundation = "/shared/common/Java_ME_platform_SDK_3.0_EA/runtimes/cdc-hi/lib/rt.jar";
-$bootclasspath_foundation11 = "/shared/dsdp/JDKs/win32/j9_cdc11/lib/jclFoundation11/classes.zip";
-
-$incantation = "java -cp ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar org.eclipse.core.launcher.Main ";
-$incantation .= "-application org.eclipse.ant.core.antRunner ";
-$incantation .= "-buildfile ${pdeBuild}/scripts/build.xml ";
-$incantation .= "-DbuildDirectory=${buildDirectory} ";
-$incantation .= "-DpackageDirectory=${packageDirectory} ";
-$incantation .= "-DpublishDirectory=${publishDirectory} ";
-$incantation .= "-Dbuilder=${builder} ";
-$incantation .= "-DbaseLocation=${eclipse} ";
-$incantation .= "-DbuildType=${buildType} ";
-$incantation .= "-DbuildId=${buildId} ";
-$incantation .= "-DmapVersionTag=${tag} ";
-$incantation .= "-Dmydstamp=${mydstamp} ";
-$incantation .= "-Dmytstamp=${mytstamp} ";
-if ($buildType =~ "N") {
- $incantation .= "-DforceContextQualifier=${buildId} ";
- $incantation .= "-DfetchTag=HEAD ";
-}
-$incantation .= "-DdoPublish=true ";
-$incantation .= "-Dbootclasspath=${bootclasspath} ";
-$incantation .= "-DJ2SE-1.4=${bootclasspath} ";
-$incantation .= "-DJ2SE-1.5=${bootclasspath_15} ";
-$incantation .= "-DCDC-1.1/Foundation-1.1=${bootclasspath_foundation11} ";
-#$incantation .= "postBuild ";
-
-
-print("${incantation}\n");
-
-system($incantation); \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/build.properties b/releng/org.eclipse.rse.build/build.properties
deleted file mode 100644
index d38eb48a2..000000000
--- a/releng/org.eclipse.rse.build/build.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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 bug 153655 incorrect source features
-###############################################################################
-outputUpdateJars=true
-archivePrefix=eclipse
-collectingFolder=${archivePrefix}
-buildType=P
-buildId=unknown
-buildLabel=${buildId}
-mapVersionTag=HEAD
-
-#this is set to the tag from the map file unless forced here
-#forceContextQualifier=vYYYYMMDD
-
-#adds checksum suffix to directory names
-generateFeatureVersionSuffix=true
-
-##Packager
-collPlace=eclipse
-collBase=.
-# configs=linux,gtk,ppc & *,*,*
-archivesFormat =\
-linux, gtk, ppc-zip &\
- *,*,*-zip
-# bootclasspath=${java.home}/lib/rt.jar:${java.home}/lib/jsse.jar
-baseos=linux
-basews=gtk
-basearch=ppc
-#runPackager=true
-### We do not build individual source bundles yet because Eclipse 3.3 dont understand it
-individualSourceBundles=true
-
-#Compiler options
-javacFailOnError=false
-javacDebugInfo=on
-#javacVerbose=true
-#compilerArg=-enableJavadoc
-#This fixes a problem with the IBM 1.5 VM, see bug 158358
-compilerArg=-inlineJSR -enableJavadoc -warn:+javadoc
-
-zipargs=
-tarargs=--owner=0 --group=0
-
-#Runtime libs - needed for headless build of Apache Commons Net
-#J2SE-1.2=../jres/1.2.2/lib/rt.jar
diff --git a/releng/org.eclipse.rse.build/build.rb b/releng/org.eclipse.rse.build/build.rb
deleted file mode 100644
index a5d1d0e07..000000000
--- a/releng/org.eclipse.rse.build/build.rb
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/ruby
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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 API and implementation
-# Martin Oberhuber (Wind River) - ongoing maintenance
-#*******************************************************************************
-
-# Build script for Remote System Explorer
-# Author: Dave Dykstal, Kushal Munir
-# Prerequisites:
-# written in ruby
-# java and cvs have to be in the path
-
-require "ftools"
-
-def ask(question, default)
- message = "#{question} (default is #{default}): "
- STDERR.print message
- answer = readline().strip
- answer = answer.empty? ? default : answer
- return answer
-end
-
-# "eclipse" is the location of the basic PDE and plugins to compile against
-# This should include the org.eclipse.pde.build project
-eclipse = "../eclipse"
-
-# "basebuilder" is the location of the Eclipse Releng basebuilder
-# This can be set to #{eclipse}
-basebuilder = "../org.eclipse.releng.basebuilder"
-
-# "builder" is the location of the custom build scripts customTargets.xml and build.properties
-# (i.e. the contents of org.eclipse.rse.build)
-builder = "."
-
-# "working" is where the build is actually done, does not need to exist
-working = "../working"
-
-# make these absolute paths
-eclipse = File.expand_path(eclipse)
-basebuilder = File.expand_path(basebuilder)
-builder = File.expand_path(builder)
-working = File.expand_path(working)
-
-# Find the base build scripts: genericTargets.xml and build.xml
-candidates = Dir["#{basebuilder}/plugins/org.eclipse.pde.build*"]
-if (candidates.size == 0) then
- raise("PDE Build was not found.")
-end
-if (candidates.size > 1) then
- raise("Too many versions of PDE Build were found.")
-end
-pdeBuild = candidates[0]
-
-buildDirectory = "#{working}/build"
-packageDirectory = "#{working}/package"
-publishDirectory = "#{working}/publish"
-
-tag = ask("Enter tag to fetch from CVS", "HEAD")
-buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable, J/M=Maintenance, K/L=Legacy)", "P")
-mydstamp = Time.now.strftime("%Y%m%d")
-mytstamp = Time.now.strftime("%H%M")
-buildId = ask("Enter the build id", buildType + mydstamp + "-" + mydstamp)
-
-# default value of the bootclasspath attribute used in ant javac calls.
-# these pathes are valid on build.eclipse.org
-bootclasspath = "/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/rt.jar:/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/jsse.jar"
-bootclasspath_15 = "/shared/common/jdk-1.5.0_16/jre/lib/rt.jar"
-#bootclasspath_16 = "$builderDir/jdk/win32_16/jdk6/jre/lib/rt.jar"
-#bootclasspath_foundation = "/shared/common/Java_ME_platform_SDK_3.0_EA/runtimes/cdc-hi/lib/rt.jar"
-bootclasspath_foundation11 = "/shared/dsdp/JDKs/win32/j9_cdc11/lib/jclFoundation11/classes.zip"
-
-command = "java -cp #{basebuilder}/plugins/org.eclipse.equinox.launcher.jar org.eclipse.core.launcher.Main "
-command += "-application org.eclipse.ant.core.antRunner "
-command += "-buildfile #{pdeBuild}/scripts/build.xml "
-command += "-DbuildDirectory=#{buildDirectory} "
-command += "-DpackageDirectory=#{packageDirectory} "
-command += "-DpublishDirectory=#{publishDirectory} "
-command += "-Dbuilder=#{builder} "
-command += "-DbaseLocation=#{eclipse} "
-command += "-DbuildType=#{buildType} "
-command += "-DbuildId=#{buildId} "
-command += "-DmapVersionTag=#{tag} "
-command += "-Dmydstamp=#{mydstamp} "
-command += "-Dmytstamp=#{mytstamp} "
-if ("#{buildType}" == "N") then
- command += "-DforceContextQualifier=#{buildId} "
- command += "-DfetchTag=HEAD "
-end
-command += "-DdoPublish=true "
-command += "-Dbootclasspath=#{bootclasspath} "
-command += "-DJ2SE-1.4=#{bootclasspath} "
-command += "-DJ2SE-1.5=#{bootclasspath_15} "
-command += "-DCDC-1.1/Foundation-1.1=#{bootclasspath_foundation11} "
-#command += "postBuild "
-
-puts(command)
-
-system(command) \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/copyrights/NOTES.txt b/releng/org.eclipse.rse.build/copyrights/NOTES.txt
deleted file mode 100644
index 7d80a45f6..000000000
--- a/releng/org.eclipse.rse.build/copyrights/NOTES.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-Standardizing Copyright Headers
--------------------------------
-Some have "and others" on the Copyright line, others not.
-Some like to indent their Contributors, others not.
-Some have "All rights reserved." on the Copyright line, others below. STANDARD IS below
-! MV is even missing the "All rights reserved." completely!
-Some have a dot after "and others.", others not. -- STANDARD IS and others.
-Some have a dot after "Inc", others not. -- STANDARD IS DOT
-Some have a comma before ", Inc" others not. -- STANDARD IS COMMA
-Some have trailing space, others not. -- STANDARD IS no trailing space
-Some have an EPL Copyright, but formatted differently (in terms of line breaks)
-
-
-AdvancedCopyrightTool:
-Looks like it deletes all Contributors ?!?
-Falls back to Eclipse/IBM Copyright if no exact match on 1st line
-Matches the line with the ${date} only
-
-234873 -- jun 18,08 -- extends
-140936 -- dec 31,08 -- delete space
-
-
-Take Care on HTML:
-* about.html must not change date
-* about.html has <blockquote>apache and stuff
-
-
-Improvements:
-* Fix insertion of space in IBM copyright
-* Handle .html files (from docs)
-* Allow fuzzy replacement of Copyright Year only
-* Should we only act if it is EPL, i.e. not only company name but also license match?
-MUST HAVE:
-* It must be capable of adding "and others." if not already there. And do a corresponding fuzzy match.
-
-
-IBM can standardize: "All rights reserved." on newline; always "And others.";
-- We have 818 where "All rights reserved." is on the Copyright line!
-- In case of IBM, some have "and others.", some not.
-
-
-Statistics:
-- 818 with "All rights reserved." on first line - should always be 2nd!
-- 730 of 2887 are non-IBM
-- 269 (461) are also not "Wind River Systems, Inc. and others"
-- 217 (52) are also not "Radoslav Gerganov" -- rse.wince
-- 111 (106) are also not "Symbian Software Ltd" -- tm.discovery
-- 105 (6) are also not "Celunite, Inc" -- services.telnet
-- 72 (33) are also not "MontaVista Software, Inc"
-- 26 (46) are also not "Wind River Systems, Inc"
-- 24 (2) are also not "PalmSource, Inc" -- rse.services
-- 9 (15) are also not "Takuya Miyamoto" -- rse.importexport
-- rest are OK
-
-Final Regex:
-Copyright [(cC)]+ [0-9, -]+
-Final filter:
-IBM Corporation|Wind River Systems|Radoslav Gerganov|Symbian Software Ltd|Celunite, Inc|MontaVista Software, Inc|PalmSource, Inc|Takuya Miyamoto
-
-What to do:
-1. Fix the Wind River ones to be consistent
-2. Advanced tool: dont match for "and others." but re-add it if it was not there. (Preference ?!?)
-3. Advanced tool: if it is EPL and replacement takes place, insert standard EPL. (Preference ?!?)
-4. Advanced tool: write documentation, and attach it to context help of Copyrights Tool Preference.
- (what it does, when if falls back etc)
-3. What to do with diffs in punctuation -- "Inc" vs ", Inc" vs ", Inc." \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/copyrights/ibmCopyright.txt b/releng/org.eclipse.rse.build/copyrights/ibmCopyright.txt
deleted file mode 100644
index af6d8a638..000000000
--- a/releng/org.eclipse.rse.build/copyrights/ibmCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} 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 \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/copyrights/mvCopyright.txt b/releng/org.eclipse.rse.build/copyrights/mvCopyright.txt
deleted file mode 100644
index db51430dc..000000000
--- a/releng/org.eclipse.rse.build/copyrights/mvCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} MontaVista Software, 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:
-Yu-Fen Kuo (MontaVista) - initial API and implementation
diff --git a/releng/org.eclipse.rse.build/copyrights/palmCopyright.txt b/releng/org.eclipse.rse.build/copyrights/palmCopyright.txt
deleted file mode 100644
index f3b0d2a24..000000000
--- a/releng/org.eclipse.rse.build/copyrights/palmCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} 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)
diff --git a/releng/org.eclipse.rse.build/copyrights/radoCopyright.txt b/releng/org.eclipse.rse.build/copyrights/radoCopyright.txt
deleted file mode 100644
index 7651f7d7b..000000000
--- a/releng/org.eclipse.rse.build/copyrights/radoCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} Radoslav Gerganov and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
- Radoslav Gerganov - initial API and implementation
diff --git a/releng/org.eclipse.rse.build/copyrights/symbianCopyright.txt b/releng/org.eclipse.rse.build/copyrights/symbianCopyright.txt
deleted file mode 100644
index 471fb3e72..000000000
--- a/releng/org.eclipse.rse.build/copyrights/symbianCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} Symbian Software Ltd. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms 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
diff --git a/releng/org.eclipse.rse.build/copyrights/takuyaCopyright.txt b/releng/org.eclipse.rse.build/copyrights/takuyaCopyright.txt
deleted file mode 100644
index 1db8e8353..000000000
--- a/releng/org.eclipse.rse.build/copyrights/takuyaCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} Takuya Miyamoto and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
- Takuya Miyamoto - initial API and implementation
diff --git a/releng/org.eclipse.rse.build/copyrights/wrCopyright.txt b/releng/org.eclipse.rse.build/copyrights/wrCopyright.txt
deleted file mode 100644
index 50c4bba64..000000000
--- a/releng/org.eclipse.rse.build/copyrights/wrCopyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) ${date} 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
diff --git a/releng/org.eclipse.rse.build/customAssembly.xml b/releng/org.eclipse.rse.build/customAssembly.xml
deleted file mode 100644
index 473f4c13d..000000000
--- a/releng/org.eclipse.rse.build/customAssembly.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
- Copyright (c) 2008, 2009 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
- -->
-<project name="Build specific targets and properties" default="noDefault">
-
- <!-- =====================================================================
-
- The Following Properties are available in all targets:
- - eclipse.base : the base folder everything will be collected into
- - eclipse.plugins : the plugins folder
- - eclipse.features: the features folder
- - archiveFullPath : the full path of the final archive once it is created
-
- ===================================================================== -->
-
- <!-- ===================================================================== -->
- <!-- Called after each invocation of the gather.bin.parts target on the -->
- <!-- individual plugins and features. -->
- <!-- Available properties are: -->
- <!-- projectLocation: location of the project being gathered -->
- <!-- projectName: symbolic name with version (org.eclipse.foo_1.0.0.v123) -->
- <!-- target.folder: the destination, eclipse/plugins or eclipse/features -->
- <!-- -->
- <!-- The generated pattern is that plugins/features are gathered into the -->
- <!-- folder ${target.folder}/${projectName} -->
- <!-- ===================================================================== -->
- <target name="gather.bin.parts">
- <apitooling.apigeneration
- projectname="${projectName}"
- target="${target.folder}"
- binary="${target.folder}/${projectName}"
- project="${projectLocation}" />
- </target>
-
-
- <!-- ===================================================================== -->
- <!-- Called after invoking the gather.bin.parts targets for all plugins -->
- <!-- and features. Results exist as folders and have not yet been jarred. -->
- <!-- ===================================================================== -->
- <target name="post.gather.bin.parts">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Called just prior to signing a jar -->
- <!-- In addititon to the properties listed above: -->
- <!-- - source : plugins or features directory -->
- <!-- - elementName: element being signed without .jar -->
- <!-- (eg "org.eclipse.foo_1.0.0" -->
- <!-- ===================================================================== -->
- <target name="pre.jarSigning">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Called after all plugins and features have been jarred -->
- <!-- (and potentially signed) -->
- <!-- ===================================================================== -->
- <target name="post.jarUp">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Called just before the archive file is built -->
- <!-- In addititon to the properties listed above: -->
- <!-- - rootFolder : the folder containing the root files -->
- <!-- ===================================================================== -->
- <target name="pre.archive">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.rse.build/customTargets.xml b/releng/org.eclipse.rse.build/customTargets.xml
deleted file mode 100644
index e75c42464..000000000
--- a/releng/org.eclipse.rse.build/customTargets.xml
+++ /dev/null
@@ -1,577 +0,0 @@
-<!--
- Copyright (c) 2005, 2009 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
- -->
-<project name="Build specific targets and properties" default="noDefault">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- Add one <ant> task for each top level element being built. -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.sdk" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.useractions" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.wince" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.examples" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.tests" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.tm.discovery" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.tm.terminal.sdk" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.rse">
- <property name="archiveName" value="RSE-runtime-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.sdk">
- <property name="archiveName" value="RSE-SDK-${buildId}.zip"/>
- <property name="copyOrbit" value="true"/>
- <property name="copyOrbitSrc" value="true"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.useractions">
- <property name="archiveName" value="RSE-useractions-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.examples">
- <property name="archiveName" value="RSE-examples-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.wince">
- <property name="archiveName" value="RSE-wince-incubation-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.rse.tests">
- <property name="archiveName" value="RSE-tests-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.tm.discovery">
- <property name="archiveName" value="TM-discovery-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="assemble.org.eclipse.tm.terminal.sdk">
- <property name="archiveName" value="TM-terminal-${buildId}.zip"/>
- <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- <antcall target="unpackUpdateJarsForPackaging" />
- </target>
-
- <target name="unpackUpdateJarsForPackaging" depends="myInit">
- <property name="tmpsite" value="${buildDirectory}/tmpsite" />
- <mkdir dir="${tmpsite}/new/eclipse/features" />
- <mkdir dir="${tmpsite}/new/eclipse/plugins" />
- <exec executable="unzip" dir="${buildDirectory}/${buildLabel}">
- <arg line="-q ${archiveName} -d ${tmpsite}" />
- </exec>
- <property name="orbitDest" value="${tmpsite}/eclipse"/>
- <antcall target="copyOrbitBundlesToUpdateSite"/>
- <copy todir="${buildUpdateSitePath}">
- <fileset dir="${tmpsite}/eclipse"/>
- </copy>
-
- <unpackUpdateJars site="${tmpsite}/eclipse" output="${tmpsite}/new/eclipse"/>
- <antcall target="packageLicenseFiles"/>
- <zip destfile="${buildDirectory}/${buildLabel}/${archiveName}"
- basedir="${tmpsite}/new"
- />
- <delete dir="${tmpsite}"/>
- </target>
-
- <target name="copyOrbitBundlesToUpdateSite" depends="copyOrbit,copyOrbitSrc">
- </target>
-
- <target name="copyOrbit" if="copyOrbit">
- <copy todir="${orbitDest}/plugins">
- <fileset dir="${buildDirectory}/plugins">
- <include name="org.apache.commons.net_*.jar"/>
- </fileset>
- </copy>
- </target>
-
- <target name="copyOrbitSrc" if="copyOrbitSrc">
- <copy todir="${orbitDest}/plugins">
- <fileset dir="${buildDirectory}/plugins">
- <include name="org.apache.commons.net.source_*.jar"/>
- </fileset>
- </copy>
- </target>
-
- <target name="packageLicenseFiles">
- <copy file="${builder}/template/epl-v10.html" todir="${tmpsite}/new/eclipse"/>
- <copy file="${builder}/template/notice.html" todir="${tmpsite}/new/eclipse"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Place the map files into the "maps" directory, specify version tags -->
- <!-- ===================================================================== -->
- <target name="getMapFiles">
- <copy todir="${buildDirectory}/maps">
- <fileset dir="${builder}/maps" includes="*.map" />
- </copy>
- <replace dir="${buildDirectory}/maps" token="@tag@" value="${mapVersionTag}">
- <include name="*.map"/>
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup" depends="myInit">
- <echo message="builder = ${builder}"/>
- <echo message="builderDirectory = ${builderDirectory}"/>
- <echo message="buildProperties = ${buildProperties}"/>
- <echo message="customTargets = ${customTargets}"/>
- <echo message="genericTargets = ${genericTargets}"/>
- <echo message="buildId = ${buildId}"/>
- <echo message="buildName = ${buildName}"/>
- <echo message="buildType = ${buildType}"/>
- <echo message="buildLabel = ${buildLabel}"/>
- <echo message="tstamp = ${mydstamp}-${mytstamp} of ${dateLong}"/>
- <echo message="archivePrefix = ${archivePrefix}"/>
- <echo message="collectingFolder = ${collectingFolder}"/>
- </target>
-
- <target name="myInit">
- <tstamp>
- <format property="dateLong" pattern="MMM d, yyyy"/>
- </tstamp>
- <property name="messagefile" value="message.in"/>
- <property name="xxmailto" value="dsdp-tm-cvs-commit@eclipse.org"/>
- <property name="mailto" value="martin.oberhuber@windriver.com"/>
- <property name="remotedir" value="moberhuber@dev.eclipse.org:downloads-tm/downloads/drops"/>
- <condition property="doNBuild">
- <equals arg1="${fetchTag}" arg2="HEAD"/>
- </condition>
- <condition property="doUpload">
- <equals arg1="${publishDirectory}" arg2=""/>
- </condition>
- <condition property="doCopy">
- <not><equals arg1="${publishDirectory}" arg2=""/></not>
- </condition>
- <condition property="dropDir" value="${buildType}-${buildId}-${mydstamp}${mytstamp}" else="${buildId}">
- <or>
- <equals arg1="${buildType}" arg2="S"/>
- <equals arg1="${buildType}" arg2="R"/>
- <and>
- <equals arg1="${buildType}" arg2="M"/>
- <not><matches pattern="M[0-9-]*" string="${buildId}"/></not>
- </and>
- <and>
- <equals arg1="${buildType}" arg2="J"/>
- <not><matches pattern="J[0-9-]*" string="${buildId}"/></not>
- </and>
- <and>
- <equals arg1="${buildType}" arg2="K"/>
- <not><matches pattern="K[0-9-]*" string="${buildId}"/></not>
- </and>
- <and>
- <equals arg1="${buildType}" arg2="L"/>
- <not><matches pattern="L[0-9-]*" string="${buildId}"/></not>
- </and>
- </or>
- </condition>
- <property name="buildUpdateSitePath" value="${packageDirectory}/${dropDir}/updates"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetchOrbitBundles" depends="myInit" if="doNBuild">
- <!-- fetch Orbit stuff first in order to ensure we get -->
- <!-- the latest released version even in case of an N-build -->
- <!--
- <ant antfile="${genericTargets}" target="fetchElement">
- <property name="type" value="plugin" />
- <property name="id" value="org.apache.commons.net" />
- </ant>
- -->
- <mkdir dir="${buildDirectory}/plugins"/>
- <eclipse.fetch
- elements="plugin@org.apache.commons.net"
- buildDirectory="${buildDirectory}"
- directory="${buildDirectory}/directory.txt"
- fetchTag=""
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- />
- <!-- Run generated fetch script -->
- <ant antfile="${buildDirectory}/fetch_org.apache.commons.net.xml">
- <property name="featureOnly" value="true"/>
- <property name="featureAndPlugins" value="true"/>
- </ant>
- </target>
-
- <target name="preFetchOrbitSource" depends="myInit">
- <!-- fetch Orbit stuff since I'm not sure how to get sources -->
- <mkdir dir="${buildDirectory}/plugins"/>
- <eclipse.fetch
- elements="plugin@org.apache.commons.net.source"
- buildDirectory="${buildDirectory}"
- directory="${buildDirectory}/directory.txt"
- fetchTag=""
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- />
- <!-- Run generated fetch script -->
- <ant antfile="${buildDirectory}/fetch_org.apache.commons.net.source.xml">
- <property name="featureOnly" value="true"/>
- <property name="featureAndPlugins" value="true"/>
- </ant>
- </target>
-
- <target name="preFetch" depends="preFetchOrbitBundles,preFetchOrbitSource">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating the build scripts. -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts. -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <condition property="buildIdForMappings" value="${buildId} (${mydstamp}-${mytstamp})" else="${buildId}">
- <or>
- <equals arg1="${buildType}" arg2="S"/>
- <equals arg1="${buildType}" arg2="R"/>
- </or>
- </condition>
- <replace dir="${buildDirectory}/plugins" value="${buildIdForMappings}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running assemble. -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
- <antcall target="serverruntime" />
- <antcall target="hideServerStuff" />
- <antcall target="allElements">
- <param name="target" value="gatherSources" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running assemble. -->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- <antcall target="revealServerStuff" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running package. -->
- <!-- ===================================================================== -->
- <target name="prePackage">
- <echo message="builder - all - customTargets.xml - prePackage"/>
- <!-- TODO? -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running package. -->
- <!-- ===================================================================== -->
- <target name="postPackage">
- <echo message="builder - all - customTargets.xml - postPackage"/>
- <!-- TODO? -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the build is done. -->
- <!-- ===================================================================== -->
- <target name="postBuild" depends="myInit">
- <mkdir dir="${packageDirectory}/${dropDir}" />
- <move todir="${packageDirectory}/${dropDir}">
- <fileset dir="${buildDirectory}/${buildLabel}" includes="RSE-*.zip,TM-*.zip"/>
- </move>
- <move todir="${packageDirectory}/${dropDir}">
- <fileset dir="${buildDirectory}/${buildLabel}" includes="rseserver-*"/>
- </move>
- <copy todir="${packageDirectory}/${dropDir}" file="${buildDirectory}/directory.txt"/>
- <!-- Create and analyze the compilelog.txt file -->
- <concat destfile="${packageDirectory}/${dropDir}/compilelog.txt">
- <fileset dir="${buildDirectory}/plugins" includes="**/*.log"/>
- </concat>
- <loadfile property="compileLog" srcFile="${packageDirectory}/${dropDir}/compilelog.txt"/>
- <condition property="hasErrors">
- <contains string="${compileLog}" substring=" ERROR"/>
- </condition>
- <!-- Create the index.php file -->
- <copy todir="${packageDirectory}/${dropDir}">
- <fileset dir="${builder}/template/" includes="*.php,*.gif,package.count"/>
- </copy>
- <condition property="buildTypeLong" value="Private"><equals arg1="${buildType}" arg2="P"/></condition>
- <condition property="buildTypeLong" value="Nightly"><equals arg1="${buildType}" arg2="N"/></condition>
- <condition property="buildTypeLong" value="Integration"><equals arg1="${buildType}" arg2="I"/></condition>
- <condition property="buildTypeLong" value="Stable"><equals arg1="${buildType}" arg2="S"/></condition>
- <condition property="buildTypeLong" value="Release"><equals arg1="${buildType}" arg2="R"/></condition>
- <condition property="buildTypeLong" value="Maintenance"><equals arg1="${buildType}" arg2="J"/></condition>
- <condition property="buildTypeLong" value="Maintenance"><equals arg1="${buildType}" arg2="M"/></condition>
- <condition property="buildTypeLong" value="Legacy"><equals arg1="${buildType}" arg2="K"/></condition>
- <condition property="buildTypeLong" value="Legacy"><equals arg1="${buildType}" arg2="L"/></condition>
- <replace file="${packageDirectory}/${dropDir}/index.php">
- <replacefilter token="@buildTypeLong@" value="${buildTypeLong}"/>
- <replacefilter token="@dateLong@" value="${dateLong}"/>
- <replacefilter token="@dropDir@" value="${dropDir}"/>
- <replacefilter token="@buildId@" value="${buildId}"/>
- </replace>
- <replace file="${packageDirectory}/${dropDir}/buildNotes.php">
- <replacefilter token="@dateLong@" value="${dateLong}"/>
- <replacefilter token="@buildId@" value="${buildId}"/>
- </replace>
- <antcall target="publish"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do to test the build results -->
- <!-- ===================================================================== -->
- <target name="test">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do to publish the build results -->
- <!-- ===================================================================== -->
- <target name="publish" if="doPublish">
- <antcall target="publishCopy"/>
- <antcall target="publishUpload"/>
- <antcall target="mail"/>
- </target>
-
- <target name="publishCopy" depends="myInit" if="doCopy" unless="hasErrors">
- <mkdir dir="${publishDirectory}/${dropDir}" />
- <copy todir="${publishDirectory}/${dropDir}">
- <fileset dir="${packageDirectory}/${dropDir}" includes="*.zip,*.tar,*.php,*.txt,*.gif,package.count" />
- </copy>
- </target>
-
- <target name="publishUpload" depends="myInit" if="doUpload" unless="hasErrors">
- <exec dir="${packageDirectory}" executable="scp">
- <arg line="-r ${dropDir} ${remotedir}"/>
- </exec>
- </target>
-
- <target name="mail" depends="myInit">
- <antcall target="mailPass"/>
- <antcall target="mailFail"/>
- </target>
-
- <target name="mailPass" unless="hasErrors">
- <copy file="${builder}/${messagefile}" tofile="${buildDirectory}/message.txt" overwrite="true"/>
- <replace file="${buildDirectory}/message.txt">
- <replacefilter token="@dropDir@" value="${dropDir}"/>
- </replace>
- <mail subject="RSE Build ${buildId} completed"
- tolist="${mailto}" from="martin.oberhuber@windriver.com">
- <message src="${buildDirectory}/message.txt"/>
- </mail>
- </target>
-
- <target name="mailFail" if="hasErrors">
- <mail subject="RSE Build ${buildId} failed"
- tolist="${mailto}" from="martin.oberhuber@windriver.com">
- <message src="${packageDirectory}/${dropDir}/compilelog.txt"/>
- </mail>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
- <!-- =====================================================================
- Specialized targets to build the server runtime.
- ===================================================================== -->
-
- <target name="serverruntime">
-
- <property name="working" value="${buildDirectory}/${buildLabel}/rseserver"/>
- <mkdir dir="${working}" />
- <mkdir dir="${working}/jars" />
-
- <copy todir="${working}">
- <fileset dir="${buildDirectory}/plugins/org.eclipse.rse.services.dstore/serverruntime" includes="**" />
- </copy>
-
- <copy todir="${working}/jars">
- <fileset dir="${buildDirectory}/plugins/org.eclipse.dstore.core" includes="dstore_core.jar" />
- <fileset dir="${buildDirectory}/plugins/org.eclipse.dstore.extra" includes="dstore_extra_server.jar" />
- <fileset dir="${buildDirectory}/plugins/org.eclipse.rse.services" includes="clientserver.jar" />
- <fileset dir="${buildDirectory}/plugins/org.eclipse.rse.services.dstore" includes="dstore_miners.jar" />
- </copy>
-
- <antcall target="rseserver-os-tar">
- <param name="os" value="unix"/>
- <param name="eol" value="lf"/>
- </antcall>
- <antcall target="rseserver-os-tar">
- <param name="os" value="macosx"/>
- <param name="eol" value="lf"/>
- </antcall>
- <antcall target="rseserver-os-tar">
- <param name="os" value="linux"/>
- <param name="eol" value="lf"/>
- </antcall>
- <antcall target="rseserver-os-zip">
- <param name="os" value="windows"/>
- <param name="eol" value="crlf"/>
- </antcall>
-
- <delete dir="${working}" />
-
- </target>
-
- <target name="rseserver-os-tar" depends="rseserver-os-collect">
- <tar destfile="${buildDirectory}/${buildLabel}/rseserver-${buildId}-${os}.tar">
- <tarfileset dir="${working}/collector" mode="755" includes="*.pl,*.sh" />
- <tarfileset dir="${working}/collector" mode="644" excludes="*.pl,*.sh" />
- </tar>
- <delete dir="${working}/collector" />
- </target>
- <target name="rseserver-os-zip" depends="rseserver-os-collect">
- <zip destfile="${buildDirectory}/${buildLabel}/rseserver-${buildId}-${os}.zip" basedir="${working}/collector" includes="*"/>
- <delete dir="${working}/collector" />
- </target>
-
- <target name="rseserver-os-collect">
- <mkdir dir="${working}/collector" />
- <copy todir="${working}/collector">
- <fileset dir="${working}/scripts/${os}" includes="*"/>
- <fileset dir="${working}/data" includes="*"/>
- </copy>
- <replace file="${working}/collector/build.dat">
- <replacefilter token="@build@" value="${buildId}"/>
- <replacefilter token="@version@" value="${mapVersionTag}"/>
- </replace>
- <fixcrlf srcdir="${working}/collector" eol="${eol}" eof="asis" includes="*"/>
- <copy todir="${working}/collector">
- <fileset dir="${working}/jars" includes="*"/>
- <fileset dir="${builder}/template" includes="notice.html,epl-v10.html" />
- </copy>
- </target>
-
- <!-- =====================================================================
- Specialized targets hide/reveal the server stuff so it doesn't get packaged
- in the client.
- ===================================================================== -->
-
- <target name="hideServerStuff">
- <mkdir dir="${buildDirectory}/hidden"/>
- <move todir="${buildDirectory}/hidden">
- <fileset dir="${buildDirectory}/plugins">
- <include name="**/clientserver.jar"/>
- <include name="**/dstore_core.jar"/>
- <include name="**/dstore_extra_server.jar"/>
- <include name="**/dstore_miners.jar"/>
- <include name="**/clientserversrc.zip"/>
- <include name="**/dstore_coresrc.zip"/>
- <include name="**/dstore_extra_serversrc.zip"/>
- <include name="**/dstore_minerssrc.zip"/>
- </fileset>
- </move>
- </target>
-
- <target name="revealServerStuff">
- <move todir="${buildDirectory}/plugins">
- <fileset dir="${buildDirectory}/hidden" includes="**" />
- </move>
- <delete dir="${buildDirectory}/hidden"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Zip the docs -->
- <!-- ===================================================================== -->
- <target name="zipDoc">
- <zip destfile="${buildDirectory}\plugins\${docPluginID}\doc.zip" filesonly="false" defaultexcludes="true">
- <fileset dir="${buildDirectory}\plugins\${docPluginID}" defaultexcludes="true">
- <include name="**/*.gif" />
- <include name="**/*.html" />
- <include name="**/*.htm" />
- <include name="**/*.GIF" />
- <include name="**/*.HTML" />
- <include name="**/*.HTM" />
- <include name="**/*.css" />
- </fileset>
- </zip>
- </target>
-
-</project>
diff --git a/releng/org.eclipse.rse.build/downloads/.cvsignore b/releng/org.eclipse.rse.build/downloads/.cvsignore
deleted file mode 100644
index a17291e0f..000000000
--- a/releng/org.eclipse.rse.build/downloads/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-drops
diff --git a/releng/org.eclipse.rse.build/downloads/build_types.html b/releng/org.eclipse.rse.build/downloads/build_types.html
deleted file mode 100644
index 759069c19..000000000
--- a/releng/org.eclipse.rse.build/downloads/build_types.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<title>Eclipse Corner</title>
-<link rel="stylesheet" href="http://www.eclipse.org/default_style.css">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body text="#000000" bgcolor="#ffffff" link="#0000ee" vlink="#551a8b" alink="#ff0000">
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
- <tr>
- <td align=left valign=top colspan="2" bgcolor="#0080c0"><b><font face="Arial,Helvetica" color="#ffffff">Eclipse
- Project Build Types</font></b></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td>
- <p><b><font face="arial,helvetica,geneva" size="-1">R - Releases</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva">Releases are builds
- that have been declared major releases by the development team - for example
- &quot;R1.0&quot;. Releases are the right builds for people who want to
- be on a stable, tested release, and don't need the latest greatest features
- and improvements. Release builds always have an &quot;R&quot; at the beginning
- of the name i.e. R1.0, R2.0 etc. Non-release builds are named according to the
- date of the build - for example 20060427 is the build from April 27, 2006.</font><br>
- </p>
- </td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">S - Stable Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Stable builds are integration
- builds that have been found to be stable enough for most people to use.
- They are promoted from integration build to stable build by the architecture
- team after they have been used for a few days and deemed reasonably stable.
- The latest stable build is the right build for people who want to stay up
- to date with what is going on in the latest development stream, and don't
- mind putting up with a few problems n in order to get the latest greatest
- features and bug fixes. The latest stable build is the one the development
- team likes people to be using, because of the valuable and timely feedback.
- </font></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td>
- <p><b><font face="arial,helvetica,geneva" size="-1">I - Integration Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Periodically, component
- teams version off their work in what they believe is a stable, consistent
- state, and they update the build configuration to indicate that the next
- integration build should take this version of the component. Integration
- builds are built from these stable component versions that have been specified
- by each component team as the best version available. Integration builds
- may be promoted to stable builds after a few days of testing. Integration
- builds are built whenever new stable component versions are released into
- the build.</font></p>
- </td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">N - Nightly Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Nightly builds are produced
- every night from whatever has been released into the HEAD stream of the
- CVS repository. They are completely untested and will almost always have
- major problems. Many will not work at all. These drops are normally only
- useful to developers actually working on the Eclipse Project.</font></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">J,M - Maintenance Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Maintenance builds are produced
- periodically to incorporate fixes into an existing release. They are typically
- built from tagged plug-in and feature pojects in a maintenance stream of the CVS
- repository (i.e. R1_0_maintenance). Maintenance builds are promoted to a minor
- or service release (i.e. R1.1 or R1.0.1) after development teams have deemed one
- to be stable following one or more test-fix pass cycles.</font></td>
- </tr>
- <tr>
- <td align=right valign=top><img src="http://www.eclipse.org/images/Adarrow.gif" border=0 height=16 width=16></td>
- <td><b><font face="arial,helvetica,geneva" size="-1">K,L - Legacy Builds</font></b>
- <br>
- <font size="-1" face="arial,helvetica,geneva"> Legacy builds are maintenance builds
- for some older release, after the usual service releases (n.n.2 release).
- Legacy builds do not intend to culminate into any release, and are produced for
- escalated fixes only on request. Typically, companies requesting a legacy build
- need to contribute the resources for doing that build themselves.</font></td>
- </tr>
-</table>
-<h3>&nbsp;</h3>
-</body>
-</html>
diff --git a/releng/org.eclipse.rse.build/downloads/dlconfig.txt b/releng/org.eclipse.rse.build/downloads/dlconfig.txt
deleted file mode 100644
index acc7e5570..000000000
--- a/releng/org.eclipse.rse.build/downloads/dlconfig.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-dropPrefix[]=R&dropPrefix[]=S&dropPrefix[]=I&dropPrefix[]=N&dropPrefix[]=J&dropPrefix[]=M&dropPrefix[]=L&
-dropType[]=Latest Release&dropType[]=3.2 Stream Stable Build&dropType[]=3.2 Stream Integration Build&dropType[]=3.2 Stream Nightly Build&dropType[]=3.1.x Stream Maintenance Build&dropType[]=3.0.x Stream Maintenance Build&dropType[]=3.0.x Stream Legacy Build&
diff --git a/releng/org.eclipse.rse.build/downloads/index.php b/releng/org.eclipse.rse.build/downloads/index.php
deleted file mode 100644
index 5e2117d4d..000000000
--- a/releng/org.eclipse.rse.build/downloads/index.php
+++ /dev/null
@@ -1,242 +0,0 @@
-<html><head>
-<link rel="stylesheet" href="http://www.eclipse.org/default_style.css">
-<title>Target Management Project RSE Downloads</title></head>
-<body>
-
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
- <tr>
- <td align=left width="72%"> <font class=indextop>Target Management project<br/>RSE downloads</font>
- <br>
- <font class=indexsub>latest downloads from the dsdp-tm project</font><br>
-</td>
- <td width="28%"><img src="http://www.eclipse.org/images/Idea.jpg" height=86 width=120></td>
- </tr>
-
-</table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
-
- <tr>
- <td align=LEFT valign=TOP colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Download Information</font></b></td>
- </tr>
-
- <tr> <td> <p>On this
-page you can find the latest
-<a href="build_types.html">builds</a> for the Remote System Explorer (RSE),
-provided by the
-<a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> project.
-<!--
-To get started run the program and go through the
-user and developer documentation provided in the online help system.
--->
-To get started, see the build notes provided with each drop, run the
-program and go through the online user and developer documentation,
-or take a look at the project's online
-<a href="http://www.eclipse.org/dsdp/tm/tutorial/index.php">getting started</a>
-pages.
-
-If you have problems downloading the drops, contact the
-<font face="arial,helvetica,geneva" size="-1"><a href="mailto:webmaster@eclipse.org">webmaster</a></font>.
-If you have problems installing or getting the workbench to run,
-check out the
-<a href="http://wiki.eclipse.org/TM_and_RSE_FAQ">Target Management FAQ</a>,
-or try posting a question to the
-<a href="http://www.eclipse.org/newsgroups">newsgroup</a>,
-<a href="news://news.eclipse.org/eclipse.dsdp.tm">eclipse.dsdp.tm</a>.
-All downloads are provided under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/epl/notice.php">Eclipse.org
-Software User Agreement</a> unless otherwise specified. </p>
-
-<p>
-<b>Other eclipse.org project</b> downloads are available
-<a href="http://www.eclipse.org/downloads/index.php">here</a>.<br/>
-If you just want the latest drops (no dstore server), you can also get them from the
-<a href="http://download.eclipse.org/dsdp/tm/updates/3.0">TM 3.0 update site</a>.</p>
-
-<p>
-For information about different kinds of builds look
-<a href="build_types.html" target="_top">here</a>.
-
-<img src="http://www.eclipse.org/images/new.gif">
-For access to archived builds, look
-<a href="http://archive.eclipse.org/dsdp/tm/downloads/index.php" target="_top">here</a>.
-</p>
-
-<p/>
-<!--
-<p>Builds can also be installed via Update Manager, from an existing installation of Eclipse, by following these
-<a href="http://download.eclipse.org/dsdp/tm/downloads/updates/index.php" target="_self">steps</a>.
-</p>
--->
-</td></tr>
-
- <tr>
- <td align=LEFT valign=TOP colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Latest
- Downloads</font></b></td>
- </tr>
- </table>
- <?php
- $fileHandle = fopen("dlconfig.txt", "r");
- while (!feof($fileHandle)) {
- $aLine = fgets($fileHandle, 4096);
- parse_str($aLine);
- }
- fclose($fileHandle);
-
- for ($i = 0; $i < count($dropType); $i++) {
- $typeToPrefix[$dropType[$i]] = $dropPrefix[$i];
- }
-
- $aDirectory = dir("drops");
- while ($anEntry = $aDirectory->read()) {
-
- // Short cut because we know aDirectory only contains other directories.
- if ($anEntry != "." && $anEntry!="..") {
- $aDropDirectory = dir("drops/".$anEntry);
- $fileCount = 0;
- while ($aDropEntry = $aDropDirectory->read()) {
- if (stristr($aDropEntry, ".zip") || stristr($aDropEntry, ".tar")) {
- // Count the files in the directory
- $fileCount = $fileCount + 1;
- }
- }
- //See http://at2.php.net/manual/en/class.dir.php
- $aDropDirectory->close();
- // Read the count file
- $countFile = "drops/".$anEntry."/package.count";
- $indexFile = "drops/".$anEntry."/index.php";
- if (file_exists($countFile) && file_exists($indexFile)) {
- $anArray = file($countFile);
-
- // If a match - process the directory
- if ($anArray[0] == $fileCount) {
- $parts = explode("-", $anEntry);
- if (count($parts) == 2) {
-
- //N-builds and I-builds
- $datePart = $parts[0];
- $timePart = $parts[1];
- $buildtype = substr($datePart, 0, 1);
- $buckets[$buildtype][] = $anEntry;
-
- $year = substr($datePart, 1, 4);
- $month = substr($datePart, 5, 2);
- $day = substr($datePart, 7, 2);
- $hour = substr($timePart,0,2);
- $minute = substr($timePart,2,2);
- $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
-
- $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
-
- if ($timeStamp > $latestTimeStamp[$buildtype]) {
- $latestTimeStamp[$buildtype] = $timeStamp;
- $latestFile[$buildtype] = $anEntry;
- }
-
- } else if (count($parts) == 3) {
-
- //S-builds and R-builds
- $buckets[$parts[0]][] = $anEntry;
-
- $timePart = $parts[2];
- $year = substr($timePart, 0, 4);
- $month = substr($timePart, 4, 2);
- $day = substr($timePart, 6, 2);
- $hour = substr($timePart,8,2);
- $minute = substr($timePart,10,2);
- $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
-
- $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
-
- if ($timeStamp > $latestTimeStamp[$parts[0]]) {
- $latestTimeStamp[$parts[0]] = $timeStamp;
- $latestFile[$parts[0]] = $anEntry;
- }
- }
- }
- }
- }
- }
- $aDirectory->close();
- ?>
-
-<table width="100%" cellspacing=0 cellpadding=3 align=center>
-<td align=left>
-<TABLE width="100%" CELLSPACING=0 CELLPADDING=3>
-<tr>
- <td width=\"30%\"><b>Build Type</b></td>
- <td><b>Build Name</b></td>
- <td><b>Build Date</b></td>
-</tr>
-
-<?php
- foreach($dropType as $value) {
- $prefix=$typeToPrefix[$value];
- $fileName = $latestFile[$prefix];
- echo "<tr>
- <td width=\"30%\">$value</td>";
-
- $parts = explode("-", $fileName);
- if (count($parts) == 2) {
- $buildName=$fileName;
- } else {
- $buildName=$parts[1];
- }
-
- // Uncomment the line below if we need click through licenses.
- // echo "<td><a href=license.php?license=drops/$fileName>$buildName</a></td>";
-
- // Comment the line below if we need click through licenses.
- echo "<td><a href=\"drops/$fileName/index.php\">$buildName</a></td>";
-
- echo "<td>$timeStamps[$fileName]</td>";
- echo "</tr>";
- }
-?>
-</table>
-</table>
-&nbsp;
-<?php
- foreach($dropType as $value) {
- $prefix=$typeToPrefix[$value];
- echo "
- <table width=\"100%\" cellspacing=0 cellpadding=3 align=center>
- <tr bgcolor=\"#999999\">
- <td align=left width=\"30%\"><b><a name=\"$value\"><font color=\"#FFFFFF\" face=\"Arial,Helvetica\">$value";
- echo "s</font></b></a></td>
- </TR>
- <TR>
- <td align=left>
- <TABLE width=\"100%\" CELLSPACING=0 CELLPADDING=3>
- <tr>
- <td width=\"30%\"><b>Build Name</b></td>
- <td><b>Build Date</b></td>
- </tr>";
-
- $aBucket = $buckets[$prefix];
- if (isset($aBucket)) {
- rsort($aBucket);
- foreach($aBucket as $innerValue) {
- $parts = explode("-", $innerValue);
- if (count($parts) == 2) {
- $buildName=$innerValue;
- } else {
- $buildName=$parts[1];
- }
- echo "<tr>";
-
- // Uncomment the line below if we need click through licenses.
- // echo "<td><a href=\"license.php?license=drops/$innerValue\">$buildName</a></td>";
-
- // Comment the line below if we need click through licenses.
- echo "<td><a href=\"drops/$innerValue/index.php\">$buildName</a></td>";
-
- echo "<td>$timeStamps[$innerValue]</td>
- </tr>";
- }
- }
- echo "</table></table>&nbsp;";
- }
-?>
-
-&nbsp;
-</body></html>
diff --git a/releng/org.eclipse.rse.build/fetchBuilder.pl b/releng/org.eclipse.rse.build/fetchBuilder.pl
deleted file mode 100755
index 399661b03..000000000
--- a/releng/org.eclipse.rse.build/fetchBuilder.pl
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/perl
-#*******************************************************************************
-# 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 API and implementation
-# Martin Oberhuber (Wind River) - ongoing maintenance
-#*******************************************************************************
-use warnings;
-
-print STDERR "Which tag do you want to fetch? (default is HEAD): ";
-$answer = <STDIN>;
-chomp($answer);
-$tag = $answer ? $answer : "HEAD";
-
-$incantation = "cvs ";
-$incantation .= '-d :pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp ';
-$incantation .= "checkout ";
-$incantation .= "-r ${tag} ";
-$incantation .= "-d builder ";
-$incantation .= "org.eclipse.tm.rse/releng/org.eclipse.rse.build ";
-
-print($incantation);
-system($incantation);
-
-print("\n");
-print("Builder has been fetched and is in the builder subdirectory\n");
diff --git a/releng/org.eclipse.rse.build/go.sh b/releng/org.eclipse.rse.build/go.sh
deleted file mode 100755
index d5a69faee..000000000
--- a/releng/org.eclipse.rse.build/go.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-# go.sh -- build script like nightly build but for testing stuff without
-# fetch in a local workspace
-#
-# Prerequisites:
-# - Eclipse 3.2 installed or linked from ../eclipse
-# - org.eclipse.releng.basebuilder checked out to ../org.eclipse.releng.basebuilder
-#
-#author: martin oberhuber
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-
-# pathes: see build.rb for reference
-cd "$mydir/../eclipse" ; eclipse=`pwd`
-cd "$mydir/../org.eclipse.releng.basebuilder" ; basebuilder=`pwd`
-cd "$mydir/../working" ; working=`pwd`
-cd "$mydir/../publish" ; publishDirectory=`pwd`
-cd "$mydir" ; builder=`pwd`
-
-# Find the base build scripts: genericTargets.xml and build.xml
-pdeBuild="${basebuilder}/plugins/org.eclipse.pde.build"
-buildDirectory="${working}/build"
-packageDirectory="${working}/package"
-
-tag="HEAD"
-buildType="N"
-mydstamp=`date +'%Y%m%d'`
-mytstamp=`date +'%H%M'`
-timestamp="${mydstamp}-${mytstamp}"
-buildId="${buildType}${timestamp}"
-rm -rf "${buildDirectory}"
-
-# default value of the bootclasspath attribute used in ant javac calls.
-# these pathes are valid on build.eclipse.org
-bootclasspath="/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/rt.jar:/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/jsse.jar"
-bootclasspath_15="/shared/common/jdk-1.5.0_16/jre/lib/rt.jar"
-#bootclasspath_16="$builderDir/jdk/win32_16/jdk6/jre/lib/rt.jar"
-#bootclasspath_foundation="/shared/common/Java_ME_platform_SDK_3.0_EA/runtimes/cdc-hi/lib/rt.jar"
-bootclasspath_foundation11="/shared/dsdp/JDKs/win32/j9_cdc11/lib/jclFoundation11/classes.zip"
-
-command="java -cp ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar org.eclipse.core.launcher.Main "
-command="$command -application org.eclipse.ant.core.antRunner "
-command="$command -buildfile ${pdeBuild}/scripts/build.xml "
-command="$command -DbuildDirectory=${buildDirectory} "
-command="$command -DpackageDirectory=${packageDirectory} "
-command="$command -DpublishDirectory=${publishDirectory} "
-command="$command -Dbuilder=${builder} "
-command="$command -DbaseLocation=${eclipse} "
-command="$command -DbuildType=${buildType} "
-command="$command -DbuildId=${buildId} "
-command="$command -DmapVersionTag=${tag} "
-command="$command -DdoPublish=true "
-command="$command -DforceContextQualifier=${buildId} "
-command="$command -DfetchTag=HEAD "
-command="$command -DskipFetch "
-command="$command -Dmydstamp=${mydstamp} "
-command="$command -Dmytstamp=${mytstamp} "
-#command="$command -Dbootclasspath=${bootclasspath} "
-#command="$command -DJ2SE-1.4=${bootclasspath} "
-#command="$command -DJ2SE-1.5=${bootclasspath_15} "
-#command="$command -DCDC-1.1/Foundation-1.1=${bootclasspath_foundation11} "
-#command="$command -DJ2SE-1.2=../jres/1.2.2/lib/rt.jar "
-#command="$command postBuild "
-
-echo "$command"
-exec $command
diff --git a/releng/org.eclipse.rse.build/maps/discovery.map b/releng/org.eclipse.rse.build/maps/discovery.map
deleted file mode 100644
index c3ec4c7a6..000000000
--- a/releng/org.eclipse.rse.build/maps/discovery.map
+++ /dev/null
@@ -1,10 +0,0 @@
-feature@org.eclipse.tm.discovery=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery-feature
-plugin@org.eclipse.rse.discovery=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.rse.discovery
-plugin@org.eclipse.tm.discovery.doc.isv=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.doc.isv
-plugin@org.eclipse.tm.discovery.engine=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.engine
-plugin@org.eclipse.tm.discovery.model=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.model
-plugin@org.eclipse.tm.discovery.model.edit=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.model.edit
-plugin@org.eclipse.tm.discovery.protocol.dnssd=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.protocol.dnssd
-plugin@org.eclipse.tm.discovery.transport.udp=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.transport.udp
-plugin@org.eclipse.tm.discovery.view=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.view
-plugin@org.eclipse.tm.discovery.wizard=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.wizard \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/maps/rse.map b/releng/org.eclipse.rse.build/maps/rse.map
deleted file mode 100644
index a4d7c3c07..000000000
--- a/releng/org.eclipse.rse.build/maps/rse.map
+++ /dev/null
@@ -1,64 +0,0 @@
-!*************** PROJECT CONTRIBUTION ********************************************************
-!*** Project's plugins, features and fragments
-feature@org.eclipse.rse=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse-feature
-feature@org.eclipse.rse.core=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
-feature@org.eclipse.rse.dstore=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
-feature@org.eclipse.rse.examples=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
-feature@org.eclipse.rse.ftp=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
-feature@org.eclipse.rse.local=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
-feature@org.eclipse.rse.sdk=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
-feature@org.eclipse.rse.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
-feature@org.eclipse.rse.telnet=v200908051630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.telnet-feature
-feature@org.eclipse.rse.terminals=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.terminals-feature
-feature@org.eclipse.rse.tests=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests-feature
-feature@org.eclipse.rse.useractions=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions-feature
-!!feature@org.eclipse.rse.useractions.wrapper=v20080609a,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions.wrapper-feature
-!!feature@org.eclipse.tm.releng.master=v20080609,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/releng/org.eclipse.tm.releng.master-feature
-plugin@org.eclipse.dstore.core=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
-plugin@org.eclipse.dstore.doc.isv=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.dstore.doc.isv
-plugin@org.eclipse.dstore.extra=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.extra
-plugin@org.eclipse.rse=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse
-plugin@org.eclipse.rse.connectorservice.dstore=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.dstore
-plugin@org.eclipse.rse.connectorservice.local=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.local
-plugin@org.eclipse.rse.connectorservice.ssh=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.ssh
-plugin@org.eclipse.rse.connectorservice.telnet=v200908051630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.telnet
-plugin@org.eclipse.rse.core=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.core
-plugin@org.eclipse.rse.doc.isv=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.isv
-plugin@org.eclipse.rse.doc.user=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.user
-plugin@org.eclipse.rse.dstore.security=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.dstore.security
-plugin@org.eclipse.rse.efs=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs
-plugin@org.eclipse.rse.efs.ui=v200907301550,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs.ui
-plugin@org.eclipse.rse.examples.daytime=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples.daytime
-plugin@org.eclipse.rse.examples.tutorial=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples.tutorial
-plugin@org.eclipse.rse.files.ui=v200908061445,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui
-plugin@org.eclipse.rse.importexport=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.importexport
-plugin@org.eclipse.rse.processes.ui=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
-plugin@org.eclipse.rse.sdk=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
-plugin@org.eclipse.rse.services.dstore=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
-plugin@org.eclipse.rse.services.files.ftp=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
-plugin@org.eclipse.rse.services.local=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
-plugin@org.eclipse.rse.services.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
-plugin@org.eclipse.rse.services.telnet=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
-plugin@org.eclipse.rse.services=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
-plugin@org.eclipse.rse.shells.ui=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui
-plugin@org.eclipse.rse.subsystems.files.core=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.core
-plugin@org.eclipse.rse.subsystems.files.dstore=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.dstore
-plugin@org.eclipse.rse.subsystems.files.ftp=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.ftp
-plugin@org.eclipse.rse.subsystems.files.local=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.local
-plugin@org.eclipse.rse.subsystems.files.ssh=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.ssh
-plugin@org.eclipse.rse.subsystems.processes.core=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.core
-plugin@org.eclipse.rse.subsystems.processes.dstore=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.dstore
-plugin@org.eclipse.rse.subsystems.processes.local=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.local
-plugin@org.eclipse.rse.subsystems.processes.shell.linux=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux
-plugin@org.eclipse.rse.subsystems.shells.core=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.core
-plugin@org.eclipse.rse.subsystems.shells.dstore=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.dstore
-plugin@org.eclipse.rse.subsystems.shells.local=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.local
-plugin@org.eclipse.rse.subsystems.shells.ssh=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.ssh
-plugin@org.eclipse.rse.subsystems.shells.telnet=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.telnet
-plugin@org.eclipse.rse.subsystems.terminals.core=v200908051630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.terminals.core
-plugin@org.eclipse.rse.subsystems.terminals.ssh=v200908051630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.terminals.ssh
-plugin@org.eclipse.rse.terminals.ui=v200908061445,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.terminals.ui
-plugin@org.eclipse.rse.tests=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests
-plugin@org.eclipse.rse.tests.framework=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests.framework
-plugin@org.eclipse.rse.ui=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.ui
-plugin@org.eclipse.rse.useractions=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/maps/terminal.map b/releng/org.eclipse.rse.build/maps/terminal.map
deleted file mode 100644
index b2e52e1d9..000000000
--- a/releng/org.eclipse.rse.build/maps/terminal.map
+++ /dev/null
@@ -1,13 +0,0 @@
-feature@org.eclipse.tm.terminal=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal-feature
-feature@org.eclipse.tm.terminal.sdk=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.sdk-feature
-feature@org.eclipse.tm.terminal.serial=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial-feature
-feature@org.eclipse.tm.terminal.ssh=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh-feature
-feature@org.eclipse.tm.terminal.telnet=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet-feature
-feature@org.eclipse.tm.terminal.test=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test-feature
-feature@org.eclipse.tm.terminal.view=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view-feature
-plugin@org.eclipse.tm.terminal=v200911082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
-plugin@org.eclipse.tm.terminal.serial=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial
-plugin@org.eclipse.tm.terminal.ssh=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh
-plugin@org.eclipse.tm.terminal.telnet=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet
-plugin@org.eclipse.tm.terminal.test=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test
-plugin@org.eclipse.tm.terminal.view=v200907301400,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/maps/testdrivers.map b/releng/org.eclipse.rse.build/maps/testdrivers.map
deleted file mode 100644
index cd8025fde..000000000
--- a/releng/org.eclipse.rse.build/maps/testdrivers.map
+++ /dev/null
@@ -1,6 +0,0 @@
-!*************** PROJECT CONTRIBUTION ********************************************************
-
-!*** Special entries from eclipse
-
-plugin@org.eclipse.test=v20081002,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
-fragment@org.eclipse.ant.optional.junit=v20080717,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
diff --git a/releng/org.eclipse.rse.build/maps/tmcore.map b/releng/org.eclipse.rse.build/maps/tmcore.map
deleted file mode 100644
index 35f635ae7..000000000
--- a/releng/org.eclipse.rse.build/maps/tmcore.map
+++ /dev/null
@@ -1,2 +0,0 @@
-plugin@org.apache.commons.net,2.0.0=GET,http://download.eclipse.org/tools/orbit/downloads/drops/R20090529135407/bundles/org.apache.commons.net_2.0.0.v200905272248.jar
-plugin@org.apache.commons.net.source,2.0.0=GET,http://download.eclipse.org/tools/orbit/downloads/drops/R20090529135407/bundles/org.apache.commons.net.source_2.0.0.v200905272248.jar
diff --git a/releng/org.eclipse.rse.build/maps/wince.map b/releng/org.eclipse.rse.build/maps/wince.map
deleted file mode 100644
index 112198643..000000000
--- a/releng/org.eclipse.rse.build/maps/wince.map
+++ /dev/null
@@ -1,6 +0,0 @@
-feature@org.eclipse.rse.wince=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.wince-feature
-!! feature@org.eclipse.rse.wince.wrapper=v20080609a,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.wince.wrapper-feature
-plugin@org.eclipse.rse.subsystems.wince=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.subsystems.wince
-plugin@org.eclipse.tm.rapi=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.tm.rapi
-plugin@org.eclipse.tm.rapi.examples=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.tm.rapi.examples
-plugin@org.eclipse.tm.rapi.tests=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.tm.rapi.tests \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/message.in b/releng/org.eclipse.rse.build/message.in
deleted file mode 100644
index e807f6032..000000000
--- a/releng/org.eclipse.rse.build/message.in
+++ /dev/null
@@ -1,6 +0,0 @@
-The build is available at
-
- http://download.eclipse.org/dsdp/tm/downloads/drops/@dropDir@
-
-Cheers,
-the RSE nightly build...
diff --git a/releng/org.eclipse.rse.build/monitor.properties b/releng/org.eclipse.rse.build/monitor.properties
deleted file mode 100755
index e6047a91f..000000000
--- a/releng/org.eclipse.rse.build/monitor.properties
+++ /dev/null
@@ -1,29 +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
-###############################################################################
-# properties file used by the class org.eclipse.releng.build.listeners.EclipseBuildListener
-
-#prefix added to subject line of build related email messages
-buildSubjectPrefix=[RSE-build]
-
-#email information for sending build failure notices
-host=localhost
-sender=moberhuber@eclipse.org
-
-#the http Url to Eclipse drop directories
-httpUrl=http://download.eclipse.org/dsdp/tm/downloads/drops
-
-#the ftp Url to Eclipse drop directories
-#ftpUrl=ftp://download.eclipse.org
-
-#use comma separated list for recipients
-#build log name.This file is copied into drop directory until files.count file updated with correct number of zip files
-#additional information added a build time by build shell script
-#buildid, timestamp, buildLabel, email notification list, buildlog location
diff --git a/releng/org.eclipse.rse.build/nightly.sh b/releng/org.eclipse.rse.build/nightly.sh
deleted file mode 100755
index 2eb2abd3f..000000000
--- a/releng/org.eclipse.rse.build/nightly.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-#nightly build for RSE - to be executed on build.eclipse.org
-#
-# Usage:
-# nightly.sh [mapVersionTag] [buildType] [buildId]
-# Examples:
-# nightly.sh HEAD I
-# nightly.sh HEAD S 1.0RC3
-#
-# Prerequisites:
-# - Eclipse 3.2 installed or linked from ../eclipse
-# - org.eclipse.releng.basebuilder checked out to ../org.eclipse.releng.basebuilder
-#
-#author: martin oberhuber
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-
-# pathes: see build.rb for reference
-cd "$mydir/../eclipse" ; eclipse=`pwd`
-cd "$mydir/../org.eclipse.releng.basebuilder" ; basebuilder=`pwd`
-cd "$mydir/../working" ; working=`pwd`
-cd "$mydir/../publish" ; publishDirectory=`pwd`
-cd "$mydir" ; builder=`pwd`
-
-# Find the base build scripts: genericTargets.xml and build.xml
-cd "${basebuilder}/plugins"
-pdeBuild=`ls -d org.eclipse.pde.build* | sort | tail -1`
-cd "${builder}"
-pdeBuild="${basebuilder}/plugins/${pdeBuild}"
-buildDirectory="${working}/build"
-packageDirectory="${working}/package"
-
-tag="HEAD"
-if [ "$1" != "" ]; then
- tag="$1"
-fi
-buildType="N"
-if [ "$2" != "" ]; then
- buildType="$2"
-fi
-mydstamp=`date +'%Y%m%d'`
-mytstamp=`date +'%H%M'`
-timestamp="${mydstamp}-${mytstamp}"
-buildId="${buildType}${timestamp}"
-if [ "$3" != "" ]; then
- buildId="$3"
-fi
-rm -rf "${buildDirectory}"
-
-# default value of the bootclasspath attribute used in ant javac calls.
-# these pathes are valid on build.eclipse.org
-bootclasspath="/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/rt.jar:/shared/dsdp/JDKs/win32/j2sdk1.4.2_19/jre/lib/jsse.jar"
-bootclasspath_15="/shared/common/jdk-1.5.0_16/jre/lib/rt.jar"
-#bootclasspath_16="$builderDir/jdk/win32_16/jdk6/jre/lib/rt.jar"
-#bootclasspath_foundation="/shared/common/Java_ME_platform_SDK_3.0_EA/runtimes/cdc-hi/lib/rt.jar"
-bootclasspath_foundation11="/shared/dsdp/JDKs/win32/j9_cdc11/lib/jclFoundation11/classes.zip"
-
-
-command="java -cp ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar org.eclipse.core.launcher.Main "
-command="$command -application org.eclipse.ant.core.antRunner "
-command="$command -buildfile ${pdeBuild}/scripts/build.xml "
-command="$command -DbuildDirectory=${buildDirectory} "
-command="$command -DpackageDirectory=${packageDirectory} "
-command="$command -DpublishDirectory=${publishDirectory} "
-command="$command -Dbuilder=${builder} "
-command="$command -DbaseLocation=${eclipse} "
-command="$command -DbuildType=${buildType} "
-command="$command -DbuildId=${buildId} "
-command="$command -DmapVersionTag=${tag} "
-command="$command -Dmydstamp=${mydstamp} "
-command="$command -Dmytstamp=${mytstamp} "
-if [ "$buildType" = "N" ]; then
- command="$command -DforceContextQualifier=${buildId} "
- command="$command -DfetchTag=HEAD "
-fi
-command="$command -DdoPublish=true "
-command="$command -Dbootclasspath=${bootclasspath} "
-command="$command -DJ2SE-1.4=${bootclasspath} "
-command="$command -DJ2SE-1.5=${bootclasspath_15} "
-command="$command -DCDC-1.1/Foundation-1.1=${bootclasspath_foundation11} "
-#command="$command postBuild "
-
-echo "$command"
-exec $command
diff --git a/releng/org.eclipse.rse.build/setup.sh b/releng/org.eclipse.rse.build/setup.sh
deleted file mode 100755
index 41f792335..000000000
--- a/releng/org.eclipse.rse.build/setup.sh
+++ /dev/null
@@ -1,245 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-#
-# setup.sh : Set up an environment for building TM / RSE
-# Works on build.eclipse.org -- may need to be adjusted
-# for other hosts.
-#
-# This must be run in $HOME/ws2 in order for the mkTestUpdateSite.sh
-# script to find the published packages
-#
-# Bootstrapping: Get this script by
-# export CVSROOT=:pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp
-# cvs co -r HEAD org.eclipse.tm.rse/releng/org.eclipse.rse.build
-# sh org.eclipse.tm.rse/releng/org.eclipse.rse.build/setup.sh
-#
-# - OR -
-#
-# wget -O setup.sh "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.rse/releng/org.eclipse.rse.build/setup.sh?rev=HEAD&cvsroot=DSDP_Project&content-type=text/plain"
-# sh setup.sh
-# ./doit_ibuild.sh
-# cd testUpdates/bin
-# mkTestUpdates.sh
-
-curdir=`pwd`
-
-uname_s=`uname -s`
-uname_m=`uname -m`
-case ${uname_s}${uname_m} in
- Linuxppc*) ep_arch=linux-gtk-ppc
- cdt_arch=linux.ppc
- ;;
- Linuxx86_64*) ep_arch=linux-gtk-x86_64
- cdt_arch=linux.x86_64
- ;;
- Linuxx86*) ep_arch=linux-gtk
- cdt_arch=linux.x86
- ;;
-esac
-
-# prepare the base Eclipse installation in folder "eclipse"
-ep_rel="S-"
-ep_ver=3.6M3
-ep_date="-200910301201"
-P2_disabled=false
-P2_no_dropins=false
-if [ ! -f eclipse/plugins/org.eclipse.swt_3.6.0.v3617.jar ]; then
- curdir2=`pwd`
- if [ ! -d eclipse -o -h eclipse ]; then
- if [ -d eclipse-${ep_ver}-${ep_arch} ]; then
- rm -rf eclipse-${ep_ver}-${ep_arch}
- fi
- mkdir eclipse-${ep_ver}-${ep_arch}
- cd eclipse-${ep_ver}-${ep_arch}
- else
- rm -rf eclipse
- fi
- # Eclipse SDK: Need the SDK so we can link into docs
- echo "Getting Eclipse SDK..."
- wget "http://download.eclipse.org/eclipse/downloads/drops/${ep_rel}${ep_ver}${ep_date}/eclipse-SDK-${ep_ver}-${ep_arch}.tar.gz"
- tar xfvz eclipse-SDK-${ep_ver}-${ep_arch}.tar.gz
- rm eclipse-SDK-${ep_ver}-${ep_arch}.tar.gz
- if ${P2_disabled} ; then
- # Remove P2 due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=225537
- # See http://wiki.eclipse.org/Equinox_p2_Removal
- rm -rf eclipse/configuration/* eclipse/configuration/.settings
- cp ../eclipse-3.3-linux-gtk-ppc/eclipse/configuration/config.ini eclipse/configuration
- cp -f ../eclipse-3.3-linux-gtk-ppc/eclipse/eclipse.ini eclipse/
- rm -rf eclipse/features/org.eclipse.equinox.p2.user.ui*
- rm -f eclipse/plugins/org.eclipse.equinox.p2.*
- rm -rf eclipse/p2
- # </Remove P2>
- fi
- cd "${curdir2}"
- if [ ! -d eclipse -o -h eclipse ]; then
- if [ -e eclipse ]; then
- rm eclipse
- fi
- ln -s eclipse-${ep_ver}-${ep_arch}/eclipse eclipse
- fi
-fi
-if [ ! -f eclipse/startup.jar ]; then
- curdir2=`pwd`
- cd eclipse/plugins
- if [ -h ../startup.jar ]; then
- rm ../startup.jar
- fi
- LAUNCHER=`ls org.eclipse.equinox.launcher_*.jar | sort | tail -1`
- if [ "${LAUNCHER}" != "" ]; then
- echo "eclipse LAUNCHER=${LAUNCHER}"
- ln -s plugins/${LAUNCHER} ../startup.jar
- else
- echo "Eclipse: NO startup.jar LAUNCHER FOUND!"
- fi
- cd ${curdir2}
-fi
-
-if ${P2_no_dropins} ; then
- #P2 disabled?
- DROPIN=.
- DROPUP=.
-else
- #P2 enabled
- DROPIN=eclipse/dropins
- DROPUP=../..
-fi
-
-# EMF 2.5.0
-EMFBRANCH=2.5.0
-EMFREL=R
-EMFDATE=200906151043
-EMFVER=2.5.0
-if [ ! -f ${DROPIN}/eclipse/plugins/org.eclipse.emf.doc_${EMFBRANCH}.v${EMFDATE}.jar ]; then
- # Need EMF 2.4 SDK for Service Discovery ISV Docs Backlinks
- echo "Getting EMF SDK..."
- cd ${DROPIN}
- wget "http://download.eclipse.org/modeling/emf/emf/downloads/drops/${EMFBRANCH}/${EMFREL}${EMFDATE}/emf-xsd-SDK-${EMFVER}.zip"
- unzip -o emf-xsd-SDK-${EMFVER}.zip
- rm emf-xsd-SDK-${EMFVER}.zip
- cd ${DROPUP}
-fi
-if [ ! -f eclipse/plugins/org.junit_3.8.2.v20090203-1005/junit.jar ]; then
- # Eclipse Test Framework
- echo "Getting Eclipse Test Framework..."
- wget "http://download.eclipse.org/eclipse/downloads/drops/${ep_rel}${ep_ver}${ep_date}/eclipse-test-framework-${ep_ver}.zip"
- unzip -o eclipse-test-framework-${ep_ver}.zip
- rm eclipse-test-framework-${ep_ver}.zip
-fi
-if [ ! -f ${DROPIN}/eclipse/plugins/gnu.io.rxtx_2.1.7.4_v20071016.jar ]; then
- echo "Getting RXTX..."
- cd ${DROPIN}
- wget "http://rxtx.qbang.org/eclipse/downloads/RXTX-SDK-I20071016-1945.zip"
- unzip -o RXTX-SDK-I20071016-1945.zip
- rm RXTX-SDK-I20071016-1945.zip
- cd ${DROPUP}
-fi
-
-# checkout the basebuilder
-baseBuilderTag=R36_M2
-if [ ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.core_3.5.100.v20090911.jar \
- -o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build_3.5.100.v20090911/pdebuild.jar \
- -o ! -f org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.p2.metadata.generator_1.0.200.v20090831.jar ]; then
- if [ -d org.eclipse.releng.basebuilder ]; then
- echo "Re-getting basebuilder from CVS..."
- rm -rf org.eclipse.releng.basebuilder
- else
- echo "Getting basebuilder from CVS..."
- fi
- cvs -Q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co -r ${baseBuilderTag} org.eclipse.releng.basebuilder
-fi
-if [ ! -f org.eclipse.releng.basebuilder/startup.jar ]; then
- curdir2=`pwd`
- cd org.eclipse.releng.basebuilder/plugins
- if [ -h ../startup.jar ]; then
- rm ../startup.jar
- fi
- LAUNCHER=`ls org.eclipse.equinox.launcher*.jar | sort | tail -1`
- if [ "${LAUNCHER}" != "" ]; then
- echo "basebuilder: LAUNCHER=${LAUNCHER}"
- ln -s plugins/${LAUNCHER} ../startup.jar
- else
- echo "basebuilder: NO LAUNCHER FOUND"
- fi
- cd ${curdir2}
-fi
-
-# checkout the RSE builder
-if [ -f org.eclipse.rse.build/CVS/Entries ]; then
- echo "Updating org.eclipse.rse.build from CVS"
- cd org.eclipse.rse.build
- cvs -q update -dPR
- cd ..
-else
- if [ -d org.eclipse.rse.build ]; then
- echo "Re-getting org.eclipse.rse.build from CVS"
- rm -rf org.eclipse.rse.build
- else
- echo "Getting org.eclipse.rse.build from CVS"
- fi
- cvs -q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp co -Rd org.eclipse.rse.build org.eclipse.tm.rse/releng/org.eclipse.rse.build
-fi
-
-# prepare directories for the build
-echo "Preparing directories and symbolic links..."
-if [ ! -d working/package ]; then
- mkdir -p working/package
-fi
-if [ ! -d working/build ]; then
- mkdir -p working/build
-fi
-if [ ! -d publish ]; then
- D=/home/data/httpd/download.eclipse.org/dsdp/tm/downloads/drops
- if [ -d ${D} ]; then ln -s ${D} publish; else mkdir publish; fi
-fi
-if [ ! -d testUpdates ]; then
- D=/home/data/httpd/download.eclipse.org/dsdp/tm/testUpdates
- if [ -d ${D} ]; then ln -s ${D} testUpdates; else mkdir testUpdates; fi
-fi
-if [ ! -d updates ]; then
- D=/home/data/httpd/download.eclipse.org/dsdp/tm/updates
- if [ -d ${D} ]; then ln -s ${D} updates; else mkdir updates; fi
-fi
-if [ ! -d staging ]; then
- D=/home/data/httpd/download-staging.priv/dsdp/tm
- if [ -d ${D} ]; then ln -s ${D} staging; else mkdir staging; fi
-fi
-
-# create symlinks as needed
-if [ ! -h doit_irsbuild.sh ]; then
- ln -s org.eclipse.rse.build/bin/doit_irsbuild.sh .
-fi
-if [ ! -h doit_nightly.sh ]; then
- ln -s org.eclipse.rse.build/bin/doit_nightly.sh .
-fi
-if [ ! -h setup.sh ]; then
- if [ -f setup.sh ]; then rm -f setup.sh; fi
- ln -s org.eclipse.rse.build/setup.sh .
-fi
-chmod a+x doit_irsbuild.sh doit_nightly.sh
-cd org.eclipse.rse.build
-chmod a+x build.pl build.rb go.sh nightly.sh setup.sh
-cd ..
-
-echo "Your build environment is now created."
-echo ""
-echo "Run \"./doit_irsbuild.sh I\" to create an I-build."
-echo ""
-echo "Test the testUpdates, then copy them to updates:"
-echo "cd updates"
-echo "rm -rf plugins features"
-echo "cp -R ../testUpdates/plugins ."
-echo "cp -R ../testUpdates/features ."
-echo "cd bin"
-echo "cvs update"
-echo "./mkTestUpdates.sh"
-
-exit 0
diff --git a/releng/org.eclipse.rse.build/template/.cvsignore b/releng/org.eclipse.rse.build/template/.cvsignore
deleted file mode 100644
index cba5080f0..000000000
--- a/releng/org.eclipse.rse.build/template/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-buildNotes.php.html
-index.php.html
diff --git a/releng/org.eclipse.rse.build/template/FAIL.gif b/releng/org.eclipse.rse.build/template/FAIL.gif
deleted file mode 100755
index 28bba6610..000000000
--- a/releng/org.eclipse.rse.build/template/FAIL.gif
+++ /dev/null
Binary files differ
diff --git a/releng/org.eclipse.rse.build/template/OK.gif b/releng/org.eclipse.rse.build/template/OK.gif
deleted file mode 100755
index 689e5234f..000000000
--- a/releng/org.eclipse.rse.build/template/OK.gif
+++ /dev/null
Binary files differ
diff --git a/releng/org.eclipse.rse.build/template/buildNotes.php b/releng/org.eclipse.rse.build/template/buildNotes.php
deleted file mode 100755
index 098988890..000000000
--- a/releng/org.eclipse.rse.build/template/buildNotes.php
+++ /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=iso-8859-1">
-<link rel="stylesheet" href="http://www.eclipse.org/default_style.css" type="text/css">
-<title>Build Notes for TM @buildId@</title>
-</head>
-
-<body>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" width="80%">
- <p><b><font class=indextop>Build Notes for TM @buildId@</font></b><br>
- @dateLong@ </p>
- </td>
- </tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">New and Noteworthy</font></b></td>
- </tr>
-</table>
-<table><tbody><tr><td>
-<ul>
-<li>TM @buildId@ <b>requires Eclipse 3.4 or later</b>.
- <b>Import/Export, Telnet and FTP require Java 1.5</b>, the rest of
- RSE runs on Java 1.4.
- Platform Runtime is the minimum requirement for core RSE and Terminal.
- Discovery needs EMF.</li>
-<li>Highlights of Bugs fixed since <a href="http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.1.1-200909160905/index.php">TM 3.1.1</a>:
-<ul>
- <li>A regression in the Terminal widget was fixed, which made initial output after login
- invisible above the initial viewport
- [<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294327">294327</a>].</li>
-</ul>
-</li>
-<li>At least 6 bugs were resolved: Use
- <!-- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?negate0=1;field0-0-0=target_milestone;type0-0-1=regexp;field0-0-1=target_milestone;resolution=FIXED;resolution=WONTFIX;resolution=WORKSFORME;classification=DSDP;chfieldto=2009-11-20;chfield=resolution;query_format=advanced;chfieldfrom=2009-09-10;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;value0-0-1=3.2%20M[4567];type0-0-0=regexp;value0-0-0=[23]\.[01].*;component=Core;component=RSE;component=Terminal;product=Target%20Management"> -->
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?resolution=FIXED;resolution=WONTFIX;resolution=WORKSFORME;classification=DSDP;query_format=advanced;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;component=Core;component=RSE;component=Terminal;target_milestone=3.2;target_milestone=3.2%20M2;target_milestone=3.2%20M3;product=Target%20Management">
- this query</a> to show the list of bugs fixed since
- <a href="http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.1.1-200909160905/">
- TM 3.1.1</a>
- [<a href="http://download.eclipse.org/dsdp/tm/downloads/drops/R-3.1.1-200909160905/buildNotes.php">build notes</a>].</li>
-<li>For details on checkins, see
- <a href="http://dsdp.eclipse.org/dsdp/tm/searchcvs.php">TM SearchCVS</a>, the
- <a href="http://download.eclipse.org/dsdp/tm/downloads/drops/N-changelog/index.html">
- RSE CVS changelog</a>, and the
- <a href="http://download.eclipse.org/dsdp/tm/downloads/drops/N-changelog/core/index.html">
- TM Core CVS changelog</a>.</li>
-<li>For other questions, please check the
- <a href="http://wiki.eclipse.org/TM_and_RSE_FAQ">TM and RSE FAQ</a>
- as well as the
- <a href="http://wiki.eclipse.org/DSDP/TM/3.2_Known_Issues_and_Workarounds">
- TM 3.2 Known Issues and Workarounds</a>.</li>
-</ul>
-</td></tr></tbody></table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">Getting Started</font></b></td>
- </tr>
-</table>
-<table><tbody><tr><td>
-<p>The RSE User Documentation has a
-<a href="http://dsdp.eclipse.org/help/latest/index.jsp?topic=/org.eclipse.rse.doc.user/gettingstarted/g_start.html">
-Tutorial</a> that guides you through installation, first steps,
-connection setup and important tasks.</p>
-<p>
-If you want to know more about future directions of the Target Management
-Project, developer documents, architecture or how to get involved,
-the online
-<a href="http://www.eclipse.org/dsdp/tm/tutorial/index.php">Getting Started page</a>
-as well as the
-<a href="http://wiki.eclipse.org/TM_and_RSE_FAQ">TM and RSE FAQ</a>
-are the best places for you to get started.
-</p>
-</td></tr></tbody></table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">API Status</font></b></td>
- </tr>
-</table>
-<table><tbody><tr><td>
-<p>For the upcoming TM 3.2 release, only backward compatible API changes
-are planned, especially in order to support improved componentization
-and UI/Non-UI splitting.
-In the interest of improving the code base, though, please
-take care of API marked as <b>@deprecated</b> in the Javadoc.
-Such API is prime candidate to be removed in the future.
-Also, observe the API Tooling tags such as <b>@noextend</b> and
-<b>@noimplement</b>.
-</p>
-</td></tr></tbody></table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#808080"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">API Specification Updates since TM 3.1</font></b></td>
- </tr>
-</table>
-<table><tbody><tr><td>
-The following lists amendments to API specifications that are worth noticing,
-and may require changes in client code even though they are binary compatible.
-More information can be found in the associated bugzilla items.
-
-<ul>
-<li>TM @buildId@ API Specification Updates
-<ul>
- <li>None.</li>
-</ul></li>
-</ul>
-</li>
-</ul>
-
-Use
- <!--
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=%5Bapi&classification=DSDP&product=Target+Management&component=Core&component=RSE&component=Terminal&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=FIXED&resolution=WORKSFORME&chfieldfrom=2009-06-20&chfieldto=2009-09-25&chfield=resolution&cmdtype=doit">
- -->
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=%5Bapi&classification=DSDP&product=Target+Management&component=Core&component=RSE&component=Terminal&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=FIXED&resolution=WORKSFORME&target_milestone=3.1.1&cmdtype=doit">
- this query</a> to show the full list of API related updates since TM 3.1
- <!--
- , and
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=%5Bapi%5D&classification=DSDP&product=Target+Management&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&cmdtype=doit">
- this query</a> to show the list of additional API changes proposed for TM 3.1
- -->
- .
-</td></tr></tbody></table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">Known Problems and Workarounds</font></b></td>
- </tr>
-</table>
-<table><tbody><tr><td>
-The following critical or major bugs are currently known.
-We'll strive to fix these as soon as possible.
-<ul>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279837">bug 279837</a> - maj - [shells] RemoteCommandShellOperation can miss output</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=271015">bug 271015</a> - maj - [ftp] "My Home" with "Empty list" doesn't refresh</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268463">bug 268463</a> - maj - [ssh] [sftp] SftpFileService.getFile(...) fails with cryptic jsch exception (4)</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=260796">bug 260796</a> - maj - [ftp] Fetching folder job sometimes runs forever with Outpost firewall</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=248913">bug 248913</a> - maj - [ssh] SSH subsystem loses connection</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=238156">bug 238156</a> - maj - Export/Import Connection doesn't create default filters for the specified connection</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=226564">bug 226564</a> - maj - [efs] Deadlock while starting dirty workspace
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=222380">bug 222380</a> - maj - [persistence][migration][team] Subsystem association is lost when creating connection with an installation that does not have subsystem impl</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=218387">bug 218387</a> - maj - [efs] Eclipse hangs on startup of a Workspace with a large efs-shared file system on a slow connection</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=208185">bug 208185</a> - maj - [terminal][serial] terminal can hang the UI when text is entered while the backend side is not reading characters</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=198395">bug 198395</a> - maj - [dstore] Can connect to DStore with expired password</li>
- <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=175300">bug 175300</a> - maj - [performance] processes.shell.linux subsystem is slow over ssh</li>
-</ul>
-<!--
-<p>No major or critical bugs are known at the time of release.
--->
-Use
-<a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&classification=DSDP&product=Target+Management&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_severity=blocker&bug_severity=critical&bug_severity=major&cmdtype=doit">this query</a>
-for an up-to-date list of major or critical bugs.</p>
-
-<p>The
-<a href="http://wiki.eclipse.org/DSDP/TM/3.2_Known_Issues_and_Workarounds">
-TM 3.2 Known Issues and Workarounds</a> Wiki page gives an up-to-date list
-of the most frequent and obvious problems, and describes workarounds for them.<br/>
-If you have other questions regarding TM or RSE, please check the
-<a href="http://wiki.eclipse.org/TM_and_RSE_FAQ">TM and RSE FAQ</a>
-</p>
-
-<p>Click
-<a href="https://bugs.eclipse.org/bugs/report.cgi?x_axis_field=bug_severity&y_axis_field=op_sys&z_axis_field=&query_format=report-table&classification=DSDP&product=Target+Management&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&format=table&action=wrap">here</a>
-for a complete up-to-date bugzilla status report, or
-<a href="https://bugs.eclipse.org/bugs/report.cgi?x_axis_field=bug_severity&y_axis_field=op_sys&z_axis_field=&query_format=report-table&classification=DSDP&product=Target+Management&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&format=table&action=wrap">here</a>
-for a report on bugs fixed so far.
-</p>
-</td></tr></tbody></table>
-
-</body>
-</html>
diff --git a/releng/org.eclipse.rse.build/template/buildNotesGenerated.html b/releng/org.eclipse.rse.build/template/buildNotesGenerated.html
deleted file mode 100644
index a14db454b..000000000
--- a/releng/org.eclipse.rse.build/template/buildNotesGenerated.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<p>I
-
-<p>Integration Build (December 13, 2006, 9:39 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
- </p>
-
-<p>Integration Build (December 06, 2006, 8:08 p.m.)</p>
- <p>Problem reports updated</p>
- <p>
- </p>
-
-<p>Integration Build (November 29, 2006, 11:12 a.m.)</p>
- <p>Problem reports updated</p>
- <p>
- </p>ntegration Build (November 28, 2006, 2:03 p.m.)</p>
-<p>Problem reports updated</p>
-<p>
-</p>
diff --git a/releng/org.eclipse.rse.build/template/egg.gif b/releng/org.eclipse.rse.build/template/egg.gif
deleted file mode 100644
index 62e22f0ad..000000000
--- a/releng/org.eclipse.rse.build/template/egg.gif
+++ /dev/null
Binary files differ
diff --git a/releng/org.eclipse.rse.build/template/epl-v10.html b/releng/org.eclipse.rse.build/template/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/releng/org.eclipse.rse.build/template/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/template/index.php b/releng/org.eclipse.rse.build/template/index.php
deleted file mode 100755
index 66eb2f8ad..000000000
--- a/releng/org.eclipse.rse.build/template/index.php
+++ /dev/null
@@ -1,282 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="http://www.eclipse.org/default_style.css" type="text/css">
-<title>DSDP-TM @buildTypeLong@ Build: @buildId@</title>
-</head>
-
-<body>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" width="80%">
- <p><b><font class=indextop>TM @buildTypeLong@ Build: @buildId@</font></b><br>
- @dateLong@ </p>
- <p>These downloads are provided under the
- <a href="http://www.eclipse.org/legal/epl/notice.php">Eclipse.org Software
- User Agreement</a>.</p>
-
- <p><font size="+1"><strong>
-<!-- -->
- <a href="buildNotes.php">New and Noteworthy / Build Notes</a>
-<!-- -->
-<!--
- <p><a href="http://www.eclipse.org/dsdp/tm/development/relnotes/3.1/tm-news-3.1.html">New and Noteworthy</a></p>
- <p><a href="http://www.eclipse.org/dsdp/tm/development/relnotes/3.1/readme_tm_3.1.html">TM 3.1 Readme / Release Notes</a></p>
- <p><a href="buildNotes.php">Build Notes</a></p>
--->
- </strong></font></p>
-
- To view the map file entries for this build, click
- <a href="directory.txt">here</a>.<br/>
- To view the compile logs for this build, click
- <a href="compilelog.txt">here</a>.<br/>
- For getting started, consider the <a href="http://www.eclipse.org/dsdp/tm/tutorial/index.php">TM Tutorials</a>
- and the <a href="http://wiki.eclipse.org/TM_and_RSE_FAQ">TM and RSE FAQ</a>.
- </p>
-<!--
- <p>To view the build notes for this build click <a
- href="buildNotes.php">here</a>.<br>
- To view the test results for this build, click
- <a href="testResults.php">here</a>.<br>
--->
- </td>
-<!--
- <td width="28%"><img src="http://www.eclipse.org/images/Idea.jpg" height=86 width=120></td>
--->
- </tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">Requirements</font></b></td>
- </tr>
-</table>
-<table>
- <tbody>
- <tr><td><b>TM @buildId@ requires
- <a href="http://download.eclipse.org/eclipse/downloads/">
- Eclipse 3.4</a> or later</b>.
- <b>RSE Import/Export as well as FTP and Telnet</b> require <b>Java 1.5</b>
- or higher, the rest of RSE works with Java 1.4.
- </b></td></tr>
- <tr><td>
- For core RSE and TM-Terminal, the Eclipse <b>Platform Runtime Binary</b> is sufficient.
- Of course you can also use the popular <b>SDK</b> or one of the <b>Packages</b>.
- Prerequisites for the discovery add-on (EMF) can be retrieved from the
- <a href="http://download.eclipse.org/releases/europa/">Europa</a>,
- <a href="http://download.eclipse.org/releases/ganymede/">Ganymede</a> or
- <a href="http://download.eclipse.org/releases/galileo/">Galileo</a>
- Discovery Sites</a>.
- </td></tr>
- </tbody>
-</table>
-</table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0">
- <font face="Arial,Helvetica" color="#FFFFFF"><b>All-in-one</b> (includes runtime and documentation for <b>dstore, ftp, local, ssh, and telnet</b>)</font></td>
- </tr>
- <tr><td align="LEFT">
- For tool writers, <b>the SDK</b> also includes the runtime as listed, plus programmer documentation and source.
- </td></tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="0" width="100%">
- <tr>
- <td align="RIGHT" valign="TOP" width="7%">
- <div align="left">
- <b>Status</b></div>
- </td>
- <td width="30%"><b>Platform</b></td>
- <td width="63%"><b>Download</b></td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/RSE-runtime-@buildId@.zip">RSE-runtime-@buildId@.zip</a>
- <i>(Recommended for most users)</i></td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/RSE-SDK-@buildId@.zip">RSE-SDK-@buildId@.zip</a></td>
- </tr>
-</table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#808080"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">Stand-alone Offerings, Integrations and Add-ons</font></b>
- </td>
- </tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="0" width="100%">
- <tr>
- <td align="RIGHT" valign="TOP" width="7%">
- <div align="left"><b>Status</b></div>
- </td>
- <td width="7%"><b>Platform</b></td>
- <td width="23%"><b>Download</b></td>
- <td width="63%"><b>Notes</b></td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/TM-terminal-@buildId@.zip">TM-terminal-@buildId@.zip</a></td>
- <td>
- A stand-alone ANSI / vt102 terminal emulator widget and view (with minor
- <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/README.txt?revision=1.4&root=DSDP_Project&view=markup">
- limitations</a>). Includes pluggable connectors
- for serial line (through RXTX, see the
- <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial/README.txt?revision=1.5&root=DSDP_Project&view=markup">
- installation notes</a>), ssh and telnet. Includes Source.
- </td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/RSE-useractions-@buildId@.zip">RSE-useractions-@buildId@.zip</a></td>
- <td><small>&nbsp;</small><br/>
- Additional Framework for user-defined actions and compile commands.
- Includes Source.
- </td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/RSE-examples-@buildId@.zip">RSE-examples-@buildId@.zip</a></td>
- <td><small>&nbsp;</small><br/>
- Tutorial code and example projects for developing against RSE SDK.
- Includes Source.
- </td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/TM-discovery-@buildId@.zip">TM-discovery-@buildId@.zip</a></td>
- <td><small>&nbsp;</small><br/>
- An API and DNS-SD / Zeroconf based
- implementation for remote network service discovery.
- Runs stand-alone or integrated with RSE.
- Requires EMF 2.2.0 or later. Includes Source.
- </td>
- </tr>
-</table>
-<b>Note:</b> As of TM 3.1, the <b>RSE-remotecdt</b> integration for remote launch and debug through gdbserver has moved into CDT 6.0.
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#808080"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">Add-ons in Incubation</font></b>
- </td>
- </tr>
- <tr>
- <td>Add-ons in
- <a href="http://www.eclipse.org/projects/what-is-incubation.php">
- Incubation</a> state provide new features, but have
- not yet hardened their APIs through public review such that there could be
- a promise to keep them stable over releases. These add-ons have a 0.x version
- number, and are provided for early adopters. Note that these features may
- already be very mature in terms of features provided, but not yet in terms
- of the APIs provided.</td>
- </tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="0" width="100%">
- <tr>
- <td align="RIGHT" valign="TOP" width="7%">
- <div align="left"><b>Status</b></div>
- </td>
- <td width="7%"><b>Platform</b></td>
- <td width="23%"><b>Download</b></td>
- <td width="63%"><b>Notes</b></td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All <img src="egg.gif" width=20 height=20></td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/RSE-wince-incubation-@buildId@.zip">RSE-wince-incubation-@buildId@.zip</a></td>
- <td><small>&nbsp;</small><br/>
- RSE Services for accessing Windows CE devices via Microsoft RAPI2.
- Provides a File subsystem for transparent remote file access.
- Requires Microsoft RAPI libraries installed.
- Includes Source.
- </td>
- </tr>
-</table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#0080C0"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">DStore Server Runtime</font></b></td>
- </tr>
-</table>
-<table border="0" cellspacing="2" cellpadding="0" width="100%">
- <tr>
- <td align="RIGHT" valign="TOP" width="7%">
- <div align="left"><b>Status</b></div></td>
- <td width="30%"><b>Platform</b></td>
- <td width="63%"><b>Download</b></td></tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>Windows (<a href="http://www.eclipse.org/dsdp/tm/development/plan.php#OperatingEnvironments">Supported Versions</a>)</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/rseserver-@buildId@-windows.zip">rseserver-@buildId@-windows.zip</a></td></tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>Linux (<a href="http://www.eclipse.org/dsdp/tm/development/plan.php#OperatingEnvironments">Supported Versions</a>)</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/rseserver-@buildId@-linux.tar">rseserver-@buildId@-linux.tar</a></td></tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>Other Unix (<a href="http://www.eclipse.org/dsdp/tm/development/plan.php#OperatingEnvironments">Supported Versions</a>)</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/rseserver-@buildId@-unix.tar">rseserver-@buildId@-unix.tar</a></td></tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>Mac OS X (<a href="http://www.eclipse.org/dsdp/tm/development/plan.php#OperatingEnvironments"><i>Experimental</i></a>)</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/rseserver-@buildId@-macosx.tar">rseserver-@buildId@-macosx.tar</a></td></tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr>
- <td align="LEFT" valign="TOP" colspan="3" bgcolor="#808080"><b>
- <font face="Arial,Helvetica" color="#FFFFFF">JUnit Plugin Tests</font></b></td>
- </tr>
- <tr>
- <td>The RSE test suite requires the JUnit plug-in, which is included in the
- <a href="http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#EclipseSDK">
- Eclipse SDK</a> or available as<br/>
- <a href="http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#JUnitPlugin">
- eclipse-test-framework download</a> for users of the Eclipse Platform Runtime Binary.
- </td>
- </tr>
-</table>
-
-
-
-<table border="0" cellspacing="2" cellpadding="0" width="100%">
- <tr>
- <td align="RIGHT" valign="TOP" width="7%">
- <div align="left">
- <b>Status</b></div>
- </td>
- <td width="30%"><b>Platform</b></td>
- <td width="63%"><b>Download</b></td>
- </tr>
- <tr><td><div align=left><img src = "OK.gif" width=19 height=23></div></td>
- <td>All</td>
- <td><a href="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/downloads/drops/@dropDir@/RSE-tests-@buildId@.zip">RSE-tests-@buildId@.zip</a></td>
- </tr>
-</table>
-<table border="0" cellspacing="5" cellpadding="2" width="100%">
- <tr><td colspan="2">&nbsp;</td></tr>
-</table>
-
-<p>&nbsp;</p>
-</body>
-</html>
diff --git a/releng/org.eclipse.rse.build/template/notice.html b/releng/org.eclipse.rse.build/template/notice.html
deleted file mode 100644
index c6af966b6..000000000
--- a/releng/org.eclipse.rse.build/template/notice.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/releng/org.eclipse.rse.build/template/package.count b/releng/org.eclipse.rse.build/template/package.count
deleted file mode 100755
index 48082f72f..000000000
--- a/releng/org.eclipse.rse.build/template/package.count
+++ /dev/null
@@ -1 +0,0 @@
-12
diff --git a/releng/org.eclipse.rse.releng.infocenter/.project b/releng/org.eclipse.rse.releng.infocenter/.project
deleted file mode 100644
index 3e151d5c4..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.releng.infocenter</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/releng/org.eclipse.rse.releng.infocenter/about.html b/releng/org.eclipse.rse.releng.infocenter/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/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 5, 2007</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/releng/org.eclipse.rse.releng.infocenter/doit_nightly.sh b/releng/org.eclipse.rse.releng.infocenter/doit_nightly.sh
deleted file mode 100755
index ab7d18a58..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/doit_nightly.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# 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
-#*******************************************************************************
-
-#Find out the IHOME - it's the parent of my own directory ($IHOME/bin)
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-cd ..
-IHOME=`pwd`
-export IHOME
-
-#Update scripts - prerequisite: IHOME is infocenter home
-umask 022
-cd "$IHOME/bin"
-cvs -q update -d
-chmod a+x *.sh
-
-#Update the infocenter
-./update.sh
diff --git a/releng/org.eclipse.rse.releng.infocenter/infocenter.sh b/releng/org.eclipse.rse.releng.infocenter/infocenter.sh
deleted file mode 100755
index ddf77475c..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/infocenter.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-umask 022
-
-#PATH=/opt/j2sdk1.4.2_12/bin:$PATH
-PATH=/opt/JDKs/amd64/jdk1.6.0_11/bin:$PATH
-export PATH
-
-if [ "$IHOME" = "" ]; then
- IHOME=/home/infocenter/latest
-fi
-EHOME=${IHOME}/eclipse/eclipse
-curdir=`pwd`
-
-if [ "$1" = "" -o "$1" = "help" ]; then
- echo "Usage: infocenter.sh [start|shutdown|addSite -from dir|apply]"
- exit 1
-fi
-
-HELP_PLUGIN=`ls $EHOME/plugins/org.eclipse.help.base_3.*.jar | sort | tail -1`
-
-java \
- -classpath $HELP_PLUGIN \
- org.eclipse.help.standalone.Infocenter \
- -command $* \
- -eclipsehome $EHOME \
- -data $IHOME/workspace \
- -port 27127 \
- -nl en -locales en
diff --git a/releng/org.eclipse.rse.releng.infocenter/readme.txt b/releng/org.eclipse.rse.releng.infocenter/readme.txt
deleted file mode 100644
index a0fea5931..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/readme.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-DSDP Project Infocenter
------------------------
-
-This project contains scripts needed to run the Eclipse headless infocenter
-application, serving latest online help from dsdp.eclipse.org.
-
-The scripts are written to run by cron job, as user "infocenter", on dsdp.eclipse.org.
-
-This project can be checked out with
- cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp \
- co -d bin org.eclipse.tm.rse/releng/org.eclipse.tm.rse.releng.infocenter
-
-Apache Installation:
-* vi /etc/httpd/conf/httpd.conf
- ADD
- AddDefaultCharset Off
- ProxyPass /help/latest http://localhost:27127/help
- ProxyPassReverse /help/latest http://localhost:27127/help
-
-Installation:
-* Infocenter home (IHOME) at /home/infocenter/latest
- - Scripts checked out at $IHOME/bin
- - Deployable doc plugins at $IHOME/deploy
-* cd $IHOME/bin
- ./setup.sh
- ./update.sh
-* Cronjob created to execute doit_nightly.sh
- ssh dsdp.eclipse.org -l infocenter
- crontab -e
- #Run the doc update at 2:00 every weekday
- 0 2 * * 1-5 /home/infocenter/latest/bin/doit_nightly.sh
-
-Other infocenter administration commands:
- infocenter.sh shutdown
- infocenter.sh start &
-
-For more documentation on infocenter, see
-http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm
-http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm
-
--- Martin Oberhuber, 20-Jul-2006 \ No newline at end of file
diff --git a/releng/org.eclipse.rse.releng.infocenter/setup.sh b/releng/org.eclipse.rse.releng.infocenter/setup.sh
deleted file mode 100755
index 00c108852..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/setup.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2008, 2009 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
-#*******************************************************************************
-umask 022
-
-curdir=`pwd`
-#PATH=/opt/j2sdk1.4.2_12/bin:$PATH
-PATH=/opt/JDKs/amd64/jdk1.6.0_11/bin:$PATH
-export PATH
-
-if [ "$IHOME" = "" ]; then
- IHOME=/home/infocenter/latest
-fi
-# prepare the base Eclipse installation in folder "eclipse"
-ECL_DIR=$IHOME/eclipse
-ep_rel=S
-ep_ver=3.5M4
-ep_date=200812111908
-
-uname_s=`uname -s`
-uname_m=`uname -m`
-case ${uname_s}${uname_m} in
- Linuxppc*) ep_arch=linux-gtk-ppc
- cdt_arch=linux.ppc
- ;;
- Linuxx86_64*) ep_arch=linux-gtk-x86_64
- cdt_arch=linux.x86_64
- ;;
- Linuxx86*|Linuxi686*) ep_arch=linux-gtk
- cdt_arch=linux.x86
- ;;
-esac
-
-P2_no_dropins=false
-if [ ! -f ${ECL_DIR}/eclipse/plugins/org.eclipse.swt_3.5.0.v3525.jar ]; then
- if [ ! -d ${ECL_DIR} ]; then
- mkdir -p ${ECL_DIR}
- else
- rm -rf ${ECL_DIR}/*
- fi
- cd "${ECL_DIR}"
- echo "Getting Eclipse Platform SDK..."
- wget "http://download.eclipse.org/eclipse/downloads/drops/${ep_rel}-${ep_ver}-${ep_date}/eclipse-platform-SDK-${ep_ver}-${ep_arch}.tar.gz"
- tar xfvz eclipse-platform-SDK-${ep_ver}-${ep_arch}.tar.gz
- rm eclipse-platform-SDK-${ep_ver}-${ep_arch}.tar.gz
- cd "${curdir}"
-fi
-if [ ! -f "${ECL_DIR}/eclipse/startup.jar" ]; then
- cd "${ECL_DIR}/eclipse/plugins"
- if [ -h ../startup.jar ]; then
- rm ../startup.jar
- fi
- LAUNCHER=`ls org.eclipse.equinox.launcher_*.jar | sort | tail -1`
- if [ "${LAUNCHER}" != "" ]; then
- echo "eclipse LAUNCHER=${LAUNCHER}"
- ln -s plugins/${LAUNCHER} ../startup.jar
- else
- echo "Eclipse: NO startup.jar LAUNCHER FOUND!"
- fi
- cd "${curdir}"
-fi
-if [ ! -d "${ECL_DIR}/eclipse/plugins.disabled" ]; then
- mkdir -p "${ECL_DIR}/eclipse/plugins.disabled"
- cd "${ECL_DIR}/eclipse/plugins"
- mv org.eclipse.platform.doc.user_*.jar ../plugins.disabled
- cd "${curdir}"
-fi
diff --git a/releng/org.eclipse.rse.releng.infocenter/update.sh b/releng/org.eclipse.rse.releng.infocenter/update.sh
deleted file mode 100755
index e61a74bdb..000000000
--- a/releng/org.eclipse.rse.releng.infocenter/update.sh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-umask 022
-echo "Infocenter Update: running as"
-id
-if [ "$IHOME" = "" ]; then
- IHOME=/home/infocenter/latest
-fi
-ECL_DIR=$IHOME/eclipse
-curdir=`pwd`
-
-#update RSE into deployment directory
-if [ ! -d $IHOME/deploy/rse ]; then
- mkdir -p $IHOME/deploy/rse
-fi
-cd $IHOME/deploy/rse
-rm *.zip
-echo "Downloading RSE-SDK-latest.zip..."
-wget -q "http://build.eclipse.org/dsdp/tm/downloads/drops/N.latest/RSE-SDK-latest.zip"
-#wget -q "http://download.eclipse.org/dsdp/tm/downloads/drops/N.latest/RSE-SDK-latest.zip"
-if [ -e RSE-SDK-latest.zip ]; then
- echo "Unzipping..."
- unzip -q RSE-SDK-latest.zip
- if [ -e plugins.tmp ]; then
- rm -rf plugins.tmp
- fi
- mkdir plugins.tmp
- mv eclipse/plugins/*doc* plugins.tmp
- rm -rf eclipse
- NUM=`ls plugins.tmp/*.jar | wc -l`
- echo "RSE plugins.tmp: NUM=$NUM"
- if [ "$NUM" = "3" ]; then
- echo "Doc plugins got successfully, installing from plugins.tmp into plugins..."
- if [ -e plugins ]; then
- rm -rf plugins
- fi
- mv plugins.tmp plugins
- fi
-else
- echo "Error downloading RSE-SDK-latest.zip"
-fi
-
-#update MTJ into deployment directory
-if [ ! -d $IHOME/deploy/mtj ]; then
- mkdir -p $IHOME/deploy/mtj
-fi
-cd $IHOME/deploy/mtj
-rm *.zip
-echo "Downloading dsdp-mtj-SDK-incubation-latest.zip..."
-#wget -q "http://build.eclipse.org/dsdp/mtj/downloads/drops/N.latest/dsdp-mtj-SDK-incubation-latest.zip"
-wget -q "http://download.eclipse.org/dsdp/mtj/downloads/drops/N.latest/dsdp-mtj-SDK-incubation-latest.zip"
-if [ -e dsdp-mtj-SDK-incubation-latest.zip ]; then
- echo "Unzipping..."
- unzip -q dsdp-mtj-SDK-incubation-latest.zip
- if [ -e plugins.tmp ]; then
- rm -rf plugins.tmp
- fi
- mkdir plugins.tmp
- mv eclipse/plugins/*doc* plugins.tmp
- rm -rf eclipse
- NUM=`ls plugins.tmp/*.jar | wc -l`
- echo "MTJ plugins.tmp: NUM=$NUM"
- if [ "$NUM" = "2" -o "$NUM" = "1" ]; then
- echo "Doc plugins got successfully, installing from plugins.tmp into plugins..."
- if [ -e plugins ]; then
- rm -rf plugins
- fi
- mv plugins.tmp plugins
- fi
-else
- echo "Error downloading dsdp-mtj-SDK-incubation-latest.zip"
-fi
-
-######################### Deploy all #############################
-echo "Deploying new plug-ins..."
-NEED_RESTART=0
-for COMP in rse dd.dsf nab ercp mtj ; do
- if [ -d "${IHOME}/deploy/${COMP}/plugins" ]; then
- if [ -d "$ECL_DIR/eclipse/dropins/${COMP}/eclipse/plugins" ]; then
- diff -r "${IHOME}/deploy/${COMP}/plugins" "$ECL_DIR/eclipse/dropins/${COMP}/eclipse/plugins" >/dev/null
- result=$?
- if [ "${result}" != "0" ]; then
- echo "${COMP} diffs as ${result} --> deploying"
- NEED_RESTART=1
- else
- echo "${COMP} is unchanged"
- fi
- else
- echo "${COMP} is NEW"
- NEED_RESTART=1
- fi
- fi
-done
-
-######################### Restart Infocenter #############################
-#update Infocenter with latest deployable plug-ins
-if [ "$NEED_RESTART" != "0" ]; then
- echo "Shutting down infocenter..."
- $IHOME/bin/infocenter.sh shutdown
-
- for COMP in rse dd.dsf nab ercp mtj ; do
- if [ -d "${IHOME}/deploy/${COMP}/plugins" ]; then
- if [ -d "$ECL_DIR/eclipse/dropins/${COMP}/eclipse/plugins" ]; then
- rm -rf "$ECL_DIR/eclipse/dropins/${COMP}"
- fi
- mkdir -p "$ECL_DIR/eclipse/dropins/${COMP}/eclipse"
- cp -Rp $IHOME/deploy/${COMP}/plugins "$ECL_DIR/eclipse/dropins/${COMP}/eclipse/"
- fi
- done
-
- #TODO: not sure if we need to delete the old index to force re-indexing
- echo "Deleting old index..."
- rm -rf $IHOME/config/org.eclipse.help.base
-
- cd $IHOME
- echo "Restarting infocenter..."
- nohup $IHOME/bin/infocenter.sh start &
- echo "Waiting for Infocenter / Apache to come up [60 seconds]"
- sleep 60
- echo "Doing fake search to force rebuilding index"
- wget -q "http://localhost/help/latest/advanced/searchView.jsp?searchWord=SystemBasePlugin&maxHits=2" -O search.out.jsp -t 3 --waitretry=30
- echo "Done, index should be up again!"
-else
- echo "Nothing new deployed, no restart necessary."
-fi
-
-cd "$curdir"
diff --git a/releng/org.eclipse.rse.updatesite/.cvsignore b/releng/org.eclipse.rse.updatesite/.cvsignore
deleted file mode 100644
index 51689449b..000000000
--- a/releng/org.eclipse.rse.updatesite/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-features
-plugins
-interim
-milestones
-digest.zip
-site-europa.xml
diff --git a/releng/org.eclipse.rse.updatesite/.project b/releng/org.eclipse.rse.updatesite/.project
deleted file mode 100644
index fc8928ebd..000000000
--- a/releng/org.eclipse.rse.updatesite/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.updatesite</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.UpdateSiteBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.UpdateSiteNature</nature>
- </natures>
-</projectDescription>
diff --git a/releng/org.eclipse.rse.updatesite/bin/.cvsignore b/releng/org.eclipse.rse.updatesite/bin/.cvsignore
deleted file mode 100644
index 3f0ee91c7..000000000
--- a/releng/org.eclipse.rse.updatesite/bin/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-pack200.stamp
diff --git a/releng/org.eclipse.rse.updatesite/bin/mkTestUpdates.sh b/releng/org.eclipse.rse.updatesite/bin/mkTestUpdates.sh
deleted file mode 100755
index cafd1fc4a..000000000
--- a/releng/org.eclipse.rse.updatesite/bin/mkTestUpdates.sh
+++ /dev/null
@@ -1,458 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2006, 2009 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
-#*******************************************************************************
-# Convert normal "site.xml" to "testUpdates"
-#
-# Prerequisites:
-# - Eclipse 3.3Mx installed in $HOME/ws2/eclipse
-# - Java5 in the PATH or in /shared/dsdp/tm/ibm-java2-ppc64-50
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-
-umask 022
-
-#Use Java5 on build.eclipse.org - need JRE for pack200
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-basebuilder=${HOME}/ws2/org.eclipse.releng.basebuilder
-
-# patch site.xml
-cd ..
-SITE=`pwd`
-if [ -f index.html.new ]; then
- rm -f index.html.new
-fi
-if [ -f site.xml.new ]; then
- rm -f site.xml.new
-fi
-if [ -f web/site.xsl.new ]; then
- rm -f web/site.xsl.new
-fi
-
-# get newest plugins and features: to be done manually on real update site
-TPVERSION="Target Management"
-VERSION=3.1.1
-TYPE=none
-SITEDIR=`basename ${SITE}`
-case ${SITEDIR} in
- test*Updates) TYPE=test ;;
- signed*Updates) TYPE=testSigned ;;
- *milestones) TYPE=milestone ;;
- *interim) TYPE=interim ;;
- *) TYPE=unknown ;;
-esac
-case ${SITEDIR} in
- 3.2*) VERSION=3.2 ;;
-esac
-if [ ${TYPE} = test ]; then
- echo "Working on test update site"
- TPTYPE="${VERSION} Test"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- REL=`ls $HOME/ws2/working/package | sort | tail -1`
- if [ "$REL" != "" ]; then
- echo "Checking new Updates from $REL"
- DIR="$HOME/ws2/working/package/$REL/updates"
- if [ -d "$DIR/features" ]; then
- echo "Copying new plugins and features from $DIR"
- rm -rf features
- rm -rf plugins
- cp -R $DIR/features .
- cp -R $DIR/plugins .
- fi
- fi
- # CHECK VERSION CORRECTNESS for MICRO UPDATES only
- # Minor/major version updates are not allowed.
- # Update of "qualifier" requires also updating "micro"
- echo "VERIFYING VERSION CORRECTNESS: Features"
- ls features/*.jar | sed -e 's,^.*features/,,' | sort > f1.$$.txt
- ls ../updates/3.1/features/*.jar | sed -e 's,^.*features/,,' | sort > f2.$$.txt
- diff f2.$$.txt f1.$$.txt | grep '^[>]' \
- | sed -e 's,[>] \(.*_[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,' > f_new.txt
- for f in `cat f_new.txt`; do
- fold=`grep ${f} f2.$$.txt`
- if [ "${fold}" != "" ]; then
- echo "PROBLEM: QUALIFIER update without MICRO: ${f}"
- fi
- fbase=`echo $f | sed -e 's,\(.*_[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,'`
- fold=`grep ${fbase} f2.$$.txt`
- if [ "${fold}" = "" ]; then
- echo "PROBLEM: MAJOR or MINOR update : ${f}"
- fi
- done
- echo "VERIFYING VERSION CORRECTNESS: Plugins"
- ls plugins/*.jar | sed -e 's,^.*plugins/,,' | sort > p1.$$.txt
- ls ../updates/3.1/plugins/*.jar | sed -e 's,^.*plugins/,,' | sort > p2.$$.txt
- diff p2.$$.txt p1.$$.txt | grep '^[>]' \
- | sed -e 's,[>] \(.*_[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,' > p_new.txt
- for p in `cat p_new.txt`; do
- pold=`grep ${p} p2.$$.txt`
- if [ "${pold}" != "" ]; then
- echo "PROBLEM: QUALIFIER update without MICRO: ${p}"
- fi
- pbase=`echo $p | sed -e 's,\(.*_[0-9][0-9]*\.[0-9][0-9]*\)\..*,\1,'`
- pold=`grep ${pbase} p2.$$.txt`
- if [ "${pold}" = "" ]; then
- echo "PROBLEM: MAJOR or MINOR update : ${p}"
- fi
- done
- #rm f_new.txt p_new.txt
- mv -f f1.$$.txt fversions.txt
- mv -f p1.$$.txt pversions.txt
- mv -f f2.$$.txt f30versions.txt
- mv -f p2.$$.txt p30versions.txt
- ## rm f1.$$.txt f2.$$.txt p1.$$.txt p2.$$.txt
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- index.html > index.html.new
- mv -f index.html.new index.html
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
- -e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
- site.xml > site.xml.new
- mv -f site.xml.new site.xml
- sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- web/site.xsl > web/site.xsl.new
- mv -f web/site.xsl.new web/site.xsl
- echo "Conditioning the site... $SITE"
- #java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
- #java -jar $HOME/ws2/eclipse/startup.jar \
- java \
- -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
- -application org.eclipse.update.core.siteOptimizer \
- -jarProcessor -outputDir $SITE \
- -processAll -repack $SITE
- #java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
- # $HOME/ws2/jarprocessor/jarprocessor.jar \
- # -outputDir $SITE -processAll -repack $SITE
-elif [ ${TYPE} = testSigned ]; then
- echo "Working on signed update site"
- TPTYPE="${VERSION} Signed Test"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- echo "Signing jars from test update site (expecting conditioned jars)..."
- STAGING=/home/data/httpd/download-staging.priv/dsdp/tm
- stamp=`date +'%Y%m%d-%H%M'`
- if [ -d ${STAGING} -a -d ${SITE}/../testUpdates ]; then
- #get jars from testUpdates, sign them and put them here
- mkdir ${SITE}/features.${stamp}
- mkdir -p ${STAGING}/updates.${stamp}/features
- cp -R ${SITE}/../testUpdates/features/*.jar ${STAGING}/updates.${stamp}/features
- cd ${STAGING}/updates.${stamp}/features
- for x in `ls *.jar`; do
- result=`jarsigner -verify ${x} | head -1`
- if [ "$result" != "jar verified." ]; then
- # do not sign Orbit bundles again since they are signed already
- echo "signing feature: ${x}"
- sign ${x} nomail >/dev/null
- fi
- done
- TRIES=10
- while [ $TRIES -gt 0 ]; do
- sleep 30
- echo "TRIES to go: ${TRIES}"
- for x in `ls *.jar | grep -v '^temp[_.]'`; do
- result=`jarsigner -verify ${x} | head -1`
- if [ "$result" = "jar verified." ]; then
- echo "${result}: ${x}"
- cp ${x} ${SITE}/features.${stamp}
- rm ${x}
- else
- echo "-pending- ${x} : ${result}" | head -1
- sleep 30
- fi
- done
- FILES=`ls 2>/dev/null`
- if [ "$FILES" = "" ]; then
- TRIES=0
- ok=1
- else
- echo "--> FILES is $FILES"
- TRIES=`expr $TRIES - 1`
- ok=0
- fi
- done
- if [ "$ok" = "1" ]; then
- rmdir ${STAGING}/updates.${stamp}/features
- mkdir ${SITE}/plugins.${stamp}
- mkdir -p ${STAGING}/updates.${stamp}/plugins
- cp ${SITE}/../testUpdates/plugins/*.jar ${STAGING}/updates.${stamp}/plugins
- cd ${STAGING}/updates.${stamp}/plugins
- for x in `ls *.jar`; do
- result=`jarsigner -verify ${x} | head -1`
- if [ "$result" != "jar verified." ]; then
- # do not sign Orbit bundles again since they are signed already
- echo "signing plugin: ${x}"
- sign ${x} nomail >/dev/null
- fi
- done
- TRIES=10
- while [ $TRIES -gt 0 ]; do
- sleep 30
- echo "TRIES to go: ${TRIES}"
- for x in `ls *.jar | grep -v '^temp[_.]'`; do
- result=`jarsigner -verify ${x} | head -1`
- if [ "$result" = "jar verified." ]; then
- echo "${result}: ${x}"
- cp ${x} ${SITE}/plugins.${stamp}
- rm ${x}
- else
- echo "-pending- ${x} : ${result}" | head -1
- sleep 30
- fi
- done
- FILES=`ls 2>/dev/null`
- if [ "$FILES" = "" ]; then
- TRIES=0
- ok=1
- else
- echo "--> FILES is $FILES"
- TRIES=`expr $TRIES - 1`
- ok=0
- fi
- done
- fi
- if [ "$ok" = "1" ]; then
- cd ${SITE}
- rmdir ${STAGING}/updates.${stamp}/plugins
- rmdir ${STAGING}/updates.${stamp}
- #mv features features.old.${stamp}
- #mv plugins plugins.old.${stamp}
- rm fversions.txt pversions.txt f30versions.txt p30versions.txt f_new.txt p_new.txt 2>/dev/null
- rm -rf features plugins
- mv features.${stamp} features
- mv plugins.${stamp} plugins
- else
- echo "Something went wrong during staging and signing."
- echo "Keeping existing update site intact."
- exit 1
- fi
- else
- echo "staging or testUpdates not found:"
- echo "please fix your pathes"
- exit 1
- fi
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- index.html > index.html.new
- mv -f index.html.new index.html
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
- -e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
- site.xml > site.xml.new
- mv -f site.xml.new site.xml
- sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- web/site.xsl > web/site.xsl.new
- mv -f web/site.xsl.new web/site.xsl
-elif [ ${TYPE} = milestone ]; then
- echo "Working on milestone update site"
- TPTYPE="${VERSION} Milestone"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- echo "Expect that you copied your features and plugins yourself"
- stamp=`date +'%Y%m%d-%H%M'`
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '\,</h1>,a\
-This site contains Target Management Milestones (I-, S- and M- builds) which are \
-being contributed to the Galileo coordinated release train (Eclipse 3.5.x).' \
- index.html > index.html.new
- mv -f index.html.new index.html
- ## keep 3.0.x features in site.xml
- ## -e '/<!-- BEGIN_2_0_1 -->/,/<!-- END_2_0_4 -->/d' \
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
- -e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
- site.xml > site.xml.new
- mv -f site.xml.new site.xml
- sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- web/site.xsl > web/site.xsl.new
- mv -f web/site.xsl.new web/site.xsl
-elif [ ${TYPE} = interim ]; then
- echo "Working on interim update site"
- TPTYPE="${VERSION} Interim"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- echo "Expect that you copied your features and plugins yourself"
- stamp=`date +'%Y%m%d-%H%M'`
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '\,</h1>,a\
-This site contains Target Management Interim Maintenance builds (I-, S-, and M-builds) in order \
-to test them before going live.' \
- index.html > index.html.new
- mv -f index.html.new index.html
- ## keep 2.0.x features in site.xml
- ## -e '/<!-- BEGIN_2_0_1 -->/,/<!-- END_2_0_4 -->/d' \
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
- -e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_1 -->/d' \
- site.xml > site.xml.new
- mv -f site.xml.new site.xml
- sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- web/site.xsl > web/site.xsl.new
- mv -f web/site.xsl.new web/site.xsl
-elif [ `basename $SITE` = 3.0 ]; then
- echo "Working on 3.0 update site"
- TPTYPE="3.0"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- TYPE=official
- echo "Expect that you copied your features and plugins yourself"
- stamp=`date +'%Y%m%d-%H%M'`
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '\,</h1>,a\
-This site contains Target Management 3.0 Releases and Updates (R- builds) which are \
-being contributed to the Ganymede coordinated release train (Eclipse 3.4).' \
- index.html > index.html.new
- mv -f index.html.new index.html
- ## dont keep 2.0.x features in site.xml
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
- -e '/<!-- BEGIN_3_0_4 -->/,/<!-- END_3_0_4 -->/d' \
- -e '/<!-- BEGIN_3_2 -->/,/<!-- END_3_2 -->/d' \
- site.xml > site.xml.new
- mv -f site.xml.new site.xml
- sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- web/site.xsl > web/site.xsl.new
- mv -f web/site.xsl.new web/site.xsl
-elif [ `basename $SITE` = 3.1 ]; then
- echo "Working on 3.1 update site"
- TPTYPE="3.1"
- TPVERSION="${TPVERSION} ${TPTYPE}"
- TYPE=official
- echo "Expect that you copied your features and plugins yourself"
- stamp=`date +'%Y%m%d-%H%M'`
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '\,</h1>,a\
-This site contains Target Management 3.1 Releases and Updates (R- builds) which are \
-being contributed to the Galileo coordinated release train (Eclipse 3.5).' \
- index.html > index.html.new
- mv -f index.html.new index.html
- ## dont keep 2.0.x features in site.xml
- sed -e "s,/dsdp/tm/updates/2.0,/dsdp/tm/updates/${SITEDIR},g" \
- -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- -e '/<!-- BEGIN_2_0 -->/,/<!-- END_2_0_4 -->/d' \
- -e '/<!-- BEGIN_3_0 -->/,/<!-- END_3_0_3 -->/d' \
- -e '/<!-- BEGIN_3_2 -->/,/<!-- END_3_2 -->/d' \
- site.xml > site.xml.new
- mv -f site.xml.new site.xml
- sed -e "s,Project 2.0 Update,Project ${TPTYPE} Update,g" \
- web/site.xsl > web/site.xsl.new
- mv -f web/site.xsl.new web/site.xsl
-else
- echo "Working on official update site"
- TYPE=official
- echo "Expect that you copied your features and plugins yourself"
- stamp=`date +'%Y%m%d-%H%M'`
- rm index.html site.xml web/site.xsl
- cvs -q update -dPR
- sed -e '/<!-- BEGIN_2_0_5 -->/,/<!-- END_2_0_5 -->/d' \
- site.xml > site.xml.new1
- sed -e '/<!-- BEGIN_3_0_2 -->/,/<!-- END_3_0_2 -->/d' \
- site.xml.new1 > site.xml.new2
- sed -e '/<!-- BEGIN_3_1 -->/,/<!-- END_3_1 -->/d' \
- site.xml.new2 > site.xml.new
- mv -f site.xml.new site.xml
- rm site.xml.new1 site.xml.new2
-fi
-FEATURES=`grep 'features/[^ ]*\.qualifier\.jar' site.xml | sed -e 's,^[^"]*"features/\([^0-9]*[0-9][0-9.]*\).*$,\1,g'`
-for feature in $FEATURES ; do
- #list newest ones first
- TAG=`ls -t features/${feature}*.jar | head -1 | sed -e 's,[^0-9]*[0-9][0-9]*\.[0-9]*\.[0-9]*\.\([^.]*\).jar,\1,'`
- if [ "$TAG" != "" ]; then
- echo "$feature : $TAG"
- sed -e "/$feature/s/qualifier/$TAG/g" site.xml > site.xml.new
- mv -f site.xml.new site.xml
- fi
-done
-#Create Europa version of site.xml
-if [ -f site-europa.xml ]; then
- rm -rf site-europa.xml
-fi
-sed -e '/!EUROPA_ONLY!/d' site.xml > site-europa.xml
-
-#Get rid of Europa comments completely in order to avoid SAX exception
-#in comment when the feature qualifier extends to --
-awk 'BEGIN {doit=1}
- /-- !EUROPA_ONLY!/ {doit=0}
- { if(doit==1) print; }
- /!EUROPA_ONLY! --/ {doit=1}' site.xml > site.xml.tmp
-mv -f site.xml.tmp site.xml
-
-# optimize the site
-# see http://wiki.eclipse.org/Platform-releng-faq
-case ${TYPE} in test*)
- echo "Packing the site... $SITE"
- # Workaround for downgrading effort of pack200 to avoid VM bug
- # See https://bugs.eclipse.org/bugs/show_bug.cgi?id=154069
- #java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
- #java -jar $HOME/ws2/eclipse/startup.jar \
- java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
- -application org.eclipse.update.core.siteOptimizer \
- -jarProcessor -outputDir $SITE \
- -processAll -pack $SITE
- #java -Dorg.eclipse.update.jarprocessor.pack200=$mydir \
- # $HOME/ws2/jarprocessor/jarprocessor.jar \
- # -outputDir $SITE -processAll -pack $SITE
- ;;
-esac
-
-#Create the digest
-echo "Creating digest..."
-#java -jar $HOME/ws2/eclipse/startup.jar \
-java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
- -application org.eclipse.update.core.siteOptimizer \
- -digestBuilder -digestOutputDir=$SITE \
- -siteXML=$SITE/site-europa.xml
-
-##if false ; then
-#Create P2 metadata
-echo "Creating P2 metadata..."
-#Always create from scratch
-cd ${SITE}
-for x in content.xml content.jar content.jar.pack.gz artifacts.xml artifacts.jar artifacts.jar.pack.gz ; do
- if [ -f $x ]; then rm -f $x; fi
-done
-java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
- -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
- -updateSite ${SITE}/ \
- -site file:${SITE}/site.xml \
- -metadataRepository file:${SITE}/ \
- -metadataRepositoryName "${TPVERSION} Update Site" \
- -artifactRepository file:${SITE}/ \
- -artifactRepositoryName "${TPVERSION} Artifacts" \
- -compress \
- -reusePack200Files \
- -noDefaultIUs \
- -vmargs -Xmx256M
-##fi
-
-cd $SITE
-chgrp -R dsdp-tmadmin .
-chmod -R g+w .
-chmod -R a+r .
-cd $curdir
diff --git a/releng/org.eclipse.rse.updatesite/bin/pack200 b/releng/org.eclipse.rse.updatesite/bin/pack200
deleted file mode 100755
index 1bdf59749..000000000
--- a/releng/org.eclipse.rse.updatesite/bin/pack200
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# Workaround for downgrading effort of pack200 to avoid VM bug
-# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=154069
-#
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-cd "$curdir"
-
-rm "$mydir/pack200.stamp"
-touch "$mydir/pack200.stamp"
-date >> "$mydir/pack200.stamp"
-echo "pack200 -E4 $*" >> "$mydir/pack200.stamp"
-pack200 -E4 $*
diff --git a/releng/org.eclipse.rse.updatesite/bin/sign.sh b/releng/org.eclipse.rse.updatesite/bin/sign.sh
deleted file mode 100755
index eba164bc5..000000000
--- a/releng/org.eclipse.rse.updatesite/bin/sign.sh
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2007 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
-#*******************************************************************************
-# Sign a list of files on build.eclipse.org
-#
-# Usage:
-# sign.sh a.jar featurs/b.jar `ls plugins/*.jar`
-#
-# Prerequisites:
-# - Eclipse 3.3Mx installed in $HOME/ws2/eclipse
-# - Java5 in the PATH or in /shared/dsdp/tm/ibm-java2-ppc64-50
-
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-
-umask 022
-
-#Use Java5 on build.eclipse.org - need JRE for pack200
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-basebuilder=${HOME}/ws2/org.eclipse.releng.basebuilder
-
-FILES=$*
-
-# Work on update site
-cd ..
-SITE=`pwd`
-
-STAGING=/home/data/httpd/download-staging.priv/dsdp/tm
-stamp=`date +'%Y%m%d-%H%M'`
-WORKDIR=${STAGING}/${stamp}
-mkdir -p ${WORKDIR}
-REALFILES=""
-NAMES=""
-echo "Bock ma's"
-for file in ${FILES}; do
- echo "file: ${file}"
- cd ${SITE}
- if [ -f ${file} ]; then
- name=`basename ${file}`
- echo "signing: ${name}"
- NAMES="${NAMES} ${name}"
- REALFILES="${REALFILES} ${file}"
- cp ${file} ${WORKDIR}
- cd ${WORKDIR}
- sign ${name} nomail >/dev/null
- fi
-done
-mkdir ${WORKDIR}/done
-cd ${WORKDIR}
-TRIES=10
-while [ $TRIES -gt 0 ]; do
- sleep 30
- anyleft=0
- echo "TRIES to go: ${TRIES}"
- for x in ${NAMES} ; do
- if [ -f ${x} ]; then
- anyleft=1
- result=`jarsigner -verify ${x}`
- if [ "$result" = "jar verified." ]; then
- echo "${result}: ${x}"
- mv ${x} ${WORKDIR}/done/${x}
- else
- echo "-pending- ${x} : ${result}" | head -1
- sleep 30
- fi
- fi
- done
- if [ "${anyleft}" = "0" ]; then
- TRIES=0
- ok=1
- else
- echo "--> left:"
- ls
- TRIES=`expr $TRIES - 1`
- ok=0
- fi
-done
-if [ "$ok" = "1" ]; then
- cd ${SITE}
- echo "Signed, ok, packing: ${REALFILES}"
- for x in ${REALFILES} ; do
- name=`basename ${x}`
- #cp -f ${WORKDIR}/done/${name} ${x}
- echo "signed, packing: ${x}"
- java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
- -application org.eclipse.update.core.siteOptimizer \
- -jarProcessor -outputDir `dirname ${x}` \
- -pack ${WORKDIR}/done/${name}
- done
- rm -rf ${WORKDIR}
-else
- echo "Something went wrong during staging and signing."
- echo "Keeping existing update site intact."
- rm -rf ${WORKDIR}
- exit 1
-fi
-
-#Create the digest
-echo "Creating digest..."
-#java -jar $HOME/ws2/eclipse/startup.jar \
-java -jar ${basebuilder}/plugins/org.eclipse.equinox.launcher.jar \
- -application org.eclipse.update.core.siteOptimizer \
- -digestBuilder -digestOutputDir=$SITE \
- -siteXML=$SITE/site.xml
-
-cd $SITE
-chgrp -R dsdp-tmadmin .
-chmod -R g+w .
-chmod -R a+r .
-cd $curdir
diff --git a/releng/org.eclipse.rse.updatesite/bin/stageMilestones.sh b/releng/org.eclipse.rse.updatesite/bin/stageMilestones.sh
deleted file mode 100755
index 3e8f5523f..000000000
--- a/releng/org.eclipse.rse.updatesite/bin/stageMilestones.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2007 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/sh
-curdir=`pwd`
-cd `dirname $0`
-mydir=`pwd`
-
-umask 022
-
-#Use Java5 on build.eclipse.org - need JRE for pack200
-export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/jre/bin:/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
-basebuilder=${HOME}/ws2/org.eclipse.releng.basebuilder
-
-# patch site.xml
-cd ..
-SITE=`pwd`
-
-# get newest plugins and features: to be done manually on real update site
-if [ `basename $SITE` != milestones ]; then
- echo "Must run on milestones update site"
- cd "$curdir"
- exit 1
-fi
-
-# store away previous version
-echo "Storing away old versions"
-if [ -d features.sav ]; then
- rm -rf features.sav
-fi
-if [ -d plugins.sav ]; then
- rm -rf plugins.sav
-fi
-mkdir features.sav
-mkdir plugins.sav
-mv features/*_2.0.1.v* features.sav
-mv features/*_1.0.1.v* features.sav
-mv plugins/*_2.0.1.v* plugins.sav
-mv plugins/*_1.0.1.v* plugins.sav
-
-# copy new version
-echo "Copying new versions"
-cp ../../signedUpdates/features/*_2.0.1.v* features
-cp ../../signedUpdates/features/*_1.0.1.v* features
-cp ../../signedUpdates/plugins/*_2.0.1.v* plugins
-cp ../../signedUpdates/plugins/*_1.0.1.v* plugins
-
-# diff, to be safe
-ls features.sav | sort > f1.$$.txt
-ls plugins.sav | sort > p1.$$.txt
-ls features | grep '_[12]\.0\.1\.v' | sort > f2.$$.txt
-ls plugins | grep '_[12]\.0\.1\.v' | sort > p2.$$.txt
-echo "Plugins diff:"
-diff p1.$$.txt p2.$$.txt
-echo "Features diff:"
-diff f1.$$.txt f2.$$.txt
-rm f1.$$.txt f2.$$.txt p1.$$.txt p2.$$.txt
-
-cd "$curdir"
-exit 0 \ No newline at end of file
diff --git a/releng/org.eclipse.rse.updatesite/index.html b/releng/org.eclipse.rse.updatesite/index.html
deleted file mode 100644
index 0bfdcea12..000000000
--- a/releng/org.eclipse.rse.updatesite/index.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<html>
-<head>
-<title>Target Management Project 2.0 Updates</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<style>@import url("web/site.css");</style>
-<script type="text/javascript">
- var returnval = 0;
- var stylesheet, xmlFile, cache, doc;
- function init(){
- // NSCP 7.1+ / Mozilla 1.4.1+ / Safari
- // Use the standard DOM Level 2 technique, if it is supported
- if (document.implementation && document.implementation.createDocument) {
- xmlFile = document.implementation.createDocument("", "", null);
- stylesheet = document.implementation.createDocument("", "", null);
- if (xmlFile.load){
- xmlFile.load("site.xml");
- stylesheet.load("web/site.xsl");
- } else {
- alert("Document could not be loaded by browser.");
- }
- xmlFile.addEventListener("load", transform, false);
- stylesheet.addEventListener("load", transform, false);
- }
- //IE 6.0+ solution
- else if (window.ActiveXObject) {
- xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
- xmlFile.async = false;
- xmlFile.load("site.xml");
- stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
- stylesheet.async = false;
- stylesheet.load("web/site.xsl");
- cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
- cache.stylesheet = stylesheet;
- transformData();
- }
- }
- // separate transformation function for IE 6.0+
- function transformData(){
- var processor = cache.createProcessor();
- processor.input = xmlFile;
- processor.transform();
- data.innerHTML = processor.output;
- }
- // separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+
- function transform(){
- returnval+=1;
- if (returnval==2){
- var processor = new XSLTProcessor();
- processor.importStylesheet(stylesheet);
- doc = processor.transformToDocument(xmlFile);
- document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
- }
- }
-</script>
-</head>
-<body onload="init();">
- <div align="right" width="230">
- <a href="http://www.eclipse.org/dsdp/tm/images/RSESample.gif">
- <img src="http://www.eclipse.org/dsdp/tm/images/RSESample_4x.gif" alt="[RSE Sample Screenshot]" border="0" width="230" height="165" title="RSE Sample Screenshot" />
- </a>
- </div>
-
- <h1 class="title">Target Management Project 2.0 Updates</h1>
- <h2>Just getting started?</h2>
- <p><b>See <a href="http://www.eclipse.org/dsdp/tm/tutorial/">http://www.eclipse.org/dsdp/tm/tutorial/</a></b></p>
- <hr/>
- <p>For getting the software on this site, you need to use the Eclipse
- <a href="http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-34.htm">
- Update Manager</a> (choose <i>Help &gt; Software Updates &gt; Find and Install</i>
- in Eclipse 3.3 or later).<br/>
- Define a new remote update site named "Target Management Updates",
- and specify</p>
- <p><code>&nbsp;&nbsp;&nbsp;http://download.eclipse.org/dsdp/tm/updates/2.0/</code></p>
- <p>as the URL to use.
- See <a href="http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-34.htm">
- Eclipse Help</a> for general information about using Update Manager.</p>
- <p>If you do not have Eclipse installed yet, better use the
- <a href="http://download.eclipse.org/dsdp/tm/downloads/">downloads from this site</a>.</p>
-<!--[insert static HTML here]-->
-<div id="data"><!-- this is where the transformed data goes --></div>
-</body>
-</html>
diff --git a/releng/org.eclipse.rse.updatesite/site.xml b/releng/org.eclipse.rse.updatesite/site.xml
deleted file mode 100644
index 41282325a..000000000
--- a/releng/org.eclipse.rse.updatesite/site.xml
+++ /dev/null
@@ -1,684 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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
- -->
-
-<site pack200="true"
- mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/dsdp/tm/updates/2.0/site.xml&amp;format=xml&amp;protocol=http"
- digestURL="http://download.eclipse.org/dsdp/tm/updates/2.0/">
-<!-- was disabled due to bug 163406 digestURL="http://download.eclipse.org/dsdp/tm/updates/2.0/" -->
- <description url="http://download.eclipse.org/dsdp/tm/updates/2.0/">
- This is the Target Management Project 2.0 Update Site.
- </description>
-<!-- BEGIN_2_0 -->
- <feature url="features/org.eclipse.rse.sdk_2.0.0.v20070609-7J--E7ZoHIP4RfkXykCt2OjoBujq.jar" id="org.eclipse.rse.sdk" version="2.0.0.v20070609-7J--E7ZoHIP4RfkXykCt2OjoBujq">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse_2.0.0.v20070609-7D--8mJIOQ6RwTkIMtp8OQKB.jar" id="org.eclipse.rse" version="2.0.0.v20070609-7D--8mJIOQ6RwTkIMtp8OQKB">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_2.0.0.v20070609-6--9oA55P5M7Q.jar" id="org.eclipse.rse.examples" version="2.0.0.v20070609-6--9oA55P5M7Q">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.0.0.v20070609-4--8s733G3E3G.jar" id="org.eclipse.rse.remotecdt" version="2.0.0.v20070609-4--8s733G3E3G">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_2.0.0.v20070611-7J--E8McIJNJCPr.jar" id="org.eclipse.tm.discovery" version="2.0.0.v20070611-7J--E8McIJNJCPr">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_1.0.0.v20070609-7_--AvNDwNXrOcIwMflhNDDmDhHa.jar" id="org.eclipse.tm.terminal.sdk" version="1.0.0.v20070609-7_--AvNDwNXrOcIwMflhNDDmDhHa">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.core_2.0.0.v20070609-7P--EB7sQRxRjbc.jar" id="org.eclipse.rse.core" version="2.0.0.v20070609-7P--EB7sQRxRjbc">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_2.0.0.v20070609-7F--DUUEF6Ez0L1.jar" id="org.eclipse.rse.dstore" version="2.0.0.v20070609-7F--DUUEF6Ez0L1">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_2.0.0.v20070609-77378_kE77Y7U9K5G7A.jar" id="org.eclipse.rse.ftp" version="2.0.0.v20070609-77378_kE77Y7U9K5G7A">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.0.0.v20070609-7_--AgI99h9c9c.jar" id="org.eclipse.rse.local" version="2.0.0.v20070609-7_--AgI99h9c9c">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.0.0.v20070609-78--_kE77Y7U7U.jar" id="org.eclipse.rse.ssh" version="2.0.0.v20070609-78--_kE77Y7U7U">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.0.0.v20070609-6378AgI99h9cEU5G7A.jar" id="org.eclipse.rse.telnet" version="2.0.0.v20070609-6378AgI99h9cEU5G7A">
- <category name="TM and RSE 2.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_2.0.0.v20070609-6--9oA55P5M7J.jar" id="org.eclipse.rse.tests" version="2.0.0.v20070609-6--9oA55P5M7J">
- <category name="TM and RSE 2.0"/>
- </feature>
- <category-def name="TM and RSE 2.0" label="TM and RSE 2.0">
- <description>
- Features and add-ons of the 2.0 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_2_0 -->
-<!-- BEGIN_2_0_patches -->
- <feature url="features/org.eclipse.rse.sdk_2.0.0.v20070706-7J--E7ZoHIP4TfeXykCt2OjqBvjq.jar" id="org.eclipse.rse.sdk" version="2.0.0.v20070706-7J--E7ZoHIP4TfeXykCt2OjqBvjq">
- <category name="TM and RSE 2.0 patches (aka 2.0.0.1)"/>
- </feature>
- <feature url="features/org.eclipse.rse_2.0.0.v20070706-7D--8mJIOQ6RwTkIMvp9OQKB.jar" id="org.eclipse.rse" version="2.0.0.v20070706-7D--8mJIOQ6RwTkIMvp9OQKB">
- <category name="TM and RSE 2.0 patches (aka 2.0.0.1)"/>
- </feature>
- <feature url="features/org.eclipse.rse.core_2.0.0.v20070706-7P--EB7sQRxRkbd.jar" id="org.eclipse.rse.core" version="2.0.0.v20070706-7P--EB7sQRxRkbd">
- <category name="TM and RSE 2.0 patches (aka 2.0.0.1)"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_2.0.0.v20070706-77378_kE77Y7V9K5G7A.jar" id="org.eclipse.rse.ftp" version="2.0.0.v20070706-77378_kE77Y7V9K5G7A">
- <category name="TM and RSE 2.0 patches (aka 2.0.0.1)"/>
- </feature>
- <category-def name="TM and RSE 2.0 patches (aka 2.0.0.1)" label="TM and RSE 2.0 patches (aka 2.0.0.1)">
- <description>
- Patches for features and add-ons of the 2.0 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_2_0_patches -->
-<!-- BEGIN_2_0_1 -->
- <feature url="features/org.eclipse.rse.sdk_2.0.1.v20070926-7J-77E7ZoHOP4inkX-oUe-z-wI6x.jar" id="org.eclipse.rse.sdk" version="2.0.1.v20070926-7J-77E7ZoHOP4inkX-oUe-z-wI6x">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse_2.0.1.v20070926-7D-58mJIkP9WAviqV7HBvSLC.jar" id="org.eclipse.rse" version="2.0.1.v20070926-7D-58mJIkP9WAviqV7HBvSLC">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_2.0.0.v20070609-6--9oA55P5M7Q.jar" id="org.eclipse.rse.examples" version="2.0.0.v20070609-6--9oA55P5M7Q">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.0.1.v20070926-4-18s733G3K5H.jar" id="org.eclipse.rse.remotecdt" version="2.0.1.v20070926-4-18s733G3K5H">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_2.0.0.v20070611-7J--E8McIJNJCPr.jar" id="org.eclipse.tm.discovery" version="2.0.0.v20070611-7J--E8McIJNJCPr">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_1.0.1.v20070926-7_-77AvNHwNY0SWJ6NvlhNDDmDtI.jar" id="org.eclipse.tm.terminal.sdk" version="1.0.1.v20070926-7_-77AvNHwNY0SWJ6NvlhNDDmDtI">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.core_2.0.1.v20070926-7P-7BEB7sQRxSFkT.jar" id="org.eclipse.rse.core" version="2.0.1.v20070926-7P-7BEB7sQRxSFkT">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_2.0.1.v20070926-7F-4DUUEF6FALu.jar" id="org.eclipse.rse.dstore" version="2.0.1.v20070926-7F-4DUUEF6FALu">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_2.0.1.v20070926-7737__kE77Y7dDK4I7B.jar" id="org.eclipse.rse.ftp" version="2.0.1.v20070926-7737__kE77Y7dDK4I7B">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.0.1.v20070705-7_-2AgI99h9l9l.jar" id="org.eclipse.rse.local" version="2.0.1.v20070705-7_-2AgI99h9l9l">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.0.1.v20070926-78-2_kE77Y7cAW.jar" id="org.eclipse.rse.ssh" version="2.0.1.v20070926-78-2_kE77Y7cAW">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.0.1.v20070704-637AAgI99h9mBW4I7B.jar" id="org.eclipse.rse.telnet" version="2.0.1.v20070704-637AAgI99h9mBW4I7B">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_2.0.1.v20070926-6-19oA55P5SAG.jar" id="org.eclipse.rse.tests" version="2.0.1.v20070926-6-19oA55P5SAG">
- <category name="TM and RSE 2.0.1"/>
- </feature>
- <category-def name="TM and RSE 2.0.1" label="TM and RSE 2.0.1">
- <description>
- Features and add-ons of the 2.0.1 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_2_0_1 -->
-<!-- BEGIN_2_0_2 -->
- <feature url="features/org.eclipse.rse.sdk_2.0.2.v20071030-7J-79E7ZoHPP5ZoeZ-oUe1z-wJnl.jar" id="org.eclipse.rse.sdk" version="2.0.2.v20071030-7J-79E7ZoHPP5ZoeZ-oUe1z-wJnl">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse_2.0.2.v20071030-7D-68mJIkR9WAviqV8z0U9vz-C.jar" id="org.eclipse.rse" version="2.0.2.v20071030-7D-68mJIkR9WAviqV8z0U9vz-C">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_2.0.0.v20070609-6--9oA55P5M7Q.jar" id="org.eclipse.rse.examples" version="2.0.0.v20070609-6--9oA55P5M7Q">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.0.1.v20070926-4-18s733G3K5H.jar" id="org.eclipse.rse.remotecdt" version="2.0.1.v20070926-4-18s733G3K5H">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_2.0.0.v20070611-7J--E8McIJNJCPr.jar" id="org.eclipse.tm.discovery" version="2.0.0.v20070611-7J--E8McIJNJCPr">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_1.0.2.v20071030-7_-7CAvNKwNabWDLhQglhNDDmGSL.jar" id="org.eclipse.tm.terminal.sdk" version="1.0.2.v20071030-7_-7CAvNKwNabWDLhQglhNDDmGSL">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.core_2.0.2.v20071030-7P-7DEB7sQRxTz0jQb.jar" id="org.eclipse.rse.core" version="2.0.2.v20071030-7P-7DEB7sQRxTz0jQb">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_2.0.1.v20070926-7F-4DUUEF6FALu.jar" id="org.eclipse.rse.dstore" version="2.0.1.v20070926-7F-4DUUEF6FALu">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_2.0.1.v20070926-7737__kE77Y7dDK4I7B.jar" id="org.eclipse.rse.ftp" version="2.0.1.v20070926-7737__kE77Y7dDK4I7B">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.0.1.v20070705-7_-2AgI99h9l9l.jar" id="org.eclipse.rse.local" version="2.0.1.v20070705-7_-2AgI99h9l9l">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.0.1.v20070926-78-2_kE77Y7cAW.jar" id="org.eclipse.rse.ssh" version="2.0.1.v20070926-78-2_kE77Y7cAW">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.0.1.v20070704-637AAgI99h9mBW4I7B.jar" id="org.eclipse.rse.telnet" version="2.0.1.v20070704-637AAgI99h9mBW4I7B">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal_1.0.2.v20071030-1-17w31182141.jar" id="org.eclipse.tm.terminal" version="1.0.2.v20071030-1-17w31182141">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.serial_1.0.2.v20071030-1-17w31182141.jar" id="org.eclipse.tm.terminal.serial" version="1.0.2.v20071030-1-17w31182141">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.view_1.0.2.v20071023-1-17w31182134.jar" id="org.eclipse.tm.terminal.view" version="1.0.2.v20071023-1-17w31182134">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_2.0.1.v20070926-6-19oA55P5SAG.jar" id="org.eclipse.rse.tests" version="2.0.1.v20070926-6-19oA55P5SAG">
- <category name="TM and RSE 2.0.2"/>
- </feature>
- <category-def name="TM and RSE 2.0.2" label="TM and RSE 2.0.2">
- <description>
- Features and add-ons of the 2.0.2 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_2_0_2 -->
-<!-- BEGIN_2_0_3 -->
- <feature url="features/org.eclipse.rse.sdk_2.0.3.v20080225-7J-7EE7ZoHQURqoFwQQpz0MuGUHD.jar" id="org.eclipse.rse.sdk" version="2.0.3.v20080225-7J-7EE7ZoHQURqoFwQQpz0MuGUHD">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse_2.0.3.v20080225-7D-7A8mJIoa9WAvksISSE8yz-C.jar" id="org.eclipse.rse" version="2.0.3.v20080225-7D-7A8mJIoa9WAvksISSE8yz-C">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_2.0.0.v20070609-6--9oA55P5M7Q.jar" id="org.eclipse.rse.examples" version="2.0.0.v20070609-6--9oA55P5M7Q">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.0.1.v20070926-4-18s733G3K5H.jar" id="org.eclipse.rse.remotecdt" version="2.0.1.v20070926-4-18s733G3K5H">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_2.0.0.v20070611-7J--E8McIJNJCPr.jar" id="org.eclipse.tm.discovery" version="2.0.0.v20070611-7J--E8McIJNJCPr">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_1.0.3.v20080225-7_-7QAvNRwRYVZHJaTqlhNDDqELO.jar" id="org.eclipse.tm.terminal.sdk" version="1.0.3.v20080225-7_-7QAvNRwRYVZHJaTqlhNDDqELO">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.core_2.0.3.v20080225-7P-7IEB7sQRz0SoiTb.jar" id="org.eclipse.rse.core" version="2.0.3.v20080225-7P-7IEB7sQRz0SoiTb">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_2.0.1.v20070926-7F-4DUUEF6FALu.jar" id="org.eclipse.rse.dstore" version="2.0.1.v20070926-7F-4DUUEF6FALu">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_2.0.3.v20080225-7737D_kE77a7PDI4I7B.jar" id="org.eclipse.rse.ftp" version="2.0.3.v20080225-7737D_kE77a7PDI4I7B">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.0.1.v20070705-7_-2AgI99h9l9l.jar" id="org.eclipse.rse.local" version="2.0.1.v20070705-7_-2AgI99h9l9l">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.0.3.v20080225-78-6_kE77a7OAU.jar" id="org.eclipse.rse.ssh" version="2.0.3.v20080225-78-6_kE77a7OAU">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.0.1.v20070704-637AAgI99h9mBW4I7B.jar" id="org.eclipse.rse.telnet" version="2.0.1.v20070704-637AAgI99h9mBW4I7B">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.serial_1.0.2.v20071030-1-17w31182141.jar" id="org.eclipse.tm.terminal.serial" version="1.0.2.v20071030-1-17w31182141">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.ssh_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal.ssh" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.telnet_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal.telnet" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.view_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal.view" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_2.0.1.v20070926-6-19oA55P5SAG.jar" id="org.eclipse.rse.tests" version="2.0.1.v20070926-6-19oA55P5SAG">
- <category name="TM and RSE 2.0.3"/>
- </feature>
- <category-def name="TM and RSE 2.0.3" label="TM and RSE 2.0.3">
- <description>
- Features and add-ons of the 2.0.3 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_2_0_3 -->
-<!-- BEGIN_2_0_4 -->
- <feature url="features/org.eclipse.rse.sdk_2.0.4.v20080418-7J-7GE7ZoHQVRsnIwSQpz0OuGULB.jar" id="org.eclipse.rse.sdk" version="2.0.4.v20080418-7J-7GE7ZoHQVRsnIwSQpz0OuGULB">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse_2.0.4.v20080418-7D-7B8mJIoc9WAvksIWQK8yz-C.jar" id="org.eclipse.rse" version="2.0.4.v20080418-7D-7B8mJIoc9WAvksIWQK8yz-C">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_2.0.0.v20070609-6--9oA55P5M7Q.jar" id="org.eclipse.rse.examples" version="2.0.0.v20070609-6--9oA55P5M7Q">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.0.1.v20070926-4-18s733G3K5H.jar" id="org.eclipse.rse.remotecdt" version="2.0.1.v20070926-4-18s733G3K5H">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_2.0.0.v20070611-7J--E8McIJNJCPr.jar" id="org.eclipse.tm.discovery" version="2.0.0.v20070611-7J--E8McIJNJCPr">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_1.0.3.v20080225-7_-7QAvNRwRYVZHJaTqlhNDDqELO.jar" id="org.eclipse.tm.terminal.sdk" version="1.0.3.v20080225-7_-7QAvNRwRYVZHJaTqlhNDDqELO">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.core_2.0.3.v20080225-7P-7IEB7sQRz0SoiTb.jar" id="org.eclipse.rse.core" version="2.0.3.v20080225-7P-7IEB7sQRz0SoiTb">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_2.0.1.v20070926-7F-4DUUEF6FALu.jar" id="org.eclipse.rse.dstore" version="2.0.1.v20070926-7F-4DUUEF6FALu">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_2.0.4.v20080418-7737F_kE77a7TBO4I7B.jar" id="org.eclipse.rse.ftp" version="2.0.4.v20080418-7737F_kE77a7TBO4I7B">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.0.1.v20070705-7_-2AgI99h9l9l.jar" id="org.eclipse.rse.local" version="2.0.1.v20070705-7_-2AgI99h9l9l">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.0.3.v20080225-78-6_kE77a7OAU.jar" id="org.eclipse.rse.ssh" version="2.0.3.v20080225-78-6_kE77a7OAU">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.0.1.v20070704-637AAgI99h9mBW4I7B.jar" id="org.eclipse.rse.telnet" version="2.0.1.v20070704-637AAgI99h9mBW4I7B">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.serial_1.0.2.v20071030-1-17w31182141.jar" id="org.eclipse.tm.terminal.serial" version="1.0.2.v20071030-1-17w31182141">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.ssh_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal.ssh" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.telnet_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal.telnet" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.view_1.0.3.v20080225-1-27w31191336.jar" id="org.eclipse.tm.terminal.view" version="1.0.3.v20080225-1-27w31191336">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_2.0.1.v20070926-6-19oA55P5SAG.jar" id="org.eclipse.rse.tests" version="2.0.1.v20070926-6-19oA55P5SAG">
- <category name="TM and RSE 2.0.4"/>
- </feature>
- <category-def name="TM and RSE 2.0.4" label="TM and RSE 2.0.4">
- <description>
- Features and add-ons of the 2.0.4 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_2_0_4 -->
-<!-- BEGIN_3_0 -->
- <feature url="features/org.eclipse.rse.core_3.0.0.v20080609-7Z3-EB7sQS9RiVd.jar" id="org.eclipse.rse.core" version="3.0.0.v20080609-7Z3-EB7sQS9RiVd">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.0.0.v20080609-7J3-DUUEFDEyF.jar" id="org.eclipse.rse.dstore" version="3.0.0.v20080609-7J3-DUUEFDEyF">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.0.v20080609-78478_kE77c7O7W5I55.jar" id="org.eclipse.rse.ftp" version="3.0.0.v20080609-78478_kE77c7O7W5I55">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.0.v20080604-7_4-AgI99m9c9S.jar" id="org.eclipse.rse.local" version="2.1.0.v20080604-7_4-AgI99m9c9S">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.0.0.v20080609-7H3-8qfbaJJZCz-G-QT8RWUC6.jar" id="org.eclipse.rse" version="3.0.0.v20080609-7H3-8qfbaJJZCz-G-QT8RWUC6">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.0.0.v20080609-7Q3-E8VwNKi_uz0rSEApXAaTcHQS.jar" id="org.eclipse.rse.sdk" version="3.0.0.v20080609-7Q3-E8VwNKi_uz0rSEApXAaTcHQS">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.1.0.v20080604-783-_kE77c7U7M.jar" id="org.eclipse.rse.ssh" version="2.1.0.v20080604-783-_kE77c7U7M">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.1.0.v20080604-6678AgI99m9W9W5I55.jar" id="org.eclipse.rse.telnet" version="2.1.0.v20080604-6678AgI99m9W9W5I55">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.0.0.v20080604-780-9oA55S5M5G.jar" id="org.eclipse.rse.examples" version="3.0.0.v20080604-780-9oA55S5M5G">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.1.0.v20080604-41-8s733I3E39.jar" id="org.eclipse.rse.remotecdt" version="2.1.0.v20080604-41-8s733I3E39">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_0.1.0.v20080610-22-9sB6EO_O8X2842.jar" id="org.eclipse.rse.terminals" version="0.1.0.v20080610-22-9sB6EO_O8X2842">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.0.v20080604-21-8s733I3E3A.jar" id="org.eclipse.rse.useractions" version="1.1.0.v20080604-21-8s733I3E3A">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.1.0.v20080604-02-9oA55S5M5I.jar" id="org.eclipse.rse.wince" version="0.1.0.v20080604-02-9oA55S5M5I" os="win32" arch="x86">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.0.v20080530-7N-E8ME8McIJXIwdh.jar" id="org.eclipse.tm.discovery" version="3.0.0.v20080530-7N-E8ME8McIJXIwdh">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_2.0.0.v20080609-7J--B-NDwSXnUKIyQYlhNDDrDeLT.jar" id="org.eclipse.tm.terminal.sdk" version="2.0.0.v20080609-7J--B-NDwSXnUKIyQYlhNDDrDeLT">
- <category name="TM and RSE 3.0"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.0.0.v20080605-7D3_79oA55S5M5J.jar" id="org.eclipse.rse.tests" version="3.0.0.v20080605-7D3_79oA55S5M5J">
- <category name="TM and RSE 3.0"/>
- </feature>
- <category-def name="TM and RSE 3.0" label="TM and RSE 3.0">
- <description>
- Features and add-ons of the 3.0 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_0 -->
-<!-- BEGIN_3_0_1 -->
- <feature url="features/org.eclipse.rse.core_3.0.1.v200809171600-7Z379EB7sQS9S4YPJaHC.jar" id="org.eclipse.rse.core" version="3.0.1.v200809171600-7Z379EB7sQS9S4YPJaHC">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.0.1.v200809181500-7J32DUUEFDF8Hu9FH7.jar" id="org.eclipse.rse.dstore" version="3.0.1.v200809181500-7J32DUUEFDF8Hu9FH7">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.1.v200809171630-78479_kE77c7Q8b8T_F.jar" id="org.eclipse.rse.ftp" version="3.0.1.v200809171630-78479_kE77c7Q8b8T_F">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.1.v20080710-7_40AgI99m9d_O.jar" id="org.eclipse.rse.local" version="2.1.1.v20080710-7_40AgI99m9d_O">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.0.1.v200809181500-7H368qfenEMeUOENNFdiKV_gK8.jar" id="org.eclipse.rse" version="3.0.1.v200809181500-7H368qfenEMeUOENNFdiKV_gK8">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.0.1.v200809181500-7Q379E8VwNRiAF6ydJFuZH7RGg1d.jar" id="org.eclipse.rse.sdk" version="3.0.1.v200809181500-7Q379E8VwNRiAF6ydJFuZH7RGg1d">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.1.1.v20080714-7830_kE77c7V8M.jar" id="org.eclipse.rse.ssh" version="2.1.1.v20080714-7830_kE77c7V8M">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.1.1.v200809181500-6678AgI99m9W9X5J79.jar" id="org.eclipse.rse.telnet" version="2.1.1.v200809181500-6678AgI99m9W9X5J79">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.0.0.v20080604-780-9oA55S5M5G.jar" id="org.eclipse.rse.examples" version="3.0.0.v20080604-780-9oA55S5M5G">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.1.1.v200809041200-4118s733I3J4F5C48.jar" id="org.eclipse.rse.remotecdt" version="2.1.1.v200809041200-4118s733I3J4F5C48">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_0.1.1.v200809041200-2229sB7EO_T_T5C6B3457.jar" id="org.eclipse.rse.terminals" version="0.1.1.v200809041200-2229sB7EO_T_T5C6B3457">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.1.v200809041200-2118s733I3K484673.jar" id="org.eclipse.rse.useractions" version="1.1.1.v200809041200-2118s733I3K484673">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.1.1.v20080626-0219oA55S5M9M.jar" id="org.eclipse.rse.wince" version="0.1.1.v20080626-0219oA55S5M9M" os="win32" arch="x86">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.0.v20080530-7N-E8ME8McIJXIwdh.jar" id="org.eclipse.tm.discovery" version="3.0.0.v20080530-7N-E8ME8McIJXIwdh">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_2.0.1.v200807281235-7J-79B-NIwSXwVTN4Y0c5RRRNHYG.jar" id="org.eclipse.tm.terminal.sdk" version="2.0.1.v200807281235-7J-79B-NIwSXwVTN4Y0c5RRRNHYG">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.0.1.v200809041200-7D3_99oA55S5R7H2311.jar" id="org.eclipse.rse.tests" version="3.0.1.v200809041200-7D3_99oA55S5R7H2311">
- <category name="TM and RSE 3.0.1"/>
- </feature>
- <category-def name="TM and RSE 3.0.1" label="TM and RSE 3.0.1">
- <description>
- Features and add-ons of the 3.0.1 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_0_1 -->
-<!-- BEGIN_3_0_2 -->
- <feature url="features/org.eclipse.rse.core_3.0.2.v200812041720-7Z37BEB7sQS9UkXMIjJI.jar" id="org.eclipse.rse.core" version="3.0.2.v200812041720-7Z37BEB7sQS9UkXMIjJI">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.0.2.v200812041720-7J35DUUEFDHoHxAT97.jar" id="org.eclipse.rse.dstore" version="3.0.2.v200812041720-7J35DUUEFDHoHxAT97">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.1.v200809171630-78479_kE77c7Q8b8T_F.jar" id="org.eclipse.rse.ftp" version="3.0.1.v200809171630-78479_kE77c7Q8b8T_F">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.1.v20080710-7_40AgI99m9d_O.jar" id="org.eclipse.rse.local" version="2.1.1.v20080710-7_40AgI99m9d_O">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.0.2.v200812041720-7H3788qfeqHMeUOEQ2IKjVLIiQ8.jar" id="org.eclipse.rse" version="3.0.2.v200812041720-7H3788qfeqHMeUOEQ2IKjVLIiQ8">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.0.2.v200812041720-7Q37BE8VwNShWC5jCH32fQz0U6Ng.jar" id="org.eclipse.rse.sdk" version="3.0.2.v200812041720-7Q37BE8VwNShWC5jCH32fQz0U6Ng">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.1.1.v20080714-7830_kE77c7V8M.jar" id="org.eclipse.rse.ssh" version="2.1.1.v20080714-7830_kE77c7V8M">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.1.1.v200809181500-6678AgI99m9W9X5J79.jar" id="org.eclipse.rse.telnet" version="2.1.1.v200809181500-6678AgI99m9W9X5J79">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.0.0.v20080604-780-9oA55S5M5G.jar" id="org.eclipse.rse.examples" version="3.0.0.v20080604-780-9oA55S5M5G">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.1.1.v200809041200-4118s733I3J4F5C48.jar" id="org.eclipse.rse.remotecdt" version="2.1.1.v200809041200-4118s733I3J4F5C48">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_0.1.1.v200809041200-2229sB7EO_T_T5C6B3457.jar" id="org.eclipse.rse.terminals" version="0.1.1.v200809041200-2229sB7EO_T_T5C6B3457">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.2.v200812041720-2138s733I573A5G73.jar" id="org.eclipse.rse.useractions" version="1.1.2.v200812041720-2138s733I573A5G73">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.1.1.v20080626-0219oA55S5M9M.jar" id="org.eclipse.rse.wince" version="0.1.1.v20080626-0219oA55S5M9M" os="win32" arch="x86">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.0.v20080530-7N-E8ME8McIJXIwdh.jar" id="org.eclipse.tm.discovery" version="3.0.0.v20080530-7N-E8ME8McIJXIwdh">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_2.0.2.v200811110900-7J-7AB-NJwSYqUMN5TqbBONRNHYG.jar" id="org.eclipse.tm.terminal.sdk" version="2.0.2.v200811110900-7J-7AB-NJwSYqUMN5TqbBONRNHYG">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.0.1.v200809041200-7D3_99oA55S5R7H2311.jar" id="org.eclipse.rse.tests" version="3.0.1.v200809041200-7D3_99oA55S5R7H2311">
- <category name="TM and RSE 3.0.2"/>
- </feature>
- <category-def name="TM and RSE 3.0.2" label="TM and RSE 3.0.2">
- <description>
- Features and add-ons of the 3.0.2 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_0_2 -->
-<!-- BEGIN_3_0_3 -->
- <feature url="features/org.eclipse.rse.core_3.0.3.v200902042310-7Z37HEB7sQSCRiULOVOE.jar" id="org.eclipse.rse.core" version="3.0.3.v200902042310-7Z37HEB7sQSCRiULOVOE">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.0.3.v200902042310-7J378DUUEFGEpIz-AW8E.jar" id="org.eclipse.rse.dstore" version="3.0.3.v200902042310-7J378DUUEFGEpIz-AW8E">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.1.v200809171630-78479_kE77c7Q8b8T_F.jar" id="org.eclipse.rse.ftp" version="3.0.1.v200809171630-78479_kE77c7Q8b8T_F">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.1.v20080710-7_40AgI99m9d_O.jar" id="org.eclipse.rse.local" version="2.1.1.v20080710-7_40AgI99m9d_O">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.0.3.v200902042310-7H37E8qfisI6diJKMbrhR-TV-a3.jar" id="org.eclipse.rse" version="3.0.3.v200902042310-7H37E8qfisI6diJKMbrhR-TV-a3">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.0.3.v200902042310-7Q37JE8VwNSsU34mKIp3tM4Uhwlm.jar" id="org.eclipse.rse.sdk" version="3.0.3.v200902042310-7Q37JE8VwNSsU34mKIp3tM4Uhwlm">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_2.1.1.v20080714-7830_kE77c7V8M.jar" id="org.eclipse.rse.ssh" version="2.1.1.v20080714-7830_kE77c7V8M">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.1.1.v200809181500-6678AgI99m9W9X5J79.jar" id="org.eclipse.rse.telnet" version="2.1.1.v200809181500-6678AgI99m9W9X5J79">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.0.0.v20080604-780-9oA55S5M5G.jar" id="org.eclipse.rse.examples" version="3.0.0.v20080604-780-9oA55S5M5G">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.remotecdt_2.1.1.v200809041200-4118s733I3J4F5C48.jar" id="org.eclipse.rse.remotecdt" version="2.1.1.v200809041200-4118s733I3J4F5C48">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_0.1.3.v200902181600-2269sB9EP_M_W5B5B3822.jar" id="org.eclipse.rse.terminals" version="0.1.3.v200902181600-2269sB9EP_M_W5B5B3822">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.2.v200812041720-2138s733I573A5G73.jar" id="org.eclipse.rse.useractions" version="1.1.2.v200812041720-2138s733I573A5G73">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.1.1.v20080626-0219oA55S5M9M.jar" id="org.eclipse.rse.wince" version="0.1.1.v20080626-0219oA55S5M9M" os="win32" arch="x86">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.0.v20080530-7N-E8ME8McIJXIwdh.jar" id="org.eclipse.tm.discovery" version="3.0.0.v20080530-7N-E8ME8McIJXIwdh">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_2.0.3.v200902181600-7J-7EB-NLwTYlTNN4PlbFLKRNHYG.jar" id="org.eclipse.tm.terminal.sdk" version="2.0.3.v200902181600-7J-7EB-NLwTYlTNN4PlbFLKRNHYG">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.0.1.v200809041200-7D3_99oA55S5R7H2311.jar" id="org.eclipse.rse.tests" version="3.0.1.v200809041200-7D3_99oA55S5R7H2311">
- <category name="TM and RSE 3.0.3"/>
- </feature>
- <category-def name="TM and RSE 3.0.3" label="TM and RSE 3.0.3">
- <description>
- Features and add-ons of the 3.0.3 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_0_3 -->
-<!-- BEGIN_3_1 -->
- <feature url="features/org.eclipse.rse.core_3.1.0.v200905272300-7a7CEoFC7sRTNS_oZt3fk.jar" id="org.eclipse.rse.core" version="3.1.0.v200905272300-7a7CEoFC7sRTNS_oZt3fk">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.1.0.v200905272300-7L6EoEVVFGMFvQtVaPU.jar" id="org.eclipse.rse.dstore" version="3.1.0.v200905272300-7L6EoEVVFGMFvQtVaPU">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.100.v200905272300-780A79oB55W5KBQBD9D.jar" id="org.eclipse.rse.ftp" version="3.0.100.v200905272300-780A79oB55W5KBQBD9D">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.100.v200905272300-7B4EoBgJ99r9YJhJO99.jar" id="org.eclipse.rse.local" version="2.1.100.v200905272300-7B4EoBgJ99r9YJhJO99">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.1.0.v200905272300-7L5A78wqaCHMdrOqK3DvjpYKCnp3.jar" id="org.eclipse.rse" version="3.1.0.v200905272300-7L5A78wqaCHMdrOqK3DvjpYKCnp3">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.1.0.v200905272300-7U78A7F8Wz-QWqV1Uz0r3gyz0Pcu.jar" id="org.eclipse.rse.sdk" version="3.1.0.v200905272300-7U78A7F8Wz-QWqV1Uz0r3gyz0Pcu">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_3.0.0.v200905272300-7A2BgAkF77g7RFZFJ77.jar" id="org.eclipse.rse.ssh" version="3.0.0.v200905272300-7A2BgAkF77g7RFZFJ77">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.2.0.v200905272300-773-AkF77g7RFZFIBF.jar" id="org.eclipse.rse.telnet" version="2.2.0.v200905272300-773-AkF77g7RFZFIBF">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.1.0.v200905272300-7B5-AkF77g7RFZFJ77.jar" id="org.eclipse.rse.examples" version="3.1.0.v200905272300-7B5-AkF77g7RFZFJ77">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_1.0.0.v200905272300-77--9uC6FSANEbEMAF4522.jar" id="org.eclipse.rse.terminals" version="1.0.0.v200905272300-77--9uC6FSANEbEMAF4522">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.1.0.v200905272300-7H5F8NAkF77g7RFZFJ77.jar" id="org.eclipse.rse.tests" version="3.1.0.v200905272300-7H5F8NAkF77g7RFZFJ77">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.100.v200905272300-31A78s733L3D7H7933.jar" id="org.eclipse.rse.useractions" version="1.1.100.v200905272300-31A78s733L3D7H7933">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.2.0.v200905272300-15A7AkF77g7RFZFJ77.jar" id="org.eclipse.rse.wince" version="0.2.0.v200905272300-15A7AkF77g7RFZFJ77" os="win32" arch="x86">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.100.v200905272300-7d-FhJFEx2XZtYr4N3JXX.jar" id="org.eclipse.tm.discovery" version="3.0.100.v200905272300-7d-FhJFEx2XZtYr4N3JXX">
- <category name="TM and RSE 3.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_3.0.0.v200905272300-7N-FBVC5OpbOz0uZ45hjchPQEB.jar" id="org.eclipse.tm.terminal.sdk" version="3.0.0.v200905272300-7N-FBVC5OpbOz0uZ45hjchPQEB">
- <category name="TM and RSE 3.1"/>
- </feature>
- <category-def name="TM and RSE 3.1" label="TM and RSE 3.1">
- <description>
- Features and add-ons of the 3.1 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_1 -->
-<!-- BEGIN_3_1_1 -->
- <feature url="features/org.eclipse.rse.core_3.1.1.v200907301400-7a7CEwFC7sRTNSwodfv_u.jar" id="org.eclipse.rse.core" version="3.1.1.v200907301400-7a7CEwFC7sRTNSwodfv_u">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.1.1.v200907301400-7L6EsEVVFGMG4TyOVFU.jar" id="org.eclipse.rse.dstore" version="3.1.1.v200907301400-7L6EsEVVFGMG4TyOVFU">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.101.v200909160005-780A89oB55W5OAP9A9I.jar" id="org.eclipse.rse.ftp" version="3.0.101.v200909160005-780A89oB55W5OAP9A9I">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.101.v200907301400-7B4EqBgJ99r9dJ_GM9E.jar" id="org.eclipse.rse.local" version="2.1.101.v200907301400-7B4EqBgJ99r9dJ_GM9E">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.1.1.v200907301400-7L5AE8wqaHPUdsOqKFUpxnbxGiz-.jar" id="org.eclipse.rse" version="3.1.1.v200907301400-7L5AE8wqaHPUdsOqKFUpxnbxGiz-">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.1.1.v200907301400-7U78AFF8Wz-QWxVKUVnCs7-PcuWk.jar" id="org.eclipse.rse.sdk" version="3.1.1.v200907301400-7U78AFF8Wz-QWxVKUVnCs7-PcuWk">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_3.0.1.v200909160005-7A2BhAkF77g7VEYDG7C.jar" id="org.eclipse.rse.ssh" version="3.0.1.v200909160005-7A2BhAkF77g7VEYDG7C">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.2.1.v200908051630-7730AkF77g7UDXELEF.jar" id="org.eclipse.rse.telnet" version="2.2.1.v200908051630-7730AkF77g7UDXELEF">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.1.0.v200905272300-7B5-AkF77g7RFZFJ77.jar" id="org.eclipse.rse.examples" version="3.1.0.v200905272300-7B5-AkF77g7RFZFJ77">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_1.0.1.v200907301400-77-39uC7FSAW8XBVLD3622.jar" id="org.eclipse.rse.terminals" version="1.0.1.v200907301400-77-39uC7FSAW8XBVLD3622">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.1.1.v200909160005-7H5F8PAkF77g7ZDXBD7H.jar" id="org.eclipse.rse.tests" version="3.1.1.v200909160005-7H5F8PAkF77g7ZDXBD7H">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.100.v200905272300-31A78s733L3D7H7933.jar" id="org.eclipse.rse.useractions" version="1.1.100.v200905272300-31A78s733L3D7H7933">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.2.0.v200905272300-15A7AkF77g7RFZFJ77.jar" id="org.eclipse.rse.wince" version="0.2.0.v200905272300-15A7AkF77g7RFZFJ77" os="win32" arch="x86">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.100.v200905272300-7d-FhJFEx2XZtYr4N3JXX.jar" id="org.eclipse.tm.discovery" version="3.0.100.v200905272300-7d-FhJFEx2XZtYr4N3JXX">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_3.0.1.v200907301400-7N-FBaC5OqdP-0Zr1iqaZNOEG.jar" id="org.eclipse.tm.terminal.sdk" version="3.0.1.v200907301400-7N-FBaC5OqdP-0Zr1iqaZNOEG">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <category-def name="TM and RSE 3.1.1" label="TM and RSE 3.1.1">
- <description>
- Features and add-ons of the 3.1.1 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_1_1 -->
-<!-- BEGIN_3_2 -->
- <feature url="features/org.eclipse.rse.core_3.1.1.qualifier.jar" id="org.eclipse.rse.core" version="3.1.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.dstore_3.1.1.qualifier.jar" id="org.eclipse.rse.dstore" version="3.1.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ftp_3.0.101.qualifier.jar" id="org.eclipse.rse.ftp" version="3.0.101.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.local_2.1.101.qualifier.jar" id="org.eclipse.rse.local" version="2.1.101.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse_3.1.1.qualifier.jar" id="org.eclipse.rse" version="3.1.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.sdk_3.1.1.qualifier.jar" id="org.eclipse.rse.sdk" version="3.1.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.ssh_3.0.1.qualifier.jar" id="org.eclipse.rse.ssh" version="3.0.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.telnet_2.2.1.qualifier.jar" id="org.eclipse.rse.telnet" version="2.2.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.examples_3.1.0.qualifier.jar" id="org.eclipse.rse.examples" version="3.1.0.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.terminals_1.0.1.qualifier.jar" id="org.eclipse.rse.terminals" version="1.0.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.tests_3.1.1.qualifier.jar" id="org.eclipse.rse.tests" version="3.1.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.useractions_1.1.100.qualifier.jar" id="org.eclipse.rse.useractions" version="1.1.100.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.rse.wince_0.2.0.qualifier.jar" id="org.eclipse.rse.wince" version="0.2.0.qualifier" os="win32" arch="x86">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.discovery_3.0.100.qualifier.jar" id="org.eclipse.tm.discovery" version="3.0.100.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <feature url="features/org.eclipse.tm.terminal.sdk_3.0.1.qualifier.jar" id="org.eclipse.tm.terminal.sdk" version="3.0.1.qualifier">
- <category name="TM and RSE 3.1.1"/>
- </feature>
- <category-def name="TM and RSE 3.1.1" label="TM and RSE 3.1.1">
- <description>
- Features and add-ons of the 3.1.1 release of Target Management / RSE.
- </description>
- </category-def>
-<!-- END_3_2 -->
-</site>
diff --git a/releng/org.eclipse.rse.updatesite/web/site.css b/releng/org.eclipse.rse.updatesite/web/site.css
deleted file mode 100644
index 62c6f9ffa..000000000
--- a/releng/org.eclipse.rse.updatesite/web/site.css
+++ /dev/null
@@ -1,12 +0,0 @@
-<STYLE type="text/css">
-td.spacer {padding-bottom: 10px; padding-top: 10px;}
-.title { font-family: sans-serif; color: #99AACC;}
-.bodyText { font-family: sans-serif; font-size: 9pt; color:#000000; }
-.sub-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white;}
-.log-text {font-family: sans-serif; font-style: normal; font-weight: lighter; font-size: 8pt; color:black;}
-.big-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white; border-top:10px solid white;}
-.light-row {background:#FFFFFF}
-.dark-row {background:#EEEEFF}
-.header {background:#99AADD}
-#indent {word-wrap : break-word;width :300px;text-indent:10px;}
-</STYLE>
diff --git a/releng/org.eclipse.rse.updatesite/web/site.xsl b/releng/org.eclipse.rse.updatesite/web/site.xsl
deleted file mode 100644
index 070c3540e..000000000
--- a/releng/org.eclipse.rse.updatesite/web/site.xsl
+++ /dev/null
@@ -1,214 +0,0 @@
-<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl="urn:schemas-microsoft-com:xslt">
-<xsl:output method="html" encoding="UTF-8"/>
-<xsl:key name="cat" match="category" use="@name"/>
-<xsl:template match="/">
-<xsl:for-each select="site">
- <html>
- <head>
- <title>Target Management Project 2.0 Updates</title>
- <style>@import url("web/site.css");</style>
- </head>
- <body>
-
- <p class="bodyText"><xsl:value-of select="description"/></p>
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <xsl:for-each select="category-def">
- <xsl:sort select="@label" order="ascending" case-order="upper-first"/>
- <xsl:sort select="@name" order="ascending" case-order="upper-first"/>
- <xsl:if test="count(key('cat',@name)) != 0">
- <tr class="header">
- <td class="sub-header" width="30%">
- <xsl:value-of select="@name"/>
- </td>
- <td class="sub-header" width="70%">
- <xsl:value-of select="@label"/>
- </td>
- </tr>
- <xsl:for-each select="key('cat',@name)">
- <xsl:sort select="ancestor::feature//@version" order="ascending"/>
- <xsl:sort select="ancestor::feature//@id" order="ascending" case-order="upper-first"/>
- <tr>
- <xsl:choose>
- <xsl:when test="(position() mod 2 = 1)">
- <xsl:attribute name="class">dark-row</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">light-row</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <td class="log-text" id="indent">
- <xsl:choose>
- <xsl:when test="ancestor::feature//@label">
- <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@label"/></a>
- <br/>
- <div id="indent">
- (<xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/>)
- </div>
- </xsl:when>
- <xsl:otherwise>
- <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/></a>
- </xsl:otherwise>
- </xsl:choose>
- <br />
- </td>
- <td>
- <table>
- <xsl:if test="ancestor::feature//@os">
- <tr><td class="log-text" id="indent">Operating Systems:</td>
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@os"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="ancestor::feature//@ws">
- <tr><td class="log-text" id="indent">Windows Systems:</td>
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@ws"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="ancestor::feature//@nl">
- <tr><td class="log-text" id="indent">Languages:</td>
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@nl"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="ancestor::feature//@arch">
- <tr><td class="log-text" id="indent">Architecture:</td>
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@arch"/></td>
- </tr>
- </xsl:if>
- </table>
- </td>
- </tr>
- </xsl:for-each>
- <tr><td class="spacer"><br/></td><td class="spacer"><br/></td></tr>
- </xsl:if>
- </xsl:for-each>
- <xsl:if test="count(feature) &gt; count(feature/category)">
- <tr class="header">
- <td class="sub-header" colspan="2">
- Uncategorized
- </td>
- </tr>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="function-available('msxsl:node-set')">
- <xsl:variable name="rtf-nodes">
- <xsl:for-each select="feature[not(category)]">
- <xsl:sort select="@id" order="ascending" case-order="upper-first"/>
- <xsl:sort select="@version" order="ascending" />
- <xsl:value-of select="."/>
- <xsl:copy-of select="." />
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="myNodeSet" select="msxsl:node-set($rtf-nodes)/*"/>
- <xsl:for-each select="$myNodeSet">
- <tr>
- <xsl:choose>
- <xsl:when test="position() mod 2 = 1">
- <xsl:attribute name="class">dark-row</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">light-row</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <td class="log-text" id="indent">
- <xsl:choose>
- <xsl:when test="@label">
- <a href="{@url}"><xsl:value-of select="@label"/></a>
- <br />
- <div id="indent">
- (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
- </div>
- </xsl:when>
- <xsl:otherwise>
- <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
- </xsl:otherwise>
- </xsl:choose>
- <br /><br />
- </td>
- <td>
- <table>
- <xsl:if test="@os">
- <tr><td class="log-text" id="indent">Operating Systems:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="@ws">
- <tr><td class="log-text" id="indent">Windows Systems:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="@nl">
- <tr><td class="log-text" id="indent">Languages:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="@arch">
- <tr><td class="log-text" id="indent">Architecture:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
- </tr>
- </xsl:if>
- </table>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="feature[not(category)]">
- <xsl:sort select="@id" order="ascending" case-order="upper-first"/>
- <xsl:sort select="@version" order="ascending" />
- <tr>
- <xsl:choose>
- <xsl:when test="count(preceding-sibling::feature[not(category)]) mod 2 = 1">
- <xsl:attribute name="class">dark-row</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="class">light-row</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <td class="log-text" id="indent">
- <xsl:choose>
- <xsl:when test="@label">
- <a href="{@url}"><xsl:value-of select="@label"/></a>
- <br />
- <div id="indent">
- (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
- </div>
- </xsl:when>
- <xsl:otherwise>
- <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
- </xsl:otherwise>
- </xsl:choose>
- <br /><br />
- </td>
- <td>
- <table>
- <xsl:if test="@os">
- <tr><td class="log-text" id="indent">Operating Systems:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="@ws">
- <tr><td class="log-text" id="indent">Windows Systems:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="@nl">
- <tr><td class="log-text" id="indent">Languages:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
- </tr>
- </xsl:if>
- <xsl:if test="@arch">
- <tr><td class="log-text" id="indent">Architecture:</td>
- <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
- </tr>
- </xsl:if>
- </table>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </body>
- </html>
-</xsl:for-each>
-</xsl:template>
-</xsl:stylesheet>
diff --git a/releng/org.eclipse.tm.releng.master-feature/.project b/releng/org.eclipse.tm.releng.master-feature/.project
deleted file mode 100644
index 2bf620474..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.releng.master-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/releng/org.eclipse.tm.releng.master-feature/build.properties b/releng/org.eclipse.tm.releng.master-feature/build.properties
deleted file mode 100644
index 1284a5491..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/build.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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
diff --git a/releng/org.eclipse.tm.releng.master-feature/eclipse_update_120.jpg b/releng/org.eclipse.tm.releng.master-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/releng/org.eclipse.tm.releng.master-feature/epl-v10.html b/releng/org.eclipse.tm.releng.master-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng.master-feature/feature.properties b/releng/org.eclipse.tm.releng.master-feature/feature.properties
deleted file mode 100644
index 1e294ba62..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=TM Releng Master Feature
-
-# "description" property - description of the feature
-description=All of Target Management in one Feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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/releng/org.eclipse.tm.releng.master-feature/feature.xml b/releng/org.eclipse.tm.releng.master-feature/feature.xml
deleted file mode 100644
index 9a718bbe6..000000000
--- a/releng/org.eclipse.tm.releng.master-feature/feature.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2008, 2009 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
- id="org.eclipse.tm.releng.master"
- label="%featureName"
- version="3.0.0.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.rse.sdk"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.sdk"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.discovery"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.useractions.wrapper"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.wince.wrapper"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.examples"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.tests"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.test"
- version="0.0.0"/>
-
-</feature>
diff --git a/releng/org.eclipse.tm.releng.master-feature/license.html b/releng/org.eclipse.tm.releng.master-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/releng/org.eclipse.tm.releng.master-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/releng/org.eclipse.tm.releng/.cvsignore b/releng/org.eclipse.tm.releng/.cvsignore
deleted file mode 100644
index 3a4edf690..000000000
--- a/releng/org.eclipse.tm.releng/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-.project
diff --git a/releng/org.eclipse.tm.releng/build.xml b/releng/org.eclipse.tm.releng/build.xml
deleted file mode 100644
index 1d4767e05..000000000
--- a/releng/org.eclipse.tm.releng/build.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<project default="main">
- <property name="pde.build.scripts" value="../org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build/scripts" />
-
- <target name="init">
- <tstamp/>
- <touch file="${user.home}/.cvspass" />
- <property name="timestamp" value="${DSTAMP}${TSTAMP}" />
- <property name="buildDirectory" value="${basedir}/src/eclipse" />
-
- <property name="buildType" value="I" />
- <property name="buildId" value="${buildType}${timestamp}" />
-
- <!-- Verify buildDirectory ends in eclipse. -->
- <property name="fullBuild" location="${buildDirectory}"/>
- <basename file="${fullBuild}" property="lastSeg"/>
- <condition property="endsInEclipse">
- <equals arg1="${lastSeg}" arg2="eclipse"/>
- </condition>
- <fail message="buildDirectory's last segment is not eclipse." unless="endsInEclipse"/>
- </target>
-
- <target name="main" depends="init">
- <ant antfile="build.xml" dir="${pde.build.scripts}">
- <property name="builder" value="${basedir}/${component}" />
- </ant>
- </target>
-</project> \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/buildAll.xml b/releng/org.eclipse.tm.releng/buildAll.xml
deleted file mode 100644
index bc33b9f5a..000000000
--- a/releng/org.eclipse.tm.releng/buildAll.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-<project default="run">
- <target name="init">
-
- <echo message="Set compilerArgs = '-enableJavadoc -encoding ISO-8859-1 -warn:-serial,nls,unused,unchecked,raw'"/>
- <property name="compilerArg" value="-enableJavadoc -encoding ISO-8859-1 -warn:-serial,nls,unused,unchecked,raw" />
-
- <!-- TODO: set correct source and target levels here -->
- <echo message="Set javacSource and javacTarget = 1.4"/>
- <property name="javacSource" value="1.4" />
- <property name="javacTarget" value="1.4" />
-
- <path id="bc">
- <fileset dir="${java.home}/lib">
- <include name="*.jar" />
- </fileset>
- </path>
- <property name="bootclasspath" refid="bc" />
-
- <!-- TODO: if using JDK1.4, comment out these lines -->
- <!--
- <echo message="Set J2SE-1.5 = ${bootclasspath}"/>
- <property name="J2SE-1.5" value="${bootclasspath}"/>
- <condition property="bundleBootClasspath" value="${J2SE-1.5}"><isset property="J2SE-1.5"/></condition>
- <condition property="bundleJavacSource" value="1.5"><isset property="J2SE-1.5"/></condition>
- <condition property="bundleJavacTarget" value="1.5"><isset property="J2SE-1.5"/></condition>
- -->
-
- <property name="buildingOSGi" value="true" />
- <property name="collectingFolder" value="eclipse" />
- <property name="archivePrefix" value="eclipse" />
-
- <!-- Reduce the amount of info in the build log -->
- <property name="javacVerbose" value="false" />
-
- <property name="buildDirectory" location="${basedir}/../src/eclipse" />
- <property file="${basedir}/repoInfo.properties" />
- <property name="testBase" location="${buildDirectory}/../testing" />
- <available file="${buildDirectory}/label.properties" property="label.properties.exists" />
- <antcall target="create.label.properties" />
- <property file="${buildDirectory}/label.properties" />
-
- <echo message="buildAll.xml properties:"/>
- <echo message="basedir = ${basedir}"/>
-
- <!-- load a value for ${subprojectName}, among other variables, from build.cfg -->
- <property name="buildConfigFile" value="${basedir}/../build.cfg"/>
- <available file="${buildConfigFile}" type="file" property="buildConfigIsAvailable" />
- <fail message="Can't load build properties from ${buildConfigFile}" unless="buildConfigIsAvailable"/>
- <!-- TODO: set any special build-related properties here by echoing them into ${buildConfigFile}:
- <echo file="${buildConfigFile}" append="true">
-
-# extra properties specific to just this build
-propertyName=propertyValue
-</echo> -->
-
- <property file="${buildConfigFile}" />
-
- <echo message="buildVer = ${buildVer}"/>
- <echo message="subprojectName = ${subprojectName}"/>
-
- <!-- <echo message="Base OS: ${baseos}; Base Window System: ${basews}"/> -->
- <condition property="isWindows">
- <equals arg1="${baseos}.${basews}" arg2="win32.win32" />
- </condition>
- <condition property="isLinuxGTK">
- <equals arg1="${baseos}.${basews}" arg2="linux.gtk" />
- </condition>
- <condition property="isLinuxMotif">
- <equals arg1="${baseos}.${basews}" arg2="linux.motif" />
- </condition>
-
- </target>
-
- <target name="create.label.properties" unless="label.properties.exists">
- <mkdir dir="${buildDirectory}" />
- <tstamp />
- <property name="date" value="${DSTAMP}" />
- <property name="time" value="${TSTAMP}" />
- <property name="timestamp" value="${date}${time}" />
- <property name="buildType" value="I" />
-
- <!--this naming convention used by php scripts on download server-->
- <property name="buildLabel" value="${buildType}${timestamp}" />
-
- <property name="buildAlias" value="${buildLabel}" />
- <property name="buildId" value="${buildAlias}" />
- <!-- <property name="forceContextQualifier" value="v${timestamp}"/> -->
-
- <!--store the build label information in a file-->
- <echo file="${buildDirectory}/label.properties" append="true" >
- buildType=${buildType}
- </echo>
- <echo file="${buildDirectory}/label.properties" append="true">
- buildId=${buildId}
- </echo>
- <echo file="${buildDirectory}/label.properties" append="true">
- timestamp=${timestamp}
- </echo>
- <echo file="${buildDirectory}/label.properties" append="true">
- buildLabel=${buildLabel}
- </echo>
- <echo file="${buildDirectory}/label.properties" append="true">
- buildAlias=${buildAlias}
- </echo>
- <!--
- <echo file="${buildDirectory}/label.properties" append="true" >
- forceContextQualifier=${forceContextQualifier}
- </echo>
- -->
- </target>
-
- <target name="run" depends="init">
- <antcall target="buildAll" />
- <antcall target="test" />
- <antcall target="publish" />
- <antcall target="cleanUp" />
- </target>
-
- <target name="runTestsOnly" depends="init">
- <delete dir="${buildDirectory}" />
- <mkdir dir="${buildDirectory}/${buildLabel}" />
- <copy todir="${buildDirectory}/${buildLabel}">
- <fileset dir="${buildDirectory}/..">
- <include name="**/*.zip" />
- </fileset>
- </copy>
- <antcall target="test" />
- <antcall target="publish" />
- <antcall target="cleanUp" />
- </target>
-
- <target name="runWithoutTest" depends="init">
- <antcall target="buildAll" />
- <antcall target="publish" />
- <antcall target="cleanUp" />
- </target>
-
- <target name="buildOnly" depends="init">
- <antcall target="buildAll" />
- <antcall target="cleanUp" />
- </target>
-
- <target name="buildAll">
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/terminal" />
- </ant>
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/sdk" />
- </ant>
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/runtime" />
- </ant>
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/examples" />
- </ant>
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/discovery" />
- </ant>
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/tests" />
- </ant>
-
- <!-- doc must be the last execution -->
- <!-- we dont have a separate doc feature for TM/RSE, so leave that out for now
- <ant antfile="build.xml" target="main">
- <property name="component" value="builder/doc" />
- </ant>
- -->
-
- <!-- TODO: if necessary, you can copy files from the SDK into the runtime or examples zips here -->
- <!-- for example, see validation/buildAll.xml or cdo/buildAll.xml -->
-
- <!-- TODO: if necessary, you can remove 3rd party jars used at build time from the zips here -->
- <!-- for example, see cdo's buildAll.xml -->
-
- <!-- TODO: you can run extra build scripts here, like for building additional zip bundles -->
-
- <!-- md5 files generation -->
- <exec executable="bash" dir="${buildDirectory}/${buildLabel}">
- <arg line="${basedir}/../org.eclipse.modeling.common.releng/scripts/createZipCheckSum.sh" />
- </exec>
- </target>
-
- <target name="cleanUp">
- <echo message="** Copying generated zips to drop folder... **" />
- <copy todir="${buildDirectory}/.." failonerror="false" overwrite="true">
- <fileset dir="${buildDirectory}/${buildLabel}" />
- </copy>
- </target>
-
- <target name="test">
-
- <property name="test.xml" value="../org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml" />
- <antcall target="test-win32-local" />
- <antcall target="test-linux-gtk-local" />
- <antcall target="test-linux-motif-local" />
- </target>
-
- <target name="test-win32-local" if="isWindows">
- <ant antfile="${test.xml}">
- <property name="shell" value="relengbuildwin2.bat" />
- <property name="tester" value="${basedir}/builder/tests/configs/local" />
- </ant>
- </target>
-
- <target name="test-linux-gtk-local" if="isLinuxGTK">
- <ant antfile="${test.xml}">
- <property name="shell" value="relengbuildgtk.sh" />
- <property name="tester" value="${basedir}/builder/tests/configs/local" />
- </ant>
- </target>
-
- <target name="test-linux-motif-local" if="isLinuxMotif">
- <ant antfile="${test.xml}">
- <property name="shell" value="relengbuildmotif.sh" />
- <property name="tester" value="${basedir}/builder/tests/configs/local" />
- </ant>
- </target>
-
- <target name="publish">
- <copy todir="${buildDirectory}/${buildLabel}" overwrite="true">
- <fileset
- dir="${buildDirectory}/../org.eclipse.modeling.common.releng/staticDropFiles" />
- </copy>
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/discovery/build.properties b/releng/org.eclipse.tm.releng/builder/discovery/build.properties
deleted file mode 100644
index 60a9131e9..000000000
--- a/releng/org.eclipse.tm.releng/builder/discovery/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true
diff --git a/releng/org.eclipse.tm.releng/builder/discovery/customTargets.xml b/releng/org.eclipse.tm.releng/builder/discovery/customTargets.xml
deleted file mode 100644
index 54d7ac7eb..000000000
--- a/releng/org.eclipse.tm.releng/builder/discovery/customTargets.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.tm.discovery" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.tm.discovery">
- <property name="archiveName" value="TM-discovery-${buildAlias}.zip" />
- <ant antfile="${assembleScriptName}" />
- <!-- ADD POST STEPS -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Check out map files from correct repository -->
- <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
- <!-- ===================================================================== -->
- <target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
- </target>
-
- <target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
-
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
- </target>
-
- <target name="tagMapFiles" if="tagMaps">
- <cvs cvsRsh="ssh" dest="${buildDirectory}/maps" command="tag v${timestamp}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup">
- <mkdir dir="${buildDirectory}/${buildLabel}"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- <!-- TODO: if your project requires more dependencies, add them here; if it does not require all of these, remove those not required -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${emfURL}" />
- <property name="file" value="${emfFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.emf.ecore/plugin.xml" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the fetch -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating build scripts -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- <antcall target="clean" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before assembling -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after assembling-->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after everything is built and assembled -->
- <!-- (e.g., testing, posting, emailing, ...) -->
- <!-- ===================================================================== -->
- <target name="postBuild">
- <antcall target="gatherLogs" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Helper targets -->
- <!-- ===================================================================== -->
- <target name="gatherLogs">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.tm.discovery">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
- </target>
- <target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/doc/build.properties b/releng/org.eclipse.tm.releng/builder/doc/build.properties
deleted file mode 100644
index 918aa8e7f..000000000
--- a/releng/org.eclipse.tm.releng/builder/doc/build.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true
-generateVersionsList=true
diff --git a/releng/org.eclipse.tm.releng/builder/doc/customTargets.xml b/releng/org.eclipse.tm.releng/builder/doc/customTargets.xml
deleted file mode 100644
index 1f3fab9bd..000000000
--- a/releng/org.eclipse.tm.releng/builder/doc/customTargets.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.doc" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.rse.doc">
- <property name="archiveName" value="RSE-SDK-${buildAlias}.zip" />
- <ant antfile="${assembleScriptName}" />
- <!-- ADD POST STEPS -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Check out map files from correct repository -->
- <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
- <!-- ===================================================================== -->
- <target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
- </target>
-
- <target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
- </target>
-
- <target name="tagMapFiles" if="tagMaps">
- <cvs cvsRsh="ssh" dest="${buildDirectory}/maps" command="tag v${timestamp}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup">
- <mkdir dir="${buildDirectory}/${buildLabel}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- <!-- TODO: if your project requires more dependencies, add them here; if it does not require all of these, remove those not required -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
-
- <!-- Important: This must be the last dependency downloaded, because the
- getDependency target strips versions from all plug-ins -->
- <echo message="Download Orbit Bundles ..." />
- <ant target="getBundle" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependenciesHelper.xml">
- <property name="url" value="${orbitURL}"/>
- <property name="file" value="${orbitFile}"/>
- </ant>
- <echo message="Unpack selected jars ..." />
- <unzip dest="${buildDirectory}/.." src="${downloadsDir}/${orbitFile}">
- <patternset>
- <include name="**/org.apache.commons.net*.jar"/>
- </patternset>
- </unzip>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the fetch -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating build scripts -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- <antcall target="clean" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before assembling -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after assembling-->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after everything is built and assembled -->
- <!-- (e.g., testing, posting, emailing, ...) -->
- <!-- ===================================================================== -->
- <target name="postBuild">
- <antcall target="gatherLogs" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Helper targets -->
- <!-- ===================================================================== -->
- <target name="gatherLogs">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.rse.doc">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
- </target>
-
- <target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/examples/build.properties b/releng/org.eclipse.tm.releng/builder/examples/build.properties
deleted file mode 100644
index 5cfbca4fd..000000000
--- a/releng/org.eclipse.tm.releng/builder/examples/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/builder/examples/customTargets.xml b/releng/org.eclipse.tm.releng/builder/examples/customTargets.xml
deleted file mode 100644
index b3cc22559..000000000
--- a/releng/org.eclipse.tm.releng/builder/examples/customTargets.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.examples" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.rse.examples">
- <property name="archiveName" value="RSE-examples-${buildAlias}.zip" />
- <ant antfile="${assembleScriptName}" />
- <!-- ADD POST STEPS -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Check out map files from correct repository -->
- <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
- <!-- ===================================================================== -->
- <target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
- </target>
-
- <target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
- </target>
-
- <target name="tagMapFiles" if="tagMaps">
- <cvs cvsRsh="ssh" dest="${buildDirectory}/maps" command="tag v${timestamp}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup">
- <mkdir dir="${buildDirectory}/${buildLabel}"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- <!-- TODO: if your project requires more dependencies, add them here; if it does not require all of these, remove those not required -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
-
- <!-- Important: This must be the last dependency downloaded, because the
- getDependency target strips versions from all plug-ins -->
- <echo message="Download Orbit Bundles ..." />
- <ant target="getBundle" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependenciesHelper.xml">
- <property name="url" value="${orbitURL}"/>
- <property name="file" value="${orbitFile}"/>
- </ant>
- <echo message="Unpack selected jars ..." />
- <unzip dest="${buildDirectory}/.." src="${downloadsDir}/${orbitFile}">
- <patternset>
- <include name="**/org.apache.commons.net*.jar"/>
- </patternset>
- </unzip>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the fetch -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating build scripts -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- <antcall target="clean" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before assembling -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after assembling-->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after everything is built and assembled -->
- <!-- (e.g., testing, posting, emailing, ...) -->
- <!-- ===================================================================== -->
- <target name="postBuild">
- <antcall target="gatherLogs" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Helper targets -->
- <!-- ===================================================================== -->
- <target name="gatherLogs">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.rse.examples">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
- </target>
-
- <target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/runtime/build.properties b/releng/org.eclipse.tm.releng/builder/runtime/build.properties
deleted file mode 100644
index 60a9131e9..000000000
--- a/releng/org.eclipse.tm.releng/builder/runtime/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true
diff --git a/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml b/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml
deleted file mode 100644
index e685f2ab7..000000000
--- a/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.rse">
- <property name="archiveName" value="RSE-runtime-${buildAlias}.zip" />
- <ant antfile="${assembleScriptName}" />
- <!-- ADD POST STEPS -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Check out map files from correct repository -->
- <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
- <!-- ===================================================================== -->
- <target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
- </target>
-
- <target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
- </target>
-
- <target name="tagMapFiles" if="tagMaps">
- <cvs cvsRsh="ssh" dest="${buildDirectory}/maps" command="tag v${timestamp}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup">
- <mkdir dir="${buildDirectory}/${buildLabel}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- <!-- TODO: if your project requires more dependencies, add them here; if it does not require all of these, remove those not required -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
-
- <!-- Important: This must be the last dependency downloaded, because the
- getDependency target strips versions from all plug-ins -->
- <echo message="Download Orbit Bundles ..." />
- <ant target="getBundle" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependenciesHelper.xml">
- <property name="url" value="${orbitURL}"/>
- <property name="file" value="${orbitFile}"/>
- </ant>
- <echo message="Unpack selected jars ..." />
- <unzip dest="${buildDirectory}/.." src="${downloadsDir}/${orbitFile}">
- <patternset>
- <include name="**/org.apache.commons.net*.jar"/>
- </patternset>
- </unzip>
-
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the fetch -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating build scripts -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- <antcall target="clean" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before assembling -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
-
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after assembling-->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
-
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after everything is built and assembled -->
- <!-- (e.g., testing, posting, emailing, ...) -->
- <!-- ===================================================================== -->
- <target name="postBuild">
- <antcall target="gatherLogs" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Helper targets -->
- <!-- ===================================================================== -->
- <target name="gatherLogs">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.rse">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
- </target>
- <target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/sdk/build.properties b/releng/org.eclipse.tm.releng/builder/sdk/build.properties
deleted file mode 100644
index 60a9131e9..000000000
--- a/releng/org.eclipse.tm.releng/builder/sdk/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true
diff --git a/releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml b/releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml
deleted file mode 100644
index cc15e33f5..000000000
--- a/releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.sdk" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.rse.sdk">
- <property name="archiveName" value="RSE-SDK-${buildAlias}.zip" />
- <ant antfile="${assembleScriptName}" />
- <!-- ADD POST STEPS -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Check out map files from correct repository -->
- <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
- <!-- ===================================================================== -->
- <target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
- </target>
-
- <target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
-
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
- </target>
-
- <target name="tagMapFiles" if="tagMaps">
- <cvs cvsRsh="ssh" dest="${buildDirectory}/maps" command="tag v${timestamp}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup">
- <mkdir dir="${buildDirectory}/${buildLabel}"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- <!-- TODO: if your project requires more dependencies, add them here; if it does not require all of these, remove those not required -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
-
- <!-- Important: This must be the last dependency downloaded, because the
- getDependency target strips versions from all plug-ins -->
- <echo message="Download Orbit Bundles ..." />
- <ant target="getBundle" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependenciesHelper.xml">
- <property name="url" value="${orbitURL}"/>
- <property name="file" value="${orbitFile}"/>
- </ant>
- <echo message="Unpack selected jars ..." />
- <unzip dest="${buildDirectory}/.." src="${downloadsDir}/${orbitFile}">
- <patternset>
- <include name="**/org.apache.commons.net*.jar"/>
- </patternset>
- </unzip>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the fetch -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating build scripts -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- <antcall target="clean" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before assembling -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after assembling-->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after everything is built and assembled -->
- <!-- (e.g., testing, posting, emailing, ...) -->
- <!-- ===================================================================== -->
- <target name="postBuild">
- <antcall target="gatherLogs" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Helper targets -->
- <!-- ===================================================================== -->
- <target name="gatherLogs">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.rse.sdk">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
- </target>
- <target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/terminal/build.properties b/releng/org.eclipse.tm.releng/builder/terminal/build.properties
deleted file mode 100644
index 60a9131e9..000000000
--- a/releng/org.eclipse.tm.releng/builder/terminal/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true
diff --git a/releng/org.eclipse.tm.releng/builder/terminal/customTargets.xml b/releng/org.eclipse.tm.releng/builder/terminal/customTargets.xml
deleted file mode 100644
index f28b54a7a..000000000
--- a/releng/org.eclipse.tm.releng/builder/terminal/customTargets.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
- <!-- ===================================================================== -->
- <!-- Run a given ${target} on all elements being built -->
- <!-- ===================================================================== -->
- <target name="allElements">
- <ant antfile="${genericTargets}" target="${target}">
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.tm.terminal.sdk" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Targets to assemble the built elements for particular configurations -->
- <!-- These generally call the generated assemble scripts (named in -->
- <!-- ${assembleScriptName}) but may also add pre and post processing -->
- <!-- Add one target for each root element and each configuration -->
- <!-- ===================================================================== -->
-
- <target name="assemble.org.eclipse.tm.terminal.sdk">
- <property name="archiveName" value="TM-terminal-${buildAlias}.zip" />
- <ant antfile="${assembleScriptName}" />
- <!-- ADD POST STEPS -->
- </target>
-
- <!-- ===================================================================== -->
- <!-- Check out map files from correct repository -->
- <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
- <!-- ===================================================================== -->
- <target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
- </target>
-
- <target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
-
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
- </target>
-
- <target name="tagMapFiles" if="tagMaps">
- <cvs cvsRsh="ssh" dest="${buildDirectory}/maps" command="tag v${timestamp}" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before setup -->
- <!-- ===================================================================== -->
- <target name="preSetup">
- <mkdir dir="${buildDirectory}/${buildLabel}"/>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after setup but before starting the build proper -->
- <!-- ===================================================================== -->
- <target name="postSetup">
- <!-- TODO: if your project requires more dependencies, add them here; if it does not require all of these, remove those not required -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${rxtxURL}" />
- <property name="file" value="${rxtxFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/gnu.io.rxtx.jar" />
- </ant>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before fetching the build elements -->
- <!-- ===================================================================== -->
- <target name="preFetch">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the fetch -->
- <!-- ===================================================================== -->
- <target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before generating build scripts -->
- <!-- ===================================================================== -->
- <target name="preGenerate">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after generating the build scripts -->
- <!-- ===================================================================== -->
- <target name="postGenerate">
- <antcall target="clean" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before assembling -->
- <!-- ===================================================================== -->
- <target name="preAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after assembling-->
- <!-- ===================================================================== -->
- <target name="postAssemble">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after running the build.xmls for the elements being built. -->
- <!-- ===================================================================== -->
- <target name="postProcess">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after everything is built and assembled -->
- <!-- (e.g., testing, posting, emailing, ...) -->
- <!-- ===================================================================== -->
- <target name="postBuild">
- <antcall target="gatherLogs" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Helper targets -->
- <!-- ===================================================================== -->
- <target name="gatherLogs">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.tm.terminal.sdk">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
- </target>
- <target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
- </target>
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
- </target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/tests/build.properties b/releng/org.eclipse.tm.releng/builder/tests/build.properties
deleted file mode 100644
index 60a9131e9..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-# TODO: set correct source and target levels here
-javacSource=1.4
-javacTarget=1.4
-
-buildDirectory=${builder}/../eclipse
-buildType=I
-buildId=${buildId}
-buildLabel=${buildLabel}
-timestamp=0000
-collPlace=.
-collBase=.
-baseLocation=
-configs=*,*,*
-baseos=linux
-basews=gtk
-basearch=x86
-bootclasspath=${java.home}/lib/*.jar
-javacFailOnError=true
-javacVerbose=true
-javacDebugInfo=on
-zipargs=
-archivesFormat = *,*,*-antZip
-collectingFolder=eclipse
-archivePrefix=eclipse
-generateFeatureVersionSuffix=true
diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt b/releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt
deleted file mode 100644
index a4dc1c6c4..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-references/javadoc/*.html
-**/epl-v10.html
diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml b/releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml
deleted file mode 100644
index c1e666497..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<project name="Customized testing instructions" default="customSetup">
-
- <property name="buildConfigFile" value="${testDir}/../../build.cfg" />
- <available file="${buildConfigFile}" type="file" property="buildConfigIsAvailable" />
-
- <target name="loadbuildConfig" if="buildConfigIsAvailable">
- <property file="${buildConfigFile}" />
- </target>
-
- <target name="customSetup">
- <fail unless="buildConfigIsAvailable" message="ERROR! Can't find ${buildConfigFile}"/>
- <antcall target="loadbuildConfig"/>
-
- <echo message="Unpack Eclipse SDK to ${testDir}..."/>
- <echo message="customTest.xml: basedir = ${basedir}"/>
- <property name="getTestDependencies.xml" value="${testDir}/../../org.eclipse.modeling.common.releng/scripts/getTestDependencies.xml"/>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}">
- <property name="basedir" value="${basedir}"/>
- <property name="url" value="${eclipseURL}"/>
- <property name="file" value="${eclipseFile}"/>
- <property name="unpackDest" value="${testDir}"/>
- </ant>
-
- <!-- TODO: if your project requires more dependencies for testing, add them here -->
- <echo message="Copy EMF SDK + Eclipse SDK to ${executionDir}..."/>
- <copy todir="${executionDir}">
- <!--<fileset dir="${downloadsDir}" includes="${emfFile},${eclipseFile},${wtpFile},${orbitFile}"/>-->
- <fileset dir="${downloadsDir}" includes="${emfFile},${eclipseFile},${orbitFile}"/>
- <!--TODO: Main runtime is RSE, therefore need to copy TM-terminal and others to test as well-->
- <fileset dir="${executionDir}/../../.." includes="TM-terminal-*.zip"/>
- </copy>
- <property name="shell" value="relengbuildgtk.sh"/>
-
- <!--copy the script which invokes the tests -->
- <copy file="${tester}/${shell}" todir="${executionDir}"/>
- <chmod file="${executionDir}/${shell}" perm="ugo+rx"/>
-
- <!--copy the testing.property files -->
- <copy file="${tester}/testing.properties" todir="${executionDir}"/>
-
- <!-- at this point, we exit from this script and back into the parent script (presumably in pde or eclipse.releng?) -->
- <echo message="Running ${shell} ..."/>
- </target>
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh b/releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh
deleted file mode 100644
index 97221e5d8..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh
+++ /dev/null
@@ -1,278 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-#!/bin/bash
-
-echo -n "[relengbuild] $0 started on: `date +%Y%m%d\ %H\:%M\:%S`";
-
-# environment variables
-PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/X11R6/bin:`pwd`/../linux;export PATH
-
-export USERNAME=`whoami`
-echo " running as $USERNAME";
-echo " currently in dir: `pwd`";
-
-# fix for org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
-# fix for Failed to invoke suite():org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
-export CVS_RSH=ssh
-ulimit -c unlimited; # core file size (blocks, -c) unlimited
-
-echo "Set JAVA_HIGH_ZIPFDS=500 & LANG=C";
-export JAVA_HIGH_ZIPFDS=500
-export LANG=C
-
-# configure X server thread for tests :: not yet working!
-echo "Start Xvfb on :42"
-Xvfb :42 -screen 0 1024x768x24 -ac &
-sleep 40
-export DISPLAY=localhost:42.0
-xhost +
-
-#startkde &
-#sleep 40
-# xwd -silent -display :42 -root -out /tmp/snap.xwd; # save a snapshot
-#import -window root screenshot1.png # save a snapshot
-
-readPropertyOut="";
-readProperty ()
-{
- readPropertyOut="";
- file=$1
- property=$2
- readPropertyOut=$(grep $property $file | egrep -v "^#" | tail -1 | sed -e "s/$property=//");
-}
-
-if [[ ! $JAVA_HOME ]]; then
- echo -n "[relengbuild] Get JAVA_HOME from build.cfg ... ";
- buildcfg=$PWD/../../../build.cfg;
- export JAVA_HOME=$(grep "JAVA_HOME=" $buildcfg | egrep -v "^#" | tail -1 | sed -e "s/JAVAHOME=//");
- echo "$JAVA_HOME";
-fi
-
-Xflags="";
-Dflags="";
-
-# default target to run in org.eclipse.$subprojectName.releng/builder/tests/scripts/test.xml
-antTestTarget=all
-
-# process command line arguments
-while [ $# -gt 0 ]
-do
- case "$1" in
- -vmExecutable) vmExecutable="$2"; shift;;
- -consolelog) consolelog="$2"; shift;;
- -X*) Xflags=$Xflags\ $1;;
- -D*) Dflags=$Dflags\ $1;;
- esac
- shift
-done
-
-checkIfj9 ()
-{
-# given a series of -X flags, see if the string -Xj9 can be found
- j9=$Xflags;
- #echo "Xflags=$Xflags"
- j9=${j9/\-Xj9/} # substring replacement
- #echo "remaining: $j9"
- if [ "$j9" != "$Xflags" ]; then # found it
- j9="j9";
- else
- j9="";
- fi
-}
-checkIfj9;
-
-defined=0;
-checkIfDefined ()
-{
- if [ -f $1 ] ; then
- defined=1;
- else
- defined=0;
- fi
-}
-
-execCmd ()
-{
- echo ""; echo "[relengbuild] [`date +%H\:%M\:%S`]";
- echo " $1" | perl -pe "s/ -/\n -/g";
- if [ "x$2" != "x" ]; then
- $1 2>&1 | tee $2;
- else
- $1;
- fi
-}
-
-doFunction ()
-{
- cmd=$1;
- params=$2
- for pth in "." "/bin" "/usr/bin" "/usr/bin/X11" "/usr/local/bin" "/usr/X11R6/bin" "`pwd`/../linux" ; do
- defined=0;
- checkIfDefined $pth/$cmd
- if [ $defined -eq 1 ] ; then
- $cmd $params
- sleep 3
- break;
- fi
- done
- if [ $defined -eq 0 ] ; then
- echo "$cmd is not defined (command not found)";
- fi
-}
-
-# these don't work on old build server, so not point wrapping them to say so when we can just omit
-# doFunction Xvfb ":42 -screen 0 1024x768x24 -ac & "
-# doFunction Xnest ":43 -display :42 -depth 24 & "
-# doFunction fvwm2 "-display localhost:43.0 & "
-#export DISPLAY=$HOSTNAME:43.0
-#ulimit -c unlimited
-
-getBuildID()
-{ # given $PWD: /home/www-data/build/dsdp/$projectName/$subprojectName/downloads/drops/1.1.0/N200702112049/testing/N200702112049/testing
- # return N200702110400
- buildID=$1; #echo "buildID=$buildID";
- buildID=${buildID##*drops\/}; # trim up to drops/ (from start) (substring notation)
- buildID=${buildID%%\/test*}; # trim off /test (to end) (substring notation)
- buildID=${buildID##*\/}; # trim up to / (from start) (substring notation)
-}
-buildID=""; getBuildID $PWD; #echo buildID=$buildID;
-
-getBranch()
-{ # given $PWD: /home/www-data/build/dsdp/$projectName/$subprojectName/downloads/drops/1.1.0/N200702112049/testing/N200702112049/testing
- # return 1.1.0
- branch=$1; #echo "branch=$branch";
- branch=${branch##*drops\/}; # trim up to drops/ (from start) (substring notation)
- branch=${branch%%\/*}; # trim off / (to end) (substring notation)
-}
-branch=""; getBranch $PWD; #echo branch=$branch;
-
-############################# BEGIN RUN TESTS #############################
-
-
-# operating system, windowing system and architecture variables
-# for *nix systems, os, ws and arch values must be specified
-Dflags=$Dflags" "-Dplatform=linux.gtk
-os=linux
-ws=gtk
-arch=x86
-
-# default value to determine if eclipse should be reinstalled between running of tests
-installmode="clean"
-
-#this value must be set when using rsh to execute this script, otherwise the script will execute from the user's home directory
-dir=.
-cd $dir
-workspaceDir="$dir/eclipse/workspace"
-
-# Replace the boot eclipse (The eclipse used to run the main test.xml, this will start another eclipse later)
-if [ -d $dir/eclipse ] ; then
- rm -rf $dir/eclipse
-fi
-if [ -d $workspaceDir ] ; then
- rm -rf $dir/workspace
-fi
-
-echo "[runtests] Currently in `pwd`:"
-# need conditional processing here: M3.0.2 = zip, I3.1.0 = tar.gz
-sdks=`find $dir -name "eclipse-SDK-*"`
-# get extension from file(s)
-for sdk in $sdks; do
- sdk="eclipse"${sdk##*eclipse}; # trim up to eclipse (substring notation)
- #echo -n "[runtests] Eclipse SDK $sdk is a";
- ext=${sdk%%\.zip}; # trim off .zip (substring notation)
- if [ "$ext" != "$sdk" ]; then # it's a zip
- #echo " zip. Unpacking...";
- unzip -qq -o $sdk
- else
- ext=${sdk%%\.tar\.gz}; # trim off .tar.gz (substring notation)
- if [ "$ext" != "$sdk" ]; then # it's a tar.gz
- #echo " tar.gz. Unpacking...";
- tar -xzf $sdk
- else
- ext=${sdk%%\.tar\.Z}; # trim off .tar.Z (substring notation)
- if [ "$ext" != "$sdk" ]; then # it's a tar.Z
- #echo " tar.Z. Unpacking...";
- tar -xZf $sdk
- else
- echo "[runtests] ERROR: Eclipse SDK $sdk is an UNKNOWN file type. Failure.";
- exit 2
- fi
- fi
- fi
-done
-
-J2SE15flags="";
-# TODO: if a 1.5 JDK and want source/target = 1.5, leave these in
-# TODO: if source/target = 1.4, remove these!
-if [ ${JAVA_HOME##*1.5*}"" = "" -o ${JAVA_HOME##*15*}"" = "" -o ${JAVA_HOME##*5.0*}"" = "" -o ${JAVA_HOME##*50*}"" = "" ]; then
- # set J2SE-1.5 properties (-Dflags)
- bootclasspath="."`find $JAVA_HOME/jre/lib -name "*.jar" -printf ":%p"`;
- J2SE15flags=$J2SE15flags" -DJ2SE-1.5=$bootclasspath"
- J2SE15flags=$J2SE15flags" -DbundleBootClasspath=$bootclasspath"
- J2SE15flags=$J2SE15flags" -DjavacSource=1.5"
- J2SE15flags=$J2SE15flags" -DjavacTarget=1.5"
- J2SE15flags=$J2SE15flags" -DbundleJavacSource=1.5"
- J2SE15flags=$J2SE15flags" -DbundleJavacTarget=1.5"
-fi
-
-# different ways to get the launcher and Main class
-if [[ -f eclipse/startup.jar ]]; then
- cpAndMain="eclipse/startup.jar org.eclipse.core.launcher.Main"; # up to M4_33
-elif [[ -f eclipse/plugins/org.eclipse.equinox.launcher.jar ]]; then
- cpAndMain="eclipse/plugins/org.eclipse.equinox.launcher.jar org.eclipse.equinox.launcher.Main"; # M5_33
-else
- cpAndMain=`find eclipse/ -name "org.eclipse.equinox.launcher_*.jar" | sort | head -1`" org.eclipse.equinox.launcher.Main";
-fi
-
-# run tests
-echo "[runtests] [`date +%H\:%M\:%S`] Launching Eclipse (installmode = $installmode with -enableassertions turned on) ..."
-execCmd "$JAVA_HOME/bin/java $Xflags -enableassertions -cp $cpAndMain -ws $ws -os $os -arch $arch \
--application org.eclipse.ant.core.antRunner -data $workspaceDir -file test.xml $antTestTarget \
-$Dflags -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $J2SE15flags \
-$properties -logger org.apache.tools.ant.DefaultLogger" $consolelog;
-echo "[runtests] [`date +%H\:%M\:%S`] Eclipse test run completed. "
-
-#import -window root screenshot1.png # save a snapshot
-
-############################# END RUN TESTS #############################
-
-# supress errors by checking for the file first
-if [ -r /tmp/.X43-lock ] ; then
- kill `cat /tmp/.X43-lock`
-fi
-if [ -r /tmp/.X42-lock ] ; then
- kill `cat /tmp/.X42-lock`
-fi
-
-if [[ ! -d $PWD/results ]]; then
- echo "[relengbuild] No test results found in $PWD/results!";
- echo "[relengbuild] Creating 'noclean' file to prevent cleanup after build completes."
- echo "1" > $PWD/../../../noclean;
-else
-# if the build failed for some reason, don't clean up!
-xmls=`find $PWD/results/xml -name "*.xml"`;
-testsFailed=1;
-for xml in $xmls; do
- if [ $testsFailed -eq 1 ]; then
- testsFailed=`cat $xml | grep -c "<testsuite errors=\"0\" failures=\"0\""`
- if [ $testsFailed -lt 1 ]; then
- echo "[relengbuild] Found test failure(s) in $xml!";
- echo "[relengbuild] Creating 'noclean' file to prevent cleanup after build completes."
- echo "1" > $PWD/../../../noclean;
- break;
- fi
- fi
-done
-fi;
-
-echo "[relengbuild] relengbuildgtk.sh completed on: `date +%Y%m%d\ %H\:%M\:%S`"
-
diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties b/releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties
deleted file mode 100644
index 9dc29709e..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties
+++ /dev/null
@@ -1,57 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-#which (sub)project?
-project=rse
-
-#target to call in test.xml: runtests-local | runtests-remote
-testTarget=runtests-local
-
-#directory on test machine where automated testing framework will be installed
-testDir=${testBase}/${buildLabel}
-
-#name of zip file containing automated testing framework and JUnit test plug-ins
-testFramework=RSE-automated-tests-${buildAlias}.zip
-
-#directory where test scripts are launched
-executionDir=${testDir}/testing
-
-#name of runtime to install and test
-runtime=RSE-SDK-${buildAlias}.zip
-
-# leave this blank and it will be generated by genBuildDetails.sh
-javaHome=%%JAVA_HOME%%
-vmExecutable=${javaHome}/bin/java
-
-#hack to override unneeded function in releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml
-vmUrl=
-vmDest=/dev/null
-vmInstallExecutable=${vmExecutable}
-vmInstallCommand=-version
-
-#eclipse platforms: win32 | linux.motif | linux.gtk | aix.motif | hpux.motif |solaris.motif
-platform=${baseos}.${basews}
-
-#name of file that captures console output from running JUnit plug-in tests
-consolelog=${baseos}.${basews}_consolelog.txt
-
-#Works with IBM and Sun JDKs, 1.4+
-#name of script to execute
-testExecutable=bash
-
-#arguments to $(testExecutable) - .sh script + args
-args=${executionDir}/${shell} -vmExecutable ${vmExecutable} -consolelog ${consolelog} ${Xflags} ${Dflags}
-
-#TODO: set vm-specific flags
-#Xflags=-Xms64M -Xmx192M
-Xflags=-Xms256M -Xmx256M
-Dflags=
-
diff --git a/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml b/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml
deleted file mode 100644
index 648f1745f..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml
+++ /dev/null
@@ -1,274 +0,0 @@
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
-<!-- ===================================================================== -->
-<!-- Run a given ${target} on all elements being built -->
-<!-- ===================================================================== -->
-<target name="allElements">
- <ant antfile="${genericTargets}" target="${target}" >
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.rse.tests" />
- </ant>
- <ant antfile="${genericTargets}" target="${target}" >
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.tm.terminal.test" />
- </ant>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Targets to assemble the built elements for particular configurations -->
-<!-- These generally call the generated assemble scripts (named in -->
-<!-- ${assembleScriptName}) but may also add pre and post processing -->
-<!-- Add one target for each root element and each configuration -->
-<!-- ===================================================================== -->
-
-<target name="assemble.org.eclipse.rse.tests">
- <property name="archiveName" value="RSE-junit-tests-${buildAlias}.zip"/>
- <ant antfile="${assembleScriptName}"/>
-<!-- ADD POST STEPS -->
-</target>
-<target name="assemble.org.eclipse.tm.terminal.test">
- <property name="archiveName" value="TM-terminal-junit-tests-${buildAlias}.zip"/>
- <ant antfile="${assembleScriptName}"/>
-<!-- ADD POST STEPS -->
-</target>
-
-
-<!-- ===================================================================== -->
-<!-- Check out map files from correct repository -->
-<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
-<!-- ===================================================================== -->
-<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
-</target>
-
-<target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
- <property name="mapVersionTag" value="HEAD" />
- <!-- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/> -->
- <property name="packagePath" value="org.eclipse.${projectName}.${subprojectName2}/releng/org.eclipse.${projectName}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
-</target>
-
-<target name="tagMapFiles" if="tagMaps">
- <cvs dest="${buildDirectory}/maps/org.eclipse.${subprojectName2}" command="tag v${timestamp}" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before setup -->
-<!-- ===================================================================== -->
-<target name="preSetup">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after setup but before starting the build proper -->
-<!-- ===================================================================== -->
-<target name="postSetup">
- <ant target="getDependency" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependencies.xml">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="isUnpackedFile" value="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/plugin.xml" />
- </ant>
- <!-- Important: This must be the last dependency downloaded, because the
- getDependency target strips versions from all plug-ins -->
- <ant target="getBundle" antfile="${buildDirectory}/../org.eclipse.modeling.common.releng/scripts/getDependenciesHelper.xml">
- <property name="url" value="${orbitURL}" />
- <property name="file" value="${orbitFile}" />
- </ant>
- <unzip dest="${buildDirectory}/.." src="${downloadsDir}/${orbitFile}">
- <patternset>
- <include name="**/org.apache.commons.net*.jar" />
- </patternset>
- </unzip>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before fetching the build elements -->
-<!-- ===================================================================== -->
-<target name="preFetch">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after the fetch -->
-<!-- ===================================================================== -->
-<target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before generating build scripts -->
-<!-- ===================================================================== -->
-<target name="preGenerate">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after generating the build scripts -->
-<!-- ===================================================================== -->
-<target name="postGenerate">
- <antcall target="clean" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before assembling -->
-<!-- ===================================================================== -->
-<target name="preAssemble">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after assembling-->
-<!-- ===================================================================== -->
-<target name="postAssemble">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before running the build.xmls for the elements being built. -->
-<!-- ===================================================================== -->
-<target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after running the build.xmls for the elements being built. -->
-<!-- ===================================================================== -->
-<target name="postProcess">
- <condition property="logsAvailable">
- <istrue value="${javacVerbose}"/>
- </condition>
- <antcall target="gatherLogs" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after everything is built and assembled -->
-<!-- (e.g., testing, posting, emailing, ...) -->
-<!-- ===================================================================== -->
-<target name="postBuild">
- <antcall target="packageTestFramework" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Helper targets -->
-<!-- ===================================================================== -->
-<target name="gatherLogs" if="logsAvailable">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.rse.tests">
- <include name="*.log.zip" />
- </fileset>
- <fileset dir="${buildDirectory}/features/org.eclipse.tm.terminal.test">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
-</target>
-
-<target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
-</target>
-
-<target name="packageTestFramework">
- <!--package automated test framework used in RSE builds-->
-
- <property name="workingDirectory" value="${buildDirectory}/test.assembly" />
- <echo message="workingDirectory: ${workingDirectory}"/>
-
- <!--unzip the junit tests-->
- <mkdir dir="${workingDirectory}/eclipse" />
- <unzip dest="${workingDirectory}" overwrite="true">
- <fileset dir="${buildDirectory}/${buildLabel}">
- <include name="**/RSE-junit-tests*.zip"/>
- <include name="**/TM-terminal-junit-tests*.zip"/>
- </fileset>
- </unzip>
-
- <!-- create top level testing directory-->
- <delete dir="${workingDirectory}/testing"/>
- <mkdir dir="${workingDirectory}/testing" />
-
- <!--compile the tool used to generate the test.properties file, then run it.-->
- <!--test.properties maps test plugin id's to the name of the plugin directory-->
-
- <!--eclipse.home is relative to the scripts directory in the org.eclipse.pde.build plugin. Assume the plugins used in the classpath are in the same directory as org.eclipse.pde.build-->
- <property name="eclipse.home" value="../../.." />
-
- <generateTestProperties
- buildDirectory="${buildDirectory}"
- featureId="org.eclipse.rse.tests"
- outputFile="${workingDirectory}/testing/test.properties"
- />
- <generateTestProperties
- buildDirectory="${buildDirectory}"
- featureId="org.eclipse.tm.terminal.test"
- outputFile="${workingDirectory}/testing/test2.properties"
- />
-
-
- <!--load the property file created with the directory names for all test plugins-->
- <property file="${workingDirectory}/testing/test.properties" />
- <property file="${workingDirectory}/testing/test2.properties" />
-
- <!-- Remove the plugin version number appended to the org.eclipse.test plugin directory.
- This is so that contributors of test.xml's do not have to update their paths to
- library.xml in org.eclipse.test whenever its version is updated.
- -->
- <move todir="${workingDirectory}/eclipse/plugins/org.eclipse.test">
- <fileset dir="${workingDirectory}/eclipse/plugins/${org.eclipse.test}" />
- </move>
-
- <!--the Ant move task leaves behind an empty directory-->
- <delete dir="${workingDirectory}/eclipse/plugins/${org.eclipse.test}" includeEmptyDirs="true" />
-
- <!-- rezip the JUnit plugin tests -->
- <zip destfile="${workingDirectory}/testing/RSE-junit-tests-${buildAlias}.zip">
- <zipfileset dir="${workingDirectory}/eclipse" prefix="eclipse"/>
- </zip>
-
- <!--Copy scripts and doc used in the automated testing to the testing directory-->
- <copy todir="${workingDirectory}/testing">
- <fileset dir="${buildDirectory}/plugins/org.eclipse.test" includes="testframework.html,JUNIT.XSL" />
- </copy>
- <copy todir="${workingDirectory}/testing">
- <fileset dir="${builderDirectory}/scripts" />
- </copy>
-
- <!--copy in the file containing the URL of the Eclipse build used for testing-->
- <copy todir="${workingDirectory}/testing" file="${buildDirectory}/../build.cfg" />
-
- <!--create zip file of the automated testing framework-->
- <zip destfile="${buildDirectory}/${buildLabel}/RSE-automated-tests-${buildAlias}.zip">
- <zipfileset dir="${workingDirectory}/testing" prefix="testing"/>
- </zip>
-
- <delete file="${buildDirectory}/${buildLabel}/RSE-junit-tests-${buildAlias}.zip" />
- <delete file="${buildDirectory}/${buildLabel}/TM-terminal-junit-tests-${buildAlias}.zip" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Default target -->
-<!-- ===================================================================== -->
-<target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
-</target>
-
-</project>
diff --git a/releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html b/releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html
deleted file mode 100644
index 628cbca98..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<html>
-<head>
-<title>Instructions</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-
-<body bgcolor="#FFFFFF" text="#000000">
-<font size="+2"> Automated Testing of DSDP Project Builds</font>
-<p>last updated: November 9, 2005</p>
-<p><font size="+1">Description</font></p>
-<p>This document describes how to run the your project's JUnit test plugins from the command
- line. This is the same mechanism used in the builds.</p>
-<p>Click <a href="testframework.html">here</a> for a description of the testing
- framework, and how it can be used outside of the setup described here.</p>
-<p>If you simply wish to write and run JUnit tests interactively from an Eclipse
- workbench, try one of the links below:</p>
-<p><a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.junit/index.html">JUnit
- Support in Eclipse</a><br>
-<a href="http://dev.eclipse.org:8080/help/content/help:/org.eclipse.jdt.doc.user/tasks/tasks-207.htm?resultof=%6a%75%6e%69%74%20&toc=%2Forg.eclipse.jdt.doc.user%2Ftoc.xml">Using
- JUnit</a></p>
-
-<p><font size="+1">Requirements</font></p>
-<p>1. All test machines must have a java runtime environment (version 1.3.1) installed and added to the path environment variable (see
- <a href="#vm">-vm</a> parameter below).<br>
- 2. <a href="http://www.info-zip.org/pub/infozip/UnZip.html">Info-ZIP UnZip</a>
- version 5.41 or later installed and added to the path.<br>
- 3. The Automated Test feature from a
- <a href="http://www.eclipse.org/dsdp/tm">downloads</a>.
- This contains the test framework plugins and the JUnit test plugins to run.<br>
- 4. The zip file from the same build as the Automated Test feature. You can use the RSE-*-SDK zip file instead of the individual files.<br>
- 5. An Eclipse SDK zip file. The URL and build name of the required builds
- are specified in the build.cfg file included in the Automated Test zip file.</p>
-<p><font size="+1">Setup</font></p>
-<p>1. Extract the RSE-*-automated-tests-&lt;buildid&gt;.zip. On Window, extract
- this file close to the root of the drive to prevent some path names from exceeding
- the 255 character limit. This will create a top-level directory &quot;<i>testing</i>&quot;.<br>
- 2. Place the Eclipse SDK zip file and the project's runtime in the <i>testing</i> directory.
- Do not unzip these files. (The test scripts will take care of this)<br>
-</p>
-<p><font size="+1">Running Tests</font></p>
-<p>1. cd to the <i>testing</i> directory<br>
- 2. Run the following script:</p>
-<p><b>runtests.sh [-os &lt;operating system&gt;] [-ws &lt;windowing system&gt;] [-arch
- &lt;architecture&gt;] [-noclean] [&lt;testTarget&gt;][-properties &lt;path&gt;][-vm
- &lt;path to java executable&gt;]</b></p>
-All parameters and targets are optional on windows systems. Just running &quot;runtests.sh&quot;
-will run <b>ALL</b> tests on Windows, installing a clean Eclipse and your project's SDK between
-each test target. On *nix systems, the os, ws and arch parameters must be specified.
-<br>
-<br>
-Test results are placed in the <i>testing</i>/<i>results</i> directory in xml and html format.<br>
-<p><font size="+1"><a name="vm"></a>Parameters</font></p>
-<table width="90%" border="1">
- <tr>
- <td>Parameter</td>
- <td>Description</td>
- </tr>
- <tr>
- <td>-os &lt;operating system&gt;</td>
- <td>The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris,
- win32. <b>Default win32</b></td>
- </tr>
- <tr>
- <td>-ws &lt;windowing system&gt;</td>
- <td>The windowing system the tests are being run on. One of: motif, gtk, photon,
- win32. <b>Default win32</b></td>
- </tr>
- <tr>
- <td>-arch &lt;architecture&gt;</td>
- <td>The architecture the tests are being run on. One of: ppc, PA_RISC, x86,
- sparc. <b>Default x86</b></td>
- </tr>
- <tr>
- <td>-noclean</td>
- <td>Run tests without installing an Eclipse and GEF SDK and tests between
- test targets. Default is to re-install these between test targets.</td>
- </tr>
- <tr>
- <td>-properties</td>
- <td>Used to reference a properties file containing additional Ant properties
- used in running tests.Can be used to pass additional vm arguments to the
- Java virtual machine running the tests by adding the entry &quot;extraVMargs=&lt;the
- args to pass to the vm&gt;&quot; to the specified properties file.</td>
- </tr>
- <tr>
- <td>-vm</td>
- <td>The full path to the java executable with which to run the tests. Use
- this to specify a specific virtual machine with which to run the tests.
- For example, &quot;-vm c:\sun131\jre\bin\java&quot;. Default set to &quot;java&quot;
- (i.e. java executable on system path). </td>
- </tr>
-</table>
-
-<p><font size="+1">Test Targets</font></p>
-<p>Specifies which ant target to run in the main test.xml. Typically this corresponds
- to a test project's tests. If you do not specify a test target then the <b>all</b>
- test target is run.</p>
-
-<table width="90%" border="1">
- <tr>
- <td>all</td>
- <td>Runs all the targets below.</td>
- </tr>
- <tr>
- <td>rse</td>
- <td>Runs the JUnit tests located in the test plug-ins</td>
- </tr>
- <tr>
- <td>genHtml</td>
- <td>Converts xml test results in the &quot;<i>testing</i>/<i>results</i>&quot; directory
- to html.</td>
- </tr>
-</table>
-<p>&nbsp;</p>
-<p><font size="+1"><a name="appendixb"></a>Appendix A- Supported os, ws, and arch
- value combinations</font></p>
-<p>The following table contains the values that can be used with the -os, -ws,
- and -arch switches.</p>
-<table width="75%" border="1">
- <tr>
- <td>Operating System (os)</td>
- <td>Windowing System (ws)</td>
- <td>Architecture (arch)</td>
- </tr>
- <tr>
- <td>aix</td>
- <td>motif</td>
- <td>ppc</td>
- </tr>
- <tr>
- <td>hpux</td>
- <td>motif</td>
- <td>PA_RISC</td>
- </tr>
- <tr>
- <td>linux</td>
- <td>gtk</td>
- <td>x86</td>
- </tr>
- <tr>
- <td>linux</td>
- <td>motif</td>
- <td>x86</td>
- </tr>
- <tr>
- <td height="24">qnx</td>
- <td height="24">photon</td>
- <td height="24">x86</td>
- </tr>
- <tr>
- <td>solaris</td>
- <td>motif</td>
- <td>sparc</td>
- </tr>
- <tr>
- <td>win32</td>
- <td>win32</td>
- <td>x86</td>
- </tr>
-</table>
-</body>
-</html>
diff --git a/releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml b/releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml
deleted file mode 100644
index 0583e3d30..000000000
--- a/releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<project name="Automated Testing" default="all" basedir="." >
-
- <!--properties file containing the plugin directory name including version number-->
- <property file="test.properties" />
-
- <!-- urls and such from the build -->
- <property file="${basedir}/../../../build.cfg" />
-
- <!--default directory where test-eclipse will be installed-->
- <property name="install" value="${basedir}/target" />
-
- <!--name that can be added to report name to identify which platform tests results come from-->
- <property name="platform" value="" />
-
- <!-- The root of the eclipse installation -->
- <property name="eclipse-home" value="${install}/eclipse" />
-
- <!-- The directory that will contain the xml and html results from the tests that are run -->
- <property name="results" value="${basedir}/results" />
-
- <target name="setup" if="clean" description="Reinstall the test Eclipse installation if specified by user">
- <delete dir="${install}" /><mkdir dir="${install}" />
-
- <!-- TODO: if your project requires more dependencies, add them here -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <property name="common.releng.dir" value="${basedir}/../../../org.eclipse.modeling.common.releng"/>
- <property name="getTestDependencies.xml" value="${common.releng.dir}/scripts/getTestDependencies.xml"/>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}" dir="${common.releng.dir}">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="unpackDest" value="${install}"/>
- </ant>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}" dir="${common.releng.dir}">
- <property name="url" value="${emfURL}" />
- <property name="file" value="${emfFile}" />
- <property name="unpackDest" value="${install}"/>
- </ant>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}" dir="${common.releng.dir}">
- <property name="url" value="${orbitURL}" />
- <property name="file" value="${orbitFile}" />
- <property name="unpackDest" value="${install}"/>
- </ant>
-
- <property name="dir" location="."/>
- <echo message="Unpack SDK + JUnit Tests (${dir}/RSE-*.zip) ..."/>
- <unzip dest="${install}" overwrite="true">
- <fileset dir="${dir}">
- <include name="**/RSE-*.zip"/>
- <include name="**/TM-terminal-*.zip"/>
- </fileset>
- </unzip>
- </target>
-
- <target name="runtests" depends="setup" description="Runs ant on the test.xml for a specified plugin. Requires a property value setting for testPlugin only if test.properties is not available. The property testPlugin represents a directory name made up of the plugin id and plugin version. This directory must contain a valid test.xml.">
- <echo message="Running test.xml from jarfile ${eclipse-home}/plugins/${testPlugin} ... "/>
- <ant antfile="${eclipse-home}/plugins/${testPlugin}/test.xml" dir="${eclipse-home}"/>
- <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" />
- </target>
-
- <target name="unjarPlugin" depends="setup">
- <echo message="Unpack ${eclipse-home}/plugins/${testPlugin}.jar to ${eclipse-home}/plugins/${testPlugin} ... "/>
- <move file="${eclipse-home}/plugins/${testPlugin}.jar" tofile="${eclipse-home}/plugins/${testPlugin}_.jar"/>
- <unjar src="${eclipse-home}/plugins/${testPlugin}_.jar" dest="${eclipse-home}/plugins/${testPlugin}"/>
- <delete file="${eclipse-home}/plugins/${testPlugin}_.jar"/>
- </target>
-
- <target name="dontUnjarPlugin" depends="setup">
- <echo message="${eclipse-home}/plugins/${testPlugin} is not a jarred plugin. No unpack required!"/>
- </target>
-
- <target name="rse" description="Runs the test.xml of the rse.tests plugin">
- <antcall target="dontUnjarPlugin">
- <param name="testPlugin" value="${org.eclipse.rse.tests}" />
- </antcall>
- <antcall target="runtests">
- <param name="testPlugin" value="${org.eclipse.rse.tests}" />
- <param name="report" value="org.eclipse.rse.tests" />
- </antcall>
-
- <!-- test if chkpii script exists before proceeding -->
- <property name="common.releng.dir" value="${basedir}/../../../org.eclipse.modeling.common.releng"/>
- <property name="chkpii.xml" value="${common.releng.dir}/scripts/chkpii.xml"/>
- <available file="${chkpii.xml}" property="chkpiiXMLAvailable"/>
- <antcall target="runChkpii"/>
- </target>
-
- <target name="terminal" description="Runs the test.xml of the tm.terminal.test plugin">
- <antcall target="unjarPlugin">
- <param name="testPlugin" value="${org.eclipse.tm.terminal.test}" />
- </antcall>
- <antcall target="runtests">
- <param name="testPlugin" value="${org.eclipse.tm.terminal.test}" />
- <param name="report" value="org.eclipse.tm.terminal.test" />
- </antcall>
-
- <!-- test if chkpii script exists before proceeding -->
- <property name="common.releng.dir" value="${basedir}/../../../org.eclipse.modeling.common.releng"/>
- <property name="chkpii.xml" value="${common.releng.dir}/scripts/chkpii.xml"/>
- <available file="${chkpii.xml}" property="chkpiiXMLAvailable"/>
- <antcall target="runChkpii"/>
- </target>
-
- <target name="runChkpii" if="chkpiiXMLAvailable">
- <ant target="chkpii" antfile="${chkpii.xml}" inheritall="true">
- <property name="zipPattern" value="RSE-*.zip"/>
- </ant>
- </target>
-
- <target name="all">
- <antcall target="rse" />
- <antcall target="terminal" />
- <antcall target="genHtml" />
- </target>
-
- <target name="genHtml" description="Generates HTML results with provided JUNIT.XSL provided">
- <style style="JUNIT.XSL" basedir="${results}/xml" destdir="${results}/html" />
- </target>
-</project>
diff --git a/releng/org.eclipse.tm.releng/maps/build.cfg b/releng/org.eclipse.tm.releng/maps/build.cfg
deleted file mode 100644
index 28178b1d3..000000000
--- a/releng/org.eclipse.tm.releng/maps/build.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# this file's contents are generated \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/maps/discovery.map b/releng/org.eclipse.tm.releng/maps/discovery.map
deleted file mode 100644
index c0dd848fe..000000000
--- a/releng/org.eclipse.tm.releng/maps/discovery.map
+++ /dev/null
@@ -1,10 +0,0 @@
-feature@org.eclipse.tm.discovery=v200902102200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery-feature
-plugin@org.eclipse.rse.discovery=v20080402,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.rse.discovery
-plugin@org.eclipse.tm.discovery.doc.isv=v20080406,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.doc.isv
-plugin@org.eclipse.tm.discovery.engine=v200903051330,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.engine
-plugin@org.eclipse.tm.discovery.model=v20080331,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.model
-plugin@org.eclipse.tm.discovery.model.edit=v20080522,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.model.edit
-plugin@org.eclipse.tm.discovery.protocol.dnssd=v20080331,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.protocol.dnssd
-plugin@org.eclipse.tm.discovery.transport.udp=v20080331,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.transport.udp
-plugin@org.eclipse.tm.discovery.view=v20080522,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.view
-plugin@org.eclipse.tm.discovery.wizard=v20080529,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/discovery/org.eclipse.tm.discovery.wizard \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/maps/rse.map b/releng/org.eclipse.tm.releng/maps/rse.map
deleted file mode 100644
index 6136bec58..000000000
--- a/releng/org.eclipse.tm.releng/maps/rse.map
+++ /dev/null
@@ -1,64 +0,0 @@
-!*************** PROJECT CONTRIBUTION ********************************************************
-!*** Project's plugins, features and fragments
-feature@org.eclipse.rse=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse-feature
-feature@org.eclipse.rse.core=v200902102200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
-feature@org.eclipse.rse.dstore=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
-feature@org.eclipse.rse.examples=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
-feature@org.eclipse.rse.ftp=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
-feature@org.eclipse.rse.local=v200812041630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
-feature@org.eclipse.rse.sdk=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
-feature@org.eclipse.rse.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
-feature@org.eclipse.rse.telnet=v200902102200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.telnet-feature
-feature@org.eclipse.rse.terminals=v200902020100,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.terminals-feature
-feature@org.eclipse.rse.tests=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests-feature
-feature@org.eclipse.rse.useractions=v200902102200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions-feature
-!!feature@org.eclipse.rse.useractions.wrapper=v20080609a,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.useractions.wrapper-feature
-!!feature@org.eclipse.tm.releng.master=v20080609,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/releng/org.eclipse.tm.releng.master-feature
-plugin@org.eclipse.dstore.core=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
-plugin@org.eclipse.dstore.doc.isv=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.dstore.doc.isv
-plugin@org.eclipse.dstore.extra=v200901191530,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.extra
-plugin@org.eclipse.rse=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse
-plugin@org.eclipse.rse.connectorservice.dstore=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.dstore
-plugin@org.eclipse.rse.connectorservice.local=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.local
-plugin@org.eclipse.rse.connectorservice.ssh=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.ssh
-plugin@org.eclipse.rse.connectorservice.telnet=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.telnet
-plugin@org.eclipse.rse.core=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.core
-plugin@org.eclipse.rse.doc.isv=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.isv
-plugin@org.eclipse.rse.doc.user=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/doc/org.eclipse.rse.doc.user
-plugin@org.eclipse.rse.dstore.security=v20080609,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.dstore.security
-plugin@org.eclipse.rse.efs=v200809041200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs
-plugin@org.eclipse.rse.efs.ui=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.efs.ui
-plugin@org.eclipse.rse.examples.daytime=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples.daytime
-plugin@org.eclipse.rse.examples.tutorial=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples.tutorial
-plugin@org.eclipse.rse.files.ui=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.files.ui
-plugin@org.eclipse.rse.importexport=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.importexport
-plugin@org.eclipse.rse.processes.ui=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
-plugin@org.eclipse.rse.sdk=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
-plugin@org.eclipse.rse.services.dstore=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
-plugin@org.eclipse.rse.services.files.ftp=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
-plugin@org.eclipse.rse.services.local=v200812041630,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
-plugin@org.eclipse.rse.services.ssh=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
-plugin@org.eclipse.rse.services.telnet=v200903091037,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
-plugin@org.eclipse.rse.services=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
-plugin@org.eclipse.rse.shells.ui=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui
-plugin@org.eclipse.rse.subsystems.files.core=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.core
-plugin@org.eclipse.rse.subsystems.files.dstore=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.dstore
-plugin@org.eclipse.rse.subsystems.files.ftp=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.ftp
-plugin@org.eclipse.rse.subsystems.files.local=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.local
-plugin@org.eclipse.rse.subsystems.files.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.ssh
-plugin@org.eclipse.rse.subsystems.processes.core=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.core
-plugin@org.eclipse.rse.subsystems.processes.dstore=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.dstore
-plugin@org.eclipse.rse.subsystems.processes.local=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.local
-plugin@org.eclipse.rse.subsystems.processes.shell.linux=v20080714,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux
-plugin@org.eclipse.rse.subsystems.shells.core=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.core
-plugin@org.eclipse.rse.subsystems.shells.dstore=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.dstore
-plugin@org.eclipse.rse.subsystems.shells.local=v20080604,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.local
-plugin@org.eclipse.rse.subsystems.shells.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.ssh
-plugin@org.eclipse.rse.subsystems.shells.telnet=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.telnet
-plugin@org.eclipse.rse.subsystems.terminals.core=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.terminals.core
-plugin@org.eclipse.rse.subsystems.terminals.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.terminals.ssh
-plugin@org.eclipse.rse.terminals.ui=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.terminals.ui
-plugin@org.eclipse.rse.tests=v200903070130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests
-plugin@org.eclipse.rse.tests.framework=v200902020100,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests.framework
-plugin@org.eclipse.rse.ui=v200903192345,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.ui
-plugin@org.eclipse.rse.useractions=v200902102200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/maps/terminal.map b/releng/org.eclipse.tm.releng/maps/terminal.map
deleted file mode 100644
index b954a0627..000000000
--- a/releng/org.eclipse.tm.releng/maps/terminal.map
+++ /dev/null
@@ -1,13 +0,0 @@
-feature@org.eclipse.tm.terminal=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal-feature
-feature@org.eclipse.tm.terminal.sdk=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.sdk-feature
-feature@org.eclipse.tm.terminal.serial=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial-feature
-feature@org.eclipse.tm.terminal.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh-feature
-feature@org.eclipse.tm.terminal.telnet=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet-feature
-feature@org.eclipse.tm.terminal.test=v200902082200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test-feature
-feature@org.eclipse.tm.terminal.view=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view-feature
-plugin@org.eclipse.tm.terminal=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal
-plugin@org.eclipse.tm.terminal.serial=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial
-plugin@org.eclipse.tm.terminal.ssh=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.ssh
-plugin@org.eclipse.tm.terminal.telnet=v200903051130,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.telnet
-plugin@org.eclipse.tm.terminal.test=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.test
-plugin@org.eclipse.tm.terminal.view=v200902011800,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.view \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/maps/testdrivers.map b/releng/org.eclipse.tm.releng/maps/testdrivers.map
deleted file mode 100644
index 6ef4354c7..000000000
--- a/releng/org.eclipse.tm.releng/maps/testdrivers.map
+++ /dev/null
@@ -1,6 +0,0 @@
-!*************** PROJECT CONTRIBUTION ********************************************************
-
-!*** Special entries from eclipse
-
-plugin@org.eclipse.test=v20071108,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
-fragment@org.eclipse.ant.optional.junit=v20070530,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
diff --git a/releng/org.eclipse.tm.releng/maps/tmcore.map b/releng/org.eclipse.tm.releng/maps/tmcore.map
deleted file mode 100644
index 21ee4b064..000000000
--- a/releng/org.eclipse.tm.releng/maps/tmcore.map
+++ /dev/null
@@ -1,2 +0,0 @@
-plugin@org.apache.commons.net,2.0.0=GET,http://download.eclipse.org/tools/orbit/downloads/drops/I20090407030832/bundles/org.apache.commons.net_2.0.0.v200903061330.jar
-plugin@org.apache.commons.net.source,2.0.0=GET,http://download.eclipse.org/tools/orbit/downloads/drops/I20090407030832/bundles/org.apache.commons.net.source_2.0.0.v200903061330.jar
diff --git a/releng/org.eclipse.tm.releng/maps/wince.map b/releng/org.eclipse.tm.releng/maps/wince.map
deleted file mode 100644
index cab32a9db..000000000
--- a/releng/org.eclipse.tm.releng/maps/wince.map
+++ /dev/null
@@ -1,6 +0,0 @@
-feature@org.eclipse.rse.wince=v200902102200,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.wince-feature
-!! feature@org.eclipse.rse.wince.wrapper=v20080609a,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.wince.wrapper-feature
-plugin@org.eclipse.rse.subsystems.wince=v200903051330,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.rse.subsystems.wince
-plugin@org.eclipse.tm.rapi=v200809301330,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.tm.rapi
-plugin@org.eclipse.tm.rapi.examples=v20080522,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.tm.rapi.examples
-plugin@org.eclipse.tm.rapi.tests=v20080522,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.core/wince/org.eclipse.tm.rapi.tests \ No newline at end of file
diff --git a/releng/org.eclipse.tm.releng/promoteToEclipse.rse.properties b/releng/org.eclipse.tm.releng/promoteToEclipse.rse.properties
deleted file mode 100644
index fc7e8448e..000000000
--- a/releng/org.eclipse.tm.releng/promoteToEclipse.rse.properties
+++ /dev/null
@@ -1,175 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-## promoteToEclipse.*.properties
-## specific version of promoteToEclipse.sh properties
-##
-## NOTE:
-## You must rename this file to promoteToEclipse.$subprojectName.properties for it to be
-## found when using the -sub flag; otherwise you'll have to use the -f flag to specify
-## a CUSTOM-named properties file
-
-# product being built (folder name prefix)
-projectName=tm
-subprojectName=rse
-projectNameVanity=`echo $projectName $subprojectName | tr "a-z" "A-Z"`; # or something else manually assigned
-
-# used to determine the actual name of the SDK zip (when builds are aliased)
-SDKfilenamepattern="RSE-SDK-*.zip"
-
-# the following two arrays must be the same size (or else the second one will default to blank)
-javadocModuleArray=( "RSE" ); # array, project-subproject, for the name of the zip scp'd to remote, eg. foo-bar-doc.zip
-# if "", create in $projectName/javadoc; if "/path", create in $projectName/$subprojectName/javadoc
-javadocFolderArray=( "/$subprojectName" ); # array of path fragments
-# list of targets to use when executing fixJavadocs.sh
-javadocTargetArray=( "-sub $subprojectName" );
-
-# publisher of newsgroup announcements
-newsgroupPublisherEmail="TM Builder <moberhuber@build.eclipse.org>"
-newsgroup=eclipse.dsdp.tm
-# to thread posts under an existing post (or posts) enter the slash-escaped Message-ID for which this is a reply,
-# eg: <du7hic\$qos\$1@utils.eclipse.org>
-newsgroupThreadReferences=""
-
-# default eclipse.org, build server, mapfile server usernames
-user=$USER
-# if no value set here or by -userIES flag, default to -user flag or value in properties file
-userIES=
-
-# group permissions on eclipse.org so that anyone can change files
-eclipseUserGroup="dsdp-tm"admin
-eclipsePermsDir=2775
-eclipsePermsFile=664
-
-# group permissions on build box so that anyone can change files
-buildUserGroup="www"
-buildPermsDir=2775
-buildPermsFile=664
-
-# IES map file branch (required)
-branchIES=
-
-# IES map file template: use "buildIDactual" and "webPath" as placeholders
-IESmapfileArray=(
-"RSE-runtime-buildIDactual.zip=webPath | | | runtime | $subprojectName"
-"RSE-SDK-buildIDactual.zip=webPath | | | sdk | $subprojectName" ); # array of lines
-
-### DEFAULT BEHAVIOUR OPTIONS ###
-
-# default setting for whether to do or skip the drop upload section: 0 = do, 1 = skip
-dodrop=1
-
-# default setting for whether to do or skip the javadoc section: 0 = do, 1 = skip
-dodocs=1
-
-# default setting for whether to do or skip the Update Manager jars section: 0 = do, 1 = skip
-UMjars=1
-
-#default buildID
-buildID=
-
-#default branch
-branch=1.0.0
-cvsbranch=HEAD
-
-#do RSS feed file update?
-RSS=1
-
-# do search cvs update?
-searchCVS=1
-# how long to block before giving up (in seconds, eg., 1200 for 20 mins wait)
-searchCVSTimeout=1200
-
-#do IES mapping file update?
-IES=0
-
-# debug output
-debug=0 ; # values can be 0,1,2
-
-#clean up /tmp folder?
-noclean=0;
-
-# compare drops folder after scp upload?
-noCompareDropsFolders=0 ; # default 0, do compare; set 1 to bypass or pass in querystring
-
-# compare UM folder after scp upload?
-noCompareUMFolders= ; # default 0, do compare; set 1 to bypass or pass in querystring
-
-# announce new build in newsgroup? (default 0)
-announce=0;
-
-### SERVER & PATH CONFIG OPTIONS ###
-
-#server on which builds occur (need to ssh to this box as $user@$buildServerFullName)
-buildServerFullName=`hostname`
-
-#server on which eclipse's production CVS is located (need to ssh to this box as $user@$eclipseServerFullName)
-eclipseServerFullName=dev.eclipse.org
-
-#server on which eclipse's production files are located (downloads, javadoc, etc.): ssh as $user@$downloadServerFullName)
-downloadServerFullName=download1.eclipse.org
-
-#paths on \$downloadServerFullName where files are published
-projectWWWDir=/home/data/httpd/download.eclipse.org/dsdp/$projectName
-#projectDropsDir=$projectWWWDir/$subprojectName/downloads/drops
-projectDropsDir=$projectWWWDir/downloads/drops
-
-#paths to build base, scripts, and drops on build server
-baseBuildDir=/home/www-data/build/dsdp/$projectName
-buildScriptsDir=/home/www-data/build/dsdp/scripts
-buildDropsDir=$baseBuildDir/$subprojectName/downloads/drops
-
-# path to website on build server
-localWebDir=/var/www/html/dsdp/$projectName
-
-# urls
-releaseNotesURL=http://www.eclipse.org/dsdp/$projectName/news/relnotes.php?project=$subprojectName
-downloadsURL=http://www.eclipse.org/dsdp/$projectName/downloads/?project=$subprojectName
-
-### ANT OPTIONS ###
-ANT=/opt/apache-ant-1.6/bin/ant
-
-### DEFAULT BEHAVIOUR AND JVM OPTIONS :: buildUpdate.sh ###
-
-# specify the correct java home & vm used to run the build
-javaHome=/opt/sun-java2-1.4
-vm=$javaHome/bin/java
-
-# zips to unpack for UM jar generation
-filePrefixesToUnzipArray=( "RSE-SDK-" "RSE-automated-tests-" "RSE-examples-" );
-
-# ant script and target to be executed
-antScript=org.eclipse.releng.generators/buildProductUpdateJars.xml
-target=run
-
-# default operations
-builder=1 # get builder packages from cvs
-promote=0 # don't promote by default
-skipjars=0 # when promoting, upload all jars (don't skip)
-cleanup=1 # delete temp stuff when done
-
-# compare UM folder after scp upload?
-noCompareUMFolders=0 ; # default 0, do compare; set 1 to bypass or pass in querystring
-
-# do 4-part jars?
-no4thPart=0;
-
-# where to get releng.generators.ProductUpdateBuilder, jars & ant scripts
-relengGeneratorsCVSPath=releng-common/tools/updates/org.eclipse.releng.generators
-
-# use a default value for basebuilderBranch? 0 = no, 1 = yes
-useDefaultBasebuilderBranch=0
-
-# See http://wiki.eclipse.org/Modeling_Project_Releng/Releasing#Contributing_To_Ganymede_Update_Site
-# pattern to use when searching for features to include in coordsite; defaults to ".*eclipse/features/org.eclipse..*(${subprojectName}|${subprojectName}.sdk)_.*\/$"
-coordsiteFeaturePattern=""
-# pattern to use when setting feature to include in coordsite's main feature ('Models and Model Development'); all other matching features will go in 'Enabling Features'
-coordsiteMainFeaturePattern=""
diff --git a/releng/org.eclipse.tm.releng/repoInfo.properties b/releng/org.eclipse.tm.releng/repoInfo.properties
deleted file mode 100644
index c1ae539a0..000000000
--- a/releng/org.eclipse.tm.releng/repoInfo.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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) - adapt for DSDP from o.e.emf.validation.releng
-###############################################################################
-cvsHost=dev.eclipse.org
-cvsReadProtocol=pserver
-cvsWriteProtocol=ext
-cvsReadUser=anonymous
-cvsWriteUser=moberhuber
-cvsWriteRelengUser=moberhuber
-cvsRep=/cvsroot/dsdp
diff --git a/releng/org.eclipse.tm.releng/templateFiles/rse.map.template b/releng/org.eclipse.tm.releng/templateFiles/rse.map.template
deleted file mode 100644
index 00a57167a..000000000
--- a/releng/org.eclipse.tm.releng/templateFiles/rse.map.template
+++ /dev/null
@@ -1,10 +0,0 @@
-!*************** PROJECT CONTRIBUTION ********************************************************
-
-!*** Special entries from eclipse
-
-plugin@org.eclipse.test=v20070226,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
-fragment@org.eclipse.ant.optional.junit=v20050226,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
-
-!*** Project's plugins, features and fragments
-
-@entries@
diff --git a/releng/org.eclipse.tm.releng/templateFiles/testManifest.xml.template b/releng/org.eclipse.tm.releng/templateFiles/testManifest.xml.template
deleted file mode 100644
index bc431c548..000000000
--- a/releng/org.eclipse.tm.releng/templateFiles/testManifest.xml.template
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<topLevel>
- <zipTypes>
- <zipType name="projruntime">
- <platform
- id="projRUN"
- name="All"
- fileName='&lt;a href="RSE-runtime-@build@.zip"&gt;RSE-runtime-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-runtime-@build@.zip.size@ - checksum:&lt;a href="RSE-runtime-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- <zipType name="projsdk">
- <platform
- id="projSRC"
- name="All"
- fileName='&lt;a href="RSE-SDK-@build@.zip"&gt;RSE-SDK-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-SDK-@build@.zip.size@ - checksum:&lt;a href="RSE-SDK-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- <zipType name="projtests">
- <platform
- id="T"
- name="All"
- fileName='&lt;a href="RSE-automated-tests-@build@.zip"&gt;RSE-automated-tests-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-automated-tests-@build@.zip.size@ - checksum:&lt;a href="RSE-automated-tests-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- <zipType name="projexamples">
- <platform
- id="EX"
- name="All"
- fileName='&lt;a href="RSE-examples-@build@.zip"&gt;RSE-examples-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-examples-@build@.zip.size@ - checksum:&lt;a href="RSE-examples-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- </zipTypes>
-
- <logFiles>
- <logFile name="org.eclipse.rse.tests_linux.gtk.xml">
- <effectedFile id="SDK"></effectedFile>
- <effectedFile id="projRUN"></effectedFile>
- </logFile>
-
- <!-- Comment out for now until we get tests on various platforms.
- <logFile name="org.eclipse.rse.tests_win32.xml">
- <effectedFile id="SDK"></effectedFile>
- <effectedFile id="projRUN"></effectedFile>
- </logFile>
- -->
-
-@entries@
-
- </logFiles>
-</topLevel>
diff --git a/releng/org.eclipse.tm.releng/testManifest.xml b/releng/org.eclipse.tm.releng/testManifest.xml
deleted file mode 100644
index 663d28f4c..000000000
--- a/releng/org.eclipse.tm.releng/testManifest.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<topLevel>
- <zipTypes>
- <zipType name="projruntime">
- <platform
- id="projRUN"
- name="All"
- fileName='&lt;a href="RSE-runtime-@build@.zip"&gt;RSE-runtime-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-runtime-@build@.zip.size@ - checksum:&lt;a href="RSE-runtime-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- <zipType name="projsdk">
- <platform
- id="projSRC"
- name="All"
- fileName='&lt;a href="RSE-SDK-@build@.zip"&gt;RSE-SDK-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-SDK-@build@.zip.size@ - checksum:&lt;a href="RSE-SDK-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- <zipType name="projtests">
- <platform
- id="T"
- name="All"
- fileName='&lt;a href="RSE-automated-tests-@build@.zip"&gt;RSE-automated-tests-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-automated-tests-@build@.zip.size@ - checksum:&lt;a href="RSE-automated-tests-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- <zipType name="projexamples">
- <platform
- id="EX"
- name="All"
- fileName='&lt;a href="RSE-examples-@build@.zip"&gt;RSE-examples-@build@.zip&lt;/a&gt; &lt;font size="2"&gt;(size:@RSE-examples-@build@.zip.size@ - checksum:&lt;a href="RSE-examples-@build@.zip.md5"&gt;md5&lt;/a&gt;)&lt;/font&gt;'>
- </platform>
- </zipType>
- </zipTypes>
-
- <logFiles>
- <logFile name="org.eclipse.rse.tests_linux.gtk.xml">
- <effectedFile id="SDK"></effectedFile>
- <effectedFile id="projRUN"></effectedFile>
- </logFile>
-
- <!-- Comment out for now until we get tests on various platforms.
- <logFile name="org.eclipse.rse.tests_win32.xml">
- <effectedFile id="SDK"></effectedFile>
- <effectedFile id="projRUN"></effectedFile>
- </logFile>
- -->
-
- <logFile name="plugins/org.eclipse.rse.examples_*/*.bin.log">
- <effectedFile id="EX"></effectedFile>
- </logFile>
- <logFile name="plugins/org.eclipse.rse_*/*.bin.log">
- <effectedFile id="SDK"></effectedFile>
- <effectedFile id="projRUN"></effectedFile>
- </logFile>
- <logFile name="plugins/org.eclipse.rse.tests_*/*.bin.log">
- <effectedFile id="T"></effectedFile>
- </logFile>
-
- </logFiles>
-</topLevel>
diff --git a/releng/readme.txt b/releng/readme.txt
deleted file mode 100644
index 78336b3a8..000000000
--- a/releng/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Use the "releng" folder for projects containing instructions and scripts for
-building RSE and the DSDP-TM Core components.
-All projects should be named "org.eclipse.rse.releng<.*>".
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 acad1c227..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 fbe0db88f..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dstore.doc.isv; singleton:=true
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-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 9659475c1..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/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 d4cc693f9..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 5, 2007</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 9f3214354..000000000
--- a/rse/doc/org.eclipse.dstore.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.dstore.doc.isv/build.properties b/rse/doc/org.eclipse.dstore.doc.isv/build.properties
deleted file mode 100755
index 1e99f1094..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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
-src.includes = about.html
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 c63248b54..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/buildDoc.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<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="info" 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" />
- <available file="/shared/dsdp/tm/ibm-java2-ppc64-50/bin/javadoc" property="javadoc" value="/shared/dsdp/tm/ibm-java2-ppc64-50/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}" />
- <replace file="${basedir}/${optionsFile}" token="@cp@" value="${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" resultproperty="javadocResult">
- <arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
- </exec>
- <echo message="javadoc result = ${javadocResult}"/>
- </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 783276acb..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/customBuildCallbacks.xml
+++ /dev/null
@@ -1,167 +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
- -->
-<!-- ===================================================================== -->
-<!-- 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 e2212a9ba..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, 2007. 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.</p>
-
-<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 957c69289..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/guide/Communications.html
+++ /dev/null
@@ -1,158 +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, 2007. 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.
-</p>
-
-<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>
-
-<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>
-</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 b82f963e6..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, 2007. 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:
-</p>
-<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>
-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 1f694c82f..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, 2007.
-</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 a8c31046f..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/options.txt
+++ /dev/null
@@ -1,27 +0,0 @@
--charset "iso-8859-1"
--source 1.4
--sourcepath "../org.eclipse.dstore.core/src
-;../org.eclipse.dstore.extra/src"
--d reference/api
--bootclasspath @rt@
--classpath @cp@
--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 3.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
-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 21eca0ac6..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE DStore ISV Documentation
-providerName=Eclipse.org - DSDP
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 7752795a3..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- 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
- -->
-
-<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 92adea2bc..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/provisional_api.html
+++ /dev/null
@@ -1,34 +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) 2006, 2007 Wind River Systems, Inc. and others. 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 more
-public feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of TM / RSE 2.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after TM / RSE 2.0
-in a not backward compatible way. We will make every sensible effort to
-keep at least Source API Compatibility intact, but in cases where this would
-lead to unnecessary code bloat we will go with API breakage. All such API changes will be voted on
-by committers on the <a href="https://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 TM 3.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 14db07978..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/toc.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">
- <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 more
-public feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of TM / RSE 2.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after TM / RSE 2.0
-in a not backward compatible way. We will make every sensible effort to
-keep at least Source API Compatibility intact, but in cases where this would
-lead to unnecessary code bloat we will go with API breakage. All such API changes will be voted on
-by committers on the <a href="https://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 TM 3.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 67a0d7cc9..000000000
--- a/rse/doc/org.eclipse.dstore.doc.isv/toc.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
- <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<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" href="reference/api/org/eclipse/dstore/core/miners/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 ce675f95b..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 9aae13b96..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: 3.1.0.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 9659475c1..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/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 d4cc693f9..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 5, 2007</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 5f836f759..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/buildDoc.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<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.help*.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.jsch*.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="info" 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.services/plugin.xml" destination="${dest}" />
- <pde.convertSchemaToHTML manifest="../org.eclipse.rse.subsystems.files.core/plugin.xml" destination="${dest}" />
- <pde.convertSchemaToHTML manifest="../org.eclipse.rse.subsystems.files.ftp/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" />
- <available file="/shared/dsdp/tm/ibm-java2-ppc64-50/bin/javadoc" property="javadoc" value="/shared/dsdp/tm/ibm-java2-ppc64-50/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}" />
- <replace file="${basedir}/${optionsFile}" token="@cp@" value="${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" resultproperty="javadocResult">
- <arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
- </exec>
- <echo message="javadoc result = ${javadocResult}"/>
- </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 0679e29fc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/customBuildCallbacks.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<!-- ===================================================================== -->
-<!-- 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 9e692f537..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html
+++ /dev/null
@@ -1,231 +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, 2007. 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 in profiles by an registered persistence provider.
-</p>
-
-<h2><A name="profiles">Profiles</A></h2>
-<p>
-To facilitate sharing Hosts are owned by <b>Profiles</b>.
-In 1.0 these were simply folders in the RemoteSystemsConnections
-project. With the introduction of persistence providers in 2.0, profiles
-can now be persisted in multiple forms - including the 1.0 scheme.
-It is our intention to have RSE allow for the sharing of profiles by exporting to and importing from
-the file system or from projects in a future release.
-</p>
-<p>
-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.
-</p>
-<!-- TODO
-<p>
-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>
--->
-<!-- TODO rework
-As an aside, user IDs and passwords are not shared with the team repository, but rather stored only locally per
-workstation.
--->
-
-<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>
-<p>
-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="systems">Connector services and their 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/core/model/SystemStartHere.html#getSystemRegistry()">getSystemRegistry()</A> in the
-<A href="../reference/api/org/eclipse/rse/core/model/SystemStartHere.html">SystemStartHere</A>
-class in the <samp>org.eclipse.rse.core</samp> plugin.
-</p>
-
-<p>A UI-enabled extension of the system registry is available through the
-<A href="../reference/api/org/eclipse/rse/ui/model/ISystemRegistryUI.html">ISystemRegistryUI</A> interface.
-This interface is available by calling the static method
-<A href="../reference/api/org/eclipse/rse/ui/RSEUIPlugin.html#getTheSystemRegistryUI()">getTheSystemRegistryUI()</A> in the
-<A href="../reference/api/org/eclipse/rse/ui/RSEUIPlugin.html">RSEUIPlugin</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 41377c7af..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/Extensions.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, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<!-- David Dykstal (IBM) - [] remove unintended duplication from the list of extension points -->
-<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,
-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 described in
-this documentation. 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>
-Listed below are the most common extension points defined by the Remote System Explorer.
-They are further described in the reference section along with others that are more special-purpose.
-The ones listed here 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 by the
-<strong>org.eclipse.rse.core</strong> and <strong>org.eclipse.rse.ui</strong> plugins.
-</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.systemTypes</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.core.subsystemConfigurations</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_services_archivehandlers.html">org.eclipse.rse.services.archivehandlers</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.ui.popupMenus</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.ui.propertyPages</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>
- <!-- 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>
-</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 7bb76c000..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 05d6a717f..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.verbiage.&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 346a58651..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/logger/uiLoggerAPI.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, 2007. 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>
-<h1>RSE Logger API</h1>
-<p>To log your messages to the workbench log file in <samp>.metadata\.log</samp>,
-either base your plugin class on the <samp>org.eclipse.rse.ui.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 b0d252be7..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/ui/SystemBasePlugin.html">org.eclipse.rse.ui.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/ui/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/ui/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/ui/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/ui/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.ui.*; // <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 1995258e5..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/messages/uiMessagesCore.html
+++ /dev/null
@@ -1,1338 +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>RSEG0402</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>%1 must be between %2 and %3.<br>
-<b>LevelTwo: </b><br>
-<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 cancelled. 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 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.<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>Please enter a valid 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>Please enter a valid 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 the selected 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>Invalid connection name. Must be a valid folder name in the underlying file system.<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 between 1 and 65536.<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. Specify another name for the profile.<br>
-<H3>RSEG1041</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Connection of name %1 already exists in profile %2. Continue?<br>
-<b>LevelTwo: </b>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.<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>RSEG1119</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Saving %1...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1120</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>%1 is not a valid archive name.<br>
-<b>LevelTwo: </b>You must give a filename with an extension that is recognized as a valid archive type extension.<br>
-<H3>RSEG1122</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The archive is corrupted or unreadable.<br>
-<b>LevelTwo: </b>The archive cannot be opened because its format is unrecognized, or its contents are damaged in some way.<br>
-<H3>RSEG1123</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Cannot create archive.<br>
-<b>LevelTwo: </b>There was an error creating the empty archive. The archive was not created.<br>
-<H3>RSEG1124</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Creation of the virtual file or folder %1 failed.<br>
-<b>LevelTwo: </b>There was an error creating the virtual file or folder. The virtual file or folder was not created.<br>
-<H3>RSEG1125</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Deletion of the virtual file or folder %1 failed.<br>
-<b>LevelTwo: </b>There was an error deleting the virtual file or folder. The virtual file or folder was not deleted.<br>
-<H3>RSEG1126</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Could not move the virtual file or folder %1.<br>
-<b>LevelTwo: </b>There was an error moving the virtual file or folder. The virtual file or folder was not moved.<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>
-<!-- [191013] commenting out user actions
-<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>
-<!-- [191013] commenting out user actions
-<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>
-<!-- [191013] commenting out user actions
-<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 not 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>
-<!-- [191013] commenting out user actions
-<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>RSEG1242</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Daemon failed to launch server on %1 using port %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEG1243</H3>
-<b>Severity: </b>Unexpected<br>
-<b>LevelOne: </b>Failed to connect to the daemon on %1 using port %2 with an unexpected exception<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEG1244</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The selected encoding is not supported.<br>
-<b>LevelTwo: </b><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>RSEG1257</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1 - Cancelled<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1258</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1 - Disconnected<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 transfer operation<br>
-<b>LevelTwo: </b>The source %1 cannot be transferred into the target %2<br>
-<H3>RSEG1280</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Downloading %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1281</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Uploading %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1282</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Synchronizing Resources...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1285</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Extracting %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1290</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>%1 of %2 complete (%3)<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1295</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Downloading resources...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1296</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Uploading resources...<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1297</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The new password is invalid.<br>
-<b>LevelTwo: </b>The remote system indicated that the new password is unacceptable. Please ensure the new password follows all password rules for the remote system.<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>RSEG1304</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Archive Management is not supported by the current File subsystem's configuration.<br>
-<b>LevelTwo: </b>In the properties for the File subsystem, choose a configuration that supports Archive Management.<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>
-<H3>RSEG1500</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Remote Error List: %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEG1600</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Folder path must not be empty.<br>
-<b>LevelTwo: </b>Select a folder from the dropdown list or click the Browse... button and select a folder from the dialog.<br>
-<H3>RSEG1601</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Regular expression is not valid.<br>
-<b>LevelTwo: </b>The value %1 you entered is not a valid regular expression.<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 '%1' 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>RSEF1312</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Target folder cannot descend from source folder<br>
-<b>LevelTwo: </b>It is impossible to move a folder to one of its subfolders.<br>
-<H3>RSEF1315</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Deleting %1...<br>
-<b>LevelTwo: </b><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 write access to the file.<br>
-<b>LevelTwo: </b>Change file permissions to ensure you have write 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 replace it?<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF5013</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Parent folder %1 does not exist. Do you want to create it?<br>
-<b>LevelTwo: </b>The parent folder must be created for the file to be created.<br>
-<H3>RSEF5014</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Parent folder %1 does not exist. Verify that the correct path was entered.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF5020</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Folder %1 is not readable. Cannot expand<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF5101</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to use connection.<br>
-<b>LevelTwo: </b>Please correct, or select alternate connection.<br>
-<H3>RSEF5102</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unexpected exception received: %1.<br>
-<b>LevelTwo: </b>Please see error log for details.<br>
-<H3>RSEF5103</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>The file '%1' already exists on %2. Do you want to overwrite it?<br>
-<b>LevelTwo: </b>Click Yes to overwrite the existing file, or click No to cancel the export.<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>RSEF6003</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The encoding is not supported.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6101</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>One or more cached files have changes that have not been saved on the host.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6102</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Unable to synchronize cache changes to host. Operation cancelled.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6201</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The IP address or host name can not be empty.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6202</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The IP address is not valid.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF6203</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The host name is not valid.<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>
-<H3>RSEF8050</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Can not copy root file system<br>
-<b>LevelTwo: </b>The root is not something that can be copied<br>
-<H3>RSEF8051</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Could not close import stream for %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF8052</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to import %1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEF8053</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Creating folder %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF8054</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Problems were encountered during import<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8055</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Error opening input stream for %1<br>
-<b>LevelTwo: </b>%2<br>
-<H3>RSEF8056</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to import %1<br>
-<b>LevelTwo: </b>The file cannot be copied onto itself<br>
-<H3>RSEF8057</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Error occurred while exporting %1: %2<br>
-<b>LevelTwo: </b>%3<br>
-<H3>RSEF8058</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Problems were encountered during export<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8059</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Cannot overwrite file %1<br>
-<b>LevelTwo: </b>The file does not have its write attribute set, so it cannot be written to<br>
-<H3>RSEF8060</H3>
-<b>Severity: </b>Question<br>
-<b>LevelOne: </b>Target folder does not exist. Would you like to create it?<br>
-<b>LevelTwo: </b>Press Yes to create the folder %1, No to cancel<br>
-<H3>RSEF8061</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Target folder already exists, as a file<br>
-<b>LevelTwo: </b>The remote resource %1 already exists, but as a file, not a folder<br>
-<H3>RSEF8062</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Destination folder conflicts with location of %1<br>
-<b>LevelTwo: </b>You are attempting to export to the local file system, to a location that overlaps the resources being exported.<br>
-<H3>RSEF8063</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Source is a file, not a folder<br>
-<b>LevelTwo: </b>The remote resource %1 is a file, but a folder is required<br>
-<H3>RSEF8064</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>There are no resources currently selected for import<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF8065</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Select the source directory<br>
-<b>LevelTwo: </b><br>
-<H3>RSEF8066</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Enter or select a source folder<br>
-<b>LevelTwo: </b>You have left the source folder empty, but it must be set to continue.<br>
-<H3>RSEF8067</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Export problems<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8068</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>There are no resources currently selected for export<br>
-<b>LevelTwo: </b>Select resources to be exported and try again<br>
-<H3>RSEF8069</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Please enter a destination folder<br>
-<b>LevelTwo: </b>The destination folder is empty. You must select a destination folder.<br>
-<H3>RSEF8070</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Import problems<br>
-<b>LevelTwo: </b>%1<br>
-<H3>RSEF8071</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>There are no resources currently selected for import<br>
-<b>LevelTwo: </b>Select resources to be imported and try again<br>
-<H3>RSEF8072</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Filtering selection...<br>
-<b>LevelTwo: </b><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. 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.<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>
-<H3>RSEC2301</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to launch server on host %1.<br>
-<b>LevelTwo: </b>Message from host: %2<br>
-<H3>RSEC2302</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Invalid password or user ID for %1.<br>
-<b>LevelTwo: </b>Message from host: %2<br>
-<H3>RSEC2303</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Incompatible host server running on remote system %1.<br>
-<b>LevelTwo: </b>The host server is not a Remote System Explorer server.<br>
-<H3>RSEC2304</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Incompatible Remote System Explorer host server running on remote system %1.<br>
-<b>LevelTwo: </b>The host server needs to be updated to work with the current client.<br>
-<H3>RSEC2305</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to connect to REXEC host service on port %1 of host %2<br>
-<b>LevelTwo: </b>Message from host: %3<br>
-<H3>RSEC2306</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>Port %1 is normally used for the %2 service.<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2307</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>Unable to establish a secure connection with the Remote System Explorer host server.<br>
-<b>LevelTwo: </b>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<br>
-<H3>RSEC2308</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>The host server running on remote system %1 is an older version than the RSE client.<br>
-<b>LevelTwo: </b>It is recommended that the client and server versions match.<br>
-<H3>RSEC2309</H3>
-<b>Severity: </b>Warning<br>
-<b>LevelOne: </b>The host server running on remote system %1 is a newer version than the RSE client.<br>
-<b>LevelTwo: </b>It is recommended that the client and server versions match.<br>
-<H3>RSEC2310</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Starting Remote System Explorer host server using REXEC<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2311</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Starting Remote System Explorer host server using daemon<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2312</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Connecting to Remote System Explorer host server on port %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2313</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Initializing Remote System Explorer host server<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2314</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Communication with the remote system %1 has been secured using SSL. Continue?<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2315</H3>
-<b>Severity: </b>Information<br>
-<b>LevelOne: </b>Connection %1 has not been secured using SSL. Proceed anyway?<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC2316</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The specified server port is out of the allowed range: %1<br>
-<b>LevelTwo: </b><br>
-<H3>RSEC3001</H3>
-<b>Severity: </b>Error<br>
-<b>LevelOne: </b>The connection %1 is currently offline and cannot be connected.<br>
-<b>LevelTwo: </b>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 deselect the Work Offline action.<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 a6f2407d6..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/core/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 2d27c6cd9..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/ui/SystemBasePlugin.html">org.eclipse.rse.ui.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/ui/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/ui/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/ui/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/ui/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/ui/SystemBasePlugin.html#initializeImageRegistry()">initializeImageRegistry()</A></samp>. Call
-<samp><A href="../../../reference/api/org/eclipse/rse/ui/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/ui/SystemBasePlugin.html#getPluginId()">getPluginId()</A></samp>. Return this plugin's ID.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemBasePlugin.html#getActiveWorkbenchShell()">getActiveWorkbenchShell()</A></samp>. Return the shell of the active workbench window.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemBasePlugin.html#getActiveWorkbenchWindow()">getActiveWorkbenchWindow()</A></samp>. Return the active workbench window.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemBasePlugin.html#getWorkspaceRoot()">getWorkspaceRoot()</A></samp>. Return the root of the workspace.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemBasePlugin.html#getWorkspace()">getWorkspace()</A></samp>. Return the workspace root.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/ui/SystemBasePlugin.html#getInstallLocation()">getInstallLocation()</A></samp>. Return the install directory for this plugin.
-<li><samp><A href="../../../reference/api/org/eclipse/rse/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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/ui/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 b5dae9e86..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/properties/uiPropertiesAPI.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, 2007. 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>See <a href="../../../guide/plugin/propertypage.html">Plugging In Property Pages</a>
-for information on how to contribute property pages for remote resources.
-Because remote resources have no underlying eclipse resource, and typically all are instances of the same class,
-Eclipse Filtering capabilities are used to allow 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 42e409da3..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/uiAPI.html
+++ /dev/null
@@ -1,129 +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, 2007. 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>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/core/model/ISystemRegistry.html#fireRemoteResourceChangeEvent(int, java.lang.Object, java.lang.Object, org.eclipse.rse.core.subsystems.ISubSystem, java.lang.String)">method</a></samp>.
-To get the system registry, use the
-<samp><A href="../../reference/api/org/eclipse/rse/core/model/SystemStartHere.html#getSystemRegistry()">method</a></samp>.
-</p>
-
-<p>At times, you may want to post events in a dispatch thread rather than using the
-original client's thread; or you may need access to the System Clipboard.
-Such operations are only possible when the UI
-is loaded, and therefore you need to use
-<samp><A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#fireRemoteResourceChangeEvent(int, java.lang.Object, java.lang.Object, org.eclipse.rse.core.subsystems.ISubSystem, java.lang.String, java.lang.Object)">ISystemRegistry.fireEvent()</a></samp>
-method in that case. To get the system registry UI interface, use the
-<samp><A href="../../reference/api/org/eclipse/rse/ui/RSEUIPlugin.html#getTheSystemRegistryUI()">RSEUIPlugin.getTheSystemRegistryUI()</a></samp>
-method.
-</p>
-
-</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 7ff8df528..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/other.html
+++ /dev/null
@@ -1,196 +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, 2007. 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><a name="viewActions"></a>
- <samp><a href="../../../org.eclipse.platform.doc.isv/guide/workbench_basicext_viewActions.htm">org.eclipse.ui.viewActions</a></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><a name="property"></a>
- <samp>
- <!-- a href="../../../org.eclipse.platform.doc.isv/guide/preferences_prop_contribute.htm" -->
- <a href="propertypage.html">
- org.eclipse.ui.propertyPages</a></samp></TD>
- <TD>For adding property pages for 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>
- <li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp></li>
- <li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp></li>
- <li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp></li>
- <li>Remote Elements: your model objects, which are adaptable to <samp>ISystemViewElementAdapter</samp>.
- For the RSE-provided reusable file, process and shell subsystems, these are
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.html">IRemoteFile</a></samp>,
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.html">IRemoteProcess</a></samp> and
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.html">IRemoteCommandShell</a></samp>, respectively.
- In the Remote Command View, you'll also find
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.html">IRemoteError</a></samp> and
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.html">IRemoteOutput</a></samp>.
- </li>
- </ul>
- Because all RSE elements adapt to
- <samp><A href="../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp>,
- which in turn implements
- <samp><A href="../../../org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IActionFilter.html">org.eclipse.ui.IActionFilter</A></samp>,
- it is possible to scope your property pages to only appear for certain system types or subsystems, using
- the extension point's <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;subsystemConfigurationId&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><a name="popup"></a>
- <samp>
- <!-- a href="../../../org.eclipse.platform.doc.isv/guide/workbench_basicext_popupMenus.htm" -->
- <a href="popup.html">
- org.eclipse.ui.popupMenus</a></samp>
- </TD>
- <TD>For adding pop-up menu actions for 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>
- <li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp></li>
- <li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp></li>
- <li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp></li>
- <li>Remote Elements: your model objects, which are adaptable to <samp>ISystemViewElementAdapter</samp>.
- For the RSE-provided reusable file, process and shell subsystems, these are
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.html">IRemoteFile</a></samp>,
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.html">IRemoteProcess</a></samp> and
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.html">IRemoteCommandShell</a></samp>, respectively.
- In the Remote Command View, you'll also find
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.html">IRemoteError</a></samp> and
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.html">IRemoteOutput</a></samp>.
- </li>
- </ul>
- Because all RSE elements adapt to
- <samp><A href="../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp>,
- which in turn extends
- <samp><A href="../../../org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IActionFilter.html">org.eclipse.ui.IActionFilter</A></samp>,
- it is possible to scope your actions to only appear for certain system types or subsystems, using
- the extension point's <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;subsystemConfigurationId&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>"subsystemConfigurationId"</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>"subsystemConfigurationCategory"</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 63fbe4009..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html
+++ /dev/null
@@ -1,161 +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, 2007. 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="../../../org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_popupMenus.html">org.eclipse.ui.popupMenus</a></samp> extension point
-from the base Eclipse Platform is used to contribute popup menus.
-</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>
-<li><a name="objectClass"></a>
- <b>objectClass</b>. The element on which the popup menu action should appear.
- 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>
- <li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp></li>
- <li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp></li>
- <li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp></li>
- <li>Remote Elements: your model objects, which are adaptable to <samp>ISystemViewElementAdapter</samp>.
- For the RSE-provided reusable file, process and shell subsystems, these are
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.html">IRemoteFile</a></samp>,
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.html">IRemoteProcess</a></samp> and
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.html">IRemoteCommandShell</a></samp>, respectively.
- In the Remote Command View, you'll also find
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteError.html">IRemoteError</a></samp> and
- <samp><a href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteOutput.html">IRemoteOutput</a></samp>.
- </li>
- </ul></li>
-<li><a name="filtering"></a>
- <b><i>filtering attributes</i></b>.To scope which remote objects these actions should show up for.
- Because all RSE elements adapt to
- <samp><A href="../../reference/api/org/eclipse/rse/ui/view/ISystemViewElementAdapter.html">ISystemViewElementAdapter</A></samp>,
- which in turn extends
- <samp><A href="../../../org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IActionFilter.html">org.eclipse.ui.IActionFilter</A></samp>,
- it is possible to scope your actions to only appear for certain system types or subsystems, using
- the extension point's <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;subsystemConfigurationId&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="other.html#scoping">Scoping</a> for all the filter <samp>names</samp> supported by RSE objects.
- </li>
-</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 implements
-<samp>
-<A href="../../../org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IObjectActionDelegate.html">IObjectActionDelegate</A>
-</samp> from the Eclipse platform.
-</p>
-<br><hr>
-<p>See the <a href="../tutorial/popup.html">pop-up menu action tutorial</a> for a step-by-step example.</p>
-<p>See the <a href="../../../org.eclipse.platform.doc.isv/guide/workbench_basicext_popupMenus.htm">Eclipse Platform Programmer's Guide</a>
-for more background information.</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 2d85c396f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html
+++ /dev/null
@@ -1,66 +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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<!-- David Dykstal (IBM) - [193740] fix links for referenced classes -->
-<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="../../../org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_propertyPages.html">org.eclipse.ui.propertyPages</a></samp> extension point
-from the base Eclipse Platform is used to contribute property pages.<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>
-<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>
-<li><b>icon</b>. An optional icon to show in the Properties dialog for this property page.</li>
-<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>
-<li><b><i>objectClass</i></b>. Specify the class or interface of the model objects for which
-this property page should be registered. Available interfaces are are identical to those in the
-<samp><A href="popup.html#objectClass">popupMenus</A></samp> extension point.</li>
-<li><b><i>filtering criteria</i></b>. To scope which 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#filtering">popupMenus</A></samp>
-extension point.</li>
-<!--
-Supported through the
-<samp><a href="../../reference/api/org/eclipse/rse/core/SystemRemoteObjectMatcher.html">SystemRemoteObjectMatcher</a></samp>
-class, 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 <samp><A href="../../reference/api/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.html">SystemBasePropertyPage</A></samp> to
-make it easier to create these property pages for remote objects. The only methods you must implement in your
-class are <samp>createContentArea(Composite)</samp>, which populates the details page on the right side when the node is
-selected on the left side; and <samp>verifyPageContents()</samp> which, naturally, validates the contents of the page.
-</p>
-
-<br><hr>
-<p>See the <a href="../tutorial/propertypage.html">property page tutorial</a> for a step-by-step example.</p>
-<p>See the <a href="../../../org.eclipse.platform.doc.isv/guide/preferences_prop_contribute.htm">Eclipse Platform Programmer's Guide</a>
- for more background information.</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 5b0ff5ad4..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/subsystem.html
+++ /dev/null
@@ -1,248 +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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<!-- David Dykstal (IBM) - [193747] updated links and corrected syntax errors -->
-<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_core_subsystemConfigurations.html">org.eclipse.rse.core.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_core_subsystemConfigurations.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.
-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>
-<li><b>vendor</b>.
-Your company name, shown in properties dialog for subsystems created by this subsystem configuration.</li>
-<li><b>icon</b>.
-The icon displayed in the Remote Systems view for each subsystem created by this subsystem configuration.</li>
-<li><b>iconlive</b>.
-The icon used when the subsystem is physically connected to its remote system.</li>
-<li><b>name</b>.
-The name displayed in the Remote Systems view for each subsystem created by this subsystem configuration.</li>
-<li><b>systemTypeIds</b>.
-A semi-colon separated list of system type IDs 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. Wildcards are
-supported; in order to register against all system types, specify a single "*".</li>
-<li><b>serviceType</b>. An optional semi-colon separated list of names and transports that can be used to match this service with remotelly advertised services through DNS-SD or any other supported service discovery protocol.
-The name would usually be the keyword used by the <A href="http://www.iana.org/assignments/port-numbers">IANA</A>
-or by <A href="http://www.dns-sd.org/ServiceTypes.html">DNS SRV service types (RFC 2782)</A>.</li>
-<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>
-<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.</li>
-</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>ISubSystemConfiguration</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/core/subsystems/SubSystem.html#internalResolveFilterString(java.lang.String,%20org.eclipse.core.runtime.IProgressMonitor)">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>connector service manager</TD>
- <TD><samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">AbstractConnectorServiceManager</A></samp></TD>
- <TD>Manages a single connector service 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>manage persistent properties via calls to the inherited <A href="../../reference/api/org/eclipse/rse/core/model/PropertySetContainer.html#createPropertySet(java.lang.String)">createPropertySet</A>,
- <A href="../../reference/api/org/eclipse/rse/core/model/PropertySetContainer.html#getPropertySet(java.lang.String)">getPropertySet</A> and related methods,</li>
- <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(java.lang.String,%20org.eclipse.core.runtime.IProgressMonitor)">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.</li>
- </ul>
- </li>
- <li>Creating a subclass of <A href="../../reference/api/org/eclipse/rse/core/subsystems/SubSystemConfiguration.html">SubSystemConfiguration.</A></li>
- <li>Defining your <A href="../../reference/extension-points/org_eclipse_rse_core_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>
- MyAdapterFactory factory = new MyAdapterFactory(); // extends AbstractSystemRemoteAdapterFactory<br>
- IAdapterManager manager = Platform.getAdapterManager();<br>
- manager.registerAdapters(factory, MyModelObject1.class);<br>
- 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>
- <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>
- <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>
- <li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/ui/subsystems/ISubSystemConfigurationAdapter.html#configureNewFilterAction(org.eclipse.rse.core.subsystems.ISubSystemConfiguration,%20org.eclipse.rse.ui.filters.actions.SystemNewFilterAction,%20java.lang.Object)">getNewFilterPoolFilterAction(SystemFilterPool, Shell)</a></samp>
- method in your subsystem configuration, to configure 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>
- </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 bbb4b652c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/systemtype.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">
-<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>
-and <samp><A href="../../reference/extension-points/org_eclipse_rse_core_systemTypeProviders.html">org.eclipse.rse.core.systemTypeProviders</a></samp>
-extension points are 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 f9d25a0ab..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int.html
+++ /dev/null
@@ -1,51 +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>.
-</ul>
-</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 more
-public feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of TM / RSE 2.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after TM / RSE 2.0
-in a not backward compatible way. We will make every sensible effort to
-keep at least Source API Compatibility intact, but in cases where this would
-lead to unnecessary code bloat we will go with API breakage. All such API changes will be voted on
-by committers on the <a href="https://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 TM 3.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 ee61db6de..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_architecture.html
+++ /dev/null
@@ -1,83 +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="#UI">UI Layer</A></li>
-</ul>
-
-
-<A name="Services"></A><h2>RSE Service Layer</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>
-<A name="Subsystems"></A><h2>RSE Subsystem Layer</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 do not have to be implemented on top of a formally defined service layer, although this is highly recommended.
-Instead it may have all the services implemented directly in the subsystem itself.
-If a subsystem does not use a service layer it should return <strong>null</strong> when implementing getServiceType().
-</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>
-
-<A name="UI"></A><h2>RSE UI Layer</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 8dfb4872c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_connectorservices.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2007. 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>
-<p>
-Connector Services provide the mechanism for maintaining a connection to a particular remote system, requesting whatever credentials are
-required for authentication, and for controlling the persistence of those credentials. A connector service is typically created
-or referenced by a subsystem configuration when a new subsystem instance is being created.
-</p><p>
-Every subsystem has a connector service. Some subsystems will share a connector service among themselves.
-Subsystems that share a connector service all connect and disconnect at the same time.
-For example, a file subsystem and
-a shell subsystem that are both using the SSH protocol will share the same connector service instance so that their connections are established and
-removed at the same time.
-</p><p>
-Connector services use credentials providers (see <code>ICredentialsProvider</code>) to establish any credentials needed for authentication to a
-remote system.
-</p>
-</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 4e6cb9094..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, 2007. 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 Filters</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 70940c1d2..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_hosts.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2007. 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>
-<p>
-Hosts, sometimes called "connections", are visible as the top level entities shown in the Remote Systems view.
-Hosts are always created referencing a system type.
-The system type determines the kinds of services that will be available to that host.
-System types are defined by the <code>org.eclipse.rse.core.systemTypes</code> extension point, which lists the <code>subsystemConfigurations</code>
-that are valid for type.
-</p><p>
-Once instantiated, hosts can be connected to their target systems.
-This causes the connector services associated with
-the subsystems belonging to that host to request connection.
-Disconnect works similarly.
-</p>
-</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 fbe1f348f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_overview.html
+++ /dev/null
@@ -1,49 +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 actions to the pop-up menus for remote objects, create your own
-system types or subsystems that appear when a connection is expanded,
-or even contribute new persistence schemes for storing RSE data. 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
-<a href="../guide/plugin/other.html">Eclipse Platform extension points</a>
-to add property pages, author menu items, tool bar actions,
-pop-up menu actions, and more for 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 a92a0f6d2..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_services.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2007. 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>
-<p>
-RSE is built on top of a service layer that provides services that access the remote systems.
-These service implementations are typically protocol-specific but will obey an interface that defined for that paricular service.
-For example, a file service will obey the interface defined in the package
-<code>org.eclipse.rse.services.files</code>, but there
-exist implementations for the dstore, FTP, and SSH protocols.
-</p>
-<p>
-RSE supplies service definitions for a file service, a shell service for submitting remote commands, a search service, and a process service.
-Implementers that which to use different protocols than the ones supplied should use the existing service definitions to fit into the current
-structure.
-</p>
-<p>
-It is not absolutely necessary to have a services layer.
-Implementers of subsystems that provide access to resources that in narrow domains
-could forgo the creation of explicit service classes and embed the
-support directly in the subsystem.
-</p>
-</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 1336d32a9..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/rse_int_subsystems.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2007. 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>
-<p>
-Subsystems provide a layer of abstraction on the set of services provided at lower layers.
-Subsystems make remote resources individually visible to their clients and expose the relationships among these resources - such as the parent-child
-relationship between directories and files on a remote file system.
-</p>
-<p>
-There should typically be only one subsystem implementation for each type of remote resource.
-Minor differences between remote systems or
-the protocols required to access them should be provided by different
-implementations of an underlying service.
-For example, RSE provides a single
-exemplary file subsystem, but that file subsystem uses different file services to use different remote file access protocols.
-The duty of tieing a subsystem to its underlying service goes to the subsystem configuration.
-</p>
-<p>
-A subsystem configuration creates subsystems of the kind it understands and, in addition, create them with the appropriate
-underlying service if there is one. These configuration classes are registered with RSE using the
-<code>org.eclipse.rse.core.subsystemConfigurations</code> extension point.
-</p>
-<p>
-RSE supplies ready-made subsystems for files, command execution, and processes.
-</p>
-</body>
-</html>
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 476613d09..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 getInstance()
- {
- 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 af4f1a4ec..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()&gt;0) &amp;&amp; (textDevr.getText().trim().length()&gt;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 a5a19592f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/DeveloperResourceAdapter.html
+++ /dev/null
@@ -1,212 +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;
-
- }
-
-}
-</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 a2215bd40..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, 2007. 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(String filterString, IProgressMonitor monitor)
- 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"></a>protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
- 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 7cd52969e..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, 2007. 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(String filterString, IProgressMonitor monitor)
- 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 &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>}
- 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) &amp;&amp; (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(Object parent, String filterString, IProgressMonitor monitor)
- 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 43f7c91e3..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.getInstance()
- .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"></a><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 ee93878b6..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.getInstance()
- .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 1dc8da395..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 &amp;&amp; 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) &amp;&amp; (folders.length&gt;0))
- {
- for (int idx=0; !stopped &amp;&amp; (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 9e450f86c..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin.html
+++ /dev/null
@@ -1,172 +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><code>
-package rsesamples;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class RSESamplesPlugin extends SystemBasePlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "RSESamples";
-
- // The shared instance
- private static RSESamplesPlugin plugin;
-
- // ResourceBundle
- private ResourceBundle resourceBundle = null;
-
- // Message file
- private SystemMessageFile messageFile = null;
-
- /**
- * The constructor
- */
- public RSESamplesPlugin() {
- super();
- }
-
- /*
- * (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;
- }
-
- /*
- * (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);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.SystemBasePlugin#initializeImageRegistry()
- */
- protected void initializeImageRegistry() {
- }
-
- /**
- * Retrieves the string resource bundle associated with this plugin.
- * @return the ResourceBundle or null if the bundle could not be loaded.
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null) {
- resourceBundle = ResourceBundle.getBundle("rseSamplesResources.properties");
- }
- } catch (MissingResourceException e) {
- SystemBasePlugin.logError("Missing rseSamplesResources.properties", e);
- }
- return resourceBundle;
- }
-
- /**
- * Retrieves the SystemMessageFile associated with this plugin.
- * @return the SystemMessageFile or null if the message file
- * could not be loaded.
- */
- public SystemMessageFile getMessageFile() {
- if (messageFile == null) {
- messageFile = loadMessageFile(this.getBundle(), "rseSamplesMessages.xml"); //$NON-NLS-1$
- }
- return messageFile;
- }
-
- /**
- * Retrieves the singleton workspace for this workbench.
- * This is a convenience method, fully equivalent to
- * ResourcesPlugin.getWorkspace().
- * @return the singleton workspace
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * Retrieve a string from the plugin's resource bundle.
- * @param key the key to the string
- * @return the retrieved string or the key if the string could not be
- * found or the bundle could not be loaded.
- */
- public static String getResourceString(String key) {
- String result = null;
- ResourceBundle bundle = RSESamplesPlugin.getDefault().getResourceBundle();
- if (bundle != null) {
- try {
- result = bundle.getString(key);
- } catch (MissingResourceException e) {
- SystemBasePlugin.logError("Missing key in bundle", e);
- }
- }
- if (result == null) {
- result = key;
- }
- return result;
- }
-
- /**
- * Retrieve the SystemMessageFile for this plugin.
- * @return the SystemMessageFile or null if the message file
- * could not be loaded.
- */
- public static SystemMessageFile getPluginMessageFile() {
- return RSESamplesPlugin.getDefault().getMessageFile();
- }
-
- /**
- * Retrieve a SystemMessage from the message file for this
- * plugin given its message id.
- * @param messageId the message id to retrieve
- * @return the retrieved SystemMessage or null if the message
- * was not found in the message file or the message file
- * could not be loaded.
- */
- public static SystemMessage getPluginMessage(String messageId) {
- SystemMessage message = null;
- SystemMessageFile messageFile = getPluginMessageFile();
- if (messageFile != null) {
- message = messageFile.getMessage(messageId);
- }
- return message;
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static RSESamplesPlugin getDefault() {
- return plugin;
- }
-
-}
-</code></pre>
-</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 0d8c9a4b3..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.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 e49235490..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents1.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">
-<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>
-<pre><samp>
-package samples.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class ShowJarContents implements IObjectActionDelegate {
-
- public ShowJarContents() {
- // TODO Auto-generated constructor stub
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
-
- }
-
- public void run(IAction action) {
- // TODO Auto-generated method stub
-
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // TODO Auto-generated method stub
-
- }
-
-}
-</samp></pre>
-</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 8e9e0fe7b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/ShowJarContents2.html
+++ /dev/null
@@ -1,117 +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, 2007. 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>
-<pre><samp>
-package samples.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-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.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * 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 implements IObjectActionDelegate {
- private List _selectedFiles;
-
- /**
- * Constructor for ShowJarContents.
- */
- public ShowJarContents() {
- _selectedFiles = new ArrayList();
- }
-
- protected Shell getShell() {
- return SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- protected IRemoteFile getFirstSelectedRemoteFile() {
- if (_selectedFiles.size() > 0) {
- return (IRemoteFile) _selectedFiles.get(0);
- }
- return null;
- }
-
- protected ISubSystem getSubSystem() {
- return getFirstSelectedRemoteFile().getParentRemoteFileSubSystem();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- 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 &lt; 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 &amp;&amp; cmdss.isConnected()) {
- // 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 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection) {
- _selectedFiles.clear();
- // store the selected jars to be used when running
- Iterator theSet = ((IStructuredSelection) selection).iterator();
- while (theSet.hasNext()) {
- Object obj = theSet.next();
- if (obj instanceof IRemoteFile) {
- _selectedFiles.add(obj);
- }
- }
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-}
-</samp></pre>
-</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 1348c1356..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/TeamResourceAdapter.html
+++ /dev/null
@@ -1,220 +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"></a>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"></a>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"></a>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"></a>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"></a>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
- }
-}
-</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 d96ab0117..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/index.html
+++ /dev/null
@@ -1,17 +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.png b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_1.png
deleted file mode 100755
index 8831ebad9..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_1.png
+++ /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.png b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page1.png
deleted file mode 100755
index 0e6f3fe93..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page1.png
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page2.png b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page2.png
deleted file mode 100755
index 2f7fa7537..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page2.png
+++ /dev/null
Binary files differ
diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.png b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.png
deleted file mode 100755
index 1ea6e43f2..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProj_wiz_page3.png
+++ /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 05a249fed..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/pdeProject.html
+++ /dev/null
@@ -1,105 +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, 2007. 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>
-<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>
-<li>In the dialog box select the <b>Plug-in Project</b> wizard. Click <b>Next &gt;</b>.
-<br><img src="pdeProj_1.png">
-</li>
-<li>In the first page of the wizard enter <b>&quot;RSESamples&quot;</b> for the project name (without the quotes). Click <b>Next &gt;</b>.
-<br><img src="pdeProj_wiz_page1.png">
-</li>
-<li>In the second page of the wizard enter your company for the <b>Plug-in Provider</b>, change the <b>Activator</b> to be "rsesamples.RSESamplesPlugin", and click <b>Next &gt;</b>.
-<br><img src="pdeProj_wiz_page2.png">
-</li>
-<li>In the third page of the wizard uncheck the "Create a plug-in using one of the templates" checkbox and click <b>Finish</b>.
-<br><img src="pdeProj_wiz_page3.png">
-</li>
-<li>Your new plugin project is created and visible in the Package Explorer of the Plug-in Development perspective. Your new plugin properties are also open in the plug-in editor.</li>
-<li>Go to the dependencies tab of the plug-in editor and add the following plugins to the list:
-<ul>
-<li>org.eclipse.core.resources</li>
-<li>org.eclipse.rse.ui</li>
-<li>org.eclipse.rse.services</li>
-<li>org.eclipse.rse.files.ui</li>
-<li>org.eclipse.rse.shells.ui</li>
-<li>org.eclipse.rse.subsystems.files.core</li>
-<li>org.eclipse.rse.subsystems.shells.core</li>
-</ul>
-</li>
-<li>Now go to the MANIFEST.MF tab of the plugin properties.
-This shows the source for the MANIFEST.MF file associated with this plugin.
-Change the Bundle-SymbolicName line adding a singleton:=true directive.
-<pre><code>
-Bundle-SymbolicName:RSESamples;singleton:=true
-</code></pre>
-This allows us to add extensions to the plugin at a later point.
-Save the plugin properties and close the editor.
-</li>
-<li>
-Right-click on the RSESamples project and create a plugin.xml file.
-Normally this would be created if you used a template to create your plugin.
-We will use this file to add extensions to RSE but for now it will just be a skeleton with the following contents:
-<pre><code>
-&lt;plugin&gt;
-&lt;/plugin&gt;
-</code></pre>
-Add the lines above to the empty plugin.xml file and save it.
-</li>
-<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.
-Change it as described below. Reference the source <a href="RSESamplesPlugin.html">here</a> for the details.
-<ul>
-<li>Extend SystemBasePlugin instead of AbstractUIPlugin</li>
-<li>Add the declaration for resourceBundle</li>
-<li>Add the declaration for messageFile</li>
-<li>Invoke the superclass constructor from this constructor</li>
-<li>Add the initializeImageRegistry() method</li>
-<li>Add the getMessageFile() method</li>
-<li>Add the getResourceBundle() method</li>
-<li>Add the static getWorkspace() method</li>
-<li>Add the static getResourceString(String) method</li>
-<li>Add the static getPluginMessageFile() method</li>
-<li>Add the static getPluginMessage(String) method</li>
-</ul>
-</li>
-<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>
-<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 substitution 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>
-<li>Your plugin is created and you are ready to go. Now you only need to add the code to implement the extension points.
-</li>
-</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 974f176ff..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html
+++ /dev/null
@@ -1,163 +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, 2007. 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
-<samp><A href="../plugin/popup.html">org.eclipse.ui.popupMenus</a></samp> extension point 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>
-
-<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.ui.popupMenus&quot;&gt;
- &lt;objectContribution
- objectClass=&quot;org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile&quot;
- nameFilter=&quot;*.jar&quot;
- id=&quot;actions.jar&quot;&gt;
- &lt;action
- label=&quot;Show contents&quot;
- tooltip=&quot;List contents of this file&quot;
- class=&quot;samples.ui.actions.ShowJarContents&quot;
- menubarPath=&quot;additions&quot;
- enablesFor=&quot;1&quot;
- id=&quot;actions.jar.show&quot;&gt;
- &lt;/action&gt;
- &lt;/objectContribution&gt;
- &lt;/extension&gt;
-</code></pre>
-Save and close the file.
-</li>
-<li>
-Right-click on the project and use the <b>New...</b> action to create a new package in this project named <b>samples.ui.actions</b>.
-</li>
-<li>
-Create the Java class: right-click on the new <B>samples.ui.actions</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>, add <b>IObjectActionDelegate</b>
-to the <b>Interfaces</b> that are implemented, and check the <b>constructors from superclass</b> checkbox as shown
-<A href="popup_newClass.gif">here</A>.
-Click <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.
-Use the "Source -&gt; Organize Imports" context menu item to add the appropriate import statements as you edit.
-<ol>
-<li type="i">Add an instance variable to hold a list of remote files and initialize it in the constructor.</li>
-<pre><code>
- private List _selectedFiles;
-
- /**
- * Constructor for ShowJarContents.
- */
- public ShowJarContents() {
- _selectedFiles = new ArrayList();
- }
-</code></pre>
-<li type="i">Add the following three utility methods</li>
-<pre><code>
- protected Shell getShell() {
- return SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- protected IRemoteFile getFirstSelectedRemoteFile() {
- if (_selectedFiles.size() > 0) {
- return (IRemoteFile)_selectedFiles.get(0);
- }
- return null;
- }
-
- protected ISubSystem getSubSystem() {
- return getFirstSelectedRemoteFile().getParentRemoteFileSubSystem();
- }
-</code></pre>
-<li type="i">Add the following methods to find the subsystem and run the command:</li>
-<pre><code>
- public void runCommand(String command) {
- IRemoteCmdSubSystem cmdss = getRemoteCmdSubSystem();
- if (cmdss != null &amp;&amp; cmdss.isConnected()) {
- // 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");
- }
- }
-
- /**
- * Gets the Command subsystem associated with the current host
- */
- public IRemoteCmdSubSystem getRemoteCmdSubSystem() {
- IHost myHost = getSubSystem().getHost();
- IRemoteCmdSubSystem[] subsys = RemoteCommandHelpers.getCmdSubSystems(myHost);
- for (int i = 0; i &lt; subsys.length; i++) {
- if (subsys[i].getSubSystemConfiguration().supportsCommands()) {
- return subsys[i];
- }
- }
- return null;
- }
-</code></pre>
-<li type="i">Finally, flesh out the methods that were created as stubs</li>
-<pre><code>
- public void run(IAction action) {
- 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 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection) {
- _selectedFiles.clear();
- // store the selected jars to be used when running
- Iterator theSet = ((IStructuredSelection) selection).iterator();
- while (theSet.hasNext()) {
- Object obj = theSet.next();
- if (obj instanceof IRemoteFile) {
- _selectedFiles.add(obj);
- }
- }
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-</code></pre>
-</ol>
-The final result after editing is shown <a href="ShowJarContents2.html">here</a>.
-</li>
-</ol>
-
-<p>
-Now, you can try your new action. Use <b>Run-&gt;Run As-&gt;Eclipse Application</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 dc00bb12c..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 a45195e00..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html
+++ /dev/null
@@ -1,86 +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
-<samp><A href="../plugin/propertypage.html">org.eclipse.ui.propertyPages</a></samp>
-extension point 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.ui.propertyPages&quot;&gt;
- &lt;page name=&quot;Folder Contents&quot;
- class=&quot;samples.ui.propertypages.FolderInfoPropertyPage&quot;
- id=&quot;samples.ui.PropertyPage1&quot;&gt;
- &lt;enabledWhen&gt;
- &lt;instanceof value=&quot;org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile&quot;/&gt;
- &lt;/enabledWhen&gt;
- &lt;filter name=&quot;isDirectory&quot; value=&quot;true&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>&lt;filter name="isDirectory&gt;</samp></b> markup
-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 6a3af939b..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/subsystem.html
+++ /dev/null
@@ -1,246 +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_core_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">AbstractConnectorServiceManager</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.core.subsystemConfigurations&quot;&gt;
- &lt;configuration
- id=&quot;samples.subsystems.factory&quot;
- systemTypeIds=&quot;org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.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. Also, the
-<samp>priority</samp> attribute has been left out for simplicity.
-</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 6b92972ce..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>Popup menu actions for remote resources should now be contributed via the standard Eclipse extension point, <tt>org.eclipse.ui.popupMenus</tt>. An example of this usage is provided in the <tt>org.eclipse.rse.examples.tutorial</tt> plug-in.
-<li>Property pages should for remote resources now be contributed via the standard Eclipse extension point, <tt>org.eclipse.ui.propertyPages</tt>. An example of this usage is provided in the <tt>org.eclipse.rse.examples.tutorial</tt> plug-in.
-<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 e10f90aa1..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/guide/usingAPIs.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">
-<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 more
-public feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of TM / RSE 2.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after TM / RSE 2.0
-in a not backward compatible way. We will make every sensible effort to
-keep at least Source API Compatibility intact, but in cases where this would
-lead to unnecessary code bloat we will go with API breakage. All such API changes will be voted on
-by committers on the <a href="https://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 TM 3.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 2b7a4b4dc..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, 2007. 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, 2007.
-</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 b5c2ff49e..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/options.txt
+++ /dev/null
@@ -1,141 +0,0 @@
--quiet
--encoding "iso-8859-1"
--charset "iso-8859-1"
--source 1.4
--sourcepath "../org.eclipse.rse.connectorservice.dstore/src
-;../org.eclipse.rse.core/src
-;../org.eclipse.rse.files.ui/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.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.processes.shell.linux/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.subsystems.shells.telnet/src
-;../org.eclipse.rse.subsystems.terminals.core/src
-;../org.eclipse.rse.subsystems.terminals.ssh/src
-;../org.eclipse.rse.ui/model
-;../org.eclipse.rse.ui/UI
-;../org.eclipse.rse.ui/subsystems"
--d reference/api
--bootclasspath @rt@
--classpath @cp@
-;../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 3.0"
--bottom "Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved."
--group "RSE Services Plug-in Packages" "org.eclipse.rse.services;org.eclipse.rse.services.*;org.eclipse.rse.internal.services.*"
--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.*;org.eclipse.rse.files.ui.*;org.eclipse.rse.shells.ui.*;org.eclipse.rse.processes.ui.*"
--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/
--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.core
-org.eclipse.rse.core.comm
-org.eclipse.rse.core.events
-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.dstore.universal.miners
-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.resources
-org.eclipse.rse.files.ui.widgets
-org.eclipse.rse.filters
-org.eclipse.rse.logging
-org.eclipse.rse.model
-org.eclipse.rse.persistence
-org.eclipse.rse.persistence.dom
-org.eclipse.rse.processes.ui
-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.dstore
-org.eclipse.rse.services.dstore.util
-org.eclipse.rse.services.files
-org.eclipse.rse.services.processes
-org.eclipse.rse.services.search
-org.eclipse.rse.services.shells
-org.eclipse.rse.services.terminals
-org.eclipse.rse.shells.ui
-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.ftp
-org.eclipse.rse.subsystems.files.local
-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.servicesubsystem
-org.eclipse.rse.subsystems.processes.local
-org.eclipse.rse.subsystems.processes.shell.linux
-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.local
-org.eclipse.rse.subsystems.shells.ssh
-org.eclipse.rse.subsystems.shells.telnet
-org.eclipse.rse.subsystems.terminals.core
-org.eclipse.rse.subsystems.terminals.core.elements
-org.eclipse.rse.subsystems.terminals.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.model
-org.eclipse.rse.ui.open
-org.eclipse.rse.ui.operations
-org.eclipse.rse.ui.propertypages
-org.eclipse.rse.ui.subsystems
-org.eclipse.rse.ui.validators
-org.eclipse.rse.ui.view
-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 415427fdc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE Developer Guide
-providerName=Eclipse.org - DSDP
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 99d609fe7..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/plugin.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.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
- -->
-
-<!-- ===================================================== -->
-<!-- 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 92adea2bc..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/provisional_api.html
+++ /dev/null
@@ -1,34 +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) 2006, 2007 Wind River Systems, Inc. and others. 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 more
-public feedback and help further improving the APIs. Therefore,</p>
-
-<p><b>As of TM / RSE 2.0, all API is considered provisional.</b></p>
-
-<p>This means, that we reserve the right to change any API after TM / RSE 2.0
-in a not backward compatible way. We will make every sensible effort to
-keep at least Source API Compatibility intact, but in cases where this would
-lead to unnecessary code bloat we will go with API breakage. All such API changes will be voted on
-by committers on the <a href="https://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 TM 3.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 0b5ea3c34..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html
+++ /dev/null
@@ -1,32 +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, 2007. 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_keystoreProviders.html">org.eclipse.rse.core.keystoreProviders</a></li>
- <li><a href="org_eclipse_rse_core_modelInitializers.html">org.eclipse.rse.core.modelInitializers</a></li>
- <li><a href="org_eclipse_rse_core_persistenceProviders.html">org.eclipse.rse.core.persistenceProviders</a></li>
- <li><a href="org_eclipse_rse_core_subsystemConfigurations.html">org.eclipse.rse.core.subsystemConfigurations</a></li>
- <li><a href="org_eclipse_rse_core_systemTypes.html">org.eclipse.rse.core.systemTypes</a></li>
- <li><a href="org_eclipse_rse_core_systemTypeProviders.html">org.eclipse.rse.core.systemTypeProviders</a></li>
- <li><a href="org_eclipse_rse_services_archivehandlers.html">org.eclipse.rse.services.archivehandlers</a></li>
- <li><a href="org_eclipse_rse_services_codePageConverters.html">org.eclipse.rse.services.codePageConverters</a></li>
- <li><a href="org_eclipse_rse_subsystems_files_core_remoteFileTypes.html">org.eclipse.rse.subsystems.files.core.remoteFileTypes</a></li>
- <li><a href="org_eclipse_rse_subsystems_files_ftp_ftpListingParsers.html">org.eclipse.rse.subsystems.files.ftp.ftpListingParsers</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_mountPathMappers.html">org.eclipse.rse.ui.mountPathMappers</a></li>
- <li><a href="org_eclipse_rse_ui_newConnectionWizards.html">org.eclipse.rse.ui.newConnectionWizards</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 94aef22fb..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/reference/misc/runtime-options.html
+++ /dev/null
@@ -1,119 +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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
-<!-- David Dykstal (IBM) - [208953] document how to disable system types -->
-<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>
-Some RSE runtime preferences are set using system properties.
-With RSE release 2.0, all new runtime preferences are set using the plugin_customization.ini method.
-</p>
-
-<h2>System properties</h2>
-<p>
-The following system properties are used by RSE.
-Properties are set using
-<code>-DpropertyName=propertyValue</code>
-as a VM argument to the Java VM.
-</p>
-<dl>
-<dt><a name="showNewConnectionPrompt" id="showNewConnectionPrompt"></a>rse.showNewConnectionPrompt</dt>
-<dd>
-whether to show the New Connection prompt in RSE views by default.
-The value may be <code>true</code> or <code>false</code>.
-The default is <code>true</code>.
-</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 workspace.
-The value may be <code>true</code> or <code>false</code>.
-The default is <code>true</code>.
-</dd>
-</dl>
-
-<h2>Plugin customizations</h2>
-<p>
-See <a href="../../../org.eclipse.platform.doc.isv/guide/product_configproduct.htm">Customizing a product</a>
-for a description of plugin preference customization.
-</p>
-
-<h3>Core Preferences</h3>
-<dl>
-<dt>org.eclipse.rse.core/DEFAULT_PERSISTENCE_PROVIDER</dt>
-<dd>
-The id of the default persistence provider.
-This provider is used when new profiles are created and an explicit persistence provider is not set for them.
-The default value is <code>org.eclipse.rse.persistence.MetadataPropertyFileProvider</code>
-</dd>
-<dl>
-<dt>org.eclipse.rse.core/{systemTypeID}.systemType.enabled</dt>
-<dd>
-<p>
-This preference allows you to disable installed system types on a product basis.
-Values may be true or false.
-</p>
-<dl>
-<dt>true</dt>
-<dd>The system type is enabled. Connections of this system type may be created.</dd>
-<dt>false</dt>
-<dd>The system type is disabled. Connections of this system type may not be created. The system type will be unavailable in the user interface.</dd>
-</dl>
-<p>The default value is true for each installed system type.</p>
-<p>The following example shows how to disable the "telnet" system type.</p>
-<xmp>
-org.eclipse.rse.core/org.eclipse.rse.systemtype.telnet.systemType.enabled = false
-</xmp>
-</dd>
-</dl>
-
-<h3>User Interface Preferences</h3>
-<dl>
-<dt>org.eclipse.rse.ui/MNEMONICS_POLICY</dt>
-<dd>
-<p>
-The value is a bit field composed of or'ing the following bit flag values together to achieve
-the desired setting.
-</p>
-<dl>
-<dt>bit mask - value 1</dt>
-<dd>
-If on, specifies whether or not to insert mnemonic indications into
-the current text of a label.
-</dd>
-<dt>bit mask - value 2</dt>
-<dd>
-If on, specifies to generate mnemonics of the form (X) at the end of labels for
-those languages matching the locale pattern.
-If off, then only characters from the label will be used as mnemonics.
-</dd>
-</dl>
-<p>
-The default value is 3.
-</p>
-</dd>
-<dt>org.eclipse.rse.ui/APPEND_MNEMONICS_PATTERN</dt>
-<dd>
-The value is a regular expression that is matched against the current locale.
-Some products will desire to append mnemonics only for certain locales.
-The default pattern matches Chinese, Japanese, and Korean.
-</dd>
-<dt>org.eclipse.rse.ui/SHOW_EMPTY_LISTS</dt>
-<dd>
-Allows a product to customize whether or not to show empty list messages in the remote system view
-when expanding a filter that results in an empty list of resources.
-The default value is <code>true</code>.
-</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 fd89fdd21..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</h1>
-</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 447c63065..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/toc.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?> <!--
- 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
- -->
-
-<!-- ============================================================================= -->
-<!-- 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 f619f09f5..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Guide.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<!-- ============================================================================= -->
-<!-- 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>
- <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 8b1b0716f..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Questions.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?> <!--
- 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
- -->
-
-<!-- ============================================================================= -->
-<!-- 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 7f850c3d1..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?> <!--
- Copyright (c) 2005, 2008 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
- -->
-
-<!-- ============================================================================= -->
-<!-- Define topics for the references -->
-<!-- ============================================================================= -->
-<toc label="Reference">
-
- <topic label="Extension Points Reference" href="reference/extension-points/index.html">
- <topic label="org.eclipse.rse.core.keystoreProviders" href="reference/extension-points/org_eclipse_rse_core_keystoreProviders.html" />
- <topic label="org.eclipse.rse.core.modelInitializers" href="reference/extension-points/org_eclipse_rse_core_modelInitializers.html" />
- <topic label="org.eclipse.rse.core.persistenceProviders" href="reference/extension-points/org_eclipse_rse_core_persistenceProviders.html" />
- <topic label="org.eclipse.rse.core.subsystemConfigurations" href="reference/extension-points/org_eclipse_rse_core_subsystemConfigurations.html" />
- <topic label="org.eclipse.rse.core.systemTypeProviders" href="reference/extension-points/org_eclipse_rse_core_systemTypeProviders.html" />
- <topic label="org.eclipse.rse.core.systemTypes" href="reference/extension-points/org_eclipse_rse_core_systemTypes.html" />
- <topic label="org.eclipse.rse.services.archivehandlers" href="reference/extension-points/org_eclipse_rse_services_archivehandlers.html" />
- <topic label="org.eclipse.rse.services.codePageConverters" href="reference/extension-points/org_eclipse_rse_services_codePageConverters.html" />
- <topic label="org.eclipse.rse.subsystems.files.core.remoteFileTypes" href="reference/extension-points/org_eclipse_rse_subsystems_files_core_remoteFileTypes.html" />
- <topic label="org.eclipse.rse.subsystems.files.ftp.ftpListingParsers" href="reference/extension-points/org_eclipse_rse_subsystems_files_ftp_ftpListingParsers.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.mountPathMappers" href="reference/extension-points/org_eclipse_rse_ui_mountPathMappers.html" />
- <topic label="org.eclipse.rse.ui.newConnectionWizards" href="reference/extension-points/org_eclipse_rse_ui_newConnectionWizards.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.events" href="reference/api/org/eclipse/rse/core/events/package-summary.html" />
- <topic label="org.eclipse.rse.core.servicesubsystem" href="reference/api/org/eclipse/rse/core/servicesubsystem/package-summary.html" />
- <topic label="org.eclipse.rse.core.subsystems" href="reference/api/org/eclipse/rse/core/subsystems/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>
- <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.core.filters" href="reference/api/org/eclipse/rse/core/filters/package-summary.html"/>
- <topic label="org.eclipse.rse.core.references" href="reference/api/org/eclipse/rse/core/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>
- <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.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 label="org.eclipse.rse.services.terminals" href="reference/api/org/eclipse/rse/services/terminals/package-summary.html"/>
- </topic>
- <topic label="Services Implementations" href="provisional_api.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.util" href="reference/api/org/eclipse/rse/services/dstore/util/package-summary.html"/>
- </topic>
- <topic label="DStore Miners" href="provisional_api.html">
- <topic label="org.eclipse.rse.dstore.universal.miners" href="reference/api/org/eclipse/rse/dstore/universal/miners/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>
- <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" href="reference/api/org/eclipse/rse/subsystems/files/dstore/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" 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 label="org.eclipse.rse.subsystems.processes.shell.linux" href="reference/api/org/eclipse/rse/subsystems/processes/shell/linux/package-summary.html"/>
- </topic>
- <topic label="Shell Subsystem" href="provisional_api.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" href="reference/api/org/eclipse/rse/subsystems/shells/dstore/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 label="org.eclipse.rse.subsystems.shells.telnet" href="reference/api/org/eclipse/rse/subsystems/shells/telnet/package-summary.html"/>
- </topic>
- <topic label="Terminal Subsystem" href="provisional_api.html">
- <topic label="org.eclipse.rse.subsystems.terminals.core" href="reference/api/org/eclipse/rse/subsystems/terminals/core/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.terminals.core.elements" href="reference/api/org/eclipse/rse/subsystems/terminals/core/elements/package-summary.html"/>
- <topic label="org.eclipse.rse.subsystems.terminals.ssh" href="reference/api/org/eclipse/rse/subsystems/terminals/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.model" href="reference/api/org/eclipse/rse/ui/model/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.subsystems" href="reference/api/org/eclipse/rse/ui/subsystems/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" href="reference/api/org/eclipse/rse/ui/view/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.resources" href="reference/api/org/eclipse/rse/files/ui/resources/package-summary.html"/>
- <topic label="org.eclipse.rse.files.ui.widgets" href="reference/api/org/eclipse/rse/files/ui/widgets/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>
- <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.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 87ed6b6a1..000000000
--- a/rse/doc/org.eclipse.rse.doc.isv/topics_Samples.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?> <!--
- 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
- -->
-
-<!-- ============================================================================= -->
-<!-- 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 9ac392ce2..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.doc.user; singleton:=true
-Bundle-Version: 3.1.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
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 d4cc693f9..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 5, 2007</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 b770336d3..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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) - 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/
-
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 a252a9d67..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cbegin.html
+++ /dev/null
@@ -1,72 +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, 2008. 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>
-
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body id="cbegin-body">
-<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. 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 7d7f01898..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cfilters.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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
-<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Filters, filter pools, and filter pool references</title>
-</head>
-
-<body id="cfilters-body">
-<a name="cfilters"></a>
-<h1 class="topictitle1">Filters, filter pools, and filter pool references</h1>
-<div>
-<h2>Filters and Filtering Resources</h2>
-<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.png" alt="" /><br />
-</p>
-<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 />
-</p>
-<p>
-The Remote System Explorer perspective is designed to allow you to
-manipulate the resources directly on the remote system. The
-actions that are available depend on the type of system you are
-connecting to and the way the resource is recognized. For
-example, your selections can define
-a filter string to find all files that match *.c in a particular
-directory.
-</p>
-<p>
-Filters, then, reveal resources on the remote system. The types of resources
-they reveal depend on the subsystem you are viewing. A file subsystem, for example,
-reveals files and directories on the remote system. A process subsystem will reveal
-running processes.
-</p>
-<p>
-File subsystems are quite rich in their function. For example, you can copy files
-and folders between remote systems regardless of the type of connection you have
-to those remote systems. Just a quick note: if a directory is revealed by a filter, copying that
-directory to a remote system will result in all the files in that folder being
-copied, not just those that are revealed by the filter. This is consistent with
-the way resources are managed elsewhere in Eclipse.
-</p>
-<h2>Filter Pools</h2>
-<p>
-<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><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>
-Note: at time this filter pool names cannot contain three consecutive underscore characters.
-</p>
-<h2>Sharing Filters</h2>
-<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>
-<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.
-</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</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="">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 dc12ccd8f..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cprofile.html
+++ /dev/null
@@ -1,109 +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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
- <!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
- <link rel="stylesheet" type="text/css" href="../book.css" />
- <title> Remote System Explorer Profiles </title>
-</head>
-<body id="cprofile-body">
-<a name="cprofile">
-<!-- -->
-</a> <h1 class="topictitle1"> Remote System Explorer Profiles </h1>
-<div>
- <p>
- 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 two profiles when starting up for the first time: a <em>private profile</em>, usually named after the host name of the machine that creates the workspace, and a profile called <i> Team</i>. The intent is to be able to share the Team profile in the future with other members of your team. You can also create your own profiles.
- </p>
- <p>
- Note: due to an internal restriction a profile name cannot contain three consecutive underscore characters at this time.
- </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>
- Other artifacts associated with a profile
- </li>
- </ul>
- </div>
- <p>
- Profiles can be active or inactive. 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 private profile cannot be deleted or made inactive.
- </p>
- <div class="p">
-<!-- TODO rework
-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.
-<!-- TODO rework
-<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. See topics in the help contents and
-links
-below about team support for more information on profiles and shared
-data.</div>
--->
- </div>
-<!-- TODO rework
-<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 />
-<!-- TODO rework
-<a href="cteam.html" title="">Team support</a><br/>
--->
- </p>
- <p>
- <b class="reltaskshd"> Related tasks</b>
- <br />
-<!-- TODO rework
-<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 2a7b31c67..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, 2007. 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-body">
-<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. 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. 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. 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 33848229d..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, 2007. 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-body">
-<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 017308bc8..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, 2007. 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-body">
-<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. 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"><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. You can also, of course, quit and restart the
-workbench. 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 7c69c9de8..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/concepts/cuniversal.html
+++ /dev/null
@@ -1,64 +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, 2008. 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>
-
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body>
-<a name="cuniversal"><!-- --></a>
-<h1 class="topictitle1">Universal Systems</h1>
-<div>
-<p>At a minimum the Remote System Explorer provides access to
-Linux,
-UNIX, and Windows systems. These are called "universal" systems
-since their file and command systems are quite similar. 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. 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 server</a><br clear="all" />
-<a href="../tasks/tbeginwindows.html">Connecting to a remote Windows server</a><br clear="all" />
-<a href="../tasks/tbeginsecond.html">Creating a second connection to a remote 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 variable support for connections</a>
-</p>
-</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 752abc751..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, 2007. 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-body">
-<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 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 456e69e18..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g1installing.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, 2008 Wind River Systems, Inc. and others. 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>
-
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body id="g1installing-body">
-<a name="g1installing"><!-- --></a>
-<h1 class="topictitle1">Installing the Remote System Explorer</h1>
-<div>
-<p>
-The simplest way to get RSE is via the Update Manager: From your running instance
-of Eclipse 3.3, choose <i>Help &gt; Software Updates &gt; Find and Install...</i>.
-Choose "Search for New Features to Install", and select the "add a new Remote Site named
-"RSE" and pointing to <a href="http://download.eclipse.org/dsdp/tm/updates/2.0/">
-http://download.eclipse.org/dsdp/tm/updates/2.0/</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.3 or later, or link it as product extension.</p>
-<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">Connecting to a remote Linux or UNIX server</a><br clear="all" />
-<a href="../tasks/tbeginwindows.html">Connecting to a remote Windows server</a><br clear="all" />
-<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 731b67af2..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g2firststeps.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) 2006, 2008 Wind River Systems, Inc. and others. 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>
-
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body id="g2firststeps-body">
-<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">Connecting to a remote Linux or UNIX server</a><br clear="all" />
-<a href="../tasks/tbeginwindows.html">Connecting to a remote Windows server</a><br clear="all" />
-<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 />
-</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 746318c7a..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/g_start.html
+++ /dev/null
@@ -1,58 +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, 2008 Wind River Systems, Inc. and others. 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>
-
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body id="gstart-body">
-<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:</p>
-<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>
-</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 d81d3eb89..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gusing.html
+++ /dev/null
@@ -1,88 +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, 2007 Wind River Systems, Inc. and others. 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-body">
-<a name="gusing"><!-- --></a>
-<h1 class="topictitle1">Using Remote Connections</h1>
-<div>
-<p>
-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..
-</p>
-<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.</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>
- </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>
- <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 25c3fc1ec..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/gettingstarted/gxtending.html
+++ /dev/null
@@ -1,107 +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, 2007 Wind River Systems, Inc. and others. 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>
-
-
-<script language="JavaScript" type="text/javascript">
-function handleLink(url){
- if (isBadLink(url)){
- externalizeLink(url);
- }
- return true;
-}
-
-function externalizeLink(url){
- var base = "http://dsdp.eclipse.org/help/latest/index.jsp?topic=//org.eclipse.rse.doc.isv/guide/";
- var oldsegs = url.href.split('/');
- var name = oldsegs[oldsegs.length-1];
-
- var newref = base + name;
- url.href = newref;
-}
-
-function isBadLink(url){
- var status = getStatus(url);
- if (status =='404'){ // not found on internet?
- return true;
- }
- else if (status == '-1'){ //not found locally
- return true;
- }
- else { // link is okay
- return false;
- }
-}
-
-function getStatus(url){
- var request = null;
- try {
- request = new XMLHttpRequest();
- }
- catch(e){
- }
-
- if(!request)
- return -1;
- try {
- request.open("GET",url.href,false);
- request.send(null);
- }
- catch(e){
- return -1;
- }
- return request.status;
-}
-</script>
-
-
-</head>
-<body id="gxtending-body">
-<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" onclick="return handleLink(this);">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" onclick="return handleLink(this);">tutorials</a>,
-<a href="../../org.eclipse.rse.doc.isv/guide/rse_int_architecture.html" onclick="return handleLink(this);">overview documentation 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
-<!-- TODO rework
-<a href="../concepts/cteam.html">shared in a team</a>.
--->
-</p>
-</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/>
-<!-- TODO rework
-<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.png b/rse/doc/org.eclipse.rse.doc.user/images/ModelRSE.png
deleted file mode 100755
index d079e6e26..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/images/ModelRSE.png
+++ /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 2b7a4b4dc..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, 2007. 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, 2007.
-</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 994bed1d4..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE User Guide
-providerName = Eclipse.org - DSDP
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 d42da1ab7..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/ref/rrsepref.html
+++ /dev/null
@@ -1,82 +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, 2007. 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-body">
-<a name="rrsepref"><!-- --></a>
-<h1 class="topictitle1">Accessing Remote System Explorer preferences</h1>
-<div>
-<div class="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 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">Your local user ID</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">Off</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">Use cached information to restore the Remote Systems view</td>
- <td valign="top">Select this option to use locally cached information instead
- of connecting immediately if you are automatically opening the
- previously expanded connections when starting RSE.</td>
- <td valign="top">On</td>
- </tr>
-<!-- TODO UDA
- <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 b5f80b4a5..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, 2007. 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-body"><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 6e6ad1425..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tarchive.html
+++ /dev/null
@@ -1,99 +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, 2007. 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:</p>
-<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__search">Search for content within an archive</a></li>
-</ul>
-</div>
-<div class="p">
-<p>Pick from the following:</p>
-<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__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 check the <b>Search archive files</b> checkbox to search for
-contents inside archives in that directory.</td>
-</tr>
-</tbody>
-</table>
-</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 48201a630..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, 2007. 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 f4b8ee3c1..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, 2007. 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 and filters)
-for that profile. To delete a profile:
-</div>
-<ol>
- <li>Make the Team view active by clicking on its tab.</li>
- <li>Right-click on the profile you wish to delete to bring up its context menu.</li>
- <li>Select the <b>Delete...</b> operation.</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 250a72a4b..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, 2007. 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/tbegindstore.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindstore.html
deleted file mode 100644
index 984dcefa1..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbegindstore.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!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 2008."/>
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Setting up a dstore server</title>
-</head>
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body>
-<h1>Setting up a dstore server</h1>
-<p>
-There are two separate platform families on which you can run a dstore server: the Linux/UNIX family and the Windows family. Each is set up a bit differently. Follow the link to the platform of your choice.<br />
-</p>
-<p>
-<a href="tbeginlinux.html">Connecting to a remote Linux or UNIX server</a><br />
-<a href="tbeginwindows.html">Connecting to a remote Windows server</a>
-</p>
-</body>
-
-</html> \ No newline at end of file
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 2a41baed2..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, 2007. 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 3b680ce9e..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginlinux.html
+++ /dev/null
@@ -1,186 +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, 2007. 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-2.0-linux.tar contains the release 2.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-2.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 4075 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 4075 10000-10010</pre>
-
-<p><b>To start the server manually</b></p>
-<div class="p">
-<div class="note">
-Note: In the following discussion we assume that the RSE server has been installed on Linux.
-If you are running on a UNIX system the script name is "server.sh" rather than "server.pl".
-</div>
-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:</p>
-<pre>
-ssh -l moberhuber build.eclipse.org -L27127:build.eclipse.org:27127 \
- "sh -c 'cd ~/rseserver/latest; perl ./server.pl 27127'"
-</pre>
-<p>
-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.
-</p>
-</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 9098a0955..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginpass.html
+++ /dev/null
@@ -1,70 +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, 2007. 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 for remote systems</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>Where passwords are stored</h2>
-<p>
- RSE uses the Eclipse-supplied keyring file to store passwords. This is the same keyring used by other eclipse services such as the Eclipse Team support. By default, this is stored in the configuration area under org.eclipse.core.runtime/.keyring in an encrypted format. The encryption does not require a password itself so anyone using Eclipse is capable of decrypting this file.
-</p>
-<p>
- Users can choose to store the keyring in a different file, or provide a password for doing real encryption by using runtime options when starting Eclipse as follows: <pre><code>
-eclipse -keyring C:/mykeyring.txt -password mypasswd
- </code></pre> Even so, encryption is not particularly strong. So if your workstation is not protected you should remove your passwords and not store them in the future.
-</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 07ddaf1db..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecond.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, 2008. 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>
-
-<!--
-This program and the accompanying materials are made available under the terms
-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) - [203337] RSE user guide - TOC differs from Chapter for setting up a dstore server
--->
-
-<body><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="tbeginlinux.html" title="">Connecting to a remote Linux or UNIX server</a><br />
-<a href="tbeginwindows.html" title="">Connecting to a remote Windows 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 8e8aafc0c..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tbeginsecprofile.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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
-<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
-<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:</p>
-<ol>
-<li>Make the Team view active by clicking on its tab</li>
-<li>From the Team view's menu bar, click the "Create a new profile" button</li>
-<li>Complete the "New Profile" wizard.</li>
-</ol>
-<p>
-Note: due to an internal restriction a profile name cannot contain three consecutive underscore characters at this time.
-</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 4dc877468..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, 2007. 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>
-<a name="tbeginwindows"></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-2.0-windows.zip contains the release 2.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 4075 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 4075 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 6c9f135f8..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, 2007. 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 d6cc57d04..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, 2007. 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 f425ed5f0..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, 2007. 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 bbb5adc10..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, 2007. 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>Properties</b>.</span></li>
-<li><span>In the properties window, select the <b>Filter Strings</b> category and 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 be1027551..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, 2007. 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.
-Note: Filters are named so that the Remote System Explorer can save them for future use.</li>
-<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 2954b62a2..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagepools.html
+++ /dev/null
@@ -1,81 +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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
-<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
-<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>
-<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>
-<p>To illustrate the use of filter pools,</p>
-<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>
-<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.
-</p>
-<p>
-Note: at time this filter pool names cannot contain three consecutive underscore characters.
-</p>
-</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 d734c3025..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, 2007. 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 149405f1f..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tmanagesearch.html
+++ /dev/null
@@ -1,95 +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, 2007. 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://en.wikipedia.org/wiki/Regular_expression" target="_blank">http://en.wikipedia.org/wiki/Regular_expression.</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 c52180c57..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, 2007. 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 fb2363c27..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, 2007. 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 0008b5521..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, 2007. 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 70751e495..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, 2007. 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
-"cd .."
-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 6610d4df5..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, 2007. 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 e7e2c1f7d..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, 2007. 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 9160287f7..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, 2007. 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. 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. This
- will bring the Team view to the front of the Remote System Explorer.
- You can also use the <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 b1aa0fb3c..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, 2007. 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.
-This will bring the Team view to the front of the Remote System
-Explorer. You can also use the
-<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/tusingefs.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tusingefs.html
deleted file mode 100644
index 16dad2f55..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tusingefs.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!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 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
-<!-- David Dykstal (IBM) - [236082] Add documentation on using RSE and EFS -->
-<link rel="stylesheet" type="text/css" href="../book.css"/>
-<title>Using RSE and EFS</title>
-</head>
-
-<body>
-
-<h1>Using RSE and EFS</h1>
-<p>
-The Eclipse File System (EFS) is an interface supported by Eclipse that allows Eclipse to use non-local file systems.
-Many Eclipse components are <strong>EFS-aware</strong>, that is, they can use resources supplied by EFS as if they were located on a local file system.
-An <strong>EFS Provider</strong> is an implementer of this EFS interface and provides a file system support for the resources it exposes.
-RSE is an EFS provider that allows you to access remote resources from any EFS-aware Eclipse component such as the Java Development Tools.
-</p><p>
-EFS can take any remote file system available through RSE and its various protocols (like the ssh, ftp and dstore connections) and make it visible as resources in the workspace. By sitting at the heart of the Eclipse resource system, the full power of Eclipse - including source parsers, outline views, content assist and the like - comes to remote files as well.
-</p><p>
-Since RSE's <em>raison d'etre</em> is remote access, it solves the problem of logging in to remote systems and keeping credentials in a usable UI.
-</p><p>
-There are issues, however, with treating remote resources as local ones.
-</p><p>
-EFS makes the Eclipse workspace more flexible, but components and plugins need to be aware that the resources they work on can now be remote.
-Work is going on throughout Eclipse to improve their EFS integration and hopefully their performance.
-For now, however, working with remote resources through RSE and EFS is best done on a fast network with low latency.
-</p><p>
-Pure RSE/EFS projects (i.e. where the .project file is on the remote system) are currently not supported due to low-level interactions between EFS, the Eclipse platform, and the RSE caching mechanism.
-Purely remote projects will not open automatically on Eclipse startup.
-However, one can link lower-level folders of a project to an EFS provider, allowing a project to contain a mix of remote and local resources.
-Note that team support (such as that provided by CVS) will not synchronize resources linked through an EFS provider at this time.
-</p><p>
-Using this support you could, for example, set up a Java project from a machine at home and link to files on an account at work. If you makes changes at work, you can come home, refresh the project and everything will be updated and compiled.
-</p><p>
-The advantages of using linked resources and an RSE-supplied EFS are that the tools that the workbench provides are available directly on the remote source. In addition, since you can edit directly on the remote system there will be no immediate synchronization/merge issues. However, this can lead to problems with update conflicts if the directories on the remote system are shared with others and are quite active. The disadvantages are what you would expect: that you can run into quite slow refreshes of the workspace. Since EFS maps the remote directory tree anytime Eclipse wants to do a refresh it may take several hours. Tools that are not EFS-aware may force these refreshes to happen at odd times which can lead to unpredictable performance.
-</p>
-
-</body>
-</html>
diff --git a/rse/doc/org.eclipse.rse.doc.user/tasks/tworkssl.html b/rse/doc/org.eclipse.rse.doc.user/tasks/tworkssl.html
deleted file mode 100644
index bb6661380..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/tworkssl.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!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=utf-8" />
-<meta name="copyright" content="Copyright (c) IBM Corporation 2007. 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 SSL </title>
-</head>
-<body>
-<h1>Working with SSL</h1>
-<h2>SSL Overview</h2>
-<p>
-Secure-Sockets Layer (SSL) is a communications facility that encrypts all communications
-between a client and a target system. The DStore communications protocol in RSE supports SSL.
-</p>
-<p>
-SSL achieves its security by using <em>certificates</em> to authenticate each side of a
-connection made between two parties. The certificates allow for the certain identification of those
-parties and for the negotiation of an encrypted channel for communication. The certificates
-themselves are files whose alteration can be easily detected and whose origin is verified by a
-trusted <em>certificate authority</em>.
-</p>
-<p>
-Web browsers use SSL and request SSL certificates from their servers to communicate with
-on-line stores, banks, and other service providers. These are the same kind of certificates, but are
-used for a different purpose. A web browser will typically be verifying the identity of the server
-and will be contacting a certificate authority to do so. RSE users, on the other hand, will
-typically trust the target system to provide certificates to client systems so that the
-communications can be encrypted.
-</p>
-<h2>Using SSL</h2>
-<p>
-Certificates are usually manufactured by a service provider (such as a target system) in concert
-with a certificate authority. The authority can be any entity that the target system trusts including
-itself. Certificates are delivered to a client system by the target system when the two are negotiating
-an SSL connection. When starting a connection to a server, DStore first attempts an SSL connection
-and then falls back to non-SSL if the SSL one fails. As a client, you don't need to be concerned
-with the handling of certificates at all, but you can use the RSE SSL preferences
-page to manage all your certificates that you have received from the target systems you have
-connected to in the past.
-</p>
-<p>
-You reach the RSE preferences page by opening the <code>Preferences</code> for the workbench,
-expanding the <code>Remote Systems</code> category and selecting the <code>SSL</code> subcategory.
-There you will see operations that allow you to add certificates, rename them to make them easier to
-manage, remove them once they have expired, and view their contents. You would typically see one
-certificate for each target system that you have connected to using SSL.
-</p>
-<h2>Setting Up The Server</h2>
-<p>
-You set up the DStore server to use SSL by editing the <code>ssl.properties</code> file in the
-server location. This server names the keystore and its password used for holding certificates
-generated using the <code>keytool</code> utility from the Java SDK.
-These certificates are then given to the client during SSL
-startup so that communications can be encrypted.
-</p>
-<p>
-The keystore file referenced by <code>ssl.properties</code> can contain several entries but only one is
-used when a client connects. The entries in the keystore may themselves have passwords, but dstore assumes
-that these are all the same as the keystore password. It makes sense, therefore, to maintain only
-one keystore for the dstore server, that it have only one entry, and that it exist in the same
-directory as the dstore server. That entry can be a self-signed certificate.
-</p>
-<p>
-The following command will create a keystore and add a single self-signed certificate to it.
-</p>
-<pre><code>
-keytool -genkey -keystore keystore_file -alias entry_name -storepass d98kMn50sV
- -dname "CN=dstore server, OU=division, O=company, L=city, ST=state, C=country"
-</code></pre>
-<p>
-The command would be entered on a single line. It appears here on multiple lines for readability.
-</p>
-<p>
-After entering this command you will be prompted to supply a password for the entry itself.
-You should press enter to take the default which is the keystore password.
-</p>
-<p>
-One would then edit the ssl.properties file to use this as follows:
-</p>
-<pre><code>
-daemon_keystore_file=keystore_file
-daemon_keystore_password=d98kMn50sV
-</code></pre>
-</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 c3d49d81d..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, 2007. 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 d1d2ca7fb..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/tasks/twrkcmdshl.html
+++ /dev/null
@@ -1,50 +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, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
-<!-- David Dykstal (IBM) - [193725] fix up description of work with command to match current UI -->
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Working with command shells</title>
-</head>
-
-<body id="twrkcmdshl">
-<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.
-</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 07d4fa25d..000000000
--- a/rse/doc/org.eclipse.rse.doc.user/toc.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?> <!--
- Copyright (c) 2006, 2009 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:
- IBM Corporation - initial API and implementation
- Martin Oberhuber (Wind River) - [158529] contribute remotecdt docs
- -->
-<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/tbegindstore.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>
- <!-- TODO rework needed
- <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"/>
- <topic label="Working with SSL" href="tasks/tworkssl.html"/>
- <topic href="tasks/tusingefs.html" label="Using RSE and EFS">
- </topic>
- <anchor id="rse_user_extensions" />
-<topic label="Legal" href="notices.html"/>
-</toc>
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 21f574849..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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.daytime.source=org.eclipse.rse.examples.daytime
-generate.plugin@org.eclipse.rse.examples.tutorial.source=org.eclipse.rse.examples.tutorial
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 9321f4082..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 5afaf5afb..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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 6c3ad2b55..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/feature.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.examples"
- label="%featureName"
- version="3.1.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.examples.tutorial"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.files.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.shells.ui" version="3.0.0" match="compatible"/>
- </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.daytime.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.examples.tutorial.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 7f6d72582..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 and others 2006, 2009. 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 7ef3fa39c..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/dsdp32.png b/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/dsdp32.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 4beb8a18f..000000000
--- a/rse/examples/org.eclipse.rse.examples-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Remote System Explorer Examples Source
-providerName=Eclipse.org - DSDP \ 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 b7464f3ca..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.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/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 60ca194b2..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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.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 e8f4180dc..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/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.examples.daytime;singleton:=true
-Bundle-Version: 2.2.0.qualifier
-Bundle-Activator: org.eclipse.rse.examples.daytime.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-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 d4cc693f9..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 5, 2007</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 19a78c956..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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 = about.html,\
- readme.txt
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 995172595..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-DaytimeSystemLabel=Daytime
-DaytimeSystemDescription=Daytime System Type
-
-DaytimeSubsystemName=Daytime
-DaytimeDescription=This configuration allows you get the current time at a remote system via TCP port 13.
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 3c58131e3..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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
-Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?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"
- label="%DaytimeSystemLabel"
- 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.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.examples.daytime.systemtype"
- 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.core.subsystemConfigurations">
- <configuration
- category="daytime"
- class="org.eclipse.rse.examples.daytime.subsystems.DaytimeSubSystemConfiguration"
- description="%DaytimeDescription"
- icon="icons/full/obj16/daytime_obj.gif"
- iconlive="icons/full/obj16/daytimelive_obj.gif"
- id="daytime.tcp"
- name="%DaytimeSubsystemName"
- priority="40000"
- serviceType="_daytime._tcp"
- systemTypeIds="org.eclipse.rse.examples.daytime.systemtype;org.eclipse.rse.systemtype.unix"
- vendor="%providerName">
- </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 c71bd7688..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 template for daytime example.
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- *******************************************************************************/
-
-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.examples.daytime.model.DaytimeAdapterFactory;
-import org.eclipse.rse.examples.daytime.model.DaytimeResource;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends SystemBasePlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /** @since 2.1 */
- public static String PLUGIN_ID = "org.eclipse.rse.examples.daytime"; //$NON-NLS-1$
-
- /**
- * 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 708c7ee09..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-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 dcf15eb27..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/DaytimeResources.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-################################################################################
-
-# 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 2c5eb036f..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorService.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- ********************************************************************************/
-
-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.BasicConnectorService;
-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 BasicConnectorService {
-
- 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;
- }
-
- protected void internalDisconnect(IProgressMonitor monitor) throws Exception {
- fIsConnected = 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 c131a343b..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/connectorservice/DaytimeConnectorServiceManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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 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 getInstance() {
- if (fInstance == null) {
- fInstance = new DaytimeConnectorServiceManager();
- }
- return fInstance;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.core.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 fa16efe18..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/model/DaytimeResourceAdapter.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 template for daytime example.
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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
- //FIXME absolute name must remain unique for the object over its lifetime
- 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(IAdaptable element) {
- return false;
- }
-
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
- 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(Object element, IProgressMonitor monitor) throws Exception {
- return null; // leave as null if this is the root
- }
-
- public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor)
- 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
- }
-}
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 491c47b36..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/service/DaytimeService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- *******************************************************************************/
-
-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.rse.examples.daytime.DaytimeResources;
-import org.eclipse.rse.services.AbstractService;
-
-/**
- * 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 extends AbstractService 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 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;
- }
-
-}
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 64768c628..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystem.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.examples.daytime.Activator;
-import org.eclipse.rse.examples.daytime.model.DaytimeResource;
-import org.eclipse.rse.examples.daytime.service.IDaytimeService;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.model.ISystemRegistryUI;
-
-/**
- * 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)throws SystemMessageException {
- //This is called after connect - expand the daytime node.
- // Always called in worker thread.
- super.initializeSubSystem(monitor);
- //TODO find a more elegant solution for expanding the item, e.g. use implicit connect like filters
- final ISystemRegistryUI sr = RSEUIPlugin.getTheSystemRegistryUI();
- 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) {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_CONNECT_FAILED, IStatus.ERROR, msgTxt, e);
- SystemMessageObject msgobj = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR,this);
- return new Object[] { msgobj };
- }
- } else {
- return new Object[0];
- }
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- super.uninitializeSubSystem(monitor);
- }
-
- public Class getServiceType() {
- return IDaytimeService.class;
- }
-
- public void switchServiceFactory(ISubSystemConfiguration factory) {
- // not applicable here
-
- }
-
-}
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 5675b579d..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 template for daytime example.
- * David Dykstal (IBM) - [217556] remove service subsystem types
- *******************************************************************************/
-
-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.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-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 SubSystemConfiguration {
-
- private Map fServices = new HashMap();
-
- public DaytimeSubSystemConfiguration() {
- super();
- }
-
- 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.getInstance().getConnectorService(host, IDaytimeService.class);
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService) {
- DaytimeConnectorServiceManager.getInstance().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 b62fa94a4..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeNewConnectionWizardPage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- ********************************************************************************/
-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.ISubSystem;
-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);
- return field;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemNewSubSystemProperties#applyValues(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean applyValues(ISubSystem ss) {
- return true;
- }
-
-}
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 ff58d059a..000000000
--- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/ui/DaytimeSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- *******************************************************************************/
-
-package org.eclipse.rse.examples.daytime.ui;
-
-import java.util.Vector;
-
-import org.eclipse.jface.wizard.IWizard;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.wizards.newconnection.ISystemNewConnectionWizardPage;
-
-
-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;
- }
-
-
-}
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 bff1b9eea..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, 2007 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-package org.eclipse.rse.examples.daytime.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-
-import org.eclipse.rse.examples.daytime.subsystems.DaytimeSubSystemConfiguration;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-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.dstore/.classpath b/rse/examples/org.eclipse.rse.examples.dstore/.classpath
deleted file mode 100644
index 038c42640..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/.classpath
+++ /dev/null
@@ -1,8 +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/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="miners"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/.project b/rse/examples/org.eclipse.rse.examples.dstore/.project
deleted file mode 100644
index 3ad837e42..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.examples.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/examples/org.eclipse.rse.examples.dstore/.settings/org.eclipse.jdt.core.prefs b/rse/examples/org.eclipse.rse.examples.dstore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf1dd7482..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Mon Mar 16 11:50:09 EDT 2009
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/META-INF/MANIFEST.MF b/rse/examples/org.eclipse.rse.examples.dstore/META-INF/MANIFEST.MF
deleted file mode 100644
index 5443132f3..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Dstore Plug-in
-Bundle-SymbolicName: org.eclipse.rse.examples.dstore;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.rse.examples.dstore.Activator
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.core;bundle-version="3.1.0",
- org.eclipse.dstore.core;bundle-version="3.1.0",
- org.eclipse.dstore.extra;bundle-version="2.1.100",
- org.eclipse.rse.services.dstore;bundle-version="3.0.100",
- org.eclipse.rse.services;bundle-version="3.1.0",
- org.eclipse.rse.ui;bundle-version="3.1.0",
- org.eclipse.rse.connectorservice.dstore;bundle-version="3.0.1",
- org.eclipse.swt;bundle-version="3.4.0",
- org.eclipse.jface;bundle-version="3.4.0",
- org.eclipse.ui.views;bundle-version="3.3.0",
- org.eclipse.ui;bundle-version="3.4.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/build.properties b/rse/examples/org.eclipse.rse.examples.dstore/build.properties
deleted file mode 100644
index c68c49cd4..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/,\
- miners/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- icons/
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystem_obj.gif b/rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystem_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystem_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystemlive_obj.gif b/rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystemlive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/icons/full/obj16/samplesubsystemlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/miners/org/eclipse/rse/examples/dstore/miners/SampleMiner.java b/rse/examples/org.eclipse.rse.examples.dstore/miners/org/eclipse/rse/examples/dstore/miners/SampleMiner.java
deleted file mode 100644
index 26c8c52e0..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/miners/org/eclipse/rse/examples/dstore/miners/SampleMiner.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.miners;
-
-import org.eclipse.dstore.core.miners.Miner;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStoreResources;
-
-public class SampleMiner extends Miner {
-
- public String getVersion() {
- return "1.0.0";
- }
-
-
- protected void load() {
-
- }
-
- public DataElement handleCommand(DataElement theElement) throws Exception {
- String name = getCommandName(theElement);
- DataElement status = getCommandStatus(theElement);
- DataElement subject = getCommandArgument(theElement, 0);
-
- if (name.equals("C_SAMPLE_QUERY")){ //$NON-NLS-1$
- return handleSampleQuery(subject, status);
- }
- else if (name.equals("C_SAMPLE_ACTION")){//$NON-NLS-1$
- return handleSampleAction(subject, status);
- }
- else if (name.equals("C_RENAME")){
- return handleRename(subject, getCommandArgument(theElement, 1), status);
- }
- else if (name.equals("C_DELETE")){
- return handleDelete(subject, status);
- }
- else if (name.equals("C_CREATE_SAMPLE_OBJECT")){
- return handleCreateSampleObject(subject, status);
- }
- else if (name.equals("C_CREATE_SAMPLE_CONTAINER")){
- return handleCreateSampleContainer(subject, status);
- }
- return status;
- }
-
- public void extendSchema(DataElement schemaRoot) {
-
- DataElement sampleContainer = _dataStore.createObjectDescriptor(schemaRoot, "Sample Container"); //$NON-NLS-1$
- DataElement sampleObject = _dataStore.createObjectDescriptor(schemaRoot, "Sample Object"); //$NON-NLS-1$
- _dataStore.createReference(sampleObject, sampleContainer, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- createCommandDescriptor(sampleContainer, "Query", "C_SAMPLE_QUERY", false); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(sampleObject, "Do Something", "C_SAMPLE_ACTION", false); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(sampleObject, "Rename", "C_RENAME", false); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(sampleObject, "Delete", "C_DELETE", false); //$NON-NLS-1$ //$NON-NLS-2$
- createCommandDescriptor(sampleObject, "Create Object", "C_CREATE_SAMPLE_OBJECT", false);
- createCommandDescriptor(sampleObject, "Create Container", "C_CREATE_SAMPLE_CONTAINER", false);
-
- _dataStore.refresh(schemaRoot);
- }
-
- private DataElement handleSampleQuery(DataElement parent, DataElement status){
- String value = parent.getValue();
- if (!value.equals("queried")){
- _dataStore.createObject(parent, "Sample Object", "New Object 1"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createObject(parent, "Sample Object", "New Object 2"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.createObject(parent, "Sample Container", "New Container 3"); //$NON-NLS-1$ //$NON-NLS-2$
-
- parent.setAttribute(DE.A_VALUE, "queried");
- _dataStore.refresh(parent);
- }
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- private DataElement handleSampleAction(DataElement parent, DataElement status){
- parent.setAttribute(DE.A_NAME, parent.getName() + " - modified");
- _dataStore.refresh(parent.getParent());
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- private DataElement handleRename(DataElement parent, DataElement newName, DataElement status){
- parent.setAttribute(DE.A_NAME, newName.getName());
- _dataStore.refresh(parent.getParent());
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- private DataElement handleDelete(DataElement subject, DataElement status){
- DataElement parent = subject.getParent();
- _dataStore.deleteObject(parent, subject);
- _dataStore.refresh(parent);
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- private DataElement handleCreateSampleObject(DataElement parent, DataElement status){
- _dataStore.createObject(parent, "Sample Object", "Untitled"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(parent);
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-
- private DataElement handleCreateSampleContainer(DataElement parent, DataElement status){
- _dataStore.createObject(parent, "Sample Container", "Untitled Container"); //$NON-NLS-1$ //$NON-NLS-2$
- _dataStore.refresh(parent);
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return status;
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/plugin.properties b/rse/examples/org.eclipse.rse.examples.dstore/plugin.properties
deleted file mode 100644
index 34c89fed8..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2009 IBM, 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:
-# David McKnight - initial API and implementation
-################################################################################
-
-pluginName = DataStore Example
-providerName = Eclipse.org
-
-SampleSubsystemName=DStore Sample SubSystem
-SampleSubsystemDescription=This subsystem allows the user to remotely query a parent node to return children.
- \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/plugin.xml b/rse/examples/org.eclipse.rse.examples.dstore/plugin.xml
deleted file mode 100644
index bec50c01c..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2009 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
-
-Contributors:
-David McKnight (IBM) - Initial contribution
--->
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
- name="DStore Sample SubSystem"
- description="his subsystem allows the user to remotely query a parent node to return children."
- iconlive="icons/full/obj16/samplesubsystemlive_obj.gif"
- icon="icons/full/obj16/samplesubsystem_obj.gif"
- category="dstore.sample"
- class="org.eclipse.rse.examples.dstore.subsystems.SampleSubSystemConfiguration"
- vendor="%providerName"
- priority="200"
- id="dstore.sample"/>
- </extension>
-
-</plugin>
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/readme.txt b/rse/examples/org.eclipse.rse.examples.dstore/readme.txt
deleted file mode 100644
index b8b012b38..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/readme.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Readme for RSE DataStore Example
-------------------------------
-
-The DataStore Example shows how to use the DataStore communication layer
-to interact with an agent on a server machine. This example includes an
-RSE service layer, subsystem layer and some UI pieces in order to demonstrate
-different types of remote tasks. The example is only meant as an educational
- guide to developers that use or extend the DataStore services.
-
-__Requirements:__
-The DataStore example has been tested with with RSE 3.1
-
-__Installation:__
-You need an Eclipse PDE Workspace with RSE.
-Then, choose File > Import > Existing Projects > Archive File,
-to import the example archive.
-
-__Server Installation:___
-The DStore Server Runtime needs to be installed on the remote machines
-that you wish to connect to.
-To enable to server portion of the example:
-1) The "miners" source folder needs to be exported to a jar file (i.e. myminer.jar)
-2) The exported jar needs to be put in the DStore Server Runtime installation
-directory on the server.
-3) The server and daemon scripts need to be updated to include this jar in their
-respective classpaths.
-
-__Usage:__
-The dstore service must be enabled on the remote system (see below). The subsystem
-configuration for the sample subsystem in this plugin is enabled for Linux and
-Unix connections but could be enabled for any other system that supports DStore.
-
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/Activator.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/Activator.java
deleted file mode 100644
index 511d19342..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/Activator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.eclipse.rse.examples.dstore;
-
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.rse.examples.dstore.subsystems.RemoteSampleObject;
-import org.eclipse.rse.examples.dstore.ui.RemoteSampleObjectAdapterFactory;
-import org.eclipse.rse.examples.dstore.ui.SampleSubSystemConfigurationAdapterFactory;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.examples.dstore";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- IAdapterManager manager = Platform.getAdapterManager();
- RemoteSampleObjectAdapterFactory factory = new RemoteSampleObjectAdapterFactory();
- manager.registerAdapters(factory, RemoteSampleObject.class);
-
- SampleSubSystemConfigurationAdapterFactory sscaf = new SampleSubSystemConfigurationAdapterFactory();
- sscaf.registerWithManager(manager);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#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/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleContainer.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleContainer.java
deleted file mode 100644
index fcf938366..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleContainer.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.services;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public class HostSampleContainer extends HostSampleObject implements IHostSampleContainer {
-
- public HostSampleContainer(DataElement element){
- super(element);
- }
-
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleObject.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleObject.java
deleted file mode 100644
index 982b2c481..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/HostSampleObject.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.services;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public class HostSampleObject implements IHostSampleObject {
-
- private DataElement _element;
- public HostSampleObject(DataElement element){
- _element = element;
- }
-
- public DataElement getDataElement() {
- return _element;
- }
-
- public String getName(){
- return _element.getName();
- }
-
- public String getType(){
- return _element.getType();
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleContainer.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleContainer.java
deleted file mode 100644
index 2a8761fab..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleContainer.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.services;
-
-
-public interface IHostSampleContainer extends IHostSampleObject {
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleObject.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleObject.java
deleted file mode 100644
index 59ba38beb..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/IHostSampleObject.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.services;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public interface IHostSampleObject {
- public DataElement getDataElement();
- public String getName();
- public String getType();
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/SampleService.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/SampleService.java
deleted file mode 100644
index 769af6c7d..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/services/SampleService.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.services;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-
-public class SampleService extends AbstractDStoreService {
-
- public SampleService(IDataStoreProvider dataStoreProvider) {
- super(dataStoreProvider);
- }
-
- @Override
- protected String getMinerId() {
- return "org.eclipse.rse.examples.dstore.miners.SampleMiner";
- }
-
- public IHostSampleContainer getContainer(String name, IProgressMonitor monitor){
- if (!isInitialized())
- {
- waitForInitialize(monitor);
- }
- DataElement universalTemp = getMinerElement();
- DataElement containerElement = getDataStore().createObject(universalTemp, "Sample Container", name,"", "", false); //$NON-NLS-1$
-
- return new HostSampleContainer(containerElement);
- }
-
- public IHostSampleObject[] query(IHostSampleContainer container, IProgressMonitor monitor){
- if (!isInitialized())
- {
- waitForInitialize(monitor);
- }
- DataElement containerElement = container.getDataElement();
- DataElement[] results = dsQueryCommand(containerElement, "C_SAMPLE_QUERY", monitor);
-
- List<IHostSampleObject> returned = new ArrayList<IHostSampleObject>();
- for (int i = 0; i < results.length; i++){
- DataElement result = results[i];
- if (result.isDeleted()){
- // don't add deleted items
- }
- else if (result.getType().equals("Sample Container")){
- returned.add(new HostSampleContainer(result));
- }
- else {
- returned.add(new HostSampleObject(result));
- }
- }
-
- return (IHostSampleObject[])returned.toArray(new IHostSampleObject[returned.size()]);
- }
-
- public void doAction(IHostSampleObject object, IProgressMonitor monitor){
- DataElement subject = object.getDataElement();
- dsStatusCommand(subject, "C_SAMPLE_ACTION", monitor);
- }
-
- public void createSampleObject(IHostSampleObject object, IProgressMonitor monitor){
- DataElement subject = object.getDataElement();
- dsStatusCommand(subject, "C_CREATE_SAMPLE_OBJECT", monitor);
- }
-
- public void createSampleContainer(IHostSampleObject object, IProgressMonitor monitor){
- DataElement subject = object.getDataElement();
- dsStatusCommand(subject, "C_CREATE_SAMPLE_CONTAINER", monitor);
- }
-
-
- public boolean rename(IHostSampleObject object, String newName, IProgressMonitor monitor){
- DataElement subject = object.getDataElement();
-
- ArrayList<DataElement> args = new ArrayList<DataElement>();
- DataElement newNameArg = getDataStore().createObject(null, "Name", newName);
- args.add(newNameArg);
-
- dsStatusCommand(subject, args, "C_RENAME", monitor);
- return true;
- }
-
- public boolean delete(IHostSampleObject object, IProgressMonitor monitor){
- DataElement subject = object.getDataElement();
-
- dsStatusCommand(subject, "C_DELETE", monitor);
-
- return true;
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/RemoteSampleObject.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/RemoteSampleObject.java
deleted file mode 100644
index c295875e8..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/RemoteSampleObject.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.subsystems;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.examples.dstore.services.IHostSampleContainer;
-import org.eclipse.rse.examples.dstore.services.IHostSampleObject;
-
-public class RemoteSampleObject extends AbstractResource {
- protected IHostSampleObject _hostObject;
- private RemoteSampleObject[] _contents;
- private RemoteSampleObject _parent;
-
- public RemoteSampleObject(RemoteSampleObject parent, IHostSampleObject hostObject, SampleSubSystem ss){
- _hostObject = hostObject;
- _parent = parent;
- setSubSystem(ss);
- }
-
- public IHostSampleObject getHostSampleObject(){
- return _hostObject;
- }
-
- public boolean isContainer(){
- if (_hostObject instanceof IHostSampleContainer){
- return true;
- }
- return false;
- }
-
- public String getName(){
- return _hostObject.getName();
- }
-
- public String getType(){
- return _hostObject.getType();
- }
-
- public RemoteSampleObject getParent(){
- return _parent;
- }
-
- public String getAbsolutePath(){
- if (_parent != null){
- return _parent.getAbsolutePath() + "." + getName();
- }
- else {
- return getName();
- }
- }
-
- public void setContents(RemoteSampleObject[] contents){
- _contents = contents;
- }
-
- public RemoteSampleObject[] getContents(){
- return _contents;
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleRootResource.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleRootResource.java
deleted file mode 100644
index 00a4b7753..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleRootResource.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.subsystems;
-
-import org.eclipse.rse.examples.dstore.services.IHostSampleObject;
-
-
-
-public class SampleRootResource extends RemoteSampleObject {
-
- public SampleRootResource(SampleSubSystem ss) {
- super(null, null, ss);
- }
-
- public boolean isContainer(){
- return true;
- }
-
- public String getName(){
- return "Root";
- }
-
-
-
- public String getType(){
- return "Root";
- }
-
- public RemoteSampleObject getParent(){
- return null;
- }
-
- public String getAbsolutePath(){
- return getName();
- }
-
- public IHostSampleObject getHostSampleObject(){
- return _hostObject;
- }
-
- public void setHostSampleObject(IHostSampleObject hostObject){
- _hostObject = hostObject;
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystem.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystem.java
deleted file mode 100644
index 2982bbe09..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystem.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.subsystems;
-
-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.examples.dstore.services.IHostSampleContainer;
-import org.eclipse.rse.examples.dstore.services.IHostSampleObject;
-import org.eclipse.rse.examples.dstore.services.SampleService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-public class SampleSubSystem extends SubSystem {
-
- private SampleService _sampleService;
- private SampleRootResource _root;
-
- protected SampleSubSystem(IHost host, IConnectorService connectorService, SampleService sampleService) {
- super(host, connectorService);
- _sampleService = sampleService;
- }
-
- public boolean hasChildren() {
- return true;
- }
-
- public Object[] getChildren() {
- if (_root == null){
- _root = new SampleRootResource(this);
- }
- return new Object[] {_root};
- }
-
- public Object[] list(RemoteSampleObject containerObj, IProgressMonitor monitor){
- try {
- checkIsConnected(monitor);
- }
- catch (Exception e){
- e.printStackTrace();
- }
-
- RemoteSampleObject[] contents = containerObj.getContents();
- if (contents == null){
- IHostSampleContainer container = (IHostSampleContainer)containerObj.getHostSampleObject();
- if (container == null && containerObj instanceof SampleRootResource){
- container = getSampleService().getContainer(containerObj.getName(), monitor);
- ((SampleRootResource)containerObj).setHostSampleObject(container);
- }
- IHostSampleObject[] hostResults = getSampleService().query(container, monitor);
-
- contents = new RemoteSampleObject[hostResults.length];
- for (int i = 0; i < hostResults.length; i++){
- IHostSampleObject hobj = hostResults[i];
- contents[i] = new RemoteSampleObject(containerObj, hobj, this);
- }
- containerObj.setContents(contents);
- }
-
- return contents;
- }
-
- public void doRemoteAction(RemoteSampleObject object, IProgressMonitor monitor){
- IHostSampleObject hostObject = object.getHostSampleObject();
- getSampleService().doAction(hostObject, monitor);
- }
-
-
- public void createSampleContainer(RemoteSampleObject parentObject, IProgressMonitor monitor){
- parentObject.setContents(null); // clear contents so that fresh contents arrive after refresh
- IHostSampleObject hostObject = parentObject.getHostSampleObject();
- getSampleService().createSampleContainer(hostObject, monitor);
- }
-
- public void createSampleObject(RemoteSampleObject parentObject, IProgressMonitor monitor){
- parentObject.setContents(null); // clear contents so that fresh contents arrive after refresh
- IHostSampleObject hostObject = parentObject.getHostSampleObject();
- getSampleService().createSampleObject(hostObject, monitor);
- }
-
- public boolean rename(RemoteSampleObject object, String newName, IProgressMonitor monitor){
- IHostSampleObject hostObject = object.getHostSampleObject();
- return getSampleService().rename(hostObject, newName, monitor);
- }
-
- public boolean delete(RemoteSampleObject object, IProgressMonitor monitor){
- object.getParent().setContents(null); // clear contents so that fresh contents arrive after refresh
- IHostSampleObject hostObject = object.getHostSampleObject();
- return getSampleService().delete(hostObject, monitor);
- }
-
- protected SampleService getSampleService(){
- return _sampleService;
- }
-
- @Override
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException{
- super.initializeSubSystem(monitor);
-
- getSampleService().initService(monitor);
- }
-
- @Override
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- if (_root != null){
- _root.setHostSampleObject(null);
- _root.setContents(null);
- }
-
- getSampleService().uninitService(monitor);
- super.uninitializeSubSystem(monitor);
- }
-
-
-
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystemConfiguration.java
deleted file mode 100644
index 6fd200252..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/subsystems/SampleSubSystemConfiguration.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.subsystems;
-
-import java.util.HashMap;
-import java.util.Map;
-
-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.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.examples.dstore.services.SampleService;
-import org.eclipse.rse.services.dstore.IDStoreService;
-
-public class SampleSubSystemConfiguration extends SubSystemConfiguration {
-
-
- protected Map _services = new HashMap();
-
- public ISubSystem createSubSystemInternal(IHost conn) {
-
- return new SampleSubSystem(conn, getConnectorService(conn), getSampleService(conn));
- }
-
- public IConnectorService getConnectorService(IHost host) {
- return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public SampleService getSampleService(IHost host) {
- SampleService service = (SampleService)_services.get(host);
- if (service == null)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- service = new SampleService(connectorService);
- _services.put(host, service);
- }
- return service;
- }
-
- public boolean supportsFilters() {
- return false;
- }
-
- public Class getServiceImplType(){
- return IDStoreService.class;
- }
-
-
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/RemoteSampleObjectAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/RemoteSampleObjectAdapterFactory.java
deleted file mode 100644
index ee02f2144..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/RemoteSampleObjectAdapterFactory.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 org.eclipse.rse.examples.dstore.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.examples.dstore.subsystems.RemoteSampleObject;
-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 RemoteSampleObjectAdapterFactory extends AbstractSystemRemoteAdapterFactory
- implements IAdapterFactory
-{
-
- private SampleAdapter sampleAdapter = new SampleAdapter();
-
-
- /**
- * Constructor for DeveloperAdapterFactory.
- */
- public RemoteSampleObjectAdapterFactory() {
- 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 RemoteSampleObject)
- adapter = sampleAdapter;
- // 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.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleAdapter.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleAdapter.java
deleted file mode 100644
index 7aaa26200..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleAdapter.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.ui;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.examples.dstore.subsystems.RemoteSampleObject;
-import org.eclipse.rse.examples.dstore.subsystems.SampleRootResource;
-import org.eclipse.rse.examples.dstore.subsystems.SampleSubSystem;
-import org.eclipse.rse.examples.dstore.ui.actions.NewSampleObjectAction;
-import org.eclipse.rse.examples.dstore.ui.actions.SampleAction;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-public class SampleAdapter extends AbstractSystemViewAdapter implements
- ISystemRemoteElementAdapter {
-
- private SampleAction _sampleAction;
- private NewSampleObjectAction _newSampleObjectAction;
- private NewSampleObjectAction _newSampleContainerAction;
-
- @Override
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
- RemoteSampleObject object = getSampleObject(element);
- if (object != null){
- if (object.isContainer()){
- SampleSubSystem ss = (SampleSubSystem)object.getSubSystem();
- return ss.list(object, monitor);
- }
- }
- return null;
- }
-
-
- @Override
- public Object getParent(Object element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getParent();
- }
- return null;
- }
-
- @Override
- public String getType(Object element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getType();
- }
- return null;
- }
-
- @Override
- public boolean hasChildren(IAdaptable element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.isContainer();
- }
- return false;
- }
-
- @Override
- protected Object internalGetPropertyValue(Object key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getAbsoluteParentName(Object element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getParent().getAbsolutePath();
- }
- return null;
- }
-
- public Object getRemoteParent(Object element, IProgressMonitor monitor)
- throws Exception {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getParent();
- }
- return null;
- }
-
- public String[] getRemoteParentNamesInUse(Object element,
- IProgressMonitor monitor) throws Exception {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean refreshRemoteObject(Object oldElement, Object newElement) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String getRemoteSubType(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getRemoteType(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getRemoteTypeCategory(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getSubSystemConfigurationId(Object element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getSubSystem().getSubSystemConfiguration().getId();
- }
- return null;
- }
-
- public String getText(Object element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getName();
- }
- return null;
- }
-
- public String getAbsoluteName(Object element) {
-
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- return obj.getAbsolutePath();
- }
- return null;
- }
-
- @Override
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup) {
- Object firstSelection = selection.getFirstElement();
- if (firstSelection instanceof RemoteSampleObject){
- if (!(firstSelection instanceof SampleRootResource)){
- if (_sampleAction == null){
- _sampleAction = new SampleAction(parent);
- }
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE, _sampleAction);
- }
-
- if (_newSampleObjectAction == null){
- _newSampleObjectAction = new NewSampleObjectAction(shell, false);
- }
- if (_newSampleContainerAction == null){
- _newSampleContainerAction = new NewSampleObjectAction(shell, true);
- }
-
- if (((RemoteSampleObject)firstSelection).isContainer()){
- menu.add(ISystemContextMenuConstants.GROUP_NEW, _newSampleObjectAction);
- menu.add(ISystemContextMenuConstants.GROUP_NEW, _newSampleContainerAction);
- }
- }
- }
-
- private RemoteSampleObject getSampleObject(Object element){
- if (element instanceof RemoteSampleObject){
- return (RemoteSampleObject)element;
- }
- return null;
- }
-
- @Override
- public ImageDescriptor getImageDescriptor(Object element) {
- RemoteSampleObject obj = getSampleObject(element);
- if (obj != null){
- if (obj.isContainer()){
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- }
- else {
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_ELEMENT);
- }
- }
- return null;
- }
-
- @Override
- protected IPropertyDescriptor[] internalGetPropertyDescriptors() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public boolean canRename(Object element) {
- if (element instanceof SampleRootResource){
- return false;
- }
- return true;
- }
-
- @Override
- public boolean doRename(Shell shell, Object element, String name,
- IProgressMonitor monitor) throws Exception {
- SampleSubSystem ss = (SampleSubSystem)getSubSystem(element);
- return ss.rename((RemoteSampleObject)element, name, monitor);
- }
-
- @Override
- public boolean canDelete(Object element) {
- if (element instanceof SampleRootResource){
- return false;
- }
- return true;
- }
-
- @Override
- public boolean doDelete(Shell shell, Object element,
- IProgressMonitor monitor) throws Exception {
- SampleSubSystem ss = (SampleSubSystem)getSubSystem(element);
- boolean result = ss.delete((RemoteSampleObject)element, monitor);
- if (result){
- ss.list(((RemoteSampleObject)element).getParent(), monitor);
- }
- return result;
- }
-
- @Override
- public boolean supportsDeferredQueries(ISubSystem subSys) {
- return true;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapter.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapter.java
deleted file mode 100644
index 65cfc0f97..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.ui;
-
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-
-public class SampleSubSystemConfigurationAdapter extends
- SubSystemConfigurationAdapter {
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 87340f891..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/SampleSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package org.eclipse.rse.examples.dstore.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.examples.dstore.subsystems.SampleSubSystemConfiguration;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-/**
- * @see IAdapterFactory
- */
-public class SampleSubSystemConfigurationAdapterFactory implements
- IAdapterFactory {
-
- private ISubSystemConfigurationAdapter ssConfigAdapter = new SampleSubSystemConfigurationAdapter();
-
- /**
- * @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, SampleSubSystemConfiguration.class);
- }
-
- /**
- * @see IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- Object adapter = null;
- if (adaptableObject instanceof SampleSubSystemConfiguration)
- adapter = ssConfigAdapter;
-
- return adapter;
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/NewSampleObjectAction.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/NewSampleObjectAction.java
deleted file mode 100644
index 884f7822c..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/NewSampleObjectAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.ui.actions;
-
-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.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.examples.dstore.subsystems.RemoteSampleObject;
-import org.eclipse.rse.examples.dstore.subsystems.SampleSubSystem;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-public class NewSampleObjectAction extends SystemBaseAction {
- public class NewSampleObjectJob extends Job {
- private RemoteSampleObject _selectedObject;
- public NewSampleObjectJob(RemoteSampleObject selectedObject){
- super("Create Sample Object");
- _selectedObject = selectedObject;
- }
-
- public IStatus run(IProgressMonitor monitor){
- SampleSubSystem ss = (SampleSubSystem)_selectedObject.getSubSystem();
-
- // do remote action
- if (_container){
- ss.createSampleContainer(_selectedObject, monitor);
- }
- else {
- ss.createSampleObject(_selectedObject, monitor);
- }
-
- // refresh view
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemResourceChangeEvent(_selectedObject, ISystemResourceChangeEvents.EVENT_REFRESH, _selectedObject));
- return Status.OK_STATUS;
- }
- }
-
-
- private boolean _container;
- public NewSampleObjectAction(Shell shell, boolean container) {
- super(container? "Sample Container" : "Sample Object", shell);
- _container = container;
- }
-
- @Override
- public void run() {
-
- RemoteSampleObject obj = (RemoteSampleObject)getSelection().getFirstElement();
- if (obj != null){
- NewSampleObjectJob job = new NewSampleObjectJob(obj);
- job.schedule();
- }
- }
-}
diff --git a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/SampleAction.java b/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/SampleAction.java
deleted file mode 100644
index 02d518b68..000000000
--- a/rse/examples/org.eclipse.rse.examples.dstore/src/org/eclipse/rse/examples/dstore/ui/actions/SampleAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.examples.dstore.ui.actions;
-
-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.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.examples.dstore.subsystems.RemoteSampleObject;
-import org.eclipse.rse.examples.dstore.subsystems.SampleSubSystem;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-public class SampleAction extends SystemBaseAction {
-
- public class SampleJob extends Job {
- private RemoteSampleObject _selectedObject;
- public SampleJob(RemoteSampleObject selectedObject){
- super("Sample Job");
- _selectedObject = selectedObject;
- }
-
- public IStatus run(IProgressMonitor monitor){
- SampleSubSystem ss = (SampleSubSystem)_selectedObject.getSubSystem();
-
- // do remote action
- ss.doRemoteAction(_selectedObject, monitor);
-
- // refresh view
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemResourceChangeEvent(_selectedObject.getParent(), ISystemResourceChangeEvents.EVENT_REFRESH, _selectedObject.getParent()));
- return Status.OK_STATUS;
- }
- }
-
-
-
- public SampleAction(Shell shell) {
- super("Do Remote Operation", shell);
- }
-
- @Override
- public void run() {
-
- RemoteSampleObject obj = (RemoteSampleObject)getSelection().getFirstElement();
- if (obj != null){
- SampleJob job = new SampleJob(obj);
- job.schedule();
- }
- }
-
-
-
-
-}
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 b7464f3ca..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.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/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 10ffa6437..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 6d1eabbec..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=warning
-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=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=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 1daa6a176..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/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.examples.tutorial;singleton:=true
-Bundle-Version: 3.1.0.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;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.files.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.shells.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-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 d4cc693f9..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 5, 2007</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/about.ini b/rse/examples/org.eclipse.rse.examples.tutorial/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/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=dsdp32.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.tutorial/about.mappings b/rse/examples/org.eclipse.rse.examples.tutorial/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/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.tutorial/about.properties b/rse/examples/org.eclipse.rse.examples.tutorial/about.properties
deleted file mode 100644
index ba48a45d0..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2006, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
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 8be80b6c2..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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,\
- about.ini,\
- about.mappings,\
- about.properties,\
- dsdp32.png
-src.includes = about.html
- \ No newline at end of file
diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/dsdp32.png b/rse/examples/org.eclipse.rse.examples.tutorial/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/dsdp32.png
+++ /dev/null
Binary files differ
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 6e2890732..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 = Remote System Explorer Examples
-providerName = Eclipse.org - DSDP
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 e3bff4d9e..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/plugin.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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.
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
-
- <!-- ======================================= -->
- <!-- Remote Object Popup Menu Actions -->
- <!-- ======================================= -->
- <!-- Tutorial #1: Creating a Remote Resource pop-up Menu Action -->
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"
- nameFilter="*.jar"
- id="actions.jar">
- <action
- label="Show contents"
- tooltip="list contents of this file"
- class="samples.ui.actions.ShowJarContents"
- menubarPath="additions"
- enablesFor="1"
- id="actions.jar.show">
- </action>
- </objectContribution>
- </extension>
-
- <!-- ======================================= -->
- <!-- Remote Object Property Pages -->
- <!-- ======================================= -->
- <!-- Tutorial #2: Creating a Remote Resource Property Page -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="Folder Contents"
- class="samples.ui.propertypages.FolderInfoPropertyPage"
- id="samples.ui.PropertyPage1">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- </enabledWhen>
- <filter name="isDirectory" value="true"/>
- </page>
- </extension>
-
- <!-- ======================================= -->
- <!-- SubSystem Configuration -->
- <!-- ======================================= -->
- <!-- Tutorial #3: Creating a Subsystem Configuration -->
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- id="samples.subsystems.factory"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.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 b0bee7cb6..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/rseSamplesMessages.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?> <!--
- 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
- -->
-
-<!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 c9250205b..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- ********************************************************************************/
-
-package samples;
-
-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.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 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;
- }
-
- /**
- * 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();
- }
-
- /**
- * 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/RSESamplesResources.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesResources.java
deleted file mode 100644
index afaffeba2..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesResources.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [235626] initial API and implementation
- *******************************************************************************/
-
-package samples;
-
-import org.eclipse.osgi.util.NLS;
-
-public class RSESamplesResources extends NLS {
- private static String BUNDLE_NAME = "samples.rseSamplesResources"; //$NON-NLS-1$
-
- public static String pp_size_label;
- public static String pp_size_tooltip;
- public static String pp_files_label;
- public static String pp_files_tooltip;
- public static String pp_folders_label;
- public static String pp_folders_tooltip;
- public static String pp_stopButton_label;
- public static String pp_stopButton_tooltip;
-
- // Tutorial #3: Creating a Subsystem Configuration
- public static String connectorservice_devr_name;
- public static String connectorservice_devr_desc;
-
- public static String property_devr_resource_type;
- public static String property_devr_id_name;
- public static String property_devr_id_desc;
- public static String property_devr_dept_name;
- public static String property_devr_dept_desc;
- public static String property_team_resource_type;
- public static String filter_default_name;
-
- // Tutorial #3a: Adding a Custom Filter
- public static String property_type_teamfilter;
- public static String property_type_devrfilter;
-
- public static String filter_team_dlgtitle;
- public static String filter_team_pagetitle;
- public static String filter_team_pagetext;
-
- public static String filter_devr_dlgtitle;
- public static String filter_devr_pagetitle;
- public static String filter_devr_pagetext;
- public static String filter_devr_teamprompt_label;
- public static String filter_devr_teamprompt_tooltip;
- public static String filter_devr_devrprompt_label;
- public static String filter_devr_devrprompt_tooltip;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, RSESamplesResources.class);
- }
-
-
-}
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 020eb9276..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/DeveloperResourceAdapter.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- *******************************************************************************/
-
-package samples.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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;
-import samples.RSESamplesResources;
-
-/**
- * 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.core.subsystems.IRemoteObjectIdentifier#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 RSESamplesResources.property_devr_resource_type;
- }
-
- /**
- * @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(IAdaptable element)
- {
- return false;
- }
-
-
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
- 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$
- RSESamplesResources.property_devr_id_name);
- ourPDs[0].setDescription(
- RSESamplesResources.property_devr_id_desc);
- ourPDs[1] = new PropertyDescriptor("devr_dept", //$NON-NLS-1$
- RSESamplesResources.property_devr_dept_name);
- ourPDs[1].setDescription(
- RSESamplesResources.property_devr_dept_desc);
- 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor)
- throws Exception
- {
- // developers names do not have to be unique! So we don't need to implement this!
- return null;
-
- }
-}
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 46514d36b..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/model/TeamResourceAdapter.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- *******************************************************************************/
-
-package samples.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.RSESamplesResources;
-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.core.subsystems.IRemoteObjectIdentifier#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 RSESamplesResources.property_team_resource_type;
- }
-
- /* (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(IAdaptable element)
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- 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, IProgressMonitor)
- */
- public boolean doRename(Shell shell, Object element, String newName, IProgressMonitor monitor)
- {
- ((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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor)
- 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
- }
-}
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 f346945bd..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/rseSamplesResources.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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.
-# Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
-###############################################################################
-
-# 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 23e5ad4cb..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorService.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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.
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.BasicConnectorService;
-
-import samples.RSESamplesResources;
-
-/**
- * Our system class that manages connecting to, and disconnecting from,
- * our remote server-side code.
- */
-public class DeveloperConnectorService extends BasicConnectorService {
-
- private boolean connected = false;
-
- /**
- * Constructor for DeveloperConnectorService.
- * @param host
- */
- public DeveloperConnectorService(IHost host)
- {
- super(
- RSESamplesResources.connectorservice_devr_name, RSESamplesResources.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
- {
- // 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)
- */
- protected void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- // pretend. Normally, we'd disconnect from our remote server-side code here
- connected=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 19ab8c6ea..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperConnectorServiceManager.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.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 getInstance()
- {
- if (inst == null)
- inst = new DeveloperConnectorServiceManager();
- 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 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 d4eec0cdc..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperFilterStringEditPane.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- *******************************************************************************/
-
-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.RSESamplesResources;
-
-/**
- * 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,
- RSESamplesResources.filter_devr_teamprompt_label,
- RSESamplesResources.filter_devr_teamprompt_tooltip
- );
-
- // CREATE DEVELOPER PROMPT
- textDevr = SystemWidgetHelpers.createLabeledTextField(
- composite_prompts,
- null,
- RSESamplesResources.filter_devr_devrprompt_label,
- RSESamplesResources.filter_devr_devrprompt_tooltip
- );
-
- 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();
- }
- }
- );
- setEditable(editable);
- 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));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#setEditable(boolean)
- */
- public void setEditable(boolean editable) {
- super.setEditable(editable);
- enable(textDevr, editable);
- enable(textTeam, editable);
- }
-
- /**
- * 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 a1f54ae53..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystem.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- ******************************************************************************/
-
-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 org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-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 SubSystem#initializeSubSystem(IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException {
- super.initializeSubSystem(monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see ISubSystem#uninitializeSubSystem(IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- super.uninitializeSubSystem(monitor);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see SubSystem#getObjectWithAbsoluteName(String, IProgressMonitor)
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception
- {
- // 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];
- }
- // Not a remote object: fall back to return filter reference
- return super.getObjectWithAbsoluteName(key, monitor);
- }
-
- /**
- * 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 filterString - one of the filter strings from the expanded filter.
- * @param monitor - the progress monitor in effect while this operation performs
- */
- protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
- 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 parent - the parent resource object being expanded
- * @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
- * @param monitor - the progress monitor in effect while this operation performs
- */
- protected Object[] internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
- 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 1304b0d6c..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfiguration.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- *******************************************************************************/
-
-package samples.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.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.RSESamplesResources;
-
-/**
- * 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.core.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host) {
- return DeveloperConnectorServiceManager.getInstance()
- .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
- String[] strings = new String[] { "*" }; //$NON-NLS-1$
- //--tutorial part 1
- //mgr.createSystemFilter(defaultPool, "All teams", strings);
- //--tutorial part 2
- ISystemFilter filter = mgr.createSystemFilter(defaultPool,
- RSESamplesResources.filter_default_name,
- 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 RSESamplesResources.property_type_teamfilter;
- //--tutorial part 2
- String type = selectedFilter.getType();
- if (type == null)
- type = "team"; //$NON-NLS-1$
- if (type.equals("team")) //$NON-NLS-1$
- return RSESamplesResources.property_type_teamfilter;
- else
- return RSESamplesResources.property_type_devrfilter;
- }
-
-}
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 ac8bff4bd..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- *******************************************************************************/
-
-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;
-import samples.RSESamplesResources;
-
-/**
- * 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(RSESamplesResources.filter_team_pagetitle);
- teamAction.setPage1Description(RSESamplesResources.filter_team_pagetext);
- teamAction.setType("team"); //$NON-NLS-1$
- teamAction.setText(RSESamplesResources.filter_team_pagetitle + "..."); //$NON-NLS-1$
-
- SystemNewFilterAction devrAction = (SystemNewFilterAction)super.getNewFilterPoolFilterAction(factory, selectedPool, shell);
- devrAction.setWizardPageTitle(RSESamplesResources.filter_devr_pagetitle);
- devrAction.setPage1Description(RSESamplesResources.filter_devr_pagetext);
- devrAction.setType("devr"); //$NON-NLS-1$
- devrAction.setText(RSESamplesResources.filter_devr_pagetitle + "..."); //$NON-NLS-1$
- 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(RSESamplesResources.filter_team_dlgtitle);
- }
- else
- {
- action.setDialogTitle(RSESamplesResources.filter_devr_dlgtitle);
- 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 c89f6e829..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package samples.subsystems;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.ui.subsystems.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 ebe33a563..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.
- * David Dykstal (IBM) - formatting for tutorial
- ********************************************************************************/
-
-package samples.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-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.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.IRemoteError;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * 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 implements IObjectActionDelegate {
- private List _selectedFiles;
-
- /**
- * Constructor for ShowJarContents.
- */
- public ShowJarContents() {
- _selectedFiles = new ArrayList();
- }
-
- protected Shell getShell() {
- return SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- protected IRemoteFile getFirstSelectedRemoteFile() {
- if (_selectedFiles.size() > 0) {
- return (IRemoteFile) _selectedFiles.get(0);
- }
- return null;
- }
-
- protected ISubSystem getSubSystem() {
- return getFirstSelectedRemoteFile().getParentRemoteFileSubSystem();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- 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(initialWorkingDirectory, environment, new NullProgressMonitor());
- 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, new NullProgressMonitor());
- 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 IRemoteOutput) {
- System.out.println(((IRemoteOutput) output[i]).getText());
- } else if (output[i] instanceof IRemoteError) {
- System.err.println(((IRemoteError) output[i]).getText());
- }
- }
- cmdss.removeShell(cs);
- }
- }
-
- public void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection) {
- _selectedFiles.clear();
- // store the selected jars to be used when running
- Iterator theSet = ((IStructuredSelection) selection).iterator();
- while (theSet.hasNext()) {
- Object obj = theSet.next();
- if (obj instanceof IRemoteFile) {
- _selectedFiles.add(obj);
- }
- }
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-}
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 e3eefc326..000000000
--- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Kevin Doyle (IBM) - [150492] FolderInfoPropertyPage doesn't work reliably
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Martin Oberhuber (Wind River) - [235626] Convert examples to MessageBundle format
- *******************************************************************************/
-
-package samples.ui.propertypages;
-
-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.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.Display;
-import org.eclipse.swt.widgets.Label;
-
-import samples.RSESamplesPlugin;
-import samples.RSESamplesResources;
-
-/**
- * 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 SystemBasePropertyPage
- 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,
- RSESamplesResources.pp_size_label, RSESamplesResources.pp_size_tooltip,
- false);
- filesLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesResources.pp_files_label, RSESamplesResources.pp_files_tooltip,
- false);
- foldersLabel = SystemWidgetHelpers.createLabeledLabel(composite,
- RSESamplesResources.pp_folders_label, RSESamplesResources.pp_folders_tooltip,
- false);
- stopButton = SystemWidgetHelpers.createPushButton(composite, null,
- RSESamplesResources.pp_stopButton_label, RSESamplesResources.pp_stopButton_tooltip
- );
- 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);
- 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().list( 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)
- {
- setValid(true); // re-enable OK button
- stopButton.setEnabled(false); // disable Stop button
- clearMessage(); // clear "Processing..." message
- }
- sizeLabel.setText(Integer.toString(totalSize));
- filesLabel.setText(Integer.toString(totalFiles));
- foldersLabel.setText(Integer.toString(totalFolders));
- }
- }
-
-
- /**
- * Update the GUI with the current status
- */
- private void updateGUI()
- {
- Display.getDefault().asyncExec(guiUpdater);
- }
-
- protected boolean verifyPageContents() {
- return true;
- }
-
- /**
- * Get the input remote file object
- */
- protected IRemoteFile getRemoteFile()
- {
- Object element = getElement();
- return ((IRemoteFile)element);
- }
-
-}
diff --git a/rse/examples/org.eclipse.rse.remotecdt/.project b/rse/examples/org.eclipse.rse.remotecdt/.project
deleted file mode 100644
index 45c3abd1c..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.remotecdt</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/examples/org.eclipse.rse.remotecdt/README.txt b/rse/examples/org.eclipse.rse.remotecdt/README.txt
deleted file mode 100644
index cee117f2a..000000000
--- a/rse/examples/org.eclipse.rse.remotecdt/README.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-As of RSE 3.1m7 (May 1, 2009), the remotecdt integration has moved into CDT. Get it from
-
-Repository: :pserver:anonymous@dev.eclipse.org:/cvsroot/tools
-Module: org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote
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 e0c4ed859..000000000
--- a/rse/features/org.eclipse.rse-feature/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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.eclipse.rse.core.source=org.eclipse.rse.core
-#generate.feature@org.eclipse.rse.dstore.source=org.eclipse.rse.dstore
-#generate.feature@org.eclipse.rse.ftp.source=org.eclipse.rse.ftp
-#generate.feature@org.eclipse.rse.local.source=org.eclipse.rse.local
-#generate.feature@org.eclipse.rse.ssh.source=org.eclipse.rse.ssh
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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 554011874..000000000
--- a/rse/features/org.eclipse.rse-feature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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) - ongoing maintenance
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer End-User Runtime
-
-# "description" property - description of the feature
-description=An integrated framework and toolkit for seamless working \
-on remote systems through SSH, FTP or dstore protocols.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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 f18675a37..000000000
--- a/rse/features/org.eclipse.rse-feature/feature.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse"
- label="%featureName"
- version="3.2.0.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.rse.core"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="org.eclipse.rse.dstore"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="org.eclipse.rse.ftp"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="org.eclipse.rse.local"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="org.eclipse.rse.ssh"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="org.eclipse.rse.telnet"
- version="0.0.0"
- search-location="both"/>
-
- <includes
- id="org.eclipse.rse.terminals"
- version="0.0.0"
- search-location="both"/>
-
- <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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.core-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 20b219ebb..000000000
--- a/rse/features/org.eclipse.rse.core-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE Core
-
-# "description" property - description of the feature
-description=Remote System Explorer (RSE) core including \
-system and subsystem definition, basic service APIs, and \
-user documentation.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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 c0f2bde1c..000000000
--- a/rse/features/org.eclipse.rse.core-feature/feature.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.core"
- label="%featureName"
- version="3.2.0.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.core.filesystem"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.jface"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.search"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- </requires>
-
- <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"/>
-
- <plugin
- id="org.eclipse.rse.efs"
- download-size="7"
- install-size="14"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.efs.ui"
- download-size="7"
- install-size="14"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.importexport"
- download-size="51"
- install-size="147"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.files.ui"
- download-size="111"
- install-size="407"
- 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.processes.shell.linux"
- download-size="8"
- install-size="22"
- 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"/>
-
-</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 f5a16251a..000000000
--- a/rse/features/org.eclipse.rse.core-feature/license.html
+++ /dev/null
@@ -1,81 +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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 f76dc526c..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 Core Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 bbd0b6564..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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=RSE Core Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 368ee86fb..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/dsdp32.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 3cb3aa296..000000000
--- a/rse/features/org.eclipse.rse.core-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 - DSDP
diff --git a/rse/features/org.eclipse.rse.core-patch/.project b/rse/features/org.eclipse.rse.core-patch/.project
deleted file mode 100644
index 958da000a..000000000
--- a/rse/features/org.eclipse.rse.core-patch/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.core-patch</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-patch/build.properties b/rse/features/org.eclipse.rse.core-patch/build.properties
deleted file mode 100644
index 8ed560ec8..000000000
--- a/rse/features/org.eclipse.rse.core-patch/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.core-patch/epl-v10.html b/rse/features/org.eclipse.rse.core-patch/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.core-patch/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.core-patch/feature.properties b/rse/features/org.eclipse.rse.core-patch/feature.properties
deleted file mode 100644
index 3ba74b7a2..000000000
--- a/rse/features/org.eclipse.rse.core-patch/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Core 2.0.0 patch (bug:192741)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=\
-This patch addresses bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=192741 \n\
-(Copy and Move operations not working in ZIP archives).\n\
-This patch is included in TM 2.0.0.1. DStore users need to get the new server from TM 2.0.0.1.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2007 Symbian Software Ltd. 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(TM) 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-patch/feature.xml b/rse/features/org.eclipse.rse.core-patch/feature.xml
deleted file mode 100644
index 01f670a5b..000000000
--- a/rse/features/org.eclipse.rse.core-patch/feature.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.core.patch"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import feature="org.eclipse.rse.core" version="2.0.0.v20070609-7P--EB7sQRxRjbc" patch="true"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.services"
- download-size="57"
- install-size="183"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.core-patch/license.html b/rse/features/org.eclipse.rse.core-patch/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.core-patch/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/.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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 d6f88ca7c..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/feature.properties
+++ /dev/null
@@ -1,139 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE DStore Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 018dac55f..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/feature.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2006, 2009 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: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) - [189269] add version range specifiers --> <feature
- id="org.eclipse.rse.dstore"
- label="%featureName"
- version="3.1.1.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.processes.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- </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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 e5a2db168..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 1955fbc66..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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=RSE DStore Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 368ee86fb..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/dsdp32.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 7af2847f3..000000000
--- a/rse/features/org.eclipse.rse.dstore-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 - DSDP
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 8ca51aede..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Experimental Eclipse Filesystem (EFS) Provider
-
-# "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.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-tmMilestoneSiteName=Target Management 2.0 Milestone Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2007 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 ####################################
-
-# "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 62b96dc88..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/feature.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.efs"
- label="%featureName"
- version="2.0.0.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="%tmMilestoneSiteName" url="http://download.eclipse.org/dsdp/tm/updates/milestones"/>
- </url>
-
- <requires>
- <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"/>
- <!-- Feature dependency due to bug 175004 (UM doesnt use plugins for "Select Required" -->
- <!-- But take care of bug 154505 (UM "Select Required" selects container features) -->
- <import feature="org.eclipse.rse.core" version="2.0.0" match="compatible"/>
- </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 9cfe215d9..000000000
--- a/rse/features/org.eclipse.rse.efs-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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=Remote System Explorer Experimental Eclipse Filesystem (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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 bf2815ad1..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/feature.properties
+++ /dev/null
@@ -1,143 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE FTP Service
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 Symbian Software Ltd. 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(TM) 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 f50f3cf92..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/feature.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.ftp"
- label="%featureName"
- version="3.0.101.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.console"/>
- <import plugin="org.apache.commons.net" version="2.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.apache.commons.net"
- download-size="73"
- install-size="208"
- version="0.0.0"
- unpack="false"/>
-
- <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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 631a15d9a..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 Service Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 Symbian Software Ltd. 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(TM) 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/feature.xml b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.xml
deleted file mode 100644
index 04550b441..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplateFeature/feature.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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 id="org.eclipse.rse.ftp.source" version="3.0.100.qualifier" label="%featureName" provider-name="%providerName" plugin="org.eclipse.rse.services.files.ftp.source">
- <description >
- %description
- </description>
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
- <license url="%licenseURL">
- %license
- </license>
- <url>
- <update url="http://download.eclipse.org/dsdp/tm/updates/3.0" label="%tmUpdateSiteName"/>
- <discovery url="http://download.eclipse.org/dsdp/tm/updates/3.0" label="%tmUpdateSiteName"/>
- </url>
- <plugin id="org.apache.commons.net.source" version="0.0.0" download-size="189" install-size="325" unpack="false" />
- <plugin id="org.eclipse.rse.services.files.ftp.source" version="0.0.0" download-size="0" install-size="0" unpack="false"/>
- <plugin id="org.eclipse.rse.subsystems.files.ftp.source" version="0.0.0" download-size="0" install-size="0" unpack="false"/>
-</feature>
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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 40a68c561..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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=RSE FTP Service Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Symbian Software Ltd. and others 2000, 2009. 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 368ee86fb..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/dsdp32.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 1edcde1af..000000000
--- a/rse/features/org.eclipse.rse.ftp-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 Service Source
-providerName=Eclipse.org - DSDP
diff --git a/rse/features/org.eclipse.rse.ftp-patch/.project b/rse/features/org.eclipse.rse.ftp-patch/.project
deleted file mode 100644
index 5052d5d0b..000000000
--- a/rse/features/org.eclipse.rse.ftp-patch/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.ftp-patch</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-patch/build.properties b/rse/features/org.eclipse.rse.ftp-patch/build.properties
deleted file mode 100644
index 8ed560ec8..000000000
--- a/rse/features/org.eclipse.rse.ftp-patch/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-patch/epl-v10.html b/rse/features/org.eclipse.rse.ftp-patch/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.ftp-patch/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.ftp-patch/feature.properties b/rse/features/org.eclipse.rse.ftp-patch/feature.properties
deleted file mode 100644
index 858bda5d6..000000000
--- a/rse/features/org.eclipse.rse.ftp-patch/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE FTP Service 2.0.0 patch (bug:194204)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=\
-This patch addresses bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=194204 \n\
-(moving files on an FTP server during a rename operation).\n\
-This patch is included in TM 2.0.0.1.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2007 Symbian Software Ltd. 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(TM) 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-patch/feature.xml b/rse/features/org.eclipse.rse.ftp-patch/feature.xml
deleted file mode 100644
index 73c40ee3f..000000000
--- a/rse/features/org.eclipse.rse.ftp-patch/feature.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.rse.ftp.patch"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import feature="org.eclipse.rse.ftp" version="2.0.0.v20070609-77378_kE77Y7U9K5G7A" patch="true"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.services.files.ftp"
- download-size="11"
- install-size="18"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.ftp-patch/license.html b/rse/features/org.eclipse.rse.ftp-patch/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.ftp-patch/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/.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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.local-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 b3c5fa79a..000000000
--- a/rse/features/org.eclipse.rse.local-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE Local Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 697254c86..000000000
--- a/rse/features/org.eclipse.rse.local-feature/feature.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.local"
- label="%featureName"
- version="2.1.101.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.processes.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- </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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 1279baec5..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,143 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 57b5fd0a9..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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=RSE Local Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 368ee86fb..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/dsdp32.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 bb735fbc8..000000000
--- a/rse/features/org.eclipse.rse.local-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 - DSDP
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 3efa5635b..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.remotecdt-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.remotecdt-feature/README.txt b/rse/features/org.eclipse.rse.remotecdt-feature/README.txt
deleted file mode 100644
index cee117f2a..000000000
--- a/rse/features/org.eclipse.rse.remotecdt-feature/README.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-As of RSE 3.1m7 (May 1, 2009), the remotecdt integration has moved into CDT. Get it from
-
-Repository: :pserver:anonymous@dev.eclipse.org:/cvsroot/tools
-Module: org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote
diff --git a/rse/features/org.eclipse.rse.remotecdt.wrapper-feature/.project b/rse/features/org.eclipse.rse.remotecdt.wrapper-feature/.project
deleted file mode 100644
index d4ce7251a..000000000
--- a/rse/features/org.eclipse.rse.remotecdt.wrapper-feature/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.remotecdt.wrapper-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/features/org.eclipse.rse.remotecdt.wrapper-feature/README.txt b/rse/features/org.eclipse.rse.remotecdt.wrapper-feature/README.txt
deleted file mode 100644
index cee117f2a..000000000
--- a/rse/features/org.eclipse.rse.remotecdt.wrapper-feature/README.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-As of RSE 3.1m7 (May 1, 2009), the remotecdt integration has moved into CDT. Get it from
-
-Repository: :pserver:anonymous@dev.eclipse.org:/cvsroot/tools
-Module: org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote
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 4e25b4191..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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.eclipse.rse.core.source=org.eclipse.rse.core,exclude@org.eclipse.rse.doc.user
-generate.feature@org.eclipse.rse.dstore.source=org.eclipse.rse.dstore
-generate.feature@org.eclipse.rse.ftp.source=org.eclipse.rse.ftp
-generate.feature@org.eclipse.rse.local.source=org.eclipse.rse.local
-generate.feature@org.eclipse.rse.ssh.source=org.eclipse.rse.ssh
-generate.feature@org.eclipse.rse.telnet.source=org.eclipse.rse.telnet
-generate.feature@org.eclipse.rse.terminals.source=org.eclipse.rse.terminals
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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 9271ba811..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer Extender SDK
-
-# "description" property - description of the feature
-description=Install this if you plan to develop applications or tools \
-based on RSE. This SDK contains runtimes, documentation and sources \
-for the core RSE frameworks, SSH, FTP or dstore protocols.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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 b70fcd521..000000000
--- a/rse/features/org.eclipse.rse.sdk-feature/feature.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.sdk"
- label="%featureName"
- version="3.2.0.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.rse"
- 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"/>
-
- <includes
- id="org.eclipse.rse.telnet.source"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.rse.terminals.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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 cc0ec4bd1..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/feature.properties
+++ /dev/null
@@ -1,140 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE SSH Services
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 1db1d4d79..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/feature.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.ssh"
- label="%featureName"
- version="3.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="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.jsch.core" version="1.0.0" match="compatible"/>
- <import plugin="com.jcraft.jsch" version="0.1.31" match="compatible"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services" version="3.1.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- </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 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 fe5a3721e..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 bcba2d958..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=RSE SSH Services Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2006, 2009. 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 368ee86fb..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/dsdp32.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 4eb8ae692..000000000
--- a/rse/features/org.eclipse.rse.ssh-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 - DSDP
diff --git a/rse/features/org.eclipse.rse.telnet-feature/.project b/rse/features/org.eclipse.rse.telnet-feature/.project
deleted file mode 100644
index 876159d97..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.telnet-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.telnet-feature/build.properties b/rse/features/org.eclipse.rse.telnet-feature/build.properties
deleted file mode 100644
index 5170fa30b..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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.telnet-feature/epl-v10.html b/rse/features/org.eclipse.rse.telnet-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.telnet-feature/feature.properties b/rse/features/org.eclipse.rse.telnet-feature/feature.properties
deleted file mode 100644
index f256a5acd..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/feature.properties
+++ /dev/null
@@ -1,143 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE Telnet Service
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=The Remote System Explorer (RSE) telnet feature contains \
-a shell subsystem implementation communicating via the telnet protocol.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 Celunite, 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\
-\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(TM) 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.telnet-feature/feature.xml b/rse/features/org.eclipse.rse.telnet-feature/feature.xml
deleted file mode 100644
index a280a7f5d..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/feature.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.telnet"
- label="%featureName"
- version="2.2.1.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.telnet">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services" version="3.1.0" match="compatible"/>
- <import plugin="org.eclipse.rse.shells.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.apache.commons.net"
- download-size="73"
- install-size="208"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.connectorservice.telnet"
- download-size="10"
- install-size="21"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.services.telnet"
- download-size="14"
- install-size="23"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.shells.telnet"
- download-size="7"
- install-size="14"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.telnet-feature/license.html b/rse/features/org.eclipse.rse.telnet-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.telnet-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.telnet-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 85e3e6e69..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 Telnet Service Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=The Remote System Explorer (RSE) telnet feature contains \
-a shell subsystem implementation communicating via the telnet protocol.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 Celunite, 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\
-\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(TM) 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.telnet-feature/sourceTemplateFeature/feature.xml b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.xml
deleted file mode 100644
index f4676153e..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/feature.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.telnet.source"
- label="%featureName"
- version="2.1.100.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.services.telnet.source">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <plugin
- id="org.apache.commons.net.source"
- download-size="189"
- install-size="325"
- version="0.0.0"
- unpack="false"/>
-
- <plugin id="org.eclipse.rse.connectorservice.telnet.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
- <plugin id="org.eclipse.rse.services.telnet.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
- <plugin id="org.eclipse.rse.subsystems.shells.telnet.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.telnet-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.telnet-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/rse/features/org.eclipse.rse.telnet-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 5, 2007</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.telnet-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/features/org.eclipse.rse.telnet-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=dsdp32.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.telnet-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.telnet-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.telnet-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 4637dc348..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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=RSE Telnet Service Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Celunite, Inc. and others 2000, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
-
diff --git a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 368ee86fb..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 1f96ba7cd..000000000
--- a/rse/features/org.eclipse.rse.telnet-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 Telnet Service Source
-providerName=Eclipse.org - DSDP
diff --git a/rse/features/org.eclipse.rse.terminals-feature/.project b/rse/features/org.eclipse.rse.terminals-feature/.project
deleted file mode 100644
index 568aec99d..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.terminals-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.terminals-feature/build.properties b/rse/features/org.eclipse.rse.terminals-feature/build.properties
deleted file mode 100644
index 45ee56b37..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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
- \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.terminals-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.terminals-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.terminals-feature/epl-v10.html b/rse/features/org.eclipse.rse.terminals-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.terminals-feature/feature.properties b/rse/features/org.eclipse.rse.terminals-feature/feature.properties
deleted file mode 100644
index 6cc7968eb..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/feature.properties
+++ /dev/null
@@ -1,139 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE Terminals UI
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A Terminal View Integration for RSE Shell and Terminal Services. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2002, 2009 MontaVista Software, 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(TM) 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.terminals-feature/feature.xml b/rse/features/org.eclipse.rse.terminals-feature/feature.xml
deleted file mode 100644
index 8f7035f79..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/feature.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.terminals"
- label="%featureName"
- version="1.0.100.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.terminals.ui"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.tm.terminal"
- version="0.0.0"
- search-location="self"/>
-
- <requires>
- <import plugin="org.eclipse.core.expressions"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.rse.services" version="3.1.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services.ssh" version="3.0.0" match="equivalent"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.1.0" match="compatible"/>
- <import plugin="org.eclipse.rse.connectorservice.ssh" version="2.1.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.subsystems.terminals.core"
- download-size="7"
- install-size="15"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.terminals.ssh"
- download-size="7"
- install-size="11"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.terminals.ui"
- download-size="24"
- install-size="51"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.terminals-feature/license.html b/rse/features/org.eclipse.rse.terminals-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.terminals-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.terminals-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index daa86fae8..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# 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 Terminals UI Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A Terminal View Integration for RSE Shell and Terminal Services.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2002, 2009 MontaVista Software, 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(TM) 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.terminals-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.terminals-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.terminals-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index aa029c699..000000000
--- a/rse/features/org.eclipse.rse.terminals-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>March 27, 2008</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.terminals-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/features/org.eclipse.rse.terminals-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=dsdp32.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.terminals-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.terminals-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.terminals-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index f3d2801cc..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# 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=RSE Terminals UI Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright MontaVista Software, Inc. and others 2002, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 377be2b46..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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 = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index c2d48ccb1..000000000
--- a/rse/features/org.eclipse.rse.terminals-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE Terminals UI Source
-providerName=Eclipse.org - DSDP
diff --git a/rse/features/org.eclipse.rse.useractions-feature/.project b/rse/features/org.eclipse.rse.useractions-feature/.project
deleted file mode 100644
index 8802e889a..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.useractions-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.useractions-feature/build.properties b/rse/features/org.eclipse.rse.useractions-feature/build.properties
deleted file mode 100644
index 811666a55..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - Adapted from rse.dstore-feature
-###############################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html,\
- eclipse_update_120.jpg
-generate.plugin@org.eclipse.rse.useractions.source=org.eclipse.rse.useractions
diff --git a/rse/features/org.eclipse.rse.useractions-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.useractions-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.useractions-feature/epl-v10.html b/rse/features/org.eclipse.rse.useractions-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.useractions-feature/feature.properties b/rse/features/org.eclipse.rse.useractions-feature/feature.properties
deleted file mode 100644
index d3049e15f..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/feature.properties
+++ /dev/null
@@ -1,140 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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) - ongoing maintenance
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer User Actions
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A framework for contributing user-defined actions and compile commands to RSE.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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.useractions-feature/feature.xml b/rse/features/org.eclipse.rse.useractions-feature/feature.xml
deleted file mode 100644
index 0a8fa03f2..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/feature.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.useractions"
- label="%featureName"
- version="1.1.100.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.useractions"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.shells.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.useractions"
- download-size="105"
- install-size="339"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.useractions.source"
- download-size="281"
- install-size="284"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.useractions-feature/license.html b/rse/features/org.eclipse.rse.useractions-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.useractions-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.useractions-feature/sourceTemplateFeature/epl-v10.html b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/feature.properties b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 4bc2b9f56..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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) - adapted from rse.dstore-feature
-###############################################################################
-# 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 User Actions Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A framework for contributing user-defined actions and compile commands to RSE.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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.useractions-feature/sourceTemplateFeature/license.html b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.useractions-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.useractions-feature/sourceTemplatePlugin/about.html b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/rse/features/org.eclipse.rse.useractions-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 5, 2007</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.useractions-feature/sourceTemplatePlugin/about.ini b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/features/org.eclipse.rse.useractions-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=dsdp32.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.useractions-feature/sourceTemplatePlugin/about.mappings b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/features/org.eclipse.rse.useractions-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.useractions-feature/sourceTemplatePlugin/about.properties b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 9a685a0f9..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Adapted from rse.dstore-feature
-###############################################################################
-# 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 User Actions Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/build.properties b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 135359553..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Adapted from rse.dstore-feature
-###############################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/dsdp32.png b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties b/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 74eb0405f..000000000
--- a/rse/features/org.eclipse.rse.useractions-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - Adapted from rse.dstore-feature
-###############################################################################
-pluginName=Remote System Explorer User Actions Source
-providerName=Eclipse.org - DSDP
diff --git a/rse/features/org.eclipse.rse.useractions.wrapper-feature/.project b/rse/features/org.eclipse.rse.useractions.wrapper-feature/.project
deleted file mode 100644
index 133e1bb61..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.useractions.wrapper-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.useractions.wrapper-feature/build.properties b/rse/features/org.eclipse.rse.useractions.wrapper-feature/build.properties
deleted file mode 100644
index 62a9c8dfa..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-feature/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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) - Adapted from rse.dstore-feature
-###############################################################################
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html
-generate.plugin@org.eclipse.rse.useractions.source=org.eclipse.rse.useractions
- \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.useractions.wrapper-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.useractions.wrapper-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.useractions.wrapper-feature/epl-v10.html b/rse/features/org.eclipse.rse.useractions.wrapper-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.properties b/rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.properties
deleted file mode 100644
index b895001f1..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.properties
+++ /dev/null
@@ -1,140 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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) - ongoing maintenance
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=Remote System Explorer User Actions (Ganymede Install)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A framework for contributing user-defined actions and compile commands to RSE.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 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(TM) 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.useractions.wrapper-feature/feature.xml b/rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.xml
deleted file mode 100644
index ce95ab8f9..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-feature/feature.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2008 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
- id="org.eclipse.rse.useractions.wrapper"
- label="%featureName"
- version="1.1.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.useractions"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.rse.useractions"
- version="0.0.0"
- search-location="both"/>
-
- <requires>
- <import feature="org.eclipse.rse" version="3.0.0.qualifier" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.useractions"
- download-size="105"
- install-size="339"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.useractions.source"
- download-size="281"
- install-size="284"
- version="0.0.0"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.useractions.wrapper-feature/license.html b/rse/features/org.eclipse.rse.useractions.wrapper-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.useractions.wrapper-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.wince.wrapper-feature/.project b/rse/features/org.eclipse.rse.wince.wrapper-feature/.project
deleted file mode 100644
index 9e9c0d6b2..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.wince.wrapper-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.wince.wrapper-feature/build.properties b/rse/features/org.eclipse.rse.wince.wrapper-feature/build.properties
deleted file mode 100644
index c7c456cfd..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-feature/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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.wince.source=org.eclipse.rse.wince
- \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.wince.wrapper-feature/eclipse_update_120.jpg b/rse/features/org.eclipse.rse.wince.wrapper-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/rse/features/org.eclipse.rse.wince.wrapper-feature/epl-v10.html b/rse/features/org.eclipse.rse.wince.wrapper-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/features/org.eclipse.rse.wince.wrapper-feature/feature.properties b/rse/features/org.eclipse.rse.wince.wrapper-feature/feature.properties
deleted file mode 100644
index f34a3e374..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-feature/feature.properties
+++ /dev/null
@@ -1,140 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE WinCE Services (Incubation) (Ganymede Install)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=Windows CE connectivity services for the Remote System Explorer (RSE). \
-Requires Microsoft RAPI libraries installed. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2009 Radoslav Gerganov 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(TM) 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.wince.wrapper-feature/feature.xml b/rse/features/org.eclipse.rse.wince.wrapper-feature/feature.xml
deleted file mode 100644
index cb842fa83..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-feature/feature.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2008 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
- id="org.eclipse.rse.wince.wrapper"
- label="%featureName"
- version="0.1.1.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.subsystems.wince"
- os="win32"
- arch="x86"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.rse.wince"
- version="0.0.0"/>
-
- <requires>
- <import feature="org.eclipse.rse.core" version="3.0.0.qualifier" match="compatible"/>
- <import feature="org.eclipse.rse.ftp" version="3.0.0.qualifier" match="compatible"/>
- <import feature="org.eclipse.rse.local" version="2.1.0.qualifier" match="compatible"/>
- <import feature="org.eclipse.rse.ssh" version="2.1.0.qualifier" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.subsystems.wince"
- download-size="20"
- install-size="40"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.rapi"
- download-size="14"
- install-size="26"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.wince.source"
- download-size="44"
- install-size="55"
- version="0.0.0"/>
-
-</feature>
diff --git a/rse/features/org.eclipse.rse.wince.wrapper-feature/license.html b/rse/features/org.eclipse.rse.wince.wrapper-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/rse/features/org.eclipse.rse.wince.wrapper-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/readme.txt b/rse/features/readme.txt
deleted file mode 100644
index b1491292b..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".
diff --git a/rse/plugins/org.eclipse.dstore.core/.classpath b/rse/plugins/org.eclipse.dstore.core/.classpath
deleted file mode 100644
index 045b0fcb3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/dstore/**"/>
- <accessrule kind="discouraged" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <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.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 5c7cd5c8a..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.dstore.core/.settings/.api_filters b/rse/plugins/org.eclipse.dstore.core/.settings/.api_filters
deleted file mode 100644
index f62b23f3c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.settings/.api_filters
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.dstore.core" version="2">
- <resource path="src/org/eclipse/dstore/core/server/ServerLogger.java" type="org.eclipse.dstore.core.server.ServerLogger">
- <filter id="389242988">
- <message_arguments>
- <message_argument value="org.eclipse.dstore.core.server.ServerLogger"/>
- <message_argument value="DEBUG"/>
- <message_argument value="0"/>
- </message_arguments>
- </filter>
- <filter id="388055101">
- <message_arguments>
- <message_argument value="org.eclipse.dstore.core.server.ServerLogger"/>
- <message_argument value="DEBUG"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 d969f9e4f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dstore.core
-Bundle-Version: 3.1.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;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.ui.views
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.dstore.core,
- org.eclipse.dstore.core.client,
- org.eclipse.dstore.core.java,
- org.eclipse.dstore.core.miners,
- org.eclipse.dstore.core.model,
- org.eclipse.dstore.core.server,
- org.eclipse.dstore.core.util,
- org.eclipse.dstore.core.util.ssl,
- org.eclipse.dstore.internal.core.client;x-internal:=true,
- org.eclipse.dstore.internal.core.model;x-internal:=true,
- org.eclipse.dstore.internal.core.server;x-internal:=true,
- org.eclipse.dstore.internal.core.util;x-internal:=true,
- org.eclipse.dstore.internal.core.util.ssl;x-internal:=true
-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 d4cc693f9..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 5, 2007</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 501100bf1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 e7af340f3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Core
-providerName = Eclipse.org - DSDP
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/ClientConnection.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ClientConnection.java
deleted file mode 100644
index d80abec63..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, 2009 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:
- * David McKnight (IBM) - [205986] daemon handshake needs a timeout
- * David McKnight (IBM) - [218685] [dstore] Unable to connect when using SSL.
- * Martin Oberhuber (Wind River) - [219260][dstore][regression] Cannot connect to dstore daemon
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) [235284] Cancel password change causes problem
- * David McKnight (IBM) - [257321] [dstore] "Error binding socket" should include port of the failed socket
- *******************************************************************************/
-
-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.IDataStoreCompatibilityHandler;
-import org.eclipse.dstore.core.model.IDataStoreConstants;
-import org.eclipse.dstore.core.model.IExternalLoader;
-import org.eclipse.dstore.core.model.ISSLProperties;
-import org.eclipse.dstore.core.server.ServerLauncher;
-import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
-import org.eclipse.dstore.extra.IDomainNotifier;
-import org.eclipse.dstore.internal.core.client.ClientAttributes;
-import org.eclipse.dstore.internal.core.client.ClientCommandHandler;
-import org.eclipse.dstore.internal.core.client.ClientReceiver;
-import org.eclipse.dstore.internal.core.client.ClientUpdateHandler;
-import org.eclipse.dstore.internal.core.server.ServerCommandHandler;
-import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
-import org.eclipse.dstore.internal.core.util.ExternalLoader;
-import org.eclipse.dstore.internal.core.util.Sender;
-import org.eclipse.dstore.internal.core.util.ssl.DStoreSSLContext;
-import org.eclipse.dstore.internal.core.util.ssl.DataStoreTrustManager;
-import org.eclipse.dstore.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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- *
- */
-public class ClientConnection
-{
- private ClientAttributes _clientAttributes;
-
- private Socket _theSocket;
- private boolean _isConnected = false;
- private boolean _isRemote = false;
- private DataStore _dataStore;
- private IDomainNotifier _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;
-
- // changed these to final since they are constants (that don't change)
- public final static String INCOMPATIBLE_SERVER_UPDATE = "Incompatible DataStore."; //$NON-NLS-1$
- public final static String INCOMPATIBLE_CLIENT_UPDATE = "Incompatible DataStore."; //$NON-NLS-1$
- public final static String SERVER_OLDER = "Older DataStore Server."; //$NON-NLS-1$
- public final static String CLIENT_OLDER = "Older DataStore Client."; //$NON-NLS-1$
- public final static String INCOMPATIBLE_PROTOCOL = "Incompatible Protocol."; //$NON-NLS-1$
- public final static String CANNOT_CONNECT = "Cannot connect to server."; //$NON-NLS-1$
-
- // TODO: should probably make this a public constant in 3.1
- private final static String INVALID_DAEMON_PORT_NUMBER = "Invalid daemon port number."; //$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
- * @since 3.0 changed DomainNotifier into IDomainNotifier
- */
- public ClientConnection(String name, IDomainNotifier 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
- * @since 3.0 changed DomainNotifier into IDomainNotifier
- */
- public ClientConnection(String name, IDomainNotifier 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);
- }
-
- /**
- * @since 3.0 changed DataStoreCompatibilityHandler into
- * IDataStoreCompatibilityHandler
- */
- public void setCompatibilityHandler(IDataStoreCompatibilityHandler handler){
- _dataStore.setCompatibilityHandler(handler);
- }
-
- /**
- * @since 3.0 changed DataStoreCompatibilityHandler into
- * IDataStoreCompatibilityHandler
- */
- public IDataStoreCompatibilityHandler getCompatibilityHandler(){
- return _dataStore.getCompatibilityHandler();
- }
-
- /**
- * 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
- * @since 3.0 changed ExternalLoader into IExternalLoader
- */
- public void addLoader(IExternalLoader 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.removeDataStorePreferenceListener(_receiver);
- _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());
- }
-
- /**
- * @since 3.0 changed DataStoreTrustManager into IDataStoreTrustManager
- */
- public IDataStoreTrustManager 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();
- IDataStoreTrustManager 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 IDataStoreCompatibilityHandler.HANDSHAKE_CORRECT:
- result = doConnect(ticket);
- break;
- case IDataStoreCompatibilityHandler.HANDSHAKE_SERVER_RECENT_NEWER:
- result = doConnect(ticket);
- result.setMessage(CLIENT_OLDER);
- break;
- case IDataStoreCompatibilityHandler.HANDSHAKE_SERVER_RECENT_OLDER:
- result = doConnect(ticket);
- result.setMessage(SERVER_OLDER);
- break;
- case IDataStoreCompatibilityHandler.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 IDataStoreCompatibilityHandler.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 IDataStoreCompatibilityHandler.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 IDataStoreCompatibilityHandler.HANDSHAKE_UNEXPECTED:
- {
- msg = CANNOT_CONNECT;
- msg += "Unexpected exception."; //$NON-NLS-1$
- break;
- }
- case IDataStoreCompatibilityHandler.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);
- _dataStore.addDataStorePreferenceListener(_receiver);
- _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 4075
- 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)
- {
- if (timeout<=0) {
- //bug 219260: default timeout 10 sec if not specified
- timeout = 10000;
- }
- ConnectionStatus result = connectDaemon(daemonPort, timeout);
- if (!result.isConnected()) {
- return result;
- }
- try
- {
- PrintWriter writer = null;
- BufferedReader reader = null;
-
- // create output stream for server launcher
- try
- {
- 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(IDataStoreConstants.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
- * @since 3.0
- */
- public ConnectionStatus connectDaemon(int daemonPort, int timeout) {
- ConnectionStatus result = new ConnectionStatus(true);
- try
- {
- _launchSocket = null;
- if (_dataStore.usingSSL())
- {
- try
- {
- String location = _dataStore.getKeyStoreLocation();
- String pw = _dataStore.getKeyStorePassword();
- IDataStoreTrustManager mgr = getTrustManager();
- SSLContext context = DStoreSSLContext.getClientSSLContext(location, pw, mgr);
-
- try
- {
- SocketFactory factory = context.getSocketFactory();
- SSLSocket lSocket = (SSLSocket) factory.createSocket(_host, daemonPort);
- _launchSocket = lSocket;
-
- if (timeout > 0) {
- _launchSocket.setSoTimeout(timeout);
- }
- 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();
- }
- if (daemonPort <= 0 || daemonPort > 65535) {
- result = new ConnectionStatus(false, INVALID_DAEMON_PORT_NUMBER);
- } else {
- result = new ConnectionStatus(false, e);
- }
- return result;
- }
- }
- catch (Exception e)
- {
- result = new ConnectionStatus(false, e);
- return result;
- }
- }
- else
- {
- _launchSocket = new Socket(_host, daemonPort);
- if (timeout > 0) {
- _launchSocket.setSoTimeout(timeout);
- }
- }
- }
- 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 (IllegalArgumentException e) {
- result = new ConnectionStatus(false, INVALID_DAEMON_PORT_NUMBER);
- }
- 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 IDataStoreCompatibilityHandler.HANDSHAKE_TIMEOUT;
- }
- _theSocket.setSoTimeout(0);
-
- String[] serverVersionStr = handshake.split("\\."); //$NON-NLS-1$
- int serverVersion = Integer.parseInt(serverVersionStr[IDataStoreCompatibilityHandler.VERSION_INDEX_VERSION]);
- _dataStore.setServerVersion(serverVersion);
- _dataStore.setServerMinor(Integer.parseInt(serverVersionStr[IDataStoreCompatibilityHandler.VERSION_INDEX_MINOR]));
-
- return getCompatibilityHandler().checkCompatibility(handshake);
- }
- catch (Exception e)
- {
- return IDataStoreCompatibilityHandler.HANDSHAKE_UNEXPECTED;
- }
-
- }
-
- public boolean isKnownStatus(String status)
- {
- boolean known = status.equals(IDataStoreConstants.CONNECTED) ||
- status.equals(IDataStoreConstants.AUTHENTICATION_FAILED) ||
- status.equals(IDataStoreConstants.UNKNOWN_PROBLEM) ||
- status.startsWith(IDataStoreConstants.SERVER_FAILURE) ||
- status.equals(IDataStoreConstants.PASSWORD_EXPIRED) ||
- status.equals(IDataStoreConstants.NEW_PASSWORD_INVALID);
-
- if (!known){ // check for bind error
- known = status.startsWith(ServerReturnCodes.RC_BIND_ERROR);
- }
- return known;
- }
-}
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 a0659b544..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/client/ConnectionStatus.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 3c811eab3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandler.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-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>
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 8930b41bf..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassByteStreamHandlerRegistry.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.util.HashMap;
-
-import org.eclipse.dstore.core.model.DataStoreResources;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 42796543b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassInstanceOutputStream.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 9c586cc16..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/ClassRequest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-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
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 6c7be3436..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IClassByteStreamHandler.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2009 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:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-/**
- * <p>
- * The IClassByteStreamHandler interface is used to abstract file read and write
- * operations across the network.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 76b5890bc..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/IRemoteClassInstance.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.Serializable;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 5f85891df..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/LocalObjectInputStream.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-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;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 251878ae2..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteClassLoader.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
- *******************************************************************************/
-
-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
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class RemoteClassLoader extends ClassLoader
-{
- public final 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
- {
- // 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)
- {
- e.printStackTrace();
- }
- }
- }
-
- // 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)
- {
- e.printStackTrace();
- }
-
- // 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
- 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
- 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 {
- // remove the request so that if another one comes in for the
- // same thing it doesn't hang waiting for a response
- _dataStore.getClassRequestRepository().remove(className);
-
- 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)
- {
- //System.out.println("remote load of "+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 6dcb0697b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/java/RemoteObjectInputStream.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.dstore.core.java;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectStreamClass;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/Miner.java
deleted file mode 100644
index f444cbda0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/Miner.java
+++ /dev/null
@@ -1,694 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * Noriaki Takatsu (IBM) [229146] [multithread] changes to stop Miner threads when clients disconnect
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * David McKnight (IBM) - [232004] [dstore][multithread] some miner finish() is not terminated sometimes
- *******************************************************************************/
-
-package org.eclipse.dstore.core.miners;
-
-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.IExternalLoader;
-import org.eclipse.dstore.core.model.ISchemaExtender;
-import org.eclipse.dstore.core.server.SystemServiceManager;
-
-/**
- * Miner is the abstract 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.
- *
- * This class and its subclasses are not intended to be instantiated by clients.
- * The dstore server infrastructure will take care of loading the Miner.
- */
-public abstract class Miner extends Handler
-implements ISchemaExtender
-{
-
- public DataElement _minerElement;
- public DataElement _minerData;
- public DataElement _minerTransient;
-
-
-
- private boolean _initialized;
- private boolean _connected;
- private IExternalLoader _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.
- * <p>
- * Subclasses may override this method but must call
- * <code>super.finish()</code> at the end of their overriding method.
- */
- 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);
-
- super.finish();
- }
-
- /**
- * 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())
- {
- try
- {
- DataElement cmd = (DataElement)_commandQueue.remove(0);
- if (cmd != null){
- command(cmd);
- }
- }
- catch (Exception e){
- e.printStackTrace();
- }
- }
- }
-
- 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();
-
- if (SystemServiceManager.getInstance().getSystemService() == null)
- 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)
- {
- super.setDataStore(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(IExternalLoader loader)
- {
- _loader = loader;
- }
-
- public IExternalLoader 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) throws Exception;
-
-
- /**
- * Returns the version of this miner
- * The expected format for this is "<version>.<major>.<minor>"
- */
- public abstract String getVersion();
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java
deleted file mode 100644
index 79ff915fb..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/miners/MinerThread.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients
- * Noriaki Takatsu (IBM) [283656] [dstore][multithread] Serviceability issue
- *******************************************************************************/
-
-package org.eclipse.dstore.core.miners;
-
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.server.SecuredThread;
-
-/**
- * MinerThread is a utility class used for doing threaded operations in a miner.
- */
-public abstract class MinerThread extends SecuredThread
-{
-
- private volatile Thread minerThread;
- protected boolean _isCancelled;
-
- /**
- * Constructor
- */
- public MinerThread()
- {
- _isCancelled = false;
- }
-
-
- /**
- * Constructor with dataStore.
- *
- * @since 3.0
- */
- public MinerThread(DataStore dataStore)
- {
- super(dataStore);
- _isCancelled = false;
- }
-
- /**
- * stops the thread
- */
- public synchronized void stopThread()
- {
- if (minerThread != null)
- {
- _isCancelled = true;
-
- try
- {
- minerThread = null;
- }
- catch (Exception e)
- {
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
- }
- System.out.println(e);
- }
-
- }
- notify();
- }
-
- /**
- * runs the thread
- */
- public void run()
- {
- super.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)
- {
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), 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)
- {
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), 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();
-}
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 52a2db7b0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) [281712] [dstore] Warning message is needed when disk is full
- *******************************************************************************/
-
-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)
- {
- _dataStore.trace("Receiving Bytes for " + fileName); //$NON-NLS-1$
- 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);
- }
-
- fileStream.close();
- if (status == null)
- return;
- status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- catch (IOException e)
- {
- _dataStore.trace(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)
- {
- _dataStore.trace(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)
- {
- _dataStore.trace("Receiving Appended Bytes for " + fileName); //$NON-NLS-1$
- 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);
-
- 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);
- }
-
- outStream.close();
-
- }
- if (status == null)
- return;
- status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
- _dataStore.refresh(status.getParent());
- }
- catch (IOException e)
- {
- _dataStore.trace(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;
- }
-
-}
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 4ac32787b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandlerRegistry.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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/Client.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java
deleted file mode 100644
index 9c7ffee94..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Client.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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: Noriaki Takatsu and Masao Nishimoto
- *
- * Contributors:
- * Noriaki Takatsu (IBM) [220126] [dstore][api][breaking] Single process server for multiple clients
- * Jacob Garcowski (IBM) [225175] [dstore] [dstore] error handling change for Client
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import org.eclipse.dstore.core.server.IServerLogger;
-import org.eclipse.dstore.core.server.ServerReceiver;
-
-/**
- * A DStore Client representing a user's connection in the multi-process
- * dstore server.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 3.0
- */
-public class Client
-{
- public String _userid;
- private IServerLogger _logger;
- protected ServerReceiver _receiver;
-
- public void setUserid(String userid)
- {
- _userid = userid;
- }
-
- public String getUserid()
- {
- return _userid;
- }
-
- public void setLogger(IServerLogger logger)
- {
- _logger = logger;
- }
-
- public IServerLogger getLogger()
- {
- return _logger;
- }
-
- public String getProperty(String key)
- {
- return System.getProperty(key);
- }
-
- public void disconnectServerReceiver()
- {
- if (_receiver != null)
- _receiver.finish();
- }
-
- public void setServerReceiver(ServerReceiver receiver)
- {
- _receiver = receiver;
- }
-}
-
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 3a9e72e9d..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/CommandHandler.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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>
- * Abstract 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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-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();
- }
-
- /**
- * @since 3.0 CommandGenerator moved from "internal" to API
- */
- 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();
-}
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 0c9496282..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DE.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2008 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:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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.
- */
- 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$
-}
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 1feb25abb..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java
+++ /dev/null
@@ -1,1687 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.dstore.extra.IDataElement;
-import org.eclipse.dstore.internal.core.util.DataElementRemover;
-import org.eclipse.dstore.internal.extra.DataElementActionFilter;
-import org.eclipse.dstore.internal.extra.DesktopElement;
-import org.eclipse.dstore.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>
- *
- * @noinstantiate This class is not intended to be instantiated by clients. DataElements
- * should be created via the DataStore create methods.
- */
-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 = 1;
-
- _referencedObject = null;
- _isExpanded = false;
- _isUpdated = false;
-
- String depthStr = getAttribute(DE.A_DEPTH);
- if (depthStr != null && depthStr.length() > 0)
- {
- if (!depthStr.equals("1")) //$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)
- {
- if (_attributes == null)
- return ""; //$NON-NLS-1$
- 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 < 1 && buffer.length() > 0)
- {
- setDepth(1);
- }
-
- _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 = 1;
-
- _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; // commented out this null setting so that the children of this element can be properly deleted
- }
- }
-
- 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);
- }
- }
-}
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 1671059b6..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java
+++ /dev/null
@@ -1,4528 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - 146326 fixed erroneously disconnected dstore elements.
- * Michael Berger (IBM) - 145799 added refresh() method with depth parameter.
- * David McKnight (IBM) - 202822 findDeleted should not be synchronized
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [222168][dstore] Buffer in DataElement is not sent
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [227881] [dstore][threaded] There is no chance to set client object for getUserPreferencesDirectory()
- * Noriaki Takatsu (IBM) - [228156] [dstore] DataElementRemover thread doesn't terminate after a client disconnects the server
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * David McKnight (IBM) - [231639] [dstore] in single-process multi-client mode tracing shouldn't start until the client is set
- * Noriaki Takatsu (IBM) - [239073] [dstore] [multithread] In multithread, the cache jar should be assigned after the client is set
- * Noriaki Takatsu (IBM) - [245069] [dstore] dstoreTrace has no timestamp
- * David McKnight (IBM) - [282634] [dstore] IndexOutOfBoundsException on Disconnect
- * David McKnight (IBM) - [282599] [dstore] log folder that is not a hidden one
- * David McKnight (IBM) - [285151] [dstore] Potential threading problem in DataStore (open call)
- * David McKnight (IBM) - [285301] [dstore] 100% CPU if user does not have write access to $HOME
- * David McKnight (IBM) - [287457] [dstore] problems with disconnect when readonly trace file
- * David McKnight (IBM) - [289891] [dstore] StringIndexOutOfBoundsException in getUserPreferencesDirectory when DSTORE_LOG_DIRECTORY is ""
- *******************************************************************************/
-
-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.server.SystemServiceManager;
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.dstore.extra.IDomainNotifier;
-import org.eclipse.dstore.internal.core.client.ClientCommandHandler;
-import org.eclipse.dstore.internal.core.model.DefaultByteConverter;
-import org.eclipse.dstore.internal.core.server.ServerUpdateHandler;
-import org.eclipse.dstore.internal.core.util.DataElementRemover;
-import org.eclipse.dstore.internal.core.util.XMLgenerator;
-import org.eclipse.dstore.internal.core.util.XMLparser;
-
-/**
- * <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>IDomainNotifier</code> or indirectly over the communication
- * layer through a client <code>DataStore</code>.
- * </p>
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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 IDomainNotifier _domainNotifier;
-
- private ArrayList _loaders;
- private ArrayList _minersLocations;
- private ArrayList _localClassLoaders;
- private HashMap _dataStorePreferences;
-
- private List _dataStorePreferenceListeners;
-
-
- private ISSLProperties _sslProperties;
-
- private boolean _autoRefresh;
-
- private boolean _isConnected;
- private boolean _logTimes;
- private int _timeout;
-
- private int _serverIdleShutdownTimeout = 0;
-
- 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 IDataStoreCompatibilityHandler _compatibilityHandler;
-
-
- 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;
- private Client _client;
-
- /**
- * 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
- * @since 3.0 replaced DomainNotifier with IDomainNotifier
- */
- public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, IDomainNotifier 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
- * @since 3.0 replaced DomainNotifier with IDomainNotifier
- */
- public DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, IDomainNotifier 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
- * @since 3.0 replaced ExternalLoader by IExternalLoader
- */
- public void addLoader(IExternalLoader 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 the properties to set
- */
- 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 IDomainNotifier
- *
- * @param domainNotifier the domainNotifier
- * @since 3.0 replaced DomainNotifier by IDomainNotifier
- */
- public void setDomainNotifier(IDomainNotifier 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;
- }
-
- /**
- * Set the compatibility handler for the client. This is used when potential
- * compatibility problems are run into - i.e. localDescriptorQuery fails
- *
- * @param handler the compatibilityHandler to use
- * @since 3.0
- */
- public void setCompatibilityHandler(IDataStoreCompatibilityHandler handler){
- _compatibilityHandler = handler;
- }
-
- /**
- * Get the compatibility handler for the client. This is used when potential
- * compatibility problems are run into - i.e. localDescriptorQuery fails
- *
- * @return the compatibilityHandler
- * @since 3.0
- */
- public IDataStoreCompatibilityHandler getCompatibilityHandler(){
- if (_compatibilityHandler == null){
- _compatibilityHandler = new DefaultDataStoreCompatibilityHandler(this);
- }
- return _compatibilityHandler;
- }
-
-
- /**
- * 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;
- }
-
- /**
- * Gets the time the server may remain idle before shutting down
- *
- * @return the idle time before shutdown
- * @since 3.0
- */
- public int getServerIdleShutdownTimeout()
- {
- return _serverIdleShutdownTimeout;
- }
-
- /**
- * 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.internal.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
- * @since 3.0 replaced DomainNotifier by IDomainNotifier
- */
- public IDomainNotifier 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);
- }
-
- synchronized (_hashMap)
- {
- _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);
- }
-
- synchronized(_hashMap)
- {
- _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);
- }
-
- synchronized (_hashMap)
- {
- _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);
- }
-
- /**
- * Sets a property value preference on the client and server datastore
- * @param property the property to set
- * @param value the value of the property
- */
- public void setPreference(String property, String value)
- {
- setPreference(property, value, true);
- }
-
- /**
- * Sets a property value preference on the client datastore. If
- * remoteAndLocal is set then the property get set on the server side as
- * well as the client.
- *
- * @param property the property to set
- * @param value the value of the property
- * @param remoteAndLocal whether to propagate the change to the server
- * @since 3.0
- */
- public void setPreference(String property, String value, boolean remoteAndLocal)
- {
- _dataStorePreferences.put(property, value);
- if (isVirtual() && remoteAndLocal)
- {
- 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);
- }
- }
-
- // notify that preferences have changed
- IDataStorePreferenceListener[] listeners = null;
- synchronized (_dataStorePreferenceListeners){
- listeners = (IDataStorePreferenceListener[])_dataStorePreferenceListeners.toArray(new IDataStorePreferenceListener[_dataStorePreferenceListeners.size()]);
- }
-
- for (int i = 0; i < listeners.length; i++){
- IDataStorePreferenceListener listener = listeners[i];
- listener.preferenceChanged(property, value);
- }
- }
-
- public String getPreference(String property)
- {
- return (String)_dataStorePreferences.get(property);
- }
-
- /**
- * Adds a preference change listener to the DataStore
- *
- * @param listener the listener to add
- * @since 3.0
- */
- public void addDataStorePreferenceListener(IDataStorePreferenceListener listener){
- synchronized (_dataStorePreferenceListeners){
- _dataStorePreferenceListeners.add(listener);
- }
- }
-
- /**
- * Removes a specific preference change listener from the Datastore
- *
- * @param listener the listener to remove
- * @since 3.0
- */
- public void removeDataStorePreferenceListener(IDataStorePreferenceListener listener){
- synchronized (_dataStorePreferenceListeners){
- _dataStorePreferenceListeners.remove(listener);
- }
- }
-
- /**
- * Removes all the preference change listeners
- * @since 3.0
- */
- public void removeAllDataStorePreferenceListeners(){
- synchronized (_dataStorePreferenceListeners){
- _dataStorePreferenceListeners.clear();
- }
- }
-
- /**
- * 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);
- flush(_descriptorRoot);
- flush(_dummy);
- flush(_root);
-
- }
-
- /**
- * 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;
- }
- }
- }
-
- getCompatibilityHandler().handleMissingCommand(descriptor, keyName);
- 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 List findDeleted(DataElement root)
- {
- return findDeleted(root, 10);
- }
-
- /**
- * Finds all the deleted elements
- *
- * @param root where to search from
- * @param depth the depth to search
- * @return a list of elements
- */
- public List findDeleted(DataElement root, int depth)
- {
- ArrayList results = new ArrayList();
-// synchronized (root)
- // synchronized can cause hang here..but may not be necessary anyway since
- // we're not adding or removing anything here
- {
- 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 buffer the contents of the class
- * @param size the size of the buffer
- * @param classbyteStreamHandlerId the id for the byte stream handler
- */
- 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) {
-
- String clientUserID;
- if (_client != null){
- _userPreferencesDirectory = _client.getProperty("user.home"); //$NON-NLS-1$
- clientUserID = _client.getProperty("client.username"); //$NON-NLS-1$
- }
- else {
- _userPreferencesDirectory = System.getProperty("user.home"); //$NON-NLS-1$
- 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;
- }
-
- // for bug 282599, log directory allows customization of log location relative to user dir
- String logDirectory = System.getProperty("DSTORE_LOG_DIRECTORY"); //$NON-NLS-1$
- if (logDirectory == null){
- logDirectory = ".eclipse" + File.separator + "RSE" + File.separator; //$NON-NLS-1$//$NON-NLS-2$
- }
- // append a '/' if not there
- if (logDirectory.length() > 0){
- if (logDirectory.charAt( logDirectory.length() -1 ) != File.separatorChar ) {
- logDirectory = logDirectory + File.separator;
- }
- }
-
- _userPreferencesDirectory = _userPreferencesDirectory + logDirectory + clientUserID;
-
- 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);
- _dataStorePreferenceListeners = new ArrayList();
-
- _hashMap = new HashMap(2 * _initialSize);
- _recycled = new ArrayList(_initialSize);
- initElements(_initialSize);
-
- _timeout = 20000;
- _autoRefresh = false;//true;
-
-
- _dataStoreSchema = new DataStoreSchema(this);
-
- if (!isVirtual())
- {
- // get the time the server can remain idle before automatically shutting down
- // if the idle is 0 or not set then it is considered indefinite.
- // The server is considered idle for the period of which no commands are
- // received in server command handler
- String serverIdleShutdownTimeout = System.getProperty("DSTORE_IDLE_SHUTDOWN_TIMEOUT"); //$NON-NLS-1$
- if (serverIdleShutdownTimeout != null)
- {
- _serverIdleShutdownTimeout = Integer.parseInt(serverIdleShutdownTimeout);
- }
-
- }
-
-
- 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)
- {
- // only start tracing now if we're in one process per server mode
- if (SystemServiceManager.getInstance().getSystemService() == null){
- 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();
-
- // only start tracing now if we're in one process per server mode
- if (SystemServiceManager.getInstance().getSystemService() == null){
- 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);
- synchronized (_hashMap)
- {
- _hashMap.remove(id);
- }
-
- if (!isConnected() && from != null)
- {
- from.removeNestedData(toDelete);
- }
- }
- }
-
- 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((new Date()).toString() + ": "); //$NON-NLS-1$
- _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
- //if (isVirtual())
- // flush();
- if (_deRemover != null){
- _deRemover.finish();
- }
-
- if (_tracingOn)
- {
- try
- {
- if (_traceFile != null){
- _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;
- if (!_cacheJar.canWrite()){ // can't write this..don't bother with cache
- _cacheJar = null;
- }
- }
-
- 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;
- }
-
- /**
- * @since 3.0
- */
- public int printTree(String indent, DataElement root)
- {
- return printTree(indent, 0, root);
- }
-
- /**
- * @since 3.0
- */
- public int printTree(String indent, int number, DataElement root)
- {
- int total = number;
- if (root != null)
- {
- total++;
- boolean isSpirit = root.isSpirit();
- boolean isDeleted = root.isDeleted();
- String prefix = "DataElement"; //$NON-NLS-1$
- if (isSpirit)
- prefix += "<spirit>"; //$NON-NLS-1$
- if (isDeleted)
- prefix += "<deleted>"; //$NON-NLS-1$
-
- String msg = indent + prefix + "["+ total + "]("+root.getType()+", "+root.getName()+")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- System.out.println(msg);
- for (int i = 0; i < root.getNestedSize(); i++)
- {
- DataElement currentElement = root.get(i);
- total = printTree(indent + " ", total, currentElement); //$NON-NLS-1$
- }
- }
- return total;
- }
-
- /**
- * Indicates that the datastore should transfer a DataElement's buffer
- * attribute in the communication layer
- *
- * @param flag true if the DataElement buffer attribute should be transfered
- * @since 3.0
- */
- public void setGenerateBuffer(boolean flag)
- {
- if (isVirtual())
- {
- // client side
- ((ClientCommandHandler)_commandHandler).setGenerateBuffer(flag);
- }
- else
- {
- // server side
- ((ServerUpdateHandler)_updateHandler).setGenerateBuffer(flag);
- }
- }
-
- /**
- * This method is used to set the Client object for each user. The _client
- * variable is null until setClient() is called. After _client is set, it
- * can not be changed.
- *
- * This method should only be called once to associate a particular client
- * with a DataStore. By default, the client for the user of the DataStore
- * process is set but, when there is an ISystemService, the daemon sets the
- * client.
- *
- * @param client the object of the Client class
- * @since 3.0
- */
- public void setClient(Client client)
- {
- // if client is not null, then this method gets called once.
- // subsequent calls will have no effect.
- if (_client == null){
- _client = client;
- _userPreferencesDirectory = null;
- String logDir = getUserPreferencesDirectory();
-
- // single process server?
- if (SystemServiceManager.getInstance().getSystemService() != null)
- {
- if (_tracingOn) {
- _traceFileHandle = new File(logDir, ".dstoreTrace"); //$NON-NLS-1$
- try
- {
- _traceFile = new RandomAccessFile(_traceFileHandle, "rw"); //$NON-NLS-1$
- startTracing();
- }
- catch (IOException e)
- {
- }
- }
- }
- assignCacheJar();
- }
- }
-
- /**
- * This method is used to get the object of the Client stored for each user.
- *
- * @return the object of the Client stored for each user
- * @since 3.0
- */
- public Client getClient()
- {
- return _client;
- }
-
-
-}
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 2a0fa21ab..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreAttributes.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - update version to 9.0.0
- * David McKnight (IBM) - [220892] version back to 8.1.0 since protocol hasn't changed
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-/**
- * This class is used to store attributes that are required for configuring a
- * remote connection.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class DataStoreAttributes
-{
- /**
- * Datastore Protocol Version. Current value = "DataStore.8.0.0". Will be
- * changed with protocol updates (which are only rarely necessary).
- */
- 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 b8a354fce..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreResources.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- **/
-public class DataStoreResources
-{
- public static final String model_Log_Root="Log Root"; //$NON-NLS-1$
- public static final String model_Tool_Root="Tool Root"; //$NON-NLS-1$
- public static final String model_Set="Set"; //$NON-NLS-1$
- public static final String model_Modify="Modify"; //$NON-NLS-1$
- public static final String model_timeout="timeout"; //$NON-NLS-1$
- public static final String model_data="data"; //$NON-NLS-1$
- public static final String model_transient="transient"; //$NON-NLS-1$
- public static final String model_all="all"; //$NON-NLS-1$
- public static final String model_host="host"; //$NON-NLS-1$
- public static final String model_root="root"; //$NON-NLS-1$
- public static final String model_descriptors="descriptors"; //$NON-NLS-1$
- public static final String model_descriptor_for="descriptor for"; //$NON-NLS-1$
- public static final String model_project="Project"; //$NON-NLS-1$
- public static final String model_log="log"; //$NON-NLS-1$
- public static final String model_deleted="deleted"; //$NON-NLS-1$
- public static final String model_status="status"; //$NON-NLS-1$
- public static final String model_start="start"; //$NON-NLS-1$
- public static final String model_failed="failed"; //$NON-NLS-1$
- public static final String model_done="done"; //$NON-NLS-1$
- public static final String model_working="working"; //$NON-NLS-1$
- public static final String model_progress="progress"; //$NON-NLS-1$
- public static final String model_error="error"; //$NON-NLS-1$
- public static final String model_warning="warning"; //$NON-NLS-1$
- public static final String model_informational="informational"; //$NON-NLS-1$
- public static final String model_markers="markers"; //$NON-NLS-1$
- public static final String model_invocation="invocation"; //$NON-NLS-1$
- public static final String model_pattern="pattern"; //$NON-NLS-1$
- public static final String model_input="input"; //$NON-NLS-1$
- public static final String model_output="output"; //$NON-NLS-1$
- public static final String model_details="details"; //$NON-NLS-1$
- public static final String model_contents="contents"; //$NON-NLS-1$
- public static final String model_contents_arguments="Contents and Arguments"; //$NON-NLS-1$
- public static final String model_parent="parent"; //$NON-NLS-1$
- public static final String model_arguments="arguments"; //$NON-NLS-1$
- public static final String model_Commands="Commands"; //$NON-NLS-1$
- public static final String model_device="device"; //$NON-NLS-1$
- public static final String model_directory="directory"; //$NON-NLS-1$
- public static final String model_folder="folder"; //$NON-NLS-1$
- public static final String model_file="file"; //$NON-NLS-1$
- public static final String model_Filesystem_Objects="Filesystem Objects"; //$NON-NLS-1$
- public static final String model_Container_Object="Container Object"; //$NON-NLS-1$
- public static final String model_Directories="Directories"; //$NON-NLS-1$
- public static final String model_Details="Details"; //$NON-NLS-1$
- public static final String model_miners="miners"; //$NON-NLS-1$
- public static final String model_miner="miner"; //$NON-NLS-1$
- public static final String model_state="state"; //$NON-NLS-1$
- public static final String model_ticket="ticket"; //$NON-NLS-1$
- public static final String model_valid="valid"; //$NON-NLS-1$
- public static final String model_invalid="invalid"; //$NON-NLS-1$
- public static final String model_abstracted_by="abstracted by"; //$NON-NLS-1$
- public static final String model_abstracts="abstracts"; //$NON-NLS-1$
- public static final String model_incomplete="incomplete"; //$NON-NLS-1$
- public static final String model_Miner_Details="Miner Details"; //$NON-NLS-1$
- public static final String model_Hosts="Hosts"; //$NON-NLS-1$
- public static final String model_Tools="Tools"; //$NON-NLS-1$
- public static final String model_Schema="Schema"; //$NON-NLS-1$
- public static final String model_Logged_Commands="Logged Commands"; //$NON-NLS-1$
- public static final String model_Cancel="Cancel"; //$NON-NLS-1$
- public static final String model_Get_Schema="Get Schema"; //$NON-NLS-1$
- public static final String model_Show_Ticket="Show Ticket"; //$NON-NLS-1$
- public static final String model_Init_Miners="Init Miners"; //$NON-NLS-1$
- public static final String model_Set_Host="Set Host"; //$NON-NLS-1$
- public static final String model_Exit="Exit"; //$NON-NLS-1$
- public static final String model_Connect_to="Connect to"; //$NON-NLS-1$
- public static final String model_Disconnect_from="Disconnect from"; //$NON-NLS-1$
- public static final String model_Delete_Connection="Delete Connection"; //$NON-NLS-1$
- public static final String model_time="time"; //$NON-NLS-1$
- public static final String model_property="property"; //$NON-NLS-1$
- public static final String model_start_time="start time"; //$NON-NLS-1$
- public static final String model_command_time="command time"; //$NON-NLS-1$
- public static final String model_Transient_Objects="Transient Objects"; //$NON-NLS-1$
- public static final String model_Data="Data"; //$NON-NLS-1$
- public static final String model_No_input="No input"; //$NON-NLS-1$
- public static final String model_Open="Open"; //$NON-NLS-1$
- public static final String model_Close="Close"; //$NON-NLS-1$
- public static final String model_Refresh="Refresh"; //$NON-NLS-1$
- public static final String model_Query="Query"; //$NON-NLS-1$
- public static final String model_Cancellable="Cancellable"; //$NON-NLS-1$
-
- public static final String SERIALIZED_TYPE="SERIALIZED"; //$NON-NLS-1$
- public static final String CLASS_TYPE="CLASS"; //$NON-NLS-1$
- public static final String REQUEST_CLASS_TYPE="REQUEST_CLASS"; //$NON-NLS-1$
- public static final String DEFAULT_CLASSBYTESTREAMHANDLER="default"; //$NON-NLS-1$
- public static final String FILE_TYPE="FILE"; //$NON-NLS-1$
- public static final String DOCUMENT_TYPE="DOCUMENT"; //$NON-NLS-1$
- public static final String DEFAULT_BYTESTREAMHANDLER="default"; //$NON-NLS-1$
- public static final String TRUE="true"; //$NON-NLS-1$
- public static final String FALSE="false"; //$NON-NLS-1$
- public static final String DELETED="deleted"; //$NON-NLS-1$
- public static final String KEEPALIVE_TYPE="KEEPALIVE"; //$NON-NLS-1$
- public static final String KEEPALIVECONFIRM_TYPE="CONFIRMKEEPALIVE"; //$NON-NLS-1$
- public static final String REFERENCE="reference"; //$NON-NLS-1$
- public static final String VALUE="value"; //$NON-NLS-1$
- public static final String SPIRIT="spirit"; //$NON-NLS-1$
-}
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 711aa463e..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStoreSchema.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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/DefaultDataStoreCompatibilityHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java
deleted file mode 100644
index 730283781..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DefaultDataStoreCompatibilityHandler.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients
- ********************************************************************************/
-package org.eclipse.dstore.core.model;
-
-/**
- * @since 3.0
- */
-public class DefaultDataStoreCompatibilityHandler implements
- IDataStoreCompatibilityHandler {
- private DataStore _dataStore;
-
- public DefaultDataStoreCompatibilityHandler(DataStore dataStore){
- _dataStore = dataStore;
- }
-
- public int checkCompatibility(String handshake){
-
- String[] clientVersionStr = DataStoreAttributes.DATASTORE_VERSION.split("\\."); //$NON-NLS-1$
- String[] serverVersionStr = handshake.split("\\."); //$NON-NLS-1$
-
- int clientVersion = Integer.parseInt(clientVersionStr[VERSION_INDEX_VERSION]);
- int serverVersion = Integer.parseInt(serverVersionStr[VERSION_INDEX_VERSION]);
-
- 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 (serverVersion == clientVersion)
- {
- // major versions match so should be compatible
- return HANDSHAKE_CORRECT;
- }
- else
- {
- if (serverVersion > clientVersion)
- {
- // newer server
- if (serverVersion - 1 == clientVersion)
- {
- return HANDSHAKE_SERVER_RECENT_NEWER;
- }
- else
- {
- return HANDSHAKE_SERVER_NEWER;
- }
- }
- else
- {
- // newer client
- if (serverVersion + 1 == clientVersion)
- {
- return HANDSHAKE_SERVER_RECENT_OLDER;
- }
- else if (serverVersion + 2 == clientVersion)
- {
- // TODO we shouldn't be allowing this but
- // wanting to see if old (non-open RSE server still works with open RSE)
- return HANDSHAKE_SERVER_RECENT_OLDER;
- }
- else
- {
- return HANDSHAKE_SERVER_OLDER;
- }
- }
- }
- }
- else
- {
- return HANDSHAKE_INCORRECT;
- }
- }
- }
-
- public void handleMissingCommand(DataElement descriptor, String keyName){
- // default does nothing in this situation
- // System.out.println("missing command:"+keyName);
- // System.out.println("Descriptor:"+descriptor.getName());
- }
-
-}
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 a05802249..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/Handler.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-
-package org.eclipse.dstore.core.model;
-
-import org.eclipse.dstore.core.server.SecuredThread;
-
-/**
- * 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 SecuredThread
-{
-
-
- protected int _waitIncrement;
- 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)
- {
- super.setDataStore(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;
- notifyInput();
-
- /* 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()
- {
- super.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();
- }
-}
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/IDataStoreCompatibilityHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java
deleted file mode 100644
index 519831619..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreCompatibilityHandler.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220892][dstore] Backward compatibility: Server and Daemon should support old clients
- ********************************************************************************/
-package org.eclipse.dstore.core.model;
-
-
-/**
- * @since 3.0
- */
-public interface IDataStoreCompatibilityHandler {
- public static final int HANDSHAKE_INCORRECT = 0;
- public static final int HANDSHAKE_SERVER_OLDER = 1;
- public static final int HANDSHAKE_CORRECT = 2;
- public static final int HANDSHAKE_UNEXPECTED = 3;
- public static final int HANDSHAKE_SERVER_NEWER = 4;
- public static final int HANDSHAKE_SERVER_RECENT_OLDER = 5;
- public static final int HANDSHAKE_SERVER_RECENT_NEWER = 6;
- public static final int HANDSHAKE_TIMEOUT = 7;
-
- public static final int VERSION_INDEX_PROTOCOL = 0;
- public static final int VERSION_INDEX_VERSION = 1;
- public static final int VERSION_INDEX_MINOR = 2;
-
- /**
- * Checks whether a server is compatible with the current client
- * @param handshake the server handshake string in the form <version>.<major>.<miner>
- * @return whether this is considered compatible with the client datastore version
- */
- public int checkCompatibility(String handshake);
-
- /**
- * This method is called to notify the compatibility handler that a call
- * to localDescriptorQuery() failed to return a result.
- *
- * @param descriptor the object descriptor that the command was looked for under
- * @param keyName the value of the command descriptor to look for
- */
- public void handleMissingCommand(DataElement descriptor, String keyName);
-
-}
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/IDataStorePreferenceListener.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java
deleted file mode 100644
index 6f6270fd0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStorePreferenceListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- ********************************************************************************/
-package org.eclipse.dstore.core.model;
-
-/**
- * Classes that implement this and add themselves to the DataStore preference
- * listeners get called each time a preference is changed.
- *
- * @since 3.0
- */
-public interface IDataStorePreferenceListener {
-
- /**
- * A DataStore preference has changed
- * @param property the property that has changed
- * @param value the value of the property
- */
- public void preferenceChanged(String property, String value);
-
-}
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 b0ae8d0a1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IDataStoreProvider.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- *******************************************************************************/
-
-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/IExternalLoader.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IExternalLoader.java
deleted file mode 100644
index 50cf21e93..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/IExternalLoader.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.dstore.core.model;
-
-public interface IExternalLoader {
-
-
- /**
- * 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);
-
- /**
- * Loads the specified class
- * @param source a qualified classname
- * @return the loaded class
- * @throws ClassNotFoundException
- */
- public Class loadClass(String source) throws ClassNotFoundException;
-
-}
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 5e8aed432..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, 2007 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.dstore.core.model;
-
-
-
-/**
- * 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 IExternalLoader getExternalLoader();
-}
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 79ac140db..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, 2007 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.dstore.core.model;
-
-
-/**
- * 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>IExternalLoader</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 IExternalLoader getLoaderFor(String qualifiedClassName);
-}
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 f11ff6545..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) [202822] should not be synchronizing on clean method
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.internal.core.util.DataElementRemover;
-
-/**
- * <p>
- * Abstract 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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-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 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();
- DataElementRemover.addToRemovedCount();
-
- cleanChildren(child); // clean the children
-
- if (child.isSpirit())
- {
- // officially delete this now
- child.delete();
- }
- child.clear();
-
- if (parent != null)
- {
- synchronized (parent)
- {
- parent.removeNestedData(child);
- }
- }
- // _dataStore.addToRecycled(child);
- }
- }
-
- deletedList.clear();
- }
- // delete objects under temproot
- _dataStore.getTempRoot().removeNestedData();
-
- }
-
- /**
- * Recursively clean children for deletion
- * @param parent
- */
- protected void cleanChildren(DataElement parent)
- {
- List nestedData = parent.getNestedData();
- if (nestedData != null)
- {
- for (int i = 0; i < nestedData.size(); i++){
- DataElement child = (DataElement)nestedData.get(i);
- cleanChildren(child);
-
- if (child.isSpirit())
- {
- // officially delete this now
- child.delete();
- }
- child.clear();
- parent.removeNestedData(child);
- }
- }
- }
-
- /**
- * 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);
- // none of this immediate stuff - just put it at the beginning
- //handle();
- }
- else
- {
- if (!_dataObjects.contains(object))
- {
- _dataObjects.add(object);
- }
- else
- {
-
- if (_dataStore != null && object != null && !object.isDeleted())
- {
- 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();
-
-}
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 40862674f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ConnectionEstablisher.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) [220892][dstore] Backward compatibility: Server and Daemon should support old clients
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * Jacob Garcowski (IBM) [225175] [dstore] error handling change for Client
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * Noriaki Takatsu (IBM) - [226074] process for getStatus() API
- * Noriaki Takatsu (IBM) - [226237] [dstore] Move the place where the ServerLogger instance is made
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * Noriaki Takatsu (IBM) - [242968] [multithread] serverSocket must be closed when an exception happens in Accept
- * David McKnight (IBM) - [257321] [dstore] "Error binding socket" should include port of the failed socket
- * Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
- *******************************************************************************/
-
-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.Client;
-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.internal.core.server.ServerAttributes;
-import org.eclipse.dstore.internal.core.server.ServerCommandHandler;
-import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
-import org.eclipse.dstore.internal.core.server.ServerSSLProperties;
-import org.eclipse.dstore.internal.core.server.ServerUpdateHandler;
-import org.eclipse.dstore.internal.core.util.ExternalLoader;
-import org.eclipse.dstore.internal.core.util.Sender;
-import org.eclipse.dstore.internal.core.util.ssl.DStoreSSLContext;
-
-/**
- * ConnectionEstablisher is responsible for managing the server DataStore and
- * facilitating the communication between client and server DataStores.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- *
- * @since 3.0 moved from non-API to API
- */
-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;
- private String _msg;
-
-
- /**
- * 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;
- }
-
- /**
- * Return the Server port opened for this client
- *
- * @return the Server port opened for this client
- */
- public int getServerPort()
- {
- if (_serverSocket != null)
- {
- return _serverSocket.getLocalPort();
- }
-
- return -1;
- }
-
- /**
- * Return the connection status for this client
- *
- * * @return the connection status for this client
- */
- public String getStatus()
- {
- return _msg;
- }
-
- /**
- * Tells the connection establisher to clean up and shutdown
- */
- public void finished(ServerReceiver receiver)
- {
- _updateHandler.removeSenderWith(receiver.socket());
- _receivers.remove(receiver);
- _dataStore.removeDataStorePreferenceListener(receiver);
- //if (_receivers.size() == 0)
- {
- _continue = false;
- _commandHandler.finish();
- _updateHandler.finish();
- _dataStore.finish();
- System.out.println(ServerReturnCodes.RC_FINISHED);
-
- if (SystemServiceManager.getInstance().getSystemService() == null)
- 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);
- _dataStore.addDataStorePreferenceListener(receiver);
-
- if (_dataStore.getClient() != null)
- _dataStore.getClient().setServerReceiver(receiver);
-
- 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$
- _msg = ioe.toString();
- try
- {
- _serverSocket.close();
- }
- catch (Throwable e)
- {
-
- }
- _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)
- {
- }
- }
- else
- {
- serverSocket = new ServerSocket(i);
- }
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- if (serverSocket != null && serverSocket.getLocalPort() > 0)
- {
- return serverSocket;
- }
- }
- if (serverSocket == null){
- _msg = ServerReturnCodes.RC_BIND_ERROR + " on ports " + portStr; //$NON-NLS-1$
- System.err.println(_msg);
- }
- }
- else
- {
- port = Integer.parseInt(portStr);
-
-
- // create server socket from port
- if (_dataStore.usingSSL() && sslContext != null)
- {
- try
- {
- serverSocket = sslContext.getServerSocketFactory().createServerSocket(port);
- }
- catch (BindException e){
- _msg = ServerReturnCodes.RC_BIND_ERROR + " on port " + port + ": " + e.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$
- System.err.println(_msg);
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- }
- else
- {
- try
- {
- serverSocket = new ServerSocket(port);
- }
- catch (BindException e){
- _msg = ServerReturnCodes.RC_BIND_ERROR + " on port " + port + ": " + e.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$
- System.err.println(_msg);
- }
- 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();
- ticket.setAttribute(DE.A_NAME, ticketStr);
-
- _updateHandler.setDataStore(_dataStore);
- _commandHandler.setDataStore(_dataStore);
-
- if (SystemServiceManager.getInstance().getSystemService() == null)
- {
- Client client = new Client();
- _dataStore.setClient(client);
- ServerLogger logger = new ServerLogger(_dataStore.getUserPreferencesDirectory());
- client.setLogger(logger);
- }
-
- _receivers = new ArrayList();
- _continue = true;
-
- try
- {
-
- _serverSocket = createSocket(portStr);
- if (_serverSocket == null)
- {
- _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());
- _msg = ServerReturnCodes.RC_SUCCESS;
- 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 + ':' + e.getMessage());
- _msg = ServerReturnCodes.RC_UNKNOWN_HOST_ERROR;
- _continue = false;
- }
- catch (BindException e)
- {
- System.err.println(ServerReturnCodes.RC_BIND_ERROR + ':' + e.getMessage());
- _msg = ServerReturnCodes.RC_BIND_ERROR;
- _continue = false;
- }
- catch (IOException e)
- {
- System.err.println(ServerReturnCodes.RC_GENERAL_IO_ERROR + ':' + e.getMessage());
- _msg = ServerReturnCodes.RC_GENERAL_IO_ERROR;
- _continue = false;
- }
- catch (SecurityException e)
- {
- System.err.println(ServerReturnCodes.RC_SECURITY_ERROR + ':' + e.getMessage());
- _msg = 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);
-
- String version = DataStoreAttributes.DATASTORE_VERSION;
- String preferenceVersion = System.getProperty("DSTORE_VERSION"); //$NON-NLS-1$
- if (preferenceVersion != null && preferenceVersion.length() > 0){
- version = preferenceVersion;
- }
- writer.println(version);
- writer.flush();
- }
- catch (IOException e)
- {
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
- }
- System.out.println(e);
- }
-
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java
deleted file mode 100644
index 862282b21..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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: Noriaki Takatsu and Masao Nishimoto
-
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-
-package org.eclipse.dstore.core.server;
-
-/**
- * @since 3.0
- */
-public interface IServerLogger
-{
- /**
- * logInfo
- *
- * @param minerName
- * @param message Message text to be logged.
- */
- public void logInfo(String minerName, String message);
-
- /**
- * logWarning
- *
- * @param minerName
- * @param message Message text to be logged.
- */
- public void logWarning(String minerName, String 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 void logError(String minerName, String message, Throwable exception);
-
- /**
- * logDebugMessage
- * @param minerName
- * @param message Message text to be logged.
- */
- public void logDebugMessage(String minerName, String message);
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ISystemService.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ISystemService.java
deleted file mode 100644
index 90137a4e6..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ISystemService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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: Noriaki Takatsu and Masao Nishimoto
- *
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-
-
-package org.eclipse.dstore.core.server;
-
-import org.eclipse.dstore.core.model.Client;
-
-/**
- * @since 3.0
- */
-public interface ISystemService
-{
- /**
- * This method is used to establish a thread-level security.
- *
- * @param client the object of the client
- */
- public void setThreadSecurity(Client client);
-
- /**
- * This method is used to execute run() in a thread assigned
- * from thread pools.
- *
- * @param securedThread the securedThread object that implements
- * Runnable.
- */
- public void executeThread(SecuredThread securedThread);
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SecuredThread.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SecuredThread.java
deleted file mode 100644
index ed2f97cf1..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SecuredThread.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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: Noriaki Takatsu and Masao Nishimoto
- *
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Noriaki Takatsu (IBM) - [228335] [dstore][multithread] start() in SecuredThread class
- *******************************************************************************/
-
-package org.eclipse.dstore.core.server;
-
-
-import java.io.PrintWriter;
-
-import org.eclipse.dstore.core.model.DataStore;
-
-/**
- * @since 3.0
- */
-public class SecuredThread extends Thread
-{
-
- public DataStore _dataStore;
-
-
- /**
- * Constructs a new SecuredThread without a DataStore. In this case, the DataStore
- * needs to be set sometime after creation via <code>setDataStore(DataStore)</code>.
- */
- public SecuredThread() {
- }
-
- /**
- * Constructs a new SecuredThread given a DataStore.
- *
- * @param dataStore used to extract user id and password for a client
- */
- public SecuredThread(DataStore dataStore)
- {
- this(null, dataStore);
- }
-
-
- /**
- * Constructs a new SecuredThread with a DataStore and a runnable. After
- * the thread starts, the runnable will be implicitly executed.
- *
- * @param runnable the runnable to be executed by the thread
- * @param dataStore used to extract user id and password for a client
- */
- public SecuredThread(Runnable runnable, DataStore dataStore) {
- super(runnable);
- _dataStore = dataStore;
- }
-
-
- /**
- * Constructs a new SecuredThread with a DataStore, a runnable and name for the thread.
- * After the thread starts, the runnable will be implicitly executed.
- *
- * @param runnable the runnable to be executed by the thread
- * @param threadName the name for the SecuredThread being created
- * @param dataStore used to extract user id and password for a client
- */
- public SecuredThread(Runnable runnable, String threadName, DataStore dataStore) {
- this(null, runnable, threadName, dataStore);
- }
-
- /**
- * Constructs a new SecuredThread with a DataStore, a runnable and a ThreadGroup.
- * After the thread starts, the runnable will be implicitly executed.
- *
- * @param group the thread group for which this thread will belong
- * @param runnable the runnable to be executed by the thread
- * @param dataStore used to extract user id and password for a client
- */
- public SecuredThread(ThreadGroup group, Runnable runnable, DataStore dataStore) {
- super(group, runnable);
- _dataStore = dataStore;
- }
-
-
- /**
- * Constructs a new SecuredThread with a DataStore, a runnable, a name and a ThreadGroup.
- * After the thread starts, the runnable will be implicitly executed.
- *
- * @param group the thread group for which this thread will belong
- * @param runnable the runnable to be executed by the thread
- * @param threadName the name for the SecuredThread being created
- * @param dataStore used to extract user id and password for a client
- */
- public SecuredThread(ThreadGroup group, Runnable runnable, String threadName, DataStore dataStore) {
- super(group, runnable, threadName);
- _dataStore = dataStore;
- }
-
-
- /**
- * Sets the DataStore associated with the client
- * @param dataStore
- */
- public void setDataStore(DataStore dataStore)
- {
- _dataStore = dataStore;
- }
-
-
- /**
- * When run() is called, a check is made to see if there is an ISystemService. If there is
- * the <code>ISystemService.setThreadSecurity(Client)</code> is called before <code>Thread.run()</code>
- * is called.
- *
- * If a Runnable was passed into the constructor for SecuredThread then, when <code>Thread.run()</code>
- * is called, the Runnable will be invoked.
- */
- public void run()
- {
- try
- {
- ISystemService systemService = SystemServiceManager.getInstance().getSystemService();
- if (systemService != null){
- systemService.setThreadSecurity(_dataStore.getClient());
- }
- }
- catch (Throwable e)
- {
- e.printStackTrace(new PrintWriter(System.err));
- }
-
- super.run();
- }
-
- /**
- *
- * As per bug 228335, this is commented out.
- *
- * When start() is called, a check is made to see if there is an ISystemService.
- * If there is, the <code>ISystemService.executeThread(SecuredThread)</code> is called.
- * In this case, the run() method is invoked in a thread assigned from the running
- * work threads
- * If there isn't, the <code>super.start()</code> is called.
- * In this case. the run() method is invoked as a new thread.
-
- public void start()
- {
-
- try
- {
-
- ISystemService systemService = SystemServiceManager.getInstance().getSystemService();
- if (systemService != null){
- systemService.executeThread(this);
- }
- else
- {
- super.start();
- }
- }
- catch(Throwable e)
- {
- e.printStackTrace(new PrintWriter(System.err));
- }
- }
- */
-}
-
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 cfe1040f9..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/Server.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.dstore.core.server;
-
-import java.util.StringTokenizer;
-
-import org.eclipse.dstore.internal.core.server.ServerReturnCodes;
-
-/**
- * Server is the standard way of instantiating and controlling a remote DataStore.
- * The server runs a ConnectionEstablisher which manages client connections to
- * the DataStore.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class Server implements Runnable
-{
-
- 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);
- if (SystemServiceManager.getInstance().getSystemService() == null)
- System.exit(-1);
- }
- }
- catch (Exception e)
- {
- // version is bad
- System.err.println(ServerReturnCodes.RC_JRE_VERSION_ERROR);
- if (SystemServiceManager.getInstance().getSystemService() == null)
- 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();
- }
-
-
- /**
- * Return the reference for the ConnectionEstablisher for this client
- *
- * @return the the reference for the ConnectionEstablisher instance for this
- * client
- * @since 3.0
- */
- public ConnectionEstablisher getEstablisher()
- {
- return _establisher;
- }
-
-}
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 5f6fdef60..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLauncher.java
+++ /dev/null
@@ -1,686 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [193426] don't display exceptions
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * David McKnight (IBM) - [245714] [dstore] Multiple user ID/password prompts and connect fails
- *******************************************************************************/
-
-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.internal.core.server.ServerReturnCodes;
-import org.eclipse.dstore.internal.core.server.ServerSSLProperties;
-import org.eclipse.dstore.internal.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 connect 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;
-
- boolean problemReadingSocket = false;
- try
- {
- user = _reader.readLine();
- password = _reader.readLine();
- _port = _reader.readLine();
- }
- catch (IOException e)
- {
- // don't display exceptions 193426
- //e.printStackTrace();
- _port = "0"; //$NON-NLS-1$
-
- // this is probably an SSL exception
- _writer.println(IDataStoreConstants.SERVER_FAILURE + e);
- problemReadingSocket = true;
- }
-
-
- if (_serverPortRange != null && (_port == null || _port.equals("0"))) //$NON-NLS-1$
- {
- _port = _serverPortRange;
- }
-
- if (!problemReadingSocket)
- {
- 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
- if (password != null)
- {
- 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 = 4075;
-
- /**
- * 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) {
- // don't display exceptions 193426
- //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$
- // don't display exceptions 193426
- //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$
- // don't display exceptions 193426
- //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) {
- // don't display exceptions 193426
- //e.printStackTrace();
- System.err.println(e.getMessage());
- System.exit(-1);
- }
- } 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$
- // don't display exceptions 193426
- //e.printStackTrace();
- System.exit(-1);
- } catch (IOException e) {
- System.err.println("Failure to create ServerSocket"); //$NON-NLS-1$
- // don't display exceptions 193426
- //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 4075).
- * 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();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java
deleted file mode 100644
index f9c45456f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) - [226086] [dstore][api][breaking] Move ServerLogger class to dstore.core
- * Jacob Garcowski (IBM) - [232738] [dstore] Delay creation of log file until written to
- * Noriaki Takatsu (IBM) - [232443] [multithread] A single rsecomm.log for all clients
- * Noriaki Takatsu (IBM) - [239419] [multithread] Dynamically change the level of logging
- * David McKnight (IBM) - [244876] [dstore] make DEBUG a non-final variable of the ServerLogger class
- * David McKnight (IBM) - [271914] [dstore] Setting debug on/off dynamically
- * David McKnight (IBM) - [269908] [dstore] rsecomm.log file management
- * David McKnight (IBM) - [284787] [dstore] ability to disable RSECOMM_LOGFILE_MAX option
- ********************************************************************************/
-
-package org.eclipse.dstore.core.server;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Date;
-import java.util.ResourceBundle;
-
-/**
- * Class that facilitates logging for errors, warnings, debug messages and info
- * for DataStore servers.
- *
- * @since 3.0 moved from non-API to API
- */
-public class ServerLogger implements IServerLogger
-{
-
-
- // 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 Object writeLock = new Object();
- private PrintWriter _logFileStream = null;
-
- /**
- * Switch to enable debug-level logging. Note that, in 3.0, this variable
- * was final but, as of 3.0.1, it's not.
- */
- public static boolean DEBUG = false;
-
- private int log_level = 0;
-
- private boolean initialized = false;
- private String logPathName = null;
- private boolean logToFile = true;
-
- /**
- * Constructs a new ServerLogger.
- *
- * @param logPathName the path on the filesystem to store the log information
- */
- public ServerLogger(String logPathName) {
- this.logPathName = logPathName;
- // Read .properties file to configure
- 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();
- }
- }
-
- private void initialize()
- {
- initialized = true;
- if (_logFileStream == null) {
- if (logToFile) {
- try {
- File _logFile = getLogFile("rsecomm"); //$NON-NLS-1$
- _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$
- }
- }
- }
- }
-
- private File getLogFile(String preferredName){
- String ext = ".log"; //$NON-NLS-1$
- boolean found = false;
- long logFileMax = 1000000;
- String logFileMaxStr = System.getProperty("RSECOMM_LOGFILE_MAX"); //$NON-NLS-1$
- if (logFileMaxStr != null && logFileMaxStr.length() > 0){
- try {
- logFileMax = Integer.parseInt(logFileMaxStr);
- }
- catch (NumberFormatException e){
- System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
- }
- }
-
- File logFile = null;
- String name = null;
- int suffix = 0;
- while (!found) {
- name = (suffix == 0) ? preferredName + ext: preferredName + suffix + ext;
- logFile = new File(logPathName, name);
-
- if (!logFile.exists()) {
- try {
- logFile.createNewFile();
- found = true;
- }
- catch (IOException e){}
- }
- else {
- // if the file exists, check it's size
- long fileSize = logFile.length();
- if (logFileMax > 0 && fileSize > logFileMax){ // if logFileMax is 0 or less, than always use the same file
- // file too big, need a new one
- suffix++;
- }
- else {
- found = true;
- }
- }
- }
- return logFile;
- }
-
-
- /**
- * Logs an informational message
- *
- * @param minerName the name of the miner associated with this message
- * @param message Message text to be logged.
- */
- public void logInfo(String minerName, String message) {
- if (!initialized)
- initialize();
- String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
- if (loggerLogLevel != null){
- try {
- log_level = Integer.parseInt(loggerLogLevel);
- }
- catch (NumberFormatException e){
- System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
- }
- }
- 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) {}
- }
- }
- }
- }
-
-
- /**
- * Logs a warning message
- *
- * @param minerName the name of the miner associated with this message
- * @param message Message text to be logged.
- */
- public void logWarning(String minerName, String message) {
- if (!initialized)
- initialize();
- String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
- if (loggerLogLevel != null){
- try {
- log_level = Integer.parseInt(loggerLogLevel);
- }
- catch (NumberFormatException e){
- System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
- }
- }
- 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) {}
- }
- }
- }
- }
-
-
- /**
- * Logs an error message
- *
- * @param minerName the name of the miner associated with this message
- * @param message Message text to be logged.
- *
- * @param exception Exception that generated the error. Used to print a stack trace.
- */
- public void logError(String minerName, String message, Throwable exception) {
- if (!initialized)
- initialize();
-
- String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
- if (loggerLogLevel != null){
- try {
- log_level = Integer.parseInt(loggerLogLevel);
- }
- catch (NumberFormatException e){
- System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
- }
- }
-
- 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) {}
- }
- }
- }
-
-
- /**
- * Logs a debug message
- *
- * @param minerName the name of the miner associated with this message
- * @param message Message text to be logged.
- */
- public synchronized void logDebugMessage(String minerName, String message) {
- if (!initialized)
- initialize();
-
- String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
- if (loggerLogLevel != null){
- try {
- log_level = Integer.parseInt(loggerLogLevel);
- }
- catch (NumberFormatException e){
- System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
- }
- }
- 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.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 cf767d56b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * Noriaki Takatsu (IBM) - [227905] prevent double invocations of finished in ConncetionEstablisher
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * Noriaki Takatsu (IBM) - [257666] [multithread] TCP/IP socket connection is not closed
- * David McKnight (IBM) - [257666] modified original patch to simplify
- * Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
- *******************************************************************************/
-
-package org.eclipse.dstore.core.server;
-
-import java.io.IOException;
-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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 3.0 moved from non-API to API
- */
-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()
- {
- _dataStore.setConnected(false);
- super.finish();
- _connection.finished(this);
- try
- {
- socket().close();
- }
- catch (IOException e){
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
- }
- System.out.println(e);
- }
- }
-
- /**
- * @see Receiver#finish()
- */
- public void handleError(Throwable e)
- {
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logError(this.getClass().toString(), e.toString(), e);
- }
- System.out.println("RECEIVER ERROR"); //$NON-NLS-1$
- e.printStackTrace();
- System.out.println(e);
- _connection.finished(this);
- try
- {
- socket().close();
- }
- catch (IOException IOe){
- System.out.println(IOe);
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SystemServiceManager.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SystemServiceManager.java
deleted file mode 100644
index 88f8fb1a4..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/SystemServiceManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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: Noriaki Takatsu and Masao Nishimoto
- *
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-
-package org.eclipse.dstore.core.server;
-
-/**
- * @since 3.0
- */
-public class SystemServiceManager
-{
- private static SystemServiceManager instance = null;
- private static ISystemService _systemService;
-
-
- /**
- * Creates an instance of SystemServiceManager to hold the system-specific
- * parts that needs unique implementations for this system.
- *
- */
- private SystemServiceManager()
- {}
-
- /**
- * Get the SystemServiceManager object for this system.
- *
- * @return the object of the SystemServiceManager
- */
- public static SystemServiceManager getInstance()
- {
- if (instance == null)
- {
- instance = new SystemServiceManager();
- }
- return instance;
- }
-
- /**
- * Set the SystemService object for this system.
- *
- * @param systemService the object of the SystemService
- */
- public void setSystemService(ISystemService systemService)
- {
- _systemService = systemService;
- }
-
- /**
- * Get the SystemService object for this system.
- *
- * @return the object of the SystemService stored in SystemServiceManager
- */
- public ISystemService getSystemService()
- {
- return _systemService;
- }
-
-
-}
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 9f4697c8c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/CommandGenerator.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 3.0 moved from non-API to API
- */
-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;
- }
-}
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 bf6767605..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/Receiver.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) [222003] Client remains connected after server terminates
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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;
-import org.eclipse.dstore.core.model.IDataStorePreferenceListener;
-import org.eclipse.dstore.core.server.SecuredThread;
-import org.eclipse.dstore.internal.core.util.XMLparser;
-
-/**
- * This class is used for receiving data from a socket in the DataStore
- * communication layer.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @since 3.0 Moved from non-API to API
- */
-public abstract class Receiver extends SecuredThread implements IDataStorePreferenceListener
-{
-
-
- private Socket _socket;
-
- 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)
- {
- super(dataStore);
- setName("DStore Receiver"+getName()); //$NON-NLS-1$
- _socket = socket;
- _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);
- }
-
- // keepalive preferences
- String keepAliveResponseTimeout = System.getProperty(XMLparser.KEEPALIVE_RESPONSE_TIMEOUT_PREFERENCE);
- if (keepAliveResponseTimeout != null){
- preferenceChanged(XMLparser.KEEPALIVE_RESPONSE_TIMEOUT_PREFERENCE, keepAliveResponseTimeout);
- }
- String iosocketReadTimeout = System.getProperty(XMLparser.IO_SOCKET_READ_TIMEOUT_PREFERENCE);
- if (iosocketReadTimeout != null){
- preferenceChanged(XMLparser.IO_SOCKET_READ_TIMEOUT_PREFERENCE, iosocketReadTimeout);
- }
- String enableKeepAlive = System.getProperty(XMLparser.KEEPALIVE_ENABLED_PREFERENCE);
- if (enableKeepAlive != null){
- preferenceChanged(XMLparser.KEEPALIVE_ENABLED_PREFERENCE, enableKeepAlive);
- }
- }
-
- /**
- * 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()
- {
- super.run();
- try
- {
- while (!_canExit)
- {
- handleInput();
- }
-
- if (_canExit){
- // is this an unexpected exit?
- if (_dataStore.isConnected()){
- // server exited without client exit
- Exception e = new Exception("Server terminated unexpectedly"); //$NON-NLS-1$
- handleError(e);
- }
- }
- }
- 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);
-
-
- public void preferenceChanged(String property, String value)
- {
- //System.out.println("setting preference: "+property + "="+value);
- if (property.equals(XMLparser.IO_SOCKET_READ_TIMEOUT_PREFERENCE)){
- int timeout = Integer.parseInt(value);
- _xmlParser.setIOSocketReadTimeout(timeout);
- }
- else if (property.equals(XMLparser.KEEPALIVE_RESPONSE_TIMEOUT_PREFERENCE)){
- int timeout = Integer.parseInt(value);
- _xmlParser.setKeepaliveResponseTimeout(timeout);
- }
- else if (property.equals(XMLparser.KEEPALIVE_ENABLED_PREFERENCE)){
- boolean enable = true;
- if (value.equals("false")) //$NON-NLS-1$
- enable = false;
- _xmlParser.setEnableKeepalive(enable);
- }
- }
-
-}
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/ssl/BaseSSLContext.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/BaseSSLContext.java
deleted file mode 100644
index d8dd51d54..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/BaseSSLContext.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [259905][api] provide public API for getting/setting key managers for SSLContext
- ********************************************************************************/
-
-package org.eclipse.dstore.core.util.ssl;
-
-import javax.net.ssl.KeyManager;
-
-
-/**
- * @since 3.1
- */
-public class BaseSSLContext {
- private static KeyManager[] _keyManagers;
-
- public static void setKeyManagers(KeyManager[] keyManagers){
- _keyManagers = keyManagers;
- }
-
- public static KeyManager[] getKeyManagers(){
- return _keyManagers;
- }
-}
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 9b5108e2b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/DStoreKeyStore.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * David McKnight (IBM) - [230013] [api][breaking] need to make DStoreKeyStore _instance private
- ********************************************************************************/
-
-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;
-
-
-/**
- * This class is used for managing the DStore keystore for use with the DStore communication framework.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class DStoreKeyStore
-{
- private static DStoreKeyStore _instance = new DStoreKeyStore();
-
- public DStoreKeyStore()
- {
- }
-
- public static DStoreKeyStore getInstance()
- {
- if (_instance == null)
- {
- _instance = 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/IDataStoreTrustManager.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/IDataStoreTrustManager.java
deleted file mode 100644
index 785c7a64b..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/util/ssl/IDataStoreTrustManager.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- ********************************************************************************/
-package org.eclipse.dstore.core.util.ssl;
-
-import java.util.List;
-
-import javax.net.ssl.X509TrustManager;
-
-/**
- * Extracted interface from DataStoreTrustManager.
- * @since 3.0
- */
-public interface IDataStoreTrustManager extends X509TrustManager
-{
- /**
- * Sets the path and password for the trust manager
- * @param filePath the path
- * @param password the password
- */
- public void setKeystore(String filePath, String password);
-
- /**
- * Returns the list of untrusted certificates
- * @return the list of untrusted certificates
- */
- public List getUntrustedCerts();
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientAttributes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientAttributes.java
deleted file mode 100644
index a03f6c811..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientAttributes.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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)
- {
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientCommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientCommandHandler.java
deleted file mode 100644
index 00d8481bb..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientCommandHandler.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) [222168][dstore] Buffer in DataElement is not sent
- * David McKnight (IBM) [246826][dstore] KeepAlive does not work correctly
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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.internal.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;
-
- handle(); // bypassing threading
- }
-
- 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;
-
- handle(); // bypassing threading
- }
-
- public synchronized void waitForInput()
- {
- if (_commands.size() == 0 && _classesToSend.size() == 0 && _pendingKeepAliveConfirmation == null && _pendingKeepAliveRequest == null)
- {
- super.waitForInput();
- }
- }
-
- /**
- * Indicates whether the xml generator should transfer the buffer attribute of a DataElement
- * @param flag true to transfer the buffer attribute
- */
- public void setGenerateBuffer(boolean flag)
- {
- _sender.setGenerateBuffer(flag);
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientReceiver.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientReceiver.java
deleted file mode 100644
index 8f0b13147..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientReceiver.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.dstore.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientSSLProperties.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientSSLProperties.java
deleted file mode 100644
index c4df4a8b5..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientSSLProperties.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.dstore.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientUpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientUpdateHandler.java
deleted file mode 100644
index c873c442c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/client/ClientUpdateHandler.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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.DomainEvent;
-import org.eclipse.dstore.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()
- {
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/DefaultByteConverter.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/DefaultByteConverter.java
deleted file mode 100644
index 2b56aa9ea..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/DefaultByteConverter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.dstore.internal.core.model;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.IByteConverter;
-
-/**
- * @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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/SchemaRegistry.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/SchemaRegistry.java
deleted file mode 100644
index 73375a26e..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/model/SchemaRegistry.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.core.model;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.model.IExternalLoader;
-import org.eclipse.dstore.core.model.ISchemaExtender;
-import org.eclipse.dstore.core.model.ISchemaRegistry;
-
-/**
- * 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 IExternalLoader getLoaderFor(String source)
- {
- for (int i = 0; i < _extenders.size(); i++)
- {
- ISchemaExtender extender = (ISchemaExtender) _extenders.get(i);
- IExternalLoader loader = extender.getExternalLoader();
- if (loader.canLoad(source))
- {
- return loader;
- }
- }
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/MinerLoader.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/MinerLoader.java
deleted file mode 100644
index 94ca939a3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/MinerLoader.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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;
-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.IExternalLoader;
-import org.eclipse.dstore.core.model.ISchemaExtender;
-import org.eclipse.dstore.core.model.ISchemaRegistry;
-import org.eclipse.dstore.internal.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
- {
- IExternalLoader 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);
- }
- else {
- System.out.println("miner is null"); //$NON-NLS-1$
- }
- }
- }
- 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)
- {
- if (_remoteLoader != null){
- _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 IExternalLoader 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();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerAttributes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerAttributes.java
deleted file mode 100644
index 6b0fa84fe..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerAttributes.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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)
- {
- }
-
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java
deleted file mode 100644
index c10a99045..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerCommandHandler.java
+++ /dev/null
@@ -1,583 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) - [244388] [dstore] Connection hangs when a miner not installed
- * David McKnight (IBM) - [278341] [dstore] Disconnect on idle causes the client hang
- * Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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;
-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;
-import org.eclipse.dstore.core.server.SystemServiceManager;
-
-/**
- * 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
-{
- public class ServerIdleThread extends Thread
- {
- private long _timeout;
- private boolean _serverTimedOut = false;
-
- public ServerIdleThread(long timeout)
- {
- _timeout = timeout;
- }
-
- public void run()
- {
- while (!_serverTimedOut)
- {
- waitForTimeout();
- }
- if (_serverTimedOut)
- {
- _dataStore.getCommandHandler().finish();
- _dataStore.getUpdateHandler().finish();
- _dataStore.finish();
- System.out.println(ServerReturnCodes.RC_FINISHED);
- if (_dataStore.getClient() != null) {
- _dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "Server timeout");
- }
-
- // only exit if there's no service manager
- if (SystemServiceManager.getInstance().getSystemService() == null){
- System.exit(0);
- }
- else {
- _dataStore.getClient().disconnectServerReceiver();
- }
- }
- }
-
- protected synchronized void waitForTimeout()
- {
- try
- {
- wait(_timeout);
- }
- catch (InterruptedException e)
- {
- // whenver a new command comes through we interrupt this
- // if we do timeout then it's time to shutdown the server
- return;
- }
- _serverTimedOut = true;
- }
-
- }
-
-
- private ArrayList _loaders;
- private MinerLoader _minerLoader;
- private ServerIdleThread _serverIdleThread;
-
- /**
- * 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);
- }
-
- _dataStore.trace("loading "+minerId); //$NON-NLS-1$
- // 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();
- _dataStore.trace(commandName);
-
- 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);
- if (miner != null){
- miner.initMiner(status);
- }
- else { // failed to load miner
- status.setAttribute(DE.A_NAME,DataStoreResources.model_done);
- status.setAttribute(DE.A_VALUE, DataStoreResources.model_failed);
- }
- //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()
- {
- }
-
-
- /**
- * Overridden so that ServerIdleThread knows when new commands are received
- */
- public void addCommand(DataElement command, boolean immediate)
- {
- super.addCommand(command, immediate);
-
- int serverIdleShutdownTimeout = _dataStore.getServerIdleShutdownTimeout();
- if (serverIdleShutdownTimeout > 0)
- {
- if (_serverIdleThread != null)
- {
- // new command so restart timeout
- _serverIdleThread.interrupt();
- }
- else
- {
- _serverIdleThread = new ServerIdleThread(serverIdleShutdownTimeout);
- _serverIdleThread.start();
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerReturnCodes.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerReturnCodes.java
deleted file mode 100644
index 3b9ceaccf..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerReturnCodes.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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$
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerSSLProperties.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerSSLProperties.java
deleted file mode 100644
index 0e4089921..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerSSLProperties.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java
deleted file mode 100644
index 326da2c66..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [222168][dstore] Buffer in DataElement is not sent
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) [246826][dstore] KeepAlive does not work correctly
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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.internal.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;
-
- handle(); // bypassing threading
- }
-
- 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;
-
- handle(); // bypassing threading
- }
-
- public synchronized void waitForInput()
- {
- if (_dataObjects.size() == 0 && _classesToSend.size() == 0 && _pendingKeepAliveConfirmation == null && _pendingKeepAliveRequest == null)
- {
- super.waitForInput();
- }
- }
-
- /**
- * Indicates whether the xml generator should transfer the buffer attribute of a DataElement
- * @param flag true to transfer the buffer attribute
- */
- public void setGenerateBuffer(boolean flag)
- {
- for (int i = 0; i < _senders.size(); i++)
- {
- Sender sender = (Sender)_senders.get(i);
- sender.setGenerateBuffer(flag);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java
deleted file mode 100644
index d0a2ec28d..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/DataElementRemover.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [202822] don't need to remove children from map here
- * David McKnight (IBM) - [255390] check memory to determine whether to queue
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.core.util;
-
-import java.util.ArrayList;
-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 * 10;
- private int _expiryTime = DEFAULT_EXPIRY_TIME * 10;
- 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 MemoryManager _memoryManager;
-
- public DataElementRemover(DataStore dataStore)
- {
- super();
- _memoryManager = MemoryManager.getInstance(dataStore);
- _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(isMemoryThresholdExceeded()) {
- if(element.isSpirit()) {
- unmap(element);
- }
-
- // do immediate clearing of queue since we're low on memory
- clearQueue(true);
- return;
- }
- if (_dataStore.isDoSpirit() && _dataStore == element.getDataStore())
- {
- QueueItem item = new QueueItem(element, System.currentTimeMillis());
- _queue.add(item);
- }
- }
- notifyInput();
- }
-
- private boolean isMemoryThresholdExceeded(){
- return _memoryManager.isThresholdExceeded();
- }
-
- public void handle()
- {
- clearQueue(false);
- }
-
- public synchronized void clearQueue(boolean force)
- {
- 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$
-
- ArrayList toRefresh = new ArrayList();
- while (_queue.size() > 0 && (force || System.currentTimeMillis() - ((QueueItem) _queue.getFirst()).timeStamp > _expiryTime))
- {
- DataElement toBeDisconnected = ((QueueItem) _queue.removeFirst()).dataElement;
- if (!toBeDisconnected.isSpirit())
- {
- toBeDisconnected.setSpirit(true);
- toBeDisconnected.setUpdated(false);
- DataElement parent = toBeDisconnected.getParent();
- if (!toRefresh.contains(parent))
- {
- //System.out.println("disconnect parent:"+parent.getName());
- toRefresh.add(toBeDisconnected.getParent());
- }
- //_dataStore.refresh(toBeDisconnected);
- disconnected++;
- numDisconnected++;
- }
- else
- {
- //_dataStore.memLog(toBeDisconnected.toString());
- }
- unmap(toBeDisconnected);
- }
-
- _dataStore.refresh(toRefresh);
-
- _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$
- System.gc();
- }
- }
-
- private void unmap(DataElement element)
- {
- _dataStore.getHashMap().remove(element.getId());
- }
-
-
- 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(100000); // wait 100 seconds
- Thread.yield();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- finish();
- return;
- }
- handle();
- }
- }
-}
-
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ExternalLoader.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ExternalLoader.java
deleted file mode 100644
index f798277f3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ExternalLoader.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.core.util;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.java.RemoteClassLoader;
-import org.eclipse.dstore.core.model.IExternalLoader;
-import org.eclipse.dstore.core.util.StringCompare;
-
-
-/**
- * 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 implements IExternalLoader
-{
-
- 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ISender.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ISender.java
deleted file mode 100644
index 064a6f8d7..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ISender.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.internal.core.util;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public interface ISender
-{
-
-
- public void sendDocument(String document);
- public void sendDocument(DataElement objectRoot, int depth);
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/MemoryManager.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/MemoryManager.java
deleted file mode 100644
index b5412e27e..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/MemoryManager.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *
- * Contributors:
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- * David McKnight (IBM) - [277764] [dstore][regression] IllegalAccessException thrown when connecting to a running server
- ********************************************************************************/
-
-package org.eclipse.dstore.internal.core.util;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.core.server.SystemServiceManager;
-
-public class MemoryManager {
- private Object mbean;
- private static MemoryManager _instance;
- private DataStore _dataStore;
-
- private MemoryManager(DataStore dataStore) {
- init();
- _dataStore = dataStore;
- }
-
- public static MemoryManager getInstance(DataStore dataStore){
- if (_instance == null){
- _instance = new MemoryManager(dataStore);
- }
- return _instance;
- }
-
- private void init(){
- String thresholdString = System.getProperty("search.threshold"); //$NON-NLS-1$
- double threshold = 0.8;
- if(thresholdString != null && thresholdString.length() > 0) {
- threshold = Integer.parseInt(thresholdString) / 100.0;
- }
-
- // do we have java 1.5?
- try {
- Class factoryClass = Class.forName("java.lang.management.ManagementFactory"); //$NON-NLS-1$
- Method method = factoryClass.getDeclaredMethod("getMemoryPoolMXBeans", new Class[0]); //$NON-NLS-1$
-
- List list = (List)method.invoke(null, null);
-
- for(int i = 0;i < list.size(); i++) {
- Object mbObj = list.get(i);
- Class mbClass = mbObj.getClass();
-
-
- Method getSupportedMethod = mbClass.getDeclaredMethod("isUsageThresholdSupported", new Class[0]); //$NON-NLS-1$
- getSupportedMethod.setAccessible(true);
- Boolean usageThresholdSupported = (Boolean)getSupportedMethod.invoke(mbObj, null);
- if (usageThresholdSupported.booleanValue()){
-
- Method getTypeMethod = mbClass.getDeclaredMethod("getType", new Class[0]); //$NON-NLS-1$
-
- getTypeMethod.setAccessible(true);
- Object typeObj = getTypeMethod.invoke(mbObj, null);
- Class memoryType = Class.forName("java.lang.management.MemoryType"); //$NON-NLS-1$
- Field field = memoryType.getField("HEAP"); //$NON-NLS-1$
- Object fieldObj = field.get(typeObj);
-
- if (fieldObj.equals(typeObj)){
- Method getUsageMethod = mbClass.getDeclaredMethod("getUsage", new Class[0]); //$NON-NLS-1$
- getUsageMethod.setAccessible(true);
- Object usageObj = getUsageMethod.invoke(mbObj, null);
-
- Class usageClass = usageObj.getClass();
- Method getMaxMethod = usageClass.getDeclaredMethod("getMax", new Class[0]); //$NON-NLS-1$
- getMaxMethod.setAccessible(true);
- Long maxObj = (Long)getMaxMethod.invoke(usageObj, null);
-
- Method setThresholdMethod = mbClass.getDeclaredMethod("setUsageThreshold", new Class[] { long.class }); //$NON-NLS-1$
- Object[] args = new Object[1];
- args[0] = new Long((long)(maxObj.longValue() * threshold));
-
- setThresholdMethod.setAccessible(true);
- setThresholdMethod.invoke(mbObj, args);
- mbean = mbObj;
- break;
- }
- }
- }
- }
- catch (Exception e){
- // java version to old so no mbean created - will use fallback
- }
- }
-
- public boolean isThresholdExceeded() {
-
- if (mbean != null){
- try {
- Method method = mbean.getClass().getMethod("isUsageThresholdExceeded", new Class[0]); //$NON-NLS-1$
- Boolean exceeded = (Boolean)method.invoke(mbean, null);
- return exceeded.booleanValue();
- }
- catch (Exception e){
- return false;
- }
- }
- else {
- // no Java 1.5 available, so this is the fallback
- Runtime runtime = Runtime.getRuntime();
- long freeMem = runtime.freeMemory();
-
- if (freeMem < 10000){
-
- return true;
- }
- return false;
- }
- }
-
- public void checkAndClearupMemory()
- {
- int count = 0;
- while(count < 5 && isThresholdExceeded()) {
- System.gc();
- try {
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- }
- count ++;
- _dataStore.trace("CLEAN free mem="+Runtime.getRuntime().freeMemory()); //$NON-NLS-1$
- }
- if(count == 5) {
-
-
- _dataStore.trace("Out of memory - shutting down"); //$NON-NLS-1$
-
- Exception e = new Exception();
- _dataStore.trace(e);
-
- /*
- * show the end of the log
- DataElement logRoot = _dataStore.getLogRoot();
- List nestedData = logRoot.getNestedData();
- for (int i = nestedData.size() - 10; i < nestedData.size(); i++){
- DataElement cmd = (DataElement)nestedData.get(i);
- System.out.println(cmd);
- }
- */
-
- if (SystemServiceManager.getInstance().getSystemService() == null)
- System.exit(-1);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Pattern.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Pattern.java
deleted file mode 100644
index 22d66ae7c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Pattern.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sender.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sender.java
deleted file mode 100644
index 6085babd0..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sender.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) [222168][dstore] Buffer in DataElement is not sent
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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();
- _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();
- }
- }
- }
-
-
- /**
- * Indicates whether the xml generator should transfer the buffer attribute of a DataElement
- * @param flag true to transfer the buffer attribute
- */
- public void setGenerateBuffer(boolean flag)
- {
- _xmlGenerator.setGenerateBuffer(flag);
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sorter.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sorter.java
deleted file mode 100644
index c87584090..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/Sorter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLgenerator.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLgenerator.java
deleted file mode 100644
index da0261f75..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLgenerator.java
+++ /dev/null
@@ -1,694 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [232233] [dstore] Buffer in DataElement is not retained
- * David McKnight (IBM) - [245481] [dstore] CR/LF not restored for new client/old server
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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();
- append(text.toString());
- nextLine();
- 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;
- case '\n':
- output.append(XMLparser.STR_NL);
- break;
- case '\r':
- output.append(XMLparser.STR_CR);
- break;
- case '\0':
- output.append(XMLparser.STR_EOL);
- 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;
- case '\n':
- output.append(XMLparser.STR_NL);
- break;
- case '\r':
- output.append(XMLparser.STR_CR);
- break;
- case '\0':
- output.append(XMLparser.STR_EOL);
- 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())
- {
- }
- 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLparser.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLparser.java
deleted file mode 100644
index e20bc4dff..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/XMLparser.java
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) [221601][dstore] xmlparser needs to be able to handle very large attributes
- * David McKnight (IBM) [222163][dstore] Special characters from old server are not restored
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) [246826][dstore] KeepAlive does not work correctly
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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 String KEEPALIVE_RESPONSE_TIMEOUT_PREFERENCE = "DSTORE_KEEPALIVE_RESPONSE_TIMEOUT"; //$NON-NLS-1$
- public static final String IO_SOCKET_READ_TIMEOUT_PREFERENCE = "DSTORE_IO_SOCKET_READ_TIMEOUT"; //$NON-NLS-1$
- public static final String KEEPALIVE_ENABLED_PREFERENCE = "DSTORE_KEEPALIVE_ENABLED"; //$NON-NLS-1$
-
- public int IO_SOCKET_READ_TIMEOUT = 3600000;
- public 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 _isKeepAliveEnabled = true;
- 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$
-
- public static String STR_NL = "&#92;&#110;"; //$NON-NLS-1$
- public static String STR_CR = "&#92;&#114;"; //$NON-NLS-1$
- public static String STR_EOL = "&#92;&#48;"; //$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];
-
- }
-
- /**
- * Set whether to enable keepalive
- * @param enable <code>true</code> to enable keepalive
- */
- public void setEnableKeepalive(boolean enable){
- // if false, we ignore the keepalive stuff
- _isKeepAliveCompatible = enable;
- _isKeepAliveEnabled = enable;
- }
-
- /**
- * Set the keepalive response timeout
- * @param timeout the time to wait for a response after
- * initiating a keepalive request
- */
- public void setKeepaliveResponseTimeout(int timeout){
- // the new value will be picked up on the next readLine() call
- KEEPALIVE_RESPONSE_TIMEOUT = timeout;
- }
-
- /**
- * Set the socket read timeout
- * @param timeout the time to wait before initiating a keepalive request
- */
- public void setIOSocketReadTimeout(int timeout){
- // the new value will be picked up on the next readLine() call
- IO_SOCKET_READ_TIMEOUT = timeout;
- }
-
- /**
- * 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;
- 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 (_isKeepAliveEnabled)
- {
- if (_firstTime)
- {
- _initialKart = new KeepAliveRequestThread(KEEPALIVE_RESPONSE_TIMEOUT, socket);
- _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 (_isKeepAliveEnabled && _isKeepAliveCompatible)
- {
- if (_kart == null || !_kart.isAlive()){ // normal read wait
- socket.setSoTimeout(IO_SOCKET_READ_TIMEOUT);
- }
- /* the SoTimeout is set in the kart before sleeping
- else { // read wait time when awaking a keepalive response
- // otherwise, if IO_SOCKET_READ_TIMEOUT is bigger we don't get out of here until IO_SOCKET_READ_TIMEOUT is complete
- socket.setSoTimeout((int)KEEPALIVE_RESPONSE_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$
- return null;
- }
- else
- {
- if (_kart == null || !_kart.isAlive()){
- _kart = new KeepAliveRequestThread(KEEPALIVE_RESPONSE_TIMEOUT, socket);
- 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)
- {
- int newMaxBuffer = 2 * _maxBuffer;
- byte[] newBuffer = new byte[newMaxBuffer];
- System.arraycopy(_byteBuffer, 0, newBuffer, 0, _maxBuffer);
- _maxBuffer = newMaxBuffer;
- _byteBuffer = newBuffer;
- }
- _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())
- {
- List toDelete = new ArrayList();
- List nested = parent.getNestedData();
- synchronized (nested)
- {
- for (int s= 0; s < nested.size(); s++)
- {
- DataElement element = (DataElement)nested.get(s);
- if (element.isSpirit())
- {
- boolean addedToDelete = false;
- 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() && !addedToDelete; 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(element);
- addedToDelete = true;
- }
- }
- }
- }
- }
-
- // 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$
- .replaceAll(STR_NL, "\n") //$NON-NLS-1$
- .replaceAll(STR_CR, "\r") //$NON-NLS-1$
- .replaceAll(STR_EOL, "\0"); //$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;
- private Socket _socket;
-
- public KeepAliveRequestThread(long timeout, Socket socket)
- {
- _timeout = timeout;
- _failed = false;
- _socket = socket;
- }
-
- public void run()
- {
- _dataStore.sendKeepAliveRequest();
- try
- {
- _socket.setSoTimeout((int)_timeout);
- sleep(_timeout);
- }
- catch (SocketException e){
- }
- 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;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreKeyManager.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreKeyManager.java
deleted file mode 100644
index d96fc5a6f..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreKeyManager.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [264858][dstore] OpenRSE always picks the first trusted certificate
- ********************************************************************************/
-package org.eclipse.dstore.internal.core.util.ssl;
-
-import java.net.Socket;
-import java.security.Principal;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.X509KeyManager;
-
-public class DStoreKeyManager implements X509KeyManager {
-
- private X509KeyManager _keyManager;
- private String _defaultAlias;
-
- public DStoreKeyManager(X509KeyManager keyManager, String defaultAlias){
- _keyManager = keyManager;
- _defaultAlias = defaultAlias;
- }
-
- public String chooseClientAlias(String[] keyType, Principal[] issuers,
- Socket socket) {
- if (_defaultAlias != null){
- return _defaultAlias;
- }
- else {
- return _keyManager.chooseClientAlias(keyType, issuers, socket);
- }
- }
-
- public String chooseServerAlias(String keyType, Principal[] issuers,
- Socket socket) {
- if (_defaultAlias != null){
- return _defaultAlias;
- }
- else {
- return _keyManager.chooseServerAlias(keyType, issuers, socket);
- }
- }
-
- public X509Certificate[] getCertificateChain(String alias) {
- return _keyManager.getCertificateChain(alias);
- }
-
- public String[] getClientAliases(String keyType, Principal[] issuers) {
- return _keyManager.getClientAliases(keyType, issuers);
- }
-
- public PrivateKey getPrivateKey(String alias) {
- return _keyManager.getPrivateKey(alias);
- }
-
- public String[] getServerAliases(String keyType, Principal[] issuers) {
- return _keyManager.getServerAliases(keyType, issuers);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java
deleted file mode 100644
index b794bc08c..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DStoreSSLContext.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * Noriaki Takatsu (IBM) - [259905][api] Provide a facility to use its own keystore
- * David McKnight (IBM) - [259905][api] provide public API for getting/setting key managers for SSLContext
- * David McKnight (IBM) - [264858][dstore] OpenRSE always picks the first trusted certificate
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.core.util.ssl;
-
-import java.security.KeyStore;
-
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509KeyManager;
-
-import org.eclipse.dstore.core.util.ssl.BaseSSLContext;
-import org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
-import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
-
-
-public class DStoreSSLContext
-{
-
- public static SSLContext getServerSSLContext(String filePath, String password)
- {
- SSLContext serverContext = null;
-
- try
- {
- KeyManager[] keyManagers = BaseSSLContext.getKeyManagers();
- if (keyManagers == null)
- {
- 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$
-
- keyManagers = kmf.getKeyManagers();
-
- // read optional system property that indicates a default certificate alias
- String defaultAlias = System.getProperty("DSTORE_DEFAULT_CERTIFICATE_ALIAS"); //$NON-NLS-1$
- if (defaultAlias != null){
- KeyManager[] x509KeyManagers = new X509KeyManager[10];
-
- for(int i=0;i<keyManagers.length; i++){
- if(keyManagers[i] instanceof X509KeyManager){
- x509KeyManagers[i] = new DStoreKeyManager((X509KeyManager)keyManagers[i], defaultAlias);
- }
- }
- serverContext.init(x509KeyManagers, null, null);
- }
- else {
- serverContext.init(keyManagers, null, null);
- }
- }
- else
- {
- serverContext = SSLContext.getInstance("SSL"); //$NON-NLS-1$
- serverContext.init(keyManagers, null, null);
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return serverContext;
- }
-
- public static SSLContext getClientSSLContext(String filePath, String password, IDataStoreTrustManager trustManager)
- {
- SSLContext clientContext = null;
-
- try
- {
- trustManager.setKeystore(filePath, password);
- clientContext = SSLContext.getInstance("SSL"); //$NON-NLS-1$
- TrustManager[] mgrs = new TrustManager[1];
- mgrs[0] = trustManager;
-
-
- KeyManager[] keyManagers = BaseSSLContext.getKeyManagers();
- clientContext.init(keyManagers, mgrs, null);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return clientContext;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.java
deleted file mode 100644
index fd18725f3..000000000
--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/util/ssl/DataStoreTrustManager.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * David McKnight (IBM) - [264858] [dstore] OpenRSE always picks the first trusted certificate
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.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 org.eclipse.dstore.core.util.ssl.DStoreKeyStore;
-import org.eclipse.dstore.core.util.ssl.IDataStoreTrustManager;
-
-public class DataStoreTrustManager implements IDataStoreTrustManager
-{
- 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
- {
- if (cert.getSubjectDN().equals(tcert.getIssuerDN())) {
- 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;
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/.classpath b/rse/plugins/org.eclipse.dstore.extra/.classpath
deleted file mode 100644
index b7464f3ca..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.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.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 ef6dc13c3..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 f9dd6f823..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.dstore.extra
-Bundle-Version: 2.1.101.qualifier
-Bundle-Activator: org.eclipse.dstore.extra.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui.views
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.dstore.extra,
- org.eclipse.dstore.internal.extra;x-friends:="org.eclipse.rse.subsystems.files.dstore"
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 d4cc693f9..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 5, 2007</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 fb8af93c6..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 4f2bb2b61..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Platform Support
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/DomainEvent.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/DomainEvent.java
deleted file mode 100644
index 298b3c4ef..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/DomainEvent.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDataElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDataElement.java
deleted file mode 100644
index 358a68d4a..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDataElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.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);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainListener.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainListener.java
deleted file mode 100644
index cf41e1d6e..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.extra;
-
-
-public interface IDomainListener
-{
-
-
- public boolean listeningTo(DomainEvent e);
- public void domainChanged(DomainEvent e);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainNotifier.java
deleted file mode 100644
index 2394a1ed8..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IDomainNotifier.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.extra;
-
-
-public interface IDomainNotifier
-{
-
-
- public void addDomainListener(IDomainListener listener);
- public void fireDomainChanged(DomainEvent event);
- public boolean hasDomainListener(IDomainListener listener);
- public void removeDomainListener(IDomainListener listener);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IElement.java
deleted file mode 100644
index 2e336806e..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/extra/IElement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.extra;
-
-public interface IElement
-{
-
-
- public Object getElementProperty(Object key);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DataElementActionFilter.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DataElementActionFilter.java
deleted file mode 100644
index 06c8189ea..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DataElementActionFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.dstore.internal.extra;
-
-import org.eclipse.dstore.extra.IDataElement;
-
-
-
-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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DesktopElement.java
deleted file mode 100644
index e907c651b..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DesktopElement.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.internal.extra;
-
-public class DesktopElement
-{
-
-
- public static boolean matches(Class aClass)
- {
- return false;
- }
-
- public static Object getPlatformAdapter(Object obj, Class aClass)
- {
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DomainNotifier.java
deleted file mode 100644
index 63c723727..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/DomainNotifier.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.internal.extra;
-
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.dstore.extra.IDomainNotifier;
-
-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)
- {
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IDesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IDesktopElement.java
deleted file mode 100644
index 84b0b95d5..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IDesktopElement.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.internal.extra;
-
-public interface IDesktopElement
-{
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IPropertySource.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IPropertySource.java
deleted file mode 100644
index 65a6eca3c..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/IPropertySource.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.internal.extra;
-
-public interface IPropertySource
-{
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/PropertySource.java b/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/PropertySource.java
deleted file mode 100644
index ac8aa1c84..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/server/org/eclipse/dstore/internal/extra/PropertySource.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.dstore.internal.extra;
-
-import org.eclipse.dstore.extra.IDataElement;
-
-public class PropertySource
-{
-
-
- public PropertySource(IDataElement element)
- {
- }
-
- public static boolean matches(Class key)
- {
- return false;
- }
-}
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/DomainEvent.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/DomainEvent.java
deleted file mode 100644
index 0d7117617..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/DomainEvent.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDataElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDataElement.java
deleted file mode 100644
index 97d2cfa8f..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDataElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.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);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainListener.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainListener.java
deleted file mode 100644
index 1156ce856..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.extra;
-
-
-public interface IDomainListener
-{
-
- public boolean listeningTo(DomainEvent e);
- public void domainChanged(DomainEvent e);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainNotifier.java
deleted file mode 100644
index b8906a296..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IDomainNotifier.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.dstore.extra;
-
-/**
- * For DataStore domain notification
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IDomainNotifier {
- public void addDomainListener(IDomainListener listener);
-
- public void fireDomainChanged(DomainEvent event);
-
- public boolean hasDomainListener(IDomainListener listener);
-
- public void removeDomainListener(IDomainListener listener);
-
- /**
- * @since 2.1
- */
- public void enable(boolean on);
-
- /**
- * @since 2.1
- */
- public boolean isEnabled();
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IElement.java
deleted file mode 100644
index 6037f86b4..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/extra/IElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.extra;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-public interface IElement extends IAdaptable
-{
-
-
- public Object getElementProperty(Object key);
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DataElementActionFilter.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DataElementActionFilter.java
deleted file mode 100644
index 10a685c80..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DataElementActionFilter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.extra;
-
-import org.eclipse.dstore.extra.IDataElement;
-
-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.
- *
- * 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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DesktopElement.java
deleted file mode 100644
index 3c9316eff..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DesktopElement.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.extra;
-
-import java.util.List;
-
-import org.eclipse.dstore.extra.IDataElement;
-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);
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java
deleted file mode 100644
index 5a63796d4..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/DomainNotifier.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [282634] [dstore] IndexOutOfBoundsException on Disconnect
- *******************************************************************************/
-
-package org.eclipse.dstore.internal.extra;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.dstore.extra.IDomainNotifier;
-
-public class DomainNotifier implements IDomainNotifier
-{
-
-
- private ArrayList _listeners;
-
- private boolean _enabled;
-
- public DomainNotifier()
- {
- _listeners = new ArrayList();
- _enabled = false;
- }
-
-
-
- public void enable(boolean on)
- {
- _enabled = on;
- }
-
- public boolean isEnabled()
- {
- return _enabled;
- }
-
- public void addDomainListener(IDomainListener listener)
- {
- synchronized (_listeners){
- if (!_listeners.contains(listener))
- {
- _listeners.add(listener);
- }
- }
- }
-
-
- public void fireDomainChanged(DomainEvent event)
- {
- if (_enabled)
- {
- Object[] listeners = null;
-
- synchronized (_listeners){
- listeners = _listeners.toArray();
- }
-
- for (int i = 0; i < listeners.length; i++)
- {
- IDomainListener listener = (IDomainListener)listeners[i];
- if ((listener != null) && listener.listeningTo(event))
- {
- listener.domainChanged(event);
- }
- }
- }
- }
-
- public boolean hasDomainListener(IDomainListener listener)
- {
- synchronized (_listeners){
- return _listeners.contains(listener);
- }
- }
-
- public void removeDomainListener(IDomainListener listener)
- {
- synchronized (_listeners){
- _listeners.remove(listener);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDataElementActionFilter.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDataElementActionFilter.java
deleted file mode 100644
index c0b553ab7..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDataElementActionFilter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.extra;
-
-public interface IDataElementActionFilter extends org.eclipse.ui.IActionFilter
-{
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDesktopElement.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDesktopElement.java
deleted file mode 100644
index 2829440c0..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IDesktopElement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.extra;
-
-
-public interface IDesktopElement extends org.eclipse.ui.model.IWorkbenchAdapter
-{
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IPropertySource.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IPropertySource.java
deleted file mode 100644
index 85605a8c6..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/IPropertySource.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.extra;
-
-public interface IPropertySource extends org.eclipse.ui.views.properties.IPropertySource
-{
-
-
-}
diff --git a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/PropertySource.java b/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/PropertySource.java
deleted file mode 100644
index 60fee16e2..000000000
--- a/rse/plugins/org.eclipse.dstore.extra/src/org/eclipse/dstore/internal/extra/PropertySource.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.dstore.internal.extra;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.dstore.extra.IDataElement;
-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)
- {
- }
-
-}
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 089217cde..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/dstore/**"/>
- </accessrules>
- </classpathentry>
- <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.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 1e7ae5944..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/.api_filters b/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/.api_filters
deleted file mode 100644
index b92dee4eb..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.connectorservice.dstore" version="2">
- <resource path="src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java" type="org.eclipse.rse.connectorservice.dstore.DStoreConnectorService">
- <filter id="572522506">
- <message_arguments>
- <message_argument value="ConnectionStatus"/>
- <message_argument value="DStoreConnectorService"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 3b42c8ad9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.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.connectorservice.dstore;singleton:=true
-Bundle-Version: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.connectorservice.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.extra;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package:
- org.eclipse.rse.connectorservice.dstore,
- org.eclipse.rse.connectorservice.dstore.util,
- org.eclipse.rse.internal.connectorservice.dstore;x-internal:=true,
- org.eclipse.rse.internal.connectorservice.dstore.ui.propertypages;x-internal:=true
-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 d4cc693f9..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 5, 2007</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 7911f574b..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2008 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,\
- plugin.xml
-source.. = src/
-output.. = bin/
-src.includes = about.html
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 928d1e7e8..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Connector Service
-providerName = Eclipse.org - DSDP
-
-# START NON-TRANSLATABLE
-PreferencePage.Datastore = DataStore
-# END NON-TRANSLATABLE
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.xml b/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.xml
deleted file mode 100644
index 219eb8b28..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/plugin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2008 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
-
-Contributors:
--->
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PreferencePage.Datastore"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.internal.connectorservice.dstore.ui.propertypages.DStorePreferencePage"
- id="org.eclipse.rse.connectorservice.DStorePreferences">
- </page>
- </extension>
-</plugin>
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 5e5d89146..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java
+++ /dev/null
@@ -1,1580 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David McKnight (IBM) - [202822] need to enable spiriting on the server side
- * David McKnight (IBM) - [199565] taking out synchronize for internalConnect
- * David McKnight (IBM) - [205986] attempt SSL before non-SSL for daemon connect
- * David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [218685] [api][breaking][dstore] Unable to connect when using SSL.
- * David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [220123] [api][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- * David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
- * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short
- * David McKnight (IBM) - [235756] [dstore] Unable to connect to host with SSL via REXEC
- * David McKnight (IBM) - [244116] [dstore][daemon][ssl] Connecting to RSE server doesn't complete when the connection is SSL
- * David McKnight (IBM) - [233160] [dstore] SSL/non-SSL alert are not appropriate
- * David Dykstal (IBM) [235284] Cancel password change causes problem
- * David McKnight (IBM) - [267236] [dstore] Can't connect after a wrong password
- * David McKnight (IBM) - [274688] [api][dstore] DStoreConnectorService.internalConnect() needs to be cleaned up
- * David McKnight (IBM) - [258529] Unable to display connection failure error message
- *******************************************************************************/
-
-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 javax.net.ssl.SSLException;
-import javax.net.ssl.SSLHandshakeException;
-
-import org.eclipse.core.runtime.FileLocator;
-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.dstore.core.client.ClientConnection;
-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.dstore.internal.core.client.ClientSSLProperties;
-import org.eclipse.dstore.internal.core.util.XMLparser;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
-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.RSECorePlugin;
-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.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.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.connectorservice.dstore.Activator;
-import org.eclipse.rse.internal.connectorservice.dstore.ConnectorServiceResources;
-import org.eclipse.rse.internal.connectorservice.dstore.IConnectorServiceMessageIds;
-import org.eclipse.rse.internal.connectorservice.dstore.RexecDstoreServer;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.DisplayHidableSystemMessageAction;
-import org.eclipse.rse.ui.actions.DisplaySystemMessageAction;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.subsystems.StandardConnectorService;
-import org.eclipse.swt.widgets.Display;
-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 StandardConnectorService implements IDataStoreProvider
-{
- private class ConnectionStatusPair {
- private ConnectionStatus _connectStatus;
- private ConnectionStatus _launchStatus;
- public ConnectionStatusPair(ConnectionStatus connectStatus, ConnectionStatus launchStatus){
- _connectStatus = connectStatus;
- _launchStatus = launchStatus;
- }
-
- public ConnectionStatus getConnectStatus(){
- return _connectStatus;
- }
-
- public ConnectionStatus getLaunchStatus(){
- return _launchStatus;
- }
- }
-
- private class StartSpiritThread extends Thread
- {
- private DataStore _dataStore;
- public StartSpiritThread(DataStore dataStore)
- {
- _dataStore = dataStore;
- }
-
- public void run()
- {
- if (_dataStore.isDoSpirit()) _dataStore.queryServerSpiritState();
- }
- }
-
- private ClientConnection clientConnection = null;
- private ConnectionStatusListener _connectionStatusListener = null;
- private IServerLauncher starter = null;
- private IServerLauncherProperties _remoteServerLauncherProperties = null;
- private boolean _isConnecting = false;
-
- // 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 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);
- }
-
-
- 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
- {
- ISubSystem ss = getPrimarySubSystem();
- if (ss != null)
- {
- if (Display.getCurrent() == null) {
- ss.connect(new NullProgressMonitor(), false);
- } else {
- ss.connect(false, null);
- }
- }
- }
- 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(IUniversalDataStoreConstants.UNIVERSAL_ENVIRONMENT_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
- {
- // at connect time, the info node is not guaranteed to be present, so this gets logged a lot
- // it doesn't cause any functional problems, so I'm commenting this out
- //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)
- */
- protected 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
- clearPassword(false, true); // 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();
- }
-
- /**
- * Return if you support remotely launching a server script
- * @deprecated Use instead {@link #isServerLaunchTypeEnabled(ISubSystem, ServerLaunchType)}
- * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
- */
- public boolean getRexecLaunchEnabled(SubSystem subsystemImpl) {
- return isServerLaunchTypeEnabled(subsystemImpl, ServerLaunchType.REXEC_LITERAL);
- }
-
-
- /**
- * Return if you support connecting to a server already running
- * @deprecated Use instead {@link #isServerLaunchTypeEnabled(ISubSystem, ServerLaunchType)}
- * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
- */
- public boolean getNoLaunchEnabled(SubSystem subsystemImpl) {
- return isServerLaunchTypeEnabled(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;
- }
-
- public IServerLauncherProperties getRemoteServerLauncherProperties() {
- return _remoteServerLauncherProperties;
- }
-
- public void setRemoteServerLauncherProperties(IServerLauncherProperties newRemoteServerLauncher) {
- if (_remoteServerLauncherProperties != newRemoteServerLauncher)
- {
- _remoteServerLauncherProperties = newRemoteServerLauncher;
- setDirty(true);
- }
- }
-
- /**
- * Connect to the server by using REXEC as a daemon to launch it.
- *
- * @param info the signon information
- * @param serverLauncher the server launcher
- * @param monitor the progress monitor
- *
- * @return the connection status
- *
- * @since 3.1
- */
- protected ConnectionStatus connectWithREXEC(SystemSignonInformation info, IRemoteServerLauncher serverLauncher, IProgressMonitor monitor) throws Exception {
- if (monitor != null) {
- String cmsg = ConnectorServiceResources.MSG_STARTING_SERVER_VIA_REXEC;
- monitor.subTask(cmsg);
- }
-
- ConnectionStatus connectStatus = null;
- boolean autoDetectSSL = true;
- if (serverLauncher != null){
- autoDetectSSL = serverLauncher.getAutoDetectSSL();
- }
-
- // 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);
-
- // get Socket Timeout Value Preference
- int timeout = getSocketTimeOutValue();
-
- if (starter instanceof RexecDstoreServer){
- ((RexecDstoreServer)starter).setSocketTimeoutValue(timeout);
- }
-
- if (autoDetectSSL) timeout = 3000;
- else setSSLProperties(isUsingSSL());
-
- int iServerPort = launchUsingRexec(info, serverLauncher, monitor);
-
- if(iServerPort != 0)
- {
- clientConnection.setPort("" + iServerPort); //$NON-NLS-1$
-
- if (monitor != null) {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
- monitor.subTask(cmsg);
- }
-
- // connect to launched server
- connectStatus = clientConnection.connect(null, timeout);
- if (!connectStatus.isConnected() && connectStatus.getMessage().startsWith(ClientConnection.CANNOT_CONNECT) && autoDetectSSL){
- if (setSSLProperties(true)){
- iServerPort = launchUsingRexec(info, serverLauncher, monitor);
- if (iServerPort != 0)
- {
- clientConnection.setPort("" + iServerPort); //$NON-NLS-1$
- connectStatus = clientConnection.connect(null, timeout);
- }
- }
- }
- }
- else {
- connectStatus = new ConnectionStatus(false);
- SystemMessage msg = starter.getErrorMessage();
- String errorMsg = null;
- if (msg == null)
- {
- errorMsg = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
- }
- else
- {
- errorMsg = msg.getLevelTwoText();
- }
- connectStatus.setMessage(errorMsg);
- }
- return connectStatus;
- }
-
- /**
- * Connection to a server via the RSE daemon.
- *
- * @param info the signon information
- * @param serverLauncher the server launcher
- * @param alertedNONSSL indication of whether an alert for NON-ssl has already been issued
- * @param monitor the progress monitor
- *
- * @return a pair of connection statuses - the launch status for the daemon and the connect status for the server
- * @since 3.1
- */
- protected ConnectionStatusPair connectWithDaemon(SystemSignonInformation info, IRemoteServerLauncher serverLauncher, Boolean alertedNONSSL, IProgressMonitor monitor) throws InterruptedException {
- if (monitor != null) {
- String cmsg = ConnectorServiceResources.MSG_STARTING_SERVER_VIA_DAEMON;
- monitor.subTask(cmsg);
- }
-
- ConnectionStatus connectStatus = null;
-
- // 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()));
-
-
- int daemonPort = 0;
- if (serverLauncher != null)
- daemonPort = serverLauncher.getDaemonPort();
-
- // 205986 FIRST TRY SSL, THEN NON-SECURE!
- boolean usedSSL = true;
- setSSLProperties(true);
-
- // get Socket Timeout Value Preference
- int timeout = getSocketTimeOutValue();
-
- ConnectionStatus launchStatus = launchServer(clientConnection, info, daemonPort, monitor, timeout);
- if (!launchStatus.isConnected() && !clientConnection.isKnownStatus(launchStatus.getMessage()))
- {
- Throwable conE = launchStatus.getException();
- if (conE instanceof SSLHandshakeException)
- {
- List certs = launchStatus.getUntrustedCertificates();
- if (certs != null && certs.size() > 0)
- {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null){
- if (provider.importCertificates(certs, getHostName())){
- return connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor);
- }
- else{
- _isConnecting = false;
- throw new InterruptedException();
- }
- }
- }
-
- }
-
- if (setSSLProperties(false))
- {
- usedSSL = false;
-
- boolean allowNonSSL = true;
- // warning before launch without SSL
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- if (store.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL))
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_NOT_USING_SSL, getHostName());
- SystemMessage msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_NOT_USING_SSL, IStatus.INFO, cmsg);
-
- DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_NONSSL);
- Display.getDefault().syncExec(msgAction);
- if (msgAction.getReturnCode() != IDialogConstants.YES_ID){
- allowNonSSL = false;
- } else {
- alertedNONSSL = new Boolean(true); // changing value to true
- }
- }
- if (allowNonSSL){
- launchStatus = launchServer(clientConnection, info, daemonPort, monitor, timeout);
- }
- else {
- _isConnecting = false;
- clientConnection = null;
-
- throw new OperationCanceledException();
- }
- }
- }
-
- if (!launchStatus.isConnected()) { // launch failed
- String launchMsg = launchStatus.getMessage();
- // If password has expired and must be changed
- if (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
- {
- SystemSignonInformation oldCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
- SystemSignonInformation newCredentials = null;
- while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
- {
- String pmsg = null;
- String pmsgDetails = null;
- String msgId = null;
- boolean expired = isPasswordExpired(launchMsg);
- if (expired){
- pmsg = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED;
- pmsgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS;
- msgId = IConnectorServiceMessageIds.MSG_VALIDATE_PASSWORD_EXPIRED;
- }
- else {
- pmsg = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID;
- pmsgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID_DETAILS;
- msgId = IConnectorServiceMessageIds.MSG_VALIDATE_PASSWORD_INVALID;
- }
-
- SystemMessage message = createSystemMessage(msgId,IStatus.ERROR, pmsg, pmsgDetails);
- try {
- getCredentialsProvider().repairCredentials(message);
- } catch (OperationCanceledException e) {
- _isConnecting = false;
- clientConnection = null;
- throw e;
- }
- newCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
- launchStatus = changePassword(clientConnection, oldCredentials, serverLauncher, monitor, newCredentials.getPassword());
- launchMsg = launchStatus.getMessage();
- }
- if (newCredentials != null){
- info = newCredentials;
- }
- if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT)){
- return connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor);
- }
- }
- else if (launchMsg != null && isPortOutOfRange(launchMsg))
- {
- _isConnecting = false;
-
- int colonIndex = launchMsg.indexOf(':');
- String portRange = launchMsg.substring(colonIndex + 1);
-
- String pmsg =NLS.bind(ConnectorServiceResources.MSG_PORT_OUT_RANGE, portRange);
- SystemMessage message = createSystemMessage(IConnectorServiceMessageIds.MSG_PORT_OUT_RANGE, IStatus.ERROR, pmsg);
-
- // message handled here
- ShowConnectMessage msgAction = new ShowConnectMessage(message);
- Display.getDefault().asyncExec(msgAction);
- return null; // null here indicates no further processing required by internalConnect
- }
- else
- {
- SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null); //$NON-NLS-1$
- }
- }
- else { // launch succeeded
- if (monitor != null)
- {
- if (clientConnection == null){
- SystemBasePlugin.logError("client connection is null!"); //$NON-NLS-1$
- }
- String pmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
- monitor.subTask(pmsg);
- }
- // 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)) { // failed to connect to the server that was launched
- if (conE instanceof SSLHandshakeException){ // cause of failure was an SSL handshake exception
- List certs = connectStatus.getUntrustedCertificates();
- if (certs != null && certs.size() > 0) {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null){
- if (provider.importCertificates(certs, getHostName())) { // import the certificates and try again
- return connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor);
- }
- else {
- _isConnecting = false;
- throw new InterruptedException();
- }
- }
- }
- }
-
- // relaunching the server via the daemon so that we can connect again to the launched server with toggled useSSL settings
- launchStatus = launchServer(clientConnection, info, daemonPort, monitor);
- if (launchStatus.isConnected()) {
- if (setSSLProperties(!usedSSL)){
- connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
- }
- }
- }
-
- // failure to connect diagnosis - not sure why this is here since I would expect this case was already handled
- // leaving it here just in case - will review later
- if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
- {
- List certs = connectStatus.getUntrustedCertificates();
- if (certs != null && certs.size() > 0) {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null) {
- if (provider.importCertificates(certs, getHostName())){
- return connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor);
- }
- else {
- _isConnecting = false;
- throw new InterruptedException();
- }
- }
- }
- }
- }
-
- return new ConnectionStatusPair(connectStatus, launchStatus);
- }
-
- /**
- * Connect to a running server.
- *
- * @param monitor the progress monitor
- *
- * @return the connection status
- * @since 3.1
- */
- protected ConnectionStatus connectWithRunning(IProgressMonitor monitor){
- if (monitor != null)
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
- monitor.subTask(cmsg);
- }
- // connect directly
- boolean useSSL = isUsingSSL();
- setSSLProperties(useSSL);
-
- // get Socket Timeout Value Preference
- int timeout = getSocketTimeOutValue();
- return clientConnection.connect(null, timeout);
- }
-
- /**
- * Connect via an overridden launchServer method
- *
- * @param clientConnection the clientConnection
- * @param info the signon info
- * @param serverLauncher the server launcher
- * @param monitor the progress monitor
- *
- * @return the connection status
- *
- * @since 3.1
- */
- protected ConnectionStatus connectWithOther(ClientConnection clientConnection, SystemSignonInformation info, IServerLauncherProperties serverLauncher, IProgressMonitor monitor) throws Exception {
- ConnectionStatus connectStatus = launchServer(clientConnection, info, serverLauncher, monitor);
- if (!connectStatus.isConnected() && !clientConnection.isKnownStatus(connectStatus.getMessage())){
- if (connectStatus.isSLLProblem()){
- if (setSSLProperties(true)){
- connectStatus = launchServer(clientConnection, info, serverLauncher, monitor);
- if (!connectStatus.isConnected() && connectStatus.isSLLProblem()){
- List certs = connectStatus.getUntrustedCertificates();
- if (certs != null && certs.size() > 0){ // we have untrusted certificates - so import them
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null){
- if (provider.importCertificates(certs, getHostName())){
- return connectWithOther(clientConnection, info, serverLauncher, monitor);
- }
- else
- {
- _isConnecting = false;
- throw new InterruptedException();
- }
- }
- }
- else { // SSL connect problem
- return null;
- }
- }
- }
- }
- }
- return connectStatus;
- }
- /**
- * Initialize the DataStore connection.
- *
- * @param launchStatus the launch status if the server was launched via the daemon. Otherwise, null.
- * @param connectStatus the connect status for the server
- * @param alertedNONSSL a boolean indicating whether the user has been alerted to a NON-ssl connection
- * @param monitor the status monitor
- *
- * @since 3.1
- */
- protected void initializeConnection(ConnectionStatus launchStatus, ConnectionStatus connectStatus, Boolean alertedNONSSL, IProgressMonitor monitor) throws Exception {
- SystemMessage msg = null;
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- if (clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_SSL))
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_USING_SSL, getHostName());
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_USING_SSL, IStatus.INFO, cmsg);
-
- DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_SSL);
- Display.getDefault().syncExec(msgAction);
- if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
- {
- internalDisconnect(monitor);
- _isConnecting = false;
- throw new InterruptedException();
- }
- }
- else if (!clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL))
- {
- if (!alertedNONSSL.booleanValue()){ // only alert if we haven't already
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_NOT_USING_SSL, getHostName());
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_NOT_USING_SSL, IStatus.INFO, cmsg);
-
- DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_NONSSL);
- Display.getDefault().syncExec(msgAction);
- if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
- {
- internalDisconnect(monitor);
- _isConnecting = false;
- throw new InterruptedException();
- }
- }
- }
-
- DataStore dataStore = clientConnection.getDataStore();
-
- _connectionStatusListener = new ConnectionStatusListener(dataStore.getStatus(), this);
- dataStore.getDomainNotifier().addDomainListener(_connectionStatusListener);
-
- StatusMonitor statusMonitor = StatusMonitorFactory.getInstance().getStatusMonitorFor(this, dataStore);
-
- if (launchStatus != null && launchStatus.isConnected())
- {
- DataElement ticket = dataStore.createTicket(launchStatus.getTicket());
- dataStore.queryShowTicket(ticket);
- }
- else
- {
- dataStore.showTicket(null);
- }
-
- StartSpiritThread thread = new StartSpiritThread(dataStore);
- thread.start();
-
- // 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))
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_CLIENT_OLDER_WARNING, getHostName());
- String cmsgDetail = ConnectorServiceResources.MSG_COMM_CLIENT_OLDER_WARNING_DETAILS;
-
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_CLIENT_OLDER_WARNING, IStatus.WARNING, cmsg, cmsgDetail);
-
- }
- else if (message.startsWith(ClientConnection.SERVER_OLDER))
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_SERVER_OLDER_WARNING, getHostName());
- String cmsgDetail = ConnectorServiceResources.MSG_COMM_SERVER_OLDER_WARNING_DETAILS;
-
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_SERVER_OLDER_WARNING, IStatus.WARNING, cmsg, cmsgDetail);
- }
-
- if (store.getBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER)){
- DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER, false);
- Display.getDefault().syncExec(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
- boolean cacheRemoteClasses = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
-
- // this preference is set on the server side
- dataStore.setPreference(RemoteClassLoader.CACHING_PREFERENCE, cacheRemoteClasses ? "true" : "false", true); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (serverVersion >= 8){ // keepalive preferences
- boolean doKeepalive = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
-
- int keepaliveResponseTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
- if (keepaliveResponseTimeout == 0){ // use the default
- keepaliveResponseTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
- }
-
- int socketTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
- if (socketTimeout == 0){ // use the default
- socketTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
- }
-
- // these preferences are only for the client
- dataStore.setPreference(XMLparser.KEEPALIVE_ENABLED_PREFERENCE, doKeepalive ? "true" : "false", false); //$NON-NLS-1$//$NON-NLS-2$
- dataStore.setPreference(XMLparser.KEEPALIVE_RESPONSE_TIMEOUT_PREFERENCE, ""+ keepaliveResponseTimeout, false); //$NON-NLS-1$
- dataStore.setPreference(XMLparser.IO_SOCKET_READ_TIMEOUT_PREFERENCE, ""+socketTimeout, false); //$NON-NLS-1$
- }
- }
- else
- {
- dataStore.addMinersLocation("."); //$NON-NLS-1$
- // older servers initialized in one shot
- dataStore.getSchema();
-
- // Initialzie the miners
- if (monitor != null)
- {
- String imsg = ConnectorServiceResources.MSG_INITIALIZING_SERVER;
- monitor.subTask(imsg);
- }
- DataElement initStatus = dataStore.initMiners();
- statusMonitor.waitForUpdate(initStatus);
- }
- }
-
- /**
- * Diagnostics the occurs after the failure of a connect.
- *
- * @param launchStatus the status of the launching of the server (if a daemon was used)
- * @param connectStatus the status of the connecting to the server
- * @param serverLauncher the server launcher
- * @param serverLauncherType the type of server launcher
- * @param monitor the progress monitor
- *
- * @since 3.1
- */
- protected void handleConnectionFailure(ConnectionStatus launchStatus, ConnectionStatus connectStatus, IRemoteServerLauncher serverLauncher, ServerLaunchType serverLauncherType, IProgressMonitor monitor) throws Exception
- {
- SystemMessage msg = null;
- boolean launchFailed = false;
- if (launchStatus != null){
- launchFailed = !launchStatus.isConnected();
- }
- // if daemon launch failed because of an SSL problem
- if (launchFailed && 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()))
- {
- _isConnecting = false;
- internalConnect(monitor);
- return;
- }
- }
- }
- else
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECT_SSL_EXCEPTION, launchStatus.getMessage());
- String cmsgDetails = ConnectorServiceResources.MSG_CONNECT_SSL_EXCEPTION_DETAILS;
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_CONNECT_SSL_EXCEPTION, IStatus.ERROR, cmsg, cmsgDetails);
- }
- }
- }
-
- // 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();
- String fmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECT_DAEMON_FAILED_EXCEPTION, getHostName(), ""+serverLauncher.getDaemonPort()); //$NON-NLS-1$
-
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_CONNECT_DAEMON_FAILED_EXCEPTION, IStatus.ERROR, fmsg, exception);
- }
- else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1)
- {
- _isConnecting = false;
- if (launchFailed)
- {
- clearPassword(true, true);
- }
-
- // Display error message
- String msgTxt = CommonMessages.MSG_COMM_AUTH_FAILED;
- String msgDetails = NLS.bind(CommonMessages.MSG_COMM_AUTH_FAILED_DETAILS, getHostName());
-
- msg = createSystemMessage(ICommonMessageIds.MSG_COMM_AUTH_FAILED, IStatus.ERROR, msgTxt, msgDetails);
-
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(msg);
- Display.getDefault().syncExec(msgAction);
-
- // Re-prompt for password
- connectException = null;
- Display.getDefault().syncExec(new Runnable()
- {
- public void run()
- {
- try
- {
- acquireCredentials(true);
- }
- catch (OperationCanceledException e)
- {
- connectException = e;
- }
- }
- });
-
- // Check if the user cancelled the prompt
- if (connectException instanceof OperationCanceledException)
- {
- 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)))
- {
- _isConnecting = false;
- SystemSignonInformation oldCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
- SystemSignonInformation newCredentials = null;
- while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
- {
- String msgTxt = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID;
- String msgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID_DETAILS;
- String msgId = IConnectorServiceMessageIds.MSG_VALIDATE_PASSWORD_INVALID;
- if (isPasswordExpired(launchMsg)){
- msgTxt = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED;
- msgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS;
- msgId = IConnectorServiceMessageIds.MSG_VALIDATE_PASSWORD_EXPIRED;
- }
-
- SystemMessage message = createSystemMessage(msgId, IStatus.ERROR, msgTxt, msgDetails);
-
- getCredentialsProvider().repairCredentials(message);
- newCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
- launchStatus = changePassword(clientConnection, oldCredentials, serverLauncher, monitor, newCredentials.getPassword());
- launchMsg = launchStatus.getMessage();
- }
- if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT))
- {
- internalConnect(monitor);
- return;
- }
-// 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)
- {
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_CONNECT_DAEMON_FAILED, getHostName(), clientConnection.getPort());
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_CONNECT_DAEMON_FAILED, IStatus.ERROR, msgTxt, launchMsg);
- }
- }
-
- // if connection failed for known reason
- else if (connectStatus != null && !connectStatus.isConnected())
- {
- if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_SERVER_UPDATE))
- {
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_UPDATE, getHostName());
- String msgDetails = ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_UPDATE_DETAILS;
-
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_INCOMPATIBLE_UPDATE, IStatus.ERROR, msgTxt, msgDetails);
- }
- else if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_PROTOCOL))
- {
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_PROTOCOL, getHostName());
- String msgDetails = ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_PROTOCOL_DETAILS;
-
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_INCOMPATIBLE_PROTOCOL, IStatus.ERROR, msgTxt, msgDetails);
- }
- else
- {
- Throwable exception = connectStatus.getException();
- if (exception instanceof SSLHandshakeException)
- {
- List certs = connectStatus.getUntrustedCertificates();
- if (certs != null && certs.size() > 0)
- {
- ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
- if (provider != null)
- {
- _isConnecting = false;
- provider.importCertificates(certs, getHostName());
-
-
- // Don't attempt reconnect when server was started manually. The problem is that
- // in that situation, the server will have terminated on the failed connection
- // due to the missing certs
- if (serverLauncherType != ServerLaunchType.RUNNING_LITERAL){
- internalConnect(monitor);
- }
- return;
- }
- }
- }
- else if (exception != null)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- msg = createSystemMessage(ICommonMessageIds.MSG_CONNECT_FAILED, IStatus.ERROR, msgTxt, exception);
- }
- else if (connectStatus.getMessage() != null){
- msg = createSystemMessage(ICommonMessageIds.MSG_CONNECT_FAILED, IStatus.ERROR, connectStatus.getMessage());
- }
- }
- }
-
- // if connect failed for unknown reason
- else if (connectStatus == null)
- {
- SystemBasePlugin.logError("Failed to connect to remote system", null); //$NON-NLS-1$
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
- String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED_DETAILS, getHostName());
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_CONNECT_FAILED, IStatus.ERROR, msgTxt, msgDetails);
- }
-
- // 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$
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
- String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED_DETAILS, getHostName());
- msg = createSystemMessage(IConnectorServiceMessageIds.MSG_COMM_CONNECT_FAILED, IStatus.ERROR, msgTxt, msgDetails);
- }
-
- clientConnection.disconnect();
- clientConnection = null;
-
- // yantzi: artemis 6.0, check for invalid login (user ID / pwd) and reprompt for signon information
- if (msg != null &&
- // tODO use ID or something instead of string
- msg.getLevelOneText().startsWith(NLS.bind(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN, getHostName())))
- {
- if (launchFailed)
- {
- clearPassword(true, 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
- {
- acquireCredentials(true);
- }
- catch (OperationCanceledException e)
- {
- connectException = e;
- }
- }
- });
-
- _isConnecting = false;
-
- // Check if the user cancelled the prompt
- if (connectException instanceof OperationCanceledException)
- {
- 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;
- }
-
- _isConnecting = false;
- throw new SystemMessageException(msg);
-
- }
-
-
-
- /**
- * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(IProgressMonitor)
- */
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- if (isConnected() || _isConnecting) {
- return;
- }
-
- _isConnecting = true;
- Boolean alertedNONSSL = new Boolean(false);
-
- // 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()));
-
- getPrimarySubSystem();
- IRemoteServerLauncher serverLauncher = getDStoreServerLauncher();
-
- ServerLaunchType serverLauncherType = null;
- if (serverLauncher != null){
- serverLauncherType = serverLauncher.getServerLaunchType();
- }
-
- SystemSignonInformation info = getSignonInformation();
- if (serverLauncherType == ServerLaunchType.REXEC_LITERAL){ // start the server via REXEC
- connectStatus = connectWithREXEC(info, serverLauncher, monitor);
- }
- else if (serverLauncherType == ServerLaunchType.DAEMON_LITERAL) { // start the server via the daemon
-
- ConnectionStatusPair connectStatusPair = connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor);
- connectStatus = connectStatusPair.getConnectStatus();
- launchStatus = connectStatusPair.getLaunchStatus();
- }
- else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL){ // connect to running server
- connectStatus = connectWithRunning(monitor);
- }
- else { // server launcher type is unknown
- connectStatus = connectWithOther(clientConnection, info, serverLauncher, monitor);
- }
-
- if (connectStatus != null && connectStatus.isConnected()){ // connected
- initializeConnection(launchStatus, connectStatus, alertedNONSSL, monitor);
- }
- else { // diagnosis, reconnection and other connection failure handling
- handleConnectionFailure(launchStatus, connectStatus, serverLauncher, serverLauncherType, monitor);
- }
- _isConnecting = false;
- }
-
- 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(SystemSignonInformation info, IServerLauncherProperties serverLauncherProperties, IProgressMonitor monitor) throws Exception
- {
- IServerLauncher starter = getRemoteServerLauncher();
- starter.setSignonInformation(info);
- starter.setServerLauncherProperties(serverLauncherProperties);
-
- String serverPort = (String)starter.launch(monitor);
- if (monitor.isCanceled())
- {
- _isConnecting = false;
- SystemMessage msg = createSystemMessage(ICommonMessageIds.MSG_OPERATION_CANCELLED, IStatus.CANCEL, CommonMessages.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;
- }
-
-
- /**
- * @return The DataStore currently being used by this connection.
- */
- public DataStore getDataStore()
- {
- if (clientConnection != null)
- {
- return clientConnection.getDataStore();
- }
- else
- {
- return 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();
- if (host.getSystemType().isWindows()) {
- result = false;
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#supportsUserid()
- */
- public boolean supportsUserId() {
- boolean result = super.supportsUserId();
- if (getHost().getSystemType().isWindows()) {
- result = false;
- }
- return result;
- }
-
-
- /**
- * @since org.eclipse.rse.connectorservice.dstore 3.0
- */
- protected SystemMessage createSystemMessage(String msgId, int severity, String msg) {
- return createSystemMessage(msgId, severity, msg, (String)null);
- }
-
- /**
- * @since org.eclipse.rse.connectorservice.dstore 3.0
- */
- protected SystemMessage createSystemMessage(String msgId, int severity, String msg, Throwable e) {
- return new SimpleSystemMessage(Activator.PLUGIN_ID, msgId, severity, msg, e);
- }
-
- /**
- * @since org.eclipse.rse.connectorservice.dstore 3.0
- */
- protected SystemMessage createSystemMessage(String msgId, int severity, String msg, String msgDetails) {
- return new SimpleSystemMessage(Activator.PLUGIN_ID, msgId, severity, msg, msgDetails);
- }
-
-}
-
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 32d5831bb..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorServiceManager.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-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;
-import org.eclipse.rse.internal.connectorservice.dstore.ConnectorServiceResources;
-
-
-
-/**
- * IConnectorService manager class.
- * There should be only one of these instantiated.
- * Use {@link #getInstance()} 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 command 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 {@link #getInstance()} instead.
- */
- private DStoreConnectorServiceManager()
- {
- }
-
- /**
- * Return singleton instance of this class
- */
- public static DStoreConnectorServiceManager getInstance()
- {
- 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 dc4ac6672..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/IUniversalDStoreConstants.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.
- * David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
- * David McKnight (IBM) - [218685] [api][breaking][dstore] Unable to connect when using SSL.
- * David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [221747] Default Connection Timeout is too high
- * David McKnight (IBM) - [228334] [dstore] Default DataStore connection timeout is too short
- * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short
- *******************************************************************************/
-
-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$
-
- // -------------------------
- // 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$
-
- // Socket timeout preference
- public static final String RESID_PREF_SOCKET_TIMEOUT = RESID_PREF_PREFIX + "sockettimeout"; //$NON-NLS-1$
-
- public static final String RESID_PREF_DO_KEEPALIVE = RESID_PREF_PREFIX + "dokeepalive"; //$NON-NLS-1$
-
- /**
- * @since 3.0
- */
- public static final String RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT = RESID_PREF_PREFIX + "keepalivetimeout"; //$NON-NLS-1$
-
- /**
- * @since 3.0
- */
- public static final String RESID_PREF_SOCKET_READ_TIMEOUT = RESID_PREF_PREFIX + "socketreadtimeout"; //$NON-NLS-1$
-
-
-
- /**
- * @since 3.0
- */
- public static final String ALERT_MISMATCHED_SERVER = RESID_PREFIX + "alert.mismatched.server"; //$NON-NLS-1$
-
-}
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/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 bbc8a5e5f..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [216252] SystemMessages using RSEStatus
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.connectorservice.dstore.util;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-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.internal.connectorservice.dstore.Activator;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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;
-
- String fmsgStr = NLS.bind(CommonMessages.MSG_CONNECT_UNKNOWNHOST, _connection.getPrimarySubSystem().getHost().getAliasName());
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_CONNECT_UNKNOWNHOST, IStatus.ERROR, fmsgStr);
- 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 = RSECorePlugin.getTheSystemRegistry();
- 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();
- }
- }
-
- 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)
- {
- String dfailedMsg = NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName);
-
-
- try{
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_FAILED, IStatus.ERROR, dfailedMsg, exc);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.setException(exc);
- msgDlg.open();
- }
- catch (Exception e){
- }
- }
- /**
- * 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)
- {
- String msg = NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELLED, hostName);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_CANCELLED, IStatus.CANCEL, msg));
- msgDlg.open();
- }
-}
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 5014cada0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/util/StatusMonitor.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
- * David McKnight (IBM) - [229947] [dstore] interruption to Thread.sleep() should not stop waitForUpdate()
- * David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
- * David McKnight (IBM) - [278341] [dstore] Disconnect on idle causes the client hang
- *******************************************************************************/
-
-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.core.model.DataStoreSchema;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 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 = 50;
- if ( wait > 0 )
- WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
- else if ( wait == -1 ) // force a diagnostic
- WaitThreshold = -1;
-
- int initialWaitThreshold = WaitThreshold;
- int nudges = 0; // nudges used for waking up server with slow connections
- // nudge up to 12 times before giving up
-
- 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
- {
- try
- {
- Thread.sleep(100);
- }
- catch (InterruptedException e)
- {
- // Continue waiting in case of spurious interrupt.
- // We check the progress monitor to listen for Eclipse Shutdown.
- continue;
- }
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- wakeupServer(status);
-
- // no diagnostic factory but there is a timeout
- if (nudges >= 12)
- return status; // returning the undone status object
-
- nudges++;
- WaitThreshold = initialWaitThreshold;
- }
- else if (_networkDown || !_dataStore.isConnected())
- {
- 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
- {
- try
- {
- Thread.sleep(100);
- }
- catch (InterruptedException e)
- {
- // Continue waiting in case of spurious interrupt.
- // We check the progress monitor to listen for Eclipse Shutdown.
- continue;
- }
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- wakeupServer(status);
-
- // no diagnostic factory but there is a timeout
- if (nudges >= 12)
- return status; // returning the undone status object
-
- nudges++;
- WaitThreshold = initialWaitThreshold;
- }
- else if (_networkDown)
- {
- dispose();
- throw new InterruptedException();
- }
- }
- }
- }
-
-
- return status;
- }
-
- private void wakeupServer(DataElement status)
- {
- if (status != null)
- {
- // token command to wake up update handler
- DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
- DataElement subject = status.getParent().get(0);
- if (cmdDescriptor != null)
- {
- _dataStore.command(cmdDescriptor, subject);
- }
- }
- }
-
- /**
- * Start diagnostic
- *
- * @param factory 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
- }
-
-
-}
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.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/Activator.java
deleted file mode 100644
index d58954f2f..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/Activator.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220123] [api][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
- * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short
- * David McKnight (IBM) - [233160] [dstore] SSL/non-SSL alert are not appropriate
- * Martin Oberhuber (Wind River) - [245918] Allow customization of DStore Preferences
- *******************************************************************************/
-
-package org.eclipse.rse.internal.connectorservice.dstore;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.connectorservice.dstore.IUniversalDStoreConstants;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-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;
-
- public final static String PLUGIN_ID = "org.eclipse.rse.connectorservice.dstore"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
-
- initializeDefaultPreferences();
- }
-
- public void initializeDefaultPreferences() {
-
- // [245918] Since our Preferences are stored in RSEUIPlugin, we cannot
- // use the core.runtime.preferences extension in order to do
- // initialization in the correct order (allow overriding by
- // plugin_customization.ini). We therefore explicitly check each
- // Preference slot, and only set a there isn't one set already.
- // This requires explicit access to the DefaultScope().
- // TODO move Preferences to our own PreferenceStore to simplify this
- IPreferenceStore store = new ScopedPreferenceStore(new DefaultScope(), RSEUIPlugin.getDefault().getBundle().getSymbolicName());
- //IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- //Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
-
- //In DefaultScope, isDefault() means: no value specified in defaultScope, fallback to default-default
- //In this case (no default specified yet), we may specify our default
- if (store.isDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT))
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, IDStoreDefaultPreferenceConstants.DEFAULT_PREF_SOCKET_TIMEOUT);
-
- // do keepalive
- if (store.isDefault(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE))
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE, IDStoreDefaultPreferenceConstants.DEFAULT_PREF_DO_KEEPALIVE);
-
- // socket read timeout
- if (store.isDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT))
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT, IDStoreDefaultPreferenceConstants.DEFAULT_PREF_SOCKET_READ_TIMEOUT);
-
- // keepalive response timeout
- if (store.isDefault(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT))
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT,
- IDStoreDefaultPreferenceConstants.DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
-
- // show mismatched server warning
- if (store.isDefault(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER))
- store.setDefault(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER, IDStoreDefaultPreferenceConstants.DEFAULT_ALERT_MISMATCHED_SERVER);
-
- // cache remote classes
- if (store.isDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES))
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, IDStoreDefaultPreferenceConstants.DEFAULT_PREF_CACHE_REMOTE_CLASSES);
-
- // alert defaults
- if (store.isDefault(ISystemPreferencesConstants.ALERT_SSL))
- store.setDefault(ISystemPreferencesConstants.ALERT_SSL, ISystemPreferencesConstants.DEFAULT_ALERT_SSL);
- if (store.isDefault(ISystemPreferencesConstants.ALERT_NONSSL))
- 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
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.java
deleted file mode 100644
index 4823906a1..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.connectorservice.dstore;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ConnectorServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.connectorservice.dstore.ConnectorServiceResources";//$NON-NLS-1$
-
- public static String DStore_ConnectorService_Label;
- public static String DStore_ConnectorService_Description;
-
-
- public static String MSG_CONNECT_SSL_EXCEPTION;
- public static String MSG_CONNECT_SSL_EXCEPTION_DETAILS;
- public static String MSG_STARTING_SERVER_VIA_REXEC;
- public static String MSG_STARTING_SERVER_VIA_DAEMON;
-
- public static String MSG_CONNECTING_TO_SERVER;
- public static String MSG_INITIALIZING_SERVER;
- public static String MSG_PORT_OUT_RANGE;
-
- public static String MSG_COMM_CONNECT_FAILED;
- public static String MSG_COMM_CONNECT_FAILED_DETAILS;
-
- public static String MSG_VALIDATE_PASSWORD_EXPIRED;
- public static String MSG_VALIDATE_PASSWORD_INVALID;
-
- public static String MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS;
- public static String MSG_VALIDATE_PASSWORD_INVALID_DETAILS;
-
- public static String MSG_COMM_USING_SSL;
- public static String MSG_COMM_NOT_USING_SSL;
-
- public static String MSG_COMM_SERVER_OLDER_WARNING;
- public static String MSG_COMM_CLIENT_OLDER_WARNING;
- public static String MSG_COMM_SERVER_OLDER_WARNING_DETAILS;
- public static String MSG_COMM_CLIENT_OLDER_WARNING_DETAILS;
-
- public static String MSG_CONNECT_DAEMON_FAILED;
- public static String MSG_CONNECT_DAEMON_FAILED_EXCEPTION;
-
- public static String MSG_COMM_INCOMPATIBLE_PROTOCOL;
- public static String MSG_COMM_INCOMPATIBLE_UPDATE;
- public static String MSG_COMM_INCOMPATIBLE_PROTOCOL_DETAILS;
- public static String MSG_COMM_INCOMPATIBLE_UPDATE_DETAILS;
-
- public static String MSG_COMM_INVALID_LOGIN;
- public static String MSG_COMM_INVALID_LOGIN_DETAILS;
-
-
- public static String MSG_COMM_REXEC_NOTSTARTED;
- public static String MSG_COMM_REXEC_NOTSTARTED_DETAILS;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ConnectorServiceResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties
deleted file mode 100644
index 1e45d4976..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties
+++ /dev/null
@@ -1,77 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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:
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-# David McKnight (IBM) - [287135] TVT35:TCT652: FRA - RSE - Apostrophe issue in SSL message
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# 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.
-
-MSG_COMM_CONNECT_FAILED=Connection to {0} could not be established.
-MSG_COMM_CONNECT_FAILED_DETAILS=A socket connection to {0} 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.
-
-
-MSG_CONNECT_SSL_EXCEPTION = Unable to establish a secure connection with the Remote System Explorer host server.
-MSG_CONNECT_SSL_EXCEPTION_DETAILS = Make sure both the client and server are configured to use SSL. The SSL handshake between client and server failed with the following exception: {0}
-
-MSG_STARTING_SERVER_VIA_REXEC = Remote System Explorer host server using REXEC
-
-MSG_STARTING_SERVER_VIA_DAEMON = Starting Remote System Explorer host server using daemon
-
-MSG_CONNECTING_TO_SERVER= Connecting to Remote System Explorer host server on port {0}
-MSG_INITIALIZING_SERVER= Initializing Remote System Explorer host server
-MSG_PORT_OUT_RANGE = The specified server port is out of the allowed range: {0}
-
-MSG_VALIDATE_PASSWORD_EXPIRED=Password has expired
-MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS=Your password has expired, and must be reset before continuing.
-
-MSG_VALIDATE_PASSWORD_INVALID=The new password is invalid.
-MSG_VALIDATE_PASSWORD_INVALID_DETAILS=The remote system indicated that the new password is unacceptable. Please ensure the new password follows all password rules for the remote system.
-
-MSG_COMM_USING_SSL=Communication with the remote system {0} has been secured using SSL. Continue?
-MSG_COMM_NOT_USING_SSL=Connection {0} has not been secured using SSL. Proceed anyway?
-
-MSG_COMM_SERVER_OLDER_WARNING=The host server running on remote system {0} is an older version than the RSE client.
-MSG_COMM_SERVER_OLDER_WARNING_DETAILS=It is recommended that the client and server versions match.
-MSG_COMM_CLIENT_OLDER_WARNING=The host server running on remote system {0} is a newer version than the RSE client.
-MSG_COMM_CLIENT_OLDER_WARNING_DETAILS=It is recommended that the client and server versions match.
-
-
-MSG_CONNECT_DAEMON_FAILED=Daemon failed to launch server on {0} using port {1}
-MSG_CONNECT_DAEMON_FAILED_EXCEPTION=Failed to connect to the daemon on {0} using port {1} with an unexpected exception
-
-
-MSG_COMM_INCOMPATIBLE_PROTOCOL=Incompatible host server running on remote system {0}.
-MSG_COMM_INCOMPATIBLE_PROTOCOL_DETAILS=The host server is not a Remote System Explorer server.
-
-MSG_COMM_INCOMPATIBLE_UPDATE=Incompatible Remote System Explorer host server running on remote system {0}.
-MSG_COMM_INCOMPATIBLE_UPDATE_DETAILS=The host server needs to be updated to work with the current client.
-
-
-MSG_COMM_INVALID_LOGIN=Invalid password or user ID for {0}.
-MSG_COMM_INVALID_LOGIN_DETAILS=Message from host: {0}
-
-MSG_COMM_REXEC_NOTSTARTED=Unable to connect to REXEC host service on port {0} of host {1}
-MSG_COMM_REXEC_NOTSTARTED_DETAILS=Message from host: {0}
-
-
-
-
-
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.java
deleted file mode 100644
index f05319ec9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
- * David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
- ********************************************************************************/
-package org.eclipse.rse.internal.connectorservice.dstore;
-
-import org.eclipse.osgi.util.NLS;
-
-public class DStoreResources extends NLS {
-
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.connectorservice.dstore.DStoreResources"; //$NON-NLS-1$
-
- public static String RESID_PREFERENCE_CONNECTION_TIMEOUT_LABEL;
- public static String RESID_PREFERENCE_CONNECTION_TIMEOUT_TOOLTIP;
-
- public static String RESID_PREFERENCE_DO_KEEPALIVE_LABEL;
- public static String RESID_PREFERENCE_DO_KEEPALIVE_TOOLTIP;
-
- public static String RESID_PREFERENCE_KEEPALIVE_SOCKET_READ_TIMEOUT_LABEL;
- public static String RESID_PREFERENCE_KEEPALIVE_SOCKET_READ_TIMEOUT_TOOLTIP;
-
- public static String RESID_PREFERENCE_KEEPALIVE_RESPONSE_TIMEOUT_LABEL;
- public static String RESID_PREFERENCE_KEEPALIVE_RESPONSE_TIMEOUT_TOOLTIP;
-
- public static String RESID_PREFERENCE_CACHE_REMOTE_CLASSES_LABEL;
- public static String RESID_PREFERENCE_CACHE_REMOTE_CLASSES_TOOLTIP;
-
- public static String RESID_PREFERENCE_SHOW_MISMATCHED_SERVER_LABEL;
- public static String RESID_PREFERENCE_SHOW_MISMATCHED_SERVER_TOOLTIP;
-
- public static String RESID_PREFERENCE_KEEPALIVE_LABEL;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DStoreResources.class);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.properties
deleted file mode 100644
index 05267726a..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/DStoreResources.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-################################################################################
-# Copyright (c) 2008 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight
-
-# Contributors:
-# David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
-# David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
-#################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_PREFERENCE_CONNECTION_TIMEOUT_LABEL=Connection Timeout (ms)
-RESID_PREFERENCE_CONNECTION_TIMEOUT_TOOLTIP=Time to wait for establishing a Datastore connection.
-
-RESID_PREFERENCE_DO_KEEPALIVE_LABEL=Enable Keepalive
-RESID_PREFERENCE_DO_KEEPALIVE_TOOLTIP=Keep DataStore connections alive when idle.
-
-RESID_PREFERENCE_KEEPALIVE_SOCKET_READ_TIMEOUT_LABEL=Socket Read Timeout (ms)
-RESID_PREFERENCE_KEEPALIVE_SOCKET_READ_TIMEOUT_TOOLTIP=Time to wait for input on a socket before initiating a keepalive request
-
-RESID_PREFERENCE_KEEPALIVE_RESPONSE_TIMEOUT_LABEL=Keepalive Response Timeout (ms)
-RESID_PREFERENCE_KEEPALIVE_RESPONSE_TIMEOUT_TOOLTIP=Time to wait for a response to a keepalive request
-
-RESID_PREFERENCE_CACHE_REMOTE_CLASSES_LABEL=Cache Remote Classes
-RESID_PREFERENCE_CACHE_REMOTE_CLASSES_TOOLTIP=Cache remote server classes. This is only useful when all required classes are unavailable on the server side.
-
-RESID_PREFERENCE_SHOW_MISMATCHED_SERVER_LABEL=Show Mismatched Server Warning
-RESID_PREFERENCE_SHOW_MISMATCHED_SERVER_TOOLTIP=Show a warning when the DataStore server is compatible but older or newer then the current client.
-
-RESID_PREFERENCE_KEEPALIVE_LABEL=Keepalive \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IConnectorServiceMessageIds.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IConnectorServiceMessageIds.java
deleted file mode 100644
index e167485f7..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IConnectorServiceMessageIds.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- ********************************************************************************/
-package org.eclipse.rse.internal.connectorservice.dstore;
-
-public interface IConnectorServiceMessageIds {
-
- 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_COMM_CONNECT_FAILED = "RSEC1001"; //$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_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$
-
- 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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java
deleted file mode 100644
index 81752487d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/IDStoreDefaultPreferenceConstants.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short
- * David McKnight (IBM) - [285083][dstore] default socket timeout preference value is too low
- ********************************************************************************/
-package org.eclipse.rse.internal.connectorservice.dstore;
-
-public interface IDStoreDefaultPreferenceConstants {
- public static final boolean DEFAULT_PREF_CACHE_REMOTE_CLASSES = true;
- public static final int DEFAULT_PREF_SOCKET_TIMEOUT = 10000;
- public static final boolean DEFAULT_PREF_DO_KEEPALIVE = true;
- public static final int DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT = 60000;
- public static final int DEFAULT_PREF_SOCKET_READ_TIMEOUT = 3600000;
- public static final boolean DEFAULT_ALERT_MISMATCHED_SERVER = true;
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java
deleted file mode 100644
index 97fc4df66..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java
+++ /dev/null
@@ -1,1219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [221095] [dstore][launcher] Specified REXEC port number is not used
- * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short
- * David McKnight (IBM) - [235756] [dstore] Unable to connect to host with SSL via REXEC
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.IStatus;
-import org.eclipse.dstore.core.client.ClientConnection;
-import org.eclipse.dstore.core.client.ConnectionStatus;
-import org.eclipse.osgi.util.NLS;
-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.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * 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 = IDStoreDefaultPreferenceConstants.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().isWindows() ? '\\' : '/';
- if (cwd.length() > 0 && cwd.charAt(cwd.length() - 1) != separatorChar)
- cwd += separatorChar;
- // set script...
- this.invocation = ((IRemoteServerLauncher)propertyInfo).getServerScript();
-
- // set port
- this.rexecPort = ((IRemoteServerLauncher)propertyInfo).getRexecPort();
-
- }
-
- /**
- * 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 = _socketTimeoutValue;
-
- 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) {
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN, signonInfo.getHostname());
- String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN_DETAILS, ""); //$NON-NLS-1$
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IConnectorServiceMessageIds.MSG_COMM_INVALID_LOGIN, IStatus.ERROR, msgTxt, msgDetails);
- _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 ){
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN, signonInfo.getHostname());
- String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN_DETAILS, hostMessage);
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IConnectorServiceMessageIds.MSG_COMM_INVALID_LOGIN, IStatus.ERROR, msgTxt, msgDetails);
- _errorMessage = msg;
- } else {
- String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_REXEC_NOTSTARTED, ""+rexecPort, signonInfo.getHostname()); //$NON-NLS-1$
- String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_REXEC_NOTSTARTED_DETAILS, hostMessage);
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IConnectorServiceMessageIds.MSG_COMM_REXEC_NOTSTARTED, IStatus.ERROR, msgTxt, msgDetails);
- _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.
- * @param connectPort the port to use for launching the server
- * @param monitor a monitor for showing progress
- * @see #getErrorMessage()
- * @return Anything you want.
- */
- public Object connect(int connectPort, IProgressMonitor monitor) throws Exception
- {
- clientConnection.setPort(Integer.toString(connectPort));
-
- if (monitor != null)
- {
- String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
- monitor.subTask(cmsg);
- }
-
- // 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ui/propertypages/DStorePreferencePage.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ui/propertypages/DStorePreferencePage.java
deleted file mode 100644
index 58f95f2a1..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/internal/connectorservice/dstore/ui/propertypages/DStorePreferencePage.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
- * David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
- * David McKnight (IBM) - [228334][api][breaking][dstore] Default DataStore connection timeout is too short
- * David Dykstal (IBM) - [232317] add help for this preference page
- ********************************************************************************/
-package org.eclipse.rse.internal.connectorservice.dstore.ui.propertypages;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.rse.connectorservice.dstore.IUniversalDStoreConstants;
-import org.eclipse.rse.internal.connectorservice.dstore.DStoreResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-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.Group;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-public class DStorePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, Listener
-{
-
- private Text _connectionTimeout;
- private Button _doKeepaliveButton;
- private Text _keepaliveResponseTimeout;
- private Text _socketReadTimeout;
-
-// private Button _cacheRemoteClassesButton;
- private Button _showMismatchedServerWarningButton;
-
- protected Control createContents(Composite gparent) {
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX + "DStorePreferencePage"); //$NON-NLS-1$
-
- Composite parent = SystemWidgetHelpers.createComposite(gparent, 2);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Composite connectComposite = SystemWidgetHelpers.createComposite(parent, 2);
-
- SystemWidgetHelpers.createLabel(connectComposite, DStoreResources.RESID_PREFERENCE_CONNECTION_TIMEOUT_LABEL);
-
- _connectionTimeout = new Text(connectComposite, SWT.BORDER);
- //GridData gd = new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.widthHint = 75;
- gd.horizontalSpan =1;
- _connectionTimeout.setLayoutData(gd);
- _connectionTimeout.setTextLimit(10);
- _connectionTimeout.setToolTipText(DStoreResources.RESID_PREFERENCE_CONNECTION_TIMEOUT_TOOLTIP);
- _connectionTimeout.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;
- }
- }
- });
-
-
-// _cacheRemoteClassesButton = SystemWidgetHelpers.createCheckBox(parent, DStoreResources.RESID_PREFERENCE_CACHE_REMOTE_CLASSES_LABEL, this);
-// _cacheRemoteClassesButton.setToolTipText(DStoreResources.RESID_PREFERENCE_CACHE_REMOTE_CLASSES_TOOLTIP);
-// _cacheRemoteClassesButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false));
-// ((GridData)_cacheRemoteClassesButton.getLayoutData()).horizontalSpan = 2;
-
- _showMismatchedServerWarningButton = SystemWidgetHelpers.createCheckBox(parent, DStoreResources.RESID_PREFERENCE_SHOW_MISMATCHED_SERVER_LABEL, this);
- _showMismatchedServerWarningButton.setToolTipText(DStoreResources.RESID_PREFERENCE_SHOW_MISMATCHED_SERVER_TOOLTIP);
- _showMismatchedServerWarningButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false));
- ((GridData)_showMismatchedServerWarningButton.getLayoutData()).horizontalSpan = 2;
-
-
- // keepalive stuff
- Group keepaliveGroup = SystemWidgetHelpers.createGroupComposite(parent, 2, DStoreResources.RESID_PREFERENCE_KEEPALIVE_LABEL);
- layout = new GridLayout();
- layout.numColumns = 2;
- keepaliveGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
- | GridData.GRAB_HORIZONTAL);
- keepaliveGroup.setLayoutData(data);
-
-
-
- _doKeepaliveButton = SystemWidgetHelpers.createCheckBox(keepaliveGroup, DStoreResources.RESID_PREFERENCE_DO_KEEPALIVE_LABEL, this);
- _doKeepaliveButton.setToolTipText(DStoreResources.RESID_PREFERENCE_DO_KEEPALIVE_TOOLTIP);
- _doKeepaliveButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false));
- ((GridData)_doKeepaliveButton.getLayoutData()).horizontalSpan = 2;
-
-
- SystemWidgetHelpers.createLabel(keepaliveGroup, DStoreResources.RESID_PREFERENCE_KEEPALIVE_SOCKET_READ_TIMEOUT_LABEL);
-
- _socketReadTimeout = new Text(keepaliveGroup, SWT.BORDER);
- gd = new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
- gd.widthHint = 75;
- gd.horizontalSpan =1;
- _socketReadTimeout.setLayoutData(gd);
- _socketReadTimeout.setTextLimit(10);
- _socketReadTimeout.setToolTipText(DStoreResources.RESID_PREFERENCE_KEEPALIVE_SOCKET_READ_TIMEOUT_TOOLTIP);
- _socketReadTimeout.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;
- }
- }
- });
-
- SystemWidgetHelpers.createLabel(keepaliveGroup, DStoreResources.RESID_PREFERENCE_KEEPALIVE_RESPONSE_TIMEOUT_LABEL);
-
- _keepaliveResponseTimeout = new Text(keepaliveGroup, SWT.BORDER);
- gd = new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
- gd.widthHint = 75;
- gd.horizontalSpan =1;
- _keepaliveResponseTimeout.setLayoutData(gd);
- _keepaliveResponseTimeout.setTextLimit(10);
- _keepaliveResponseTimeout.setToolTipText(DStoreResources.RESID_PREFERENCE_KEEPALIVE_RESPONSE_TIMEOUT_TOOLTIP);
- _keepaliveResponseTimeout.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;
- }
- }
- });
-
-
-
-
- initControls();
- return parent;
- }
-
- private void initControls()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
-
- // timeout
- int timeout = 0;
- if (store.contains(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT)){
- timeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
- }
- else {
- timeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, timeout);
- }
- _connectionTimeout.setText(""+timeout); //$NON-NLS-1$
-
-
- // cache remote classes
- boolean cacheRemoteClasses = false;
- if (store.contains(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES)) {
- cacheRemoteClasses = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
- }
- else {
- cacheRemoteClasses = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
- store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, cacheRemoteClasses);
- }
-// _cacheRemoteClassesButton.setSelection(cacheRemoteClasses);
-
-
- // do keepalive
- boolean doKeepalive = false;
- if (store.contains(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE)){
- doKeepalive = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
- }
- else {
- doKeepalive = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
- }
- _doKeepaliveButton.setSelection(doKeepalive);
-
- int socketTimeout = 0;
- if (store.contains(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT)){
- socketTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
- }
- else {
- socketTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
- }
- _socketReadTimeout.setText(""+socketTimeout); //$NON-NLS-1$
- _socketReadTimeout.setEnabled(doKeepalive);
-
- int keepaliveTimeout = 0;
- if (store.contains(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT)){
- keepaliveTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
- }
- else {
- keepaliveTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
- }
- _keepaliveResponseTimeout.setText(""+keepaliveTimeout); //$NON-NLS-1$
- _keepaliveResponseTimeout.setEnabled(doKeepalive);
-
- // show mismatched server warning
- boolean showMismatchedWarning = false;
- if (store.contains(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER)){
- showMismatchedWarning = store.getBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
- }
- else {
- showMismatchedWarning = store.getDefaultBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
- }
- _showMismatchedServerWarningButton.setSelection(showMismatchedWarning);
- }
-
- protected void performApply() {
- super.performApply();
- applyValues();
- }
-
- protected void performDefaults() {
- super.performDefaults();
-
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
- int timeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
- _connectionTimeout.setText(""+timeout); //$NON-NLS-1$
-
- // do keepalive
- boolean doKeepalive = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
- _doKeepaliveButton.setSelection(doKeepalive);
-
- // socket read timeout
- int socketTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
-
- _socketReadTimeout.setText(""+socketTimeout); //$NON-NLS-1$
- _socketReadTimeout.setEnabled(doKeepalive);
-
- // keepalive response timeout
- int keepaliveTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
- _keepaliveResponseTimeout.setText(""+keepaliveTimeout); //$NON-NLS-1$
- _keepaliveResponseTimeout.setEnabled(doKeepalive);
-
-
- // show mismatched server warning
- boolean showMismatchedWarning = store.getDefaultBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
- _showMismatchedServerWarningButton.setSelection(showMismatchedWarning);
-
- // cache remote classes
-// boolean cacheRemoteClasses = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
-// _cacheRemoteClassesButton.setSelection(cacheRemoteClasses);
-
- }
-
- public void init(IWorkbench workbench) {
-
- }
-
- public void handleEvent(Event event) {
- if (event.widget == _doKeepaliveButton){
- boolean isEnabled = _doKeepaliveButton.getSelection();
-
- _socketReadTimeout.setEnabled(isEnabled);
- _keepaliveResponseTimeout.setEnabled(isEnabled);
-
- }
- }
-
- private void applyValues()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
- // timeout
- String timeoutStr = _connectionTimeout.getText();
- int timeout = Integer.parseInt(timeoutStr);
- store.setValue(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, timeout);
-
- // do keepalive
- boolean doKeepalive = _doKeepaliveButton.getSelection();
- store.setValue(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE, doKeepalive);
-
-
- // socket read timeout
- String socketTimeoutStr = _socketReadTimeout.getText();
- int socketTimeout = Integer.parseInt(socketTimeoutStr);
- store.setValue(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT, socketTimeout);
-
- // keepalive response timeout
- String keepaliveTimeoutStr = _keepaliveResponseTimeout.getText();
- int keepaliveTimeout = Integer.parseInt(keepaliveTimeoutStr);
- store.setValue(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT, keepaliveTimeout);
-
-
- // cache remote classes
-// boolean cacheRemoteClasses = _cacheRemoteClassesButton.getSelection();
-// store.setValue(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, cacheRemoteClasses);
-
- // show mismatched server warning
- boolean showMismatchedWarning = _showMismatchedServerWarningButton.getSelection();
- store.setValue(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER, showMismatchedWarning);
-
- }
-
- public boolean performOk() {
- applyValues();
- return super.performOk();
- }
-
-
-
-}
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 709b32ef8..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 954c64e77..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/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.connectorservice.local
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.connectorservice.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.connectorservice.local;x-friends:="org.eclipse.rse.subsystems.files.local,org.eclipse.rse.subsystems.processes.local,org.eclipse.rse.subsystems.shells.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 d4cc693f9..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 5, 2007</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 abd77ef03..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
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 053cc3124..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Local Connector Service
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/Activator.java
deleted file mode 100644
index 21231fa1c..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.java
deleted file mode 100644
index 2b69c57b5..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.connectorservice.local;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ConnectorServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.properties
deleted file mode 100644
index ef7dd188c..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ConnectorServiceResources.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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.
-###############################################################################
-
-# 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.
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ILocalSubSystem.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ILocalSubSystem.java
deleted file mode 100644
index 16427b57e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/ILocalSubSystem.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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$
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorService.java
deleted file mode 100644
index 55b4c4302..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorService.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- ********************************************************************************/
-
-package org.eclipse.rse.internal.connectorservice.local;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.BasicConnectorService;
-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 BasicConnectorService
-{
-
- /**
- * 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);
- }
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SuperAbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void internalDisconnect(IProgressMonitor monitor) throws Exception
- {
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
-
- // Fire comm event to signal state changed
- notifyDisconnection();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SuperAbstractConnectorService#internalConnect(org.eclipse.core.runtime.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$
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java
deleted file mode 100644
index 33599921d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.local/src/org/eclipse/rse/internal/connectorservice/local/LocalConnectorServiceManager.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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 {@link #getInstance()} 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 command 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 {@link #getInstance()} instead.
- */
- private LocalConnectorServiceManager()
- {
- }
-
- /**
- * Return singleton instance of this class
- */
- public static LocalConnectorServiceManager getInstance()
- {
- 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 3e8822025..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 2e54f84b7..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Feb 15 10:45:58 EST 2007
-eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/internal/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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 56b02d4ca..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.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.connectorservice.ssh; singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.connectorservice.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services.ssh;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.ui,
- com.jcraft.jsch;bundle-version="[0.1.31,1.0.0)",
- org.eclipse.jsch.core;bundle-version="[1.0.0,2.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.connectorservice.ssh;x-friends:="org.eclipse.rse.subsystems.files.ssh,org.eclipse.rse.subsystems.shells.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 d4cc693f9..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 5, 2007</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 365c66be9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE SSH Connector Service
-providerName = Eclipse.org - DSDP
-
-SshSystemLabel=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 db8a5d3ad..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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"
- label="%SshSystemLabel"
- 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/internal/connectorservice/ssh/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/Activator.java
deleted file mode 100644
index fa890985d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/Activator.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [175686] Adapted to new IJSchService API
- * - copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)
- *******************************************************************************/
-package org.eclipse.rse.internal.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.jsch.core.IJSchService;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.rse.connectorservice.ssh"; //$NON-NLS-1$
- private static Activator plugin;
-
- // ServiceTracker for IJschService
- private ServiceTracker tracker;
-
- /**
- * The constructor
- */
- public Activator() {
- super();
- plugin = this;
- }
-
- //---------------------------------------------------------------------------
- //<copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)>
- //---------------------------------------------------------------------------
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
- tracker.open();
- }
-
- public void stop(BundleContext context) throws Exception {
- try {
- SshConnectorService.shutdown();
- tracker.close();
- } finally {
- plugin = null;
- super.stop(context);
- }
- }
-
- /**
- * Returns an instance of IJSchService from the OSGi Registry.
- * @return An instance of IJSchService, or <code>null</code> if no
- * IJschService service is available.
- */
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-
- //---------------------------------------------------------------------------
- //</copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)>
- //---------------------------------------------------------------------------
-
- /**
- * 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/internal/connectorservice/ssh/ISshConstants.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/ISshConstants.java
deleted file mode 100644
index 464c21c37..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/ISshConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.ssh;
-
-
-/**
- * Defines the constants used by the terminal.ssh Plugin
- */
-public interface ISshConstants {
-
- // 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/internal/connectorservice/ssh/ISshSubSystem.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/ISshSubSystem.java
deleted file mode 100644
index 1a710f261..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/ISshSubSystem.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/connectorservice/ssh/KeyboardInteractiveDialog.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/KeyboardInteractiveDialog.java
deleted file mode 100644
index db08e2354..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.internal.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 cancelled.
- *
- * @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/internal/connectorservice/ssh/SshConnectorResources.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java
deleted file mode 100644
index 8864966b8..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- *******************************************************************************/
-
-package org.eclipse.rse.internal.connectorservice.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshConnectorResources extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.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;
- public static String SshConnectorService_Missing_sshd;
-
- //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;
-
- public static String SSH_SETTINGS_LABEL;
- public static String PROPERTY_LABEL_TIMEOUT;
- public static String PROPERTY_LABEL_KEEPALIVE;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties
deleted file mode 100644
index 4f3f72e1f..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
-# Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
-################################################################################
-
-# 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
-SshConnectorService_Missing_sshd=Failed to connect sshd on "{0}:{1}"
-
-#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}
-
-SSH_SETTINGS_LABEL=SSH Settings
-PROPERTY_LABEL_TIMEOUT=timeout (sec)
-PROPERTY_LABEL_KEEPALIVE=keepalive (sec)
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java
deleted file mode 100644
index b9dbb0afe..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- * - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186761] make the port setting configurable
- * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
- * Martin Oberhuber (Wind River) - [203500] Support encodings for SSH Sftp paths
- * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- *******************************************************************************/
-
-package org.eclipse.rse.internal.connectorservice.ssh;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-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.window.Window;
-import org.eclipse.jsch.core.IJSchService;
-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 com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ILabeledObject;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.PropertyType;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-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.internal.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.subsystems.StandardConnectorService;
-
-/**
- * Create SSH connections.
- */
-public class SshConnectorService extends StandardConnectorService implements ISshSessionProvider
-{
- private static final int SSH_DEFAULT_PORT = 22;
- private static final int CONNECT_DEFAULT_TIMEOUT = 60; //seconds
-
- /** Property Keys. These are API because they are stored persistently. */
- private static final String PROPERTY_SET_SSH_SETTINGS = "SSH Settings"; //$NON-NLS-1$
- private static final String PROPERTY_KEY_TIMEOUT = "timeout(sec)"; //$NON-NLS-1$
- private static final String PROPERTY_KEY_KEEPALIVE = "keepalive(sec)"; //$NON-NLS-1$
-
- private Session session;
- private SessionLostHandler fSessionLostHandler;
- /** Indicates the default string encoding on this platform */
- private static String _defaultEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
-
- public SshConnectorService(IHost host) {
- super(SshConnectorResources.SshConnectorService_Name, SshConnectorResources.SshConnectorService_Description, host, SSH_DEFAULT_PORT);
- fSessionLostHandler = null;
- getPropertySet();
- }
-
- //----------------------------------------------------------------------
- // <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
- //----------------------------------------------------------------------
-
- /**
- * Create a Jsch session.
- * Subclasses can override in order to replace the UserInfo wrapper
- * (for non-interactive usage, for instance), or in order to change
- * the Jsch config (for instance, in order to switch off strict
- * host key checking or in order to add specific ciphers).
- */
- protected Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
- IJSchService service = Activator.getDefault().getJSchService();
- if (service == null)
- return null;
- Session session = service.createSession(hostname, port, username);
-
- IPropertySet propertySet = getPropertySet();
- String timeoutStr = propertySet.getPropertyValue(PROPERTY_KEY_TIMEOUT);
- int timeout = 0; //default is never timeout
- try {
- int value = Integer.parseInt(timeoutStr);
- if (value > 0) {
- timeout = value * 1000;
- }
- } catch (NumberFormatException e) {
- //wrong input - should never happen because property type is Integer
- }
- session.setTimeout(timeout);
-
- int keepalive = 300000; //default is 5 minutes
- String keepaliveStr = propertySet.getPropertyValue(PROPERTY_KEY_KEEPALIVE);
- try {
- int value = Integer.parseInt(keepaliveStr);
- if (value >= 0) {
- keepalive = value * 1000;
- }
- } catch (NumberFormatException e) {
- //wrong input - should never happen because property type is Integer
- }
- if (keepalive > 0) {
- session.setServerAliveInterval(keepalive);
- }
-
-
- session.setServerAliveCountMax(6); //give up after 6 tries (remote will be dead after 30 min)
- if (password != null)
- session.setPassword(password);
- session.setUserInfo(wrapperUI);
- return session;
- }
-
- static void shutdown() {
- //TODO: Store all Jsch sessions in a pool and disconnect them on shutdown
- }
-
- //----------------------------------------------------------------------
- // </copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
- //----------------------------------------------------------------------
-
- protected int getSshPort() {
- int port = getPort();
- if (port<=0) {
- //Legacy "default port" setting
- port = SSH_DEFAULT_PORT;
- }
- return port;
- }
-
- protected void internalConnect(IProgressMonitor monitor) throws Exception
- {
- // Fire comm event to signal state about to change
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
-
- String host = getHostName();
- String user = getUserId();
- String password=""; //$NON-NLS-1$
- SystemSignonInformation ssi = getSignonInformation();
- if (ssi!=null) {
- password = getSignonInformation().getPassword();
- }
- MyUserInfo userInfo = new MyUserInfo(user, password);
- userInfo.aboutToConnect();
-
- try {
- session = createSession(user, password, host, getSshPort(),
- userInfo, monitor);
-
- //java.util.Hashtable config=new java.util.Hashtable();
- //config.put("StrictHostKeyChecking", "no");
- //session.setConfig(config);
- userInfo.aboutToConnect();
-
- 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$
- sessionDisconnect();
- if(e.toString().indexOf("Auth cancel")>=0) { //$NON-NLS-1$
- throw new OperationCanceledException();
- }
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, NLS.bind(SshConnectorResources.SshConnectorService_Missing_sshd,
- host, Integer.toString(getSshPort())), e);
- }
- userInfo.connectionMade();
- fSessionLostHandler = new SessionLostHandler(this);
- notifyConnection();
- }
-
- /**
- * Disconnect the ssh session.
- * Synchronized in order to avoid NPE's from Jsch when called
- * quickly in succession.
- */
- private synchronized void sessionDisconnect() {
- Activator.trace("SshConnectorService.sessionDisconnect"); //$NON-NLS-1$
- try {
- if (session.isConnected())
- session.disconnect();
- } catch(Exception e) {
- //Bug 175328: NPE on disconnect shown in UI
- //This is a non-critical exception so print only in debug mode
- if (Activator.isTracingOn()) e.printStackTrace();
- }
- }
-
- protected 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);
- }
- sessionDisconnect();
-
- // 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
- clearPassword(false, true); // 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 instantiating SshShellService and SshFileService here,
- //and implementing IShellService getShellService()
- //and IFileService getFileService().
- public Session getSession() {
- return session;
- }
-
- public String getControlEncoding() {
- //TODO this code should be in IHost
- String encoding = getHost().getDefaultEncoding(true);
- if (encoding==null) encoding = _defaultEncoding;
- //</code to be in IHost>
- return encoding;
- }
-
- /**
- * 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_CANCELLED, IStatus.CANCEL,
- NLS.bind(CommonMessages.MSG_CONNECT_CANCELLED,
- _connection.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 = RSECorePlugin.getTheSystemRegistry();
- 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)
- {
- //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_FAILED, IStatus.ERROR, NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName), exc);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- 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 msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_CANCELLED, IStatus.CANCEL, NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELLED, hostName));
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- 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; // cancelled
- 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 requiresPassword() {
- return false;
- }
-
- public boolean requiresUserId() {
- return false;
- }
-
- private IPropertySet getPropertySet()
- {
- IPropertySet propertySet = getPropertySet(PROPERTY_SET_SSH_SETTINGS);
- if(propertySet==null) {
- propertySet = createPropertySet(PROPERTY_SET_SSH_SETTINGS);
- }
- if (propertySet instanceof ILabeledObject) {
- //RSE 3.0 and later: translatable labels for properties
- String label = SshConnectorResources.SSH_SETTINGS_LABEL;
- ((ILabeledObject)propertySet).setLabel(label);
- }
-
- //timeout
- IProperty p = propertySet.getProperty(PROPERTY_KEY_TIMEOUT);
- if (p==null) {
- p = propertySet.addProperty(PROPERTY_KEY_TIMEOUT, "0", PropertyType.getIntegerPropertyType()); //$NON-NLS-1$
- }
- p.setLabel(SshConnectorResources.PROPERTY_LABEL_TIMEOUT);
-
- //keepalive
- p = propertySet.getProperty(PROPERTY_KEY_KEEPALIVE);
- if (p==null) {
- p = propertySet.addProperty(PROPERTY_KEY_KEEPALIVE,"300", PropertyType.getIntegerPropertyType()); //$NON-NLS-1$
- }
- p.setLabel(SshConnectorResources.PROPERTY_LABEL_KEEPALIVE);
- return propertySet;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorServiceManager.java
deleted file mode 100644
index 4da2bab7d..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorServiceManager.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 LocalConnectorServiceManager.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.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/internal/connectorservice/ssh/UserValidationDialog.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/UserValidationDialog.java
deleted file mode 100644
index c2ba143f2..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/UserValidationDialog.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.internal.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 cancelled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the username entered by the user, or null
- * if the user cancelled.
- *
- * @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.connectorservice.telnet/.classpath b/rse/plugins/org.eclipse.rse.connectorservice.telnet/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.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.telnet/.cvsignore b/rse/plugins/org.eclipse.rse.connectorservice.telnet/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.options b/rse/plugins/org.eclipse.rse.connectorservice.telnet/.options
deleted file mode 100644
index f4e149375..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.rse.connectorservice.telnet/debug = true
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.project b/rse/plugins/org.eclipse.rse.connectorservice.telnet/.project
deleted file mode 100644
index 22729342e..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.connectorservice.telnet</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.connectorservice.telnet/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.connectorservice.telnet/META-INF/MANIFEST.MF
deleted file mode 100644
index 4b76e3201..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/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.telnet;singleton:=true
-Bundle-Version: 1.2.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.connectorservice.telnet.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services.telnet;bundle-version="[2.0.0,2.1.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.ui,
- org.apache.commons.net;bundle-version="[1.4.1,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.connectorservice.telnet;x-friends:="org.eclipse.rse.subsystems.shells.telnet"
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/about.html b/rse/plugins/org.eclipse.rse.connectorservice.telnet/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/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 5, 2007</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.telnet/build.properties b/rse/plugins/org.eclipse.rse.connectorservice.telnet/build.properties
deleted file mode 100644
index abd77ef03..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/plugin.properties b/rse/plugins/org.eclipse.rse.connectorservice.telnet/plugin.properties
deleted file mode 100644
index 3b0c4c106..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# Sheldon D'souza - String modifications
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Telnet Connector Service
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/Activator.java b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/Activator.java
deleted file mode 100644
index eecfe5361..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/Activator.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * Sheldon D'souza (Celunite) - adapted from connectorservice.ssh/Activator
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.telnet;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.Platform;
-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.telnet"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (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;
- }
-
- /*
- * (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;
- }
-
- 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();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/ITelnetSubSystem.java b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/ITelnetSubSystem.java
deleted file mode 100644
index de180f2dc..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/ITelnetSubSystem.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Celunite, 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:
- * Sheldon D'souza (Celunite) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.telnet;
-
-/**
- * Markup Interface for subsystems using the TelnetConnectorService.
- *
- * By implementing this interface, subsystems can be recognized
- * as being able to share a single telnet connector service between
- * multiple different subsystems.
- */
-public interface ITelnetSubSystem {
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.java b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.java
deleted file mode 100644
index f44b3b566..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Sheldon D'souza (Celunite) - adapted from SshConnectorResources
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.telnet;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TelnetConnectorResources extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.connectorservice.telnet.TelnetConnectorResources"; //$NON-NLS-1$
- static {
- NLS.initializeMessages(BUNDLE_NAME, TelnetConnectorResources.class);
- }
- private TelnetConnectorResources() {
- }
-
- public static String TelnetConnectorService_Name;
- public static String TelnetConnectorService_Description;
-
- //Telnet property set
-
- public static String PropertySet_Description;
-
- public static String TelnetConnectorService_ErrorDisconnecting;
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.properties b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.properties
deleted file mode 100644
index 280c24734..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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
-# Sheldon D'souza (Celunite) - adapted from SshConnectorResources.properties
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-TelnetConnectorService_Name=Telnet Connector Service
-TelnetConnectorService_Description=Telnet Connector Service Description
-
-PropertySet_Description=Telnet login properties. Set these according to your remote system's login prompts.
-
-TelnetConnectorService_ErrorDisconnecting=ConnectionStatusListener: Error disconnecting
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java
deleted file mode 100644
index bd51c8b5a..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java
+++ /dev/null
@@ -1,661 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * David Dykstal (IBM) - [168977] refactoring IConnectorService and ServerLauncher hierarchies
- * Sheldon D'souza (Celunite) - adapted from SshConnectorService
- * Martin Oberhuber (Wind River) - apply refactorings for StandardConnectorService
- * Martin Oberhuber (Wind River) - [178606] fix endless loop in readUntil()
- * Sheldon D'souza (Celunite) - [186536] login and password should be configurable
- * Sheldon D'souza (Celunite) - [186570] handle invalid user id and password more gracefully
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * Sheldon D'souza (Celunite) - [187301] support multiple telnet shells
- * Sheldon D'souza (Celunite) - [194464] fix create multiple telnet shells quickly
- * Martin Oberhuber (Wind River) - [186761] make the port setting configurable
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- * Anna Dushistova (MontaVista) - [198819] [telnet] TelnetConnectorService does not send CommunicationsEvent.BEFORE_CONNECT
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.telnet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.net.telnet.TelnetClient;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.PropertyType;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-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.internal.services.telnet.ITelnetSessionProvider;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.subsystems.StandardConnectorService;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class TelnetConnectorService extends StandardConnectorService implements
- ITelnetSessionProvider {
-
- public static final String PROPERTY_SET_NAME = "Telnet Settings"; //$NON-NLS-1$
- public static final String PROPERTY_LOGIN_REQUIRED = "Login.Required"; //$NON-NLS-1$
- public static final String PROPERTY_LOGIN_PROMPT = "Login.Prompt"; //$NON-NLS-1$
- public static final String PROPERTY_PASSWORD_PROMPT = "Password.Prompt"; //$NON-NLS-1$
- public static final String PROPERTY_COMMAND_PROMPT = "Command.Prompt"; //$NON-NLS-1$
-
- private static final int TELNET_DEFAULT_PORT = 23; // TODO Make configurable
- private static final int TELNET_CONNECT_TIMEOUT = 60; //seconds - TODO: Make configurable
- private List fTelnetClients = new ArrayList();
- private SessionLostHandler fSessionLostHandler;
- private IPropertySet telnetPropertySet = null;
- private static final int ERROR_CODE = 100; // filed error code
- private static final int SUCCESS_CODE = 150; // login pass code
- private static final int CONNECT_CLOSED = 200; // code for end of login attempts
- private static final int CONNECT_CANCELLED = 250; // code for cancel progress
-
- public TelnetConnectorService(IHost host) {
- super(TelnetConnectorResources.TelnetConnectorService_Name,
- TelnetConnectorResources.TelnetConnectorService_Description,
- host, TELNET_DEFAULT_PORT);
- fSessionLostHandler = null;
- telnetPropertySet = getTelnetPropertySet();
- }
-
- /**
- * Return the telnet property set, and fill it with default values if it has
- * not been created yet. Extenders may override in order to set different
- * default values.
- *
- * @return a property set holding properties understood by the telnet
- * connector service.
- */
- protected IPropertySet getTelnetPropertySet() {
- IPropertySet telnetSet = getPropertySet(PROPERTY_SET_NAME);
- if (telnetSet == null) {
- telnetSet = createPropertySet(PROPERTY_SET_NAME,
- TelnetConnectorResources.PropertySet_Description);
- telnetSet.addProperty(PROPERTY_LOGIN_REQUIRED,
- "true", PropertyType.getEnumPropertyType(new String[] { "true", "false" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- telnetSet.addProperty(PROPERTY_LOGIN_PROMPT,
- "ogin: ", PropertyType.getStringPropertyType()); //$NON-NLS-1$
- telnetSet.addProperty(PROPERTY_PASSWORD_PROMPT,
- "assword: ", PropertyType.getStringPropertyType()); //$NON-NLS-1$
- telnetSet.addProperty(PROPERTY_COMMAND_PROMPT,
- "$", PropertyType.getStringPropertyType()); //$NON-NLS-1$
- }
- return telnetSet;
- }
-
- public static void checkCancelled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
-
- protected void internalConnect(IProgressMonitor monitor) throws Exception {
- try {
- // Fire comm event to signal state about to change
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
- TelnetClient client = makeNewTelnetClient(monitor);
- if( client != null ) {
- synchronized(this) {
- fTelnetClients.add(client);
- if (fSessionLostHandler==null) {
- fSessionLostHandler = new SessionLostHandler(this);
- }
- }
- notifyConnection();
- }
- }catch( Exception e) {
- if( e instanceof SystemMessageException ) {
- internalDisconnect( null );
- throw e;
- }
- }
- }
-
- protected int getTelnetPort() {
- int port = getPort();
- if (port<=0) {
- //Legacy "default port" setting
- port = TELNET_DEFAULT_PORT;
- }
- return port;
- }
-
- public TelnetClient makeNewTelnetClient(IProgressMonitor monitor ) throws Exception {
- TelnetClient client = new TelnetClient();
- return loginTelnetClient(client, monitor);
- }
-
- public TelnetClient loginTelnetClient(TelnetClient client, IProgressMonitor monitor) throws SystemMessageException {
- String host = getHostName();
- String user = getUserId();
- String password = ""; //$NON-NLS-1$
- int status = ERROR_CODE;
- Exception nestedException = null;
- try {
- Activator.trace("Telnet Service: Connecting....."); //$NON-NLS-1$
- client.connect(host, getTelnetPort());
- SystemSignonInformation ssi = getSignonInformation();
- if (ssi != null) {
- password = ssi.getPassword();
- }
-
- long millisToEnd = System.currentTimeMillis() + TELNET_CONNECT_TIMEOUT*1000;
- LoginThread checkLogin = new LoginThread(user, password,client.getInputStream(),new PrintStream( client.getOutputStream() ));
- checkLogin.start();
- while (checkLogin.isAlive() && System.currentTimeMillis()<millisToEnd) {
- if (monitor!=null) {
- monitor.worked(1);
- if (monitor.isCanceled()) {
- status = CONNECT_CANCELLED;
- //Thread will be interrupted by sessionDisconnect()
- //checkLogin.interrupt();
- break;
- }
- }
- Display d = Display.getCurrent();
- if (d!=null) {
- while(d.readAndDispatch()) {
- //get next event if on dispatch thread
- }
- }
- checkLogin.join(500);
- }
- if (status != CONNECT_CANCELLED) {
- status = checkLogin.getLoginStatus();
- checkLogin.join();
- }
- } catch (Exception e) {
- Activator.trace("Telnet Service failed: " + e.toString()); //$NON-NLS-1$
- nestedException = e;
- } finally {
- if (status == CONNECT_CANCELLED) {
- Activator.trace("Telnet Service: Cancelled"); //$NON-NLS-1$
- try {
- client.disconnect(); //will eventually destroy the LoginThread
- } catch(Exception e) {
- /*ignore on forced disconnect*/
- }
- client = null;
- } else if (status == SUCCESS_CODE) {
- Activator.trace("Telnet Service: Connected"); //$NON-NLS-1$
- } else {
- Activator.trace("Telnet Service: Connect failed"); //$NON-NLS-1$
- //TODO pass the nested exception as well as original prompts
- //from the remote side with the SystemMessageException for user diagnostics
- SystemMessage msg;
- if (nestedException!=null) {
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_EXCEPTION_OCCURRED,
- IStatus.ERROR,
- CommonMessages.MSG_EXCEPTION_OCCURRED, nestedException);
- } else {
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_COMM_AUTH_FAILED,
- IStatus.ERROR,
- CommonMessages.MSG_COMM_AUTH_FAILED,
- NLS.bind(CommonMessages.MSG_COMM_AUTH_FAILED_DETAILS, getHost().getAliasName()));
-
- msg.makeSubstitution(getHost().getAliasName());
- }
- throw new SystemMessageException(msg);
- }
- }
- return client;
- }
-
- /**
- * Disconnect the telnet session. Synchronized in order to avoid NPE's from
- * commons.net when called quickly in succession.
- */
- private synchronized void sessionDisconnect() {
- Activator.trace("TelnetConnectorService.sessionDisconnect"); //$NON-NLS-1$
- Iterator it = fTelnetClients.iterator();
- while (it.hasNext()) {
- TelnetClient client = (TelnetClient)it.next();
- if (client.isConnected()) {
- try {
- client.disconnect();
- } catch(IOException e) {
- // Avoid NPE on disconnect shown in UI
- // This is a non-critical exception so print only in debug mode
- if (Activator.isTracingOn())
- e.printStackTrace();
- }
- }
- it.remove();
- }
- }
-
- public int readUntil(String pattern,InputStream in) {
- try {
- char lastChar = pattern.charAt(pattern.length() - 1);
- StringBuffer sb = new StringBuffer();
- int ch = in.read();
- while (ch >= 0) {
- char tch = (char) ch;
- if (Activator.isTracingOn())
- System.out.print(tch);
- sb.append(tch);
- if (tch=='t' && sb.indexOf("incorrect") >= 0) { //$NON-NLS-1$
- return ERROR_CODE;
- }
- if (tch=='d' && sb.indexOf("closed") >= 0) { //$NON-NLS-1$
- return CONNECT_CLOSED;
- }
- if (tch == lastChar) {
- if (sb.toString().endsWith(pattern)) {
- return SUCCESS_CODE;
- }
- }
- ch = in.read();
- }
- } catch (Exception e) {
- SystemBasePlugin.logError(e.getMessage() == null ? e.getClass().getName() : e.getMessage(), e);
- }
- return CONNECT_CLOSED;
- }
-
- public void write(String value,PrintStream out) {
- try {
- out.println(value);
- out.flush();
- if (Activator.isTracingOn()) {
- // Avoid printing password to stdout
- // Activator.trace("write: "+value ); //$NON-NLS-1$
- int len = value.length() + 6;
- Activator.trace("write: ******************".substring(0, len <= 24 ? len : 24)); //$NON-NLS-1$
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- protected void internalDisconnect(IProgressMonitor monitor)
- throws Exception {
-
- Activator.trace("Telnet Service: Disconnecting ....."); //$NON-NLS-1$
-
- 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);
- }
-
- sessionDisconnect();
-
- // Fire comm event to signal state changed
- notifyDisconnection();
- }
-
- /**
- * 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_CANCELLED,
- IStatus.CANCEL,
- NLS.bind(CommonMessages.MSG_CONNECT_CANCELLED, _connection.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 = RSECorePlugin.getTheSystemRegistry();
- 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(TelnetConnectorResources.TelnetConnectorService_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 msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_FAILED,
- IStatus.ERROR,
- NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName), exc);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- 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 msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_CANCELLED,
- IStatus.CANCEL,
- NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELLED, hostName));
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- msgDlg.open();
- }
- }
-
- /*
- * A Login Thread to catch errors during login into telnet session
- */
-
- private class LoginThread extends Thread {
-
- private String username;
- private String password;
- private int status = SUCCESS_CODE;
- private InputStream in;
- private PrintStream out;
-
- public LoginThread(String username, String password,InputStream in,PrintStream out) {
- this.username = username;
- this.password = password;
- this.in = in;
- this.out = out;
- }
-
- public void run() {
-
- telnetPropertySet = getTelnetPropertySet();
- String login_required = telnetPropertySet
- .getPropertyValue(PROPERTY_LOGIN_REQUIRED);
- String login_prompt = telnetPropertySet
- .getPropertyValue(PROPERTY_LOGIN_PROMPT);
- String password_prompt = telnetPropertySet
- .getPropertyValue(PROPERTY_PASSWORD_PROMPT);
- String command_prompt = telnetPropertySet
- .getPropertyValue(PROPERTY_COMMAND_PROMPT);
-
- if (Boolean.valueOf(login_required).booleanValue()) {
- status = SUCCESS_CODE;
- if (login_prompt != null && login_prompt.length() > 0) {
- status = readUntil(login_prompt,this.in);
- write(username,this.out);
- }
- if (status == SUCCESS_CODE && password_prompt != null && password_prompt.length() > 0) {
- status = readUntil(password_prompt,this.in);
- write(password,this.out);
- }
- if (status == SUCCESS_CODE && command_prompt != null && command_prompt.length() > 0) {
- status = readUntil(command_prompt,this.in);
- }
- } else {
- if (command_prompt != null && command_prompt.length() > 0) {
- status = readUntil(command_prompt,this.in);
- }
- }
- }
-
- public int getLoginStatus() {
- return this.status;
- }
- }
-
- protected static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if (display == null) {
- display = Display.getDefault();
- }
- return display;
- }
-
- public boolean isConnected() {
- boolean anyConnected = false;
- synchronized(this) {
- Iterator it = fTelnetClients.iterator();
- while (it.hasNext()) {
- TelnetClient client = (TelnetClient)it.next();
- if (client.isConnected()) {
- anyConnected = true;
- } else {
- it.remove();
- }
- }
- }
- if (!anyConnected && fSessionLostHandler != null) {
- Activator.trace("TelnetConnectorService.isConnected: false -> sessionLost"); //$NON-NLS-1$
- fSessionLostHandler.sessionLost();
- }
- return anyConnected;
- }
-
- /**
- * Test if this connector service requires a password. Telnet connector
- * service returns false since a password is not necessarily required, i.e.
- * the corresponding password field may be empty.
- *
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#requiresPassword()
- * @return false
- */
- public boolean requiresPassword() {
- return false;
- }
-
- /**
- * Test if this connector service requires a user id. Telnet connector
- * service returns false since a user id is not necessarily required, i.e.
- * the corresponding user id field may be empty.
- *
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#requiresPassword()
- * @return false
- */
- public boolean requiresUserId() {
- return false;
- }
-
- /**
- * Test if this connector service requires logging in.
- *
- * @return false if the Property {@link #PROPERTY_LOGIN_REQUIRED} is set and
- * false. Returns true otherwise.
- */
- protected boolean supportsLogin() {
- boolean result = true;
- if (telnetPropertySet != null) {
- String login_required = telnetPropertySet.getPropertyValue(PROPERTY_LOGIN_REQUIRED);
- if (login_required != null && login_required.equalsIgnoreCase("false")) { //$NON-NLS-1$
- result = false;
- }
- }
- return result;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.subsystems.StandardConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return supportsLogin();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.subsystems.StandardConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- return supportsLogin();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorServiceManager.java
deleted file mode 100644
index 946d621c9..000000000
--- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorServiceManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 LocalConnectorServiceManager.
- * Sheldon D'souza (Celunite) - Adapted from SshConnectorServiceManager
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.telnet;
-
-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;
-
-public class TelnetConnectorServiceManager extends
- AbstractConnectorServiceManager {
-
- private static TelnetConnectorServiceManager fInstance;
-
- private TelnetConnectorServiceManager() {
- super();
- }
-
- /**
- * Return singleton instance of this class
- * @return the singleton instance
- */
- public static TelnetConnectorServiceManager getInstance()
- {
- if (fInstance == null)
- fInstance = new TelnetConnectorServiceManager();
- return fInstance;
- }
-
-
- public Class getSubSystemCommonInterface(ISubSystem subsystem) {
- return ITelnetSubSystem.class;
- }
-
- public boolean sharesSystem(ISubSystem otherSubSystem) {
- return (otherSubSystem instanceof ITelnetSubSystem);
- }
-
- public IConnectorService createConnectorService(IHost host) {
- IConnectorService service = new TelnetConnectorService(host);
- return service;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/.classpath b/rse/plugins/org.eclipse.rse.core/.classpath
deleted file mode 100644
index b7464f3ca..000000000
--- a/rse/plugins/org.eclipse.rse.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.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 8fbb720bf..000000000
--- a/rse/plugins/org.eclipse.rse.core/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.core/.settings/.api_filters b/rse/plugins/org.eclipse.rse.core/.settings/.api_filters
deleted file mode 100644
index f7502b1ed..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/.api_filters
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.core" version="2">
- <resource path="src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java" type="org.eclipse.rse.core.subsystems.ISubSystemConfiguration">
- <filter id="406052990">
- <message_arguments>
- <message_argument value="org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
- <message_argument value="getFilterPoolManagerList()"/>
- </message_arguments>
- </filter>
- <filter id="406052990">
- <message_arguments>
- <message_argument value="org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
- <message_argument value="getSubSystemList()"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 3c6fe4c38..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Aug 06 17:32:46 CEST 2009
-eclipse.preferences.version=1
-encoding/<project>=ISO-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 138063a1c..000000000
--- a/rse/plugins/org.eclipse.rse.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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.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 bdb469b66..000000000
--- a/rse/plugins/org.eclipse.rse.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.core;singleton:=true
-Bundle-Version: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.core.RSECorePlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.swt
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.core,
- org.eclipse.rse.core.comm,
- org.eclipse.rse.core.events,
- org.eclipse.rse.core.filters,
- org.eclipse.rse.core.model,
- org.eclipse.rse.core.references,
- org.eclipse.rse.core.subsystems,
- org.eclipse.rse.internal.core;x-internal:=true,
- org.eclipse.rse.internal.core.filters;x-internal:=true,
- org.eclipse.rse.internal.core.model;x-internal:=true,
- org.eclipse.rse.internal.core.subsystems;x-internal:=true,
- org.eclipse.rse.internal.logging;x-internal:=true,
- org.eclipse.rse.internal.persistence;x-internal:=true,
- org.eclipse.rse.internal.persistence.dom;x-internal:=true,
- org.eclipse.rse.internal.references;x-internal:=true,
- org.eclipse.rse.logging,
- 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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 bf2e2747f..000000000
--- a/rse/plugins/org.eclipse.rse.core/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-###############################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE Core\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 20c40c9d6..000000000
--- a/rse/plugins/org.eclipse.rse.core/build.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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) - [186525] Move keystoreProviders to core
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- plugin.properties,\
- about.properties,\
- about.html,\
- .,\
- about.ini,\
- about.mappings,\
- dsdp32.png,\
- icons/
-source.. = src/
-output.. = bin/
-
-javacSource=1.4
-javacTarget=1.4
-src.includes = about.html,\
- schema/,\
- .settings/,\
- build.properties
diff --git a/rse/plugins/org.eclipse.rse.core/dsdp32.png b/rse/plugins/org.eclipse.rse.core/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.core/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gif
deleted file mode 100644
index 7b5a98e0b..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinux_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gif
deleted file mode 100644
index f337d8bf6..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlinuxlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gif
deleted file mode 100644
index d60c188ca..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocal_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gif
deleted file mode 100644
index ba10dec0a..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemlocallive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gif
deleted file mode 100644
index 18afe87ac..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunix_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gif
deleted file mode 100644
index cd8c312d4..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemunixlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gif
deleted file mode 100644
index 0a2efbbed..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwin_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gif b/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gif
deleted file mode 100644
index 6abee6378..000000000
--- a/rse/plugins/org.eclipse.rse.core/icons/full/obj16/systemwinlive_obj.gif
+++ /dev/null
Binary files differ
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 777e0d5eb..000000000
--- a/rse/plugins/org.eclipse.rse.core/plugin.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - [186525] Move keystoreProviders to core
-# Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Core
-providerName = Eclipse.org - DSDP
-
-extPoint.keystoreProviders = Keystore Providers
-extPoint.persistenceProviders=RSE Persistence Providers
-extPoint.systemTypes=RSE System Types
-extPoint.systemTypeProviders=RSE System Type Providers
-extPoint.subsystemConfigurations = Remote Subsystem Configurations
-extPoint.modelInitializers = RSE Model Initializers
-
-systemType.windows.label=Windows
-systemType.unix.label=Unix
-systemType.linux.label=Linux
-systemType.local.label=Local
-
-#systemType.iseries.description = iSeries native operating system (OS/400 or i5/OS)
-#systemType.iseries.PASE.description = PASE on iSeries
-#systemType.zseries.description = zSeries native operating system (z/OS)
-systemType.windows.description = Any version of Microsoft Windows
-systemType.unix.description = Any distribution of Unix
-#systemType.aix.description = IBM AIX operating system
-systemType.linux.description = Any distribution of Linux
-#systemType.powerlinux.description = Linux running on PowerPC hardware
-#systemType.zlinux.description = Linux running on zSeries hardware
-systemType.local.description = Local file system on this computer
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 14498a986..000000000
--- a/rse/plugins/org.eclipse.rse.core/plugin.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?> <!--
- Copyright (c) 2005, 2008 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
- -->
-
-<plugin>
-<!-- ================================================================= -->
-<!-- Define keystoreProviders extension point -->
-<!-- ================================================================= -->
- <extension-point id="keystoreProviders" name="%extPoint.keystoreProviders" schema="schema/keystoreProviders.exsd"/>
-
-<!-- ================================================================= -->
-<!-- Define Persistence Provider extension point -->
-<!-- ================================================================= -->
- <extension-point id="persistenceProviders" name="%extPoint.persistenceProviders" schema="schema/persistenceProviders.exsd"/>
- <!-- Pre-defined Persistence Providers -->
- <extension
- point="org.eclipse.rse.core.persistenceProviders">
- <persistenceProvider
- autostart="false"
- class="org.eclipse.rse.internal.persistence.SerializingProvider"
- id="org.eclipse.rse.persistence.SerializingProvider"
- name="Serializing Persistence Provider"/>
- <persistenceProvider
- autostart="true"
- class="org.eclipse.rse.internal.persistence.PropertyFileProvider"
- id="org.eclipse.rse.persistence.PropertyFileProvider"
- name="Property File Persistence Provider (workspace)">
- <property
- name="location"
- value="workspace">
- </property>
- </persistenceProvider>
- <persistenceProvider
- autostart="true"
- class="org.eclipse.rse.internal.persistence.PropertyFileProvider"
- id="org.eclipse.rse.persistence.MetadataPropertyFileProvider"
- name="Property File Persistence Provider (metadata)">
- <property
- name="location"
- value="metadata">
- </property>
- </persistenceProvider>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Define systemTypes extension point -->
-<!-- ================================================================= -->
- <extension-point id="systemTypes" name="%extPoint.systemTypes" schema="schema/systemTypes.exsd"/>
- <extension-point id="systemTypeProviders"
- name="%extPoint.systemTypeProviders"
- schema="schema/systemTypeProviders.exsd"/>
- <!-- Pre-defined system types -->
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <systemType
- description="%systemType.windows.description"
- icon="icons/full/obj16/systemwin_obj.gif"
- iconLive="icons/full/obj16/systemwinlive_obj.gif"
- id="org.eclipse.rse.systemtype.windows"
- label="%systemType.windows.label"
- name="Windows"/>
- <systemType
- description="%systemType.linux.description"
- icon="icons/full/obj16/systemlinux_obj.gif"
- iconLive="icons/full/obj16/systemlinuxlive_obj.gif"
- id="org.eclipse.rse.systemtype.linux"
- label="%systemType.linux.label"
- name="Linux"/>
- <!--
- <systemType id="org.eclipse.rse.systemtype.linux.power"
- name="Power Linux"
- description="%systemType.powerlinux.description"
- icon="icons/full/obj16/systemlinux_obj.gif"
- iconLive="icons/full/obj16/systemlinuxlive_obj.gif"/>
- -->
- <systemType
- description="%systemType.unix.description"
- icon="icons/full/obj16/systemunix_obj.gif"
- iconLive="icons/full/obj16/systemunixlive_obj.gif"
- id="org.eclipse.rse.systemtype.unix"
- label="%systemType.unix.label"
- name="Unix"/>
- <systemType
- description="%systemType.local.description"
- icon="icons/full/obj16/systemlocal_obj.gif"
- iconLive="icons/full/obj16/systemlocallive_obj.gif"
- id="org.eclipse.rse.systemtype.local"
- label="%systemType.local.label"
- name="Local"/>
- </extension>
-
-<!-- ================================================================================== -->
-<!-- EXTENSION POINT: org.eclipse.rse.core.subsystemConfigurations -->
-<!-- ================================================================================== -->
-<!-- Extension point for defining subsystem configurations. A configuration is responsible for -->
-<!-- creating subsystem instances. -->
-<!-- -->
-<!-- Example of extension configuration: -->
-<!-- <extension -->
-<!-- point="org.eclipse.rse.core.subsystemConfigurations"> -->
-<!-- <configuration -->
-<!-- systemTypeIds="org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.unix"-->
-<!-- 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.SubSystemConfiguration -->
-<!-- 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 id="modelInitializers" name="%extPoint.modelInitializers" schema="schema/modelInitializers.exsd"/>
-
-<!-- ================================================================= -->
-<!-- PreferencesInitializers -->
-<!-- ================================================================= -->
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.rse.internal.core.RSEPreferenceInitializer"/>
- <initializer class="org.eclipse.rse.internal.logging.LoggingPreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.rse.core.modelInitializers">
- <modelInitializer
- class="org.eclipse.rse.internal.core.RSELocalConnectionInitializer"
- type="workspace">
- </modelInitializer>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd b/rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd
deleted file mode 100644
index af9c3df0d..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/keystoreProviders.exsd
+++ /dev/null
@@ -1,137 +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="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.core.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, 2007 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) - [186525] Move keystoreProviders to core
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd b/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd
deleted file mode 100644
index 1027cb2bd..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.rse.core" id="modelInitializers" name="Model Initializers"/>
- </appinfo>
- <documentation>
- A model initializer is used to create supplemental connections and filter pools after the RSE model has been restored from its persistent form. The base RSE uses this extension point to supply the &quot;Local&quot; connection if one has not already been created for this workspace. Other extenders of RSE may use this to augment the mode in other ways. An initializer is run at the end of the initialization job begun by RSE when it is activated.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="modelInitializer" 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>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="modelInitializer">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A class that extends &lt;b&gt;org.eclipse.rse.core.IRSEModelInitializer&lt;/b&gt;.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.rse.core.IRSEModelInitializer"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="type">
- <annotation>
- <documentation>
- The type of initialization that is to take place. If this is a one time initialization for this workspace then use &quot;workspace&quot;. If this initialization is to occur at the beginning of each workspace session then use &quot;session&quot;. If nothing is specfied then &quot;session&quot; is assumed.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="workspace">
- </enumeration>
- <enumeration value="session">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- RSE 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- An example taken from the plug-in org.eclipse.rse.ui:
-&lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.rse.core.modelInitializers&quot;&gt;
- &lt;modelInitializer class=&quot;org.eclipse.rse.internal.ui.RSEUIPluginModelInitializer&quot;/&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2008 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
-&lt;br/&gt;
-&lt;br/&gt;Contributors:
-&lt;br/&gt;David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- </documentation>
- </annotation>
-
-</schema>
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 4337d822b..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/persistenceProviders.exsd
+++ /dev/null
@@ -1,166 +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">
- <annotation>
- <documentation>
- The persistenceProvider element defines a class that implements the IRSEPersistenceProvider interface. It is used to persist the RSE object model to a form of external storage.
- </documentation>
- </annotation>
- <complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element ref="property"/>
- </sequence>
- <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>
- <attribute name="autostart" type="boolean" use="default" value="false">
- <annotation>
- <documentation>
- The autostart attribute determines if the persistence provider will be loaded and asked to restore the profiles known to it at the time RSE starts.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="property">
- <annotation>
- <documentation>
- The property element is contained within the persistenceProvider element. Use these to provide properties that can tailor the behavior of a persistence provider. Each provider must document the properties that it expects.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name attribute provides the name for this property.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
- The value attribute provides the string value for this property.
- </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.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;
- autostart=&quot;true&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, 2007 IBM Corporation. All Rights Reserved.
-This program and the accompanying materials are made available under the terms
-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
-David Dykstal (IBM) - added autostart attribute
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd b/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd
deleted file mode 100644
index 52ef36396..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/subsystemConfigurations.exsd
+++ /dev/null
@@ -1,252 +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="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. 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="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="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="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;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.core.subsystems.SubSystemConfiguration:org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="systemTypeIds" type="string">
- <annotation>
- <documentation>
- A semicolon separated list of system type ids that subsystems from this configuration support. For example, &lt;code&gt;&quot;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.linux&quot;
-&lt;/code&gt;.
-&lt;p/&gt;
-The wildcards &apos;*&apos; and &apos;?&apos; are accepted. Therefore, if a subsystem configuration should be registered against all existing system types, this slot should be set to &lt;code&gt;&quot;*&quot;&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <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">
- <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="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 service subsystems 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>
- <attribute name="serviceType" type="string">
- <annotation>
- <documentation>
- This optional attribute allows providing a semicolon separated list of standard names and transports expected to be used by service discovery servers to advertise this service.
-The name is usually the keyword used by the IANA in the port number allocation (http://www.iana.org/assignments/port-numbers) or in DNS SRV service types (RFC 2782) (http://www.dns-sd.org/ServiceTypes.html).
-
-For example, this attribute could be &lt;code&gt;serviceType=&quot;_ftp._tcp;_ftp._udp&quot;&lt;/code&gt; to advertise a subsystem that supports ftp servers using tcp and udp transport.
- </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.core.subsystemConfigurations&quot;&gt;
- &lt;configuration
- systemTypeIds=&quot;org.eclipse.rse.systemtype.unix;*.rse.systemtype.linux&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;
- serviceType=&quot;_database._tcp;_database._udp&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.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The provider of subsystem configurations 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 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 by using 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, 2007 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) - systemTypeIds attribute extensions
-Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.core/schema/systemTypeProviders.exsd b/rse/plugins/org.eclipse.rse.core/schema/systemTypeProviders.exsd
deleted file mode 100644
index 0ceefd605..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/systemTypeProviders.exsd
+++ /dev/null
@@ -1,129 +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="systemTypesProvider" name="RSE System Types Provider"/>
- </appInfo>
- <documentation>
- This extension point is used to allow the contribution of dynamically generated RSE system types by vendors where needed.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="systemTypeProvider" 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="systemTypeProvider">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique name that will be used to identify the system type Provider.
- </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.IRSESystemTypeProvider&lt;/samp&gt; interface.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.rse.core.IRSESystemTypeProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- RSE 2.0
- </documentation>
- </annotation>
-
- <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.systemTypeProviders&quot;&gt;
- &lt;systemTypeProvider
- id=&quot;org.eclipse.rse.core.DefaultSystemTypeProvider&quot;
- class=&quot;org.eclipse.rse.core.DefaultRSESystemTypeProvider&quot;&gt;
- &lt;/systemTypeProvider&gt;
- &lt;/extension&gt;
-&lt;/pre&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.IRSESystemTypesProvider&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2007 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.
- </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 0e4eb6aa3..000000000
--- a/rse/plugins/org.eclipse.rse.core/schema/systemTypes.exsd
+++ /dev/null
@@ -1,236 +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 &quot;org.eclipse.rse.core.subsystemConfigurations&quot; 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 as internal identifier 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;
-&lt;b&gt;Deprecated:&lt;/b&gt; Use system type id to specify a unique identifier and system type label to specify a translatable UI label.
-&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="label" type="string" use="required">
- <annotation>
- <documentation>
- A label used in the UI to identify the system type besides the system type icon.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </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>
- <attribute name="subsystemConfigurationIds" type="string">
- <annotation>
- <documentation>
- A semicolon separated list of fully qualified subsystem configuration ids this system type wants to get registered against.
-&lt;p&gt;
-&lt;b&gt;Note:&lt;/b&gt; The list specified here does not imply that the corresponding subsystem configurations exist. The list contains only possibilites, not requirements.
- </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;li&gt;&quot;isCaseSensitive&quot; for system types with a case sensitive file system&lt;/li&gt;
-&lt;li&gt;&quot;isLocal&quot; for system types that refer to the local system&lt;/li&gt;
-&lt;li&gt;&quot;isWindows&quot; for system types that refer to a Windows kind of system (case insensitive file system with drive letters)&lt;/li&gt;
-&lt;/ul&gt;
-In general, clients can use any own properties with system types, but should use reverse DNS notation to qualify their property keys (e.g. &lt;code&gt;com.acme.isFoobarSystem&lt;/code&gt;. Property keys without qualifying namespace are reserved for RSE internal use. See also class IRSESystemType, methods getProperty() and testProperty().
-
- </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, 2007 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) - [186523] Move subsystemConfigurations from UI to core
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java
deleted file mode 100644
index c58d41fd9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/AbstractRSESystemType.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Uwe Stieber (Wind River) - Dynamic system type provider extension.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186868] Fix IRSESystemType.testProperty() semantics
- * Martin Oberhuber (Wind River) - [218655][api] Provide SystemType enablement info in non-UI
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.rse.core.model.Host;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.osgi.framework.Bundle;
-
-/**
- * Abstract base class holding core functionality of a system type.
- *
- * Extenders must override {@link IRSESystemType#getSubsystemConfigurationIds()}
- * according to their strategy of finding subsystem configuration id's that
- * match their system type.
- *
- * Extenders may override any other method.
- */
-public abstract class AbstractRSESystemType extends PlatformObject implements IRSESystemType {
-
- protected String id = null;
- protected String name = null;
- protected String label = null;
- protected String description = null;
- protected Bundle definingBundle = null;
- protected Map properties;
-
- /**
- * Default constructor.
- * Only subclasses may call this if set the id, name, label,
- * description and properties attributes themselves.
- */
- protected AbstractRSESystemType()
- {
- super();
- }
-
- /**
- * Constructor for an object representing a system type.
- * @param id unique id of this system type. Must be system unique.
- * @param name a name of this system type to be used for internal checks.
- * @param label a user-visible label of this system type.
- * May be <code>null</code> and falls back to the name in this case.
- * @param description a user-visible description of this system type.
- * May be <code>null</code> and falls back to the label in this case.
- */
- public AbstractRSESystemType(String id, String name, String label, String description, Bundle definingBundle)
- {
- super();
- this.id = id;
- this.name = name;
- this.label = label == null ? name : label;
- this.description = description == null ? "" : description; //$NON-NLS-1$
- this.definingBundle = definingBundle;
- this.properties = new HashMap();
- }
-
- /**
- * Checks whether two system types are the same.
- *
- * System types are considered the same if they have the same ID.
- */
- public boolean equals(Object obj) {
- if (obj instanceof IRSESystemType) {
- return id.equals( ((IRSESystemType)obj).getId() );
- }
- return false;
- }
-
- /**
- * Returns the hashCode for this system type.
- *
- * The hashCode is the hashCode of its ID.
- */
- public int hashCode() {
- return id.hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getId()
- */
- public String getId() {
- return id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getLabel()
- */
- public String getLabel() {
- // For default RSE system types, the UI label is equal to the
- // name. Therefore, fallback to the name if the label is not
- // explicitly set.
- if (label == null) return getName();
- return label;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getDescription()
- */
- public String getDescription() {
- return description;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getDefiningBundle()
- */
- public Bundle getDefiningBundle() {
- return definingBundle;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getProperty(java.lang.String)
- */
- public String getProperty(String key) {
- return (String) (properties.get(key));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getProperty(java.lang.String, boolean)
- */
- public boolean testProperty(String key, boolean expectedValue) {
- Object val = properties.get(key);
- if (val instanceof String) {
- return Boolean.valueOf((String)val).booleanValue() == expectedValue;
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- * @see IRSESystemType#isEnabled()
- * @since org.eclipse.rse.core 3.0
- */
- public boolean isEnabled() {
- if (RSEPreferencesManager.getIsSystemTypeEnabled(this)) {
- // if enabled, check if the system type has any registered subsystems. If
- // not, this will auto-disable the system type.
- ISubSystemConfigurationProxy[] proxies = RSECorePlugin.getTheSystemRegistry().getSubSystemConfigurationProxies();
- for (int i=0; i<proxies.length; i++) {
- if (proxies[i].appliesToSystemType(this)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#isLocal()
- */
- public boolean isLocal() {
- return IRSESystemType.SYSTEMTYPE_LOCAL_ID.equals(getId())
- || testProperty(IRSESystemType.PROPERTY_IS_LOCAL, true);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#isLocal()
- */
- public boolean isWindows() {
- return IRSESystemType.SYSTEMTYPE_WINDOWS_ID.equals(getId())
- || (isLocal() && System.getProperty("os.name").toLowerCase().startsWith("win")) //$NON-NLS-1$ //$NON-NLS-2$
- || testProperty(IRSESystemType.PROPERTY_IS_WINDOWS, true);
- }
-
- public IHost createNewHostInstance(ISystemProfile profile) {
- return new Host(profile);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getLabel() + " (" + getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-} \ No newline at end of file
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 ce43afc5e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreRegistry.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Uwe Stieber (Wind River) - Added system types provider extension.
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended 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$
- public static final String PI_SYSTEM_TYPES_PROVIDER = "systemTypeProviders"; //$NON-NLS-1$
-
- /**
- * Returns all defined system types.
- *
- * @return an array of all defined system types.
- */
- public IRSESystemType[] getSystemTypes();
-
- /**
- * 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
- *
- * @deprecated Use {@link #getSystemTypeById(String)}.
- */
- public IRSESystemType getSystemType(String name);
-
- /**
- * Returns a system type object given by the id.
- *
- * @param systemTypeId The system type id.
- * @return The system type object with the given id, or <code>null</code> if none is found
- */
- public IRSESystemType getSystemTypeById(String systemTypeId);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java
deleted file mode 100644
index e990e56ac..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSECoreStatusCodes.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008, 2009 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) - [225988] need API to mark persisted profiles as migrated
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *********************************************************************************/
-
-package org.eclipse.rse.core;
-
-/**
- * Codes for use in constructing IStatus objects. These are unique across
- * org.eclipse.rse.core
- *
- * @since org.eclipse.rse.core 3.0
- * @noimplement this interface is not intended to be implemented by clients
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRSECoreStatusCodes {
-
- /*
- * General codes (1 to 100)
- */
-
- /**
- * A code used for constructing IStatus objects.
- * Value 1. An exception occurred during the operation.
- */
- public static final int EXCEPTION_OCCURRED = 1;
-
- /**
- * A code used for constructing IStatus objects.
- * Value 2. An invalid format was encountered operation.
- * The object in question must be assumed to be corrupted.
- */
- public static final int INVALID_FORMAT = 2;
-
- /*
- * Persistence manager and provider codes (101 to 200)
- */
-
- /**
- * A code used for constructing IStatus objects.
- * Value 101. A persistent form of a profile is not found.
- */
- public static final int PROFILE_NOT_FOUND = 101;
-
- /**
- * A code used for constructing IStatus objects.
- * Value 102.
- * The marking of profiles as migrated is not supported by this provider.
- */
- public static final int MIGRATION_NOT_SUPPORTED = 102;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInitListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInitListener.java
deleted file mode 100644
index 7c0d56a17..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInitListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [197167] adding notification and waiting for RSE model
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-/**
- * An IRSEInitListener will be invoked when the initialization of RSE reaches
- * the completion of each phase.
- *
- * @since org.eclipse.rse.core 3.0
- */
-public interface IRSEInitListener {
-
- /**
- * @param phase The phase of initialization that has completed.
- * @see RSECorePlugin#INIT_MODEL
- * @see RSECorePlugin#INIT_ALL
- */
- public void phaseComplete(int phase);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInteractionProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInteractionProvider.java
deleted file mode 100644
index 20cdd1b0e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEInteractionProvider.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [190231] initial API and implementation
- * IBM Corporation - Javadoc for runInDefaultContext() method
- * Martin Oberhuber (Wind River) - [236355] [api] Add an IRSEInteractionProvider#eventExec() method
- *******************************************************************************/
-package org.eclipse.rse.core;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * Interaction Provider Interface.
- *
- * Classes implementing this interface provide a means for RSE to communicate
- * with the outside world: via progress monitors, events and messages. A UI
- * implementation of this interface would typically use UI components for user
- * interaction; although this can be changed also intermittently.
- *
- * Non-UI headless applications may log messages rather than doing interactive
- * messages, and may use different Threads for sending messages.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work or
- * that it will remain the same. Please do not use this API without consulting
- * with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
- * team.
- * </p>
- *
- * @since org.eclipse.rse.core 3.0
- */
-public interface IRSEInteractionProvider {
-
- /**
- * Return a default progress monitor for the context that's currently
- * active.
- *
- * Usually, long-running operations should always be created from the client
- * with a progress monitor that they can use. Historically, however, this
- * has not always been done and is especially problematic in operations that
- * are performed as the result of Callbacks.
- *
- * For such situations, this method returns a default progress monitor in a
- * context that we guess. We try to use one default progress use one for all
- * phases of a single operation, such as connecting and resolving.
- *
- * @return a default progress monitor
- */
- public IProgressMonitor getDefaultProgressMonitor();
-
- /**
- * <p>
- * Runs the given <code>IRSERunnableWithProgress</code> in the default
- * context available to this interaction provider, that provides a progress
- * monitor. For example, if the default context is a
- * <code>ProgressMonitorDialog</code> then the runnable is run using the
- * dialog's progress monitor. This method is derived from
- * <code>IRunnableContext#run()</code>.
- * </p>
- * <p>
- * If <code>fork</code> is <code>false</code>, the current thread is
- * used to run the runnable. Note that if <code>fork</code> is
- * <code>true</code>, it is unspecified whether or not this method blocks
- * until the runnable has been run. Implementers should document whether the
- * runnable is run synchronously (blocking) or asynchronously
- * (non-blocking), or if no assumption can be made about the blocking
- * behaviour.
- * </p>
- *
- * @param fork <code>true</code> if the runnable should be run in a
- * separate thread, and <code>false</code> to run in the same
- * thread
- * @param cancellable <code>true</code> to enable the cancellation, and
- * <code>false</code> to make the operation uncancellable
- * @param runnable the runnable to run
- *
- * @exception InvocationTargetException wraps any exception or error which
- * occurs while running the runnable
- * @exception InterruptedException propagated by the context if the runnable
- * acknowledges cancellation by throwing this exception. This
- * should not be thrown if cancellable is <code>false</code>.
- */
- public void runInDefaultContext(boolean fork, boolean cancellable, IRSERunnableWithProgress runnable) throws InvocationTargetException,
- InterruptedException;
-
- /**
- * Asynchronously run the given runnable in a separate thread.
- *
- * UI implementations should have the runnable run in the dispatch thread,
- * where it has access to UI components. This is used for notifications.
- * Non-UI applications may choose any Thread they like, provided that two
- * conditions are met:
- * <ol>
- * <li>All Runnables are run on the same Thread.
- * <li>The ordering of Runnables remains intact.
- * </ol>
- *
- * @param runnable the Runnable to run asynchronously
- */
- public void asyncExec(Runnable runnable);
-
- /**
- * Run the given runnable with "event" semantics, that is: asynchronously
- * run it through {@link #asyncExec(Runnable)} on the interaction provider's
- * designated event thread, unless the call is already coming from that very
- * thread.
- *
- * In that case, the Runnable is run immediately and synchronously.
- *
- * @param runnable the Runnable to run asynchronously with "event" semantics
- * @see #asyncExec(Runnable)
- */
- public void eventExec(Runnable runnable);
-
- /**
- * Flush the Queue of Runnables enqueued with {@link #asyncExec(Runnable)}.
- *
- * This needs to be done when this interaction provider is to be replaced by
- * a different one, in order to ensure that the ordering of all Runnables
- * remains intact.
- */
- public void flushRunnableQueue();
-
- /**
- * Show the given message or log it.
- *
- * In an interactive environment, this pops up a dialog asking the user to
- * press an OK button. The method will not return before the OK button is
- * pressed.
- *
- * @param msg the message to show
- */
- public void showMessage(SystemMessage msg);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEModelInitializer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEModelInitializer.java
deleted file mode 100644
index f5aa961c8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEModelInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [197167] adding notification and waiting for RSE model
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A model initializer creates objects in an RSE profile. For example,
- * initializers can be used to create initial connections, filter pools, and
- * filters.
- *
- * @since org.eclipse.rse.core 3.0
- */
-public interface IRSEModelInitializer {
-
- /**
- * Runs the initializer. The initializer should set the monitor to done when complete.
- * @param monitor the monitor that measures progress of this initializer.
- * @return an IStatus indicating the success of the initializer. The status will
- * be logged if it is not an OK status.
- */
- public IStatus run(IProgressMonitor monitor);
-
-} \ 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 4c9a52537..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEPreferenceNames.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kushal Munir (IBM) - Initial API and implementation.
- * David Dykstal (IBM) - updated with comments, removed keys that are not to be used globally
- * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-/**
- * These constants define the set of preference names that the RSE core uses.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-
-/*
- * Preference names that are API should be all capitals and have words separated
- * by an underscore (that is, "public static final" style).
- * Preferences that are not API should using "method name" style.
- */
-public interface IRSEPreferenceNames {
-
- /**
- * The key for the value that specifies that queries should be "deferred",
- * that is, run when needed and in the background, as nodes are asked for
- * their children. This value is not part of the API.
- *
- * This field is not intended to be referenced by clients.
- */
- public static final String USE_DEFERRED_QUERIES = "useDeferredQueries"; //$NON-NLS-1$
-
- /**
- * The key for the default system type. Used when a system type is needed
- * but not declared when creating new connections (hosts) and for password
- * determination. This value is not part of the API.
- *
- * This field is not intended to be referenced by clients.
- */
- public static final String SYSTEMTYPE = "systemtype"; //$NON-NLS-1$
-
- /**
- * The key for an hash table, encoded as a string, that contains user ids as
- * values keyed by some key - usually a system type, a connection name, or a
- * combination of a connection name and subsystem. This value is not part of
- * the API.
- *
- * This field is not intended to be referenced by clients.
- */
- public static final String USERIDPERKEY = "useridperkey"; //$NON-NLS-1$
-
- /**
- * The key for the string containing the list of active user profiles in
- * alphabetical order. As profiles are activated, deactivated, or renamed
- * this string must be modified. This value is not part of the API.
- *
- * This field is not intended to be referenced by clients.
- */
- public static final String ACTIVEUSERPROFILES = "activeuserprofiles"; //$NON-NLS-1$
-
- /**
- * The key of the string containing the id of the default persistence provider.
- * Value is "DEFAULT_PERSISTENCE_PROVIDER".
- * This value is part of the API and may be used to customize products.
- */
- public static final String DEFAULT_PERSISTENCE_PROVIDER = "DEFAULT_PERSISTENCE_PROVIDER"; //$NON-NLS-1$
-
- /**
- * The key of the string containing the id of the boolean value to create a
- * local connection. Value is "CREATE_LOCAL_CONNECTION". This value is part
- * of the API and may be used to customize products.
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String CREATE_LOCAL_CONNECTION = "CREATE_LOCAL_CONNECTION"; //$NON-NLS-1$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSERunnableWithProgress.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSERunnableWithProgress.java
deleted file mode 100644
index 04d896f00..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSERunnableWithProgress.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [190231] Adapted from jface.operation.IRunnableWithProgress
- *******************************************************************************/
-package org.eclipse.rse.core;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * The <code>IRSERunnableWithProgress</code> interface should be implemented
- * by any class whose instances are intended to be executed as a long-running
- * operation. Long-running operations are typically presented at the UI via a
- * modal dialog showing a progress indicator and a Cancel button.
- *
- * This interface is derived from
- * <code>org.eclipse.jface.operation.IRunnableWithProgress</code>, but
- * brought into no-UI space. The class must define a <code>run</code> method
- * that takes a progress monitor. The <code>run</code> method is usually not
- * invoked directly, but rather by passing the
- * <code>IRunnableWithProgress</code> to the <code>run</code> method of an
- * <code>IRunnableContext</code>, which provides the UI for the progress
- * monitor and Cancel button.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work or
- * that it will remain the same. Please do not use this API without consulting
- * with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
- * team.
- * </p>
- *
- * @see IRSEInteractionProvider
- * @since org.eclipse.rse.core 3.0
- */
-public interface IRSERunnableWithProgress {
- /**
- * Runs this operation. Progress should be reported to the given progress
- * monitor. This method is usually invoked by an
- * <code>IRunnableContext</code>'s <code>run</code> method, which
- * supplies the progress monitor. A request to cancel the operation should
- * be honored and acknowledged by throwing <code>InterruptedException</code>.
- *
- * @param monitor the progress monitor to use to display progress and
- * receive requests for cancellation
- * @exception InvocationTargetException if the run method must propagate a
- * checked exception, it should wrap it inside an
- * <code>InvocationTargetException</code>; runtime
- * exceptions are automatically wrapped in an
- * <code>InvocationTargetException</code> by the calling
- * context
- * @exception InterruptedException if the operation detects a request to
- * cancel, using <code>IProgressMonitor.isCanceled()</code>,
- * it should exit by throwing
- * <code>InterruptedException</code>
- *
- * @see IRSEInteractionProvider
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException;
-}
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 927b7e379..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2009 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:
- * Uwe Stieber (Wind River) - Extended system type -> subsystemConfiguration association.
- * Martin Oberhuber (Wind River) - [185098] Provide constants for all well-known system types
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [218655][api] Provide SystemType enablement info in non-UI
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [226574][api] Add ISubSystemConfiguration#supportsEncoding()
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.core.model.SystemHostPool;
-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.
- * <p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. System
- * type implementations must subclass {@link AbstractRSESystemType}
- * rather than implementing this interface directly.
- * </p>
- */
-public interface IRSESystemType extends IAdaptable {
-
- /**
- * Linux system type, "Linux".
- * @deprecated Use {@link #SYSTEMTYPE_LINUX_ID}.
- */
- public static final String SYSTEMTYPE_LINUX = "Linux"; //$NON-NLS-1$
-
- /**
- * Linux system type, "org.eclipse.rse.systemtype.linux".
- */
- public static final String SYSTEMTYPE_LINUX_ID = "org.eclipse.rse.systemtype.linux"; //$NON-NLS-1$
-
- /**
- * Power Linux type, "Power Linux".
- * @deprecated Use {@link #SYSTEMTYPE_POWER_LINUX_ID}.
- */
- public static final String SYSTEMTYPE_POWER_LINUX = "Power Linux"; //$NON-NLS-1$
-
- /**
- * Power Linux type, "org.eclipse.rse.systemtype.linux.power".
- */
- public static final String SYSTEMTYPE_POWER_LINUX_ID = "org.eclipse.rse.systemtype.linux.power"; //$NON-NLS-1$
-
- /**
- * Power Linux type, "zSeries Linux".
- * @deprecated Use {@link #SYSTEMTYPE_ZSERIES_LINUX_ID}.
- */
- public static final String SYSTEMTYPE_ZSERIES_LINUX = "zSeries Linux"; //$NON-NLS-1$
-
- /**
- * Power Linux type, "org.eclipse.rse.systemtype.linux.zseries".
- */
- public static final String SYSTEMTYPE_ZSERIES_LINUX_ID = "org.eclipse.rse.systemtype.linux.zSeries"; //$NON-NLS-1$
-
- /**
- * Unix system type, "Unix".
- * @deprecated Use {@link #SYSTEMTYPE_UNIX_ID}.
- */
- public static final String SYSTEMTYPE_UNIX = "Unix"; //$NON-NLS-1$
-
- /**
- * Unix system type, "org.eclipse.rse.systemtype.unix".
- */
- public static final String SYSTEMTYPE_UNIX_ID = "org.eclipse.rse.systemtype.unix"; //$NON-NLS-1$
-
- /**
- * AIX system type, "AIX".
- * @deprecated Use {@link #SYSTEMTYPE_AIX_ID}.
- */
- public static final String SYSTEMTYPE_AIX = "AIX"; //$NON-NLS-1$
-
- /**
- * AIX system type, "org.eclipse.rse.systemtype.aix".
- */
- public static final String SYSTEMTYPE_AIX_ID = "org.eclipse.rse.systemtype.aix"; //$NON-NLS-1$
-
- /**
- * PASE system type, "PASE".
- * @deprecated Use {@link #SYSTEMTYPE_PASE_ID}.
- */
- public static final String SYSTEMTYPE_PASE = "PASE"; //$NON-NLS-1$
-
- /**
- * PASE system type, "org.eclipse.rse.systemtype.PASE".
- */
- public static final String SYSTEMTYPE_PASE_ID = "org.eclipse.rse.systemtype.iseries.PASE"; //$NON-NLS-1$
-
- /**
- * iSeries system type, "iSeries".
- * @deprecated Use {@link #SYSTEMTYPE_ISERIES_ID}.
- */
- public static final String SYSTEMTYPE_ISERIES = "iSeries"; //$NON-NLS-1$
-
- /**
- * iSeries system type, "org.eclipse.rse.systemtype.iseries".
- */
- public static final String SYSTEMTYPE_ISERIES_ID = "org.eclipse.rse.systemtype.iseries"; //$NON-NLS-1$
-
- /**
- * Local system type, "Local".
- * @deprecated Use {@link #SYSTEMTYPE_LOCAL_ID}.
- */
- public static final String SYSTEMTYPE_LOCAL = "Local"; //$NON-NLS-1$
-
- /**
- * Local system type, "org.eclipse.rse.systemtype.local".
- */
- public static final String SYSTEMTYPE_LOCAL_ID = "org.eclipse.rse.systemtype.local"; //$NON-NLS-1$
-
- /**
- * z/OS system type, "z/OS".
- * @deprecated Use {@link #SYSTEMTYPE_ZSERIES_ID}.
- */
- public static final String SYSTEMTYPE_ZSERIES = "z/OS"; //$NON-NLS-1$
-
- /**
- * z/OS system type, "org.eclipse.rse.systemtype.zseries".
- */
- public static final String SYSTEMTYPE_ZSERIES_ID = "org.eclipse.rse.systemtype.zseries"; //$NON-NLS-1$
-
- /**
- * Windows system type, "Windows".
- * @deprecated Use {@link #SYSTEMTYPE_WINDOWS_ID}.
- */
- public static final String SYSTEMTYPE_WINDOWS = "Windows"; //$NON-NLS-1$
-
- /** Windows system type, "org.eclipse.rse.systemtype.windows". */
- public static final String SYSTEMTYPE_WINDOWS_ID = "org.eclipse.rse.systemtype.windows"; //$NON-NLS-1$
-
- /** Discovery system type, "org.eclipse.rse.systemtype.discovery". */
- public static final String SYSTEMTYPE_DISCOVERY_ID = "org.eclipse.rse.systemtype.discovery"; //$NON-NLS-1$
- /** FTP Only system type, "org.eclipse.rse.systemtype.ftp". */
- public static final String SYSTEMTYPE_FTP_ONLY_ID = "org.eclipse.rse.systemtype.ftp"; //$NON-NLS-1$
- /** SSH Only system type, "org.eclipse.rse.systemtype.ssh". */
- public static final String SYSTEMTYPE_SSH_ONLY_ID = "org.eclipse.rse.systemtype.ssh"; //$NON-NLS-1$
- /** Telnet Only system type, "org.eclipse.rse.systemtype.telnet". */
- public static final String SYSTEMTYPE_TELNET_ONLY_ID = "org.eclipse.rse.systemtype.telnet"; //$NON-NLS-1$
-
- /**
- * System type Property Key (value: "isLocal") indicating whether
- * a system type is declared in plugin.xml to refers to the local
- * system.
- * On a the local system, the following properties are expected:
- * <ul>
- * <li>Subsystem Queries are fast and safe.</li>
- * <li>Files in the file system can be converted to java.io.File.</li>
- * </ul>
- * @see #testProperty(String, boolean)
- */
- public static final String PROPERTY_IS_LOCAL = "isLocal"; //$NON-NLS-1$
-
- /**
- * System type Property Key (value: "isWindows") indicating whether
- * a system type is declared in plugin.xml to refers to a Windows
- * system.
- * <p>
- * This is an "aggregate" property consisting of several smaller
- * properties like isCaseSensitive. In the future, we'll want more
- * fine granular properties to check against. On a Windows system,
- * the following properties are expected:
- * <ul>
- * <li>File system is not case sensitive</li>
- * <li>File system has root drives</li>
- * <li>Symbolic links are not supported</li>
- * <li>"cmd" is used as the default shell, meaning that %envVar% refers to environment variables</li>
- * <li>Path separator is backslash (\)</li>
- * <li>Line end character is CRLF</li>
- * <li>Valid characters in file names and paths as known on Windows</li>
- * </ul>
- * @see #testProperty(String, boolean)
- */
- public static final String PROPERTY_IS_WINDOWS = "isWindows"; //$NON-NLS-1$
-
- /**
- * System type Property Key (value: "isCaseSensitive") indicating
- * whether a given system type is in general case sensitive.
- * @see #testProperty(String, boolean)
- */
- public static final String PROPERTY_IS_CASE_SENSITIVE = "isCaseSensitive"; //$NON-NLS-1$
-
- /**
- * System type Property Key (value: "supportsEncoding") indicating whether a
- * given system type supports the user specifying an encoding to use for
- * translating binary data to Java Unicode Strings when working on
- * subsystems.
- *
- * It is up to the subsystems registered against a given system type whether
- * they observe the system type's setting or not; the default
- * implementations do observe it. Given that all subsystem configurations
- * registered against a given system type do not support encodings, the
- * corresponding RSE controls for allowing the user to change encodings will
- * be disabled.
- *
- * Expected default value of this Property is "true" if not set.
- *
- * @see ISubSystemConfiguration#supportsEncoding(IHost)
- * @since org.eclipse.rse.core 3.0
- */
- public static final String PROPERTY_SUPPORTS_ENCODING = "supportsEncoding"; //$NON-NLS-1$
-
- /**
- * Returns the id of the system type.
- * @return the id of the system type
- */
- public String getId();
-
- /**
- * Returns the translatable label for use in the UI.
- *
- * @return The UI label or <code>null</code> if not set.
- */
- public String getLabel();
-
- /**
- * Returns the name of the system type.
- * @return the name of the system type
- *
- * @deprecated Use {@link #getId()} for accessing the unique id or {@link #getLabel()} for the UI label.
- */
- 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);
-
- /**
- * Tests whether the given boolean property matches the expected value
- * for this system type.
- *
- * Clients can use their own properties with system types, but should
- * use reverse DNS notation to qualify their property keys (e.g.
- * <code>com.acme.isFoobarSystem</code>. Property keys without qualifying
- * namespace are reserved for RSE internal use.
- *
- * @param key the name of the property to return
- * @param expectedValue the expected boolean value of the property.
- * @return <code>true</code> if the Property is set on the system type and
- * matches the expected value. Returns <code>false</code> if the property
- * is not set or does not match.
- */
- public boolean testProperty(String key, boolean expectedValue);
-
- /**
- * Tests whether the system type is currently enabled.
- *
- * The enabled state is a dynamic property of a system type, compared to the
- * static configuration by plugin markup. Enablement is a non-UI property,
- * which can be set by a Product in the Preferences or modified by a user to
- * hide certain system types.
- * <p>
- * Implementers of custom system types (which are registered by a
- * SystemTypeProvider) can override this method to provide more advanced
- * enabled checks e.g. based on license availability.
- *
- * @return <code>true</code> if the system type is currently enabled, or
- * <code>false</code> otherwise.
- * @since org.eclipse.rse.core 3.0
- */
- public boolean isEnabled();
-
- /**
- * Tests whether the system type refers to the local system.
- * This is a shortcut for
- * <pre>
- * getId().equals(SYSTEMTYPE_LOCAL_ID) ||
- * || testProperty(PROPERTY_IS_LOCAL, true)
- * </pre>
- * See {@link #PROPERTY_IS_LOCAL} for properties expected on
- * a Local system.
- * Extenders (contributors of custom system types) may override.
- * @return true if the system type refers to the local system.
- */
- public boolean isLocal();
-
- /**
- * Tests whether the system type refers to the Windows system.
- * This is a shortcut for
- * <pre>
- * getId().equals(SYSTEMTYPE_WINDOWS_ID)
- * || isLocal() && System.getProperty("os.name").toLowerCase().startsWith("win")
- * || testProperty(PROPERTY_IS_WINDOWS, true)
- * </pre>
- * See {@link #PROPERTY_IS_WINDOWS} for properties expected on
- * a Windows system. This is an "aggregate" property consisting
- * of several smaller properties like isCaseSensitive. In the
- * future, we'll want more fine granular properties to check against.
- * Extenders (contributors of custom system types) may override.
- * @return true if the system type refers to a Windows system.
- */
- public boolean isWindows();
-
- /**
- * 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();
-
- /**
- * Returns a list of fully qualified known subsystem configuration id's that
- * this system type wants to be registered against.
- * More subsystem configurations can be added through the <tt>subsystemConfigurations</tt>
- * extension point.
- * <p>
- * <b>Note:</b> The list returned here does not imply that the corresponding
- * subsystem configurations exist. The list contains only possibilites not,
- * requirements.
- *
- * @return The list of subsystem configuration id's. May be empty,
- * but never <code>null</code>.
- */
- public String[] getSubsystemConfigurationIds();
-
- /**
- * Creates a new <code>IHost</code> object instance. This method is
- * called from {@link SystemHostPool#createHost(IRSESystemType, String, String, String, String, int)}.
- *
- * @param profile The system profile to associate with the host.
- * @return A new <code>IHost</code> object instance.
- */
- public IHost createNewHostInstance(ISystemProfile profile);
-} \ 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 e53297e29..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kushal Munir (IBM) - Initial API and implementation.
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-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)
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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/IRSESystemTypeProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeProvider.java
deleted file mode 100644
index 8d7d86acc..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemTypeProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 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.core;
-
-import org.eclipse.rse.internal.core.RSECoreRegistry;
-
-/**
- * Dynamic RSE system types provider interface.
- *
- * See also extension point <code>org.eclipse.rse.core.systemTypeProviders</code>
- *
- * Clients may implement this interface.
- *
- * @since RSE 2.0
- */
-public interface IRSESystemTypeProvider {
-
- /**
- * Returns a list of possible RSE system types to register
- * at initialization of the RSE core system. The method will
- * be called only once for each provider from {@link RSECoreRegistry}.
- * The list of the returned RSE system types will be checked
- * for duplicates (via the system type id). Duplicates will
- * be dropped.
- *
- * Returned system types should be subclasses of {@link AbstractRSESystemType}.
- *
- * @return The list of RSE system types to register or <code>null</code>.
- */
- public IRSESystemType[] getSystemTypesForRegistration();
-}
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 fbbef55f9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSEUserIdConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-/**
- * Constants for user id management. Used when specifying the scope of a user id
- * when setting a user id.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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/ISystemResourceListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/ISystemResourceListener.java
deleted file mode 100644
index b10bbbe42..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/ISystemResourceListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-import org.eclipse.core.resources.IResourceChangeListener;
-
-public interface ISystemResourceListener extends IResourceChangeListener
-{
- public void ensureOnResourceEventListening();
- public void turnOffResourceEventListening();
- public void turnOnResourceEventListening();
- public void addResourceChangeListener(IResourceChangeListener l);
- public void removeResourceChangeListener(IResourceChangeListener l);
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
deleted file mode 100644
index bd4f11edb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/PasswordPersistenceManager.java
+++ /dev/null
@@ -1,649 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - moved from core package in the UI plugin
- * - updated to use new RSEPreferencesManager
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [218655][api] Provide SystemType enablement info in non-UI
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [210474] Deny save password function missing
- ********************************************************************************/
-
-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 java.util.Set;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-
-
-/**
- * PasswordPersistenceManager manages the saving and retrieving of user ID /
- * passwords to the Eclipse keyring for registered system types.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients. Use
- * the {@link #getInstance()} method to get the singleton
- * instance.
- */
-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;
- /** @since org.eclipse.rse.core 3.0 */
- public static final int RC_DENIED = 2;
- 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 IRSESystemType DEFAULT_SYSTEM_TYPE = new DefaultSystemType();
-
- // 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;
-
- /**
- * Default System Type
- */
- private static class DefaultSystemType extends AbstractRSESystemType implements IRSESystemType
- {
- private static final String DEFAULT_ID = "DEFAULT"; //$NON-NLS-1$
- private DefaultSystemType() {
- super(DEFAULT_ID, DEFAULT_ID, RSECoreMessages.DefaultSystemType_Label, null, null);
- }
- public String getId() {
- //TODO consider a space character at the beginning to ensure uniqueness
- return DEFAULT_ID;
- }
- public String[] getSubsystemConfigurationIds() {
- return null;
- }
- public Object getAdapter(Class adapter) {
- return null;
- }
- public boolean isEnabled() {
- return true;
- }
- }
-
- /**
- * Inner class used for storing registered system types
- */
- private class RegisteredSystemType
- {
- private IRSESystemType _systemType;
- private boolean _userIDCaseSensitive;
-
- protected RegisteredSystemType(IRSESystemType systemType, boolean caseSensitive)
- {
- _systemType = systemType;
- _userIDCaseSensitive = caseSensitive;
- }
-
- /**
- * Returns the system type.
- * @return the system type.
- */
- public IRSESystemType 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 instance of the PasswordPersistenceManger
- */
- public static final synchronized PasswordPersistenceManager getInstance()
- {
- if (_instance == null)
- {
- _instance = new PasswordPersistenceManager();
- _instance.initExtensions();
- }
- return _instance;
- }
-
- /*
- * initialization - register system types
- */
- private void initExtensions()
- {
- IRSESystemType[] sysTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- systemTypes = new RegisteredSystemType[sysTypes.length];
-
- for (int i = 0; i < sysTypes.length; i++) {
- systemTypes[i] = new RegisteredSystemType(sysTypes[i], 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());
- }
-
- /**
- * Removes all passwords for a host name for a given system type. Use the
- * default system type explicitly to remove those entries.
- *
- * @param systemType The system type of the host
- * @param hostName The IP address of the host in canonical format
- * @return the number of passwords removed from the keyring
- * @since org.eclipse.rse.core 3.0
- */
- public int remove(IRSESystemType systemType, String hostName) {
- Map passwords = getPasswordMap(systemType);
- int numberRemoved = 0;
- if (passwords != null) {
- String hostPrefix = hostName + "//"; //$NON-NLS-1$
- Set keys = passwords.keySet();
- for (Iterator z = keys.iterator(); z.hasNext();) {
- String key = (String) z.next();
- if (key.startsWith(hostPrefix)) {
- z.remove(); // safely removes the key and the entry from the map
- numberRemoved++;
- }
- }
- if (numberRemoved > 0) {
- savePasswordMap(systemType.getId(), passwords);
- }
- }
- return numberRemoved;
- }
-
- /**
- * Removes all entries from the keyring that match the hostname, userid, and system type.
- * Use the default system type explicitly to remove those entries.
- * @param systemType the systemType
- * @param hostName the connection name
- * @param userid the user id
- */
- public void remove(IRSESystemType systemType, String hostName, String userid) {
- String hostname = hostName;//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.getId(), passwords);
- }
- }
- }
-
- /**
- * Check if a password entry exists for the specified system type, hostname
- * and userid.
- */
- public boolean passwordExists(IRSESystemType 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(IRSESystemType systemtype, String hname, String userid, boolean checkDefault)
- {
- String hostname = hname;//RSEUIPlugin.getQualifiedHostName(hname);
- return (find(systemtype, hostname, userid) != null);
- }
-
- /**
- * Add a password to the password database.
- * This will not update the entry for the default system type
- * @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 password to the password database.
- * @param info The signon information to store
- * @param overwrite If true then overwrite the existing entry for this systemtype, hostname, and userid.
- * @param updateDefault if true then set the entry for the default systemtype, hostname, and user ID, according to the overwrite setting.
- * @return
- * RC_OK if the password was successfully stored.
- * RC_ALREADY_EXISTS if the password already exists and overwrite was false
- * RC_DENIED if passwords may not be saved for this system type and host
- */
- public int add(SystemSignonInformation info, boolean overwrite, boolean updateDefault) {
- int result = RC_OK;
- IRSESystemType systemType = info.getSystemType();
- String hostName = info.getHostname();
- String userId = info.getUserId();
- String newPassword = info.getPassword();
- boolean deny = RSEPreferencesManager.getDenyPasswordSave(systemType, hostName);
- if (!deny) {
- if (!isUserIDCaseSensitive(systemType)) {
- userId = userId.toUpperCase();
- info.setUserId(userId);
- }
- if (updateDefault) {
- if (systemType != DEFAULT_SYSTEM_TYPE) {
- SystemSignonInformation newInfo = new SystemSignonInformation(hostName, userId, newPassword, DEFAULT_SYSTEM_TYPE);
- result = add(newInfo, overwrite, false);
- }
- }
- Map passwords = getPasswordMap(systemType);
- if (passwords == null) {
- passwords = new HashMap(5);
- }
- String oldPassword = getPassword(passwords, hostName, userId);
- if (oldPassword != null) {
- if (overwrite) {
- removePassword(passwords, hostName, userId);
- } else {
- result = RC_ALREADY_EXISTS;
- }
- }
- if (result == RC_OK) {
- String passwordKey = getPasswordKey(hostName, userId);
- passwords.put(passwordKey, newPassword);
- savePasswordMap(systemType.getId(), passwords);
- }
- } else {
- result = RC_DENIED;
- }
- return result;
- }
-
- /*
- * Retrieve the password map from the keyring for the specified system type
- */
- private Map getPasswordMap(IRSESystemType systemType)
- {
- Map passwords = null;
- String systemTypeId = systemType.getId();
-
- try
- {
- URL serverURL = new URL(newURL);
- passwords = Platform.getAuthorizationInfo(serverURL, systemTypeId, AUTH_SCHEME);
-
- // if no passwords found with new URL, check old URL
- if (passwords == null) {
-
- URL oldServerURL1 = new URL(SERVER_URL + ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString());
- passwords = Platform.getAuthorizationInfo(oldServerURL1, systemTypeId, AUTH_SCHEME);
-
- // passwords found, so migrate to using new URL
- if (passwords != null) {
- savePasswordMap(systemTypeId, passwords);
- }
- // if still no passwords found, check with even older URL
- else {
- URL oldServerURL2 = new URL(SERVER_URL);
- passwords = Platform.getAuthorizationInfo(oldServerURL2, systemTypeId, AUTH_SCHEME);
-
- // passwords found, so migrate to using new URL
- if (passwords != null) {
- savePasswordMap(systemTypeId, passwords);
- }
- }
- }
- }
- catch (MalformedURLException e) {
- RSECorePlugin.getDefault().getLogger().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 systemTypeId, Map passwords)
- {
- try
- {
- URL serverURL = new URL(newURL);
- Platform.flushAuthorizationInfo(serverURL, systemTypeId, AUTH_SCHEME);
- Platform.addAuthorizationInfo(serverURL, systemTypeId, AUTH_SCHEME, passwords);
- }
- catch (MalformedURLException e) {
- RSECorePlugin.getDefault().getLogger().logError("PasswordPersistenceManager.savePasswordMap", e); //$NON-NLS-1$
- }
- catch (CoreException e) {
- RSECorePlugin.getDefault().getLogger().logError("PasswordPersistenceManager.savePasswordMap", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Find the password for the specified systemtype, hostname and userid.
- * If one is not found then the default system type is used.
- * The system type in the signon information returned may not be the same as the system type
- * specfied in the argument.
- */
- public SystemSignonInformation find(IRSESystemType 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 = RSECorePlugin.getQualifiedHostName(khostname);
- String qphost = RSECorePlugin.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 = RSECorePlugin.getQualifiedHostName(khostname);
- String qphost = RSECorePlugin.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(IRSESystemType 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 String getHostnameFromPasswordKey(String passwordKey)
- {
- int sepIndex = passwordKey.indexOf("//"); //$NON-NLS-1$
- return passwordKey.substring(0,sepIndex);
- }
-
- private 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(IRSESystemType systemType)
- {
- // First find the correct provider
- for (int i = 0; i < systemTypes.length; i++)
- {
-
- if (systemTypes[i].getSystemType().equals(systemType))
- {
- return systemTypes[i].isUserIDCaseSensitive();
- }
- }
-
- //Not found: Default system type is case sensitive
- return true;
- }
-
- /**
- * Retrieve the list of registered system types
- */
- public IRSESystemType[] getRegisteredSystemTypes()
- {
- // yantzi: artemis 6.2, added default system type to list
- IRSESystemType[] types = new IRSESystemType[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.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 db4978053..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java
+++ /dev/null
@@ -1,520 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - added utility method for finding qualifiedHostNames
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
- * Martin Oberhuber (Wind River) - [181939] Deferred class loading for keystoreProviders
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Martin Oberhuber (Wind River) - [160293] NPE on startup when only Core feature is installed
- * Uwe Stieber (Wind River) - [192611] RSE Core plugin may fail to initialize because of cyclic code invocation
- * Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by priority then Id
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [190231] Prepare API for UI/Non-UI Splitting
- * David Dykstal (IBM) = [226958] add status values to waitForInitCompletion(phase)
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.rse.core.comm.SystemKeystoreProviderManager;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.core.RSECoreRegistry;
-import org.eclipse.rse.internal.core.RSEInitJob;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.core.model.SystemRegistry;
-import org.eclipse.rse.internal.core.subsystems.SubSystemConfigurationProxy;
-import org.eclipse.rse.internal.core.subsystems.SubSystemConfigurationProxyComparator;
-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.Bundle;
-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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class RSECorePlugin extends Plugin {
-
- /**
- * The plugin id for this plugin. Value "org.eclipse.rse.core".
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String PLUGIN_ID = "org.eclipse.rse.core"; //$NON-NLS-1$
-
- /**
- * Current release as a number (multiplied by 100). E.g. 300 is for release 3.0.0
- */
- public static final int CURRENT_RELEASE = 200; // updated to new release
-
- /**
- * Current release as a string.
- */
- public static final String CURRENT_RELEASE_NAME = "2.0.0"; //$NON-NLS-1$
-
- /**
- * Initialization phase constant, value 0. Used in
- * {@link #isInitComplete(int)} which will return true if all phases of
- * initialization are complete. Clients must not assume any particular
- * ordering among phases based on the value.
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final int INIT_ALL = 0;
-
- /**
- * Initialization phase constant, value 1. Used in
- * {@link #isInitComplete(int)} which will return true if the model phase of
- * the initialization is complete. Clients must not assume any particular
- * ordering among phases based on the value.
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final int INIT_MODEL = 1;
-
- /**
- * Initialization phase constant, value 2. Used in
- * {@link #isInitComplete(int)} which will return true if the initializer
- * phase of the initialization is complete. Clients must not assume any
- * particular ordering among phases based on the value.
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final int INIT_INITIALIZER = 2;
-
- private static RSECorePlugin plugin = null; // the singleton instance of this plugin
- private Logger logger = null;
- private ISystemRegistry _systemRegistry = null;
- private IRSEPersistenceManager _persistenceManager = null;
- private ISubSystemConfigurationProxy[] _subsystemConfigurations = null;
- private IRSEInteractionProvider _interactionProvider = null;
-
- /**
- * Returns the singleton instance of RSECorePlugin.
- * @return the singleton instance.
- */
- public static RSECorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Waits until the RSE model has been fully restored from its persistent
- * form. Should be used before accessing pieces of the model.
- *
- * @return an IStatus indicating how the initialization ended.
- * @throws InterruptedException if this wait was interrupted for some
- * reason.
- * @since org.eclipse.rse.core 3.0
- */
- public static IStatus waitForInitCompletion() throws InterruptedException {
- return RSEInitJob.getInstance().waitForCompletion();
- }
-
- /**
- * Waits until the RSE has completed a specific phase of its initialization.
- *
- * @param phase the phase to wait for completion.
- * @return an IStatus indicating how the initialization for that phase ended.
- * @throws InterruptedException if this wait was interrupted for some
- * reason.
- * @throws IllegalArgumentException if the phase is undefined.
- * @see #INIT_ALL
- * @see #INIT_INITIALIZER
- * @see #INIT_MODEL
- * @since org.eclipse.rse.core 3.0
- */
- public static IStatus waitForInitCompletion(int phase) throws InterruptedException {
- return RSEInitJob.getInstance().waitForCompletion(phase);
- }
-
- /**
- * Check whether the initialization of the RSE model is complete for a given
- * phase.
- *
- * @param phase the phase identifier.
- * @return <code>true</code> if the initialization for the given phase has
- * completed regardless of its status of that completion.
- * @throws IllegalArgumentException if the phase is undefined.
- * @see #INIT_ALL
- * @see #INIT_INITIALIZER
- * @see #INIT_MODEL
- * @since org.eclipse.rse.core 3.0
- */
- public static boolean isInitComplete(int phase) {
- return RSEInitJob.getInstance().isComplete(phase);
- }
-
- /**
- * Adds a new listener to the set of listeners to be notified when
- * initialization phases complete. If the listener is added after the phase
- * has completed it will not be invoked. If the listener is already in the
- * set it will not be added again. Listeners may be notified in any order.
- *
- * @param listener the listener to be added
- * @since org.eclipse.rse.core 3.0
- */
- public static void addInitListener(IRSEInitListener listener) {
- RSEInitJob.getInstance().addInitListener(listener);
- }
-
- /**
- * Removes a listener to the set of listeners to be notified when phases
- * complete. If the listener is not in the set this does nothing.
- *
- * @param listener the listener to be removed
- * @since org.eclipse.rse.core 3.0
- */
- public static void removeInitListener(IRSEInitListener listener) {
- RSEInitJob.getInstance().removeInitListener(listener);
- }
-
- /**
- * A static convenience method - fully equivalent to
- * <code>RSECorePlugin.getDefault().getRegistry()</code>.
- * @return the RSE Core Registry.
- */
- public static IRSECoreRegistry getTheCoreRegistry() {
- return getDefault().getCoreRegistry();
- }
-
- /**
- * 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 master profile manager singleton.
- *
- * @return the RSE Profile Manager Singleton.
- * @since org.eclipse.rse.core 3.0
- */
- public static ISystemProfileManager getTheSystemProfileManager() {
- return SystemProfileManager.getDefault();
- }
-
- /**
- * Check 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.
- *
- * @return <code>true</code> if the System Registry has been instantiated
- * already.
- * @since org.eclipse.rse.core 3.0
- */
- public static boolean isTheSystemRegistryActive()
- {
- if (plugin == null) {
- return false;
- }
- return getDefault().isSystemRegistryActive();
- }
-
- /**
- * A static convenience method - fully equivalent to
- * <code>RSECorePlugin.getDefault().getSystemRegistry()</code>.
- * The SystemRegistry is used to gain access to the basic services
- * and components used in RSE.
- * @return the RSE System Registry.
- */
- public static ISystemRegistry getTheSystemRegistry() {
- return getDefault().getSystemRegistry();
- }
-
- /**
- * @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;
- }
-
- /**
- * Returns a qualified host name given a potentially unqualified host name
- */
- public static String getQualifiedHostName(String hostName) {
- try {
- InetAddress address = InetAddress.getByName(hostName);
- return address.getCanonicalHostName();
- } catch (UnknownHostException exc) {
- return hostName;
- }
- }
-
- /**
- * 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);
- registerKeystoreProviders();
- RSEInitJob job = RSEInitJob.getInstance();
- job.schedule();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- LoggerFactory.freeLogger(this);
- logger = null;
- plugin = null;
- super.stop(context);
- }
-
- /**
- * @return the persistence manager used for persisting RSE profiles
- */
- public IRSEPersistenceManager getPersistenceManager() {
- if (_persistenceManager == null) {
- synchronized(this) {
- if (_persistenceManager==null) {
- _persistenceManager = new RSEPersistenceManager(getSystemRegistry());
- }
- }
- }
- return _persistenceManager;
- }
-
- /**
- * Test 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.
- * @return <code>true</code> if the system registry has been instantiated already.
- */
- private boolean isSystemRegistryActive()
- {
- return (_systemRegistry != null);
- }
-
- /**
- * Return the SystemRegistry singleton.
- * Clients should use static @{link getTheSystemRegistry()} instead.
- * @return the RSE system registry
- */
- public ISystemRegistry getSystemRegistry() {
- if (_systemRegistry == null) {
- synchronized(this) {
- if (_systemRegistry == null) {
- String logfilePath = getStateLocation().toOSString();
- SystemRegistry sr = SystemRegistry.getInstance(logfilePath);
- ISubSystemConfigurationProxy[] proxies = getSubSystemConfigurationProxies();
- if (proxies != null) {
- sr.setSubSystemConfigurationProxies(proxies);
- }
- _systemRegistry = sr;
- }
- }
- }
- return _systemRegistry;
- }
-
- /**
- * 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 getCoreRegistry() {
- return RSECoreRegistry.getInstance();
- }
-
- /**
- * 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() {
- if (logger == null) logger = LoggerFactory.getLogger(this);
- 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$
- }
-
- /**
- * Set the default interaction provider.
- *
- * When RSE is run with UI, the UI plugins need to set an UI-based
- * interaction provider for showing dialogs from Core operations. Non-UI
- * headless operations can use an Interaction Provider that just logs its
- * messages and works without other UI.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work
- * or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target
- * Management</a> team.
- * </p>
- *
- * @param p the interaction provider to set.
- * @since org.eclipse.rse.core 3.0
- */
- public void setDefaultInteractionProvider(IRSEInteractionProvider p) {
- synchronized (this) {
- _interactionProvider = p;
- }
- }
-
- /**
- * Get the default interface for interacting with the user or other outside
- * world.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work
- * or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target
- * Management</a> team.
- * </p>
- *
- * @return the default interaction provider.
- * @since org.eclipse.rse.core 3.0
- */
- public IRSEInteractionProvider getDefaultInteractionProvider() {
- synchronized (this) {
- return _interactionProvider;
- }
- }
-
- /**
- * Register declared keystore providers.
- */
- private void registerKeystoreProviders()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // Get configured extenders
- IConfigurationElement[] systemTypeExtensions = registry.getConfigurationElementsFor("org.eclipse.rse.core", "keystoreProviders"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < systemTypeExtensions.length; i++)
- {
- // get the name space of the declaring extension
- String nameSpace = systemTypeExtensions[i].getDeclaringExtension().getNamespaceIdentifier();
- 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)
- {
- SystemKeystoreProviderManager.getInstance().registerKeystoreProvider(bundle, keystoreProviderType);
- }
- }
- }
-
- /**
- * Return all elements that extend the org.eclipse.rse.core.subsystemConfigurations extension point
- */
- private IConfigurationElement[] getSubSystemConfigurationPlugins()
- {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- // Get configured extenders
- IConfigurationElement[] subsystemConfigurationExtensions =
- registry.getConfigurationElementsFor("org.eclipse.rse.core","subsystemConfigurations"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return subsystemConfigurationExtensions;
- }
-
- /**
- * 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)
- {
- List l = new ArrayList();
- for (int idx=0; idx<factoryPlugins.length; idx++)
- {
- SubSystemConfigurationProxy ssf =
- new SubSystemConfigurationProxy(factoryPlugins[idx]);
-
- l.add(ssf);
- }
- ISubSystemConfigurationProxy[] newProxies = (ISubSystemConfigurationProxy[])l.toArray(new ISubSystemConfigurationProxy[l.size()]);
- //[149280][165674]: Sort proxies by priority then ID in order to
- //get deterministic results on all getSubSystemConfiguration*() queries
- Arrays.sort(newProxies, new SubSystemConfigurationProxyComparator());
- _subsystemConfigurations = newProxies;
- }
-
- return _subsystemConfigurations;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java
deleted file mode 100644
index 29fc53582..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSEPreferencesManager.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David Dykstal (IBM) - [233892] Deny password save is not persistent
- ********************************************************************************/
-package org.eclipse.rse.core;
-
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.Preferences;
-
-/**
- * Preferences Manager utility class.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class RSEPreferencesManager {
-
- /**
- * Used as a suffix when combined with the system type name to produce the key for the enabled value.
- */
- private static final String ST_ENABLED = "systemType.enabled"; //$NON-NLS-1$
- /**
- * Used as a suffix when combined with the system type name to produce the key for the default user id value.
- */
- private static final String ST_DEFAULT_USERID = "systemType.defaultUserId"; //$NON-NLS-1$
- /**
- * The default value for using deferred queries. Value is <code>true</code>.
- */
- private static final boolean DEFAULT_USE_DEFERRED_QUERIES = true;
- /**
- * The default value for the name of the team profile. Value is "Team".
- */
- private static final String DEFAULT_TEAMPROFILE = "Team"; //$NON-NLS-1$
- /**
- * The default value for the list of active user profiles. Value is "Team".
- */
- private static final String DEFAULT_ACTIVEUSERPROFILES = "Team"; //$NON-NLS-1$
-
- /**
- * @return the Hashtable where the key is a string identifying a particular object, and
- * the value is the user ID for that object.
- * @see #setUserId(String, String)
- */
- private static Hashtable getUserIds() {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- Hashtable userIds = null;
- String value = store.getString(IRSEPreferenceNames.USERIDPERKEY);
- if (value != null) {
- userIds = parseString(value);
- } else {
- userIds = new Hashtable();
- }
- return userIds;
- }
-
- /**
- * Store the user ids that are saved keyed by some key.
- * @param userIds A Hashtable of userids.
- * @see #setUserId(String, String)
- */
- private static void setUserIds(Hashtable userIds) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String userIdsString = makeString(userIds);
- store.setValue(IRSEPreferenceNames.USERIDPERKEY, userIdsString);
- savePreferences();
- }
-
- /**
- * Retrieves a user id given a key.
- * @param key the key from which to get the particular user id.
- * @return user ID for the given key or null if the key was not found.
- * @see #setUserId(String, String)
- */
- public static String getUserId(String key) {
- String uid = null;
- Hashtable userIds = getUserIds();
- uid = (String) userIds.get(key);
- return uid;
- }
-
- /**
- * Clears the user ID for the given key.
- * @param key the key for the user id.
- * @see #setUserId(String, String)
- */
- public static void clearUserId(String key) {
- Hashtable userIds = getUserIds();
- if (userIds.containsKey(key)) {
- userIds.remove(key);
- setUserIds(userIds);
- }
- }
-
- /**
- * Sets 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>.
- * @param key the key used to find the userId
- * @param userId the userId to retrieve by this key.
- */
- public static 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);
- }
- }
- }
-
- /**
- * Gets the default user id for a given system type.
- * @param systemType the systemtype for which to retrieve the default user id
- * @return The default user id
- */
- public static String getDefaultUserId(IRSESystemType systemType) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String key = getSystemTypePreferencesKey(systemType, RSEPreferencesManager.ST_DEFAULT_USERID);
- if (!store.contains(key)) {
- store.setDefault(key, System.getProperty("user.name")); //$NON-NLS-1$
- }
- String result = store.getString(key);
- return result;
- }
-
- /**
- * Sets the default userId for the given system type.
- * @param systemType the system type for which to set the default
- * @param userId the default user id for this system type.
- * This may be null to "unset" the default.
- */
- public static void setDefaultUserId(IRSESystemType systemType, String userId) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String key = getSystemTypePreferencesKey(systemType, RSEPreferencesManager.ST_DEFAULT_USERID);
- store.setValue(key, userId);
- savePreferences();
- }
-
- /**
- * Gets the system type values table for editing. This is a synthesized preference
- * that is handled as a single value. Rows are separated by semi-colons.
- * Each row is of the format <systemTypeId>=<enabled>+<defaultUserId>;
- * @return the table of system types formatted as a single string
- */
- public static String getSystemTypeValues() {
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- StringBuffer buffer = new StringBuffer(100);
- for (int i = 0; i < systemTypes.length; i++) {
- IRSESystemType systemType = systemTypes[i];
- buffer.append(systemType.getId());
- buffer.append('=');
- buffer.append(getIsSystemTypeEnabled(systemType));
- buffer.append('+');
- buffer.append(getDefaultUserId(systemType));
- buffer.append(';');
- }
- String result = buffer.toString();
- return result;
- }
-
- /**
- * Sets the default user id and enabled state for all system types.
- * @param systemTypeValues a tabled encoded as a string that contains
- * entries for each system type. See {@link #getSystemTypeValues()} for the
- * table format.
- */
- public static void setSystemTypeValues(String systemTypeValues) {
- IRSECoreRegistry registry = RSECorePlugin.getTheCoreRegistry();
- Hashtable table = parseString(systemTypeValues);
- Enumeration e = table.keys();
- while (e.hasMoreElements()) {
- String key = (String) e.nextElement();
- String compoundValue = (String) table.get(key);
- String[] values = compoundValue.split("\\+"); //$NON-NLS-1$
- String isEnabled = values[0];
- String defaultUserId = values[1];
- IRSESystemType systemType = registry.getSystemTypeById(key);
- setIsSystemTypeEnabled(systemType, isEnabled.equals("true")); //$NON-NLS-1$
- setDefaultUserId(systemType, defaultUserId);
- }
- }
-
- /**
- * Sets if a system type is enabled.
- * @param systemType the system type to be enabled on this machine.
- * @param isEnabled the enabled state
- */
- public static void setIsSystemTypeEnabled(IRSESystemType systemType, boolean isEnabled) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String key = getSystemTypePreferencesKey(systemType, RSEPreferencesManager.ST_ENABLED);
- if (!store.contains(key)) {
- store.setDefault(key, true);
- }
- store.setValue(key, isEnabled);
- savePreferences();
- }
-
- /**
- * Gets the enabled state for a particular system type.
- * @param systemType the system type
- * @return the enabled state of that type
- */
- public static boolean getIsSystemTypeEnabled(IRSESystemType systemType) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String key = getSystemTypePreferencesKey(systemType, RSEPreferencesManager.ST_ENABLED);
- if (!store.contains(key)) {
- store.setDefault(key, true);
- }
- boolean result = store.getBoolean(key);
- return result;
- }
-
- private static String getSystemTypePreferencesKey(IRSESystemType systemType, String preference) {
- String key = systemType.getId() + "." + preference; //$NON-NLS-1$
- return key;
- }
-
- /**
- * @return the names of the profiles the user has elected to make active.
- */
- public static String[] getActiveProfiles() {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- String value = store.getString(IRSEPreferenceNames.ACTIVEUSERPROFILES);
- String[] result = parseStrings(value);
- return result;
- }
-
- /**
- * Sets the names of the profiles the user has elected to make "active".
- * The caller must also save the preferences when completing.
- * @see SystemPreferencesManager#savePreferences()
- * @param newProfileNames an array of profile names considered to be active.
- */
- private static void setActiveProfiles(String[] newProfileNames) {
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- store.setValue(IRSEPreferenceNames.ACTIVEUSERPROFILES, makeString(newProfileNames));
- savePreferences();
- }
-
- /**
- * 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.
- * @param newName a new active profile name
- */
- public static void addActiveProfile(String newName) {
- SortedSet names = new TreeSet(Arrays.asList(getActiveProfiles()));
- names.add(newName);
- String[] newNames = new String[names.size()];
- names.toArray(newNames);
- RSEPreferencesManager.setActiveProfiles(newNames);
- savePreferences();
- }
-
- /**
- * Delete one of the active profile names in the list of names stored in the registry.
- * @param oldName the name of the profile to remove from the active profiles list.
- */
- public static void deleteActiveProfile(String oldName) {
- String[] names = getActiveProfiles();
- 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) {
- RSEPreferencesManager.setActiveProfiles(names);
- savePreferences();
- }
- }
-
- /**
- * @param profileName the name of the profile to search for in the list of active profiles.
- * @return the zero-based position of a give profile name in the active list
- */
- public static int getActiveProfilePosition(String profileName) {
- String[] names = getActiveProfiles();
- int matchPos = -1;
- for (int idx = 0; (matchPos == -1) && (idx < names.length); idx++) {
- if (names[idx].equalsIgnoreCase(profileName)) matchPos = idx;
- }
- return matchPos;
- }
-
- /**
- * Renames one of the active profile names in the list of names stored in the registry.
- * This is usually employed after renaming a profile to ensure that the active names
- * list stays in synch with the actual profile names. The active state of the profiles
- * cannot be kept in the profiles themselves since that can vary from workspace to workspace
- * for profiles that are shared in a team.
- * @param oldName the old name of the profile
- * @param newName the new name of the profile
- */
- public static void renameActiveProfile(String oldName, String newName) {
- // update active profile name list
- String[] names = getActiveProfiles();
- 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) {
- RSEPreferencesManager.setActiveProfiles(names);
- savePreferences();
- }
- }
-
- public static void initDefaults() {
- String defaultProfileNames = RSEPreferencesManager.DEFAULT_ACTIVEUSERPROFILES;
- String userProfileName = getDefaultPrivateSystemProfileName();
- defaultProfileNames += ";" + userProfileName; //$NON-NLS-1$
- Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
- store.setDefault(IRSEPreferenceNames.ACTIVEUSERPROFILES, defaultProfileNames);
- store.setDefault(IRSEPreferenceNames.USE_DEFERRED_QUERIES, RSEPreferencesManager.DEFAULT_USE_DEFERRED_QUERIES);
- savePreferences();
- }
-
- /**
- * Save the preference store.
- */
- private static void savePreferences() {
- RSECorePlugin.getDefault().savePluginPreferences();
- }
-
- /**
- * @return The name of the default private system profile. This
- * is typically the short name of the host machine or the name of the
- * user account.
- */
- 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;
- }
-
- /**
- * @return the name of the default team system profile.
- */
- public static String getDefaultTeamProfileName() {
- String name = RSEPreferencesManager.DEFAULT_TEAMPROFILE;
- return name;
- }
-
- /**
- * Convert table of key-value pairs into a single string. Each (name, value) pair is
- * encoded as "name=value;" thus no keys or values in the string may
- * contain semi-colons or equal signs.
- * @param table a Hashtable to convert
- * @return the string containing the converted table
- */
- private 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();
- }
-
- /**
- * Make a single string out of an array of strings. A semicolon is used as a
- * delimiter between the separate values. No value in the array can contain
- * a semicolon.
- *
- * @param values the array of strings to condense into a single one
- * @return the condensed string
- */
- private static String makeString(String[] values) {
- StringBuffer allValues = new StringBuffer(20 * values.length);
- for (int idx = 0; idx < values.length; idx++) {
- if (values[idx] != null) {
- if (idx > 0) {
- allValues = allValues.append(';');
- }
- allValues.append(values[idx]);
- }
- }
- return allValues.toString();
- }
-
- /**
- * Parse out list of multiple values into a string array per value.
- * This is the inverse of the {@link #makeString(String[])} operation.
- * @param allvalues the string holding the condensed value
- * @return the reconstituted array of strings.
- */
- private static String[] parseStrings(String allvalues) {
- if (allvalues == null) return new String[0];
- String[] tokens = allvalues.split(";"); //$NON-NLS-1$
- return tokens;
- }
-
- /**
- * Parse out list of key-value pairs into a Hashtable. This is the inverse
- * of the {@link SystemPreferencesManager#makeString(Hashtable)} operation.
- *
- * @param allValues the string containing the key-value pairs. If empty or
- * null returns and empty Hashtable.
- * @return the reconstituted Hashtable
- */
- private static Hashtable parseString(String allValues) {
- Hashtable keyValues = new Hashtable(10);
- if (allValues != null) {
- StringTokenizer tokens = new StringTokenizer(allValues, "=;"); //$NON-NLS-1$
- 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;
- }
-
- /**
- * Get the Preference setting whether the local connection should be created
- * by default or not.
- *
- * @return the boolean value indicating whether or not to create a local
- * connection on a fresh workspace.
- * @since org.eclipse.rse.core 3.0
- */
- public static boolean getCreateLocalConnection() {
- Preferences prefs = RSECorePlugin.getDefault().getPluginPreferences();
- boolean result = prefs.getBoolean(IRSEPreferenceNames.CREATE_LOCAL_CONNECTION);
- return result;
- }
-
- /**
- * Sets the preference for a particular system type and host address that causes passwords
- * not to be savable. The default for this attribute is false - that is, passwords are savable for
- * all system types and hosts.
- * @param systemType The system type of this preference.
- * @param hostAddress The host address of this preference
- * @param deny true if save of passwords is to be denied. false is save is to be allowed.
- * If true then all passwords that have been saved for this system type and host address are removed.
- * All passwords saved for the default system type and host address are also removed.
- * @return the number of passwords removed if deny was set to true
- * @since org.eclipse.rse.core 3.0
- */
- public static int setDenyPasswordSave(IRSESystemType systemType, String hostAddress, boolean deny) {
- int result = 0;
- Preferences preferences = RSECorePlugin.getDefault().getPluginPreferences();
- String preferenceName = getPasswordSavePreferenceName(systemType, hostAddress);
- preferences.setValue(preferenceName, deny);
- if (deny) {
- result = PasswordPersistenceManager.getInstance().remove(systemType, hostAddress);
- result += PasswordPersistenceManager.getInstance().remove(PasswordPersistenceManager.DEFAULT_SYSTEM_TYPE, hostAddress);
- }
- savePreferences();
- return result;
- }
-
- /**
- * Retrieves the preference for a particular system type and host address that determines if passwords
- * can be saved. The default for this attribute is false, that is, save is not denied,
- * thus passwords are savable.
- * @param systemType
- * @param hostAddress
- * @return true if saving of passwords is denied. false if saving is allowed.
- * @since org.eclipse.rse.core 3.0
- */
- public static boolean getDenyPasswordSave(IRSESystemType systemType, String hostAddress) {
- Preferences preferences = RSECorePlugin.getDefault().getPluginPreferences();
- String preferenceName = getPasswordSavePreferenceName(systemType, hostAddress);
- boolean result = preferences.getBoolean(preferenceName);
- return result;
- }
-
- /**
- * Retrieves the "denyPasswordSave" preference name of a particular host address.
- * @param systemType The system type we are concerned with
- * @param hostAddress The host address, typically an IP address.
- * @return the name associated with this preference.
- * This name is of the form {systemTypeId}___{hostAddress}___DENY_PASSWORD_SAVE.
- */
- private static String getPasswordSavePreferenceName(IRSESystemType systemType, String hostAddress) {
- StringBuffer b = new StringBuffer(100);
- b.append(systemType.getId());
- b.append("___"); //$NON-NLS-1$
- b.append(hostAddress.toUpperCase(Locale.US)); // should use US locale for IP names and addresses
- b.append("___DENY_PASSWORD_SAVE"); //$NON-NLS-1$
- String preferenceName = b.toString();
- return preferenceName;
- }
-
- /*
- * Having this method private disables instance creation.
- */
- private RSEPreferencesManager() {
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java
deleted file mode 100644
index 477629376..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RemoteSystemsTempProjectNature.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.core/src/org/eclipse/rse/core/SystemRemoteObjectMatcher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemRemoteObjectMatcher.java
deleted file mode 100644
index 3bc67dc03..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemRemoteObjectMatcher.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2007 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- ********************************************************************************/
-
-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.ISystemRemoteObjectMatchProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * 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.core.subsystems.ISystemRemoteObjectMatchProvider
- */
-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 "subsystemConfigurationCategory" or "systemTypes".
- */
- public SystemRemoteObjectMatcher(String subsystemConfigurationId, String categoryFilter,
- String nameFilter, String typeFilter,
- String subtypeFilter, String subsubtypeFilter)
- {
- this(subsystemConfigurationId, null, categoryFilter, null, nameFilter, typeFilter, subtypeFilter, subsubtypeFilter);
- }
- /**
- * Constructor that supports "subsystemConfigurationCategory" and "systemTypes".
- */
- public SystemRemoteObjectMatcher(String subsystemConfigurationId, String subsystemConfigurationCategoryFilter, String categoryFilter,
- String systemTypes, String nameFilter, String typeFilter,
- String subtypeFilter, String subsubtypeFilter)
- {
- this.subsystemCategoryFilter = subsystemConfigurationCategoryFilter;
- this.subsystemfilter = subsystemConfigurationId;
- 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(ISystemRemoteObjectMatchProvider 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().getName();
- 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().getName().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.core/src/org/eclipse/rse/core/SystemResourceHelpers.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceHelpers.java
deleted file mode 100644
index 016658d3e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceHelpers.java
+++ /dev/null
@@ -1,777 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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)
- {
- RSECorePlugin.getDefault().getLogger().logWarning(msg);
- }
- public void logException(String msg, Exception exc)
- {
- RSECorePlugin.getDefault().getLogger().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();
- */
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java
deleted file mode 100644
index dafce4123..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [177155] Move from rse.ui/systems/org.eclipse.rse.core
- * Martin Oberhuber (Wind River) - Re-add missing methods for user actions
- * David Dykstal (IBM) - [189858] delayed the creation of the remote systems project
- * removed unneeded first time logic and flags
- * renamed createRemoteSystemsProjectInternal to ensureRemoteSystemsProject
- * made ensureRemoteSystemsProject private instead of protected
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David Dykstal (IBM) - [191130] remove getRemoteSystemsProject() and getProfileFolder()
- * as part of the work to removed the exception printed at startup.
- * Martin Oberhuber (Wind River) - [224671] Fix non-API leakage of ISystemResourceConstants
- ********************************************************************************/
-
-package org.eclipse.rse.core;
-
-import java.io.File;
-
-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.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-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.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.core.RemoteSystemsProject;
-import org.eclipse.rse.internal.core.SystemResourceConstants;
-
-
-/**
- * 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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class SystemResourceManager
-{
-
- private static IProject remoteSystemsProject = null;
- private static IProject remoteSystemsTempFilesProject = null;
- private static SystemResourceHelpers helpers = null;
-
- private static ISystemResourceListener _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(ISystemResourceListener listener)
- {
- _listener = listener;
- 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.
- * If found but closed, this will open the project.
- * @param force if true force the creation of the project if not found.
- * In any case, returns handle to the project.
- * @return IProject handle of the project. Clients should use
- * exists() or isAccessible() to test existence.
- */
- public static IProject getRemoteSystemsProject(boolean force) {
- if (remoteSystemsProject == null) {
- remoteSystemsProject = ResourcesPlugin.getWorkspace().getRoot().getProject(SystemResourceConstants.RESOURCE_PROJECT_NAME);
- }
- if ((!remoteSystemsProject.exists() && force) || (remoteSystemsProject.exists() && !remoteSystemsProject.isOpen())) {
- ensureRemoteSystemsProject(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 = ResourcesPlugin.getWorkspace().getRoot().getProject(SystemResourceConstants.RESOURCE_TEMPFILES_PROJECT_NAME);
- }
- return remoteSystemsTempFilesProject;
- }
- /**
- * Create a remote systems project, plus the core subfolders required.
- * @param proj the handle for the remote systems project
- * @return the IProject handle of the project (the argument)
- */
- private static IProject ensureRemoteSystemsProject(IProject proj)
- {
- // Check first for the project to be closed. If yes, try to open it and if this fails,
- // try to delete if first before failing here. The case is that the user removed the
- // directory in the workspace and we must be able to recover from it.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=172437.
- if (!proj.isOpen()) {
- try {
- proj.open(null);
- } catch (Exception e) {
- try {
- proj.delete(false, true, null);
- RSECorePlugin.getDefault().getLogger().logWarning("Removed stale remote systems project reference. Re-creating remote system project to recover."); //$NON-NLS-1$
- } catch (CoreException exc) {
- // If the delete fails, the original opening error will be passed to the error log.
- RSECorePlugin.getDefault().getLogger().logError("error opening remote systems project", e); //$NON-NLS-1$
- }
- }
- }
- 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);
- } catch (Exception e) {
- RSECorePlugin.getDefault().getLogger().logError("error creating remote systems project", e); //$NON-NLS-1$
- }
- }
- return proj;
- }
-
- // -------------------
- // 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);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemTypeMatcher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemTypeMatcher.java
deleted file mode 100644
index cce2e2fc8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemTypeMatcher.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.regex.Pattern;
-
-/**
- * Shared system type id list parser and matcher. Parses a given
- * list of system type id's, separated by semicolon and possibly
- * containing the wildcards '*' and '?.
- */
-public final class SystemTypeMatcher {
- private final class SystemTypeIdPattern {
- private final Pattern pattern;
-
- /**
- * Constructor.
- */
- public SystemTypeIdPattern(Pattern pattern) {
- assert pattern != null;
- this.pattern = pattern;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxy.ISystemTypePattern#matches(org.eclipse.rse.core.IRSESystemType)
- */
- public boolean matches(IRSESystemType systemType) {
- assert systemType != null;
- return pattern.matcher(systemType.getId()).matches();
- }
- }
-
- // List of patterns to match. The order is preserved.
- private final List patterns = new LinkedList();
- private boolean matchAllTypes = false;
-
- /**
- * Constructor.
- *
- * @param declaredSystemTypeIds The list of declared system type ids. Might be <code>null</code>.
- */
- public SystemTypeMatcher(String declaredSystemTypeIds) {
- // Compile the list of patterns out of given lists of declared system types
- if (declaredSystemTypeIds != null) {
- String[] ids = declaredSystemTypeIds.split(";"); //$NON-NLS-1$
- if (ids != null && ids.length > 0) {
- for (int i = 0; i < ids.length; i++) {
- String id = ids[i].trim();
- if (id.equals("*")) { //$NON-NLS-1$
- matchAllTypes = true;
- patterns.clear();
- return;
- } else if(id.length()>0) {
- SystemTypeIdPattern pattern = new SystemTypeIdPattern(Pattern.compile(makeRegex(id)));
- patterns.add(pattern);
- }
- }
- }
- }
- }
-
- private String makeRegex(String pattern) {
- assert pattern != null;
- String translated = pattern;
- if (translated.indexOf('.') != -1) translated = translated.replaceAll("\\.", "\\."); //$NON-NLS-1$ //$NON-NLS-2$
- if (translated.indexOf('*') != -1) translated = translated.replaceAll("\\*", ".*"); //$NON-NLS-1$ //$NON-NLS-2$
- if (translated.indexOf('?') != -1) translated = translated.replaceAll("\\?", "."); //$NON-NLS-1$ //$NON-NLS-2$
- return translated;
- }
-
- /**
- * @return true if this matcher supports all system types.
- */
- public boolean supportsAllSystemTypes() {
- return matchAllTypes;
- }
-
- /**
- * Checks if the specified system type is matched by this pattern.
- */
- public boolean matches(IRSESystemType systemType) {
- assert systemType != null;
- if (matchAllTypes) return true;
- Iterator iterator = patterns.iterator();
- while (iterator.hasNext()) {
- SystemTypeIdPattern matcher = (SystemTypeIdPattern)iterator.next();
- if (matcher.matches(systemType)) return true;
- }
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
deleted file mode 100644
index 269121780..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/ISystemKeystoreProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [186525] Move keystoreProviders to core
- ********************************************************************************/
-
-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);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
deleted file mode 100644
index f61ad8f89..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/comm/SystemKeystoreProviderManager.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [186525] Move keystoreProviders to core
- * Martin Oberhuber (Wind River) - [181939] Deferred class loading for keystoreProviders
- ********************************************************************************/
-
-package org.eclipse.rse.core.comm;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.osgi.framework.Bundle;
-
-/**
- * A Registry of keystore providers, with the ability to instantiate
- * providers lazily when needed.
- */
-public class SystemKeystoreProviderManager
-{
- private static SystemKeystoreProviderManager _instance = new SystemKeystoreProviderManager();
-
- private List _extensions;
-
- private static class ExtensionInfo {
- public Bundle bundle;
- public String className;
- public ExtensionInfo(Bundle bundle, String className) {
- this.bundle = bundle;
- this.className = className;
- }
- }
-
- private SystemKeystoreProviderManager()
- {
- _extensions= new ArrayList();
- }
-
- /**
- * Return the SystemKeystoreProviderManager Instance.
- * @return the singleton instance.
- */
- public static SystemKeystoreProviderManager getInstance()
- {
- return _instance;
- }
-
- /**
- * Register a keystore provider.
- * @param ext keystore provider to register.
- */
- public void registerKeystoreProvider(ISystemKeystoreProvider ext)
- {
- _extensions.add(ext);
- }
-
- /**
- * Register a keystore provider for deferred (lazy) loading.
- *
- * @param bundle the bundle that declares the extension. The bundle
- * must be installed and will be activated lazily when trying
- * to load the given class name.
- * @param className fully qualified classname of the keystore provider
- * declared in the given bundle.
- */
- public void registerKeystoreProvider(Bundle bundle, String className)
- {
- _extensions.add(new ExtensionInfo(bundle, className));
- }
-
- public boolean hasProvider()
- {
- return !_extensions.isEmpty();
- }
-
- /**
- * Return the keystore provider at the given index in the registry,
- * or <code>null</code> if there is no provider at the given index
- * or it cannot be loaded.
- * @return An ISystemKeystoreProvider instance, or <code>null</code>
- * if no provider is found at the given index.
- */
- public ISystemKeystoreProvider getProviderAt(int idx)
- {
- if (idx >= 0 && idx < _extensions.size()) {
- Object o = _extensions.get(idx);
- if (o instanceof ISystemKeystoreProvider) {
- return (ISystemKeystoreProvider)o;
- } else if (o instanceof ExtensionInfo) {
- ExtensionInfo info = (ExtensionInfo)o;
- try {
- Class keystoreProvider = info.bundle.loadClass(info.className);
- ISystemKeystoreProvider extension = (ISystemKeystoreProvider)keystoreProvider.getConstructors()[0].newInstance(null);
- _extensions.set(idx, extension);
- return extension;
- } catch(Exception e) {
- RSECorePlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, info.bundle.getSymbolicName(), -1, e.getMessage(), e));
- }
- }
- }
- return null;
- }
-
- /**
- * Return the default keystore provider.
- * The default provider is the one which was added last by the
- * extension registry, and loads properly.
- * @return An ISystemKeystoreProvider instance, or <code>null</code>
- * if no provider is found at the given index.
- */
- public ISystemKeystoreProvider getDefaultProvider()
- {
- int idx = _extensions.size()-1;
- while (idx>=0) {
- ISystemKeystoreProvider provider = getProviderAt(idx);
- if (provider!=null) {
- return provider;
- }
- _extensions.remove(idx);
- idx--;
- }
- return null;
- }
-
- /**
- * Return an array of all registered keystore providers.
- * The default provider is the one which was added last by the
- * extension registry, and loads properly.
- * @return An array of all registered keystore providers
- * that load properly.
- */
- public ISystemKeystoreProvider[] getProviders()
- {
- List providers = new ArrayList();
- for (int i = _extensions.size()-1; i>=0; i--) {
- ISystemKeystoreProvider provider = getProviderAt(i);
- if (provider!=null) {
- providers.add(0, provider);
- } else {
- _extensions.remove(i);
- }
- }
- ISystemKeystoreProvider[] result = (ISystemKeystoreProvider[])providers.toArray(new ISystemKeystoreProvider[providers.size()]);
- return result;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvent.java
deleted file mode 100644
index 289703060..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvent.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * 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.events.ISystemModelChangeEvents#SYSTEM_RESOURCE_ADDED}.
- * @see org.eclipse.rse.core.events.ISystemModelChangeEvents
- */
- public int getEventType();
-
- /**
- * Get the resource type, such as {@link org.eclipse.rse.core.events.ISystemModelChangeEvents#SYSTEM_RESOURCETYPE_CONNECTION}.
- * @see org.eclipse.rse.core.events.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/events/ISystemModelChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java
deleted file mode 100644
index 0b85781e5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [186589] Move User Actions events to the user actions plugin
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * 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.events.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 signaled in an implementation of
- * ISystemRegistry.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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/events/ISystemModelChangeListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeListener.java
deleted file mode 100644
index f998c4658..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * 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.events.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/events/ISystemPreferenceChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvent.java
deleted file mode 100644
index f3bf66746..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * Interface of event sent when a remote system preference changes.
- * @see org.eclipse.rse.core.events.ISystemPreferenceChangeEvents
- */
-public interface ISystemPreferenceChangeEvent {
-
- /**
- * Returns the type of the event.
- * @see org.eclipse.rse.core.events.ISystemPreferenceChangeEvents
- * @return a type that is one of the constants in ISystemPreferenceChangeEvents.
- */
- public int getType();
-
- /**
- * Set the type of the event.
- * @see org.eclipse.rse.core.events.ISystemPreferenceChangeEvents
- * @param type the type of the event.
- */
- public void setType(int type);
-
- /**
- * Get the old value of the Preference.
- * For boolean will be a Boolean object.
- * @return the old value of the Preference.
- */
- public Object getOldValue();
-
- /**
- * Get the new value of the Preference.
- * For boolean will be a Boolean object.
- * @return the new value of the Preference.
- */
- public Object getNewValue();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java
deleted file mode 100644
index 4962210a7..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeEvents.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * Interface of event ID constants for preferences changed
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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/events/ISystemPreferenceChangeListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeListener.java
deleted file mode 100644
index e2fe428c8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemPreferenceChangeListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-import java.util.EventListener;
-
-/**
- * Interface that listeners interesting in changes to remote
- * system preferences can implement and subsequently register
- * their interest in with the ISystemRegistry.
- */
-public interface ISystemPreferenceChangeListener extends EventListener {
-
- /**
- * This method will be called when a Preference changes.
- * TODO document on which thread the event will be sent.
- * @see ISystemPreferenceChangeEvent
- * @param event the event being sent.
- */
- 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/events/ISystemRemoteChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvent.java
deleted file mode 100644
index e96012778..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvent.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-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.core.events.ISystemRemoteChangeEvents#SYSTEM_REMOTE_RESOURCE_CREATED}.
- * @see org.eclipse.rse.core.events.ISystemRemoteChangeEvents
- * @return the event type.
- */
- 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,
- * or a List of absolute names of the resources
- * @return the resource that this event applies to.
- */
- 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
- * @return the parent remote object of the affected resource,
- * or <code>null</code> if not applicable.
- */
- public Object getResourceParent();
-
- /**
- * Get the old name(s) of the resource(s), in the event of a resource
- * rename, move or copy. Null for other event types.
- *
- * @return the old names of the resources in case of a rename event, or
- * <code>null</code> if not applicable.
- * @since org.eclipse.rse.core 3.0
- */
- public String[] getOldNames();
-
- /**
- * 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.
- * @return the subsystem in which this resource resides.
- */
- public ISubSystem getSubSystem();
-
- /**
- * Returns the operation of this event if it's not implied by the event
- * itself.
- *
- * @see ISystemRemoteChangeEvents#SYSTEM_REMOTE_OPERATION_COPY
- * @see ISystemRemoteChangeEvents#SYSTEM_REMOTE_OPERATION_MOVE
- *
- * @return the operation that triggered this event
- * @since org.eclipse.rse.core 3.0
- */
- public String getOperation();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java
deleted file mode 100644
index 28831a311..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeEvents.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [207100] Events for after a resource is downloaded and uploaded
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * The event IDs sent when remote resources in the model change These IDs are
- * used when creating ISystemRemoteChangeEvent objects.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemRemoteChangeEvents
-{
- /**
- * Event Type: a remote resource was added
- *
- * The event stores the following event parameters:
- * <ul>
- * <li>resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter,
- * or a List of absolute names each of which would be given by calling getAbsoluteName on it's remote adapter
- * <li>resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
- * <li>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.
- * <li>oldName - on a rename operation, this is the absolute name of the resource prior to the rename
- * <li>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.
- * </ul>
- */
- public static final int SYSTEM_REMOTE_RESOURCE_CREATED = 1;
-
- /**
- * Event Type: a remote resource was removed
- *
- * The event stores the following event parameters:
- * <ul>
- * <li>resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter,
- * or a List of absolute names each of which would be given by calling getAbsoluteName on it's remote adapter
- * <li>resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
- * <li>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.
- * <li>oldName - on a rename operation, this is the absolute name of the resource prior to the rename
- * <li>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.
- * </ul>
- */
- public static final int SYSTEM_REMOTE_RESOURCE_DELETED = 2;
-
- /**
- * Event Type: a remote resource was changed
- *
- * The event stores the following event parameters:
- * <ul>
- * <li>resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter,
- * or a List of absolute names each of which would be given by calling getAbsoluteName on it's remote adapter
- * <li>resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
- * <li>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.
- * <li>oldName - on a rename operation, this is the absolute name of the resource prior to the rename
- * <li>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.
- * </ul>
- */
- public static final int SYSTEM_REMOTE_RESOURCE_CHANGED = 4;
-
- /**
- * Event Type: a remote resource was renamed
- *
- * The event stores the following event parameters:
- * <ul>
- * <li>resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter,
- * or a List of absolute names each of which would be given by calling getAbsoluteName on it's remote adapter
- * <li>resourceParent - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
- * <li>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.
- * <li>oldName - on a rename operation, this is the absolute name of the resource prior to the rename
- * <li>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.
- * </ul>
- */
- public static final int SYSTEM_REMOTE_RESOURCE_RENAMED = 8;
-
-
- /**
- * Event Type: a remote resource was uploaded
- *
- * The event stores the following event parameters:
- * <ul>
- * <li>resource - the remote resource object, or absolute name of the
- * resource as would be given by calling getAbsoluteName on its remote
- * adapter
- * <li>resourceParent - the remote resource's parent object, or absolute
- * name, if that is known. If it is non-null, this will aid in refreshing
- * occurrences of that parent.
- * <li>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.
- * </ul>
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final int SYSTEM_REMOTE_RESOURCE_UPLOADED = 20;
-
- /**
- * Event Type: a remote resource was downloaded
- *
- * The event stores the following event parameters:
- * <ul>
- * <li>resource - the remote resource object, or absolute name of the
- * resource as would be given by calling getAbsoluteName on its remote
- * adapter
- * <li>resourceParent - the remote resource's parent object, or absolute
- * name, if that is known. If it is non-null, this will aid in refreshing
- * occurrences of that parent.
- * <li>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.
- * </ul>
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final int SYSTEM_REMOTE_RESOURCE_DOWNLOADED = 24;
-
-
- /**
- * Indicates that the event is for a delete operation
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String SYSTEM_REMOTE_OPERATION_DELETE = "DELETE"; //$NON-NLS-1$
-
- /**
- * Indicates that the event is for a rename operation
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String SYSTEM_REMOTE_OPERATION_RENAME = "RENAME"; //$NON-NLS-1$
-
- /**
- * Indicates that the event is for a create operation
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String SYSTEM_REMOTE_OPERATION_CREATE = "CREATE"; //$NON-NLS-1$
-
- /**
- * Indicates that the event is for a move operation
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String SYSTEM_REMOTE_OPERATION_MOVE = "MOVE"; //$NON-NLS-1$
-
- /**
- * Indicates that the event is for a copy operation
- *
- * @since org.eclipse.rse.core 3.0
- */
- public static final String SYSTEM_REMOTE_OPERATION_COPY = "COPY"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeListener.java
deleted file mode 100644
index e96e721e6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemRemoteChangeListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * Interface that listeners interesting in changes to remote resources
- * implement, and subsequently register their interest, in via SystemRegistry.
- */
-public interface ISystemRemoteChangeListener
-{
-
- /**
- * This method will be called when a remote resource changes.
- * You will be called after the resource is changed.
- * TODO document on which thread the event will be sent.
- * @param event the event.
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvent.java
deleted file mode 100644
index f26bab95c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvent.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
-s ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-/**
- * 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.events.ISystemModelChangeEvent}.
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvents
- */
-public interface ISystemResourceChangeEvent
-{
- /**
- * Returns an object identifying the source of this event.
- * @see java.util.EventObject
- *
- * @return an object identifying the source of this event
- */
- public Object getSource();
-
- /**
- * For multi-target events, return the array of source targets.
- * @return array of source objects.
- */
- public Object[] getMultiSource();
-
- /**
- * Returns the parent of the object source.
- * Only guaranteed to be set for additions and deletions.
- *
- * @return an object identifying the parent of the source of this event,
- * or <code>null</code> if not applicable.
- */
- public Object getParent();
-
- /**
- * Set the parent object of this event.
- * @param parent the parent object.
- */
- public void setParent(Object parent);
-
- /**
- * Returns the grandparent of the object source.
- * Only guaranteed 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 for adding a new item.
- * Used in ADD events. A negative number indicates an append operation.
- *
- * @return position to add the new item to.
- */
- public int getPosition();
-
- /**
- * Set the position value for adding a new item.
- * Used in ADD events. A negative number indicates an append operation.
- *
- * @param position zero-based position to insert the new item.
- */
- public void setPosition(int position);
-
- /**
- * For relative add events, return the previous node this is being added after.
- * @return the previous node for adding a new node after.
- */
- public Object getRelativePrevious();
-
- /**
- * For relative add events, set the previous node this is being added after.
- * @param previousObject the object after which to add the new object.
- */
- public void setRelativePrevious(Object previousObject);
-
- /**
- * Returns the type of the event.
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvents
- * @return a type that is one of the constants in ISystemResourceChangeEvents.
- */
- public int getType();
-
- /**
- * Set the type of this event
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvents
- * @param type a type that is one of the constants in ISystemResourceChangeEvents.
- */
- public void setType(int type);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java
deleted file mode 100644
index 189343978..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeEvents.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- * David McKnight (IBM) - [190805] [performance][dstore] Right-click > Disconnect on a dstore connection is slow and spawns many Jobs
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-
-/**
- * Interface of event ID constants
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemResourceChangeEvents
-{
- /**
- * The event is specifically a filter reference add (filter added)
- * An ISystemFilter is expected as a parameter of this event
- */
- public static final int EVENT_ADD_FILTER_REFERENCE = 10;
- /**
- * The event is specifically a filter reference rename (filter renamed)
- * An ISystemFilter is expected as a parameter of this event
- */
- public static final int EVENT_RENAME_FILTER_REFERENCE = 15;
- /**
- * The event is specifically a filter reference delete (filter deleted)
- * An ISystemFilter is expected as a parameter of this event
- */
- public static final int EVENT_DELETE_FILTER_REFERENCE = 20;
- /**
- * The event is specifically a filter reference change (filter strings changes)
- * An ISystemFilter is expected as a parameter of this event
- */
- public static final int EVENT_CHANGE_FILTER_REFERENCE = 25;
-
- /**
- * The event is specifically a filter reference move (filters reordered)
- * An array of ISystemFilter[] is the expected multi-source
- * parameter. The source is the first item in that array.
- */
- public static final int EVENT_MOVE_FILTER_REFERENCES = 30;
-
- /**
- * The event is specifically a filter string reference add (filterstring added)
- * An ISystemFilterString is expected as a parameter of this event
- */
- public static final int EVENT_ADD_FILTERSTRING_REFERENCE = 41;
-
- /**
- * The event is specifically a filter string reference delete (filterstring deleted)
- * An ISystemFilterString is expected as a parameter of this event
- */
- public static final int EVENT_DELETE_FILTERSTRING_REFERENCE = 42;
-
- /**
- * The event is specifically a filter string reference change (filterstring changed)
- * An ISystemFilterString is expected as a parameter of this event
- */
- public static final int EVENT_CHANGE_FILTERSTRING_REFERENCE = 43;
-
- /**
- * The event is specifically a filter string reference move (filterstrings reordered)
- * An array of ISystemFilterString[] is the expected multi-source
- * parameter. The source is the first item in that array.
- */
- public static final int EVENT_MOVE_FILTERSTRING_REFERENCES = 44;
-
- /**
- * The event is a resource add.
- * Any RSE object is the expected parameter
- */
- public static final int EVENT_ADD = 50;
-
- /**
- * The event is a multi-resource add.
- * An array of RSE objects (i.e. Object[]) is the multi-source
- * parameter (the source is the first item in that array) and a parent
- * RSE object is expected.
- */
- public static final int EVENT_ADD_MANY = 51;
-
- /**
- * The event is a resource add. The resource is added relative to the "previous" attribute .
- * The expected parameters are an RSE object and it's parent RSE object
- */
- public static final int EVENT_ADD_RELATIVE = 53;
-
- /**
- * 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.
- * The expected parameters are an RSE object and the selected object
- */
- public static final int EVENT_REVEAL_AND_SELECT = 52;
-
- /**
- * The event is a single resource deletion.
- * An RSE object is the expected parameter
- */
- public static final int EVENT_DELETE = 55;
-
- /**
- * The event is a multiple resource deletion.
- * An array of RSE objects (i.e. Object[]) is the expected multi-source
- * parameter. The source is the first item in that array.
- */
- public static final int EVENT_DELETE_MANY = 60;
-
- /**
- * The event is a resource rename.
- * An RSE object is the expected parameter
- */
- public static final int EVENT_RENAME = 65;
-
- /**
- * The event is a multiple resource move within the same children set
- * An array of RSE objects (i.e. Object[]) is the multi-source
- * parameter (the source is the first item in that array) and a parent
- * RSE object is expected.
- */
- public static final int EVENT_MOVE_MANY = 75;
-
- /**
- * The event is an icon change event A source RSE object or an array of
- * source RSE objects and the parent RSE object are the expected parameters
- *
- * @since 3.1 an array of source RSE objects is allowed
- */
- public static final int EVENT_ICON_CHANGE = 81;
-
- /**
- * Refresh the single item passed in the "source" field of the event.
- *
- * All expanded sub-nodes are re-queried for their children, unexpanded
- * nodes lose their children cache. Selection is not maintained by this
- * event (use EVENT_REFRESH_REMOTE instead to maintain the selection).
- *
- * A source RSE object to refresh is the expected parameter
- */
- public static final int EVENT_REFRESH = 82;
-
- /**
- * Refresh the items currently selected in the SystemView.
- *
- * All expanded sub-nodes are re-queried for their children, unexpanded nodes
- * lose their children cache. After refreshing, selection of the currently selected
- * elements is restored if possible (in case an absoluteName is available).
- *
- * In case any of the selected items is a leaf node, the parent of that
- * leaf node is refreshed rather than the leaf node itself. In this particular
- * case, a multiselect is not considered properly.
- *
- * The SystemScratchpadView also listens to this event and refreshes those
- * elements that are selected in it.
- *
- * @deprecated obtain the selection yourself and do EVENT_REFRESH or EVENT_REFRESH_REMOTE
- */
- public static final int EVENT_REFRESH_SELECTED = 83;
-
- /**
- * Refresh the parent of the first item currently selected in the SystemView.
- *
- * This only refreshes the parent TreeItem of the first item in the selection.
- * It does not consider multiselect, multiple occurrences of the Item under multiple
- * filters, and does not maintain the current selection.
- *
- * @deprecated obtain the selection yourself and do EVENT_REFRESH or EVENT_REFRESH_REMOTE
- */
- public static final int EVENT_REFRESH_SELECTED_PARENT = 84;
-
- /**
- * Refresh the filter under which the first item currently selected in the
- * SystemView is found.
- *
- * From the filter level, all expanded sub-nodes are re-queried
- * for their children, unexpanded nodes lose their children cache.
- * After refreshing, selection of the currently selected elements
- * is restored if possible. Multiselect is not considered properly.
- *
- * @deprecated Refreshing a particular context(filter) only can lead
- * to inconsistencies, so better obtain the selection yourself
- * and do EVENT_REFRESH or EVENT_REFRESH_REMOTE
- */
- public static final int EVENT_REFRESH_SELECTED_FILTER = 135;
-
- /**
- * Refresh a remote object in the SystemView, given either the remote
- * object or a string that will match on getAbsoluteName, and optionally
- * (re)select a list of objects after refreshing.
- *
- * An object is considered remote if it has an adapter that implements
- * {@link ISystemViewElementAdapter} where the adapter returns true for
- * the isRemote(Object) call. This method refreshes all occurrences of
- * the remote object, even under multiple filters. 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 of the event, and it/they
- * will be selected after the refresh. When passing a string, it must be
- * the result of {@link IRemoteObjectIdentifier#getAbsoluteName(Object)}
- * on the adapter.
- *
- * A remote RSE object is the expected source parameter
- */
- public static final int EVENT_REFRESH_REMOTE = 85;
-
- /**
- * The event is a resource property change.
- * A source RSE object and it's parent RSE object are the expected parameters
- */
- public static final int EVENT_PROPERTY_CHANGE = 86;
-
- /**
- * The event is a request to update the property sheet of whatever is currently selected.
- * A source RSE object and it's parent RSE object are the expected parameters
- */
- 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)
- * A source RSE object is the expected parameter
- */
- 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.
- * A source RSE object and (optionally) it's parent RSE object are the
- * expected parameters
- */
- public static final int EVENT_CHANGE_CHILDREN = 95;
-
- /**
- * The event is simply to force selection of the given object.
- * A source RSE object is the expected parameter
- */
- public static final int EVENT_SELECT = 100;
-
- /**
- * Select one or more remote objects.
- *
- * The "src" parameter holds a remote object, or string, or Vector of
- * objects or strings. When passing a string, it must be the result of
- * {@link IRemoteObjectIdentifier#getAbsoluteName(Object)}
- * on the adapter of the object.
- * The "parent" parameter can optionally hold a model object that is
- * the parent of the objects to be refreshed, in order to optimize searches.
- */
- public static final int EVENT_SELECT_REMOTE = 101;
-
- /**
- * The event is to both select and expand the given object.
- * A source RSE object is the expected parameter
- */
- public static final int EVENT_SELECT_EXPAND = 105;
-
- /**
- * The event is to log a command that has been run
- * A source RSE object is the expected parameter
- */
- public static final int EVENT_COMMAND_RUN = 110;
-
- /**
- * The event is to log a message from a command that has been run
- * A source RSE object and it's parent RSE object are the expected parameters
- */
- public static final int EVENT_COMMAND_MESSAGE = 115;
-
- /**
- * The event is to replace the children (similar to EVENT_ADD_MANY), it will
- * expand also
- * An array of RSE objects (i.e. Object[]) is the multi-source
- * parameter (the source is the first item in that array) and a parent
- * RSE object is expected.
- */
- public static final int EVENT_REPLACE_CHILDREN = 120;
-
- /**
- * The event is to log a command that has been run
- * @deprecated
- */
- public static final int EVENT_COMPILE_COMMAND_RUN = 125;
-
- /**
- * The event is to update the command history drop-down in the remote shell view
- * A source RSE object is the expected parameter
- *
- * TODO should be moved out of core since this is command-specific
- */
- 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
- * A source RSE object is the expected parameter
- */
- public static final int EVENT_COMMAND_SHELL_FINISHED = 140;
-
- /**
- * The event is to indicate that a shell has been removed
- * A source RSE object is the expected parameter
- */
- public static final int EVENT_COMMAND_SHELL_REMOVED = 141;
-
- /**
- * The event is to update the search view when a search is finished
- * A IHostSearchResultConfiguration is the expected parameter
- */
- 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.core/src/org/eclipse/rse/core/events/ISystemResourceChangeListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeListener.java
deleted file mode 100644
index 84777e2b5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemResourceChangeListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-import java.util.EventListener;
-
-/**
- * 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);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemRemoteChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemRemoteChangeEvent.java
deleted file mode 100644
index 3e6992a95..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemRemoteChangeEvent.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- *******************************************************************************/
-
-package org.eclipse.rse.core.events;
-
-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).
- *
- * In RSE 3.0, the concept of Operation type was added (See
- * {@link #setOperation(String)} and the new Constructors, and the oldNames
- * property was extended from a single String into a String array.
- */
-public class SystemRemoteChangeEvent implements ISystemRemoteChangeEvent
-{
- private int eventType;
- private Object resource, parent;
- private String[] oldNames;
- private ISubSystem subsystem;
- private Object originatingViewer;
- private String operation;
-
- /**
- * Constructor for non-rename event
- * @param eventType - one of the constants from {@link org.eclipse.rse.core.events.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter,
- * or List of absoluteNames
- * @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.core.events.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the
- * resource as would be given by calling getAbsoluteName on its
- * remote adapter, or List of absoluteNames
- * @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 occurrences 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 oldNames - on a rename, copy or move operation, these are the
- * absolute names of the resources prior to the operation
- * @since 3.0 replaced String oldName by String[] oldNames
- */
- public SystemRemoteChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
- {
- this(eventType, resource, resourceParent, subsystem);
- this.oldNames = oldNames;
- }
-
- /**
- * Constructor for non-rename event
- *
- * @param operation - the operation for which this event was fired. From
- * {@link ISystemRemoteChangeEvents#SYSTEM_REMOTE_OPERATION_COPY}
- * and related String constants
- * @param eventType - one of the constants from
- * {@link org.eclipse.rse.core.events.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the
- * resource as would be given by calling getAbsoluteName on its
- * remote adapter, or List of absoluteNames
- * @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 occurrences 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.
- * @since 3.0
- */
- public SystemRemoteChangeEvent(String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem)
- {
- super();
- this.eventType = eventType;
- this.resource = resource;
- this.parent = resourceParent;
- this.subsystem = subsystem;
- this.operation = operation;
- }
-
- /**
- * Constructor for a rename event.
- *
- * @param operation - the operation for which this event was fired. From
- * {@link ISystemRemoteChangeEvents#SYSTEM_REMOTE_OPERATION_COPY}
- * and related String constants
- * @param eventType - one of the constants from
- * {@link org.eclipse.rse.core.events.ISystemRemoteChangeEvents}
- * @param resource - the remote resource object, or absolute name of the
- * resource as would be given by calling getAbsoluteName on its
- * remote adapter, or List of absoluteNames
- * @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 occurrences 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 oldNames - on a rename, copy or move operation, these are the
- * absolute names of the resources prior to the operation
- * @since 3.0
- */
- public SystemRemoteChangeEvent(String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
- {
- this(operation, eventType, resource, resourceParent, subsystem);
- this.oldNames = oldNames;
- }
- /**
- * 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 names on a rename, move or copy event
- *
- * @since 3.0
- */
- public void setOldNames(String[] oldNames)
- {
- this.oldNames = oldNames;
- }
-
- /**
- * Get the event type, such as {@link org.eclipse.rse.core.events.ISystemRemoteChangeEvents#SYSTEM_REMOTE_RESOURCE_CREATED}.
- * @see org.eclipse.rse.core.events.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,
- * or List of absoluteNames.
- */
- 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.
- *
- * @since 3.0
- */
- public String[] getOldNames()
- {
- return oldNames;
- }
-
- /**
- * 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(Object originatingViewer) {
- this.originatingViewer = originatingViewer;
- }
-
- /**
- * 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 Object getOriginatingViewer() {
- return originatingViewer;
- }
-
-
- /**
- * @since 3.0
- * @param operation from
- * {@link ISystemRemoteChangeEvents#SYSTEM_REMOTE_OPERATION_COPY}
- * and related String constants
- */
- public void setOperation(String operation){
- this.operation = operation;
- }
-
- /**
- * Returns the operation of this event if it's not implied by the event
- * itself. The operation can be optionally specified when the event is
- * constructed. By default this will return null.
- *
- * @return the operation that triggered this event
- * @since 3.0
- */
- public String getOperation() {
- return operation;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemResourceChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemResourceChangeEvent.java
deleted file mode 100644
index 24cef06c2..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/SystemResourceChangeEvent.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.events;
-import java.util.EventObject;
-
-/**
- * Event object sent to SystemResourceChangeListeners when a
- * remote system object is created, changed, removed, etc.
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvents
- */
-public class SystemResourceChangeEvent
- extends EventObject
- implements ISystemResourceChangeEvent
-{
- private static final long serialVersionUID = 1;
- private Object parent,grandparent, prevObj;
- private Object[] multiSource;
- private int type;
- private int position = -1;
-
- /**
- * Constructor for SystemResourceChangeEvent.
- * @see org.eclipse.rse.core.events.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.core.events.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;
- }
-
- /**
- * Return the type of the event (add, change, remove, rename, change, property change).
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvents
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvent
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvent#getType()
- */
- public int getType()
- {
- return type;
- }
- /**
- * Set the type
- * @see org.eclipse.rse.core.events.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;
- }
-
-} \ 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 efa87b80d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilter.java
+++ /dev/null
@@ -1,652 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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:
- * David Dykstal (IBM) - cleanup format and javadoc
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.references.IRSEReferencedObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * A filter consists of filter strings and may be contained in a filter pool.
- * Filter pools are 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.
- *
- * @noimplement This interface is not intended to be implemented by clients. The
- * allowable implementations already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-
-public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContainer, IRSEModelObject {
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- */
- public String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getName <em>Name</em>}' attribute.
- * 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.
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- */
- public void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- */
- public String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getType <em>Type</em>}' attribute.
- * 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.
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- */
- public void setType(String value);
-
- /**
- * Returns the value of the '<em><b>Supports Nested Filters</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Supports Nested Filters</em>' attribute.
- * @see #setSupportsNestedFilters(boolean)
- */
- public boolean isSupportsNestedFilters();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSupportsNestedFilters <em>Supports Nested Filters</em>}' attribute.
- * <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>
- * @param value the new value of the '<em>Supports Nested Filters</em>' attribute.
- * @see #isSupportsNestedFilters()
- */
- public void setSupportsNestedFilters(boolean value);
-
- /**
- * Returns the value of the '<em><b>Relative Order</b></em>' attribute.
- * <p>
- * The relative order of a filter is intended to be used
- * by a persistence mechanism to keep the filters in a particular order
- * when restoring them into a filter pool. Filters with higher numbers should
- * occur later in the pool. It may be employed in the absence of another
- * mechanism for maintaining order.
- * </p>
- * @return the value of the '<em>Relative Order</em>' attribute.
- * @see #setRelativeOrder(int)
- */
- public int getRelativeOrder();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder <em>Relative Order</em>}' attribute.
- * The relative order of a filter is intended to be used
- * by a persistence mechanism to keep the filters in a particular order
- * when restoring them into a filter pool. Filters with higher numbers should
- * occur later in the pool. It may be employed in the absence of another
- * mechanism for maintaining order.
- * @param value the new value of the '<em>Relative Order</em>' attribute.
- * @see #getRelativeOrder()
- */
- public void setRelativeOrder(int value);
-
- /**
- * Returns the value of the '<em><b>Default</b></em>' attribute.
- * <p>
- * This filter is a "default" filter in this filter pool.
- * The meaning of "default" is determined by the subsystem in which it is deployed.
- * It typically means that the filter is supplied by the subsystem at the time the subsystem is created.
- * That is, the filter is "vendor supplied".
- * There is no restriction on the number of default filters in a pool.
- * </p>
- * @return the value of the '<em>Default</em>' attribute.
- * @see #setDefault(boolean)
- */
- public boolean isDefault();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isDefault <em>Default</em>}' attribute.
- * Make this filter is a "default" filter in this filter pool.
- * The meaning of "default" is determined by the subsystem in which it is deployed.
- * It typically means that the filter is supplied by the subsystem at the time the subsystem is created.
- * That is, the filter is "vendor supplied".
- * There is no restriction on the number of default filters in a pool.
- * @param value the new value of the '<em>Default</em>' attribute.
- * @see #isDefault()
- */
- public void setDefault(boolean value);
-
- /**
- * Returns the value of the '<em><b>Strings Case Sensitive</b></em>' attribute.
- * <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>
- * <p>
- * If unset the value
- * returned is from the parent filter pool.
- * </p>
- * @return the value of the '<em>Strings Case Sensitive</em>' attribute.
- * @see #isSetStringsCaseSensitive()
- * @see #unsetStringsCaseSensitive()
- * @see #setStringsCaseSensitive(boolean)
- */
- public boolean isStringsCaseSensitive();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}' attribute.
- * <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>
- * <p>
- * This will cause this attribute to be set in this filter.
- * </p>
- * @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.
- * <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><p>
- * Causes this filter to use the value specified by the parent filter pool.
- * </p>
- * @see #isSetStringsCaseSensitive()
- * @see #isStringsCaseSensitive()
- * @see #setStringsCaseSensitive(boolean)
- */
- public void unsetStringsCaseSensitive();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}' attribute is set.
- * <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><p>
- * This will be true if this attribute is explicitly specified for this filter. It will be false if this
- * is being inherited from the parent filter pool.
- * </p>
- * @return whether the value of the '<em>Strings Case Sensitive</em>' attribute is set.
- * @see #unsetStringsCaseSensitive()
- * @see #isStringsCaseSensitive()
- * @see #setStringsCaseSensitive(boolean)
- */
- public boolean isSetStringsCaseSensitive();
-
- /**
- * Returns the value of the '<em><b>Promptable</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Promptable</em>' attribute.
- * @see #setPromptable(boolean)
- */
- public boolean isPromptable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isPromptable <em>Promptable</em>}' attribute.
- * <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>
- * @param value the new value of the '<em>Promptable</em>' attribute.
- * @see #isPromptable()
- */
- public void setPromptable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Supports Duplicate Filter Strings</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Supports Duplicate Filter Strings</em>' attribute.
- * @see #setSupportsDuplicateFilterStrings(boolean)
- */
- public 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.
- * <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>
- * @param value the new value of the '<em>Supports Duplicate Filter Strings</em>' attribute.
- * @see #isSupportsDuplicateFilterStrings()
- */
- public void setSupportsDuplicateFilterStrings(boolean value);
-
- /**
- * Returns the value of the '<em><b>Non Deletable</b></em>' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be deleted.
- * </p>
- * @return the value of the '<em>Non Deletable</em>' attribute.
- * @see #setNonDeletable(boolean)
- */
- public boolean isNonDeletable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isNonDeletable <em>Non Deletable</em>}' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be deleted.
- * </p>
- * @param value the new value of the '<em>Non Deletable</em>' attribute.
- * @see #isNonDeletable()
- */
- public void setNonDeletable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Non Renamable</b></em>' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be renamed.
- * </p>
- * @return the value of the '<em>Non Renamable</em>' attribute.
- * @see #setNonRenamable(boolean)
- */
- public boolean isNonRenamable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isNonRenamable <em>Non Renamable</em>}' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be renamed.
- * </p>
- * @param value the new value of the '<em>Non Renamable</em>' attribute.
- * @see #isNonRenamable()
- */
- public void setNonRenamable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Non Changable</b></em>' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be modifiable.
- * </p>
- * @return the value of the '<em>Non Changable</em>' attribute.
- * @see #setNonChangable(boolean)
- */
- public boolean isNonChangable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isNonChangable <em>Non Changable</em>}' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters should not be modifiable.
- * </p>
- * @param value the new value of the '<em>Non Changable</em>' attribute.
- * @see #isNonChangable()
- */
- public void setNonChangable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Strings Non Changable</b></em>' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters contain filter strings that should not be modifiable.
- * </p>
- * @return the value of the '<em>Strings Non Changable</em>' attribute.
- * @see #setStringsNonChangable(boolean)
- */
- public boolean isStringsNonChangable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isStringsNonChangable <em>Strings Non Changable</em>}' attribute.
- * <p>
- * An attribute that can be used when managing filters in filter pools.
- * Some filters contain filter strings that should not be modifiable.
- * </p>
- * @param value the new value of the '<em>Strings Non Changable</em>' attribute.
- * @see #isStringsNonChangable()
- */
- public void setStringsNonChangable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Release</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Release</em>' attribute.
- * @see #setRelease(int)
- */
- public int getRelease();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getRelease <em>Release</em>}' attribute.
- * <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>
- * @param value the new value of the '<em>Release</em>' attribute.
- * @see #getRelease()
- */
- public void setRelease(int value);
-
- /**
- * Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute.
- * <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 this value will be inherited
- * from the parent filter pool.
- * </p>
- * @return the value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- public boolean isSingleFilterStringOnly();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * <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 causes the attribute to be set for this filter, ignoring the value
- * specified for the parent filter pool.
- * </p>
- * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- */
- public void setSingleFilterStringOnly(boolean value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * This causes the value of this attribute to be inherited from the parent filter pool.
- * @see #isSetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- public 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.
- * If true then the value of this attribute is set in this filter. If false it is inherited from the parent filter pool.
- * @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- public boolean isSetSingleFilterStringOnly();
-
- /**
- * Returns the value of the '<em><b>Nested Filters</b></em>'
- * containment reference list. It is bidirectional and its opposite is '{@link org.eclipse.rse.core.filters.ISystemFilter#getParentFilter <em>Parent Filter</em>}'.
- * <p>
- * If this filter can contain child filters this will return the list of
- * children.
- * </p>
- *
- * @return the value of the '<em>Nested Filters</em>' containment
- * reference list.
- * @see org.eclipse.rse.core.filters.ISystemFilter#getParentFilter
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter[] 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>}'.
- * <p>
- * If this filter can be nested inside another this will return the parent filter. Will be
- * null if there is no parent.
- * </p>
- * @return the value of the '<em>Parent Filter</em>' container reference.
- * @see #setParentFilter(ISystemFilter)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getNestedFilters
- */
- public ISystemFilter getParentFilter();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getParentFilter <em>Parent Filter</em>}' container reference.
- * This is used by a filter manager to set the parent filter when one filter is nested inside another.
- * @param value the new value of the '<em>Parent Filter</em>' container reference.
- * @see #getParentFilter()
- */
- public void setParentFilter(ISystemFilter value);
-
- /**
- * Returns the value of the '<em><b>Strings</b></em>' containment
- * reference list.
- *
- * @return the value of the '<em>Strings</em>' containment reference
- * list.
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilterString[] 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 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 an array of String objects. This array will
- * not be null, but may be empty.
- */
- public String[] getFilterStrings();
-
- /**
- * @return this filter's filter string objects as an array of IFilterString objects.
- * This array will not be null, but may be empty.
- */
- 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();
-
- /**
- * Set the subsytem of this filter.
- * This is ignored if the filter is not transient.
- * @param subsystem a subsystem associated with this transient filter
- * @since 3.0
- */
- public void setSubSystem(ISubSystem subsystem);
-
- /**
- * Get the subsystem for this filter.
- * This will return null if the filter is not transient.
- * @return the subsystem
- * @since 3.0
- */
- public Object getSubSystem();
-
- /**
- * 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();
-
-}
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 7e81541b9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainer.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-
-/**
- * Filter containers are any objects that contain filters.
- * This includes filter pools and filters themselves.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 attribute.
- */
- 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.
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(String aliasName, String[] 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);
-
- /**
- * Get the names of existing filters in this container. Typically used by
- * name validators for New and Rename actions to verify new name is unique.
- *
- * @return String array of the names of existing filters in this container.
- * @since org.eclipse.rse.core 3.0
- */
- public String[] getSystemFilterNames();
-
- /**
- * @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);
-}
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 3e05fcaa1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterContainerReference.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-}
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 924610cdb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPool.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - cleanup - format and javadoc
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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 to be referenced together.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISystemFilterContainer, IRSEModelObject {
-
- /**
- * @return the object that instantiated the filter pool manager owning this filter pool
- */
- public ISystemFilterPoolManagerProvider getProvider();
-
- /**
- * @return true if filters in this pool support nested filters.
- */
- public boolean supportsNestedFilters();
-
- /**
- * @return true if filters in this pool supports duplicate filter strings.
- */
- public boolean supportsDuplicateFilterStrings();
-
- /**
- * @return true if the filters in this pool are case sensitive
- */
- public boolean isStringsCaseSensitive();
-
- /**
- * Set the filter pool manager for this filter pool. Should only be done when the filter
- * pool is created by the manager.
- * @param mgr the manager of this filter pool
- */
- public void setSystemFilterPoolManager(ISystemFilterPoolManager mgr);
-
- /**
- * @return the filter pool manager managing this collection of filter pools and their filters.
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager();
-
- /**
- * Set a data object to be associated with this filter pool. This data is uninterpreted by this
- * filter pool.
- * @param data the data object
- */
- public void setSystemFilterPoolData(Object data);
-
- /**
- * @return the data object set using setFilterPoolData.
- */
- public Object getSystemFilterPoolData();
-
- /**
- * Clone the attributes from this filter pool 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>
- * @param targetPool the filter pool that will receive the new attributes
- */
- public void cloneSystemFilterPool(ISystemFilterPool targetPool) throws Exception;
-
- /**
- * Copy a system filter to this or another filter pool.
- * @param targetPool the receiving pool
- * @param oldFilter the filter to copy
- * @param newName the name which to give the new copy of the filter
- * @return the newly created filter
- */
- public ISystemFilter copySystemFilter(ISystemFilterPool targetPool, ISystemFilter oldFilter, String newName) throws Exception;
-
- /**
- * Order filters according to the names in the list. Typically used to enforce
- * a particular ordering in the filter list. If a name appears in this list and
- * does not name a filter it is ignored. If there are filters in this pool that
- * are not named in this list their order in the pool is undefined.
- * @param names the names of the filters in this pool in the order they should be returned.
- */
- public void orderSystemFilters(String[] names);
-
- /**
- * @return the id of the filter pool. Used for referencing this filter pool from filter pool references.
- */
- public String getId();
-
- /**
- * @return The value of the Name attribute
- */
- public String getName();
-
- /**
- * Sets the filter pool name for this filter pool.
- * Filter pool names must not contain 3 consecutive underscores "___" since these are used to separate
- * profile names from filter pool names in a filter pool reference.
- * @param value The new value of the Name attribute.
- * @throws IllegalArgumentException if the name contains three consecutive underscore characters.
- */
- public void setName(String value);
-
- /**
- * @return The value of the Type attribute
- * Allows tools to have typed filter pools.
- * Type is not interpreted by the filter pool, but may be used by a subsystem.
- */
- public String getType();
-
- /**
- * @param value The new value of the Type attribute
- * Allows tools to have typed filter pools.
- * Type is not interpreted by the filter pool, but may be used by a subsystem.
- */
- public void setType(String value);
-
- /**
- * @return The value of the SupportsNestedFilters attribute
- */
- public boolean isSupportsNestedFilters();
-
- /**
- * @param value The new value of the SupportsNestedFilters attribute
- */
- public void setSupportsNestedFilters(boolean value);
-
- /**
- * @return The value of the Deletable attribute
- */
- public boolean isDeletable();
-
- /**
- * @param value The new value of the Deletable attribute
- */
- public void setDeletable(boolean value);
-
- /**
- * @return The value of the Default attribute
- * true if this is a vendor-supplied pool versus user-created pool
- */
- public boolean isDefault();
-
- /**
- * @param value The new value of the Default attribute
- */
- public void setDefault(boolean value);
-
- /**
- * Sets the attribute for this filter pool that determines whether strings of
- * filters contained in this pool are case sensitive or not. If not set
- * this attribute is inherited from the containing filter pool manager.
- * @param value The new value of the StringsCaseSensitive attribute
- */
- public void setStringsCaseSensitive(boolean value);
-
- /**
- * Unsets the StringsCaseSensitive attribute. Causes the case sensitivity of the
- * filter pool to be determined by its filter pool manager.
- */
- public void unsetStringsCaseSensitive();
-
- /**
- * @return <b>true</b> if the StringsCaseSensitive attribute has been set
- */
- public boolean isSetStringsCaseSensitive();
-
- /**
- * Return the filters in this pool.
- *
- * @return An array of filters in this pool
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter[] getFilters();
-
- /**
- * @return The value of the SupportsDuplicateFilterStrings attribute
- */
- public boolean isSupportsDuplicateFilterStrings();
-
- /**
- * @param value The new value of the SupportsDuplicateFilterStrings attribute
- */
- public void setSupportsDuplicateFilterStrings(boolean value);
-
- /**
- * @return The value of the Release attribute
- * The release in which this filter pool was initially created.
- * Typically, will be the version and release times 10, as in 40 or 51.
- */
- public int getRelease();
-
- /**
- * @param value The new value of the Release attribute
- */
- public void setRelease(int value);
-
- /**
- * Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute.
- * <p>
- * If true then filters in this filter pool can have only a single filter string unless the
- * filter has overriden this attribute.
- * </p>
- * @return the value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- public boolean isSingleFilterStringOnly();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * If set to true filters in this filter pool can hold only a single filter string unless overridden by the filter itself.
- * If false then the filter may hold more than one filter string.
- * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
- * @see #isSetSingleFilterStringOnly()
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- */
- public void setSingleFilterStringOnly(boolean value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
- * Causes the value of the single filter string attribute to be inherited from the containing filter pool manager.
- * @see #isSetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- public 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.
- * This will be true if this attribute has been set for this filter pool. It will be false if this
- * attribute is inherited from the filter pool manager.
- * @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
- * @see #unsetSingleFilterStringOnly()
- * @see #isSingleFilterStringOnly()
- * @see #setSingleFilterStringOnly(boolean)
- */
- public boolean isSetSingleFilterStringOnly();
-
- /**
- * Returns the value of the '<em><b>Owning Parent Name</b></em>' attribute.
- * <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>
- * @return the value of the '<em>Owning Parent Name</em>' attribute.
- * @see #setOwningParentName(String)
- */
- public String getOwningParentName();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#getOwningParentName <em>Owning Parent Name</em>}' attribute.
- * @param value the new value of the '<em>Owning Parent Name</em>' attribute.
- * @see #getOwningParentName()
- */
- public void setOwningParentName(String value);
-
- /**
- * Returns the value of the '<em><b>Non Renamable</b></em>' attribute.
- * <p>
- * If the meaning of the '<em>Non Renamable</em>' attribute isn't clear,
- * there really should be more of a description here...
- * @return the value of the '<em>Non Renamable</em>' attribute.
- * @see #setNonRenamable(boolean)
- */
- public boolean isNonRenamable();
-
- /**
- * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isNonRenamable <em>Non Renamable</em>}' attribute.
- * @param value the new value of the '<em>Non Renamable</em>' attribute.
- * @see #isNonRenamable()
- */
- public void setNonRenamable(boolean value);
-
-}
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 cba804178..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManager.java
+++ /dev/null
@@ -1,644 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [197036] All filter pools created on clean workspace
- * cleaned javadoc for renameSystemFilterPool
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-import java.util.List;
-
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-
-/**
- * A filter pool manager manages filter pools.
- * <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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-
- /**
- * 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.
- * @see ISystemFilterPool#setName(String)
- */
- 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 filter pool.
- * <ul>
- * <li>Renames pool object
- * <li>Informs any filter pool references to this pool
- * <li>Schedules a save of the pool object
- * </ul>
- * @param pool The filter pool object to rename
- * @param newName The new name to give the pool
- * @see ISystemFilterPool#setName(String)
- */
- 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
- * @see ISystemFilterPool#setName(String)
- */
- 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
- * @see ISystemFilterPool#setName(String)
- */
- 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.
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, String[] filterStrings) throws Exception;
-
- /**
- * 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.
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings) throws Exception;
-
- /**
- * Creates a new system filter that is typed. Same as
- * {@link #createSystemFilter(ISystemFilterContainer, String, String[])} 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
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, String[] filterStrings, String type) throws Exception;
-
- /**
- * Creates a new system filter that is typed. Same as
- * {@link #createSystemFilter(ISystemFilterContainer, String, String[])} 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
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings, String type) throws Exception;
-
- /**
- * Creates a new system filter that is typed and promptable Same as
- * {@link #createSystemFilter(ISystemFilterContainer, String ,String[], 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
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, String[] filterStrings, String type, boolean promptable) throws Exception;
-
- /**
- * Creates a new system filter that is typed and promptable Same as
- * {@link #createSystemFilter(ISystemFilterContainer, String ,String[], 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
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List 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 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);
-
-}
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 8f5a56c5f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolManagerProvider.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-
-}
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 53ab4dee8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReference.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 7427cab08..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManager.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 filterPoolName the name of the filter pool being referenced.
- * @return new filter pool reference
- */
- public ISystemFilterPoolReference addReferenceToSystemFilterPool(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);
-
-}
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 2f3ecd817..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolReferenceManagerProvider.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-}
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 79f7994e6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolSelectionValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- *
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-
-}
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 213232618..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-}
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 00108bb9e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterPoolWrapperInformation.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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 euphemisms
- * to filter pools. This requires an array of wrapper objects, and requires
- * replacement text for the pool prompt and tooltip text, and the verbiage 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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemFilterPoolWrapperInformation {
-
- /**
- * Get the label
- */
- public String getPromptLabel();
-
- /**
- * Get the tooltip
- */
- public String getPromptTooltip();
-
- public String getVerbiageLabel();
-
- /**
- * 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();
-
- /**
- * Add a wrapper object
- * @since 3.0
- */
- public void addWrapper(ISystemFilterPoolWrapper wrapper);
- /**
- * Add a filter pool, which we will wrapper here by creating a SystemFilterPoolWrapper object for you
- * @since 3.0
- */
- public void addWrapper(String displayName, ISystemFilterPool poolToWrap, boolean preSelect);
-
-}
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 6d91b3c93..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterReference.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients. The
- * allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 the subsystem that holds this reference
- */
- 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);
-
-}
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 9528134aa..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStartHere.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.logging.Logger;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemFilterStartHere {
-
- /**
- * 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.
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManagerProvider caller, ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
- String name);
-}
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 c68911f26..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterString.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - Cleanup Javadoc.
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-
- /**
- * Check if this filter string is changeable.
- * Depends on attributes of parent filter.
- */
- public boolean isChangable();
-
- /**
- * @return The value of the String attribute
- */
- String getString();
-
- /**
- * @param value The new value of the String attribute
- */
- void setString(String value);
-
- /**
- * Returns the type attribute.
- * Intercepted to return SystemFilterConstants.DEFAULT_TYPE if it is currently null
- * Allows tools to have typed filter strings
- * @return The value of the Type attribute
- */
- String getType();
-
- /**
- * @param value The new value of the Type attribute
- */
- void setType(String value);
-
- /**
- * Check if this is a vendor-supplied filter string versus a user-defined filter string.
- * @return The value of the Default attribute
- */
- boolean isDefault();
-
- /**
- * @param value The new value of the Default attribute
- */
- void setDefault(boolean value);
-
-}
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 c6de9bb7e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/ISystemFilterStringReference.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-
-/**
- * Represents a reference to a filter string.
- * Needed so the UI can show the same filter string multiple times.
- * @noimplement This interface is not intended to be implemented by clients.
- * The allowable implementations are already present in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterReference.java
deleted file mode 100644
index 69e807299..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterReference.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- ********************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-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.SystemReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.core.filters.SystemFilterContainerReferenceCommonMethods;
-import org.eclipse.rse.internal.core.filters.SystemFilterStringReference;
-
-/**
- * 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>
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * Use the factory method {@link #createSystemFilterReference(ISubSystem, ISystemFilterContainerReference, ISystemFilter, boolean)}.
- */
-public class SystemFilterReference extends SystemReferencingObject implements IAdaptable, ISystemFilterReference {
- 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.
- */
- 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) {
- SystemFilterReference newRef = new SystemFilterReference();
- 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 the subsystem that holds this reference
- */
- 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) {
- List references = containerHelper.getSystemFilterReferences(subSystem);
- ISystemFilterReference[] result = new ISystemFilterReference[references.size()];
- references.toArray(result);
- return result;
- }
-
- /**
- * 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(ISubSystem, 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(ISubSystem, 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.
- ISystemFilterString[] filterStrings = getReferencedFilter().getStrings();
- List filterStringList = Arrays.asList(filterStrings);
- boolean needToReGen = compareFilterStrings(filterStringList);
- if (needToReGen) referencedFilterStrings = generateFilterStringReferences(filterStringList);
- 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(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;
- }
-
- /**
- * Get references to filter strings from a list of the filter strings
- */
- private ISystemFilterStringReference[] generateFilterStringReferences(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() {
- return false;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterUtil.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterUtil.java
deleted file mode 100644
index 51e0d4388..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/filters/SystemFilterUtil.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *********************************************************************************/
-
-package org.eclipse.rse.core.filters;
-
-import org.eclipse.rse.internal.core.filters.SystemFilterSimple;
-
-/**
- * Utilities to be used in the construction and manipulation of filters.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since org.eclipse.rse.core 3.0
- */
-public class SystemFilterUtil {
-
- public static ISystemFilter makeSimpleFilter(String name) {
- return new SystemFilterSimple(name);
- }
-
-}
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 d274bee27..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/AbstractSystemResourceSet.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * The common abstract implementation of a ISystemResourceSet.
- * Extenders can use this to inherit the basic implementations.
- */
-public abstract 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java
deleted file mode 100644
index a8a0a7e16..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * A DummyHost is used as a placeholder during the construction of hosts by wizards.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class DummyHost extends PlatformObject implements IHost
-{
- protected String _hostName;
- protected IRSESystemType _systemType;
-
- /**
- * Constructor.
- * @param hostName name of the dummy host
- * @param systemType sytem type. May be <code>null</code>.
- */
- public DummyHost(String hostName, IRSESystemType systemType)
- {
- _hostName = hostName;
- _systemType = systemType;
- }
- public ISystemProfile getSystemProfile()
- {
- return null;
- }
-
- public String getSystemProfileName()
- {
- return null;
- }
-
- public void setHostPool(ISystemHostPool pool)
- {
- //Auto-generated method stub
- }
-
- public ISystemHostPool getHostPool()
- {
- return null;
- }
-
- public ISubSystem[] getSubSystems()
- {
- return null;
- }
-
-
-
- public String getLocalDefaultUserId()
- {
- return null;
- }
-
- public void clearLocalDefaultUserId()
- {
- //Auto-generated method stub
- }
-
- public void deletingHost()
- {
- //Auto-generated method stub
- }
-
- public void renamingSystemProfile(String oldName, String newName)
- {
- //Auto-generated method stub
- }
-
- public boolean getForceUserIdToUpperCase()
- {
- return false;
- }
-
- public boolean compareUserIds(String userId1, String userId2)
- {
- return false;
- }
-
- public IRSESystemType getSystemType()
- {
- return _systemType;
- }
-
- public void setSystemType(IRSESystemType value)
- {
- //Auto-generated method stub
- }
-
- public String getAliasName()
- {
- return null;
- }
-
- public void setAliasName(String value)
- {
- //Auto-generated method stub
- }
-
- public String getHostName()
- {
- return _hostName;
- }
-
- public void setHostName(String value)
- {
- //Auto-generated method stub
- }
-
- public String getDescription()
- {
- return null;
- }
-
- public void setDescription(String value)
- {
- //Auto-generated method stub
- }
-
- public String getDefaultUserId()
- {
- return null;
- }
-
- public void setDefaultUserId(String value)
- {
- //Auto-generated method stub
- }
-
- public boolean isPromptable()
- {
- return false;
- }
-
- public void setPromptable(boolean value)
- {
- //Auto-generated method stub
- }
-
- public boolean isOffline()
- {
- return false;
- }
-
- public void setOffline(boolean value)
- {
- //Auto-generated method stub
- }
-
- public IConnectorService[] getConnectorServices()
- {
- return null;
- }
-
- public String getName()
- {
- return null;
- }
-
- public IPropertySet[] getPropertySets()
- {
- return null;
- }
-
- public IPropertySet getPropertySet(String name)
- {
- return null;
- }
-
- public IPropertySet createPropertySet(String name, String description)
- {
- return null;
- }
-
- public IPropertySet createPropertySet(String name)
- {
- return null;
- }
-
-
- public boolean addPropertySet(IPropertySet set)
- {
- return false;
- }
-
- public boolean addPropertySets(IPropertySet[] sets)
- {
- return false;
- }
-
- public boolean removePropertySet(String name)
- {
- return false;
- }
-
- public boolean isDirty()
- {
- return false;
- }
-
- public void setDirty(boolean flag)
- {
- }
-
- public boolean commit()
- {
- return false;
- }
-
- public boolean wasRestored()
- {
- return false;
- }
-
- public void setWasRestored(boolean flag)
- {
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- public boolean isTainted() {
- return false;
- }
-
- public void beginRestore() {
- }
-
- public void endRestore() {
- }
-
- public void setTainted(boolean flag) {
- }
-
- public String getDefaultEncoding(boolean checkRemote) {
- return null;
- }
-
- public void setDefaultEncoding(String encoding, boolean fromRemote) {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java
deleted file mode 100644
index e16c162a0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - using new API from RSECorePlugin, RSEPreferencesManager
- * - moved SystemsPreferencesManager to a new plugin
- * Uwe Stieber (Wind River) - Dynamic system type provider extensions.
- * - Moved to package org.eclipse.rse.model for being extendable.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Kevin Doyle (IBM) - [203365] Profile should not be saved as a result of file transfer
- * David Dykstal (IBM) - [225911] Exception received after deleting a profile containing a connection
- * David McKnight (IBM) - [226324] Default user ID from preferences not inherited
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * Default implementation of the <code>IHost</code> interface.
- * <p>
- * Dynamic system type providers may extend this implementation
- * if needed.
- */
-public class Host extends RSEModelObject implements IHost {
-
- private boolean ucId = true;
- private boolean userIdCaseSensitive = true;
- private ISystemHostPool pool;
- protected String previousUserIdKey;
-
- private static final String ENCODING_PROPERTY_SET = "EncodingPropertySet"; //$NON-NLS-1$
- private static final String ENCODING_REMOTE_PROPERTY_KEY = "EncodingRemotePropertyKey"; //$NON-NLS-1$
- private static final String ENCODING_NON_REMOTE_PROPERTY_KEY = "EncodingNonRemotePropertyKey"; //$NON-NLS-1$
-
- /**
- * The system type which is associated to this <code>IHost</code> object.
- */
- private IRSESystemType systemType = null;
-
- /**
- * The alias name of this <code>IHost</code> object.
- */
- private String aliasName = null;
-
- /**
- * The host name of the target which is associated to this <code>IHost</code> object.
- */
- private String hostName = null;
-
- /**
- * The description of this <code>IHost</code> object.
- */
- private String description = null;
-
- /**
- * The default user id to use to login to the target host.
- */
- private String defaultUserId = null;
-
- /**
- * Prompt for user id and password.
- */
- private boolean promptable = false;
-
- /**
- * Offline mode.
- */
- private boolean offline = false;
-
- /**
- * The system profile associated with this <code>IHost</code> object.
- */
- private ISystemProfile _profile;
-
- /**
- * Constructor
- */
- public Host(ISystemProfile profile) {
- super();
- _profile = profile;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#setHostPool(org.eclipse.rse.core.model.ISystemHostPool)
- */
- public void setHostPool(ISystemHostPool pool) {
- this.pool = pool;
- previousUserIdKey = getPreferencesKey();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getHostPool()
- */
- public ISystemHostPool getHostPool() {
- return pool;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getConnectorServices()
- */
- public IConnectorService[] getConnectorServices() {
- return RSECorePlugin.getTheSystemRegistry().getConnectorServices(this);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getSubSystems()
- */
- public ISubSystem[] getSubSystems() {
- return RSECorePlugin.getTheSystemRegistry().getSubSystems(this);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#deletingHost()
- */
- 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) {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#renamingSystemProfile(java.lang.String, java.lang.String)
- */
- 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)) {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- RSEPreferencesManager.setUserId(newKey, userIdValue); // store old value with new preference key
- }
- previousUserIdKey = newKey;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getSystemProfile()
- */
- public ISystemProfile getSystemProfile() {
- return _profile;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getSystemProfileName()
- */
- public String getSystemProfileName() {
- String result = null;
- if (_profile != null) {
- result = _profile.getName();
- } else if (pool != null) {
- ISystemProfile profile = pool.getSystemProfile();
- if (profile != null) {
- result = profile.getName();
- }
- }
- return result;
- }
-
- /**
- * 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)) {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- RSEPreferencesManager.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(IRSESystemType systemType) {
- // defect 43219
- if (systemType != null) {
- //FIXME MOB this should be in IRSESystemType.isForceUC() / IRSESystemType.isUIDCaseSensitive()
- String systemTypeId = systemType.getId();
- boolean forceUC = systemTypeId.equals(IRSESystemType.SYSTEMTYPE_ISERIES_ID);
- boolean caseSensitiveUID = systemTypeId.equals(IRSESystemType.SYSTEMTYPE_UNIX_ID) || systemTypeId.equals(IRSESystemType.SYSTEMTYPE_LINUX_ID)
- || (systemType.isLocal() && !systemType.isWindows());
- 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) {
- RSEPreferencesManager.setUserId(key, newId);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getDefaultUserId()
- */
- public String getDefaultUserId() {
- String uid = getLocalDefaultUserId();
- if ((uid == null) || (uid.length() == 0)) {
- uid = RSEPreferencesManager.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)) {
- uid = RSEPreferencesManager.getUserId(key); // resolve from preferences
- }
- return uid;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getLocalDefaultUserId()
- */
- public String getLocalDefaultUserId() {
- return getLocalDefaultUserId(getPreferencesKey());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#clearLocalDefaultUserId()
- */
- public void clearLocalDefaultUserId() {
- if (previousUserIdKey != null) RSEPreferencesManager.clearUserId(previousUserIdKey);
- }
-
- /**
- * 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) {
- 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();
- }
-
- return getAliasName();
- }
-
- /*
- * (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.model.IHost#getSystemType()
- */
- public IRSESystemType getSystemType() {
- return systemType;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public String getName() {
- return getAliasName();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getAliasName()
- */
- public String getAliasName() {
- return aliasName;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getHostName()
- */
- public String getHostName() {
- return hostName;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.RSEModelObject#getDescription()
- */
- public String getDescription() {
- return description;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#setDescription(java.lang.String)
- */
- public void setDescription(String newDescription) {
- setDirty(!compareStrings(description, newDescription));
- description = newDescription;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#isPromptable()
- */
- public boolean isPromptable() {
- return promptable;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#setPromptable(boolean)
- */
- public void setPromptable(boolean newPromptable) {
- setDirty(promptable != newPromptable);
- promptable = newPromptable;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#isOffline()
- */
- public boolean isOffline() {
- return offline;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#setOffline(boolean)
- */
- public void setOffline(boolean newOffline) {
- setDirty(offline != newOffline);
- offline = newOffline;
- }
-
- private void setSystemTypeGen(IRSESystemType newSystemType) {
- setDirty( systemType==null ? (newSystemType==null) : !systemType.equals(newSystemType) );
- systemType = newSystemType;
- }
-
- private void setAliasNameGen(String newAliasName) {
- setDirty(!compareStrings(aliasName, newAliasName));
- aliasName = newAliasName;
- }
-
- private void setHostNameGen(String newHostName) {
- setDirty(!compareStrings(hostName, newHostName));
- hostName = newHostName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- ISystemProfile profile = getSystemProfile();
- boolean result = profile.commit();
- return result;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return _profile;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = new ArrayList(10);
- children.addAll(Arrays.asList(getPropertySets()));
- children.addAll(Arrays.asList(getConnectorServices()));
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#getDefaultEncoding(boolean)
- */
- public String getDefaultEncoding(boolean fromRemote) {
-
- IPropertySet encPropertySet = getPropertySet(ENCODING_PROPERTY_SET);
-
- if (encPropertySet == null) {
- return null;
- }
- else {
- String nonRemoteEncoding = encPropertySet.getPropertyValue(ENCODING_NON_REMOTE_PROPERTY_KEY);
-
- if (nonRemoteEncoding != null) {
- return nonRemoteEncoding;
- }
- else {
-
- if (!fromRemote) {
- return null;
- }
- else {
- String remoteEncoding = encPropertySet.getPropertyValue(ENCODING_REMOTE_PROPERTY_KEY);
- return remoteEncoding;
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IHost#setDefaultEncoding(java.lang.String, boolean)
- */
- public void setDefaultEncoding(String encoding, boolean fromRemote) {
- boolean commit = false;
- IPropertySet encPropertySet = getPropertySet(ENCODING_PROPERTY_SET);
-
- if (encPropertySet == null) {
- encPropertySet = createPropertySet(ENCODING_PROPERTY_SET);
- }
-
- if (encPropertySet != null) {
- String savedNonRemoteEncoding = encPropertySet.getPropertyValue(ENCODING_NON_REMOTE_PROPERTY_KEY);
- String savedRemoteEncoding = encPropertySet.getPropertyValue(ENCODING_REMOTE_PROPERTY_KEY);
-
- if (encoding != null) {
-
- if (!fromRemote && !encoding.equals(savedNonRemoteEncoding)) {
- encPropertySet.addProperty(ENCODING_NON_REMOTE_PROPERTY_KEY, encoding);
- commit = true;
- }
- else if (fromRemote && !encoding.equals(savedRemoteEncoding)) {
- encPropertySet.addProperty(ENCODING_REMOTE_PROPERTY_KEY, encoding);
- commit = true;
- }
- }
- else {
-
- if (!fromRemote && savedNonRemoteEncoding != null) {
- encPropertySet.removeProperty(ENCODING_NON_REMOTE_PROPERTY_KEY);
- commit = true;
- }
- else if (fromRemote && savedRemoteEncoding != null) {
- encPropertySet.removeProperty(ENCODING_REMOTE_PROPERTY_KEY);
- commit = true;
- }
- }
- }
- // Only commit if the encoding has changed
- if (commit) {
- commit();
- }
- }
-} \ 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 63e57119d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [206742] Make SystemHostPool thread-safe
- * David Dykstal (IBM) - [197036] cleaned javddoc for getConnectorServices()
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * Interface for Host (SystemConnection) objects.
- *
- * An IHost holds information identifying a remote system. It also logically contains
- * ISubSystem objects, although this containment is achievable programmatically versus via
- * object oriented containment.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IHost extends IAdaptable, IRSEModelObject {
-
- /**
- * Return the system profile that owns this connection
- * @return the profile which contains this host
- */
- public ISystemProfile getSystemProfile();
-
- /**
- * Return the name of the system profile that owns this connection
- * FIXME Check how this is different from getSystemProfile().getName()
- */
- 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();
-
- /**
- * Notification method called when this connection is being deleted.
- * Allows doing pre-death cleanup in overriders.
- * <p>
- * What we need to do is delete our entry in the preference store for our default userId.
- */
- public void deletingHost();
-
- /**
- * Notification method called when this connection's profile is being renamed.
- * Allows doing pre-death cleanup in overriders.
- * <p>
- * Implementations must not fork off other threads in the implementation of this method,
- * since the old and new profiles will be locked during the rename operation so deadlock
- * could occur when another thread tries to access theprofile during the time of rename
- * ongoing.
- * </p><p>
- * What we need to do is rename our entry in the preference store for our default userId.
- * </p>
- */
- public void renamingSystemProfile(String oldName, String newName);
-
- /**
- * Query whether the default userId is to be uppercased.
- * @return <code>true</code> if the user id is to be uppercased.
- */
- public boolean getForceUserIdToUpperCase();
-
- /**
- * Compare two userIds taking case sensitivity into account.
- * @param userId1 first id to compare
- * @param userId2 second id to compare
- */
- public boolean compareUserIds(String userId1, String userId2);
-
- /**
- * Get the system type.
- * @return The value of the SystemType attribute
- */
- public IRSESystemType getSystemType();
-
- /**
- * Set the system type.
- * @param value The new value of the SystemType attribute
- */
- public void setSystemType(IRSESystemType value);
-
- /**
- * Get the unique user-visible connection name.
- * This is a key that is unique per connection pool.
- * @return The value of the AliasName attribute
- */
- public String getAliasName();
-
- /**
- * Set the unique user-visible connection name.
- * This needs to be a key that is unique per connection pool.
- * @param value The new value of the AliasName attribute
- */
- public void setAliasName(String value);
-
- /**
- * Get the host name or IP address.
- * @return The value of the HostName attribute
- */
- public String getHostName();
-
- /**
- * Set the host name or IP address.
- * @param value The new value of the HostName attribute
- */
- public void setHostName(String value);
-
- /**
- * Return the description of this host.
- * @return The value of the Description attribute
- */
- public String getDescription();
-
- /**
- * Set the description of this host.
- * @param value The new value of the Description attribute
- */
- public void setDescription(String value);
-
- /**
- * Return the default user Id for this host.
- *
- * Note that we don't store it directly in an attribute, as we don't want
- * the team to share it. The actual user Id is stored in the preference
- * store keyed by this connection's unique name (profile.connName) instead,
- * and that key is stored 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);
-
- /**
- * Check if this host is promptable.
- * @return The value of the Promptable attribute
- */
- boolean isPromptable();
-
- /**
- * Returns the default encoding of the host.
- * <p>
- * If fromRemote is <code>false</code>, returns an encoding preference
- * specified locally without querying the remote system (for example,
- * an encoding set by a user).
- * If fromRemote is <code>true</code>, it first checks to see if there is
- * a local "overriding" encoding set by the client without querying the
- * remote system, and if such a "local" encoding preference does not exist,
- * returns the encoding that was set by the client by querying a remote system.
- * </p>
- * @param fromRemote <code>false</code> to get the encoding that was
- * obtained by the client by not querying the remote system,
- * <code>true</code> to also check the encoding, if needed, that was
- * set by the client after querying a remote system.
- * @return the default encoding of the host, or <code>null</code> if
- * no encoding was set.
- * @see #setDefaultEncoding(String, boolean)
- */
- public String getDefaultEncoding(boolean fromRemote);
-
- /**
- * Set the default encoding of the host.
- * <p>
- * This method can only be called when no subsystem is connected.
- * The client has to obtain the encoding either by querying the
- * remote system, or by some other means (for example, set by a user).
- * </p>
- * @param encoding the encoding of the host, or <code>null</code>
- * to erase the current encoding.
- * @param fromRemote <code>true</code> if the encoding is set by the
- * client after querying the remote system, or <code>false</code>
- * otherwise (e.g. setting a local user preference).
- * @see #getDefaultEncoding(boolean)
- */
- public void setDefaultEncoding(String encoding, boolean fromRemote);
-
- /**
- * Set the promptable attribute.
- * @param value The new value of the Promptable attribute
- */
- void setPromptable(boolean value);
-
- /**
- * Returns the value of the '<em><b>Offline</b></em>' attribute.
- * <p>
- * Query if this connection is offline or not.
- * If so, there is no live connection. Subsystems
- * decide how much to enable while offline.
- * It is up to each subsystem to honor this flag.
- * </p>
- * @return the value of the '<em>Offline</em>' attribute.
- * @see #setOffline(boolean)
- */
- boolean isOffline();
-
- /**
- * Specify if this connection is offline or not.
- * It is up to each subsystem to honor this flag.
- *
- * @param value the new value of the '<em>Offline</em>' attribute.
- * @see #isOffline()
- */
- void setOffline(boolean value);
-
- /**
- * Returns all the connector services currently configured for this host
- * @return the connector services
- */
- IConnectorService[] getConnectorServices();
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ILabeledObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ILabeledObject.java
deleted file mode 100644
index 2b8f86ad3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ILabeledObject.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 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 API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * This interface provides a means of extending RSE model objects and property sets
- * with labels that can be used for display purposes.
- * The persistence characteristics of labels are left to the implementing
- * objects.
- */
-public interface ILabeledObject {
-
- /**
- * @return the display label for the object. If this has not
- * previously been set, this can return the name of object or
- * some other generated or constant label. It may return null
- * if no label can be determined.
- */
- public String getLabel();
-
- /**
- * @param label A display label for this object.
- */
- public void setLabel(String label);
-
-}
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 e60e52472..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IProperty.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - added javadoc
- * David Dykstal (IBM) - [150939] added read-only attribute
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * Properties are contained in property sets ({@link IPropertySet}) and may be
- * associated with objects that implement {@link IPropertySetContainer}. These
- * would typically be model objects. Properties also have a type (see
- * {@link IPropertyType}).
- *
- * @see IRSEModelObject
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. Use
- * {@link Property} directly.
- */
-public interface IProperty {
-
- /**
- * @return the name of the property.
- */
- public String getKey();
-
- /**
- * Sets the displayable label of the property.
- * @param label the label for this property.
- */
- public void setLabel(String label);
-
- /**
- * @return the displayable label of this property
- */
- public String getLabel();
-
- /**
- * Sets the value of this property.
- * May raise a runtime exception if the new value of the property is
- * not compatible with its type.
- * @param value the new value for this property.
- */
- public void setValue(String value);
-
- /**
- * @return the value of this property
- */
- public String getValue();
-
- /**
- * Sets the type of this property. May raise an runtime exception if the
- * value of the property is not compatible with the new type.
- *
- * @param type the property type
- */
- public void setType(IPropertyType type);
-
- /**
- * @return the type of this property
- */
- public IPropertyType getType();
-
- /**
- * Sets the "enabled" presentation attribute of this property.
- * This is an attribute that can be used to drive the presentation of this
- * property and does not otherwise affect how this property can be used.
- * Properties are enabled by default.
- * @param flag true if the property is to be enabled.
- */
- public void setEnabled(boolean flag);
-
- /**
- * Retrieves the "enabled" presentation attribute of this property.
- * This is an attribute that can be used to drive the presentation of this
- * property and does not otherwise affect how this property can be used.
- * @return true if the property is enabled.
- */
- public boolean isEnabled();
-
- /**
- * Sets the "read-only" presentation attribute of this property.
- * This is an attribute that can be used to drive the presentation of this
- * property and does not otherwise affect how this property can be used.
- * Properties are read-write by default.
- * @param flag true if the property is to be read-only.
- */
- public void setReadOnly(boolean flag);
-
- /**
- * Retrieves the "read-only" presentation attribute of this property.
- * This is an attribute that can be used to drive the presentation of this
- * property and does not otherwise affect how this property can be used.
- * @return true if the property is read-only.
- */
- public boolean isReadOnly();
-
-} \ 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 e5b04adda..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - Added Javadoc.
- * David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. Use
- * {@link PropertySet} directly.
- */
-public interface IPropertySet extends IPropertySetContainer {
- /**
- * The key used to store the description of the Property Set.
- * This is no longer used and should not be referenced except for
- * compatibility reasons.
- */
- 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>addProperty(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();
-
- /**
- * Sets the description property of the property set.
- * Fully equivalent to
- * <code>addProperty(IPropertySet.DESCRIPTION_KEY, description);</code>
- * @param description the string describing this property set.
- */
- public void setDescription(String description);
-
- /**
- * 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.
- * The interface defines no particular ordering for the
- * keys.
- *
- * @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);
-
- /**
- * Sets the container of this property set. Used to notify the container of
- * a change in a property.
- *
- * @param container the property set container
- */
- public void setContainer(IPropertySetContainer container);
-
- /**
- * @return the container of this property set or null if there is no container.
- */
- public IPropertySetContainer getContainer();
-}
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 6b1e2e0c4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySetContainer.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Johann Draschwandtner (Wind River) - [227509][apidoc] Add note how to persist property sets
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * A property set container is capable of containing property sets. This interface allows for the
- * addition, retrieval, and deletion of property sets from the container. A property set may have only
- * one container.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IPropertySetContainer {
-
- /**
- * Retrieves an array all property sets known to this container. It will return an empty array if this
- * container has property sets. The order of these property sets is not dictated by the interface.
- * @return an array of property sets.
- */
- public IPropertySet[] getPropertySets();
-
- /**
- * Retrieves a particular property set by its name.
- * @param name the name of the property set.
- * @return the named property set or null if one by that name does not exist.
- */
- public IPropertySet getPropertySet(String name);
-
- /**
- * Creates a new property set of a particular name in this container.
- *
- * If one already exists by this name, it is replaced with a new empty
- * property set.
- *
- * In order to have the property set persisted, the implementing class
- * should also implement {@link IRSEPersistableContainer}. The
- * {@link IRSEPersistableContainer#commit()} method must then be used to
- * commit any changes into persistent storage.
- *
- * @param name the name of the property set.
- * @return The property set.
- */
- public IPropertySet createPropertySet(String name);
-
- /**
- * Creates a new property set of a particular name and description in this
- * container. If one already exists by this name it is replaced with a new
- * empty property set.
- *
- * In order to have the property set persisted, the implementing class
- * should also implement {@link IRSEPersistableContainer}. The
- * {@link IRSEPersistableContainer#commit()} method must then be used to
- * commit any changes into persistent storage.
- *
- * @param name the name of the property set.
- * @param description the description (usually already localized) for this
- * property set.
- * @return the newly created property set.
- */
- public IPropertySet createPropertySet(String name, String description);
-
- /**
- * Adds an existing property set to this container. If the property set already has a container
- * it is removed from that container and added to this one. If this container already
- * has a property set by this name, this one replaces it.
- * @param set the property set to be added.
- * @return true if the property set was added.
- */
- public boolean addPropertySet(IPropertySet set);
-
- /**
- * Adds a number of existing property sets to this container.
- * @param sets the sets to be added
- * @return true if all property sets were added.
- * @see #addPropertySet(IPropertySet)
- */
- public boolean addPropertySets(IPropertySet[] sets);
-
- /**
- * Removes a particular property set from this container.
- * @param name the name of the property set to be removed
- * @return true if the property set was removed;
- * false if a property set was not removed, usually if it does not exist in the container.
- */
- public boolean removePropertySet(String name);
-
-}
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 7946ab8c3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertyType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - added javadoc
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * Property types are used to type instances of {@link IProperty}.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. Use
- * {@link PropertyType} directly.
- */
-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;
-
- /**
- * @return true if the property is of TYPE_STRING
- */
- public boolean isString();
-
- /**
- * @return true if the property is of TYPE_INTEGER
- */
- public boolean isInteger();
-
- /**
- * @return true if the property is of TYPE_ENUM
- */
- public boolean isEnum();
-
- /**
- * @return true if the property is of TYPE_BOOLEAN
- */
- public boolean isBoolean();
-
- /**
- * @return the integer value of the property type
- */
- public int getType();
-
- /**
- * @return the array of values that comprise the enumeration
- */
- public String[] getEnumValues();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSECallback.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSECallback.java
deleted file mode 100644
index 4af32dc4f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSECallback.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-package org.eclipse.rse.core.model;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Implement this class to create callbacks.
- */
-public interface IRSECallback {
-
- public void done(IStatus status, Object result);
-}
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 ce0e1b2c6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEModelObject.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-
-/**
- * IRSEModelObject is the root type of all objects in the RSE model.
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * The standard implementations are included in the framework.
- */
-public interface IRSEModelObject extends IPropertySetContainer, IRSEPersistableContainer {
-
- String getName();
-
- String getDescription();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java
deleted file mode 100644
index c091337bf..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IRSEPersistableContainer.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - adding new persistence support
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * This is the interface for all objects that contain persistent data.
- * The objects themselves may not have a persistent form, but can lie in the
- * persistence hierarchy and be reconstructed when the persistent form is restored.
- * An example of this is the SytemFilterPoolManager, which is itself not persisted, but
- * has this interface since it can be reconstructed from its ordering and exists
- * in the parent chain from SystemFilterPool to SystemProfile.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRSEPersistableContainer {
-
- /**
- * A constant indicating the presence of no children for a given container.
- * This can be used when implementing {@link #getPersistableChildren()}.
- * The value is an empty array.
- */
- public static final IRSEPersistableContainer[] NO_CHILDREN = new IRSEPersistableContainer[0];
-
- /**
- * 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();
-
- /**
- * Sets the restored state of the object. Only persistence managers
- * should do this. Persistable objects should be initially created with
- * this as false and the persistence manager set this to true.
- * This attribute is "sticky" in the face of most property changes.
- * It should be set false if the object is renamed or re-parented.
- * @param flag true if the object was restored.
- */
- public void setWasRestored(boolean flag);
-
- /**
- * 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();
-
- /**
- * <p>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.
- * <p>Persistable changes are:
- * <ul>
- * <li>Any modification of a persistable attribute</li>
- * <li>A rename</li>
- * <li>A deletion of a child object</li>
- * <li>A reordering of the list of child objects</li>
- * <li>The addition of a child object</li>
- * </ul>
- * <p>A rename may also cause a parent to be marked dirty if the
- * parent refers to the child by name.
- * <p>Setting this value to false should be done only in the persistence
- * manager after the object has been written to the DOM.
- * <p>Marking an object as dirty must cause it and all of its ancestors
- * in the persistence hierarchy to be marked as tainted.
- * @param flag true if the object must be persisted.
- */
- public void setDirty(boolean flag);
-
- /**
- * An object is tainted if it contains an object that is dirty
- * somewhere in its containment hierarchy.
- * @return true if the object is tainted.
- */
- public boolean isTainted();
-
- /**
- * Sets the tainted attribute for this object. This should set to
- * true only by child objects when they have been marked dirty or tainted.
- * Setting this to true will cause all parent objects in the containment
- * hierarchy to be marked tainted.
- * It should be set to false only by a persistence manager when the
- * object has been committed.
- * @param flag the tainted state of the object.
- */
- public void setTainted(boolean flag);
-
- /**
- * Retrieve the parent of this object in the persistence containment hierarchy.
- * This is related to, but not necessarily the same as, the model hierarchy.
- * @return the parent persistent object. This is null if there is no parent.
- */
- public IRSEPersistableContainer getPersistableParent();
-
- /**
- * Retrieves the children of this object in the persistence containment hierarchy.
- * This is related to, but not necessarily the same as, the model hierarchy.
- * @return the array of persistent children in the order they are to be stored in the
- * persistent form. This is an empty array if there are no children.
- * See {@link #NO_CHILDREN}.
- */
- public IRSEPersistableContainer[] getPersistableChildren();
-
-} \ 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 7bbcbbf2d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurationCategories.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * Constants for predefined subsystem factory categories. Use these in calls to
- * {@link org.eclipse.rse.core.model.ISystemRegistry#getHostsBySubSystemConfigurationCategory(String)}
- * . This is a constant interface. The individual items should be referenced
- * directly.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurator.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurator.java
deleted file mode 100644
index 799be5356..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISubSystemConfigurator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * An interface used to drive properties into a subsystem during host creation.
- *
- * This is an internal interface for use in the framework. Potential clients
- * should extend one of the implementations or implement one of the extensions.
- *
- * @since org.eclipse.rse.core 3.0
- */
-public interface ISubSystemConfigurator {
-
- /**
- * Return the subsystem configuration associated with these properties.
- */
- public ISubSystemConfiguration getSubSystemConfiguration();
-
- /**
- * Apply the values herein to a subsystem.
- * @param ss the subystem to be affected.
- * @return true if the values were applied.
- */
- public boolean applyValues(ISubSystem ss);
-
-}
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 20aaa54d1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContainer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * ISystemContainer is an interface implemented by objects that can contain remote resources.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * These implementations can be extended by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-
-}
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 a178418ef..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemContentsType.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * Common interface for representing different contents types of artifacts that
- * can be stored in an IRemoteContainer.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-}
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 104cba69e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemHostPool.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [210534] Remove ISystemHostPool.getHostList() and setName()
- * David Dykstal (IBM) - [210537] removed exception signalling from this interface, no longer needed
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-
-/**
- * An ordered list of connections ({@link IHost} objects), owned by an
- * {@link ISystemProfile}.
- * <p>
- * Implementations of this interface are expected to be thread-safe in the sense
- * that integrity of the host list is maintained even if multiple threads call
- * multiple methods in this interface concurrently.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemHostPool extends IRSEPersistableContainer {
-
- /**
- * Return the system profile that owns this connection pool.
- * @return the system profile that owns this connection pool.
- */
- public ISystemProfile getSystemProfile();
-
- /**
- * Return the name of this host pool.
- * @return The value of the Name attribute.
- */
- String getName();
-
- /**
- * Rename this connection pool.
- * @param newName the new name for this connection pool.
- */
- public void renameHostPool(String newName);
-
- /**
- * Return array of connections in this pool.
- *
- * The returned array is a copy of the internal connection list. Modifications by
- * clients will not affect the internal list of connections, but modifications to
- * the array elements will affect the actual IHost objects maintained in the list.
- *
- * @return array of connections in this pool.
- */
- public IHost[] getHosts();
-
- /**
- * 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 types
- * defined via the systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName IP name or address of the host.
- * @return IHost object, or null if it failed to create
- * because the aliasName is not unique. All other errors throw an exception.
- */
- public IHost createHost(IRSESystemType systemType, String aliasName, String hostName);
-
- /**
- * 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 types
- * defined via the systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName IP name or address of the host.
- * @param description optional description of the connection. Can be null.
- * @return IHost object, or <code>null</code> if it failed to create
- * because the aliasName is not unique. All other errors throw an exception.
- */
- public IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description);
-
- /**
- * 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 types
- * defined via the systemTypes extension point.
- * @param aliasName unique connection name.
- * @param hostName IP name or address of the 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 IRSEUserIdConstants for values.
- * @return IHost object, or <code>null</code> if it failed to create
- * because the aliasName is not unique.
- * @see IRSEUserIdConstants
- */
- public IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation);
-
- /**
- * 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 IHost to be updated
- * @param systemType system type matching one of the system types
- * defined via the systemType extension point.
- * @param aliasName unique connection name.
- * @param hostName IP name or address of the 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 from IRSEUserIdConstants.
- * @see IRSEUserIdConstants
- */
- public void updateHost(IHost conn, IRSESystemType systemType, String aliasName, String hostName, String description, String defaultUserId, int defaultUserIdLocation);
-
- /**
- * 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 IHost object with unique aliasName, or null if
- * no connection object with this name exists.
- */
- public IHost getHost(String aliasName);
-
- /**
- * Return the connection at the given zero-based offset.
- * @param pos zero-based offset of requested connection in the connection list.
- * @return IHost object requested.
- */
- public IHost getHost(int pos);
-
- /**
- * Add a new connection to the list.
- * <p>
- * This method will not ensure that the added connection's alias name is
- * different (case-insensitive) than all other existing alias names.
- * Clients are responsible for maintaining this invariant.
- * </p>
- * @param conn Connection to add. Must not be <code>null</code>.
- * @return <code>true</code> if the new connection was added successfully, false otherwise.
- */
- 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 IHost 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 IHost object to rename
- * @param newName The new alias name to give that connection.
- * The alias name is not checked for uniqueness. Clients are responsible
- * themselves for ensuring that no two connections with the same alias
- * name (compared case insensitive) are created.
- */
- public void renameHost(IHost conn, String newName);
-
- /**
- * Return the zero-based position of a connection object within this host pool.
- * @param conn connection to find in this host pool.
- * @return the zero-based position of the requested connection in this host pool,
- * or -1 if the connection was not found.
- */
- public int getHostPosition(IHost conn);
-
- /**
- * Return the number of connections within this pool.
- * @return the number of IHost objects within this pool.
- */
- public int getHostCount();
-
- /**
- * Duplicates a given connection in this list within this list or another list.
- * @param targetPool The ISystemHostPool to hold the copied connection. Can equal this pool,
- * as long as alias name is unique.
- * @param conn IHost object (within our pool) to clone.
- * @param aliasName New, unique, alias name to give this connection. Clone will fail
- * (returning <code>null</code> as result) if this is not unique.
- * @return the cloned host, or <code>null</code> if the new alias name was not unique.
- */
- public IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName);
-
- /**
- * Move existing connections a given number of positions in the same pool.
- * If the delta is negative, they are all moved up (left) by the given amount. If
- * positive, they are all moved down (right) 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 an Array of hosts to move, can be empty but must not be null.
- * @param delta the amount by which to move the hosts within this pool
- */
- public void moveHosts(IHost conns[], int delta);
-
- /**
- * Order connections by alias name, in the order given by the names parameter.
- *
- * Called after restore to order by user preferences. Alias names are case-insensitive.
- * Existing connections in the internal connection list that do not match any
- * alias name in the given name list, will be deleted from this host pool!
- *
- * @param names list of connection alias names in expected order.
- */
- public void orderHosts(String[] names);
-
-} \ 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 40bcbefde..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemMessageObject.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * This interface represents a message we wish to display as child node in the
- * tree view.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. The
- * standard implementations are included in the framework.
- */
-public interface ISystemMessageObject {
- /**
- * 0. An error occurred.
- */
- public static final int MSGTYPE_ERROR = 0;
- /**
- * 1. User cancelled
- */
- 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();
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.java
deleted file mode 100644
index d1ba5bed8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemModifiableContainer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * A modifiable container allows its contents to be set directly.
- *
- * @noimplement This interface is not intended to be implemented by clients. The
- * standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- *
- * @since org.eclipse.rse.core 3.0
- */
-public interface ISystemModifiableContainer extends ISystemContainer {
-
- /**
- * Cache contents of a certain type.
- * @param type the contents type.
- * @param cachedContents the contents to cache.
- */
- public void setContents(ISystemContentsType type, Object[] cachedContents);
-
-}
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 3d18fa539..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfile.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [197036] removed createHost() shortcut (should use ISystemRegistry),
- * cleaned javadoc for getFilterPools()
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * David Dykstal (IBM) - [200735][Persistence] Delete a profile that contains a connection and restart, profile is back without connections
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-
-/**
- * A system profile holds definitions for hosts (connections), filter pools,
- * filters, and filter strings. It is the unit of persistence for those
- * definitions. Individual hosts and filter pool definitions always reside in a
- * profile and the profile itself is the entity that is saved and restored.
- * <p>
- * Profiles may be active or inactive. An active profile contributes its
- * definitions to RSE. When made inactive, it those definition are no longer
- * available for use.
- * <p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. The
- * standard implementations are included in the framework.
- */
-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();
-
- /**
- * @return The value of the Name attribute
- */
- String getName();
-
- /**
- * Sets the name of the profile.
- * Profile names must not contain three consecutive underscores "___", since these are used
- * to separate a profile name from a filter pool name in a filter pool reference.
- * @param value The new value of the Name attribute
- * @throws IllegalArgumentException if the name contains three consecutive underscore characters.
- */
- 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 existing 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.
- * An active profile is one that whose connections and filter pools are available
- * for use by RSE. A profile may be loaded but be inactive.
- * The active state of a profile is remembered from session to session.
- */
- public boolean isActive();
-
- /**
- * Activates or deactivates a profile. If the profile is already in the
- * requested state, this will do nothing. The default private system profile
- * cannot be deactivated and such a request will be ignored.
- * @param flag true to activate the profile, false to deactivate it.
- * @see ISystemProfile#isActive()
- */
- public void setActive(boolean flag);
-
- /**
- * Suspend this profile.
- * Suspended profiles ignore commit requests.
- * Profiles are created in a non-suspended state.
- * Profiles should be suspended while deleting their contents prior to their own deletion.
- * Note that being non-suspended is a different condition than being active.
- * A suspended profile may be resumed.
- * @since 3.0
- * @see #resume()
- */
- public void suspend();
-
- /**
- * Resume this profile from a suspended state.
- * The profile will now honor commit requests.
- * @since 3.0
- * @see #suspend()
- */
- public void resume();
-
- /**
- * @return true if the profile is in a suspended state
- * @since 3.0
- * @see #suspend()
- * @see #resume()
- */
- public boolean isSuspended();
-
- /**
- * Each profile is persisted by a persistence provider. This returns the instance of the
- * persistence provider used for this profile. New profiles will use the default persistence
- * provider unless one is set by some other means.
- * @return The persistence provider used for saving and restoring this profile.
- */
- public IRSEPersistenceProvider getPersistenceProvider();
-
- /**
- * Sets the persistence provider for the use of this profile. If this is not called then
- * this profile will be persisted by the default persistence provider. This will typically
- * be set by either a persistence persistence provider when restoring a profile or by a migration
- * utility when converting profiles from one form to another.
- * @param provider the persistence provider to use when saving this profile.
- */
- public void setPersistenceProvider(IRSEPersistenceProvider provider);
-}
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 cc0551f6c..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, 2009 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:
- * David Dykstal (IBM) - [197036] added commitSystemProfile operation to interface
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Manages a list of SystemProfile objects. System profiles should be created,
- * deleted, restored, activated, and deactivated though this interface if event
- * processing is not desired. If events are necessary then the system registry
- * should be used.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. The
- * standard implementations are included in the framework.
- */
-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>
- * @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.
- * The default private profile cannot be deactivated and such a request will be ignored.
- * @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. This is guaranteed to contain the
- * default private profile.
- */
- public ISystemProfile[] getSystemProfiles();
-
- /**
- * @return the number of profiles known to this manager.
- */
- public int getSize();
-
- /**
- * @return an array of all existing profile names.
- */
- public String[] getSystemProfileNames();
-
- /**
- * 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();
-
- /**
- * @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. The default private profile cannot be deleted and such a request will be ignored.
- * @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);
-
- /**
- * Commit a system profile
- *
- * @param profile the profile to commit
- * @return a status object indicating the result of the commit
- * @since org.eclipse.rse.core 3.0
- */
- public IStatus commitSystemProfile(ISystemProfile profile);
-
- /**
- * 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);
-
- /**
- * Adds a system profile to this profile manager.
- * @param profile The system profile to add.
- */
- public void addSystemProfile(ISystemProfile profile);
-
-}
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 ae8996fea..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java
+++ /dev/null
@@ -1,1009 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189123] Prepare ISystemRegistry for move into non-UI
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [207100] adding ISystemRegistry.isRegisteredSystemRemoteChangeListener
- * David Dykstal (IBM) - [197036] adding new createHost and getSubSystemConfigurationsBySYstemType which
- * are able to delay the creation of subsystems.
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
- * David Dykstal (IBM) - [236516] Bug in user code causes failure in RSE initialization
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- * Martin Oberhuber (Wind River) - [245154][api] add getSubSystemConfigurationProxiesBySystemType()
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-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.jobs.ISchedulingRule;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeListener;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeListener;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-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;
-import org.eclipse.rse.internal.core.RSECoreRegistry;
-
-/**
- * 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#getTheSystemRegistry()}.
- * <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.
- * </p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. The
- * standard implementations are included in the framework.
- */
-public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemViewInputProvider {
-
- /**
- * Get the SystemFilterStartHere singleton instance.
- * @return the SystemFilterStartHere singleton instance.
- */
- public ISystemFilterStartHere getSystemFilterStartHere();
-
- // ----------------------------
- // SUBSYSTEM FACTORY METHODS...
- // ----------------------------
-
- /**
- * Public method to retrieve list of subsystem configuration proxies
- * registered by extension points.
- *
- * @return all subsystem configuration proxies.
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxies();
-
- /**
- * Return all subsystem configuration proxies matching a subsystem
- * configuration category.
- *
- * @param configurationCategory a subsystem configuration category.
- * @return all subsystem configuration proxies matching the given category,
- * or an empty array if none matches.
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String configurationCategory);
-
- /**
- * Return all subsystem configuration proxies that are registered against
- * the given system type.
- *
- * @param systemType system type to filter
- * @return all subsystem configuration proxies matching the given system
- * type, or an empty array if none matches.
- * @since 3.1
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesBySystemType(IRSESystemType systemType);
-
- /**
- * Return all subsystem factories.
- *
- * Be careful when you call this, as it activates all subsystem
- * configurations.
- *
- * @deprecated use {@link #getSubSystemConfigurationProxies()} and filter
- * the list of needed subsystem configurations in order to
- * activate only those that are really needed.
- */
- public ISubSystemConfiguration[] getSubSystemConfigurations();
-
- /**
- * Return the subsystem configuration, given its plugin.xml-declared id.
- */
- public ISubSystemConfiguration getSubSystemConfiguration(String id);
-
- /**
- * Return all subsystem configurations which support the given system type.
- * If the type is null, returns all subsystem configurations. Fully
- * equivalent to getSubSystemConfigurationsBySystemType(systemType,
- * filterDuplicates, <code>true</code>) which is preferred since we do not
- * want to load subsystem configurations unless necessary.
- *
- * @param systemType system type to filter
- * @param filterDuplicates if true and the subsystem configuration uses
- * services then return only one subsystem configuration that
- * supports this service. Which configuration is returned is
- * undefined.
- * @return an array of subsystem configurations meeting the criteria
- *
- * @deprecated Use
- * {@link #getSubSystemConfigurationsBySystemType(IRSESystemType,boolean,boolean)}
- * instead in order to avoid instantiating subsystem
- * configurations if possible.
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(IRSESystemType systemType, boolean filterDuplicates);
-
- /**
- * Return all subsystem configurations which support the given system type.
- * If the type is null, returns all subsystem configurations.
- *
- * @param systemType system type to filter
- * @param filterDuplicates if true and the subsystem configuration uses
- * services then return only one subsystem configuration that
- * supports this service. Which configuration is returned is
- * undefined.
- * @param activate if true activate the respective configurations if not
- * already active, if false return only those that are already
- * active.
- * @return an array of subsystem configurations meeting the criteria
- * @since org.eclipse.rse.core 3.0
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(IRSESystemType systemType, boolean filterDuplicates, boolean activate);
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
-
- /**
- * 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);
-
- // ----------------------------
- // PROFILE METHODS...
- // ----------------------------
- /**
- * Return singleton profile manager
- */
- public ISystemProfileManager getSystemProfileManager();
-
- /**
- * Return the profiles currently selected by the user as his "active" profiles
- * @see ISystemProfileManager#getActiveSystemProfiles()
- */
- public ISystemProfile[] getActiveSystemProfiles();
-
- /**
- * 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
- * Note that there are some naming restrictions on profile names.
- * @see ISystemProfile#setName(String)
- */
- public ISystemProfile createSystemProfile(String profileName, boolean makeActive) throws Exception;
-
- /**
- * Copy a SystemProfile. All connections connection data is copied.
- * Note that there are some naming restrictions on profile names.
- * @see ISystemProfile#setName(String)
- * @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
- * @param monitor Progress monitor to reflect each step of the operation
- * @return new SystemProfile object
- */
- public ISystemProfile copySystemProfile(ISystemProfile profile, String newName, boolean makeActive, IProgressMonitor monitor) throws Exception;
-
- /**
- * Rename a SystemProfile. Rename is propagated to all subsystem factories so
- * they can rename their filter pool managers and whatever else is required.
- * Note that there are some naming restrictions on profile names.
- * @see ISystemProfile#setName(String)
- */
- 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.
- * The default private profile cannot be deleted and such a request will be ignored.
- * <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.
- * The default private profile cannot be deactivated and such
- * a request will be ignored.
- */
- public void setSystemProfileActive(ISystemProfile profile, boolean makeActive);
-
- /**
- * Return the list of connector services currently configured for the given host
- * @param host the host
- * @return the list of connector services
- */
- public IConnectorService[] getConnectorServices(IHost host);
-
- // ----------------------------
- // SUBSYSTEM METHODS...
- // ----------------------------
-
- /**
- * Return list of subsystem objects for a given host.
- * @param host the host for which to return the subsystems that are currently known.
- * @return an array of subsystem objects known to this host.
- */
- public ISubSystem[] getSubSystems(IHost host);
-
- /**
- * Return list of subsystem objects for a given connection.
- * @param host the host for which to return the subsystems that are known.
- * @param force if true, force the creation of subsystems for which the system type of this host is configured.
- * Use this parameter with care since it can cause extensive initialization.
- * @return the list of subsystems known to this host, possibly after the creation of subsystems.
- * @deprecated Use {@link #getSubSystems(IHost)} instead, the "force" parameter is now ignored.
- */
- public ISubSystem[] getSubSystems(IHost host, boolean force);
-
- /**
- * Get those subsystems that are registered against a given connection,
- * which are an instance of the given interface class.
- * </p>
- * @param host the connection to check
- * @param subsystemInterface the interface class to filter against
- * @return list of matching subsystems
- */
- public ISubSystem[] getSubsystems(IHost host, Class subsystemInterface);
-
- /**
- * Get those subsystems that are registered against a given connection,
- * which are service subsystems with the given serviceType.
- * </p>
- * @param host the host to check
- * @param serviceType the class of service to ask for
- * @return list of matching subsystems
- */
- public ISubSystem[] getServiceSubSystems(IHost host, Class serviceType);
-
- /**
- * Resolve a subsystem from it's absolute name
- * The absolute name of a subsystem
- * is denoted by <I>profileName</I>.<I>connectionName</I>:<I>subsystemConfigurationId</I>
- * @param absoluteSubSystemName the name of the subsystem
- * @return the subsystem or null if the profile, connection, or subsystem configuration cannot be found.
- */
- 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 host the host (aka connection) object to query
- * @return the absolute name of the host
- */
- public String getAbsoluteNameForConnection(IHost host);
-
- /**
- * 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
- * @deprecated use {@link #getSubSystemConfigurationProxiesByCategory(String)}
- * and instantiate only those subsystem configurations from the proxy
- * that are really needed. Then, use {@link ISubSystemConfiguration#getSubSystems(boolean)}
- * with a parameter true.
- */
- public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory, IHost host);
-
- /**
- * 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 the local host 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 the local host will usually do, we just search all active profiles
- * until we find one, and return it. <br>
- * If no connection to the local host can be found, this will return <code>null</code>.
- * 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.
- */
- public IHost[] getHostsByProfile(ISystemProfile profile);
-
- /**
- * Return all connections for which there exists one or more
- * subsystems owned by a given subsystem configuration.
- * @see #getSubSystemConfiguration(String)
- */
- public IHost[] getHostsBySubSystemConfiguration(ISubSystemConfiguration config);
-
- /**
- * Return all connections for which there exists one or more
- * subsystems owned by any a given subsystem configuration
- * that is of the given category.
- * <p>
- * This looks for a match on the "category" of the subsystem
- * configuration's xml declaration in its plugin.xml file.
- * Thus, it is efficient as it need not bring to life a
- * subsystem configuration just to test its parent class type.
- *
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- */
- public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory);
-
- /**
- * Returns all connections for all active profiles, for the given system type.
- * If the specified system type is null, an empty array is returned.
- * In order to get an IRSESystemType, use
- * <code>RSECorePlugin.getTheCoreRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}</code>
- *
- * @param systemType The system type instance.
- * @return The list of connections or an empty array.
- */
- public IHost[] getHostsBySystemType(IRSESystemType systemType);
-
- /**
- * Return all connections for all active profiles, for the given system types.
- *
- * In order to get an IRSESystemType, use
- * <code>RSECorePlugin.getTheCoreRegistry().{@link RSECoreRegistry#getSystemTypeById(String) getSystemTypeById(String)}</code>
- */
- public IHost[] getHostsBySystemTypes(IRSESystemType[] 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(ISystemProfile profile);
-
- /**
- * 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 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 previously specified host names for a given system type.
- * After careful consideration, it is decided that if the system type is null,
- * then no host names should be returned. Previously all for all types were returned.
- */
- public String[] getHostNames(IRSESystemType systemType);
-
- /**
- * 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 types
- * 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 configurators these are the configurators supplied by the subsystem configurations 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.
- * @since 3.0
- */
- public IHost createHost(String profileName, IRSESystemType systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation,
- ISubSystemConfigurator[] configurators) 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 types
- * 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, IRSESystemType 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 types
- * defined via the systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostAddress 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(IRSESystemType systemType, String connectionName, String hostAddress, String description) throws Exception;
-
- /**
- * Create a host object. The resulting host object is added to the list of
- * existing host objects in the specified profile.
- * <ul>
- * <li>creates and saves a new host within the given profile
- * <li>optionally creates subsystem instances
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_ADD to all
- * registered listeners
- * </ul>
- * <p>
- *
- * @param profileName Name of the system profile to which the host is to be
- * added.
- * @param systemType system type of the new host.
- * @param hostName unique host name within the profile.
- * @param hostAddress ip name of host.
- * @param description optional description of the connection. May be null.
- * @param createSubSystems <code>true</code> to create subsystems for the
- * host, <code>false</code> otherwise.
- * @return IHost object, or null if it failed to create. This is typically
- * because the hostName is not unique. Call getLastException() if
- * necessary.
- * @since org.eclipse.rse.core 3.0
- */
- public IHost createHost(String profileName, IRSESystemType systemType, String hostName, String hostAddress, String description, boolean createSubSystems) throws Exception;
-
- /**
- * Update an existing host given the new information.
- * This method:
- * <ul>
- * <li>calls the setXXX methods on the given host object, updating the information in it.
- * <li>save the host's host pool to disk
- * <li>fires an ISystemResourceChangeEvent event of type EVENT_CHANGE to all registered listeners
- * <li>if the system type or host name is changed, calls disconnect on each associated subsystem.
- * We must do this because a host name changes fundamentally affects the connection,
- * rendering any information currently displayed under
- * that host obsolete.
- * </ul>
- * <p>
- * @param host the host to be updated
- * @param systemType system type matching one of the system types
- * defined via the systemTypes extension point.
- * @param connectionName unique connection name.
- * @param hostName ip name of host.
- * @param description optional description of the host. Can be null.
- * @param defaultUserId userId to use as the default for the subsystems under this host.
- * @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(IHost host, IRSESystemType systemType, String connectionName,
- String hostName, String description,
- String defaultUserId, int defaultUserIdLocation);
-
- /**
- * Creates subsystems for a given host and subsystem configurations.
- * If a subsystem cannot be created then null is returned in its corresponding place in the returned array.
- * @param host the host.
- * @param configurations the subsystem configurations.
- * @return the array of subsystems corresponding to the array of given configurations.
- * @since 2.0
- */
- public ISubSystem[] createSubSystems(IHost host, ISubSystemConfiguration[] configurations);
-
- /**
- * 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 conn The connection to copy
- * @param targetProfile What profile to copy into
- * @param newName Unique name to give copied profile
- * @param monitor Progress monitor to reflect each step of the operation
- * @return new SystemConnection object
- */
- public IHost copyHost(IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor) throws Exception;
-
- /**
- * 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 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
- * @param monitor Progress monitor to reflect each step of the operation
- * @return new SystemConnection object
- */
- public IHost moveHost(IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor) 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.
- * Update properties for the subsystem and its connection.
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected);
-
- /**
- * 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);
-
- // ----------------------------
- // RESOURCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when a system resource such as a connection is changed.
- */
- public void addSystemResourceChangeListener(ISystemResourceChangeListener l);
-
- /**
- * De-Register your interest in being told when a system resource such as a connection is changed.
- */
- public void removeSystemResourceChangeListener(ISystemResourceChangeListener l);
-
- /**
- * Query if the ISystemResourceChangeListener is already listening for SystemResourceChange events
- */
- public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l);
-
- /**
- * Notify all listeners of a change to a system resource such as a connection.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemResourceChangeEvent event);
-
- /**
- * Notify a specific listener of a change to a system resource such as a connection.
- */
- public void fireEvent(ISystemResourceChangeListener l, ISystemResourceChangeEvent event);
-
- // ----------------------------
- // MODEL RESOURCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when an RSE model resource is changed.
- * These are model events, not GUI-optimized events.
- */
- public void addSystemModelChangeListener(ISystemModelChangeListener l);
-
- /**
- * De-Register your interest in being told when an RSE model resource is changed.
- */
- public void removeSystemModelChangeListener(ISystemModelChangeListener l);
-
- /**
- * Notify all listeners of a change to a system model resource such as a connection.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemModelChangeEvent event);
-
- /**
- * Notify all listeners of a change to a system model resource such as a connection.
- * This one takes the information needed and creates the event for you.
- */
- public void fireModelChangeEvent(int eventType, int resourceType, Object resource, String oldName);
-
- /**
- * Notify a specific listener of a change to a system model resource such as a connection.
- */
- public void fireEvent(ISystemModelChangeListener l, ISystemModelChangeEvent event);
-
- // --------------------------------
- // REMOTE RESOURCE EVENT METHODS...
- // --------------------------------
-
- /**
- * Register your interest in being told when a remote resource is changed.
- * These are model events, not GUI-optimized events.
- */
- public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l);
-
- /**
- * Unregister your interest in being told when a remote resource is changed.
- */
- public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l);
-
-
- /**
- * Query if the ISystemRemoteChangeListener is already listening for
- * SystemRemoteChange events.
- *
- * @param l the listener instance to check
- * @since org.eclipse.rse.core 3.0
- */
- public boolean isRegisteredSystemRemoteChangeListener(ISystemRemoteChangeListener l);
-
- /**
- * Notify all listeners of a change to a remote resource such as a file.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemRemoteChangeEvent event);
-
- /**
- * Notify all listeners of a change to a remote resource such as a file.
- * This one takes the information needed and creates the event for you.
- *
- * @param eventType - one of the constants from
- * {@link org.eclipse.rse.core.events.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 occurrences 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 oldNames - on a rename, copy or move operation, these are the
- * absolute names of the resources prior to the operation
- * @since org.eclipse.rse.core 3.0
- */
- public void fireRemoteResourceChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames);
-
- /**
- * 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.core.events.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 occurrences 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 oldNames - on a rename, copy or move operation, these are the
- * absolute names of the resources prior to the operation
- * @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.
- * @since org.eclipse.rse.core 3.0
- */
- public void fireRemoteResourceChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames, Object originatingViewer);
-
- /**
- * 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 operation - the operation for which this event was fired
- * @param eventType - one of the constants from
- * {@link org.eclipse.rse.core.events.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 occurrences 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 oldNames - on a rename, copy or move operation, these are the
- * absolute names of the resources prior to the operation
- * @since org.eclipse.rse.core 3.0
- */
- public void fireRemoteResourceChangeEvent(String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames);
-
- /**
- * 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 operation - the operation for which this event was fired
- * @param eventType - one of the constants from
- * {@link org.eclipse.rse.core.events.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 occurrences 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 oldNames - on a rename, copy or move operation, these are the
- * absolute names of the resources prior to the operation
- * @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.
- * @since org.eclipse.rse.core 3.0
- */
- public void fireRemoteResourceChangeEvent(String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames, Object originatingViewer);
-
- /**
- * Notify a specific listener of a change to a remote resource such as a file.
- */
- public void fireEvent(ISystemRemoteChangeListener l, ISystemRemoteChangeEvent event);
-
- // ----------------------------
- // PREFERENCE EVENT METHODS...
- // ----------------------------
-
- /**
- * Register your interest in being told when a system preference changes
- */
- public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l);
-
- /**
- * Unregister your interest in being told when a system preference changes
- */
- public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l);
-
- /**
- * Notify all listeners of a change to a system preference
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemPreferenceChangeEvent event);
-
- /**
- * Notify a specific listener of a change to a system preference
- */
- public void fireEvent(ISystemPreferenceChangeListener l, ISystemPreferenceChangeEvent event);
-
- // ----------------------------
- // MISCELLANEOUS METHODS...
- // ----------------------------
-
- /**
- * Returns filter references associated with this resource under the subsystem
- */
- public List findFilterReferencesFor(Object resource, ISubSystem subsystem);
-
- /**
- * Returns filter references associated with this resource under the subsystem
- */
- public List findFilterReferencesFor(Object resource, ISubSystem subsystem, boolean onlyCached);
-
- /**
- * Marks all filters for this subsystem as stale to prevent caching
- *
- * @param subsystem the subsystem to work on
- */
- public void invalidateFiltersFor(ISubSystem subsystem);
-
- /**
- * Marks all filters for this subsystem that contain resourceParent as stale
- * to prevent caching
- *
- * @param resourceParent a remote resource object
- * @param subsystem the subsystem to work on
- */
- 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();
-}
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 759e86dae..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemResourceSet.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.List;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-/**
- * This interface is refers to a collection of any type of resources. The resources
- * may be remote RSE resources, or local workspace resources.
- * @noimplement This interface is not intended to be implemented by clients.
- * Extend {@link AbstractSystemResourceSet} instead.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemResourceSet {
-
- /**
- * Returns the number of resources in the set
- * @return the number of resources in the set
- */
- public int size();
-
- /**
- * Returns the resource in the set with the specified absoluteName
- * @param absoluteName the path of the resource to return
- * @return the resource
- */
- public Object get(String absoluteName);
-
- /**
- * Returns the path of a specified resource. This is the same path
- * that is used be the get(absoluteName) method to retrieve the object
- * @param obj the resource to return the path for
- * @return the path of the resource
- */
- public String pathFor(Object obj);
-
- /**
- * Returns the resource at the specified index
- * @param index the index of the resource to return
- * @return the resource
- */
- public Object get(int index);
-
- /**
- * Returns the set of resources as a List
- * @return the set of resources as a List
- */
- public List getResourceSet();
-
- /**
- * Returns a message if a problem occurs when using this resource set
- * @return the message
- */
- public SystemMessage getMessage();
-
- /**
- * Indicates whether a message was set corresponding to this resource set
- * during an operation against it.
- * @return true if there is a message
- */
- public boolean hasMessage();
-
- /**
- * Indicates whether the set of resources has a size in bytes greater than zero
- * @return true if there are more than 0 bytes in this set
- */
- public boolean hasByteSize();
-
- /**
- * Returns the total number of bytes in this collection of resources
- * @return the number of bytes
- */
- public long byteSize();
-
- /**
- * Sets the total number of bytes in this collection of resources
- * @param byteSize the number of bytes
- */
- public void setByteSize(long byteSize);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java
deleted file mode 100644
index 5a54e8761..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemViewInputProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split SystemRegistryUI from SystemRegistry implementation
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core from org.eclipse.rse.ui.view
- * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Abstraction for any object that wishes to be a roots-provider for the SystemView tree viewer.
- */
-public interface ISystemViewInputProvider extends IAdaptable {
-
- /**
- * Return the child objects to constitute the root elements in the system view tree.
- * @return Array of root root elements for the system view tree
- */
- public Object[] getSystemViewRoots();
-
- /**
- * Test if {@link #getSystemViewRoots()} will return a non-empty list
- * @return <code>true</code> if root elements are available, or <code>false</code> otherwise.
- */
- 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 viewer in case it is needed for anything.
- * The label and content provider will call this.
- * @param viewer the {@link org.eclipse.jface.viewers.Viewer viewer}
- * that uses this provider
- */
- public void setViewer(Object viewer);
-
- /**
- * Return the viewer we are currently associated with
- * @return the {@link org.eclipse.jface.viewers.Viewer viewer}
- * we are currently associated with
- * @deprecated use other methods for getting the active viewer.
- */
- public Object getViewer();
-} \ 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 7235149aa..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Property.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - added javadoc
- * David Dykstal (IBM) - [150939] added read-only attribute
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.Observable;
-
-/**
- * A Property is used in PropertySets and may be persisted as a result of persisting the
- * containing set. Each property has a type, a label, a key and a value.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class Property extends Observable implements IProperty {
-
- private String _name;
- private String _label;
- private String _value;
- private IPropertyType _type;
- private boolean _isEnabled = true;
- private boolean _isReadOnly = false;
-
- public Property(IProperty property) {
- _name = property.getKey();
- _label = property.getLabel();
- _value = property.getValue();
- _type = property.getType();
- _isEnabled = property.isEnabled();
- touch();
- }
-
- public Property(String name, String value, IPropertyType type, boolean isEnabled) {
- _name = name;
- _value = value;
- _type = type;
- _isEnabled = isEnabled;
- touch();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#getKey()
- */
- public String getKey() {
- return _name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#setLabel(java.lang.String)
- */
- public void setLabel(String label) {
- if (!stringsAreEqual(_label, label)) {
- _label = label;
- touch();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#getLabel()
- */
- public String getLabel() {
- if (_label == null) {
- return _name;
- }
- return _label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#setValue(java.lang.String)
- */
- public void setValue(String value) {
- if (!stringsAreEqual(_value, value)) {
- _value = value;
- touch();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#getValue()
- */
- public String getValue() {
- return _value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#setType(org.eclipse.rse.core.model.IPropertyType)
- */
- public void setType(IPropertyType type) {
- if (_type != type) {
- _type = type;
- touch();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#getType()
- */
- public IPropertyType getType() {
- return _type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#setEnabled(boolean)
- */
- public void setEnabled(boolean flag) {
- if (_isEnabled != flag) {
- _isEnabled = flag;
- touch();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#isEnabled()
- */
- public boolean isEnabled() {
- return _isEnabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#setReadOnly(boolean)
- */
- public void setReadOnly(boolean flag) {
- if (_isReadOnly != flag) {
- _isReadOnly = flag;
- touch();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IProperty#isReadOnly()
- */
- public boolean isReadOnly() {
- return _isReadOnly;
- }
-
- private boolean stringsAreEqual(String s1, String s2) {
- if (s1 == s2) return true;
- if (s1 == null) return false;
- return s1.equals(s2);
- }
-
- private void touch() {
- setChanged();
- notifyObservers();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyList.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyList.java
deleted file mode 100644
index dcd2ef482..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyList.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-package org.eclipse.rse.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * A property list is an ordered property set.
- * As items are added and removed their arrival order is maintained.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class PropertyList extends PropertySet {
-
- private List _keys = new ArrayList(10);
-
- public PropertyList(String name) {
- super(name);
- }
-
- public IProperty addProperty(String key, IProperty property) {
- _keys.remove(key);
- _keys.add(key);
- return super.addProperty(key, property);
- }
-
- public IProperty addProperty(String key, String value) {
- _keys.remove(key);
- _keys.add(key);
- return super.addProperty(key, value);
- }
-
- public IProperty addProperty(String key, String value, IPropertyType type) {
- _keys.remove(key);
- _keys.add(key);
- return super.addProperty(key, value, type);
- }
-
- public String[] getPropertyKeys() {
- return (String[]) _keys.toArray(new String[_keys.size()]);
- }
-
- public boolean removeProperty(String key) {
- _keys.remove(key);
- return super.removeProperty(key);
- }
-
- public void setProperties(Map map) {
- _keys.clear();
- _keys.addAll(map.keySet());
- super.setProperties(map);
- }
-
-}
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 cc28ad503..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySet.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - Added Javadoc.
- * David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Observable;
-import java.util.Observer;
-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.
- * @noextend This class is not intended to be subclassed by clients.
- * The standard extensions are included in the framework.
- */
-public class PropertySet extends RSEModelObject implements IPropertySet, IRSEModelObject, ILabeledObject, Observer {
-
- private String _name;
- private String _label = null;
- private String _description = null;
- private Map _properties;
- private IPropertySetContainer _container = null;
-
- 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();
- _description = propertySet.getDescription();
- _properties = new HashMap();
- if (propertySet instanceof ILabeledObject) {
- ILabeledObject p = (ILabeledObject) propertySet;
- _label = p.getLabel();
- }
-
- 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));
- }
- setDirty(true);
- }
-
- /**
- * Construct a new empty PropertySet.
- * @param name of the new PropertySet
- */
- public PropertySet(String name) {
- _name = name;
- _properties = new HashMap();
- setDirty(true);
- }
-
- public String getName() {
- return _name;
- }
-
- public String getLabel() {
- if (_label != null) return _label;
- return _name;
- }
-
- public void setLabel(String label) {
- _label = label;
- setDirty(true);
- }
-
- public String getDescription() {
- return _description;
- }
-
- public void setDescription(String description) {
- _description = description;
- setDirty(true);
- }
-
- public String[] getPropertyKeys() {
- Set set = _properties.keySet();
- return (String[]) set.toArray(new String[set.size()]);
- }
-
- public void setName(String name) {
- _name = name;
- setDirty(true);
- }
-
- public void setProperties(Map map) {
- _properties = new HashMap(map.size());
- for (Iterator z = map.keySet().iterator(); z.hasNext();) {
- String key = (String) z.next();
- Object value = map.get(key);
- if (value instanceof IProperty) {
- addProperty(key, (IProperty)value);
- } else if (value instanceof String) {
- addProperty(key, (String)value);
- }
- }
- }
-
- /**
- * 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);
- setDirty(true);
- 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);
- } else {
- property = addProperty(key, value, _defaultType);
- }
- return property;
- }
-
- 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) {
- Object value = _properties.remove(key);
- if (value == null) return false;
- setDirty(true);
- return true;
- }
-
- 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;
- }
-
- public boolean commit() {
- return getPersistableParent().commit();
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- IRSEPersistableContainer result = null;
- if (_container instanceof IRSEPersistableContainer) {
- result = (IRSEPersistableContainer) _container;
- }
- return result;
- }
-
- public void setContainer(IPropertySetContainer container) {
- _container = container;
- }
-
- public IPropertySetContainer getContainer() {
- return _container;
- }
-
- public void update(Observable o, Object arg) {
- setDirty(true);
- }
-
-}
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 99d8cfab4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertySetContainer.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-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;
-
-/**
- * A PropertySetContainer is capable of holding multiple named property sets.
- * @noextend This class is not intended to be subclassed by clients.
- * The standard extensions are included in the framework.
- */
-public abstract class PropertySetContainer extends RSEPersistableObject 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.setDescription(description);
- newSet.setContainer(this);
- _propertySets.put(name, newSet);
- return newSet;
- }
-
- public IPropertySet createPropertySet(String name) {
- IPropertySet newSet = new PropertySet(name);
- newSet.setContainer(this);
- _propertySets.put(name, newSet);
- return newSet;
- }
-
- public boolean addPropertySet(IPropertySet set) {
- IPropertySetContainer old = set.getContainer();
- if (old != null) {
- old.removePropertySet(set.getName());
- }
- set.setContainer(this);
- _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 d0dbaf508..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/PropertyType.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - added javadoc, minor changes
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * The standard implementation of {@link IPropertyType}. Use the static factory
- * methods to return instances.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-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;
- }
-
- /**
- * Returns an instance of boolean property type.
- * @return IPropertyType
- */
- public static IPropertyType getBooleanPropertyType() {
- return _booleanPropertyType;
- }
-
- /**
- * Returns an instance of integer property type.
- * @return IPropertyType
- */
- public static IPropertyType getIntegerPropertyType() {
- return _integerPropertyType;
- }
-
- /**
- * Returns an instance of string property type.
- * @return IPropertyType
- */
- public static IPropertyType getStringPropertyType() {
- return _stringPropertyType;
- }
-
- /**
- * Returns 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._enumValues = values;
- return type;
- }
-
- /**
- * Returns 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();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertyType#getType()
- */
- public int getType() {
- return _type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertyType#isString()
- */
- public boolean isString() {
- return _type == TYPE_STRING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertyType#isInteger()
- */
- public boolean isInteger() {
- return _type == TYPE_INTEGER;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertyType#isEnum()
- */
- public boolean isEnum() {
- return _type == TYPE_ENUM;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertyType#isBoolean()
- */
- public boolean isBoolean() {
- return _type == TYPE_BOOLEAN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertyType#getEnumValues()
- */
- public String[] getEnumValues() {
- return _enumValues;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- 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();
- }
-
-}
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 e18e998ae..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelObject.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.rse.internal.core.RSECoreMessages;
-
-/**
- * Provides common support for local RSE model objects.
- * Extenders inherit property set support.
- */
-public abstract class RSEModelObject extends PropertySetContainer implements IRSEModelObject {
-
- public String getDescription() {
- return RSECoreMessages.RESID_MODELOBJECTS_MODELOBJECT_DESCRIPTION;
- }
-
-} \ 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 8734c6284..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEModelOperation.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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:
- * David Dykstal (IBM) - initial API and implementation
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-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() {
- IRSEPersistenceManager persistenceManager = RSECorePlugin.getThePersistenceManager();
- persistenceManager.commitProfiles(5000);
- }
-
- /**
- * 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/RSEPersistableObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEPersistableObject.java
deleted file mode 100644
index fbe0004bc..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/RSEPersistableObject.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-package org.eclipse.rse.core.model;
-
-/**
- * An object that keeps track of its persistable state:
- * whether it is dirty or not and whether or not
- * any of its progeny are marked dirty.
- * @noextend This class is not intended to be subclassed by clients.
- * The standard extensions are included in the framework.
- */
-public abstract class RSEPersistableObject implements IRSEPersistableContainer {
-
- private boolean _isDirty = false;
- private boolean _wasRestored = false;
- private boolean _isTainted = false;
-
- public RSEPersistableObject() {
- super();
- }
-
- public final boolean isDirty() {
- return _isDirty;
- }
-
- public final void setDirty(boolean flag) {
- _isDirty = flag;
- setTainted(flag);
- }
-
- public final boolean wasRestored() {
- return _wasRestored;
- }
-
- public final void setWasRestored(boolean flag) {
- _wasRestored = flag;
- }
-
- public final boolean isTainted() {
- return _isTainted;
- }
-
- public final void setTainted(boolean flag) {
- boolean taintParent = flag && !_isTainted;
- _isTainted = flag;
- if (taintParent) {
- IRSEPersistableContainer parent = getPersistableParent();
- if (parent != null) {
- parent.setTainted(true);
- }
- }
- }
-
- /**
- * 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) {
- if (s1 == s2) return true;
- if (s1 == null) return false;
- return s1.equals(s2);
- }
-
-} \ No newline at end of file
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 83c6c92c5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemChildrenContentsType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * Represents contents that are children of a container.
- * This is a singleton class representing a contents type.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemEscapeCharHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemEscapeCharHelper.java
deleted file mode 100644
index 6228a0786..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemEscapeCharHelper.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- * David McKnight (IBM) - [276194] cannot open file with '...' in pathname
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.io.File;
-
-/**
- * This is a utility class used in the construction of file names.
- * @noextend This class is not intended to be subclassed by clients.
- */
-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())
- {
- char currentChar = fileName.charAt(i);
- for (int j = 0; j < changedChars.length; j++)
- {
- if (currentChar == 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;
- }
- else if (currentChar == '.'){ // special case for bug 276194
- if (fileName.length() > i + 1){
- char nextChar = fileName.charAt(i + 1);
- if (nextChar == '.' || nextChar == File.separatorChar){
- fileName = fileName.substring(0, i) + escapeString(currentChar) + fileName.substring(i+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.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 85b4a19e2..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemFilterStringContentsType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-/**
- * Represents contents that are children of a container.
- * This is a singleton class representing a contents type.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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;
- }
-
-}
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 4afa5f329..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemMessageObject.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-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.
- * @noextend This class is not intended to be subclassed by clients.
- */
-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());
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemRemoteResourceSet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemRemoteResourceSet.java
deleted file mode 100644
index 38d6e243c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemRemoteResourceSet.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-
-
-/**
- * An ISystemResourceSet containing remote resources.
- * @noextend This class is not intended to be subclassed by clients.
- */
-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.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 86b6e5d1f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.subsystems.ICredentials;
-
-/**
- * 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.
- */
-public final class SystemSignonInformation implements ICredentials {
-
- private IRSESystemType _systemType;
- private String _hostname;
- private String _userId;
- private String _password;
-
- /**
- * Default no-arg constructor
- */
- public SystemSignonInformation() {
- }
-
- /**
- * Constructor for SystemSignonInformation.
- */
- public SystemSignonInformation(String hostname, String userid, IRSESystemType systemType) {
- _hostname = hostname;//RSEUIPlugin.getQualifiedHostName(hostname).toUpperCase();
- _userId = userid;
- _systemType = systemType;
- }
-
- /**
- * Constructor for SystemSignonInformation.
- */
- public SystemSignonInformation(String hostname, String userid, String password, IRSESystemType 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 the systemType object.
- */
- public IRSESystemType getSystemType() {
- return _systemType;
- }
-
- /**
- * Returns the userid for the remote system
- * @return the user ID.
- */
- 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(IRSESystemType 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/SystemStartHere.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java
deleted file mode 100644
index 87833284a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemStartHere.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.core.model;
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-
-/**
- * A utility class, composed of static methods, that can be used to begin RSE processing.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class SystemStartHere
-{
- /**
- * STEP 1. Get system registry singleton
- * <p>
- * SAME AS: <code>RSECorePlugin.getSystemRegistry</code>
- */
- public static ISystemRegistry getSystemRegistry()
- {
- return RSECorePlugin.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().getHostsBySystemType(systemType)</code>
- * @param systemTypeId One of the system types IDs defined via system type extension point:
- * <ul>
- * <li>"org.eclipse.rse.systemtype.iseries" ({@link IRSESystemType#SYSTEMTYPE_ISERIES_ID})
- * <li>"org.eclipse.rse.systemtype.windows" ({@link IRSESystemType#SYSTEMTYPE_WINDOWS_ID})
- * <li>"org.eclipse.rse.systemtype.zseries" ({@link IRSESystemType#SYSTEMTYPE_ZSERIES_ID})
- * <li>"org.eclipse.rse.systemtype.unix" ({@link IRSESystemType#SYSTEMTYPE_UNIX_ID})
- * <li>"org.eclipse.rse.systemtype.linux" ({@link IRSESystemType#SYSTEMTYPE_LINUX_ID})
- * <li>"org.eclipse.rse.systemtype.aix" ({@link IRSESystemType#SYSTEMTYPE_AIX_ID})
- * <li>"org.eclipse.rse.systemtype.local" ({@link IRSESystemType#SYSTEMTYPE_LOCAL_ID})
- * <li>"org.eclipse.rse.systemtype.ftp" ({@link IRSESystemType#SYSTEMTYPE_FTP_ONLY_ID})
- * <li>"org.eclipse.rse.systemtype.ssh" ({@link IRSESystemType#SYSTEMTYPE_SSH_ONLY_ID})
- * <li>"org.eclipse.rse.systemtype.telnet" ({@link IRSESystemType#SYSTEMTYPE_TELNET_ONLY_ID})
- * </ul>
- * @see org.eclipse.rse.core.IRSESystemType
- * @see IRSECoreRegistry#getSystemTypeById(String)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySystemType(IRSESystemType)
- *
- */
- public static IHost[] getConnectionsBySystemType(String systemTypeId)
- {
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
- 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 ISystemRegistry#getSubSystemConfiguration(String)
- * @see ISubSystemConfiguration#getSubSystems(boolean)
- * @see ISubSystemConfiguration#getId()
- */
- public static ISubSystem[] getSubSystems(String subsystemConfigurationId)
- {
- ISystemRegistry sr = getSystemRegistry();
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
- if (config == null)
- return (new ISubSystem[0]);
- return config.getSubSystems(true);
- }
- /**
- * 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 ISystemRegistry#getSubSystemConfiguration(String)
- * @see ISubSystemConfiguration#getSubSystems(IHost, boolean)
- */
- public static ISubSystem[] getSubSystems(String subsystemConfigurationId, IHost connection)
- {
- ISystemRegistry sr = getSystemRegistry();
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
- if (config == null)
- return (new ISubSystem[0]);
- return config.getSubSystems(connection, true);
- }
- /**
- * 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 = getSubSystems(subsystemConfigurationId, connection);
- if ((subsystems == null) || (subsystems.length==0))
- return null;
- else
- return subsystems[0];
- }
-
-
-
- // ----------------------------
- // MISCELLANEOUS:
- // ----------------------------
- /**
- * Miscellaneous 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);
- }
-
- /**
- * Miscellaneous Helper - Return the singleton profile manager.
- * SAME AS: <code>getSystemRegistry().getSystemProfileManager()</code>
- */
- public static ISystemProfileManager getSystemProfileManager()
- {
- return RSECorePlugin.getTheSystemProfileManager();
- }
-
- /**
- * 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.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 dc4b0338e..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, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.core.model;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * An ISystemResourceSet containing workspace resources.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class SystemWorkspaceResourceSet extends AbstractSystemResourceSet {
-
- public SystemWorkspaceResourceSet() {
- super();
- }
-
- public SystemWorkspaceResourceSet(List resources) {
- super(resources);
- }
-
- public SystemWorkspaceResourceSet(IResource[] resources) {
- super(resources);
- }
-}
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 abde983ce..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferenceManager.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.references;
-
-
-/**
- * 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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-
- /**
- * @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();
-
-}
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 7be0394a9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencedObject.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-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, occasionally 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.
- *
- * @noimplement This interface is not intended to be implemented by clients. The
- * standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 8fc44d737..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBasePersistableReferencingObject.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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, occasionally 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.
- *
- * @noimplement This interface is not intended to be implemented by clients. The
- * standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-}
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 3a1a5f928..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencedObject.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - Cleanup Javadoc.
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-package org.eclipse.rse.core.references;
-
-/**
- * Interface that any master object that is referenced must implement.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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.
- * @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 96c09825e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEBaseReferencingObject.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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();
-
-}
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 34095c511..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEPersistableReferencedObject.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-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).
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-
-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 bf16bc08c..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, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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>
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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);
-
-}
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 25a990706..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/IRSEReferencedObject.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 81f4a1545..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, 2009 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:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-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.
- * @noimplement This interface is not intended to be implemented by clients.
- * The standard implementations are included in the framework.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRSEReferencingObject extends IRSEBaseReferencingObject {
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObject.java
deleted file mode 100644
index 221c5aa89..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObject.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-package org.eclipse.rse.core.references;
-
-import org.eclipse.rse.core.model.RSEModelObject;
-
-/**
- * A class to encapsulate the operations required of an object which supports
- * references to it by other objects ({@link 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.
- *
- * @noextend This class is not intended to be subclassed by clients. The
- * standard extensions are included in the framework.
- *
- * @since org.eclipse.rse.core 3.0
- */
-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();
- }
-
- /**
- * 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/core/references/SystemReferencedObjectHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObjectHelper.java
deleted file mode 100644
index 56dd67d8a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencedObjectHelper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- *******************************************************************************/
-
-package org.eclipse.rse.core.references;
-
-import java.util.Vector;
-
-/**
- * The class should be used by subclasses of {@link SystemReferencedObject} by
- * instantiating it and delegating to it.
- *
- * @noextend This class is not intended to be subclassed by clients. The
- * standard extensions are included in the framework.
- * @since org.eclipse.rse.core 3.0
- */
-public class SystemReferencedObjectHelper {
-
- private Vector referencingObjects = new Vector();
-
- /**
- * @see IRSEBaseReferencedObject#addReference(IRSEBaseReferencingObject)
- */
- public int addReference(IRSEBaseReferencingObject ref) {
- referencingObjects.addElement(ref);
- return referencingObjects.size();
- }
-
- /**
- * @see IRSEBaseReferencedObject#removeReference(IRSEBaseReferencingObject)
- */
- public int removeReference(IRSEBaseReferencingObject ref) {
- referencingObjects.removeElement(ref);
- 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);
- }
- }
-
- /**
- * @see IRSEBaseReferencedObject#getReferencingObjects()
- */
- public IRSEBaseReferencingObject[] getReferencingObjects() {
- IRSEBaseReferencingObject[] references = new IRSEBaseReferencingObject[referencingObjects.size()];
- referencingObjects.toArray(references);
- return references;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObject.java
deleted file mode 100644
index 151bf811b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObject.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-package org.eclipse.rse.core.references;
-
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-
-/**
- * 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 UI 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.
- *
- * @noextend This class is not intended to be subclassed by clients. The
- * standard extensions are included in the framework.
- * @since org.eclipse.rse.core 3.0
- */
-public abstract class SystemReferencingObject extends RSEModelObject implements IRSEReferencingObject {
- private SystemReferencingObjectHelper helper = null;
- protected boolean referenceBroken = false;
-
- /**
- * Default constructor.
- */
- protected SystemReferencingObject() {
- super();
- helper = new SystemReferencingObjectHelper(this);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#setReferencedObject(org.eclipse.rse.core.references.IRSEBaseReferencedObject)
- */
- public void setReferencedObject(IRSEBaseReferencedObject obj) {
- helper.setReferencedObject(obj);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencingObject#getReferencedObject()
- */
- public IRSEBaseReferencedObject getReferencedObject() {
- return helper.getReferencedObject();
- }
-
- /*
- * (non-Javadoc)
- * @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 RSECoreMessages.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/core/references/SystemReferencingObjectHelper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObjectHelper.java
deleted file mode 100644
index c93afd870..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/references/SystemReferencingObjectHelper.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- *******************************************************************************/
-
-package org.eclipse.rse.core.references;
-
-
-/**
- * The class should be used by subclasses of {@link SystemReferencingObject} by
- * instantiating it and delegating to it.
- *
- * @noextend This class is not intended to be subclassed by clients. The
- * standard extensions are included in the framework.
- * @noinstantiate This class is not intended to be instantiated by clients. The
- * standard instances are created by the framework.
- * @since org.eclipse.rse.core 3.0
- */
-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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
deleted file mode 100644
index 1977df032..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType()
- * David Dykstal (IBM) - [189483] fix spelling in initialize/uninitialize method signatures
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David McKnight (IBM) - [249222] [api] Access to communication listeners in AbstractConnectorService
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * This is a base class to make it easier to create connector services.
- * <p>
- * An {@link org.eclipse.rse.core.subsystems.IConnectorService} object
- * is returned from a subsystem object via getConnectorService(), and
- * it is used to maintain the connection to a particular set of subsystems.
- * <p>
- * This class implements the protocol for much of the
- * standard bookkeeping for connector services including
- * server launchers (if none are required), event handling,
- * hosts, ports, addresses, descriptions, and registered subsystems.
- * Subclasses must concern themselves with actually authenticating and connecting.
- */
-public abstract class AbstractConnectorService extends RSEModelObject implements IConnectorService {
-
- private Vector commListeners = new Vector(5);
- private ISubSystem _primarySubSystem = null;
- private List _registeredSubSystems = new ArrayList();
- private IHost _host;
- private String _description;
- private String _name;
- private int _port;
- private boolean _usingSSL;
-
- /**
- * Construct a new connector service. This should be called during the construction
- * of any subclasses.
- * @param name The name of the connector service.
- * @param description A description of the connector service.
- * @param host The host associated with this connector service. A host may have multiple
- * connector services.
- * @param port The port associated with this connector service if this connector service
- * is IP based. If not IP based this can be used for some other purpose.
- */
- public AbstractConnectorService(String name, String description, IHost host, int port) {
- _name = name;
- _description = description;
- _host = host;
- _port = port;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isServerLaunchTypeEnabled(org.eclipse.rse.core.subsystems.ISubSystem, org.eclipse.rse.core.subsystems.ServerLaunchType)
- */
- public final boolean isServerLaunchTypeEnabled(ISubSystem subsystem, ServerLaunchType serverLaunchType) {
- IServerLauncher sl = getRemoteServerLauncher();
- if (sl instanceof RemoteServerLauncher) {
- RemoteServerLauncher isl = (RemoteServerLauncher) sl;
- return isl.isEnabledServerLaunchType(serverLaunchType);
- } else
- return subsystem.getSubSystemConfiguration().supportsServerLaunchType(serverLaunchType);
- }
-
- /**
- * @return null, may be overriden
- * @see IConnectorService#getRemoteServerLauncher()
- */
- public IServerLauncher getRemoteServerLauncher() {
- return null;
- }
-
- /**
- * @return false, may be overridden
- * @see IConnectorService#supportsRemoteServerLaunching()
- */
- public boolean supportsRemoteServerLaunching() {
- return false;
- }
-
- /**
- * @return false, may be overridden
- * @see IConnectorService#supportsServerLaunchProperties()
- */
- public boolean supportsServerLaunchProperties() {
- return false;
- }
-
- /**
- * @return null, may be overridden
- * @see IConnectorService#getRemoteServerLauncherProperties()
- */
- public IServerLauncherProperties getRemoteServerLauncherProperties() {
- return null;
- }
-
- /**
- * Do nothing, may be overridden
- * @param newRemoteServerLauncher the server launcher properties
- * @see IConnectorService#setRemoteServerLauncherProperties(IServerLauncherProperties)
- */
- public void setRemoteServerLauncherProperties(IServerLauncherProperties newRemoteServerLauncher) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
- */
- public final boolean hasRemoteServerLauncherProperties() {
- return getRemoteServerLauncherProperties() != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#addCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener)
- */
- public final void addCommunicationsListener(ICommunicationsListener listener) {
- if (!commListeners.contains(listener)) {
- commListeners.add(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removeCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener)
- */
- public final void removeCommunicationsListener(ICommunicationsListener listener) {
- commListeners.remove(listener);
- }
-
- /**
- * Fires the communication event mentioned in the eventType.
- * @param eventType the communications event to fire.
- */
- final 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);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getHost()
- */
- public final IHost getHost() {
- return _host;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setHost(org.eclipse.rse.core.model.IHost)
- */
- public final void setHost(IHost host) {
- _host = host;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.RSEModelObject#getDescription()
- */
- public final String getDescription() {
- return _description;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public final String getName() {
- return _name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setPort(int)
- */
- public final void setPort(int port) {
- if (port != _port)
- {
- _port = port;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getPort()
- */
- public final int getPort() {
- return _port;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getPrimarySubSystem()
- */
- public final ISubSystem getPrimarySubSystem() {
- if (_primarySubSystem == null)
- {
- if (_registeredSubSystems.size() == 0)
- {
-
- }
- else
- {
- ISubSystem ss = (ISubSystem)_registeredSubSystems.get(0);
- _primarySubSystem = ss.getPrimarySubSystem();
- }
- }
- return _primarySubSystem;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#registerSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public final void registerSubSystem(ISubSystem ss) {
- if (!_registeredSubSystems.contains(ss))
- {
- _registeredSubSystems.add(ss);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#deregisterSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public final void deregisterSubSystem(ISubSystem ss) {
- _registeredSubSystems.remove(ss);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public final boolean commit() {
- return getHost().commit();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
- */
- public final IRSEPersistableContainer getPersistableParent() {
- return _host;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = new ArrayList(20);
- IServerLauncherProperties launcherProperties = getRemoteServerLauncherProperties();
- if (launcherProperties != null) {
- children.add(getRemoteServerLauncherProperties());
- }
- children.addAll(_registeredSubSystems);
- children.addAll(Arrays.asList(getPropertySets()));
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getHostName()
- */
- public final String getHostName() {
- return getHost().getHostName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getVersionReleaseModification()
- */
- public String getVersionReleaseModification() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getSubSystems()
- */
- public final ISubSystem[] getSubSystems() {
- return (ISubSystem[])_registeredSubSystems.toArray(new ISubSystem[_registeredSubSystems.size()]);
- }
-
- /**
- * Initialize any subsystems just after connecting to the host.
- * @param monitor a progress monitor to report progress of initialization.
- */
- protected final void initializeSubSystems(IProgressMonitor monitor) throws SystemMessageException {
- for (int i = 0; i < _registeredSubSystems.size(); i++)
- {
- ISubSystem ss = (ISubSystem)_registeredSubSystems.get(i);
- ss.initializeSubSystem(monitor);
- }
- }
-
- /**
- * Uninitialize any subsystem just after disconnecting from the host.
- * @param monitor a progress monitor used to track uninitialization progress.
- */
- protected final void uninitializeSubSystems(IProgressMonitor monitor) {
- for (int i = 0; i < _registeredSubSystems.size(); i++)
- {
- ISubSystem ss = (ISubSystem)_registeredSubSystems.get(i);
- ss.uninitializeSubSystem(monitor);
- }
- }
-
- /**
- * Send the event to notify listeners of a disconnection.
- * Used by the framework and should
- * usually not be invoked by concrete subclasses.
- */
- protected final void notifyDisconnection() {
- // Fire comm event to signal state changed
- if (!isConnected()) fireCommunicationsEvent(CommunicationsEvent.AFTER_DISCONNECT);
- }
-
- /**
- * Send the event to notify listeners of a connection.
- * Used by the framework and should
- * usually not be invoked by concrete subclasses.
- */
- protected final void notifyConnection() {
- if (isConnected()) fireCommunicationsEvent(CommunicationsEvent.AFTER_CONNECT);
- }
-
- /**
- * Send the event to notify listeners of a connection establishment error.
- * Used by the framework and should
- * usually not be invoked by concrete subclasses.
- */
- protected final void notifyError() {
- fireCommunicationsEvent(CommunicationsEvent.CONNECTION_ERROR);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isUsingSSL()
- */
- public final boolean isUsingSSL() {
- return _usingSSL;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setIsUsingSSL(boolean)
- */
- public final void setIsUsingSSL(boolean flag) {
- if (_usingSSL != flag)
- {
- _usingSSL = flag;
- setDirty(true);
- }
- }
-
- /**
- * Returns the temp directory of the remote system for the current user,
- * if available. This implementation returns the empty string.
- * @return an empty string
- * @see IConnectorService#getTempDirectory()
- */
- public String getTempDirectory() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Returns the home directory of the remote system for the current user,
- * if available. This implementation returns the empty string.
- * @return an empty string
- * @see IConnectorService#getHomeDirectory()
- */
- public String getHomeDirectory() {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Reset the connector service state if a connector service is redefined
- * or disconnected.
- * Each subsystem needs to be informed so it can clear out any expansions.
- * This implementation does nothing.
- * Implementations should override and call {@link #reset()}
- * if there is internal state to reset.
- * @see IConnectorService#reset()
- */
- public void reset() {
- }
-
- /**
- * This implementation returns the connector service's port property.
- * Override if appropriate.
- * <br> This is called by the default implementation of
- * {@link #connect(IProgressMonitor)},
- * if #supportsServerLaunchProperties() is true.
- * @return the port used for connecting to the target
- */
- protected int getConnectPort() {
- return getPort();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(org.eclipse.core.runtime.IProgressMonitor)
- */
- public final void connect(IProgressMonitor monitor) throws Exception {
- preConnect();
- internalConnect(monitor);
- initializeSubSystems(monitor);
- postConnect();
- }
-
- /**
- * Disconnects from the target system.
- * Calls {@link #internalDisconnect(IProgressMonitor)}
- * and {@link #postDisconnect()}
- * @throws Exception if the disconnect fails
- */
- public final void disconnect(IProgressMonitor monitor) throws Exception {
- preDisconnect();
- internalDisconnect(monitor);
- uninitializeSubSystems(monitor);
- postDisconnect();
- }
-
- /**
- * Performs the actual connection to the target system.
- * @param monitor for cancellation and progress reporting
- * @throws Exception if connection does not succeed
- */
- protected abstract void internalConnect(IProgressMonitor monitor) throws Exception;
-
- /**
- * Performs the actual disconnection from the target system.
- * @param monitor for cancellation and progress reporting
- * @throws Exception if disconnection does not succeed
- */
- protected abstract void internalDisconnect(IProgressMonitor monitor) throws Exception;
-
- /**
- * Performs any cleanup required after disconnecting.
- * This implementation does nothing.
- * May be overridden.
- * If overridden, invoke via super.
- */
- protected void postDisconnect() {
- }
-
- /**
- * Performs any tasks required immediately prior to disconnecting.
- * This implementation does nothing.
- * May be overridden.
- * If overridden, invoke via super.
- */
- protected void preDisconnect() {
- }
-
- /**
- * Performs any tasks required immediately prior to connecting.
- * This implementation does nothing.
- * May be overridden.
- * If overridden, invoke via super.
- */
- protected void preConnect() {
- }
-
- /**
- * Performs any tasks required immediately after connecting.
- * This implementation does nothing.
- * May be overridden.
- * If overridden, invoke via super.
- */
- protected void postConnect() {
- }
-
- /**
- * {@inheritDoc}
- * @see IConnectorService#setDenyPasswordSave(boolean)
- * @since org.eclipse.rse.core 3.0
- */
- public final int setDenyPasswordSave(boolean deny) {
- IHost host = getHost();
- String hostAddress = host.getHostName();
- IRSESystemType systemType = host.getSystemType();
- int result = RSEPreferencesManager.setDenyPasswordSave(systemType, hostAddress, deny);
- return result;
- }
-
- /**
- * {@inheritDoc}
- * @see IConnectorService#getDenyPasswordSave()
- * @since org.eclipse.rse.core 3.0
- */
- public final boolean getDenyPasswordSave() {
- IHost host = getHost();
- String hostAddress = host.getHostName();
- IRSESystemType systemType = host.getSystemType();
- boolean result = RSEPreferencesManager.getDenyPasswordSave(systemType, hostAddress);
- return result;
- }
-
- /**
- * Check if there are any active communication listeners listening to
- * this connector service.
- *
- * @return true if there are any active communication listeners
- *
- * @since 3.1
- */
- public boolean hasActiveCommunicationListeners() {
- if (commListeners.size() > 0){
- for (int i = 0; i < commListeners.size(); i++){
- ICommunicationsListener listener = (ICommunicationsListener)commListeners.get(i);
- if (!listener.isPassiveCommunicationsListener()){
- return true;
- }
- }
- }
- return false;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java
deleted file mode 100644
index 9319ad499..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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) - [177523] Unify singleton getter methods
- * David McKnight (IBM) - [198802] Incorrect logic for getting dummy host
- * David McKnight (IBM) - [243382] [dstore] Server launcher settings are shared by multiple connections
- *******************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.Hashtable;
-import java.util.Set;
-
-import org.eclipse.rse.core.model.DummyHost;
-import org.eclipse.rse.core.model.IHost;
-
-
-/**
- * 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
- * connection. This is the base connector service 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 singleton factory method like the following:</p>
- * <pre><code>
- * public static MyConnectorServiceManager <b>getInstance</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 singleton factory method getInstance() 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;
- // A previous host of the same hostName should not be used since it causes bug 243382.
- // A remaining problem here is that we shouldn't keep a host around in
- // systemConnectionRegistry after it's corresponding connection has been created
- // but at the moment there's no API to do that outside of this class
- if (host.equals(newHost))
- {
- 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);
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractCredentialsProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractCredentialsProvider.java
deleted file mode 100644
index e6659f17b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractCredentialsProvider.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - 168977: refactoring IConnectorService
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-/**
- * The {@link AbstractCredentialsProvider} provides the base
- * implementation of the {@link ICredentialsProvider}
- * interface. It remembers the connector service and suppression
- * state for the provider.
- * <p>
- * This class is meant to be subclassed.
- */
-public abstract class AbstractCredentialsProvider implements ICredentialsProvider {
-
- private IConnectorService connectorService = null;
- private boolean suppressed = false;
-
- /**
- * Create a credentials provider for a particular connector service.
- * Subclasses should implement their own constuctors but invoke this constructor
- * in them.
- * @param connectorService the associatated connector service.
- */
- public AbstractCredentialsProvider(IConnectorService connectorService) {
- this.connectorService = connectorService;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#getConnectorService()
- */
- public final IConnectorService getConnectorService() {
- return connectorService;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#isSuppressed()
- */
- public final boolean isSuppressed() {
- return suppressed;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#setSuppressed(boolean)
- */
- public final void setSuppressed(boolean suppressed) {
- this.suppressed = suppressed;
- }
-
- /**
- * @return true if the associated connector service supports user ids.
- */
- protected final boolean supportsUserId() {
- return connectorService.supportsUserId();
- }
-
- /**
- * @return true if the associated connector service requires a user id.
- */
- protected final boolean requiresUserId() {
- return connectorService.requiresUserId();
- }
-
- /**
- * @return true if the associated connector service supports a password.
- */
- protected final boolean supportsPassword() {
- return connectorService.supportsPassword();
- }
-
- /**
- * @return true if the associated connector service requires a password.
- */
- protected final boolean requiresPassword() {
- return connectorService.requiresPassword();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java
deleted file mode 100644
index 576b824cd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractDelegatingConnectorService.java
+++ /dev/null
@@ -1,814 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType()
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-
-public abstract class AbstractDelegatingConnectorService implements IDelegatingConnectorService
-{
-
- protected IHost _host;
-
- /**
- * Creates a new delegating connector service for a particular host.
- * Should be invoked from the constructor for any concrete subclasses.
- * @param host The host associated with this connector service.
- */
- public AbstractDelegatingConnectorService(IHost host)
- {
- _host = host;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IDelegatingConnectorService#getRealConnectorService()
- */
- public abstract IConnectorService getRealConnectorService();
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#addCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener)
- */
- public void addCommunicationsListener(ICommunicationsListener listener)
- {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.addCommunicationsListener(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#addPropertySet(org.eclipse.rse.core.model.IPropertySet)
- */
- public boolean addPropertySet(IPropertySet set) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.addPropertySet(set);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#addPropertySets(org.eclipse.rse.core.model.IPropertySet[])
- */
- public boolean addPropertySets(IPropertySet[] sets) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.addPropertySets(sets);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#clearPassword(boolean, boolean)
- */
- public void clearPassword(boolean clearDiskCache, boolean propagate) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.clearPassword(clearDiskCache, propagate);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#clearCredentials()
- */
- public void clearCredentials() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.clearCredentials();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.commit();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void connect(IProgressMonitor monitor) throws Exception {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.connect(monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#createPropertySet(java.lang.String)
- */
- public IPropertySet createPropertySet(String name) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.createPropertySet(name);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#createPropertySet(java.lang.String, java.lang.String)
- */
- public IPropertySet createPropertySet(String name, String description) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.createPropertySet(name, description);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#deregisterSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public void deregisterSubSystem(ISubSystem ss) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.deregisterSubSystem(ss);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#disconnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void disconnect(IProgressMonitor monitor) throws Exception {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.disconnect(monitor);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getDescription()
- */
- public String getDescription() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getDescription();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getHomeDirectory()
- */
- public String getHomeDirectory()
- {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getHomeDirectory();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getHost()
- */
- public IHost getHost()
- {
- return _host;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getHostName()
- */
- public String getHostName() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getHostName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public String getName() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getPort()
- */
- public int getPort() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getPort();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getPrimarySubSystem()
- */
- public ISubSystem getPrimarySubSystem() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getPrimarySubSystem();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#getPropertySet(java.lang.String)
- */
- public IPropertySet getPropertySet(String name) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getPropertySet(name);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#getPropertySets()
- */
- public IPropertySet[] getPropertySets() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getPropertySets();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getRemoteServerLauncher()
- */
- public IServerLauncher getRemoteServerLauncher() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getRemoteServerLauncher();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getRemoteServerLauncherProperties()
- */
- public IServerLauncherProperties getRemoteServerLauncherProperties() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getRemoteServerLauncherProperties();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getSubSystems()
- */
- public ISubSystem[] getSubSystems() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getSubSystems();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getTempDirectory()
- */
- public String getTempDirectory() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getTempDirectory();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getUserId()
- */
- public String getUserId() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getUserId();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getVersionReleaseModification()
- */
- public String getVersionReleaseModification() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getVersionReleaseModification();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasPassword(boolean)
- */
- public boolean hasPassword(boolean onDisk) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.hasPassword(onDisk);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
- */
- public boolean hasRemoteServerLauncherProperties() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.hasRemoteServerLauncherProperties();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#inheritsCredentials()
- */
- public boolean inheritsCredentials() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.inheritsCredentials();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
- */
- public boolean isConnected() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.isConnected();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#isDirty()
- */
- public boolean isDirty() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.isDirty();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isServerLaunchTypeEnabled(org.eclipse.rse.core.subsystems.ISubSystem, org.eclipse.rse.core.subsystems.ServerLaunchType)
- */
- public boolean isServerLaunchTypeEnabled(ISubSystem subsystem,
- ServerLaunchType serverLaunchType) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.isServerLaunchTypeEnabled(subsystem, serverLaunchType);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isSuppressed()
- */
- public boolean isSuppressed() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.isSuppressed();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isUsingSSL()
- */
- public boolean isUsingSSL() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.isUsingSSL();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#acquireCredentials(boolean)
- */
- public void acquireCredentials(boolean forcePrompt)
- throws OperationCanceledException {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.acquireCredentials(forcePrompt);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#registerSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public void registerSubSystem(ISubSystem ss) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.registerSubSystem(ss);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removeCommunicationsListener(org.eclipse.rse.core.subsystems.ICommunicationsListener)
- */
- public void removeCommunicationsListener(ICommunicationsListener listener) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.removeCommunicationsListener(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IPropertySetContainer#removePropertySet(java.lang.String)
- */
- public boolean removePropertySet(String name) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.removePropertySet(name);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#reset()
- */
- public void reset() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.reset();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#setDirty(boolean)
- */
- public void setDirty(boolean flag) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setDirty(flag);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setHost(org.eclipse.rse.core.model.IHost)
- */
- public void setHost(IHost host) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setHost(host);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setIsUsingSSL(boolean)
- */
- public void setIsUsingSSL(boolean flag) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setIsUsingSSL(flag);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setPassword(java.lang.String, java.lang.String, boolean, boolean)
- */
- public void setPassword(String matchingUserId, String password,
- boolean persist, boolean propagate) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setPassword(matchingUserId, password, persist, propagate);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setPort(int)
- */
- public void setPort(int port) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setPort(port);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setRemoteServerLauncherProperties(org.eclipse.rse.core.subsystems.IServerLauncherProperties)
- */
- public void setRemoteServerLauncherProperties(
- IServerLauncherProperties value) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setRemoteServerLauncherProperties(value);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setSuppressed(boolean)
- */
- public void setSuppressed(boolean suppressSignonPrompt) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setSuppressed(suppressSignonPrompt);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setUserId(java.lang.String)
- */
- public void setUserId(String userId) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setUserId(userId);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#setWasRestored(boolean)
- */
- public void setWasRestored(boolean flag) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setWasRestored(flag);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#sharesCredentials()
- */
- public boolean sharesCredentials() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.sharesCredentials();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.supportsPassword();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
- */
- public boolean supportsRemoteServerLaunching() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.supportsRemoteServerLaunching();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
- */
- public boolean supportsServerLaunchProperties() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.supportsServerLaunchProperties();
- }
- return false;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.supportsUserId();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#saveUserId()
- */
- public void saveUserId() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.saveUserId();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removeUserId()
- */
- public void removeUserId() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.removeUserId();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#savePassword()
- */
- public void savePassword() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.savePassword();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removePassword()
- */
- public void removePassword() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.removePassword();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#wasRestored()
- */
- public boolean wasRestored() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.wasRestored();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresPassword()
- */
- public boolean requiresPassword() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.requiresPassword();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresUserId()
- */
- public boolean requiresUserId() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.requiresUserId();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#isTainted()
- */
- public boolean isTainted() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.isTainted();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#setTainted(boolean)
- */
- public void setTainted(boolean flag) {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- conServ.setTainted(flag);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
- */
- public IRSEPersistableContainer getPersistableParent() {
- return getHost();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
- */
- public IRSEPersistableContainer[] getPersistableChildren() {
- IConnectorService conServ = getRealConnectorService();
- if (conServ != null)
- {
- return conServ.getPersistableChildren();
- }
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- /**
- * {@inheritDoc}
- * @since org.eclipse.rse.core 3.0
- */
- public int setDenyPasswordSave(boolean deny) {
- int n = 0;
- IConnectorService connectorService = getRealConnectorService();
- if (connectorService != null) {
- n = connectorService.setDenyPasswordSave(deny);
- }
- return n;
- }
-
- /**
- * {@inheritDoc}
- * @since org.eclipse.rse.core 3.0
- */
- public boolean getDenyPasswordSave() {
- boolean result = false;
- IConnectorService connectorService = getRealConnectorService();
- if (connectorService != null) {
- result = connectorService.getDenyPasswordSave();
- }
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractResource.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractResource.java
deleted file mode 100644
index 4e7045001..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractResource.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java
deleted file mode 100644
index 7854de65a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation from AbstractConnectorService.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-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.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-
-/**
- * An authenticating connector service understands the concept of credentials
- * (see {@link ICredentials})
- * and possibly the concepts of user id and password. It contains a
- * credentials provider ({@link ICredentialsProvider}) and provides a
- * framework under which authentication can take place during connections.
- */
-public abstract class AuthenticatingConnectorService extends AbstractConnectorService {
-
- protected ICredentialsProvider credentialsProvider = null;
-
- /**
- * Constructs an authenticating connector service.
- * @param name The name of the connector service
- * @param description The description of the connector service
- * @param host The host associated with this connector service
- * @param port The port this connector service will use when connecting if it uses IP.
- */
- public AuthenticatingConnectorService(String name, String description, IHost host, int port) {
- super(name, description, host, port);
- }
-
- /**
- * Obtains the user id, if it understand the concept of user id, from
- * its credentials provider.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getUserId()
- * @return the user id or null if not available or not supported.
- */
- public final String getUserId() {
- return credentialsProvider.getUserId();
- }
-
- /**
- * Sets the default user id for use by the credentials provider.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setUserId(java.lang.String)
- * @param newId the id to be used by the credentials provider.
- */
- public final void setUserId(String newId) {
- String oldUserId = credentialsProvider.getUserId();
- if (oldUserId == null || !oldUserId.equals(newId)) {
- credentialsProvider.setUserId(newId);
- saveUserId();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#saveUserId()
- */
- public final void saveUserId() {
- String userId = credentialsProvider.getUserId();
- updateDefaultUserId(getPrimarySubSystem(), userId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removeUserId()
- */
- public final void removeUserId() {
- updateDefaultUserId(getPrimarySubSystem(), null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#clearPassword(boolean, boolean)
- */
- public final void clearPassword(boolean persist, boolean propagate) {
- credentialsProvider.clearPassword();
- if (persist) {
- removePassword();
- }
- if (sharesCredentials() && propagate) {
- String userId = credentialsProvider.getUserId();
- clearPasswordForOtherSystemsInConnection(userId, false);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasPassword(boolean)
- */
- public final boolean hasPassword(boolean onDisk) {
- ICredentials credentials = credentialsProvider.getCredentials();
- boolean cached = (credentials != null && credentials.getPassword() != null);
- if (!cached && onDisk) {
- IRSESystemType systemType = getHost().getSystemType();
- String hostName = getHostName();
- String userId = getUserId();
- if (userId != null) {
- return PasswordPersistenceManager.getInstance().passwordExists(systemType, hostName, getUserId());
- }
- }
- return cached;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setPassword(java.lang.String, java.lang.String, boolean, boolean)
- */
- public final void setPassword(String userId, String password, boolean persist, boolean propagate) {
- if (getPrimarySubSystem().forceUserIdToUpperCase()) {
- userId = userId.toUpperCase();
- }
- String myUserId = credentialsProvider.getUserId();
- IHost host = getHost();
- if (host.compareUserIds(userId, myUserId)) {
- credentialsProvider.setPassword(password);
- }
- if (sharesCredentials() && propagate) {
- updatePasswordForOtherSystemsInConnection(userId, password, persist);
- }
- if (persist) {
- savePassword();
- } else {
- removePassword();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#savePassword()
- */
- public final void savePassword() {
- ICredentials credentials = credentialsProvider.getCredentials();
- if (credentials instanceof SystemSignonInformation) {
- SystemSignonInformation signonInformation = (SystemSignonInformation) credentials;
- PasswordPersistenceManager.getInstance().add(signonInformation, true, false);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removePassword()
- */
- public final void removePassword() {
- IRSESystemType systemType = getHost().getSystemType();
- String hostName = getHostName();
- String userId = credentialsProvider.getUserId();
- PasswordPersistenceManager.getInstance().remove(systemType, hostName, userId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#postDisconnect()
- */
- protected final void postDisconnect() {
- clearPassword(false, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isSuppressed()
- */
- public final boolean isSuppressed() {
- return credentialsProvider.isSuppressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setSuppressed(boolean)
- */
- public final void setSuppressed(boolean suppressed) {
- credentialsProvider.setSuppressed(suppressed);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#acquireCredentials(boolean)
- */
- public final void acquireCredentials(boolean reacquire) throws OperationCanceledException {
- credentialsProvider.acquireCredentials(reacquire);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IConnectorService#clearCredentials()
- */
- public final void clearCredentials() {
- credentialsProvider.clearCredentials();
- setDirty(true);
- }
-
- private void updatePasswordForOtherSystemsInConnection(String uid, String password, boolean persist) {
- IHost connection = getPrimarySubSystem().getHost();
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISubSystem[] subsystems = registry.getSubSystems(connection);
- List uniqueSystems = new ArrayList();
- for (int i = 0; i < subsystems.length; i++) {
- IConnectorService cs = subsystems[i].getConnectorService();
- if (cs != this && cs.inheritsCredentials()) {
- if (!uniqueSystems.contains(cs)) {
- uniqueSystems.add(cs);
- }
- }
- }
- for (int s = 0; s < uniqueSystems.size(); s++) {
- IConnectorService system = (IConnectorService) uniqueSystems.get(s);
- if (!system.isConnected() && !system.hasPassword(false)) {
- if (system.getPrimarySubSystem().forceUserIdToUpperCase()) {
- uid = uid.toUpperCase();
- password = password.toUpperCase();
- }
- system.setPassword(uid, password, false, false);
- }
- }
- }
-
- private void clearPasswordForOtherSystemsInConnection(String uid, boolean persist) {
- if (uid != null) {
- IHost connection = getHost();
- ISystemRegistry registry = RSECorePlugin.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.inheritsCredentials()) {
- if (!uniqueSystems.contains(system)) {
- uniqueSystems.add(system);
- }
- }
- }
- for (int s = 0; s < uniqueSystems.size(); s++) {
- IConnectorService system = (IConnectorService) uniqueSystems.get(s);
- if (system.hasPassword(persist)) {
- system.clearPassword(persist, false);
- }
- }
- }
- }
-
- /**
- * 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) {
- ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
- ssc.updateSubSystem(subsystem, true, userId, false, 0);
- } else {
- int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
- IHost host = subsystem.getHost();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.updateHost(host, host.getSystemType(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate);
- }
- }
-
- /**
- * Returns true if this connector service can share it's credentials
- * with other connector services in this host.
- * This implementation will always return true.
- * Override if necessary.
- * @return true
- * @see IConnectorService#sharesCredentials()
- */
- public boolean sharesCredentials() {
- return true;
- }
-
- /**
- * Returns true if this connector service can inherit the credentials of
- * other connector services in this host.
- * This implementation always returns true.
- * Override if necessary.
- * @return true
- * @see IConnectorService#inheritsCredentials()
- */
- public boolean inheritsCredentials() {
- return true;
- }
-
- /**
- * Sets the credentials provider used by this connector service.
- * This should be invoked once immediately during the construction of the
- * connector service.
- * @param credentialsProvider the credentials provider to be used
- * by this connector service.
- */
- protected final void setCredentialsProvider(ICredentialsProvider credentialsProvider) {
- this.credentialsProvider = credentialsProvider;
- }
-
- /**
- * @return the credentials provider that is being used by this connector service.
- */
- protected final ICredentialsProvider getCredentialsProvider() {
- return credentialsProvider;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/BasicConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/BasicConnectorService.java
deleted file mode 100644
index cedabc7e9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/BasicConnectorService.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * A basic connector service is one that does not require any type of
- * authentication to connect to its target system.
- * Since this is the case, many of the methods of
- * {@link IConnectorService} are implemented only in skeletal form.
- */
-public abstract class BasicConnectorService extends AbstractConnectorService {
-
- /**
- * Constructs a basic connector service.
- * @param name The name of the connector service
- * @param description The description of the connector service
- * @param host the host associated with this connector service
- * @param port the port used by this connector service, if IP based
- */
- public BasicConnectorService(String name, String description, IHost host, int port) {
- super(name, description, host, port);
- }
-
- /**
- * Indicates if this connector service understands passwords.
- * This implementation always returns false.
- * Override if necessary.
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsPassword()
- */
- public boolean supportsPassword() {
- return false;
- }
-
- /**
- * Indicates if this connector service requires passwords.
- * This implementation always returns false.
- * Override if necessary.
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresPassword()
- */
- public boolean requiresPassword() {
- return false;
- }
-
- /**
- * Indicates if this connector service understands user ids.
- * This implementation always returns false.
- * Override if necessary.
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsUserId()
- */
- public boolean supportsUserId() {
- return false;
- }
-
- /**
- * Indicates if this connector service requires a user id.
- * This implementation always returns false.
- * Override if necessary.
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresUserId()
- */
- public boolean requiresUserId() {
- return false;
- }
-
- /**
- * Acquires credentials. This implementation does nothing.
- *
- * @see org.eclipse.rse.core.subsystems.IConnectorService#acquireCredentials(boolean)
- */
- public void acquireCredentials(boolean refresh) throws OperationCanceledException {
- }
-
- /**
- * Clears credentials.
- * This implementation does nothing.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#clearCredentials()
- */
- public void clearCredentials() {
- }
-
- /**
- * Clears a password.
- * This implementation does nothing.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#clearPassword(boolean, boolean)
- */
- public void clearPassword(boolean persist, boolean propagate) {
- }
-
- /**
- * Gets the user id.
- * This implementation returns null.
- * @return null
- * @see org.eclipse.rse.core.subsystems.IConnectorService#getUserId()
- */
- public String getUserId() {
- return null;
- }
-
- /**
- * Indicates the presence of a password.
- * This implementation returns false.
- * @param onDisk true if checking for a persistent form of a password
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#hasPassword(boolean)
- */
- public boolean hasPassword(boolean onDisk) {
- return false;
- }
-
- /**
- * Indicates if this connector service can inherit its credentials from others.
- * This implementation returns false.
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#inheritsCredentials()
- */
- public boolean inheritsCredentials() {
- return false;
- }
-
- /**
- * Indicates if this connector service is currently being suppressed.
- * This implementation returns false.
- * @return false
- * @see org.eclipse.rse.core.subsystems.IConnectorService#isSuppressed()
- */
- public boolean isSuppressed() {
- return false;
- }
-
- /**
- * Removes the persistent form of a password.
- * This implementation does nothing.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removePassword()
- */
- public void removePassword() {
- }
-
- /**
- * Removes the persistent form of the default user id.
- * This implementation does nothing.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#removeUserId()
- */
- public void removeUserId() {
- }
-
- /**
- * Saves the remembered password persistently.
- * This implementation does nothing.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#savePassword()
- */
- public void savePassword() {
- }
-
- /**
- * Saves the remembered user id persistently.
- * This implementation does nothing.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#saveUserId()
- */
- public void saveUserId() {
- }
-
- /**
- * Sets the password for a particular user id and optionally persists it.
- * This implementation does nothing.
- *
- * @param matchingUserId the user id to set the password for
- * @param password the password to set.
- * @param persist true if this is to be persisted.
- * @param propagate true if this password should be propagated to other
- * connector services.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setPassword(java.lang.String,
- * java.lang.String, boolean, boolean)
- */
- public void setPassword(String matchingUserId, String password, boolean persist, boolean propagate) {
- }
-
- /**
- * Indicates if credentials are shared with other connector services.
- * This implementation returns false.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#sharesCredentials()
- */
- public boolean sharesCredentials() {
- return false;
- }
-
- /**
- * Sets the suppressed state of this connector service.
- * This implementation does nothing.
- * @param suppress true if this connector service should be suppressed.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setSuppressed(boolean)
- */
- public void setSuppressed(boolean suppress) {
- }
-
- /**
- * Sets the user id for this connector service.
- * This implementation does nothing.
- * @param userId the user id to set for this service.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#setUserId(java.lang.String)
- */
- public void setUserId(String userId) {
- }
-
-} \ 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 3bcb61227..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/CommunicationsEvent.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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;
- }
-
-}
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 be6ac4235..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, 2007 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.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();
-
-}
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 d31ca6588..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICommunicationsListener.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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 occurred.
- */
- 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
- * registers 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();
-}
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 4f923d3dc..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [185750] Remove IConnectorService.getHostType()
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * A connector service provides the means of establishing a connection from a
- * subsystem (or a number of subsystems) to a target system (a host).
- * <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: credentials (such as a userId/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 using implementers of {@link IConnectorServiceManager} which are
- * returned by another getter method in SubSystem.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Clients should subclass {@link AbstractConnectorService}
- * instead.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IConnectorService extends IRSEModelObject {
-
- /**
- * @return the primary subsystem object this connector service is associated
- * with. This is usually the subsystem that first established this
- * connector service.
- */
- public ISubSystem getPrimarySubSystem();
-
- /**
- * Return all the subsystems that use this connector service
- * @return the subsystems that use this service
- */
- public ISubSystem[] getSubSystems();
-
- /**
- * Adds a subsystem to this connector service. Does nothing if the
- * subsystem is already known to this connector service.
- * @param ss a subsystem that is using this connector service.
- */
- public void registerSubSystem(ISubSystem ss);
-
- /**
- * Deregister the subsystem. Does nothing if the subsystem is not present.
- * @param ss the subsystem to remove from this connector service.
- */
- public void deregisterSubSystem(ISubSystem ss);
-
- /**
- * @return true if currently connected.
- */
- public boolean isConnected();
-
- /**
- * Connect to the remote system.
- *
- * @param monitor a monitor for tracking the progress and canceling a
- * connect operation.
- * @throws OperationCanceledException if the connect was cancelled by the
- * user
- * @throws Exception if there is a failure connecting. Typically, this will
- * be a {@link SystemMessageException}.
- * @since org.eclipse.rse.core 3.0 throws OperationCanceledException instead
- * of InterruptedException
- */
- public void connect(IProgressMonitor monitor) throws Exception;
-
- /**
- * Disconnect from the remote system.
- *
- * @param monitor a monitor for tracking the progress and canceling a
- * disconnect operation.
- * @throws Exception an exception of the disconnect fails. Typically, this
- * will be a {@link SystemMessageException}.
- */
- public void disconnect(IProgressMonitor monitor) throws Exception;
-
- /**
- * 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. Return null if
- * this information is not available.
- */
- public String getVersionReleaseModification();
-
- /**
- * @return the home directory of the remote system for the current user,
- * if available.
- */
- public String getHomeDirectory();
-
- /**
- * @return the temporary directory of the remote system for the current user,
- * if available.
- */
- public String getTempDirectory();
-
- /**
- * Sets the host used by this connector service.
- * @param host the host to be used for this connector service
- */
- public void setHost(IHost host);
-
- /**
- * @return the host used by this connector service.
- */
- public IHost getHost();
-
- /**
- * @return the host name for the connection associated with this
- * connector service.
- */
- public String getHostName();
-
- /**
- * @return the port for this connector service. Usually only used for
- * IP based connections.
- */
- public int getPort();
-
- /**
- * Set the port for this connector. Usually only used by IP based
- * connections.
- * @param port the IP port used by this connector service.
- */
- public void setPort(int port);
-
- /**
- * @return true if this connector service will attempt to
- * use SSL when establishing its connection.
- */
- public boolean isUsingSSL();
-
- /**
- * @param flag true if the connector service should attempt to use SSL when
- * establishing the connection.
- */
- public void setIsUsingSSL(boolean flag);
-
- /**
- * Reports if this connector service can use a user identifier.
- * 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();
-
- /**
- * Determines if this connector service understand the concept of a password.
- * @return true if the connector service can use a password,
- * false if a password is irrelevant.
- */
- public boolean supportsPassword();
-
- /**
- * @return the user id that will be used by this connector when
- * establishing its connection.
- */
- public String getUserId();
-
- /**
- * Set the user id this connector service will use when establishing its
- * connection.
- * @param userId the user id string for this connector service.
- */
- public void setUserId(String userId);
-
- /**
- * Causes the user id known to the connector service, if any, to be
- * persisted.
- */
- public void saveUserId();
-
- /**
- * Causes the persisted (default) user id known to this
- * connector service, if any, to be forgotten.
- */
- public void removeUserId();
-
- /**
- * Sets the password used by this connector service.
- * Can be used if the connector service acquires a password by some external
- * means.
- * @param matchingUserId The user id to be associated with this password.
- * @param password the password
- * @param persist true if the password is to be persisted for later use.
- * @param propagate true if this password should be propagated to related connector services.
- */
- public void setPassword(String matchingUserId, String password, boolean persist, boolean propagate);
-
- /**
- * Causes the password known to this connector service, if any, to be
- * persisted.
- */
- public void savePassword();
-
- /**
- * Causes the persisted password known to this connector service, if any, to
- * be forgotten.
- */
- public void removePassword();
-
- /**
- * Clear password held by this service and optionally
- * clear its persistent form.
- * Called when user uses the property dialog to
- * change his userId.
- * @param persist if true, clears the persistent form of the password
- * @param propagate true if this password should be cleared in related connector services.
- */
- public void clearPassword(boolean persist, boolean propagate);
-
- /**
- * @param persistent also check for the persistent form of the password.
- * @return true if a password is currently known to this connector service.
- */
- public boolean hasPassword(boolean persistent);
-
- /**
- * Returns true if this system can inherit the credentials of
- * from the other connector services in this host.
- * @return true if it can inherit the credentials, false otherwise
- */
- public boolean inheritsCredentials();
-
- /**
- * Return true if this system can share it's credentials
- * with other connector services in this host.
- * @return true if it can share the credentials
- */
- public boolean sharesCredentials();
-
- /**
- * Clears the credentials held by this service.
- * Should be called if there is a change to any part of the credentials
- * expected by any using subsystem.
- */
- public void clearCredentials();
-
- /**
- * Acquire the credentials for this connector service. Acquisition may be
- * temporarily suppressed by using the {@link #setSuppressed(boolean)}.
- * <p>
- * Implementations may retain a remembered credentials or use this to
- * acquire the credentials using some implementation defined means.
- * <p>
- *
- * @param refresh if true will force the connector service to discard any
- * remembered value and reacquire the credentials.
- * @throws OperationCanceledException if acquisition of the credentials is
- * cancelled or is being suppressed.
- * @since org.eclipse.rse.core 3.0 throws OperationCanceledException instead
- * of InterruptedException
- */
- public void acquireCredentials(boolean refresh) throws OperationCanceledException;
-
- /**
- * @return true if the acquisition of credentials is being suppressed.
- */
- public boolean isSuppressed();
-
- /**
- * Suppresses the acquisition of a credentials by the connector service.
- * Causes {@link #acquireCredentials(boolean)} to immediately
- * throw an InterruptedException.
- * <p>
- * The intent is to allow tool writers to prevent multiple
- * attempts to acquire credentials during a set period of time.
- * <b>It is the responsibility of the caller to set this value
- * back to false when the tool no longer needs to suppress
- * acquisition credentials.</b>
- *
- * @param suppress <code>true</code> if acquisition is to be suppressed.
- * <code>false</code> if acquisition is to be allowed.
- */
- public void setSuppressed(boolean suppress);
-
- /**
- * Register a communications listener. These listeners will be informed
- * of connect and disconnect events.
- * @param listener a listener for the communications event.
- */
- public void addCommunicationsListener(ICommunicationsListener listener);
-
- /**
- * Remove a communications listener.
- * @param listener a listener for the communications event.
- */
- public void removeCommunicationsListener(ICommunicationsListener listener);
-
- /**
- * This methods returns the enablement state of a server launch type.
- * If {@link RemoteServerLauncher#enableServerLaunchType(ServerLaunchType, boolean)} has not been
- * called for this server launch type, then it is enabled by default.
- * @param subsystem the subystem for which this may be enabled.
- * @param serverLaunchType the type to check for enabledment.
- * @return true if the connector service supports server launching and
- * this launch type is enabled.
- * @see org.eclipse.rse.core.subsystems.ServerLaunchType
- */
- public boolean isServerLaunchTypeEnabled(ISubSystem subsystem, ServerLaunchType serverLaunchType);
-
- /**
- * Gets the properties associated with a remote server launcher.
- * These may be null.
- * This an optional object containing
- * properties used to launch the remote server that
- * communicates with this client.
- * @return the properties of the server launcher
- */
- IServerLauncherProperties getRemoteServerLauncherProperties();
-
- /**
- * Set the properties for the remote server launcher
- * This is an object containing
- * properties used to launch a remote server that
- * communicates with this client.
- * @param value the new value of the '<em>Remote Server Launcher</em>' containment reference.
- */
- void setRemoteServerLauncherProperties(IServerLauncherProperties value);
-
- /**
- * @return true if the connector service has server launcher properties.
- */
- boolean hasRemoteServerLauncherProperties();
-
- /**
- * @return true if the connector service supports the concept of remote
- * server launch properties.
- * This will always return false {@link #supportsRemoteServerLaunching()}
- * is false.
- */
- boolean supportsServerLaunchProperties();
-
- /**
- * @return true if the connector service supports the concept of remote
- * server launching.
- */
- boolean supportsRemoteServerLaunching();
-
- /**
- * @return the server launcher. Will be null unless
- * {@link #supportsRemoteServerLaunching()} is true.
- */
- IServerLauncher getRemoteServerLauncher();
-
- /**
- * Test if this connector service requires a password.
- * @return true if this connector service supports passwords and
- * requires a password to connect to its target system.
- */
- boolean requiresPassword();
-
- /**
- * Test if this connector service requires a user id.
- * @return true if this connector service understands the concept of a
- * user id and requires one to connect to its target system.
- */
- boolean requiresUserId();
-
- /**
- * Sets the attribute for this connector service instance that denies a
- * password to be saved. If the attribute has never been set it defaults to
- * false. If set to true, it will clear any saved passwords for this system
- * and not allow any further passwords to be stored. This property of a
- * system is persistent from session to session, but is not sharable.
- *
- * @param deny If true, forget any saved passwords and do not allow any
- * others to be saved. If false, allow passwords to be saved in
- * the keyring.
- * @return the number of saved passwords removed by this operation. This
- * will always be zero if "deny" is false.
- * @since org.eclipse.rse.core 3.0
- */
- public int setDenyPasswordSave(boolean deny);
-
- /**
- * Retrieves the value of the "DENY_PASSWORD_SAVE" property of this
- * connector service. If the value has never been set, this will return
- * false.
- *
- * @return true if password saving is denied.
- * @since org.eclipse.rse.core 3.0
- */
- public boolean getDenyPasswordSave();
-
-
-} \ 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 f7b32e6b6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorServiceManager.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * Connector Service Manager Interface.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Clients should subclass {@link AbstractConnectorServiceManager}
- * instead.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IConnectorServiceManager {
- IConnectorService getConnectorService(IHost host, Class commonSSinterface);
-
- void setConnectorService(IHost host, Class commonSSinterface, IConnectorService connectorService);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentials.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentials.java
deleted file mode 100644
index 7c5d58918..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentials.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of 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) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-public interface ICredentials {
-
- String getPassword();
-
- String getUserId();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentialsProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentialsProvider.java
deleted file mode 100644
index f7b83087a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ICredentialsProvider.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of 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) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- ********************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-/**
- * A credentials provider provides credentials to a connector service.
- * Every authenticating connector service has its own credentials provider,
- * usually created when that connector service is created.
- * <p>
- * Credentials will usually consist of a user id and password
- * but may be something else in which case implementers are free
- * change the user id and password methods to something that makes
- * sense for their case.
- * <p>
- * A provider may be in a suppressed state, in which case it will
- * prohibit the acquisition of credentials.
- * @see ICredentials
- * @see IConnectorService
- * @see AuthenticatingConnectorService
- */
-public interface ICredentialsProvider {
-
- /**
- * Causes the provider to create a set of credentials for use by a
- * connector service in order to connect to a target host system.
- * This may be done by presenting a dialog or by retrieving remembered
- * values.
- * @param reacquire true if the provider should refresh any remembered
- * credentials. Typically used to force the showing of a dialog containing
- * remembered credentials.
- * @throws OperationCanceledException if the acquisition of credentials is
- * cancelled by the user, if the provider is in suppressed state,
- * a resource (such as the workbench) not being available,
- * or interrupted by some other means.
- * @since 3.0 throws OperationCanceledException instead of InterruptedException
- */
- void acquireCredentials(boolean reacquire) throws OperationCanceledException;
-
- /**
- * The connector service using this provider may find the credentials provided
- * are incorrector or expired. This method asks the provider to repair those
- * credentials. This would typically be used to present a dialog asking for the reentry of
- * an expired password.
- * @param message the message indicating the nature of the damage that must
- * be repaired. For example, indicating expiration of a password.
- * @throws OperationCanceledException if the repair is cancelled for some reason. This could
- * include the inability of a credentials provider to open a dialog or a dialog being
- * cancelled.
- * @since 3.0 throws OperationCanceledException instead of InterruptedException
- */
- void repairCredentials(SystemMessage message)throws OperationCanceledException;
-
- /**
- * Clears the credentials known by this credentials provider. This will
- * cause a reacquistion of all compoenents of the credentials at the next
- * acquire. If credentials consist of a user id and password then both of those
- * are cleared.
- * Does not clear any persistently remembered values.
- */
- void clearCredentials();
-
- /**
- * Retrieves the credentials known to this credentials provider. Does not
- * cause the credentials to be acquired. May be used after {@link #acquireCredentials(boolean)}
- * to retrieve credentials.
- * @return the credentials that have previously been acquired or repaired.
- * May be null if no credentials have yet been acquired.
- */
- ICredentials getCredentials();
-
- /**
- * If the credentials include a password or equivalent then clears only that
- * that portion of the credentials. If the credentials do not include a password
- * then the implementation may somehow invalidate the credentials so that
- * they will be reacquired at the next acquisition.
- */
- void clearPassword();
-
- /**
- * If the credentials include a password or equivalent then set that password
- * to the new value.
- * If the credentials do not include a password then
- * the implementation may ignore this.
- * @param password the new value of the password in the credentials held by this provider
- */
- void setPassword(String password);
-
- /**
- * If the credentials include a user id then set that user id to the new value.
- * If the credentials do not include a user id then this is implementation
- * defined.
- * @param userId the user id to place into the credentials held by this provider
- */
- void setUserId(String userId);
-
- /**
- * If the credentials include a user id then retrieve that user id.
- * If the credentials do not currently contain a user id then a default user id
- * related to the connector service may be obtained.
- * If the credentials do not support a user id then this should return null.
- * @return the userid of the credentials held by this provider
- */
- String getUserId();
-
- /**
- * Retrieves the suppression state of the provider.
- * Acquisition may be suppressed for a period of time after a previous attempt.
- * This is to provide client control of the acquisition policy.
- * If true then {@link #acquireCredentials(boolean)} will immediately cancel when invoked.
- * @return true if the provider is suppressed.
- */
- boolean isSuppressed();
-
- /**
- * Sets the suppressed state of the provider.
- * Acquisition may be suppressed for a period of time after a previous attempt.
- * This is to provide client control of the acquisition policy.
- * If true then {@link #acquireCredentials(boolean)} will immediately cancel when invoked.
- * @param suppressed true if the provider is to be suppressed.
- */
- void setSuppressed(boolean suppressed);
-
- /**
- * Retrieves the connector service associated with this provider. Each provider
- * has its own connector service. All authenticating connector services have their
- * own provider.
- * @return the connector service associated with this provider
- */
- IConnectorService getConnectorService();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java
deleted file mode 100644
index f2d8cd663..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IDelegatingConnectorService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-package org.eclipse.rse.core.subsystems;
-
-/**
- * A delegating connector service forwards all requests for information to
- * another connector service.
- */
-public interface IDelegatingConnectorService extends IConnectorService
-{
- /**
- * @return the connector service that this connector service will
- * forward requests to.
- */
- public IConnectorService getRealConnectorService();
-}
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 ab7975fe0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IFileConstants.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-/**
- * Constants used in the remote file system support.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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 };
-}
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 4dfd357be..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, 2007 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.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);
-}
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 989b9d584..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, 2007 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.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();
-
-}
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 a7ac1e4e7..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectIdentifier.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [182454] improve getAbsoluteName() documentation
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.search.IHostSearchResult;
-
-/**
- * Interface that remote objects must implement in order to be identifiable for
- * drag and drop, clipboard support, and finding multiple occurrences of the
- * same remote object in different contexts in the SystemView.
- * <p>
- * This is the functional opposite of {@link IRemoteObjectResolver}.
- * </p>
- *
- * @see IRemoteObjectResolver
- */
-public interface IRemoteObjectIdentifier {
-
- /**
- * Return a String ID for the given remote object, that is unique within the
- * subsystem.
- * <p>
- * This must be implemented by subsystem element adapters in order to
- * marshal a reference to the remote object for drag and drop, and clipboard
- * support. It is also used for uniquely identifying objects with changing
- * properties in the SystemView. This method is the functional opposite of
- * {@link IRemoteObjectResolver#getObjectWithAbsoluteName(String, IProgressMonitor)}.
- * </p>
- * <p>
- * The unique ID for an object must remain the same over the entire lifetime
- * of that object, such that it can always be identified. When an object is
- * renamed, it should be removed from the views with the old ID and then
- * re-added with the new ID. This is especially important for the
- * SystemView, where the String ID is used for finding multiple occurrences
- * of the same remote resource in different contexts during refresh events.
- * In this case, the String ID can be used to find the remote object even if
- * its hashCode changes due to updated properties. So even if a subsystem
- * does not support drag and drop, or clipboard operations, it does need to
- * return unique IDs for its object to support refresh in the SystemView.
- * </p>
- * <p>
- * Because each subsystem maintains its own objects, it is the
- * responsibility of the subsystem and its adapters to come up with a
- * mapping that is unique for the subsystem. Some subsystems use fully
- * qualified path names, while others may use other methods. Extenders just
- * need to ensure that objects of different type (such as filters, actual
- * resources or error messages) all have different IDs within the subsystem,
- * and the corresponding
- * {@link IRemoteObjectResolver#getObjectWithAbsoluteName(String, IProgressMonitor)}
- * method actually finds the object by the given ID. Other subsystems do not
- * need to be considered.
- * </p>
- * <p>
- * <strong>Uniqueness and Multiple Contexts</strong><br/> The RSE
- * SystemView allows the same remote object to be displayed in multiple
- * different contexts, i.e. under multiple different filters. In this case,
- * each occurrence of the same object must return the same absolute name.
- * For the reverse mapping, however, it is up to the subsystem whether its
- * {@link IRemoteObjectResolver} returns only one internal model object for
- * the given identifier, or multiple context objects which all refer to the
- * same remote object but also hold context information.
- * </p>
- * <p>
- * <strong>Examples</strong><br/> In the File Subsystem, a fully qualified
- * pathname is used to uniquely identify remote objects. For other kinds of
- * objects maintained by the same subsystem, the following schemes are used:
- * <ul>
- * <li>The subsystem itself is identified as<br/> subsystemID ::=
- * (profileName).(connectionName).(subsystemName)<br/> - see
- * SystemViewSubSystemAdapter</li>
- * <li>Filter Pool References are identified as<br/> filterPoolID ::=
- * (subsystemID).(poolManagerName).(poolReferenceName)<br/> - see
- * SystemViewFilterPoolReferenceAdapter</li>
- * <li>Filter References are identified as <br/> filterRefID ::=
- * (filterPoolID).(filterName)<br/> - see SystemViewFilterReferenceAdapter</li>
- * <li>Search Results are identified by the
- * {@link IHostSearchResult#SEARCH_RESULT_DELIMITER} embedded in the ID.</li>
- * </ul>
- * All these IDs for internal elements like the subsystem itself or the
- * filters start with a profile name which must not contain any of the / \
- * or : characters. Fully qualified path names, on the other hand, always
- * start with a / or \ character (UNIX style paths, Windows UNC paths) or
- * have a : character on the second position (Windows drive letters). The
- * SEARCH_RESULT_DELIMITER is ":SEARCH" which cannot be part of a valid
- * filename. Therefore, this naming scheme is guaranteed to be unique.
- * </p>
- *
- * @see IRemoteObjectResolver#getObjectWithAbsoluteName(String,
- * IProgressMonitor)
- *
- * @param object the remote element to be identified.
- * @return a String uniquely identifying the remote object within the
- * subsystem. Must not return <code>null</code>.
- */
- 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 08dc7ccfc..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteObjectResolver.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [182454] improve getAbsoluteName() documentation
- * David McKnight (IBM) - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Interface for resolving an object in a subsystem from a unique ID.
- * This is the functional opposite of {@link IRemoteObjectIdentifier}.
- *
- * @see IRemoteObjectIdentifier
- */
-public interface IRemoteObjectResolver {
-
- /**
- * Return the remote object that corresponds to the specified unique ID.
- * <p>
- * This must be implemented by subsystems in order to find remote objects
- * for drag and drop, clipboard, and other object retrieval mechanisms in
- * support of remote objects. It is the functional opposite of
- * {@link IRemoteObjectIdentifier#getAbsoluteName(Object)}.
- * </p>
- * <p>
- * Because each subsystem maintains it's own objects, it is the
- * responsibility of the subsystem to determine how an ID (or key) for a
- * given object maps to the real object. Subsystems also need to ensure that
- * objects of different type (such as filters, actual resources or error
- * messages) all have different IDs. See
- * {@link IRemoteObjectIdentifier#getAbsoluteName(Object)} for an example.
- * </p>
- * <p>
- * In case a cached copy of remote object is available locally, this method
- * will <strong>not</strong> contact the remote side in order to check
- * whether the cached copy is up-to-date. Clients are responsible themselves
- * for refreshing the remote object when they think it is necessary.
- * </p>
- * <p>
- * In case a cached local copy is not available, the remote system may be
- * contacted to retrieve the remote object. In this case, this call may be a
- * long-running operation and may throw an exception. Note, however, that
- * since keys used as IDs are generated by a remote object adapter that
- * implements {@link IRemoteObjectIdentifier}, a cached copy of the remote
- * object will typically be in memory from generating the key. A notable
- * exception to this case is when the system view is restored to its
- * previous state during startup.
- * </p>
- * <p>
- * <strong>Uniqueness and Multiple Contexts</strong><br/> The RSE
- * SystemView allows the same remote object to be displayed in multiple
- * different contexts, i.e. under multiple different filters. In this case,
- * each occurrence of the same object must return the same absolute name.
- * For the reverse mapping, however, this method may return only one context
- * object even though multiple different ones are shown in the SystemView.
- * </p>
- *
- * @see IRemoteObjectIdentifier#getAbsoluteName(Object)
- *
- * @param key the unique id of the remote object. Must not be
- * <code>null</code>.
- * @param monitor the progress monitor
- * @return the remote object instance, or <code>null</code> if no object
- * is found with the given id.
- * @throws Exception in case an error occurs contacting the remote system
- * while retrieving the requested remote object. Extenders are
- * encouraged to throw {@link SystemMessageException} in order
- * to support good user feedback in case of errors. Since
- * exceptions should only occur while retrieving new remote
- * objects during startup, clients are typically allowed to
- * ignore these exceptions and treat them as if the remote
- * object were simply not there.
- * @since org.eclipse.rse.core 3.0
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception;
-
- /**
- * Return the remote object that corresponds to the specified unique ID.
- *
- * @param key the unique id of the remote object. Must not be
- * <code>null</code>.
- * @return the remote object instance, or <code>null</code> if no object
- * is found with the given id.
- * @throws Exception in case an error occurs contacting the remote system
- * while retrieving the requested remote object.
- * @deprecated - use getObjectwithAbsoluteName(String key, IProgressMonitor
- * monitor)
- */
- 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 3ed6ff2e1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemotePropertyHolder.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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();
-}
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 d059f755b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteServerLauncher.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.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);
-}
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 bf776b5fa..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IRemoteSystemEnvVar.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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:
- * David McKnight (IBM) - [208813] removing deprecated APIs
- *******************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-public interface IRemoteSystemEnvVar {
-
- /**
- * @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);
-
-}
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 f1ebc60ed..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncher.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-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.
- * @param connectPort the port to use for launching the server
- * @param monitor a monitor for showing progress
- * @see #getErrorMessage()
- * @return Anything you want.
- */
- public Object connect(int connectPort, IProgressMonitor monitor) 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 c9470595f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IServerLauncherProperties.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.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
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 50a920363..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystem.java
+++ /dev/null
@@ -1,692 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * David McKnight (IBM) - [207095] Implicit connect needs to run in the same job as caller
- * David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect()
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-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.IPropertySet;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Clients must extend the abstract <code>SubSystem</code> class
- * instead.
- */
-public interface ISubSystem extends ISystemFilterPoolReferenceManagerProvider, IRemoteObjectResolver, ISchedulingRule, IRSEModelObject {
- // -------------------------------------
- // 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 connector service object to set
- */
- 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 successfully. This call is
- * always made on a background Thread, so it's allowed to be long-running.
- *
- * @param monitor a progress monitor that can be used to show progress
- * during long-running operation. Cancellation is typically not
- * supported since it might leave the system in an inconsistent
- * state.
- *
- * @throws SystemMessageException if an error occurs during initialization.
- */
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Called on each subsystem associated with a particular
- * {@link IConnectorService} after it disconnects
- *
- * @param monitor a progress monitor that can be used to show progress
- * during long-running operation. Cancellation is typically not
- * supported since it might leave the system in an inconsistent
- * state.
- */
- public void uninitializeSubSystem(IProgressMonitor monitor);
-
- /**
- * @return true if this subsystem's properties should take precedence over other
- * subsystems that share the same {@link 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();
-
- /**
- * Check if the subsystem is connected, and connect if it's not.
- *
- * This is a convenience method which first checks whether the subsystem is
- * already connected. If not, it automatically checks if it's running on the
- * dispatch thread or not, and calls the right <code>connect()</code> method
- * as appropriate. It also performs some exception parsing, converting
- * Exceptions from connect() into SystemMessageException that can be
- * displayed to the user by using a method in it.
- *
- * If the subsystem is marked offline, or supports caching and is currently
- * restoring from its memento, no connect will be performed.
- *
- * @throws SystemMessageException in case of an error connecting
- * @since org.eclipse.rse.core 3.0
- */
- public void checkIsConnected(IProgressMonitor monitor) 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>
- * @deprecated Subsystems can now take named property sets. These should be used instead.
- * See {@link IPropertySet}
- */
- 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
- * @deprecated Subsystems can now take named property sets. These should be used instead.
- * See {@link IPropertySet}
- */
- 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();
-
-
- /**
- * Synchronously connect to the remote system.
- *
- * Clients are expected to call this method on a background
- * thread with an existing progress monitor. A signon prompt
- * may optionally be forced even if the password is cached
- * in memory or on disk.
- *
- * The framework will take care of switching to the UI thread
- * for requesting a password from the user if necessary.
- *
- * @param monitor the progress monitor. Must not be <code>null</code>.
- * @param forcePrompt forces the prompt dialog to be displayed
- * even if the password is currently in memory.
- * @throws Exception an exception if there is a failure to connect.
- * Typically, this will be a {@link SystemMessageException}.
- * An {@link OperationCanceledException} will be thrown if the user cancels the connect.
- */
- public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception;
-
- /**
- * Asynchronously connect to the remote system, optionally forcing a signon prompt
- * even if the password is cached in memory or on disk.
- * <p/>
- * This method must be called on the UI Thread! An Eclipse background job with a
- * progress monitor will be created automatically. If the optional callback is
- * given, it will be called when the connect is complete.
- * You do not need to override this, as it does the progress monitor reporting
- * for you.
- * <p/>
- * Override internalConnect if you want, but by default it calls
- * <code>getConnectorService().connect(IProgressMonitor)</code>.
- *
- * @param forcePrompt forces the prompt dialog even if the password is in mem
- * @param callback to call after connect is complete.
- * May be <code>null</code>.
- * @throws Exception an exception if there is a failure to connect.
- * Typically, this will be a {@link SystemMessageException}.
- * An {@link OperationCanceledException} will be thrown if the user cancels the connect.
- */
- public void connect(boolean forcePrompt, IRSECallback callback) 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;
-
- /**
- * 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.
- * @param monitor the process monitor associated with this operation
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) 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, IProgressMonitor)} but takes an array of
- * filter strings versus a single filter string.
- *
- * @param filterStrings array of filter patterns for objects to return.
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor) throws Exception;
-
- /**
- * Resolve a 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.
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor) 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.
- *
- * @deprecated this shouldn't be used
- */
- 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.
- *
- * @deprecated this shouldn't be used
- */
- 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.
- *
- * @deprecated this shouldn't be used
- */
- 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.
- *
- * @deprecated this shouldn't be used
- */
- 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);
-
- /**
- * Returns the interface type (i.e. a Class object that is an Interface) of
- * a service subsystem.
- *
- * @return the service interface on which this service subsystem is
- * implemented. If this subsystem is not a service subsystem it must
- * return <code>null</code>.
- * @since org.eclipse.rse.core 3.0
- */
- public Class getServiceType();
-
- /**
- * Requests a service subsystem to switch to a new configuration. If the
- * configuration is compatible with this subsystem then it must disconnect,
- * possibly reset its filter pool references, and request new services and
- * parameters from its new configuration. It must also answer true to
- * {@link #canSwitchTo(ISubSystemConfiguration)}. If the configuration is
- * not compatible with this subsystem then this must do nothing and must
- * answer false to {@link #canSwitchTo(ISubSystemConfiguration)}.
- *
- * @param configuration the configuration to which to switch.
- * @since org.eclipse.rse.core 3.0
- */
- public void switchServiceFactory(ISubSystemConfiguration configuration);
-
- /**
- * Determine is this subsystem is compatible with this specified
- * configuration.
- *
- * @param configuration the configuration which may be switched to
- * @return true if the subsystem can switch to this configuration, false
- * otherwise. Subsystems which are not service subsystems must
- * return false.
- * @since org.eclipse.rse.core 3.0
- */
- public boolean canSwitchTo(ISubSystemConfiguration configuration);
-
-
-
- //// -------------------------------------
- // // 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 26be72e23..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfiguration.java
+++ /dev/null
@@ -1,758 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - 168870: move core function from UI to core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * David Dykstal (IBM) - [197036] change signature of getFilterPoolManager method to be able to control the creation of filter pools
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * Martin Oberhuber (Wind River) - [226574][api] Add ISubSystemConfiguration#supportsEncoding()
- * Martin Oberhuber (Wind River) - [218309] ConcurrentModificationException during workbench startup
- * David McKinght (IBM) - [249245] Go Into on a filter then back brings up prompt of any expanded promptable filter
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import java.util.List;
-
-import org.eclipse.rse.core.IRSESystemType;
-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.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISubSystemConfigurator;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.services.IService;
-
-/**
- * Subsystem Configuration interface.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Subsystem configuration implementations must subclass
- * <code>SubSystemConfiguration</code> rather than implementing
- * this interface directly.
- */
-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();
-
- /**
- * Retrieves all the filter pool managers for all the profiles, active or not.
- * This allows cross references from
- * one subsystem in one profile to filter pools in any other profile.
- */
- public ISystemFilterPoolManager[] getAllSystemFilterPoolManagers();
-
- // ---------------------------------
- // CRITICAL METHODS...
- // ---------------------------------
-
- /**
- * Test whether subsystems managed by this configuration support custom
- * encodings.
- *
- * Encodings specify the way how binary data on the remote system is
- * translated into Java Unicode Strings. RSE provides some means for the
- * User to specify a particular encoding to use; typically, all subsystems
- * that do support custom encodings specified should use the same encoding
- * such that they can interoperate. Therefore, encodings are usually
- * obtained from {@link IHost#getDefaultEncoding(boolean)}.
- *
- * It's possible, however, that a particular subsystem "knows" that its
- * resources are always encoded in a particular way, and there is no
- * possibility to ever change that. The Subsystem Configuration would return
- * <code>false</code> here in this case. Another possibility is that
- * encodings for a particular subsystem can be changed, but in a way that's
- * different than what RSE usually does. The default case, however, should
- * be that subsystems fall back to the setting specified by the host or its
- * underlying system type such that existing subsystem configurations can be
- * re-used in an environment where the encoding to use is pre-defined by the
- * system type or host connection.
- *
- * If no subsystem registered against a given host supports encodings, the
- * corresponding UI controls on the IHost level are disabled in order to
- * avoid confusion to the user.
- *
- * @return <code>true<code> if the RSE mechanisms for specifying custom
- * encodings are observed and supported by the subsystems managed
- * by this configuration for the given host.
- * @see IRSESystemType#PROPERTY_SUPPORTS_ENCODING
- * @since org.eclipse.rse.core 3.0
- */
- public boolean supportsEncoding(IHost host);
-
- /**
- * 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.
- *
- * NOTE: command subsystems are special because their filters don't yield children or allow
- * drilling into them via Show In Table, Open In New Window or Go Into. See bug 249245 and
- * bug 254605 for further explanation.
- */
- 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 deferred queries are supported.
- *
- * Deferred queries work such that when a filter or element
- * children query is made, a WorkbenchJob is started to
- * perform the query in a background thread. The query can
- * take time to complete, but a negative side-effect of this
- * is that it will always take time to complete.
- *
- * Alternative models can use asynchronous calls to populate
- * their model with data from the remote side, and refresh
- * the views when new data is in the model. Such subsystem
- * configurations should return <code>false</code> here.
- *
- * The default implementation returns <code>true</code>, indicating
- * that deferred queries are supported for filters, and delegates
- * the check for model elements to the ISystemViewElementAdapter.
- *
- * @return <code>true</code> if deferred queries are supported.
- */
- public boolean supportsDeferredQueries();
-
- /**
- * 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/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 IRSESystemType[] 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);
-
- /**
- * Callback method called after renaming a subsystem profile.
- * <p>
- * This is called by SystemRegistry's renameSystemProfile method
- * after it is complete, , in order to allow the subsystem configuration
- * perform any required cleanup. For instance, subsystem configurations
- * must ensure that they update their filter pool manager names
- * (and their folders).
- * </p><p>
- * Must be called AFTER changing the profile's name!!
- * </p>
- * @param oldProfileName the old profile name.
- * @param newProfileName the new profile name.
- */
- public void renameSubSystemProfile(String oldProfileName, String newProfileName);
-
-
- // ---------------------------------
- // SUBSYSTEM METHODS...
- // ---------------------------------
-
- /**
- * Called by SystemRegistry's renameSystemProfile method to ensure we update our
- * subsystem names within each subsystem.
- * This should be invoked after changing the profile's name.
- * @param subsystem the subsystem to be updated
- * @param oldProfileName the old profile name
- * @param newProfileName the new profile name
- */
- public void renameSubSystemProfile(ISubSystem subsystem, 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 configurators The configurators that will be applied to a new subsystem or null if there are none.
- * @since 3.0
- */
- public ISubSystem createSubSystem(IHost conn, boolean creatingConnection, ISubSystemConfigurator[] configurators);
-
- // used in the case where newsubsystems are added after a connection exists
- public ISubSystem createSubSystemAfterTheFact(IHost conn);
-
- public ISubSystem createSubSystemInternal(IHost conn);
-
- /**
- * Get the connector service for a particular host.
- * This may create the connector service if necessary.
- * If the configuration is a service subsystem configuration, this should
- * return the connector service specified in {@link #setConnectorService(IHost, IConnectorService)}.
- * @param host the host for which to create or retrieve the connector service
- * @return the connector service associated with this host. This can return null if there
- * is no connector service associated with this configuration. It is recommended that
- * there be a connector service if {@link #supportsSubSystemConnect()} is true.
- */
- public IConnectorService getConnectorService(IHost host);
-
- /**
- * Set the connector service for a particular host. This is usually managed
- * by a connector service manager known to this configuration. This must be
- * implemented by service subsystem configurations. Service subsystems allow
- * a connector service to be changed.
- *
- * @param host the host for which to set this connector service.
- * @param connectorService the connector service associated with this host.
- * @since org.eclipse.rse.core 3.0
- */
- public void setConnectorService(IHost host, IConnectorService connectorService);
-
- /**
- * Get the service type associated with this subsystem configuration. If the
- * configuration is not a service subsystem configuration it must return
- * <code>null</code>, otherwise it must return the interface class that
- * the underlying service layer implements.
- *
- * @return an interface class that is implemented by the service layer used
- * by subsystems that have this configuration, or <code>null</code>
- * if this is not a service subsystem configuration.
- * @since org.eclipse.rse.core 3.0
- */
- public Class getServiceType();
-
- /**
- * Get the implementation type of the service associated with this subsystem
- * configuration. If the configuration is not a service subsystem
- * configuration then this must return <code>null</code>, otherwise it
- * must return the class that implements the interface specified in
- * {@link #getServiceType()}.
- *
- * @return an implementation class that implements the interface specified
- * in {@link #getServiceType()}, or <code>null</code> if this is
- * not a service subsystem configuration.
- * @since org.eclipse.rse.core 3.0
- */
- public Class getServiceImplType();
-
- /**
- * Get the actual service associated with a particular host. If the
- * configuration is not a service subsystem this must return null. Otherwise
- * this must return the particular instance of the class returned by
- * {@link #getServiceImplType()} that is associated with this host instance.
- *
- * @param host The host for which to retrieve the service.
- * @return The instance of {@link IService} which is associated with this
- * host, or <code>null</code> if this is not a service subsystem
- * configuration.
- * @since org.eclipse.rse.core 3.0
- */
- public IService getService(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. A subsystem
- * configuration has a filter pool manager for each profile.
- *
- * @param profile The system profile for which to get the manager.
- * @param force if true then create the default filters for this subsystem
- * configuration in this profile. This should only be done during
- * initial subsystem creation, not during subsystem restore.
- * @return a filter pool manager
- * @since org.eclipse.rse.core 3.0
- */
- public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile, boolean force);
-
- /**
- * Get the filter pool manager for the given profile. A subsystem
- * configuration has a filter pool manager for each profile. Do not force
- * the creation of default filter pools. Fully equivalent to
- * getFilterPoolManager(profile, false).
- *
- * @param profile The system profile for which to get the manager.
- * @return a filter pool manager
- */
- 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;
-
- /**
- * Return the internal list of subsystems instantiated for this
- * configuration. Internal use only, do not call or use. Use
- * {@link #getSubSystems(boolean)} with a <code>false</code> argument
- * instead.
- *
- * @noreference This method is not intended to be referenced by clients.
- * @return The internal list of SubSystem instances for this configuration.
- * Any operations on this list (such as iterating, adding or
- * removing members) must always be synchronized against the list,
- * in order to protect against concurrent modification.
- */
- List getSubSystemList();
-
- /**
- * Return the internal list of filter pool managers associated with this
- * configuration. Internal use only, do not call or use.
- *
- * @noreference This method is not intended to be referenced by clients.
- * @return The internal list of filter pool Managers associated with this
- * configuration. Any operations on this list (such as iterating,
- * adding or removing members) must always be synchronized against
- * the list, in order to protect against concurrent modification.
- */
- 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 ac6a7fc83..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemConfigurationProxy.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David Dykstal (IBM) - 168870: move core function from UI to core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import java.net.URL;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.osgi.framework.Bundle;
-
-/**
- * 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>id</samp> xml attribute.
- * Return unique id of this configuration.
- */
- public String getId();
-
- /**
- * 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();
-
- /**
- * Returns the bundle which have declared the subsystem
- * configuration associated with this proxy.
- *
- * @return The declaring bundle.
- */
- public Bundle getDeclaringBundle();
-
- /**
- * Return value of the <samp>systemTypeIds</samp> xml attribute.
- * Return the system type ids this subsystem configuration supports.
- */
- public String getDeclaredSystemTypeIds();
-
- /**
- * Returns the list of system types the subsystem configuration is supporting.
- * The list is combined from the list of currently registered system types cleaned
- * up by the ones not matching the declared system type ids.
- *
- * @return The list of supported system types or an empty list.
- */
- public IRSESystemType[] 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 subsystemConfigurations 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
- * <samp>systemTypes</samp> attribute of this extension.
- */
- public boolean appliesToSystemType(IRSESystemType 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();
-
- /**
- * @return the URL of the image associated with this subsystem in its non-connected state.
- */
- public URL getImageLocation();
-
- /**
- * @return the URL of the image associated with this subsystem in its connected state.
- */
- public URL getLiveImageLocation();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemDragDropAdapter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemDragDropAdapter.java
deleted file mode 100644
index 7cd562ea9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemDragDropAdapter.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.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.core/src/org/eclipse/rse/core/subsystems/ISystemRemoteObjectMatchProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemRemoteObjectMatchProvider.java
deleted file mode 100644
index b1b539b0f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISystemRemoteObjectMatchProvider.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-/**
- * 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 ISystemRemoteObjectMatchProvider extends IRemoteObjectIdentifier {
-
- /**
- * Return the name of this object, which may be different than
- * the display text ({@link #getText(Object)}).
- * <p>
- * The unqualified name is used for checking uniqueness during rename
- * operations.
- * </p>
- * @param element the element for which to return the internal name.
- * @return a String representing the internal name of the given element.
- */
- public String getName(Object element);
-
- /**
- * Return the source type of the selected object.
- * <p>
- * Typically, this only makes sense for compilable source members.
- * For non-compilable remote objects, this typically just returns null.
- * </p>
- * @return the sourcetype id of this remote object,
- * or <code>null</code> if not applicable.
- */
- public String getRemoteSourceType(Object element);
-
- /**
- * Return a value for the sub-subtype property for this object.
- * <p>
- * 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.
- * </p>
- * @return the subsubtype id of this remote object for filtering.
- * May return <code>null</code>.
- */
- public String getRemoteSubSubType(Object element);
-
- /**
- * Return a value for the subtype property for this object.
- * <p>
- * 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.
- * </p>
- * @return the subtype id of this remote object for filtering.
- * May return <code>null</code>.
- */
- public String getRemoteSubType(Object element);
-
- /**
- * Return a value for the type property for this object.
- * <p>
- * The value must not be translated, so that property pages registered
- * via xml can subset by it.
- * </p>
- * @return the type id of this remote object for filtering.
- */
- public String getRemoteType(Object element);
-
- /**
- * Return a value for the type category property for this object.
- * <p>
- * The value must not be translated, so that property pages registered
- * via xml can subset by it.
- * </p>
- * @return the category id of this remote object for filtering.
- */
- public String getRemoteTypeCategory(Object element);
-
- /**
- * Return the subsystem that is responsible for getting this remote object.
- * <p>
- * When used together with getAbsoluteName, allows for unique
- * identification of this object.
- * </p>
- * @return the subsystem owning this remote object.
- * Must not return <code>null</code>.
- */
- public ISubSystem getSubSystem(Object element);
-
- /**
- * Return the subsystem factory id that owns this remote object.
- * <p>
- * The value must not be translated, so that property pages registered
- * via xml can subset by it.
- * </p>
- * @return the ID of the subsystem configuration that created
- * the subsystem which owns this remote object.
- */
- public String getSubSystemConfigurationId(Object element);
-
- /**
- * Return the label for this object.
- * @see #getName(Object)
- * @param element the element for which to return the internal name.
- * @return a String representing the UI visible label of the given element.
- */
- public String getText(Object element);
-
-}
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 6f196670b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteChildrenContentsType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java
deleted file mode 100644
index c37e4803f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java
+++ /dev/null
@@ -1,501 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David McKnight (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David McKnight (IBM) - [240037] [dstore][launcher] NumberFormatException printed to stdout when invalid rexec port is given in new connection wizard
- * David McKnight (IBM) - [272952] [dstore] Unable to set SSL REXEC properties on Launcher Properties Panel of Connector Services Property page.
- *******************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.rse.core.model.ILabeledObject;
-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.internal.core.RSECoreMessages;
-
-
-/**
- * <!-- 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 ISubSystemConfiguration#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;
-
- // property set keys
- protected final String PROPERTY_SET_NAME = "Launcher Properties"; //$NON-NLS-1$
- private final String PROPERTY_SET_LABEL = RSECoreMessages.RESID_PROPERTYSET_LAUNCHER_PROPERTIES;
-
- 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 = 4075;
-
- 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;
-
- public 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
- {
- if (set instanceof ILabeledObject) {
- ILabeledObject ps = (ILabeledObject) set;
- ps.setLabel(PROPERTY_SET_LABEL);
- }
- IProperty launchTypeProperty = set.getProperty(KEY_SERVER_LAUNCH_TYPE_NAME);
- launchTypeProperty.setLabel(RSECoreMessages.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(RSECoreMessages.RESID_CONNECTION_DAEMON_PORT_LABEL);
-
- try {
- _daemonPort = Integer.parseInt(daemonPortProperty.getValue());
- }
- catch (Exception e){
- _daemonPort = DAEMON_PORT_EDEFAULT;
- }
-
- IProperty autoDetectProperty = set.getProperty(KEY_AUTODETECT_SSL);
- if (autoDetectProperty != null)
- {
- boolean autoDetect = _serverLaunchType == null || _serverLaunchType.getType() == ServerLaunchType.REXEC;
- autoDetectProperty.setEnabled(autoDetect);
- autoDetectProperty.setLabel(RSECoreMessages.RESID_SUBSYSTEM_AUTODETECT_LABEL);
-
- _autoDetectSSL = Boolean.valueOf(autoDetectProperty.getValue()).booleanValue();
- }
-
- boolean usingRexec = _serverLaunchType != null && _serverLaunchType.getType() == ServerLaunchType.REXEC;
- IProperty rexecPortProperty = set.getProperty(KEY_REXEC_PORT);
- rexecPortProperty.setEnabled(usingRexec);
- rexecPortProperty.setLabel(RSECoreMessages.RESID_CONNECTION_PORT_LABEL);
-
- try {
- _rexecPort = Integer.parseInt(rexecPortProperty.getValue());
- }
- catch (Exception e){
- _rexecPort = REXEC_PORT_EDEFAULT;
- }
-
- IProperty serverPathProperty = set.getProperty(KEY_SERVER_PATH);
- serverPathProperty.setEnabled(usingRexec);
- serverPathProperty.setLabel(RSECoreMessages.RESID_PROP_SERVERLAUNCHER_PATH);
- _serverPath = serverPathProperty.getValue();
-
- IProperty serverScriptProperty = set.getProperty(KEY_SERVER_SCRIPT);
- serverScriptProperty.setEnabled(usingRexec);
- serverScriptProperty.setLabel(RSECoreMessages.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 (set instanceof ILabeledObject) {
- ((ILabeledObject)set).setLabel(PROPERTY_SET_LABEL);
- }
- }
-
- if (_serverLaunchType == null)
- _serverLaunchType = ServerLaunchType.get(ServerLaunchType.DAEMON);
- IProperty launchTypeProperty = set.addProperty(KEY_SERVER_LAUNCH_TYPE_NAME, _serverLaunchType.getName(), getServerLauncherPropertyType());
- launchTypeProperty.setLabel(RSECoreMessages.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(RSECoreMessages.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(RSECoreMessages.RESID_CONNECTION_PORT_LABEL);
-
- IProperty autoDetectSSLProperty = set.addProperty(KEY_AUTODETECT_SSL, ""+_autoDetectSSL, PropertyType.getBooleanPropertyType()); //$NON-NLS-1$
- autoDetectSSLProperty.setEnabled(usingRexec);
- autoDetectSSLProperty.setLabel(RSECoreMessages.RESID_SUBSYSTEM_AUTODETECT_LABEL);
-
- IProperty serverPathProperty = set.addProperty(KEY_SERVER_PATH, ""+_serverPath); //$NON-NLS-1$
- serverPathProperty.setLabel(RSECoreMessages.RESID_PROP_SERVERLAUNCHER_PATH);
- serverPathProperty.setEnabled(usingRexec);
-
- IProperty serverScriptProperty = set.addProperty(KEY_SERVER_SCRIPT, ""+_serverScript); //$NON-NLS-1$
- serverScriptProperty.setEnabled(usingRexec);
- serverScriptProperty.setLabel(RSECoreMessages.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().getName().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 ISubSystemConfiguration#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
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java
deleted file mode 100644
index f5dbe7d06..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncherConstants.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-/**
- * This interface defines constants for the Remote Server Launcher.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface RemoteServerLauncherConstants
-{
-
- /**
- * Default daemon port, 4075.
- */
- public static final int DEFAULT_DAEMON_PORT = 4075;
-
- /**
- * 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.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 003bc272d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLaunchType.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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) - [cleanup] Add API "since" Javadoc tags
- *******************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Server Launch Type Enum type.
- *
- * @noinstantiate This class is not intended to be instantiated by clients. Use
- * the {@link #get(int)} or {@link #get(String)} factory methods
- * instead.
- */
-public final class ServerLaunchType {
- /**
- * The '<em><b>Daemon</b></em>' literal value (value 0). The server
- * code is to be launched by calling a daemon that is listening on a port.
- *
- * @see #DAEMON_LITERAL
- */
- public static final int DAEMON = 0;
-
- /**
- * The '<em><b>Rexec</b></em>' literal value (value 1). The server code
- * is to be launched using REXEC
- *
- * @see #REXEC_LITERAL
- */
- public static final int REXEC = 1;
-
- /**
- * The '<em><b>Running</b></em>' literal value (value 2). The server
- * code is to already running, and doesn't need to be launched.
- *
- * @see #RUNNING_LITERAL
- */
- public static final int RUNNING = 2;
-
- /**
- * The '<em><b>Telnet</b></em>' literal value (value 3). The server
- * code is to be launched using TELNET.
- *
- * @see #TELNET_LITERAL
- */
- public static final int TELNET = 3;
-
- /**
- * The '<em><b>SSH</b></em>' literal value (value 4). The server code
- * is to be launched using SSH.
- *
- * @see #SSH_LITERAL
- */
- public static final int SSH = 4;
-
- /**
- * The '<em><b>FTP</b></em>' literal value (value 5). The server code
- * is to be launched using FTP
- *
- * @see #FTP_LITERAL
- */
- public static final int FTP = 5;
-
- /**
- * The '<em><b>HTTP</b></em>' literal value (value 6). The server code
- * is to be launched using HTTP
- *
- * @see #HTTP_LITERAL
- */
- public static final int HTTP = 6;
-
- /**
- * The '<em><b>Daemon</b></em>' literal object.
- * The server code is to be launched by calling a daemon that is listening on a port.
- * @see #DAEMON
- */
- public static final ServerLaunchType DAEMON_LITERAL = new ServerLaunchType(DAEMON, "Daemon"); //$NON-NLS-1$
-
- /**
- * The '<em><b>Rexec</b></em>' literal object. The server code is to be
- * launched using REXEC.
- *
- * @see #REXEC
- */
- public static final ServerLaunchType REXEC_LITERAL = new ServerLaunchType(REXEC, "Rexec"); //$NON-NLS-1$
-
- /**
- * The '<em><b>Running</b></em>' literal object.
- * The server code is to already running, and doesn't need to be launched.
- * @see #RUNNING
- */
- public static final ServerLaunchType RUNNING_LITERAL = new ServerLaunchType(RUNNING, "Running"); //$NON-NLS-1$
-
- /**
- * The '<em><b>Telnet</b></em>' literal object.
- * The server code is to be launched using TELNET.
- * @see #TELNET
- */
- public static final ServerLaunchType TELNET_LITERAL = new ServerLaunchType(TELNET, "Telnet"); //$NON-NLS-1$
-
- /**
- * The '<em><b>SSH</b></em>' literal object.
- * If the meaning of '<em><b>SSH</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * @see #SSH
- */
- public static final ServerLaunchType SSH_LITERAL = new ServerLaunchType(SSH, "SSH"); //$NON-NLS-1$
-
- /**
- * The '<em><b>FTP</b></em>' literal object. The server code is to be
- * launched using FTP.
- *
- * @see #FTP
- */
- public static final ServerLaunchType FTP_LITERAL = new ServerLaunchType(FTP, "FTP"); //$NON-NLS-1$
-
- /**
- * The '<em><b>HTTP</b></em>' literal object. The server code is to be
- * launched using HTTP.
- *
- * @see #HTTP
- */
- 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.
- */
- 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.
- */
- public static final List VALUES = Arrays.asList(VALUES_ARRAY);
-
- /**
- * Returns the '<em><b>Server Launch Type</b></em>' literal with the specified name.
- */
- 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.
- */
- 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
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLauncher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLauncher.java
deleted file mode 100644
index 0172b878b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ServerLauncher.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2008 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David McKnight (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.rse.core.model.ILabeledObject;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-
-/**
- * Abstract class intended to be extended to provide a means for starting a
- * remote server from the client. DStore-based connector services use this to
- * determine whether to start a sever via daemon, REXEC, or some other
- * mechanism. For systems that don't need to start remote servers from RSE, this
- * is not needed.
- *
- * @since 3.0 moved from non-API to API
- */
-public abstract class ServerLauncher extends RSEModelObject implements IServerLauncherProperties, ILabeledObject
-{
-
- protected String _name;
- private String _label = null;
- protected IConnectorService _connectorService;
-
- /**
- * Constructs a server launcher
- * @param name name of the server launcher
- * @param service the associated connector service
- */
- protected ServerLauncher(String name, IConnectorService service)
- {
- super();
- _name = name;
- _connectorService = service;
- }
-
- /**
- * Returns the name of the server launcher
- */
- public String getName()
- {
- return _name;
- }
-
- /**
- * Returns the label to display in a ui for the server launcher
- */
- public String getLabel() {
- if (_label != null) return _label;
- return _name;
- }
-
- /**
- * Sets the label to use for display in a ui for the server launcher
- */
- public void setLabel(String label) {
- _label = label;
- setDirty(true);
- }
-
- /**
- * Returns the description of the server launcher
- */
- public String getDescription()
- {
- return RSECoreMessages.RESID_MODELOBJECTS_SERVERLAUNCHER_DESCRIPTION;
- }
-
- /**
- * Returns the associated connector service
- */
- public IConnectorService getConnectorService()
- {
- return _connectorService;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return _connectorService;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = Arrays.asList(getPropertySets());
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
- /**
- * 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;
- }
-
- /**
- * Commits the associated connector service to be persisted
- */
- public boolean commit()
- {
- return getConnectorService().getHost().commit();
- }
-
-
-
-} //ServerLauncherImpl \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemHelpers.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemHelpers.java
deleted file mode 100644
index 3ebccf99d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/SubSystemHelpers.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [cleanup] Add API "since" Javadoc tags
- *******************************************************************************/
-
-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 for subsystems.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/IRemoteSystemsProject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/IRemoteSystemsProject.java
deleted file mode 100644
index bee32284c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/IRemoteSystemsProject.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.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.core/src/org/eclipse/rse/internal/core/RSECoreMessages.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreMessages.java
deleted file mode 100644
index ac8d00280..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreMessages.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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 API and implementation
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [184095] combined RSEModelResources and persistence.Messages into this file
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- * David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
- ********************************************************************************/
-package org.eclipse.rse.internal.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class RSECoreMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.core.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, RSECoreMessages.class);
- }
-
- // Model
- public static String RESID_MODELOBJECTS_MODELOBJECT_DESCRIPTION;
- public static String RESID_MODELOBJECTS_REFERENCINGOBJECT_DESCRIPTION;
- 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;
-
- public static String RESID_PROP_SERVERLAUNCHER_MEANS_LABEL;
- public static String RESID_PROP_SERVERLAUNCHER_PATH;
- public static String RESID_PROP_SERVERLAUNCHER_INVOCATION;
- public static String RESID_CONNECTION_DAEMON_PORT_LABEL;
- public static String RESID_CONNECTION_PORT_LABEL;
- public static String RESID_SUBSYSTEM_AUTODETECT_LABEL;
-
- public static String RESID_PROPERTYSET_REMOTE_SERVER_LAUNCHER;
- public static String RESID_PROPERTYSET_LAUNCHER_PROPERTIES;
-
- // Persistence
- public static String PropertyFileProvider_LoadingTaskName;
- public static String PropertyFileProvider_SavingTaskName;
- public static String PropertyFileProvider_UnexpectedException;
- public static String RSEEnvelope_ExportNotSupported;
- public static String RSEEnvelope_IncorrectFormat;
- public static String RSEEnvelope_ModelNotExported;
- public static String RSEPersistenceManager_DeleteProfileJobName;
- public static String SaveRSEDOMJob_SavingProfileJobName;
- public static String SerializingProvider_UnexpectedException;
-
- // Password Persistence Manager
- public static String DefaultSystemType_Label;
-
- // Initialization
- public static String RSELocalConnectionInitializer_localConnectionName;
- public static String InitRSEJob_error_creating_mark;
- public static String InitRSEJob_initializer_ended_in_error;
- public static String InitRSEJob_initializer_failed_to_load;
- public static String InitRSEJob_initializing_rse;
- public static String InitRSEJob_listener_ended_in_error;
-
- // SystemRegistry: Loading Profile Warning Messages - See also ISystemMessages
- public static String MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REFS;
- public static String MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REF;
- public static String MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED; //RSEG1069
- public static String MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED;
- public static String MSG_CREATEHOST_EXCEPTION;
-
- // SystemRegistry: Progress Reporting - See also ISystemMessages
- public static String MSG_COPYCONNECTION_PROGRESS; //RSEG1073
- public static String MSG_COPYFILTERPOOLS_PROGRESS; //RSEG1075
- public static String MSG_COPYSUBSYSTEMS_PROGRESS; //RSEG1081
-
-
- 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;
-
- // yantzi: artemis 6.0, offline messages
- public static String MSG_OFFLINE_CANT_CONNECT;
- public static String MSG_OFFLINE_CANT_CONNECT_DETAILS;
-
- // Connection doesn't exist
- public static String MSG_CONNECTION_DELETED;
-
- private RSECoreMessages() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreRegistry.java
deleted file mode 100644
index 0777a6de7..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSECoreRegistry.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Uwe Stieber (Wind River) - Added system types provider extension.
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- *******************************************************************************/
-package org.eclipse.rse.internal.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-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.osgi.util.NLS;
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSESystemTypeProvider;
-import org.eclipse.rse.core.RSECorePlugin;
-
-/**
- * Singleton class representing the RSE core registry.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RSECoreRegistry implements IRSECoreRegistry {
-
- // the singleton instance
- private static RSECoreRegistry instance = null;
-
- // state variables
- private boolean hasReadSystemTypes;
-
- // model objects
- private IRSESystemType[] systemTypes;
-
- // Cache for accessed system type either by id or by name. Avoids to
- // re-iterate over all registered ones each call again.
- private final Map accessedSystemTypeCache = new HashMap();
-
- // constants
- private static final String ELEMENT_SYTEM_TYPE = "systemType"; //$NON-NLS-1$
-
- /**
- * Constructor.
- */
- private RSECoreRegistry() {
- super();
- }
-
- /**
- * Returns the singleton instance of the registry.
- * @return the singleton instance
- */
- public static final RSECoreRegistry getInstance() {
-
- if (instance == null) {
- instance = new RSECoreRegistry();
- }
-
- return instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSECoreRegistry#getSystemTypes()
- */
- public IRSESystemType[] getSystemTypes() {
-
- if (!hasReadSystemTypes) {
- systemTypes = readSystemTypes();
- hasReadSystemTypes = true;
- }
-
- return systemTypes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSECoreRegistry#getSystemTypeById(java.lang.String)
- */
- public IRSESystemType getSystemTypeById(String systemTypeId) {
- if (systemTypeId != null) {
- IRSESystemType systemType = (IRSESystemType)accessedSystemTypeCache.get(systemTypeId);
- if (systemType == null) {
- // We have to re-lookup the system type
- IRSESystemType[] types = getSystemTypes();
- for (int i = 0; i < types.length && systemType == null; i++) {
- if (types[i].getId().equals(systemTypeId)) {
- systemType = types[i];
- }
- }
- if (systemType != null) accessedSystemTypeCache.put(systemTypeId, systemType);
- }
- return systemType;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSECoreRegistry#getSystemType(java.lang.String)
- */
- public IRSESystemType getSystemType(String name) {
- if (name != null) {
- IRSESystemType systemType = (IRSESystemType)accessedSystemTypeCache.get(name);
- if (systemType == null) {
- // We have to re-lookup the system type
- IRSESystemType[] types = getSystemTypes();
- for (int i = 0; i < types.length && systemType == null; i++) {
- if (types[i].getName().equals(name)) {
- systemType = types[i];
- }
- }
- if (systemType != null) accessedSystemTypeCache.put(name, systemType);
- }
- return systemType;
- }
-
- return null;
- }
-
- /**
- * 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() {
- List types = new LinkedList();
- List typeIds = new ArrayList();
- accessedSystemTypeCache.clear();
-
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // First we take the direct system type contributions via extension point
- IConfigurationElement[] elements = registry.getConfigurationElementsFor(PI_RSE_CORE, PI_SYSTEM_TYPES);
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
-
- if (element.getName().equals(ELEMENT_SYTEM_TYPE)) {
- IRSESystemType type = new RSESystemType(element);
- if (!typeIds.contains(type.getId())) {
- types.add(type);
- typeIds.add(type.getId());
-
- // Build up the cache directly for improving access performance.
- accessedSystemTypeCache.put(type.getId(), type);
- accessedSystemTypeCache.put(type.getName(), type);
-
- String message = "Successfully registered RSE system type ''{0}'' (id = ''{1}'')."; //$NON-NLS-1$
- message = NLS.bind(message, type.getLabel(), type.getId());
- RSECorePlugin.getDefault().getLogger().logInfo(message);
- } else {
- String message = "RSE system type contribution skipped. Non-unique system type id (plugin: {0}, id: {1})."; //$NON-NLS-1$
- message = NLS.bind(message, element.getContributor().getName(), type.getId());
- RSECorePlugin.getDefault().getLogger().logWarning(message);
- }
- }
- }
-
- // check on the IRSESystemTypeProviders now
- elements = registry.getConfigurationElementsFor(PI_RSE_CORE, PI_SYSTEM_TYPES_PROVIDER);
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
- try {
- Object provider = element.createExecutableExtension("class"); //$NON-NLS-1$
- if (provider instanceof IRSESystemTypeProvider) {
- IRSESystemType[] typesForRegistration = ((IRSESystemTypeProvider)provider).getSystemTypesForRegistration();
- if (typesForRegistration == null) continue;
-
- for (int j = 0; j < typesForRegistration.length; j++) {
- IRSESystemType type = typesForRegistration[j];
- if (!typeIds.contains(type.getId())) {
- types.add(type);
- typeIds.add(type.getId());
-
- // Build up the cache directly for improving access performance.
- accessedSystemTypeCache.put(type.getId(), type);
- accessedSystemTypeCache.put(type.getName(), type);
-
- String message = "Successfully registered RSE system type ''{0}'' (id = ''{1}'')."; //$NON-NLS-1$
- message = NLS.bind(message, type.getLabel(), type.getId() );
- RSECorePlugin.getDefault().getLogger().logInfo(message);
- } else {
- String message = "RSE system type contribution skipped. Non-unique system type id (plugin: {0}, id: {1})."; //$NON-NLS-1$
- message = NLS.bind(message, element.getContributor().getName(), type.getId());
- RSECorePlugin.getDefault().getLogger().logWarning(message);
- }
- }
- }
- } catch (CoreException e) {
- String message = "RSE system types provider failed creation (plugin: {0}, id: {1})."; //$NON-NLS-1$
- message = NLS.bind(message, element.getContributor().getName(), element.getDeclaringExtension().getSimpleIdentifier());
- RSECorePlugin.getDefault().getLogger().logError(message, e);
- }
- }
-
- return (IRSESystemType[])types.toArray(new IRSESystemType[types.size()]);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java
deleted file mode 100644
index 05e5f2240..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [197167] adding notification and waiting for RSE model
- * David Dykstal (IBM) - [226728] NPE during init with clean workspace
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * David Dykstal (IBM) = [226958] add status values to waitForInitCompletion(phase)
- * David Dykstal (IBM) - [235581] Initialize RSE should be a daemon job
- ********************************************************************************/
-package org.eclipse.rse.internal.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-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.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.IRSEInitListener;
-import org.eclipse.rse.core.IRSEModelInitializer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.core.model.SystemModelChangeEvent;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-
-/**
- * This is a job named "Initialize RSE". It is instantiated and run during
- * RSE startup. It must not be run at any other time. The job restores the
- * persistent form of the RSE model. Use the extension point
- * org.eclipse.rse.core.modelInitializers to supplement the model once it is
- * restored.
- */
-public final class RSEInitJob extends Job {
-
- /**
- * The name of this job. This is API. Clients may use this name to find this
- * job by name.
- *
- * @deprecated use {@link RSECorePlugin#isInitComplete(int)}
- */
- public final static String NAME = "Initialize RSE"; //$NON-NLS-1$
-
- private static RSEInitJob instance = new RSEInitJob();
-
- private class Phase {
- private volatile boolean isCancelled = false;
- private volatile boolean isComplete = false;
- private IStatus completionStatus = Status.OK_STATUS;
- private int phaseNumber = 0;
- public Phase(int phaseNumber) {
- this.phaseNumber = phaseNumber;
- }
- public synchronized IStatus waitForCompletion() throws InterruptedException {
- while (!isComplete && !isCancelled) {
- wait();
- }
- if (isCancelled) {
- throw new InterruptedException();
- }
- return completionStatus;
- }
- public void done(IStatus status) {
- synchronized (this) {
- isComplete = true;
- completionStatus = status;
- notifyAll();
- }
- notifyListeners(phaseNumber);
- }
- public synchronized void cancel() {
- isCancelled = true;
- completionStatus = Status.CANCEL_STATUS;
- notifyAll();
- }
- public boolean isComplete() {
- return isComplete;
- }
- }
-
- private class MyJobChangeListener implements IJobChangeListener {
- public void aboutToRun(IJobChangeEvent event) {
- }
- public void awake(IJobChangeEvent event) {
- }
- public void done(IJobChangeEvent event) {
- IStatus status = event.getJob().getResult();
- if (status.getSeverity() == IStatus.CANCEL) {
- if (!modelPhase.isComplete()) {
- modelPhase.cancel();
- }
- if (!initializerPhase.isComplete()) {
- initializerPhase.cancel();
- }
- finalPhase.cancel();
- } else {
- finalPhase.done(status);
- }
- }
- public void running(IJobChangeEvent event) {
- }
- public void scheduled(IJobChangeEvent event) {
- }
- public void sleeping(IJobChangeEvent event) {
- }
- }
-
- private Phase finalPhase = new Phase(RSECorePlugin.INIT_ALL);
- private Phase modelPhase = new Phase(RSECorePlugin.INIT_MODEL);
- private Phase initializerPhase = new Phase(RSECorePlugin.INIT_INITIALIZER);
- private List listeners = new ArrayList(10);
- private Logger logger = RSECorePlugin.getDefault().getLogger();
- private MyJobChangeListener myJobChangeListener = new MyJobChangeListener();
-
-
- /**
- * Returns the singleton instance of this job.
- * @return the InitRSEJob instance for this workbench.
- */
- public static RSEInitJob getInstance() {
- return instance;
- }
-
- private RSEInitJob() {
- super(NAME);
- setSystem(true);
- addJobChangeListener(myJobChangeListener);
- }
-
- /**
- * Adds a new listener to the set of listeners to be notified when initialization phases complete.
- * If the listener is added after the phase has completed it will not be invoked.
- * If the listener is already in the set it will not be added again.
- * Listeners may be notified in any order.
- * @param listener the listener to be added
- */
- public void addInitListener(IRSEInitListener listener) {
- synchronized (listeners) {
- listeners.add(listener);
- }
- }
-
- /**
- * Removes a listener to the set of listeners to be notified when phases complete.
- * If the listener is not in the set this does nothing.
- * @param listener the listener to be removed
- */
- public void removeInitListener(IRSEInitListener listener) {
- synchronized (listeners) {
- listeners.remove(listener);
- }
- }
-
- /**
- * Notify all registered listeners of a phase completion
- * @param phase the phase just completed.
- */
- private void notifyListeners(int phase) {
- IRSEInitListener[] myListeners = new IRSEInitListener[listeners.size()];
- synchronized (listeners) {
- listeners.toArray(myListeners);
- }
- for (int i = 0; i < myListeners.length; i++) {
- IRSEInitListener listener = myListeners[i];
- try {
- listener.phaseComplete(phase);
- } catch (RuntimeException e) {
- logger.logError(RSECoreMessages.InitRSEJob_listener_ended_in_error, e);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus run(IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- // restore profiles
- RSECorePlugin.getThePersistenceManager().restoreProfiles(5000);
- ISystemProfile defaultProfile = SystemProfileManager.getDefault().getDefaultPrivateSystemProfile();
- ISystemModelChangeEvent event = new SystemModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ALL_RELOADED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE, defaultProfile);
- RSECorePlugin.getTheSystemRegistry().fireEvent(event);
- modelPhase.done(result);
- // instantiate and run initializers
- IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.rse.core.modelInitializers"); //$NON-NLS-1$
- monitor.beginTask(RSECoreMessages.InitRSEJob_initializing_rse, elements.length);
- for (int i = 0; i < elements.length && !monitor.isCanceled(); i++) {
- IConfigurationElement element = elements[i];
- IProgressMonitor submonitor = new SubProgressMonitor(monitor, 1);
- String initializerType = element.getAttribute("type"); //$NON-NLS-1$
- boolean isMarked = isMarked(element);
- boolean isSessionType = initializerType == null || initializerType.equals("session"); //$NON-NLS-1$
- boolean isWorkspaceType = initializerType != null && initializerType.equals("workspace"); //$NON-NLS-1$
- if (isSessionType || (isWorkspaceType && !isMarked)) {
- IStatus status = runInitializer(element, submonitor);
- if (status.getSeverity() < IStatus.ERROR && isWorkspaceType) {
- mark(element);
- }
- if (result.getSeverity() < status.getSeverity()) {
- result = status;
- }
- }
- submonitor.done();
- }
-
- // set the default encoding provider
- SystemEncodingUtil encodingUtil = SystemEncodingUtil.getInstance();
- encodingUtil.setDefaultEncodingProvider(
- new SystemEncodingUtil.DefaultEncodingProvider(){
- public String getLocalDefaultEncoding() {
- return ResourcesPlugin.getEncoding();
- }
- });
-
- initializerPhase.done(result);
- // finish up - propogate cancel if necessary
- if (monitor.isCanceled()) {
- result = Status.CANCEL_STATUS;
- } else {
- monitor.done();
- }
- return result;
- }
-
- /**
- * Returns a handle to a mark file based on the initializer class name.
- * @param element the element that defines the initializer
- * @return a handle to a file in the state location of this plugin
- */
- private File getMarkFile(IConfigurationElement element) {
- String initializerName = element.getAttribute("class"); //$NON-NLS-1$
- String markName = initializerName + ".mark"; //$NON-NLS-1$
- IPath stateLocation = RSECorePlugin.getDefault().getStateLocation();
- IPath marksLocation = stateLocation.append("initializerMarks"); //$NON-NLS-1$
- IPath markPath = marksLocation.append(markName);
- File markFile = new File(markPath.toOSString());
- return markFile;
- }
-
- /**
- * @param element the element to test for marking
- * @return true if the element is marked
- */
- private boolean isMarked(IConfigurationElement element) {
- File markFile = getMarkFile(element);
- return markFile.exists();
- }
-
- /**
- * @param element the element to mark
- * @return a status indicating if the marking was successful
- */
- private IStatus mark(IConfigurationElement element) {
- IStatus status = Status.OK_STATUS;
- File markFile = getMarkFile(element);
- File markFolder = markFile.getParentFile();
- try {
- markFolder.mkdirs();
- markFile.createNewFile();
- } catch (IOException e) {
- String message = NLS.bind(RSECoreMessages.InitRSEJob_error_creating_mark, markFile.getPath());
- status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, message, e);
- logger.logError(message, e);
- }
- return status;
- }
-
- /**
- * Instantiate and run an initializer
- * @param element the configuration element from which to instantiate the initializer
- * @param submonitor the monitor with which to run the initializer
- * @return the status of this initializer
- */
- private IStatus runInitializer(IConfigurationElement element, IProgressMonitor submonitor) {
- IStatus status = Status.OK_STATUS;
- String initializerName = element.getAttribute("class"); //$NON-NLS-1$
- try {
- IRSEModelInitializer initializer = (IRSEModelInitializer) element.createExecutableExtension("class"); //$NON-NLS-1$
- try {
- status = initializer.run(submonitor);
- } catch (RuntimeException e) {
- String message = NLS.bind(RSECoreMessages.InitRSEJob_initializer_ended_in_error, initializerName);
- logger.logError(message, e);
- status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, message, e);
- }
- } catch (CoreException e) {
- String message = NLS.bind(RSECoreMessages.InitRSEJob_initializer_failed_to_load, initializerName);
- logger.logError(message, e);
- status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, message, e);
- }
- return status;
- }
-
- /**
- * Waits until a job is completed.
- * @return the status of the job upon its completion.
- * @throws InterruptedException if the job is interrupted while waiting.
- */
- public IStatus waitForCompletion() throws InterruptedException {
- waitForCompletion(RSECorePlugin.INIT_ALL);
- return getResult();
- }
-
- /**
- * Wait for the completion of a particular phase
- * @param phase the phase to wait for
- * @return the completion status for that phase.
- * @see RSECorePlugin#INIT_ALL
- * @see RSECorePlugin#INIT_MODEL
- * @see RSECorePlugin#INIT_INITIALIZER
- */
- public IStatus waitForCompletion(int phase) throws InterruptedException {
- IStatus result = Status.OK_STATUS;
- switch (phase) {
- case RSECorePlugin.INIT_MODEL:
- result = modelPhase.waitForCompletion();
- break;
- case RSECorePlugin.INIT_INITIALIZER:
- result = initializerPhase.waitForCompletion();
- break;
- case RSECorePlugin.INIT_ALL:
- result = finalPhase.waitForCompletion();
- break;
- default:
- throw new IllegalArgumentException("undefined phase"); //$NON-NLS-1$
- }
- return result;
- }
-
- /**
- * @param phase the phase for which completion is requested.
- * Phases are defined in {@link RSECorePlugin}.
- * @return true if this phase has completed.
- * @throws IllegalArgumentException if the phase is undefined.
- * @see RSECorePlugin#INIT_ALL
- * @see RSECorePlugin#INIT_MODEL
- * @see RSECorePlugin#INIT_INITIALIZER
- */
- public boolean isComplete(int phase) {
- boolean result = false;
- switch (phase) {
- case RSECorePlugin.INIT_MODEL:
- result = modelPhase.isComplete();
- break;
- case RSECorePlugin.INIT_INITIALIZER:
- result = initializerPhase.isComplete();
- break;
- case RSECorePlugin.INIT_ALL:
- result = finalPhase.isComplete();
- break;
- default:
- throw new IllegalArgumentException("undefined phase"); //$NON-NLS-1$
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSELocalConnectionInitializer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSELocalConnectionInitializer.java
deleted file mode 100644
index 5a4d19c51..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSELocalConnectionInitializer.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [197167] adding initializer support to startup
- * David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile
- ********************************************************************************/
-package org.eclipse.rse.internal.core;
-
-import java.io.File;
-
-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.rse.core.IRSEModelInitializer;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-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;
-
-public class RSELocalConnectionInitializer implements IRSEModelInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSEModelInitializer#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus run(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- // look for the old style mark
- IPath pluginState = RSECorePlugin.getDefault().getStateLocation();
- IPath markPath = pluginState.append("localHostCreated.mark"); //$NON-NLS-1$
- File markFile = new File(markPath.toOSString());
- boolean markExists = markFile.exists();
- if (!markExists) {
- // create a local host object only if an old style mark does not exist
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfileManager profileManager = RSECorePlugin.getTheSystemProfileManager();
- ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile();
- String localConnectionName = RSECoreMessages.RSELocalConnectionInitializer_localConnectionName;
- IHost localHost = registry.getHost(profile, localConnectionName);
- if (localHost == null && RSEPreferencesManager.getCreateLocalConnection()) {
- // create the connection only if the local system type is enabled
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
- if (systemType != null && systemType.isEnabled()) {
- String userName = System.getProperty("user.name"); //$NON-NLS-1$
- registry.createLocalHost(profile, localConnectionName, userName);
- }
- }
- }
- monitor.done();
- return status;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEPreferenceInitializer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEPreferenceInitializer.java
deleted file mode 100644
index c8e4acec5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEPreferenceInitializer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.core;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.rse.core.IRSEPreferenceNames;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-
-public class RSEPreferenceInitializer extends AbstractPreferenceInitializer {
-
- public void initializeDefaultPreferences() {
- // the complex preferences
- RSEPreferencesManager.initDefaults();
-
- // the simple preferences
- Preferences prefs = RSECorePlugin.getDefault().getPluginPreferences();
- // The ID of the default persistence provider
- prefs.setDefault(IRSEPreferenceNames.DEFAULT_PERSISTENCE_PROVIDER, "org.eclipse.rse.persistence.MetadataPropertyFileProvider"); //$NON-NLS-1$
- // whether or not to create a local connection in a fresh workspace
- prefs.setDefault(IRSEPreferenceNames.CREATE_LOCAL_CONNECTION, true);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSESystemType.java
deleted file mode 100644
index 9ba79a277..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSESystemType.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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:
- * Uwe Stieber (Wind River) - Dynamic system type provider extension.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- ********************************************************************************/
-package org.eclipse.rse.internal.core;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.IRSESystemTypeConstants;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.AbstractRSESystemType;
-
-/**
- * Class representing a system type statically contributed through plugin.xml.
- */
-public class RSESystemType extends AbstractRSESystemType {
-
- 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_LABEL = "label"; //$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$
- private static final String ATTR_SUBSYSTEMCONFIGURATIONS = "subsystemConfigurationIds"; //$NON-NLS-1$
-
- private String[] subsystemConfigurationIds;
-
- /**
- * Constructor for an object representing a system type.
- * @param element the configuration element describing the system type
- */
- public RSESystemType(IConfigurationElement element) {
- super();
- id = element.getAttribute(ATTR_ID);
- name = element.getAttribute(ATTR_NAME);
- if (id==null) {
- RSECorePlugin.getDefault().getLogger().logWarning("RSE: System Type \""+name+"\" does not define an ID"); //$NON-NLS-1$ //$NON-NLS-2$
- //Fallback: use the name as ID. When PDE was used to define the
- //extension, this should never happen since ID is marked as a
- //required attribute.
- id = name;
- }
- label = element.getAttribute(ATTR_LABEL);
- 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());
-
- List subsystemConfigs = new LinkedList();
- String attribute = element.getAttribute(ATTR_SUBSYSTEMCONFIGURATIONS);
- if (attribute != null) {
- // split the list of subsystem configuration ids.
- String[] splitted = attribute.split(";"); //$NON-NLS-1$
- // normalize the list of subsystem configuration ids
- for (int i = 0; i < splitted.length; i++) {
- subsystemConfigs.add(splitted[i].trim());
- }
- }
- subsystemConfigurationIds = (String[])subsystemConfigs.toArray(new String[subsystemConfigs.size()]);
- }
-
- /**
- * 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);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSESystemType#getSubsystemConfigurationIds()
- */
- public String[] getSubsystemConfigurationIds() {
- return subsystemConfigurationIds;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RemoteSystemsProject.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RemoteSystemsProject.java
deleted file mode 100644
index db9b03f1b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RemoteSystemsProject.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.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;
-import org.eclipse.rse.core.RSECorePlugin;
-
-
-/**
- * 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)
- {
- RSECorePlugin.getDefault().getLogger().logInfo("Inside setProject"); //$NON-NLS-1$
- fProject= project;
- }
- /**
- * Configure the project with Java nature.
- */
- public void configure() throws CoreException
- {
- RSECorePlugin.getDefault().getLogger().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.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java
deleted file mode 100644
index 74ae1dd37..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/SystemResourceConstants.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - removed RESOURCE_TEAMPROFILE_NAME
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core;
-
-/**
- * Constants related to project and folder names.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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$
-
-
- // yantzi: artemis 6.0, offline messages
- public static final String MSG_OFFLINE_CANT_CONNECT = "RSEC3001"; //$NON-NLS-1$
- // Connection doesn't exist
- public static final String MSG_CONNECTION_DELETED = "RSEF5011"; //$NON-NLS-1$
-
- 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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/HostOwnedFilterPoolPattern.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/HostOwnedFilterPoolPattern.java
deleted file mode 100644
index c5c533f29..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/HostOwnedFilterPoolPattern.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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.
- * David Dykstal (IBM) - [233876] filters lost after restart
- *********************************************************************************/
-package org.eclipse.rse.internal.core.filters;
-
-/**
- * This is a utility class used for manipulating host-owned filter pool names.
- */
-public class HostOwnedFilterPoolPattern {
-
- final private static String prefix = "CN-"; //$NON-NLS-1$
- final private static int start = prefix.length();
- private String suffix;
-
- /**
- * Create a pattern given a subsystem configuration id
- * @param configurationId the id from which to construct the pattern.
- */
- public HostOwnedFilterPoolPattern(String configurationId) {
- suffix = "-" + configurationId; //$NON-NLS-1$
- }
-
- /**
- * Test a filter pool name to see if it matches this pattern
- * @param filterPoolName The filter pool name to test.
- * @return true if the pattern matches this name, false otherwise.
- */
- public boolean matches(String filterPoolName) {
- return (filterPoolName.startsWith(prefix) && filterPoolName.endsWith(suffix));
- }
-
- /**
- * Extract the host name from the filter pool name
- * @param filterPoolName the name of the filter pool
- * @return the associated host name
- */
- public String extract(String filterPoolName) {
- String result = null;
- if (matches(filterPoolName)) {
- int length = filterPoolName.length() - (prefix.length() + suffix.length());
- result = filterPoolName.substring(start, start + length);
- }
- return result;
- }
-
- /**
- * Construct a filter pool name from the host name
- * @param hostName the host name to use as a base
- * @return the associated filter pool name
- */
- public String make(String hostName) {
- return prefix + hostName + suffix;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/ISystemFilterConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/ISystemFilterConstants.java
deleted file mode 100644
index a4857eb71..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/ISystemFilterConstants.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - removing extension of ISystemFilterSavePolicies
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-/**
- * Constants used throughout filters framework.
- */
-public interface ISystemFilterConstants {
- /**
- * 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/internal/core/filters/SystemFilter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilter.java
deleted file mode 100644
index a14784d5b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilter.java
+++ /dev/null
@@ -1,952 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [206901] fixing ArrayStoreException in getPersistableChildren
- * Removed caching that was here because of previous EMF/MOF implementation. This makes
- * the class simpler.
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-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;
-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.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.references.SystemReferencedObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-
-/**
- * A filter is an encapsulation of a unique name, and a list of filter strings.
- * Filters can be referenced.
- */
-public class SystemFilter extends SystemReferencedObject implements ISystemFilter, IAdaptable {
-
- private SystemFilterContainerCommonMethods helpers = null;
- private ISystemFilterPool parentPool = null;
- private List filterStrings = new ArrayList(3);
- private String name = null;
- private String type = null;
- private boolean supportsNestedFilters = false;
- private int relativeOrder = 0;
- private boolean default_ = false;
- private boolean stringsCaseSensitive = false;
- private boolean promptable = false;
- private boolean supportsDuplicateFilterStrings = false;
- private boolean nonDeletable = false;
- private boolean nonRenamable = false;
- private boolean nonChangable = false;
- private boolean stringsNonChangable = false;
- private int release = 0;
- private boolean singleFilterStringOnly = false;
- private List nestedFilters = new ArrayList(3);
- private ISystemFilter _parentFilter;
-
- /**
- * Constructor.
- */
- 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.
- */
- private List internalGetFilters() {
- return nestedFilters;
- }
-
- /**
- * 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.
- * 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, String[] 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() {
- 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()); name is not cloned, we assume the target filter already has a name
- 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.
- */
- 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 String[] getSystemFilterNames() {
- List filters = internalGetFilters();
- List names = helpers.getSystemFilterNames(filters);
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- /**
- * 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 aliasName 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);
- }
- }
- }
-
- /**
- * 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();
- }
-
- /**
- * Returns the filter strings of this filter as an array of String objects.
- * The array may be empty but will not be null.
- */
- public String[] getFilterStrings() {
- ISystemFilterString[] filterStrings = getSystemFilterStrings();
- String[] result = new String[filterStrings.length];
- for (int i = 0; i < filterStrings.length; i++) {
- ISystemFilterString filterString = filterStrings[i];
- result[i] = filterString.getString();
- }
- return result;
- }
-
- /**
- * Return how many filter strings are defined in this filter.
- */
- public int getFilterStringCount() {
- return filterStrings.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) {
- filterStrings.clear();
- for (Iterator z = newStrings.iterator(); z.hasNext();) {
- String newString = (String) z.next();
- ISystemFilterString filterString = createFilterString(newString);
- filterStrings.add(filterString);
- }
- setDirty(true);
- }
-
- /**
- * Get this filter's filter string objects as an array.
- */
- public ISystemFilterString[] getSystemFilterStrings() {
- ISystemFilterString[] result = new ISystemFilterString[filterStrings.size()];
- filterStrings.toArray(result);
- return result;
- }
-
- /**
- * Set all the filter strings for this filter.
- * @param newStrings array of String objects
- */
- public void setFilterStrings(String newStrings[]) {
- filterStrings.clear();
- for (int idx = 0; idx < newStrings.length; idx++) {
- ISystemFilterString filterString = createFilterString(newStrings[idx]);
- filterStrings.add(filterString);
- }
- setDirty(true);
- }
-
- /**
- * Returns a system filter string created from a string.
- * @param string
- * @return
- */
- private ISystemFilterString createFilterString(String string) {
- ISystemFilterString filterstring = new SystemFilterString();
- filterstring.setString(string);
- filterstring.setParentSystemFilter(this);
- return filterstring;
- }
-
- /**
- * Append a new filter string to this filter's list
- */
- public ISystemFilterString addFilterString(String newString) {
- ISystemFilterString newFilterString = createFilterString(newString);
- filterStrings.add(newFilterString);
- setDirty(true);
- 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) {
- ISystemFilterString newFilterString = createFilterString(newString);
- filterStrings.add(position, newFilterString);
- setDirty(true);
- 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) {
- ISystemFilterString match = null;
- Iterator i = filterStrings.iterator();
- while ((match == null) && (i.hasNext())) {
- ISystemFilterString currstring = (ISystemFilterString) i.next();
- if (currstring.getString().equals(oldString)) match = currstring;
- }
- if (match != null) {
- filterStrings.remove(match);
- setDirty(true);
- }
- 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) {
- ISystemFilterString filterString = null;
- if (position < filterStrings.size()) {
- filterString = (ISystemFilterString) filterStrings.remove(position);
- setDirty(true);
- }
- 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) {
- boolean removed = filterStrings.remove(filterString);
- if (removed) {
- setDirty(true);
- }
- return removed;
- }
-
- /**
- * Move a given filter string to a given zero-based location
- */
- public void moveSystemFilterString(int pos, ISystemFilterString filterString) {
- boolean removed = filterStrings.remove(filterString);
- if (removed) {
- filterStrings.add(pos, filterString);
- 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);
- }
-
- /**
- * Return the children of this filter.
- * This is all nested filters and all filter strings.
- */
- public Object[] getChildren() {
- String[] strings = getFilterStrings();
- ISystemFilter[] filters = getSystemFilters();
- Vector vChildren = new Vector();
-
- // start with nested filters...
- for (int idx = 0; idx < filters.length; idx++) {
- vChildren.addElement(filters[idx]);
- }
- // continue with resolved filter string objects...
- for (int idx = 0; idx < strings.length; idx++) {
- String filterString = strings[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 (filterStrings.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;
- }
-
- /*-------------------
- * Attribute getters and setters
- *-------------------*/
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.RSEModelObject#getDescription()
- */
- public String getDescription() {
- return RSECoreMessages.RESID_MODELOBJECTS_FILTER_DESCRIPTION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setName(java.lang.String)
- */
- public void setName(String newName) {
- name = newName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setType(java.lang.String)
- */
- public void setType(String newType) {
- type = newType;
- setDirty(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isSupportsNestedFilters()
- */
- public boolean isSupportsNestedFilters() {
- return supportsNestedFilters;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setSupportsNestedFilters(boolean)
- */
- public void setSupportsNestedFilters(boolean newSupportsNestedFilters) {
- boolean oldSupportsNestedFilters = supportsNestedFilters;
- if (oldSupportsNestedFilters != newSupportsNestedFilters) {
- supportsNestedFilters = newSupportsNestedFilters;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder()
- */
- public int getRelativeOrder() {
- return relativeOrder;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setRelativeOrder(int)
- */
- public void setRelativeOrder(int newRelativeOrder) {
- relativeOrder = newRelativeOrder;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isDefault()
- */
- public boolean isDefault() {
- return default_;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setDefault(boolean)
- */
- public void setDefault(boolean newDefault) {
- default_ = newDefault;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setStringsCaseSensitive(boolean)
- */
- public void setStringsCaseSensitive(boolean newStringsCaseSensitive) {
- boolean oldStringsCaseSensitive = stringsCaseSensitive;
- if (oldStringsCaseSensitive != newStringsCaseSensitive) {
- stringsCaseSensitive = newStringsCaseSensitive;
- setDirty(true);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#unsetStringsCaseSensitive()
- */
- public void unsetStringsCaseSensitive() {
- if (stringsCaseSensitive) {
- stringsCaseSensitive = false;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isSetStringsCaseSensitive()
- */
- public boolean isSetStringsCaseSensitive() {
- return stringsCaseSensitive;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isPromptable()
- */
- public boolean isPromptable() {
- return promptable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setPromptable(boolean)
- */
- public void setPromptable(boolean newPromptable) {
- promptable = newPromptable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getParentFilter()
- */
- public ISystemFilter getParentFilter() {
- return _parentFilter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setParentFilter(org.eclipse.rse.core.filters.ISystemFilter)
- */
- public void setParentFilter(ISystemFilter newParentFilter) {
- _parentFilter = newParentFilter;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getNestedFilters()
- */
- public ISystemFilter[] getNestedFilters() {
- if (nestedFilters == null) {
- nestedFilters = new ArrayList();
- }
- ISystemFilter[] result = new ISystemFilter[nestedFilters.size()];
- nestedFilters.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getStrings()
- */
- public ISystemFilterString[] getStrings() {
- ISystemFilterString[] result = new ISystemFilterString[filterStrings.size()];
- filterStrings.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isSupportsDuplicateFilterStrings()
- */
- public boolean isSupportsDuplicateFilterStrings() {
- return supportsDuplicateFilterStrings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setSupportsDuplicateFilterStrings(boolean)
- */
- public void setSupportsDuplicateFilterStrings(boolean newSupportsDuplicateFilterStrings) {
- boolean oldSupportsDuplicateFilterStrings = supportsDuplicateFilterStrings;
- if (oldSupportsDuplicateFilterStrings != newSupportsDuplicateFilterStrings) {
- supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isNonDeletable()
- */
- public boolean isNonDeletable() {
- return nonDeletable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setNonDeletable(boolean)
- */
- public void setNonDeletable(boolean newNonDeletable) {
- nonDeletable = newNonDeletable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isNonRenamable()
- */
- public boolean isNonRenamable() {
- return nonRenamable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setNonRenamable(boolean)
- */
- public void setNonRenamable(boolean newNonRenamable) {
- nonRenamable = newNonRenamable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isNonChangable()
- */
- public boolean isNonChangable() {
- return nonChangable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setNonChangable(boolean)
- */
- public void setNonChangable(boolean newNonChangable) {
- nonChangable = newNonChangable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isStringsNonChangable()
- */
- public boolean isStringsNonChangable() {
- return stringsNonChangable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setStringsNonChangable(boolean)
- */
- public void setStringsNonChangable(boolean newStringsNonChangable) {
- boolean oldStringsNonChangable = stringsNonChangable;
- if (oldStringsNonChangable != newStringsNonChangable) {
- stringsNonChangable = newStringsNonChangable;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getRelease()
- */
- public int getRelease() {
- return release;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setRelease(int)
- */
- public void setRelease(int newRelease) {
- release = newRelease;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly()
- */
- public boolean isSingleFilterStringOnly() {
- if (isSetSingleFilterStringOnly())
- return singleFilterStringOnly;
- else
- return getSystemFilterPool().isSingleFilterStringOnly();
- }
-
- /**
- * @deprecated - no longer used
- */
- public boolean isSingleFilterStringOnlyGen() {
- return singleFilterStringOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setSingleFilterStringOnly(boolean)
- */
- public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) {
- boolean oldSingleFilterStringOnly = singleFilterStringOnly;
- if (oldSingleFilterStringOnly != newSingleFilterStringOnly) {
- singleFilterStringOnly = newSingleFilterStringOnly;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#unsetSingleFilterStringOnly()
- */
- public void unsetSingleFilterStringOnly() {
- if (singleFilterStringOnly) {
- singleFilterStringOnly = false;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#isSetSingleFilterStringOnly()
- */
- public boolean isSetSingleFilterStringOnly() {
- return singleFilterStringOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#setSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public void setSubSystem(ISubSystem subsystem) {
- // does nothing this is not a transient filter
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilter#getSubSystem()
- */
- public Object getSubSystem() {
- return null; // since this is not a transient filter
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- ISystemProfile profile = getSystemFilterPoolManager().getSystemProfile();
- boolean result = profile.commit();
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
- */
- public IRSEPersistableContainer getPersistableParent() {
- IRSEPersistableContainer result = getParentFilterContainer();
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
- */
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = new ArrayList(20);
- children.addAll(nestedFilters);
- children.addAll(filterStrings);
- children.addAll(Arrays.asList(getPropertySets()));
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerCommonMethods.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerCommonMethods.java
deleted file mode 100644
index 4275879db..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerCommonMethods.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Kevin Doyle (IBM) - [190445] moveSystemFilter now reorganizes the list of filters
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-import java.util.Iterator;
-import java.util.Vector;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.logging.Logger;
-
-/**
- * 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, String[] 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, String[] 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$
- RSECorePlugin.getDefault().getLogger().logError(msg, null);
- 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, String[] filterStrings) {
- ISystemFilter newFilter = null;
- try {
- newFilter = new SystemFilter();
- // FIXME getMOFfactory().createSystemFilter();
- newFilter.setRelease(RSECorePlugin.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) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.logError("Error creating filter: " + e.getClass().getName() + ": " + e.getMessage(), null); //$NON-NLS-1$ //$NON-NLS-2$
- logger.logError("...Alias name.: " + aliasName, null); //$NON-NLS-1$
- }
- 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 newStrings 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 newStrings 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.getFilterStrings());
- 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.getFilterStrings());
- 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) {
- filters.remove(filter);
- filters.add(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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerReferenceCommonMethods.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerReferenceCommonMethods.java
deleted file mode 100644
index b6b055e70..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterContainerReferenceCommonMethods.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.core.filters;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-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.filters.SystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * 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 List filterReferences = new ArrayList(10);
-
- /**
- * Constructor
- * @param parentRef the object we are helping.
- */
- public SystemFilterContainerReferenceCommonMethods(ISystemFilterContainerReference parentRef) {
- super();
- this.parentRef = parentRef;
- }
-
- /**
- * 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() {
- List filters = getFiltersFromParent();
- int count = filters.size();
- return count;
- }
-
- /**
- * Get the list of nested filters referenced by this ISystemFilterContainerReference.
- */
- public List getSystemFilterReferences(ISubSystem subSystem) {
- generateSystemFilterReferences(subSystem);
- return filterReferences;
- }
-
- /**
- * Refreshes the list of filter references.
- * @param subSystem
- */
- private void generateSystemFilterReferences(ISubSystem subSystem) {
- List filters = getFiltersFromParent();
- if (mustGenerate(filters)) {
- generateFilterReferences(subSystem, filters);
- }
- }
-
- /**
- * Determine if the list of filter references is stale.
- */
- private boolean mustGenerate(List filters) {
- boolean result = true;
- List referencedFilters = getReferencedFilters();
- if (filters.size() == referencedFilters.size()) {
- int n = filters.size();
- int i = 0;
- result = false;
- while (i < n && result == false) {
- ISystemFilter filter = (ISystemFilter) filters.get(i);
- ISystemFilter referencedFilter = (ISystemFilter) referencedFilters.get(i);
- if (filter != referencedFilter) {
- result = true;
- }
- i++;
- }
- }
- return result;
- }
-
- /**
- * @return the list of currently referenced filters
- */
- private List getReferencedFilters() {
- List result = new ArrayList(filterReferences.size());
- for (Iterator z = filterReferences.iterator(); z.hasNext();) {
- ISystemFilterReference reference = (ISystemFilterReference) z.next();
- result.add(reference.getReferencedFilter());
- }
- return result;
- }
-
- /**
- * Generate references to the filters in the list.
- * Attempt to preserve existing references where they are available.
- */
- private void generateFilterReferences(ISubSystem subSystem, List filters) {
- List referencedFilters = getReferencedFilters();
- List newReferences = new ArrayList(filters.size());
- for (Iterator z = filters.iterator(); z.hasNext();) {
- ISystemFilter filter = (ISystemFilter) z.next();
- int i = referencedFilters.indexOf(filter);
- ISystemFilterReference reference = (i >= 0) ? (ISystemFilterReference) filterReferences.get(i) : generateFilterReference(subSystem, filter);
- newReferences.add(reference);
- }
- filterReferences = newReferences;
- }
-
- /**
- * Create a single filter refererence
- */
- private ISystemFilterReference generateFilterReference(ISubSystem subSystem, ISystemFilter filter) {
- ISystemFilterReference result = SystemFilterReference.createSystemFilterReference(subSystem, parentRef, filter, SystemFilterReference.PERSISTENT_NO);
- return result;
- }
-
- /**
- * 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) {
- generateSystemFilterReferences(subSystem);
- ISystemFilterReference reference = getExistingSystemFilterReference(subSystem, filter);
- if (reference == null) {
- reference = generateFilterReference(subSystem, filter);
- filterReferences.add(reference);
- }
- return reference;
- }
-
- /**
- * 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 result = null;
- for (Iterator z = filterReferences.iterator(); z.hasNext() && result == null;) {
- ISystemFilterReference reference = (ISystemFilterReference) z.next();
- if (reference.getReferencedFilter() == filter && reference.getSubSystem() == subSystem) {
- result = reference;
- }
- }
- return result;
- }
-
- /**
- * @return a list of ISystemFilter objects.
- */
- private List getFiltersFromParent() {
- ISystemFilterContainer parent = parentRef.getReferencedSystemFilterContainer();
- ISystemFilter[] filters = null;
- if (parent instanceof ISystemFilterPool) {
- filters = ((ISystemFilterPool) parent).getFilters();
- } else if (parent instanceof ISystemFilter) {
- filters = ((ISystemFilter) parent).getNestedFilters();
- } else {
- filters = new ISystemFilter[0];
- }
- List result = Arrays.asList(filters);
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPool.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPool.java
deleted file mode 100644
index e8fadb73a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPool.java
+++ /dev/null
@@ -1,995 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - removing implementation of ISystemFilterSavePolicies, ISystemFilterConstants
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-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.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.internal.references.SystemPersistableReferencedObject;
-
-
-/**
- * A system filter pool is a means of grouping filters and managing them as a
- * list.
- * <p>
- * To enable filters themselves to be autonomous 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.
- */
-public class SystemFilterPool extends SystemPersistableReferencedObject
- implements ISystemFilterPool, IAdaptable
-{
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- *
- * @see #getName()
- */
- protected static final String NAME_EDEFAULT = null;
-
- private String name;
-
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- *
- * @see #getType()
- */
- protected static final String TYPE_EDEFAULT = 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.
- * @see #isSupportsNestedFilters()
- */
- 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.
- * @see #isDeletable()
- */
- 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.
- * @see #isDefault()
- */
-
- 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.
- * @see #isStringsCaseSensitive()
- */
- 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.
- */
- protected boolean stringsCaseSensitiveESet = false;
-
- /**
- * The default value of the '{@link #isSupportsDuplicateFilterStrings() <em>Supports Duplicate Filter Strings</em>}' attribute.
- * @see #isSupportsDuplicateFilterStrings()
- */
- 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.
- * @see #getRelease()
- */
- 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.
- * @see #isSingleFilterStringOnly()
- */
- protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * @see #isSingleFilterStringOnly()
- */
- protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
-
- /**
- * This is true if the Single Filter String Only attribute has been set.
- */
- protected boolean singleFilterStringOnlyESet = false;
-
- /**
- * The default value of the '{@link #getOwningParentName() <em>Owning Parent Name</em>}' attribute.
- * @see #getOwningParentName()
- */
- protected static final String OWNING_PARENT_NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getOwningParentName() <em>Owning Parent Name</em>}' attribute.
- * @see #getOwningParentName()
- */
- protected String owningParentName = OWNING_PARENT_NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #isNonRenamable() <em>Non Renamable</em>}' attribute.
- * @see #isNonRenamable()
- */
- protected static final boolean NON_RENAMABLE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isNonRenamable() <em>Non Renamable</em>}' attribute.
- * @see #isNonRenamable()
- */
- protected boolean nonRenamable = NON_RENAMABLE_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected List filters = new ArrayList(10);
-
- /**
- * Default constructor
- */
- public SystemFilterPool(String poolName, boolean allowNestedFilters, boolean isDeletable)
- {
- super();
- helpers = new SystemFilterContainerCommonMethods();
- setRelease(RSECorePlugin.CURRENT_RELEASE);
- if (!initialized) {
- initialize(poolName);
- }
- setDeletable(isDeletable); // mof attribute
- setSupportsNestedFilters(allowNestedFilters); // cascades to each filter
- }
-
- /*
- * Private helper method to core initialization, from either createXXX or restore.
- */
- protected void initialize(String name)
- {
- setName(name); // mof attribute
- initialized = true;
- }
-
-
- protected List internalGetFilters()
- {
- return filters;
- }
-
- /**
- * 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 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);
- }
-
- /**
- * @param newSupportsNestedFilters
- */
- private 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);
- }
-
- /**
- * @param newSupportsDuplicateFilterStrings
- */
- private 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);
- }
-
- private 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 RSECoreMessages.RESID_MODELOBJECTS_FILTERPOOL_DESCRIPTION;
- }
-
- /**
- * Set the name of this filter pool.
- */
- public void setName(String name)
- {
- if (name.indexOf(SystemFilterPoolReference.DELIMITER) >= 0) {
- throw new IllegalArgumentException("Cannot have ___ in filter pool 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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#isDeletable()
- */
- public boolean isDeletable()
- {
- return deletable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#setDeletable(boolean)
- */
- public void setDeletable(boolean newDeletable)
- {
- deletable = newDeletable;
- setDirty(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#isDefault()
- */
- public boolean isDefault()
- {
- return default_;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#setDefault(boolean)
- */
- 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, String[] 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 String[] getSystemFilterNames()
- {
- List filters = internalGetFilters();
- List names = helpers.getSystemFilterNames(filters);
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- /**
- * 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 aliasName 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);
- }
-
- /**
- * 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)
- {
- ISystemFilter[] filterArray = new ISystemFilter[names.length];
- for (int idx=0; idx<filterArray.length; idx++)
- filterArray[idx] = getSystemFilter(names[idx]); // convert name to filter
- filters.clear();
- for (int idx=0; idx<filterArray.length; idx++)
- {
- filters.add(filterArray[idx]);
- }
- helpers.invalidateCache();
- }
-
-
- // -----------------------
- // SAVE/RESTORE METHODS...
- // -----------------------
-
- /**
- * Internal use method
- */
- protected void initializeFilterStrings()
- {
- 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()
- {
- if (filters.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[] filterArray = getSystemFilters(); // convert java.util.List to array
- boolean[] processed = new boolean[filterArray.length];
- //for (int idx=0;idx<processed.length;idx++)
- //processed[idx] = false;
- filters.clear(); // clear java.util.List
- //boolean done = false;
- int processedCount = 0;
- int totalCount = filterArray.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 = filterArray[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)
- {
- filters.add(filterArray[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 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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#getFilters()
- */
- public ISystemFilter[] getFilters()
- {
- ISystemFilter[] result = new ISystemFilter[filters.size()];
- filters.toArray(result);
- return result;
- }
-
- /**
- * @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();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#setSingleFilterStringOnly(boolean)
- */
- public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly)
- {
- singleFilterStringOnly = newSingleFilterStringOnly;
- singleFilterStringOnlyESet = true;
- setDirty(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#unsetSingleFilterStringOnly()
- */
- public void unsetSingleFilterStringOnly()
- {
- singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
- singleFilterStringOnlyESet = false;
- setDirty(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#isSetSingleFilterStringOnly()
- */
- public boolean isSetSingleFilterStringOnly()
- {
- return singleFilterStringOnlyESet;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#getOwningParentName()
- */
- public String getOwningParentName()
- {
- return owningParentName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#setOwningParentName(java.lang.String)
- */
- public void setOwningParentName(String newOwningParentName)
- {
- if (newOwningParentName != owningParentName)
- {
- owningParentName = newOwningParentName;
- setDirty(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#isNonRenamable()
- */
- public boolean isNonRenamable()
- {
- return nonRenamable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPool#setNonRenamable(boolean)
- */
- public void setNonRenamable(boolean newNonRenamable)
- {
- boolean oldNonRenamable = nonRenamable;
- if (oldNonRenamable!= newNonRenamable)
- {
- nonRenamable = newNonRenamable;
- setDirty(true);
- }
- }
-
- public boolean commit()
- {
- return getPersistableParent().commit();
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- ISystemProfile profile = null;
- ISystemFilterPoolManager filterPoolManager = getSystemFilterPoolManager();
- if (filterPoolManager != null) {
- profile = filterPoolManager.getSystemProfile();
- }
- return profile;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = new ArrayList(10);
- children.addAll(Arrays.asList(getSystemFilters()));
- children.addAll(Arrays.asList(getPropertySets()));
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolManager.java
deleted file mode 100644
index dc6bbcadb..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolManager.java
+++ /dev/null
@@ -1,1347 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * David Dykstal (IBM) - [197036] removed caching mechanism to clean up logic
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.rse.core.RSECorePlugin;
-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.ISystemFilterPoolManagerProvider;
-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.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.RSEPersistableObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.logging.Logger;
-
-/**
- * A filter pool manager manages filter pools. It is used to
- * <ul>
- * <li>Get a list of existing filter pools
- * <li>Create filter pools
- * <li>Delete filter pools
- * <li>Clone filter pools
- * <li>Rename filter pools
- * </ul>
- * <p>
- * The filter pool manager ensures that changes to filters and pools are
- * committed and events are fired properly.
- * <p>
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class SystemFilterPoolManager extends RSEPersistableObject implements ISystemFilterPoolManager {
- private ISystemFilterPoolManagerProvider caller = null;
- private Object poolMgrData;
- private boolean initialized = false;
-
- private boolean suspendCallbacks = false;
- private boolean suspendSave = false;
- private Logger logger = null;
- private ISystemProfile _profile;
-
- public static boolean debug = true;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * @see #getName()
- */
- 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.
- * @see #isSupportsNestedFilters()
- */
- 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.
- * @see #isStringsCaseSensitive()
- */
- 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.
- * @see #isSupportsDuplicateFilterStrings()
- */
- 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.
- */
- protected boolean supportsDuplicateFilterStringsESet = false;
-
- /**
- * The default value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * @see #isSingleFilterStringOnly()
- */
- protected static final boolean SINGLE_FILTER_STRING_ONLY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isSingleFilterStringOnly() <em>Single Filter String Only</em>}' attribute.
- * @see #isSingleFilterStringOnly()
- */
- protected boolean singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
-
- protected List pools = new ArrayList(3);
- // protected List pools = null;
-
- /**
- * Constructor
- */
- private 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.
- */
- public static ISystemFilterPoolManager createSystemFilterPoolManager(ISystemProfile profile, Logger logger,
- ISystemFilterPoolManagerProvider caller, String name, boolean allowNestedFilters) {
- SystemFilterPoolManager mgr = new SystemFilterPoolManager(profile);
- mgr.initialize(logger, caller, name, allowNestedFilters);
- return 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
- }
- setSupportsNestedFilters(allowNestedFilters); // cascade it down
- }
-
- /*
- * 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);
- setName(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.
- */
- public void setName(String newName) {
- if ((name == null && newName != null) || !name.equals(newName)) {
- this.name = newName;
- setDirty(true);
- }
- }
-
- /**
- * 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);
- }
- }
-
- /**
- */
- private void setSupportsDuplicateFilterStringsGen(boolean newSupportsDuplicateFilterStrings) {
- supportsDuplicateFilterStrings = newSupportsDuplicateFilterStrings;
- supportsDuplicateFilterStringsESet = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#isStringsCaseSensitive()
- */
- 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);
- }
- }
-
- /**
- */
- private 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() {
- ISystemFilterPool[] result = new ISystemFilterPool[pools.size()];
- pools.toArray(result);
- return result;
- // //System.out.println("Inside getSFPools for mgr "+getName()+". poolArray null? "+(poolArray==null));
- // if ((poolArray == null) || (getPools().size() != poolArray.length)) {
- // 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() {
- ISystemFilterPool[] pools = getSystemFilterPools();
- String[] names = new String[pools.length];
- for (int i = 0; i < pools.length; i++) {
- ISystemFilterPool pool = pools[i];
- names[i] = pool.getName();
- }
- return names;
- }
-
- /*
- * 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 {
- ISystemFilterPool pool = null;
- poolName = poolName.trim();
- if (getSystemFilterPool(poolName) == null) {
- pool = new SystemFilterPool(poolName, supportsNestedFilters(), isDeletable);
- pool.setSystemFilterPoolManager(this);
- pool.setStringsCaseSensitive(areStringsCaseSensitive());
- pool.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings() && supportsDuplicateFilterStrings());
- // List pools = getPools();
- pools.add(pool);
- // invalidatePoolCache();
- commit(pool);
- 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 {
- IRSEBaseReferencingObject[] refs = pool.getReferencingObjects();
- 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 why?
- }
- }
- }
- }
- pools.remove(pool);
- _profile.setDirty(true);
- _profile.commit();
- getProvider().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 a filter pool.
- * @return true if the pool can be renamed.
- */
- public boolean preTestRenameFilterPool(ISystemFilterPool pool) throws Exception {
- /*
- * The default implementation returns true. Persistence providers should be able to handle this
- * circumstance regardless. If a pool can be renamed internally, it should be able to be
- * renamed in its persistent form.
- */
- boolean ok = true;
- return ok;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#renameSystemFilterPool(org.eclipse.rse.core.filters.ISystemFilterPool, java.lang.String)
- */
- public void renameSystemFilterPool(ISystemFilterPool pool, String newName) throws Exception {
- String oldName = pool.getName();
- pool.setName(newName);
- // 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
- // ---------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#createSystemFilter(org.eclipse.rse.core.filters.ISystemFilterContainer, java.lang.String, java.util.List, java.lang.String, boolean)
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings, String type, boolean promptable) throws Exception {
- String[] filterStringsArray = new String[filterStrings.size()];
- filterStrings.toArray(filterStringsArray);
- ISystemFilter result = doCreateSystemFilter(parent, aliasName, filterStringsArray, type, promptable);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#createSystemFilter(org.eclipse.rse.core.filters.ISystemFilterContainer, java.lang.String, java.util.List, java.lang.String)
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings, String type) throws Exception {
- ISystemFilter result = createSystemFilter(parent, aliasName, filterStrings, type, false);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#createSystemFilter(org.eclipse.rse.core.filters.ISystemFilterContainer, java.lang.String, java.util.List)
- */
- public ISystemFilter createSystemFilter(ISystemFilterContainer parent, String aliasName, List filterStrings) throws Exception {
- ISystemFilter result = createSystemFilter(parent, aliasName, filterStrings, null, false);
- return result;
- }
-
- /**
- * 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, String[] filterStrings) throws Exception {
- ISystemFilter newFilter = doCreateSystemFilter(parent, aliasName, filterStrings, null, false);
- return newFilter;
- }
-
- /**
- * Creates a new system filter that is typed.
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String, String[])} 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, String[] filterStrings, String type) throws Exception {
- ISystemFilter newFilter = doCreateSystemFilter(parent, aliasName, filterStrings, type, false);
- return newFilter;
- }
-
- /**
- * Creates a new system filter that is typed and promptable
- * Same as {@link #createSystemFilter(ISystemFilterContainer, String ,String[], 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, String[] filterStrings, String type, boolean promptable) throws Exception {
- ISystemFilter newFilter = doCreateSystemFilter(parent, aliasName, filterStrings, type, promptable);
- return newFilter;
- }
-
- /**
- * Creates a system filter.
- * @param parent the owning parent of this filter, must be a filter pool or a filter capable of nesting
- * @param name the name of this filter
- * @param filterStrings the strings associated with this filter
- * @param type the type of this filter, used only if inheritType is false
- * @param promptable the promptable nature of this filter, used only if inheritPromptable is false
- * @return
- */
- private ISystemFilter doCreateSystemFilter(ISystemFilterContainer parent, String name, String[] filterStrings, String type, boolean promptable) {
- ISystemFilterPool parentPool = null;
- if (parent instanceof ISystemFilterPool) {
- parentPool = (ISystemFilterPool) parent;
- } else {
- parentPool = ((ISystemFilter) parent).getParentFilterPool();
- }
- ISystemFilter newFilter = parentPool.createSystemFilter(name, filterStrings);
- newFilter.setType(type);
- newFilter.setPromptable(promptable);
- if (!suspendSave) {
- commit(parentPool);
- }
- 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 {
- 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 != 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 {
- ISystemFilterPool targetPool = targetFilter.getParentFilterPool();
- ISystemFilterPoolManager targetMgr = targetPool.getSystemFilterPoolManager();
- ISystemFilter oldFilter = oldFilterString.getParentSystemFilter();
- 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;
- }
-
- /**
- * 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 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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#isSingleFilterStringOnly()
- */
- public boolean isSingleFilterStringOnly() {
- return singleFilterStringOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolManager#setSingleFilterStringOnly(boolean)
- */
- public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) {
- boolean oldSingleFilterStringOnly = singleFilterStringOnly;
- if (oldSingleFilterStringOnly != newSingleFilterStringOnly) {
- singleFilterStringOnly = newSingleFilterStringOnly;
- setDirty(true);
- }
- }
-
- /**
- * Save all the filter pools to disk.
- * Uses the save policy specified in this manager's factory method.
- */
- public boolean commit() {
- ISystemProfile profile = getSystemProfile();
- boolean result = profile.commit();
- return result;
- }
-
- /**
- * Save a specific filter pool.
- */
- public boolean commit(ISystemFilterPool pool) {
- pool.setDirty(true);
- boolean result = pool.commit();
- return result;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java
deleted file mode 100644
index a554637f6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReference.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * David Dykstal (IBM) - [189858] made sure that a reference remains broken if the profile
- * contained in the reference was not found.
- * David Dykstal (IBM) - [192122] extended search to look for filter pools in
- * profile during getReferencedFilterPool() rather than returning broken reference
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.RSECorePlugin;
-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.IRSEPersistableContainer;
-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.internal.references.SystemPersistableReferencingObject;
-
-/**
- * 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.
- * @param filterPoolName the name of the filter pool.
- */
- public SystemFilterPoolReference(String filterPoolName) {
- this();
- 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() {
- /*
- * A filter pool reference stores the name of the filter pool it references in the form managerName___filterPoolName.
- * or in the unqualified form of filterPoolName which references a locally defined filter pool.
- * ___ is the delimiter. Absence of the delimiter indicates an unqualified name.
- * The filter pool manager name is the same as its owning profile.
- */
- String savedName = getReferencedObjectName();
- String[] parts = savedName.split(DELIMITER, 2);
- String result = parts[0];
- if (parts.length == 2) {
- result = parts[1];
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterPoolReference#getReferencedFilterPoolManagerName()
- */
- public String getReferencedFilterPoolManagerName() {
- /*
- * A filter pool reference stores the name of the filter pool it references in the form managerName___filterPoolName.
- * or in the unqualified form of filterPoolName which references a locally defined filter pool.
- * ___ is the delimiter. Absence of the delimiter indicates an unqualified name.
- * The filter pool manager name is the same as its owning profile.
- */
- String result = null;
- String savedName = getReferencedObjectName();
- String[] parts = savedName.split(DELIMITER, 2);
- if (parts.length == 2) {
- result = parts[0];
- } else {
- ISystemFilterPoolReferenceManagerProvider provider = getProvider();
- if (provider instanceof ISubSystem) {
- ISubSystem subsystem = (ISubSystem) provider;
- ISystemProfile profile = subsystem.getSystemProfile();
- result = profile.getName();
- }
- }
- if (result == null) {
- RSECorePlugin.getDefault().getLogger().logWarning("Unexpected condition: filter pool manager name not found.", null); //$NON-NLS-1$
- }
- return result;
- }
-
- /* (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();
- String profileName = getReferencedFilterPoolManagerName();
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.getSystemProfile(profileName);
- if (profile != null) {
- ISubSystem subsystem = (ISubSystem) getProvider();
- ISubSystemConfiguration config = subsystem.getSubSystemConfiguration();
- filterPoolManager = config.getFilterPoolManager(profile);
- filterPool = filterPoolManager.getSystemFilterPool(filterPoolName);
- // TODO (dwd) may not need filter pools managers on a per subsystem configuration basis, investigate
- // added for 192122 - search all pools in the profile, these are unique anyway
- if (filterPool == null) {
- ISystemFilterPool[] candidatePools = profile.getFilterPools();
- for (int i = 0; i < candidatePools.length; i++) {
- ISystemFilterPool candidatePool = candidatePools[i];
- String candidatePoolName = candidatePool.getName();
- if (candidatePoolName.equals(filterPoolName)) {
- filterPool = candidatePool;
- break;
- }
- }
- }
- }
- }
- if (filterPool != null) {
- setReferenceToFilterPool(filterPool);
- setReferenceBroken(false);
- } else {
- setReferenceBroken(true);
- }
- 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) {
- List references = containerHelper.getSystemFilterReferences(subSystem);
- ISystemFilterReference[] result = new ISystemFilterReference[references.size()];
- references.toArray(result);
- return result;
- }
-
- /* (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 getReferencedObjectName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.persistance.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- return false;
- // return RSEUIPlugin.getThePersistenceManager().commit(getProvider().);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
- */
- public IRSEPersistableContainer getPersistableParent() {
- IRSEPersistableContainer parent = null;
- ISystemFilterPoolReferenceManagerProvider provider = getProvider();
- if (provider instanceof IRSEPersistableContainer) {
- parent = (IRSEPersistableContainer) provider;
- }
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
- */
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReferenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReferenceManager.java
deleted file mode 100644
index 41126e1ee..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolReferenceManager.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [197036] fixed parent references and names so that delete references would function correctly
- * David Dykstal (IBM) - [213353] fix move of filter pool references
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-import java.util.ArrayList;
-import java.util.List;
-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.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.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-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.
- */
-public class SystemFilterPoolReferenceManager extends SystemPersistableReferenceManager implements ISystemFilterPoolReferenceManager {
- private ISystemFilterPoolManagerProvider poolMgrProvider = null;
- private ISystemFilterPoolManager defaultPoolMgr = null;
- private ISystemFilterPoolReferenceManagerProvider caller = null;
- private Object mgrData = null;
- private boolean initialized = false;
- 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 name the name of the filter pool reference manager.
- * @return a filter pool reference manager
- */
- public static ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(ISystemFilterPoolReferenceManagerProvider caller, ISystemFilterPoolManagerProvider relatedPoolManagerProvider, String name) {
- SystemFilterPoolReferenceManager mgr = null;
-
- if (mgr == null) // not found or some serious error.
- {
- mgr = createManager();
- }
- if (mgr != null) {
- mgr.initialize(caller, name, 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, String name, ISystemFilterPoolManagerProvider relatedPoolManagerProvider) {
- if (!initialized) initialize(caller, name); // 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, String name) {
- setProvider(caller);
- setName(name);
- 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() {
- ISystemFilterPoolManager[] result = new ISystemFilterPoolManager[0];
- if (poolMgrProvider != null) {
- result = poolMgrProvider.getSystemFilterPoolManagers();
- }
- return result;
- }
-
- /**
- * @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;
- }
-
- /**
- * 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;
- }
-
- // ---------------------------------------------------
- // 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!
- }
-
- /**
- * @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();
- }
-
- /**
- * 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);
- filterPoolReference.setParentReferenceManager(this);
- 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.
- * @param filterPoolName the fully qualified filter pool name
- */
- private ISystemFilterPoolReference createSystemFilterPoolReference(String filterPoolName) {
- ISystemFilterPoolReference filterPoolReference = new SystemFilterPoolReference(filterPoolName);
- filterPoolReference.setParentReferenceManager(this);
- 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 addReferencingObject?
- invalidateFilterPoolReferencesCache();
- 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);
- }
-
- /**
- * 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);
- invalidateFilterPoolReferencesCache();
- if (fireEvents && (caller != null)) caller.filterEventFilterPoolReferenceDeleted(filterPoolReference);
- 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 = getReferencingObjectPosition(filterPoolRef);
- moveReferencingObjectPosition(pos, filterPoolRef);
- invalidateFilterPoolReferencesCache();
- if (fireEvents && (caller != null) && !noEvents) {
- ISystemFilterPoolReference[] refs = new ISystemFilterPoolReference[1];
- refs[0] = filterPoolRef;
- caller.filterEventFilterPoolReferencesRePositioned(refs, pos - oldPos);
- }
- if (caller instanceof IRSEPersistableContainer) {
- ((IRSEPersistableContainer) caller).setDirty(true);
- }
- }
-
- /**
- * 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 = 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 = false;
- 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();
- List pools = new ArrayList(refs.length);
- for (int idx = 0; idx < refs.length; idx++) {
- ISystemFilterPool pool = refs[idx].getReferencedFilterPool();
- if (pool != null) {
- pools.add(pool);
- }
- }
- ISystemFilterPool[] result = new ISystemFilterPool[pools.size()];
- pools.toArray(result);
- return result;
- }
-
- /**
- * @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);
- filterPoolReference.setParentReferenceManager(this); // DWD - should be done in addReferencingObject?
- invalidateFilterPoolReferencesCache();
- 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(String filterPoolName) {
- ISystemFilterPoolReference filterPoolReference = createSystemFilterPoolReference(filterPoolName);
- addReferencingObject(filterPoolReference);
- filterPoolReference.setParentReferenceManager(this); // DWD - should be done in addReferencingObject?
- invalidateFilterPoolReferencesCache();
- 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);
- invalidateFilterPoolReferencesCache();
- // 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();
- 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();
- 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;
- }
-
- /**
- * 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...
- // ------------------
-
- public String toString() {
- return getName();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapper.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapper.java
deleted file mode 100644
index 0c015c4b8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapper.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.core.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapperInformation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapperInformation.java
deleted file mode 100644
index 6d37a7a46..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterPoolWrapperInformation.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.core.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 euphemisms
- * to filter pools. This requires an array of wrapper objects, and requires
- * replacement mri for the pool prompt and tooltip text, and the verbiage 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, verbiageLabel;
- private Vector wrappers;
- private ISystemFilterPoolWrapper[] wrapperArray;
- private ISystemFilterPoolWrapper preSelectWrapper;
-
- /**
- * Constructor for SystemFilterPoolWrapperInformation.
- */
- public SystemFilterPoolWrapperInformation(String promptLabel, String promptTooltip, String verbiageLabel)
- {
- super();
- this.promptLabel= promptLabel;
- this.verbiageLabel = verbiageLabel;
- 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 getVerbiageLabel()
- {
- return verbiageLabel;
- }
-
-
- /**
- * @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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterSimple.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterSimple.java
deleted file mode 100644
index bc1622b74..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterSimple.java
+++ /dev/null
@@ -1,497 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [206901] fixing ArrayStoreException in getPersistableChildren
- * Fix involved removing visibility for data referenced in SystemFilter. Addressed
- * that by modifying the implementation of SystemFilterSimple to use its own data.
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.rse.core.filters.ISystemFilter;
-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.ISystemContentsType;
-import org.eclipse.rse.core.model.ISystemModifiableContainer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * A lightweight implementation of ISystemFilter.
- * <p>
- * This flavor is for those cases where a simple in-memory
- * ISystemFilter 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 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 ISystemModifiableContainer {
-
- private String name = null;
- private String type = null;
- private boolean caseSensitive = false;
- private boolean promptable = false;
- private boolean isStale = true;
- private Object subsystem = null;
- private List filterStrings = new ArrayList(3);
- private HashMap cachedContents = new HashMap();
-
- /**
- * Constructor for SystemFilterSimple
- */
- public SystemFilterSimple(String name) {
- this.name = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.core.filters.SystemFilter#isTransient()
- */
- public boolean isTransient() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.core.filters.SystemFilter#clone(org.eclipse.rse.core.filters.ISystemFilter)
- */
- public void clone(ISystemFilter targetFilter) {
- super.clone(targetFilter);
- targetFilter.setFilterStrings(getFilterStrings());
- }
-
- // -------------------------------------------------------
- // 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) {
- filterStrings.clear();
- filterStrings.add(filterString);
- }
-
- /**
- * Get the single (or the first) filter string.
- * Returns null if setFilterString has not been called.
- */
- public String getFilterString() {
- String result = filterStrings.isEmpty() ? null : (String) filterStrings.get(0);
- return result;
- }
-
- /**
- * 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 setSubSystem(ISubSystem parent) {
- this.subsystem = parent;
- }
-
- /**
- * Get the parent as set in setParent(Object)
- */
- public Object getSubSystem() {
- return subsystem;
- }
-
- // -------------------------------------------------------
- // 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() {
- String[] result = new String[filterStrings.size()];
- filterStrings.toArray(result);
- return result;
- }
-
- /**
- * Return how many filter strings are defined in this filter.
- */
- public int getFilterStringCount() {
- return filterStrings.size();
- }
-
- /**
- * Set all the filter strings for this filter.
- * @param newStrings array of String objects
- */
- public void setFilterStrings(String newStrings[]) {
- filterStrings.clear();
- filterStrings.addAll(Arrays.asList(newStrings)); // cannot just set since asList returns a fixed-size array
- }
-
- /**
- * Append a new filter string to this filter's list.
- * Returns null.
- */
- public ISystemFilterString addFilterString(String newString) {
- filterStrings.add(newString);
- 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) {
- filterStrings.add(position, newString);
- return null;
- }
-
- /**
- * Delete a filter string from this filter's list.
- * Returns null.
- */
- public ISystemFilterString removeFilterString(String oldString) {
- filterStrings.remove(oldString);
- 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) {
- filterStrings.remove(position);
- 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 filterStrings.size() > 0;
- }
-
- // ---------------------
- // methods needed by ISystemFilter
- // ---------------------
-
- // -------------------------------------------------------
- // 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 an empty array
- */
- public String[] getSystemFilterNames() {
- return new String[0];
- }
-
- /**
- * Overridden to return an empty array
- */
- public ISystemFilter[] getNestedFilters() {
- return new ISystemFilter[0];
- }
-
- /**
- * Overridden to return null
- */
- public ISystemFilter[] getSystemFilters() {
- return null;
- }
-
- /**
- * Overridden to return 0
- */
- public int getSystemFilterCount() {
- return 0;
- }
-
- /**
- * Overridden to return an empty array
- */
- public ISystemFilterString[] getStrings() {
- return new ISystemFilterString[0];
- }
-
- /**
- * 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();
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java
deleted file mode 100644
index da3f775c4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStartHere.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - removing implementation of ISystemFilterConstants
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.filters;
-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.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 ISystemFilterStartHere
-{
- private static SystemFilterStartHere _instance;
- public SystemFilterStartHere()
- {
- }
-
- public static SystemFilterStartHere getInstance()
- {
- if (_instance == null)
- {
- _instance = new SystemFilterStartHere();
- }
- return _instance;
- }
-
- /**
- * 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);
- }
-
-
-
- /**
- * 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 manager provider 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.
- */
- public ISystemFilterPoolReferenceManager createSystemFilterPoolReferenceManager(
- ISystemFilterPoolReferenceManagerProvider caller,
- ISystemFilterPoolManagerProvider relatedPoolMgrProvider,
- String name)
- {
- return SystemFilterPoolReferenceManager.createSystemFilterPoolReferenceManager(
- caller, relatedPoolMgrProvider, name);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterString.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterString.java
deleted file mode 100644
index e796d62e5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterString.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - Cleanup Javadoc.
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.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.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.references.SystemReferencedObjectHelper;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-
-
-/**
- * This represents a filter string within a filter. Filters can hold one or more filter strings.
- */
-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.
- * @see #getString()
- */
- protected static final String STRING_EDEFAULT = null;
-
- protected String string = STRING_EDEFAULT;
-
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * @see #getType()
- */
- protected static final String TYPE_EDEFAULT = null;
-
- protected String type = TYPE_EDEFAULT;
-
- /**
- * The default value of the '{@link #isDefault() <em>Default</em>}' attribute.
- * @see #isDefault()
- */
- 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!
- */
- protected SystemFilterString()
- {
- super();
- helper = new SystemReferencedObjectHelper();
- }
-
- /*
- * (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.ISystemFilterString#setParentSystemFilter(org.eclipse.rse.core.filters.ISystemFilter)
- */
- public void setParentSystemFilter(ISystemFilter filter)
- {
- this.parentFilter = filter;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#getParentSystemFilter()
- */
- public ISystemFilter getParentSystemFilter()
- {
- return parentFilter;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#getProvider()
- */
- public ISystemFilterPoolManagerProvider getProvider()
- {
- if (parentFilter != null)
- return parentFilter.getProvider();
- else
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#getSystemFilterPoolManager()
- */
- public ISystemFilterPoolManager getSystemFilterPoolManager()
- {
- if (parentFilter != null)
- return parentFilter.getSystemFilterPoolManager();
- else
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#getType()
- */
- public String getType()
- {
- String type = this.getTypeGen();
- if (type == null)
- return ISystemFilterConstants.DEFAULT_TYPE;
- else
- return type;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#clone(org.eclipse.rse.core.filters.ISystemFilterString)
- */
- public void clone(ISystemFilterString targetString)
- {
- String ourString = getString();
- if (ourString != null)
- targetString.setString(new String(ourString));
- targetString.setType(getTypeGen());
- targetString.setDefault(isDefault());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#isChangable()
- */
- public boolean isChangable()
- {
- boolean enable = !getParentSystemFilter().isNonChangable() &&
- !getParentSystemFilter().isStringsNonChangable();
- return enable;
- }
-
- // ----------------------------------
- // IRSEReferencedObject methods...
- // ----------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencedObject#addReference(org.eclipse.rse.core.references.IRSEBaseReferencingObject)
- */
- public int addReference(IRSEBaseReferencingObject ref)
- {
- return helper.addReference(ref);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencedObject#removeReference(org.eclipse.rse.core.references.IRSEBaseReferencingObject)
- */
- public int removeReference(IRSEBaseReferencingObject ref)
- {
- return helper.removeReference(ref);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencedObject#getReferenceCount()
- */
- public int getReferenceCount()
- {
- return helper.getReferenceCount();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencedObject#removeAllReferences()
- */
- public void removeAllReferences()
- {
- helper.removeAllReferences();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.references.IRSEBaseReferencedObject#getReferencingObjects()
- */
- public IRSEBaseReferencingObject[] getReferencingObjects()
- {
- return helper.getReferencingObjects();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public String getName()
- {
- return getString();
- }
-
- public String getDescription()
- {
- return RSECoreMessages.RESID_MODELOBJECTS_FILTERSTRING_DESCRIPTION;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#getString()
- */
- public String getString()
- {
- return string;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#setString(java.lang.String)
- */
- public void setString(String newString)
- {
- string = newString;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#setType(java.lang.String)
- */
- public void setType(String newType)
- {
- type = newType;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#isDefault()
- */
- public boolean isDefault()
- {
- return default_;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.filters.ISystemFilterString#setDefault(boolean)
- */
- public void setDefault(boolean newDefault)
- {
- default_ = newDefault;
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- 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();
- }
-
- /**
- * Allows tools to have typed filter strings
- */
- public String getTypeGen()
- {
- return type;
- }
-
- public boolean commit()
- {
- boolean result = getParentSystemFilter().commit();
- return result;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return parentFilter;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStringReference.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStringReference.java
deleted file mode 100644
index aba4b512d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/filters/SystemFilterStringReference.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.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.core.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/messages.properties b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/messages.properties
deleted file mode 100644
index 10212a4ee..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/messages.properties
+++ /dev/null
@@ -1,97 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 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 API and implementation
-# David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
-# Martin Oberhuber (Wind River) - [184095] combined RSEModelResources and persistence.Messages into this file
-# Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
-# Xuan Chen (IBM) - fix check PII error
-# David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David Dykstal (IBM) - [189274] provide import and export operations for profiles
-# Xuan Chen (IBM) - [226355] [NL] Need to update the tooltip for switching to online for a connection
-# David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-# Model
-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.
-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_SUBSYSTEM_AUTODETECT_LABEL=Auto-detect SSL
-RESID_PROP_SERVERLAUNCHER_MEANS_LABEL=Launcher
-RESID_PROP_SERVERLAUNCHER_PATH=Path to installed server on host
-RESID_PROP_SERVERLAUNCHER_INVOCATION=Server launch command
-RESID_CONNECTION_PORT_LABEL=Port
-RESID_CONNECTION_DAEMON_PORT_LABEL=Daemon Port
-
-RESID_PROPERTYSET_REMOTE_SERVER_LAUNCHER=Remote Server Launcher
-RESID_PROPERTYSET_LAUNCHER_PROPERTIES=Launcher Properties
-
-# Persistence
-RSEEnvelope_ExportNotSupported=The persistence provider does not support export.
-RSEEnvelope_IncorrectFormat=Incorrect file format
-RSEEnvelope_ModelNotExported=The persistence provider did not export the model.
-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
-
-# Password Persistence Manager
-DefaultSystemType_Label=Default
-
-# Initialization
-RSELocalConnectionInitializer_localConnectionName=Local
-InitRSEJob_error_creating_mark=IOException creating mark file {0}.
-InitRSEJob_initializer_ended_in_error=Initializer {0} ended in error.
-InitRSEJob_initializer_failed_to_load=Failed to load initializer {0}.
-InitRSEJob_initializing_rse=Initializing RSE
-InitRSEJob_listener_ended_in_error=Listener ended in error.
-
-# SystemRegistry: Loading Profile Warning Messages - See also ISystemMessages
-MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REFS=De-Activating profile {0} for which there are subsystems containing references to filter pools:
-MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REF=\ in connection {1} in profile {2}
-MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED = Warning. Profile ''{0}'' should be active. Active connection ''{1}'' contains a reference to it.
-MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED = Warning. Profile ''{0}'' should be made active. Active connection ''{1}'' contains a reference to it.
-MSG_CREATEHOST_EXCEPTION=Exception in createHost for {0}
-
-# SystemRegistry: Progress Reporting - See also ISystemMessages
-MSG_COPYCONNECTION_PROGRESS=Copying connection {0}
-MSG_COPYFILTERPOOLS_PROGRESS=Copying filter pools
-MSG_COPYSUBSYSTEMS_PROGRESS=Copying subsystems
-
-# subsystem
-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...
-
-
-
-# Connection doesn't exist
-MSG_CONNECTION_DELETED = Connection named {0} does not exist.
-
-MSG_OFFLINE_CANT_CONNECT = The connection {0} is currently offline and cannot be connected.
-MSG_OFFLINE_CANT_CONNECT_DETAILS =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 {0} and deselect the Work Offline action.
-
-
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/ISystemProfileOperation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/ISystemProfileOperation.java
deleted file mode 100644
index 59f411571..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/ISystemProfileOperation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [197036] new interface
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A profile operation can be executed by the SystemProfileManager. This allows for multiple changes
- * to model objects to be committed all at once when the last level of nesting is completed.
- */
-public interface ISystemProfileOperation {
-
- /**
- * Run this operation. Should not be invoked directly.
- * See {@link SystemProfileManager#run(ISystemProfileOperation)}
- * @return The IStatus of the operation
- */
- public IStatus run();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/RemoteObjectId.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/RemoteObjectId.java
deleted file mode 100644
index 4598369c9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/RemoteObjectId.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.core.model;
-
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-
-/**
- * A RemoteObjectId uniquely identifies an object in the RSE Tree, and is valid
- * as long as its parent subsystem exists.
- *
- * It holds a Subsystem instance, and an absolute name. This class is meant as a
- * short-lived object for using in local comparisons only. Since it is only
- * valid as long as its parent subsystem exists, RemoteObjectId's cannot be
- * usefully persisted.
- *
- * This class is immutable and therefore thread-safe.
- *
- * TODO It is unfortunate that we need to access an ISystemDragDropAdapter just
- * to get the ISubSystem. A lower-level object identifier should be available,
- * but making that happen would break almost all clients since their adapter
- * factories are not prepared for it.
- *
- * TODO This class would make sense to eventually promote to API. But currently,
- * it isn't used anywhere and is therefore dead code. But it is kept here in
- * order to be convey the original idea and have it available when needed.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work or
- * that it will remain the same. Please do not use this API without consulting
- * with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
- * team.
- * </p>
- *
- * @since org.eclipse.rse.core 3.0
- */
-public final class RemoteObjectId {
- // Subsystem instance, may be null
- private final ISubSystem fSubSystem;
- // Absolute name, must not be null
- private final String fAbsoluteName;
-
- /**
- * Construct a RemoteObjectId.
- *
- * @param ss subsystem instance. May be <code>null</code> if unknown.
- * @param absoluteName absolute name. Must not be <code>null</code>.
- */
- private RemoteObjectId(ISubSystem ss, String absoluteName) {
- assert absoluteName != null;
- fSubSystem = ss;
- fAbsoluteName = absoluteName;
- }
-
- /**
- * Create an RemoteObjectId for any kind of Object. Tries to adapt the given
- * object to an RSE {@link ISystemDragDropAdapter} or
- * {@link IRemoteObjectIdentifier}, in order to obtain an absolute name
- * and subsystem instance.
- *
- * @param element an element that needs to be adaptable such that an
- * absolute name can be obtained.
- * @return an RemoteObjectId for the given element, or <code>null</code> if
- * the given element is not adaptable to the necessary RSE
- * adapter type, or no absolute name can be obtained.
- */
- public static RemoteObjectId create(Object element) {
- ISystemDragDropAdapter dda = SystemRegistry.getSystemDragDropAdapter(element);
- if (dda != null) {
- String absoluteName = dda.getAbsoluteName(element);
- if (absoluteName != null) {
- return new RemoteObjectId(dda.getSubSystem(element), absoluteName);
- }
- }
- return null;
- }
-
- /**
- * Return the absolute name of this object id.
- *
- * @return the absolute name
- */
- public final String getAbsoluteName() {
- return fAbsoluteName;
- }
-
- /**
- * Return the subsystem instance of this object id.
- *
- * @return the subsystem instance. May be <code>null</code> if the
- * subsystem instance could not be determined.
- */
- public final ISubSystem getSubSystem() {
- return fSubSystem;
- }
-
- public final boolean equals(Object o) {
- try {
- // We're optimistic and think nobody will ever call
- // equals() on us with any other kind of Object
- RemoteObjectId other = (RemoteObjectId) o;
- return (fSubSystem == other.fSubSystem) && (fAbsoluteName.equals(other.fAbsoluteName));
- } catch (Exception e) {
- return false;
- }
- }
-
- public final int hashCode() {
- int hashCode = fAbsoluteName.hashCode();
- if (fSubSystem != null) {
- hashCode = hashCode * 31 + fSubSystem.hashCode();
- }
- return hashCode;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemHostPool.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemHostPool.java
deleted file mode 100644
index df4b5d763..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemHostPool.java
+++ /dev/null
@@ -1,673 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - created and used RSEPReferencesManager
- * - moved SystemsPreferencesManager to a new plugin
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * David Dykstal (IBM) - [176577] wrong enablement of "Move up/down" in connection context menu
- * Martin Oberhuber (Wind River) - [206742] Make SystemHostPool thread-safe
- * David Dykstal (IBM) - [210537] removed exception signaling from this class to match the interface
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.model.Host;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-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.internal.core.RSECoreMessages;
-
-
-/**
- * A pool of host objects.
- * <p>
- * The host pool is tightly coupled to its owning profile: there is exactly one pool
- * per profile, it always has the same name as the owning profile, and renaming it
- * also renames the profile. Persistence of the host pool is also handled through
- * persisting the owning profile.
- * </p><p>
- * 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.
- * </p><p>
- * This class is thread-safe in the sense that integrity of the host list is maintained
- * even if multiple threads call multiple methods in this interface concurrently.
- * </p>
- * @see ISystemHostPool
- */
-public class SystemHostPool extends RSEModelObject implements ISystemHostPool
-{
-
- protected static final String NAME_EDEFAULT = null;
-
- private static Hashtable pools = new Hashtable();
- private static String CONNECTION_FILE_NAME = "connection"; //$NON-NLS-1$
-
- protected String name = NAME_EDEFAULT;
- private List connections = new ArrayList();
-
- /**
- * Default constructor.
- */
- protected SystemHostPool()
- {
- super();
- }
-
- /**
- * Reset for a full refresh from disk, such as after a team synch
- */
- public static void reset()
- {
- pools.clear();
- }
-
- // -------------------------------------------------------------------------------------
- // Host Pool Methods
- // -------------------------------------------------------------------------------------
- /**
- * Return (and create if necessary) the connection pool for a given system profile.
- * @param profile the profile to create a host pool for.
- */
- public static ISystemHostPool getSystemHostPool(ISystemProfile profile)
- {
- SystemHostPool pool = (SystemHostPool)pools.get(profile);
- if (pool == null)
- {
- pool = new SystemHostPool();
- pool.setName(profile.getName());
- pools.put(profile, pool); // store this pool reference, keyed by profile object.
- }
- return pool;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#getSystemProfile()
- */
- public ISystemProfile getSystemProfile()
- {
- return SystemProfileManager.getDefault().getSystemProfile(getName());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#renameHostPool(java.lang.String)
- */
- public void renameHostPool(String newName)
- {
- //Threading: We need to ensure that new hosts are not added while the rename is
- //ongoing. Therefore, we lock even though renamingSystemProfile() is an alien
- //method -- Javadoc in that method warns about the possible deadlock.
- List hostList = getHostList();
- synchronized(hostList) {
- String oldName = getName();
- Iterator it = hostList.iterator();
- while (it.hasNext()) {
- IHost curHost = (IHost)it.next();
- curHost.renamingSystemProfile(oldName, newName);
-
- }
- setName(newName);
- }
- }
-
-
- /**
- * Private debug method to print connections, to test restored ok.
- * @deprecated this private debug method may be removed at any time.
- */
- public void printConnections()
- {
- List conns = getHostList();
- synchronized(conns) {
- 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().getId()); //$NON-NLS-1$
- System.out.println(" Description...: " + conn.getDescription()); //$NON-NLS-1$
- System.out.println(" UserId........: " + conn.getDefaultUserId()); //$NON-NLS-1$
- }
- }
- }
-
- // -------------------------------------------------------------------------------------
- // CONNECTION METHODS...
- // -------------------------------------------------------------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#createHost(org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String)
- */
- public IHost createHost(IRSESystemType systemType, String aliasName, String hostName)
- {
- return createHost(systemType,aliasName,hostName,null,null,IRSEUserIdConstants.USERID_LOCATION_HOST);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#createHost(org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String)
- */
- public IHost createHost(IRSESystemType systemType, String aliasName, String hostName, String description)
- {
- return createHost(systemType,aliasName,hostName,description,null,IRSEUserIdConstants.USERID_LOCATION_HOST);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#createHost(org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
- */
- public IHost createHost(IRSESystemType systemType, String aliasName, String hostName,
- String description,String defaultUserId,int defaultUserIdLocation)
- {
- IHost conn = null;
- boolean exists = getHost(aliasName) != null;
- if (exists)
- {
- return null;
- }
- ISystemProfile profile = getSystemProfile();
-
- // delegate the creation of the host object instance to the system type provider!!!
- if (systemType != null) {
- conn = systemType.createNewHostInstance(profile);
- }
- // Fallback to create host object instance here if failed by system type provider.
- assert conn != null;
- if (conn == null) conn = new Host(profile);
-
- addHost(conn); // only record internally if saved successfully
- conn.setHostPool(this);
- conn.setAliasName(aliasName);
- conn.setSystemType(systemType);
- // 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);
- return conn;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#updateHost(org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
- */
- public void updateHost(IHost conn, IRSESystemType systemType,
- String aliasName, String hostName,
- String description,String defaultUserId, int defaultUserIdLocation)
- {
- 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
- boolean forceToUpperCase = conn.getForceUserIdToUpperCase();
- if (forceToUpperCase && (defaultUserId != null))
- defaultUserId = defaultUserId.toUpperCase();
- if (defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE)
- {
- RSEPreferencesManager.setDefaultUserId(systemType, defaultUserId);
- }
- //else if (defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_DEFAULT_OVERALL)
- //{
- //prefMgr.setDefaultUserId(defaultUserId);
- //}
- }
- else
- {
- conn.setDefaultUserId(defaultUserId);
- }
- }
- conn.setDescription(description);
- commit(conn);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#getHosts()
- */
- public IHost[] getHosts()
- {
- //Must be synchronized in order to avoid change of host list size while populating the array
- List conns = getHostList();
- synchronized(conns) {
- return (IHost[])conns.toArray(new IHost[conns.size()]);
- }
- }
-
- /**
- * Invalidate cache so it will be regenerated
- */
- protected void invalidateCache()
- {
- setDirty(true);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#getHost(java.lang.String)
- */
- public final IHost getHost(String aliasName)
- {
- //This method is final because it is called from inside the synchronized block
- //in the orderHosts() method. Also, if subclasses want to override the way how
- //hosts are returned and compared, they better need to override the List
- //implementation that's returned by getHostList().
- List conns = getHostList();
- synchronized(conns) {
- Iterator i = conns.iterator();
- while (i.hasNext())
- {
- IHost currconn = (IHost)i.next();
- if (currconn.getAliasName().equalsIgnoreCase(aliasName))
- return currconn;
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#getHost(int)
- */
- public final IHost getHost(int pos)
- {
- List conns = getHostList();
- synchronized(conns) {
- if (pos < conns.size())
- return (IHost)conns.get(pos);
- else
- return null;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#getHostPosition(org.eclipse.rse.core.model.IHost)
- */
- public int getHostPosition(IHost conn)
- {
- List hostList = getHostList();
- synchronized(hostList) {
- return hostList.indexOf(conn);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#getHostCount()
- */
- public int getHostCount()
- {
- List conns = getHostList();
- synchronized(conns) {
- return conns.size();
- }
- }
-
-
- public boolean addHost(IHost conn)
- {
- assert conn!=null;
- if (conn!=null) {
- List hostList = getHostList();
- synchronized(hostList) {
- if (!hostList.contains(conn))
- {
- hostList.add(conn);
- }
- }
- conn.setHostPool(this);
- invalidateCache();
- return true;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#deleteHost(org.eclipse.rse.core.model.IHost)
- */
- public void deleteHost(IHost conn)
- {
- conn.deletingHost(); // let connection do any necessary cleanup
- List hostList = getHostList();
- synchronized(hostList) {
- hostList.remove(conn);
- }
- setDirty(true);
- conn.getSystemProfile().commit();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#renameHost(org.eclipse.rse.core.model.IHost, java.lang.String)
- */
- public void renameHost(IHost conn, String newName)
- {
- //must not change the alias name while a getHost() or orderHosts() is ongoing
- synchronized(connections) {
- conn.setAliasName(newName);
- }
- invalidateCache();
- commit(conn);
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#cloneHost(org.eclipse.rse.core.model.ISystemHostPool, org.eclipse.rse.core.model.IHost, java.lang.String)
- */
- public IHost cloneHost(ISystemHostPool targetPool, IHost conn, String aliasName)
- {
- IHost copy =
- targetPool.createHost(conn.getSystemType(), aliasName,
- conn.getHostName(), conn.getDescription(), conn.getLocalDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_HOST);
- return copy;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#moveHosts(org.eclipse.rse.core.model.IHost[], int)
- */
- public void moveHosts(IHost hosts[], int delta) {
- /*
- * Determine the indices of the supplied hosts in this pool.
- * If the delta is positive this list should be in descending order,
- * if negative, the list should be in ascending oder.
- */
- final int m = (delta > 0) ? -1 : 1; // modifier that determines the ordering
- SortedSet indices = new TreeSet(new Comparator() {
- public int compare(Object o1, Object o2) {
- return m * ((Integer)o1).compareTo((Integer)o2);
- }
- });
- boolean moved;
- List hostList = getHostList();
- synchronized(hostList) {
- for (int i = 0; i < hosts.length; i++) {
- IHost host = hosts[i];
- int index = hostList.indexOf(host);
- if (index >= 0) {
- indices.add(new Integer(index));
- }
- }
- // Go through the sorted list of indices.
- moved = indices.size() > 0;
- for (Iterator z = indices.iterator(); z.hasNext() && moved;) {
- int index = ((Integer) z.next()).intValue();
- moved &= moveHost(hostList, index, delta);
- }
- }
- if (moved) {
- invalidateCache();
- commit();
- }
- }
-
- /**
- * Move a host to a new location in the passed-in host list.
- * @param hostList the list of hosts to modify
- * @param oldPos the index of the host to move. If outside the bounds of the list, the list is not altered.
- * @param delta the amount by which to move the host. If the resulting
- * position would be outside the bounds of the list, the list is not altered.
- * If 0 then the list is not altered.
- * @return true if the host was moved, false if not
- */
- private boolean moveHost(List hostList, int oldPos, int delta) {
- boolean moved = false; // assume the element will not be moved
- if (0 <= oldPos && oldPos < hostList.size() && delta != 0) {
- int newPos = oldPos + delta;
- if (0 <= newPos && newPos < hostList.size()) {
- IHost host = (IHost) hostList.remove(oldPos);
- hostList.add(newPos, host);
- moved = true;
- }
- }
- return moved;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemHostPool#orderHosts(java.lang.String[])
- */
- public void orderHosts(String[] names) {
- List connList = getHostList();
- synchronized(connList) {
- //Threading: need to call getHost() from inside the synchronized block in order
- //to avoid problems with adding/removing hosts while the re-ordering is taking
- //place... hosts added during the re-ordering could otherwise be deleted.
- //In order to not have an alien method call here, getHost() is declared final.
- IHost[] conns = new IHost[names.length];
- for (int idx = 0; idx < conns.length; idx++) {
- conns[idx] = getHost(names[idx]); //may return null host
- }
- //TODO what should we do with hosts that are not in the name list?
- //Currently, these will be removed... should they be added at the end instead?
- connList.clear();
- for (int idx = 0; idx < conns.length; idx++) {
- if (conns[idx]!=null) {
- connList.add(conns[idx]);
- }
- }
- }
- invalidateCache();
- }
-
- /**
- * 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
- */
- public String getName()
- {
- return name;
- }
-
- public String getDescription()
- {
- return RSECoreMessages.RESID_MODELOBJECTS_HOSTPOOL_DESCRIPTION;
- }
-
- /**
- * Set the name of this host pool.
- * <p>
- * This method should not be called by clients directly in order
- * to maintain correct relationship to the owning profile. Clients
- * should call {@link #renameHostPool(String)} instead.
- * </p>
- * @param newName The new value of the Name attribute.
- */
- protected void setName(String newName)
- {
- name = newName;
- }
-
- /**
- * Return the internal list of connection references.
- *
- * The list returned is considered internal and not synchronized.
- * Modifications will directly apply to any other client or thread.
- * Therefore, users of the returned host list should typically be
- * synchronized to avoid modification of the list through another thread
- * when working on it.
- *
- * Clients are not expected to get a handle on this list and
- * are expected to use @link{#getHosts()} instead.
- *
- * Subclasses may override this method to perform additional work
- * or return a different kind of List implementation, but they must
- * ensure that they always return the same List object (because
- * clients will synchronize on that object). In other words, the
- * List may be modified but never totally exchanged.
- *
- * @return The internal list of connection references.
- */
- protected List getHostList()
- {
- 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();
- }
-
- /**
- * 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;
- }
-
- /**
- * System host pools are not persisted and do not exist in the persistence hierarchy.
- * @return null
- */
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- // -------------------------
- // 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()
- {
- ISystemProfile profile = getSystemProfile();
- boolean result = profile.commit();
- return result;
- }
-
- /**
- * Attempt to save single connection to disk.
- */
- public void commit(IHost connection)
- {
- commit();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEvent.java
deleted file mode 100644
index 8379dc132..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEvent.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-
-/**
- * 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
-{
- 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.events.ISystemModelChangeEvents#SYSTEM_RESOURCE_ADDED}.
- * @see org.eclipse.rse.core.events.ISystemModelChangeEvents
- */
- public int getEventType()
- {
- return eventType;
- }
- /**
- * Get the resource type, such as {@link org.eclipse.rse.core.events.ISystemModelChangeEvents#SYSTEM_RESOURCETYPE_CONNECTION}.
- * @see org.eclipse.rse.core.events.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.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEventManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEventManager.java
deleted file mode 100644
index 36deaa805..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemModelChangeEventManager.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [218659] Make *EventManager, *ChangeManager thread-safe
- * David Dykstal (IBM) - [227750] add a test for registered listeners
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeListener;
-
-
-/**
- * Manages the list of registered model change listeners.
- */
-public class SystemModelChangeEventManager
-{
- private List listeners = new ArrayList();
- private Object lockObject = new Object();
-
- /**
- * Constructor
- */
- public SystemModelChangeEventManager()
- {
- }
-
- /**
- * Add a listener to list of listeners.
- * If this object is already in the list, this does nothing.
- * @param l the listener to add
- */
- public void addSystemModelChangeListener(ISystemModelChangeListener l)
- {
- synchronized(lockObject) {
- if (!listeners.contains(l))
- listeners.add(l);
- }
- }
-
- /**
- * Remove a listener from the list of listeners.
- * If this object is not in the list, this does nothing.
- * @param l the listener to remove
- */
- public void removeSystemModelChangeListener(ISystemModelChangeListener l)
- {
- synchronized(lockObject) {
- //Thread-safety: create a new List when removing, to avoid problems in notify()
- listeners = new ArrayList(listeners);
- listeners.remove(l);
- }
- }
-
- /**
- * Notify all registered listeners of the given event.
- * @param event the event to send
- */
- public void notify(ISystemModelChangeEvent event)
- {
- //Thread-safe event firing: fire events on a current snapshot of the list.
- //If not done that way, and a thread removes a listener while event firing
- //is in progress, an ArrayIndexOutOfBoundException might occur.
- List currentListeners;
- synchronized(lockObject) {
- currentListeners = listeners;
- }
- for (int idx=0; idx<currentListeners.size(); idx++) {
- ISystemModelChangeListener l = (ISystemModelChangeListener)currentListeners.get(idx);
- l.systemModelResourceChanged(event);
- }
- }
-
- /**
- * Test if a manager has any listeners registered.
- * @return true if there are any listeners, false if not.
- */
- public boolean hasListeners() {
- boolean result = false;
- synchronized(lockObject) {
- result = listeners.size() > 0;
- }
- return result;
- }
-
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPostableEventNotifier.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPostableEventNotifier.java
deleted file mode 100644
index 9c5d4d84f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPostableEventNotifier.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.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 behavior 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.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeEvent.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeEvent.java
deleted file mode 100644
index 38eb824b3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeEvent.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.EventObject;
-
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvents;
-
-
-/**
- * Event object sent to ISystemPreferenceChangeListeners when a
- * remote system preference is changed.
- * @see org.eclipse.rse.core.events.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.events.ISystemPreferenceChangeEvents
- * @param type The type of event, one of {@link ISystemPreferenceChangeEvents} constants.
- * @param oldValue the old value of the Preference
- * @param newValue the old value of the Preference
- */
- 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.events.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.events.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeManager.java
deleted file mode 100644
index 707945c12..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemPreferenceChangeManager.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [218659] Make *EventManager, *ChangeManager thread-safe
- * David Dykstal (IBM) - [227750] add a test for registered listeners
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeListener;
-
-
-/**
- * Manages the list of registered preference change listeners.
- */
-public class SystemPreferenceChangeManager
-{
- private List listeners = new ArrayList();
- private Object lockObject = new Object();
-
- /**
- * Constructor
- */
- public SystemPreferenceChangeManager()
- {
- }
-
- /**
- * Add a listener to list of listeners.
- * If this object is already in the list, this does nothing.
- * @param l the listener to add
- */
- public void addSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
- {
- synchronized(lockObject) {
- if (!listeners.contains(l))
- listeners.add(l);
- }
- }
-
- /**
- * Remove a listener from the list of listeners.
- * If this object is not in the list, this does nothing.
- * @param l the listener to remove
- */
- public void removeSystemPreferenceChangeListener(ISystemPreferenceChangeListener l)
- {
- synchronized(lockObject) {
- //Thread-safety: create a new List when removing, to avoid problems in notify()
- listeners = new ArrayList(listeners);
- listeners.remove(l);
- }
- }
-
- /**
- * Notify all registered listeners of the given event.
- * @param event the event to send
- */
- public void notify(ISystemPreferenceChangeEvent event)
- {
- //Thread-safe event firing: fire events on a current snapshot of the list.
- //If not done that way, and a thread removes a listener while event firing
- //is in progress, an ArrayIndexOutOfBoundException might occur.
- List currentListeners;
- synchronized(lockObject) {
- currentListeners = listeners;
- }
- for (int idx=0; idx<currentListeners.size(); idx++) {
- ISystemPreferenceChangeListener l = (ISystemPreferenceChangeListener)currentListeners.get(idx);
- l.systemPreferenceChanged(event);
- }
- }
-
- /**
- * Test if a manager has any listeners registered.
- * @return true if there are any listeners, false if not.
- */
- public boolean hasListeners() {
- boolean result = false;
- synchronized(lockObject) {
- result = listeners.size() > 0;
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java
deleted file mode 100644
index 3298bdfb6..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfile.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * David Dykstal (IBM) - [197036] changed getFilterPools to not force the loading of subsystem configurations
- * removed createHost, migrated commit logic to SystemProfileManager
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * David Dykstal (IBM) - [200735][Persistence] Delete a profile that contains a connection and restart, profile is back without connections
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-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.IRSEPersistableContainer;
-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.RSEModelObject;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.internal.core.filters.SystemFilterPoolReference;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-
-/**
- * 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 = null;
- private IRSEPersistenceProvider provider = null;
- private boolean isActive = true;
- private String name = null;
- private boolean defaultPrivate = false;
-
- /**
- * A suspended profile ignored commit requests.
- * Profiles must be suspended prior to being deleted.
- */
- private boolean suspended = false;
-
- /**
- * Default constructor
- */
- protected SystemProfile()
- {
- super();
- }
-
- public SystemProfile(String name, boolean isActive) {
- this.name = name;
- this.isActive = isActive;
- }
-
- /**
- * 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;
- }
-
- /**
- * Return all connections for this profile
- */
- public IHost[] getHosts()
- {
- return RSECorePlugin.getTheSystemRegistry().getHostsByProfile(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#getFilterPools()
- */
- public ISystemFilterPool[] getFilterPools()
- {
- List filterPools = new ArrayList(10); // 10 is arbitrary but reasonable
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfigurationProxy proxies[] = registry.getSubSystemConfigurationProxies();
- for (int i = 0; i < proxies.length; i++) {
- ISubSystemConfigurationProxy proxy = proxies[i];
- if (proxy.isSubSystemConfigurationActive()) {
- ISubSystemConfiguration config = proxy.getSubSystemConfiguration();
- ISystemFilterPoolManager fpm = config.getFilterPoolManager(this);
- ISystemFilterPool[] poolArray = fpm.getSystemFilterPools();
- filterPools.addAll(Arrays.asList(poolArray));
- }
- }
- ISystemFilterPool[] result = new ISystemFilterPool[filterPools.size()];
- filterPools.toArray(result);
- return result;
- }
-
- /**
- * 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();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#suspend()
- */
- public void suspend() {
- suspended = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#resume()
- */
- public void resume() {
- suspended = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#isSuspended()
- */
- public boolean isSuspended() {
- return suspended;
- }
-
- /**
- * Return true if this profile is currently active.
- */
- public boolean isActive()
- {
- return isActive;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#setActive(boolean)
- */
- public void setActive(boolean activate) {
- if (activate) {
- activate();
- } else {
- deactivate();
- }
- }
-
- private void activate() {
- if (!isActive) {
- isActive = true;
- setDirty(true);
- RSEPreferencesManager.addActiveProfile(getName());
- }
- }
-
- private void deactivate() {
- ISystemProfile defaultProfile = mgr.getDefaultPrivateSystemProfile();
- if (isActive && this != defaultProfile) {
- isActive = false;
- setDirty(true);
- RSEPreferencesManager.deleteActiveProfile(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.
- */
- 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 RSECoreMessages.RESID_MODELOBJECTS_PROFILE_DESCRIPTION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#setName(java.lang.String)
- */
- public void setName(String newName) {
- if (newName.indexOf(SystemFilterPoolReference.DELIMITER) >= 0) {
- throw new IllegalArgumentException("Cannot have ___ in profile name.");
- }
- String oldName = name;
- if (!newName.equals(oldName)) {
- name = newName;
- setDirty(true);
- if (isActive) {
- RSEPreferencesManager.renameActiveProfile(oldName, 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;
- setDirty(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- boolean scheduled = false;
- if (!suspended) {
- IStatus status = SystemProfileManager.getDefault().commitSystemProfile(this);
- scheduled = status.isOK();
- }
- return scheduled;
- }
-
- /**
- * The SystemProfile is the top of the persistence hierarchy.
- * @return null
- */
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = new ArrayList(10);
- children.addAll(Arrays.asList(getFilterPools()));
- children.addAll(Arrays.asList(getHosts()));
- children.addAll(Arrays.asList(getPropertySets()));
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#getPersistenceProvider()
- */
- public IRSEPersistenceProvider getPersistenceProvider() {
- return provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfile#setPersistenceProvider(org.eclipse.rse.persistence.IRSEPersistenceProvider)
- */
- public void setPersistenceProvider(IRSEPersistenceProvider provider) {
- this.provider = provider;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java
deleted file mode 100644
index af392371e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - created and used RSEPreferencesManager
- * - moved SystemPreferencesManager to a new plugin
- * Kevin Doyle (IBM) - [197199] Renaming a Profile doesn't cause a save
- * Yu-Fen Kuo (MontaVista) - [189271] [team] New Profile's are always active
- * - [189219] [team] Inactive Profiles become active after workbench restart
- * David Dykstal (IBM) - [197036] added implementation of run() for commit transaction support
- * David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * David Dykstal (IBM) - [200735][Persistence] Delete a profile that contains a connection and restart, profile is back without connections
- * David Dykstal (IBM) - [226728] NPE during init with clean workspace
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.internal.core.RSEInitJob;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-
-/**
- * A class that manages a list of SystemProfile objects.
- * This should be used as a singleton.
- */
-public class SystemProfileManager implements ISystemProfileManager {
-
- private List _profiles = new ArrayList(10);
- private static SystemProfileManager singleton = new SystemProfileManager();
- private boolean active = true;
- private ISystemProfile defaultProfile = null;
-
- /**
- * Ordinarily there should be only one instance of a SystemProfileManager
- * created on the system, so the static method {@link #getDefault()} is
- * preferred to using this.
- */
- private SystemProfileManager() {
- }
-
- /**
- * @return (and create if necessary) the singleton instance of this class.
- */
- public static SystemProfileManager getDefault() {
- return singleton;
- }
-
- /**
- * Clear the default after a team synchronization say
- */
- public static void clearDefault() {
- singleton.forgetProfiles();
- }
-
- /**
- * Run an operation that make make changes to the persistent model in such a way that
- * results are scheduled to be persisted at the end of the operation.
- * @param operation an ISystemProfileOperation to be performed.
- * @return an IStatus indicating the status of the operation. Changes to
- * profiles are committed in any case.
- */
- public static IStatus run(ISystemProfileOperation operation) {
- IStatus result = null;
- SystemProfileManager instance = getDefault();
- result = instance.runOperation(operation);
- return result;
- }
-
- private IStatus runOperation(ISystemProfileOperation operation) {
- IStatus status = Status.OK_STATUS;
- boolean wasActive = active;
- active = false;
- try {
- status = operation.run();
- } finally {
- if (wasActive) {
- active = true;
- commitProfiles();
- }
- }
- return status;
- }
-
- private void commitProfiles() {
- for (Iterator z = _profiles.iterator(); z.hasNext();) {
- ISystemProfile profile = (ISystemProfile) z.next();
- profile.commit();
- }
- }
-
- public IStatus commitSystemProfile(ISystemProfile profile) {
- IStatus status = Status.OK_STATUS;
- boolean scheduled = false;
- if (active) {
- if (!RSECorePlugin.getThePersistenceManager().isBusy()) {
- scheduled = RSECorePlugin.getThePersistenceManager().commitProfile(profile, 5000);
- }
- } else {
- scheduled = true;
- }
- if (!scheduled) {
- String pluginId = RSECorePlugin.getDefault().getBundle().getSymbolicName();
- int code = 1; // TODO DWD make this a constant
- status = new Status(IStatus.INFO, pluginId, code, "", null); //$NON-NLS-1$
- }
- return status;
- }
-
- /**
- * 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) {
- ISystemProfile existingProfile = getSystemProfile(name);
- if (existingProfile != null) {
- existingProfile.suspend();
- deleteSystemProfile(existingProfile, false); // replace the existing one with a new profile
- }
- ISystemProfile newProfile = internalCreateSystemProfile(name);
- newProfile.setActive(makeActive);
- newProfile.commit();
- 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) {
- profile.setActive(makeActive);
- profile.commit();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfiles()
- */
- public ISystemProfile[] getSystemProfiles() {
- boolean restoring = !RSEInitJob.getInstance().isComplete(RSECorePlugin.INIT_ALL);
- return getSystemProfiles(restoring);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfileNames()
- */
- public String[] getSystemProfileNames() {
- ISystemProfile[] profiles = getSystemProfiles();
- String[] profileNames = new String[profiles.length];
- for (int i = 0; i < profiles.length; i++) {
- ISystemProfile profile = profiles[i];
- profileNames[i] = profile.getName();
- }
- return profileNames;
-// 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;
- }
-
-// /**
-// * Something changed so invalide cache of profiles so it will be regenerated
-// */
-// protected void invalidateCache() {
-// profileNames = null;
-// profileNamesVector = null;
-// }
-//
-
- public ISystemProfile getSystemProfile(String name) {
- ISystemProfile result = null;
- for (Iterator z = _profiles.iterator(); z.hasNext();) {
- ISystemProfile p = (ISystemProfile) z.next();
- if (p.getName().equals(name)) {
- result = p;
- break;
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfile(java.lang.String)
- */
-// private ISystemProfile getSystemProfileOld(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) {
- String oldName = profile.getName();
- profile.setName(newName);
- // Commit the profile to reflect the name change
- RSECorePlugin.getThePersistenceManager().commitProfile(profile, 5000);
- // Delete the profile by the old name, which is done in a separate job.
- RSECorePlugin.getThePersistenceManager().deleteProfile(profile.getPersistenceProvider(), oldName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile, boolean)
- */
- public void deleteSystemProfile(ISystemProfile profile, boolean persist) {
- if (profile != defaultProfile) {
- String oldName = profile.getName();
- boolean isActive = isSystemProfileActive(oldName);
- _profiles.remove(profile);
- if (isActive) {
- RSEPreferencesManager.deleteActiveProfile(oldName);
- }
- if (persist) {
- IRSEPersistenceProvider provider = profile.getPersistenceProvider();
- RSECorePlugin.getThePersistenceManager().deleteProfile(provider, 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;
- }
-
- public boolean isSystemProfileActive(String profileName) {
- ISystemProfile profile = getSystemProfile(profileName);
- return profile.isActive();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#isSystemProfileActive(java.lang.String)
- */
-// private boolean isSystemProfileActiveOld(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() {
- List activeProfiles = new ArrayList();
- for (Iterator z = _profiles.iterator(); z.hasNext();) {
- ISystemProfile p = (ISystemProfile) z.next();
- if (p.isActive()) {
- activeProfiles.add(p);
- }
- }
- ISystemProfile[] result = new ISystemProfile[activeProfiles.size()];
- activeProfiles.toArray(result);
- return result;
-// 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;
- }
-
- public String[] getActiveSystemProfileNames() {
- ISystemProfile[] profiles = getActiveSystemProfiles();
- String[] names = new String[profiles.length];
- for (int i = 0; i < profiles.length; i++) {
- ISystemProfile systemProfile = profiles[i];
- names[i] = systemProfile.getName();
- }
- return names;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getActiveSystemProfileNames()
- */
-// private String[] getActiveSystemProfileNamesOld() {
-// String[] activeProfileNames = RSEPreferencesManager.getActiveProfiles();
-// // 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 = RSEPreferencesManager.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(RSEPreferencesManager.getDefaultTeamProfileName())) {
-// 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
-// RSEPreferencesManager.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()) {
-// RSEPreferencesManager.addActiveProfile(name);
-// RSEPreferencesManager.deleteActiveProfile(RSECorePlugin.getLocalMachineName());
-// activeProfileNames = RSEPreferencesManager.getActiveProfiles();
-// }
-// }
-// }
-//
-// // 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) {
-// RSEPreferencesManager.addActiveProfile(RSEPreferencesManager.getDefaultTeamProfileName());
-// changed = true;
-// }
-//
-// if (!found_private) {
-// RSEPreferencesManager.addActiveProfile(RSECorePlugin.getLocalMachineName());
-// changed = true;
-// }
-// } else {
-// ISystemProfile defaultProfile = getDefaultPrivateSystemProfile();
-// if (defaultProfile != null && !found_private) {
-// RSEPreferencesManager.addActiveProfile(defaultProfile.getName());
-// changed = true;
-// }
-// }
-//
-// if (changed) {
-// activeProfileNames = RSEPreferencesManager.getActiveProfiles();
-// }
-// }
-//
-// return activeProfileNames;
-// }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getDefaultPrivateSystemProfile()
- */
- public ISystemProfile getDefaultPrivateSystemProfile() {
- ensureDefaultPrivateProfile();
- return defaultProfile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getDefaultTeamSystemProfile()
- */
- public ISystemProfile getDefaultTeamSystemProfile() {
- ensureDefaultTeamProfile();
- ISystemProfile teamProfile = getSystemProfile(RSEPreferencesManager.getDefaultTeamProfileName());
- return teamProfile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemProfileManager#getSize()
- */
- public int getSize() {
- return _profiles.size();
- }
-
- /**
- * Adds a newly restored profile to this manager
- * @param profile the profile to add
- */
- public void addSystemProfile(ISystemProfile profile) {
- _profiles.add(profile);
- profile.setProfileManager(this);
- String name = profile.getName();
- if (profile.isActive()) {
- RSEPreferencesManager.addActiveProfile(name);
- }
- }
-
- private void createDefaultPrivateProfile() {
- String initProfileName = RSEPreferencesManager.getDefaultPrivateSystemProfileName();
- ISystemProfile profile = internalCreateSystemProfile(initProfileName);
- profile.setDefaultPrivate(true);
- defaultProfile = profile;
- }
-
- private ISystemProfile internalCreateSystemProfile(String name) {
- ISystemProfile profile = new SystemProfile();
- profile.setName(name);
- addSystemProfile(profile);
- return profile;
- }
-
- /**
- * Ensure that one profile is always the default profile
- */
- private void ensureDefaultPrivateProfile() {
- if (defaultProfile == null) {
- for (Iterator z = _profiles.iterator(); z.hasNext() && defaultProfile == null;) {
- ISystemProfile profile = (ISystemProfile) z.next();
- if (profile.isDefaultPrivate()) {
- defaultProfile = profile;
- }
- }
- }
- if (defaultProfile == null) {
- // find one with the right name
- String defaultPrivateProfileName = RSEPreferencesManager.getDefaultPrivateSystemProfileName();
- for (Iterator z = _profiles.iterator(); z.hasNext() && defaultProfile == null;) {
- ISystemProfile profile = (ISystemProfile) z.next();
- if (profile.getName().equals(defaultPrivateProfileName)) {
- profile.setDefaultPrivate(true);
- defaultProfile = profile;
- }
- }
- }
- if (defaultProfile == null) {
- // Find the first profile that is not the Team profile and make it the default private profile
- String defaultTeamProfileName = RSEPreferencesManager.getDefaultTeamProfileName();
- for (Iterator z = _profiles.iterator(); z.hasNext() && defaultProfile == null;) {
- ISystemProfile profile = (ISystemProfile) z.next();
- if (!profile.getName().equals(defaultTeamProfileName)) {
- profile.setDefaultPrivate(true);
- defaultProfile = profile;
- }
- }
- }
- if (defaultProfile == null) {
- // If Team is the only profile - then put a message in the log and create the default private profile
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.logWarning("Only one Profile Team exists - there is no Default Profile"); //$NON-NLS-1$
- createDefaultPrivateProfile();
- }
- defaultProfile.setActive(true); // ensure that the default profile is active
- }
-
- private void forgetProfiles() {
- _profiles.clear();
- }
-
- private void ensureDefaultTeamProfile() {
- String name = RSEPreferencesManager.getDefaultTeamProfileName();
- ISystemProfile teamProfile = getSystemProfile(name);
- if (teamProfile == null) {
- teamProfile = internalCreateSystemProfile(name);
- }
- }
-
- private ISystemProfile[] getSystemProfiles(boolean restoring) {
- if (!restoring) {
- ensureDefaultPrivateProfile();
- }
- ISystemProfile[] result = new ISystemProfile[_profiles.size()];
- _profiles.toArray(result);
- return result;
- }
-
-// /**
-// * 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.
-// */
-// private ISystemProfile getOrCreateSystemProfile(String userProfileName) {
-// ISystemProfile userProfile = getSystemProfile(userProfileName);
-// if (userProfile == null) {
-// userProfile = internalCreateSystemProfile(userProfileName);
-// }
-// return userProfile;
-// }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java
deleted file mode 100644
index 249f61fd8..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java
+++ /dev/null
@@ -1,3161 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - patch for an NPE in getSubSystemConfigurations()
- * David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
- * Uwe Stieber (Wind River) - bugfixing
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Tobias Schwarz (Wind River) - [183134] getLocalHost() does not return Local
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * Martin Oberhuber (Wind River) - [186773] split SystemRegistryUI from SystemRegistry implementation
- * Martin Oberhuber (Wind River) - [189123] Prepare ISystemRegistry for move into non-UI
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location
- * David McKnight (IBM) - [165674] Sort subsystem configurations to be in deterministic order
- * Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by priority then Id
- * Martin Oberhuber (Wind River) - [194898] Avoid NPE when doing EVENT_REFRESH_REMOTE on a subsys without filters
- * David McKnight (IBM) - [207100] adding ISystemRegistry.isRegisteredSystemRemoteChangeListener
- * Martin Oberhuber (Wind River) - [206742] Make SystemHostPool thread-safe
- * David Dykstal (IBM) - [210537] removed exception handling for SystemHostPool, no longer needed
- * Martin Oberhuber (Wind River) - [216266] improved non-forced getSubSystems() code, removed getSubSystemsLazily()
- * David Dykstal (IBM) - [197036] wrapped createHost to commit changes only once
- * rewrote createHost to better pick default subsystem configurations to activate
- * rewrote getSubSystemConfigurationsBySystemType to be able to delay the creation (and loading) of subsystem configurations
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David Dykstal (IBM) - [200735][Persistence] Delete a profile that contains a connection and restart, profile is back without connections
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * Martin Oberhuber (Wind River) - [228774] Improve ElementComparer Performance
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [229116] NPE in when editing remote file in new workspace
- * David McKnight (IBM) - [234057] Wrong or missing model change event
- * David Dykstal (IBM) - [227750] do not fire events if there are no listeners
- * David McKnight (IBM) - [238673] Expansion icon (plus sign) disappears from Work With Libraries entry
- * David McKnight (IBM) - [240991] RSE startup creates display on worker thread before workbench.
- * David Dykstal (IBM) - [236516] Bug in user code causes failure in RSE initialization
- * David McKnight (IBM) - [249247] Expand New Connections
- * David McKnight (IBM) - [254590] When disconnecting a subsystem with COLLAPSE option, subsystems of other connector services also get collapsed
- * Martin Oberhuber (Wind River) - [245154][api] add getSubSystemConfigurationProxiesBySystemType()
- * Zhou Renjian (Kortide) - [282238] NPE when copying host and overwrite itself
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-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.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.events.ISystemModelChangeListener;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeListener;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.filters.ISystemFilter;
-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.filters.SystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISubSystemConfigurationCategories;
-import org.eclipse.rse.core.model.ISubSystemConfigurator;
-import org.eclipse.rse.core.model.ISystemContainer;
-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.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-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.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.internal.core.filters.SystemFilterStartHere;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Registry for all connections.
- */
-public class SystemRegistry implements ISystemRegistry
-{
- private static Exception lastException = null;
- private static SystemRegistry registry = null;
- private final SystemResourceChangeManager listenerManager = new SystemResourceChangeManager();
- private final SystemPreferenceChangeManager preferenceListManager = new SystemPreferenceChangeManager();
- private final SystemModelChangeEventManager modelListenerManager = new SystemModelChangeEventManager();
- private final SystemRemoteChangeEventManager remoteListManager = new SystemRemoteChangeEventManager();
-
- private ISubSystemConfigurationProxy[] subsystemConfigurationProxies = null;
- private boolean errorLoadingFactory = false;
-
- //For ISystemViewInputProvider
- private Object viewer = 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();
-
- // 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 SystemRegistry getInstance(String logfilePath)
- {
- if (registry == null)
- new SystemRegistry(logfilePath);
- return registry;
- }
-
- /**
- * Return singleton instance assuming it already exists.
- */
- public static SystemRegistry getInstance()
- {
- 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;
-// }
-
- /**
- * 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)
- {
- // DWD shouldn't this be "getHostChildren"? Its part of the ISystemViewInputProvider interface.
- Object[] result = getSubSystems(selectedConnection);
- return result;
- }
- /**
- * 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 (subsystemConfigurationProxies != null)
- {
- for (int idx = 0; (!hasSubsystems) && (idx < subsystemConfigurationProxies.length); idx++)
- {
- if (subsystemConfigurationProxies[idx].appliesToSystemType(selectedConnection.getSystemType().getName()) &&
- subsystemConfigurationProxies[idx].isSubSystemConfigurationActive())
- {
- SubSystemConfiguration factory = subsystemConfigurationProxies[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;
- */
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- // ----------------------------
- // 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.
- *
- * Proxies must be set sorted by priority, then ID in order to get deterministic
- * results for all getSubSystemConfiguration*() queries.
- */
- public void setSubSystemConfigurationProxies(ISubSystemConfigurationProxy[] proxies)
- {
- subsystemConfigurationProxies = 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 subsystemConfigurationProxies;
- }
-
- /**
- * Return all subsystem factory proxies matching a subsystem factory category.
- * @see ISubSystemConfigurationCategories
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesByCategory(String factoryCategory)
- {
- Vector v = new Vector();
- if (subsystemConfigurationProxies != null)
- {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
- if (subsystemConfigurationProxies[idx].getCategory().equals(factoryCategory))
- v.addElement(subsystemConfigurationProxies[idx]);
- }
- ISubSystemConfigurationProxy[] proxies = new ISubSystemConfigurationProxy[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- {
- proxies[idx] = (ISubSystemConfigurationProxy) v.elementAt(idx);
- }
- return proxies;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystemConfigurationProxiesBySystemType(org.eclipse.rse.core.IRSESystemType)
- */
- public ISubSystemConfigurationProxy[] getSubSystemConfigurationProxiesBySystemType(IRSESystemType systemType)
- {
- List l = new ArrayList();
- if (subsystemConfigurationProxies != null)
- {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
- if (Arrays.asList(subsystemConfigurationProxies[idx].getSystemTypes()).contains(systemType))
- l.add(subsystemConfigurationProxies[idx]);
- }
- return (ISubSystemConfigurationProxy[]) l.toArray(new ISubSystemConfigurationProxy[l.size()]);
- }
-
- /**
- * 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;
- }
-
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystemConfigurationsBySystemType(org.eclipse.rse.core.IRSESystemType, boolean)
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(IRSESystemType systemType, boolean filterDuplicateServiceSubSystemFactories)
- {
- return getSubSystemConfigurationsBySystemType(systemType, filterDuplicateServiceSubSystemFactories, true);
- }
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystemConfigurationsBySystemType(org.eclipse.rse.core.IRSESystemType, boolean)
- */
- public ISubSystemConfiguration[] getSubSystemConfigurationsBySystemType(IRSESystemType systemType, final boolean filterDuplicates, boolean activate) {
- List configurations = new ArrayList();
- if (subsystemConfigurationProxies != null) {
- Set serviceTypes = new HashSet();
-// Set serviceImplsAdded = new HashSet();
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
- ISubSystemConfigurationProxy subsystemConfigurationProxy = subsystemConfigurationProxies[idx];
- if (subsystemConfigurationProxy.appliesToSystemType(systemType)) {
- if (activate || subsystemConfigurationProxy.isSubSystemConfigurationActive()) {
- ISubSystemConfiguration configuration = subsystemConfigurationProxy.getSubSystemConfiguration();
- if (configuration != null) { // could happen if activate fails
- Class serviceType = configuration.getServiceType();
- if (filterDuplicates && serviceType != null) {
- if (!serviceTypes.contains(serviceType)) {
- serviceTypes.add(serviceType);
- configurations.add(configuration);
- }
- } else {
- configurations.add(configuration);
- }
- }
- }
- }
- }
- }
- ISubSystemConfiguration[] result = (ISubSystemConfiguration[]) configurations.toArray(new ISubSystemConfiguration[configurations.size()]);
- return result;
- }
-
- // ----------------------------
- // PROFILE METHODS...
- // ----------------------------
- /**
- * Return singleton profile manager
- */
- public ISystemProfileManager getSystemProfileManager()
- {
- return SystemProfileManager.getDefault();
- }
-
- /**
- * Return the profiles currently selected by the user as his "active" profiles
- */
- public ISystemProfile[] getActiveSystemProfiles()
- {
- return getSystemProfileManager().getActiveSystemProfiles();
- }
-
- /**
- * 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(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED,
- ISystemModelChangeEvents.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)
- {
- factory.renameSubSystemProfile(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);
- }
- }
- ////Listening to events now
- //SystemPreferencesManager.setConnectionNamesOrder(); // update preferences order list
- //boolean namesQualifed = SystemPreferencesManager.getQualifyConnectionNames();
- //if (namesQualifed)
- // setQualifiedHostNames(namesQualifed); // causes refresh events to be fired
-
- fireModelChangeEvent(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED,
- ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
- profile, oldName);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#copySystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ISystemProfile copySystemProfile(ISystemProfile profile, String newName, boolean makeActive, IProgressMonitor monitor) throws Exception
- {
- Exception lastExc = null;
- boolean failed = false;
- String msg = null;
- String oldName = profile.getName();
- IHost[] newConns = null;
-
- //RSECorePlugin.getDefault().getLogger().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];
- String msgNoSubs = RSECoreMessages.MSG_COPYCONNECTION_PROGRESS;
- for (int idx = 0; idx < conns.length; idx++)
- {
- msg = NLS.bind(msgNoSubs, conns[idx].getAliasName());
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), msg);
- monitor.subTask(msg);
-
- newConns[idx] = oldPool.cloneHost(newPool, conns[idx], conns[idx].getAliasName());
-
- monitor.worked(1);
- //try { java.lang.Thread.sleep(3000l); } catch (InterruptedException e) {}
- }
- }
- msg = RSECoreMessages.MSG_COPYFILTERPOOLS_PROGRESS;
- monitor.subTask(msg);
- RSECorePlugin.getDefault().getLogger().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);
- RSECorePlugin.getDefault().getLogger().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 = RSECoreMessages.MSG_COPYSUBSYSTEMS_PROGRESS;
- monitor.subTask(msg);
- RSECorePlugin.getDefault().getLogger().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);
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), msg);
- subsystems = getSubSystems(conns[idx]); // get old subsystems for this connection
- if ((subsystems != null) && (subsystems.length > 0) && newConns != null)
- {
- for (int jdx = 0; jdx < subsystems.length; jdx++)
- {
- msg += ": subsystem " + subsystems[jdx].getName(); //$NON-NLS-1$
- //monitor.subTask(msg);
- RSECorePlugin.getDefault().getLogger().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
- {
- newProfile.suspend();
- if (newConns != null)
- for (int idx = 0; idx < newConns.length; idx++)
- deleteHost(newConns[idx]);
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
- {
- ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
- if (factory != null)
- factory.deletingSystemProfile(newProfile);
- }
- getSystemProfileManager().deleteSystemProfile(newProfile, true);
- }
- catch (Exception exc)
- {
- RSECorePlugin.getDefault().getLogger().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(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED,
- ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
- newProfile, null);
-
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), "Copy of system profile " + oldName + " to " + newName + " successful"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return newProfile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile)
- */
- public void deleteSystemProfile(ISystemProfile profile) throws Exception {
- ISystemProfileManager manager = getSystemProfileManager();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
- if (profile != defaultProfile) {
- // load everything
- profile.suspend();
- loadAll();
- // remove connections
- IHost[] connections = getHostsByProfile(profile);
- for (int idx = 0; idx < connections.length; idx++) {
- deleteHost(connections[idx]);
- }
- // remove filter pools for this profile
- if (subsystemConfigurationProxies != null) {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
- ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
- if (factory != null) factory.deletingSystemProfile(profile);
- }
- }
- // remove the profile
- manager.deleteSystemProfile(profile, true);
- // fire events
- if (connections.length > 0) { // defect 42112
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(connections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
- fireEvent(event);
- }
- fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE, profile, null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#setSystemProfileActive(org.eclipse.rse.core.model.ISystemProfile, boolean)
- */
- public void setSystemProfileActive(ISystemProfile profile, boolean makeActive) {
- ISystemProfileManager manager = getSystemProfileManager();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
- if (profile != defaultProfile) {
- // Test if there are any filter pools in this profile that are referenced by another active profile...
- Vector activeReferenceVector = new Vector();
- if (!makeActive && (subsystemConfigurationProxies != null)) {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
- ISubSystemConfiguration factory = subsystemConfigurationProxies[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) {
- String msg = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REFS, profile.getName());
- RSECorePlugin.getDefault().getLogger().logWarning(msg);
- for (int idx = 0; idx < activeReferenceVector.size(); idx++) {
- ISubSystem activeReference = (ISubSystem) activeReferenceVector.elementAt(idx);
- msg = " " + activeReference.getName(); //$NON-NLS-1$
- msg += NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REF, activeReference.getHost().getAliasName(), activeReference.getSystemProfileName());
- RSECorePlugin.getDefault().getLogger().logWarning(msg);
- }
- ISubSystem firstSubSystem = (ISubSystem) activeReferenceVector.elementAt(0);
- String connectionName = firstSubSystem.getHost().getSystemProfileName() + "." + firstSubSystem.getHost().getAliasName(); //$NON-NLS-1$
- msg = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED, profile.getName(), connectionName);
- RSECorePlugin.getDefault().getLogger().logWarning(msg);
- }
- getSystemProfileManager().makeSystemProfileActive(profile, makeActive);
- // Each factory may have to load the subsystems for connections that are suddenly active.
- if (subsystemConfigurationProxies != null) {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
- if (subsystemConfigurationProxies[idx].isSubSystemConfigurationActive()) { // don't bother if not yet alive
- ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
- if (factory != null) factory.changingSystemProfileActiveStatus(profile, makeActive);
- }
- }
- }
- // notify the hosts that are affected by this change
- IHost[] affectedConnections = getHostsByProfile(profile);
- // 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 SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
- fireEvent(event);
- }
- }
- // add...
- else if ((affectedConnections != null) && (affectedConnections.length > 0)) {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_ADD_MANY, this);
- fireEvent(event);
- }
- fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE, profile, null);
- }
- }
-
- // private profile methods...
-
- /**
- * Get a SystemProfile given a connection pool
- */
- private ISystemProfile getSystemProfile(ISystemHostPool pool)
- {
- return pool.getSystemProfile();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getConnectorServices(org.eclipse.rse.core.model.IHost)
- */
- public IConnectorService[] getConnectorServices(IHost host) {
- List services = new ArrayList();
- ISubSystem[] subsystems = getSubSystems(host);
- for (int i = 0; i < subsystems.length; i++) {
- ISubSystem subsystem = subsystems[i];
- IConnectorService service = subsystem.getConnectorService();
- if (!services.contains(service)) {
- services.add(service);
- }
- }
- return (IConnectorService[]) services.toArray(new IConnectorService[services.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(org.eclipse.rse.core.model.IHost, boolean)
- */
- public ISubSystem[] getSubSystems(IHost host, boolean force) {
- return getSubSystems(host);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(org.eclipse.rse.core.model.IHost)
- */
- public ISubSystem[] getSubSystems(IHost host) {
- IRSESystemType systemType = host.getSystemType();
- List subsystems = new ArrayList();
- if (subsystemConfigurationProxies != null) {
- for (int i = 0; i < subsystemConfigurationProxies.length; i++) {
- ISubSystemConfigurationProxy proxy = subsystemConfigurationProxies[i];
- if (proxy.appliesToSystemType(systemType)) {
- if (proxy.isSubSystemConfigurationActive()) {
- ISubSystemConfiguration config = proxy.getSubSystemConfiguration();
- ISubSystem[] ssArray = config.getSubSystems(host, false);
- if (ssArray == null) { // create a subsystem for this connection and config
- ssArray = this.createSubSystems(host, new ISubSystemConfiguration[] {config});
- }
- subsystems.addAll(Arrays.asList(ssArray));
- }
- }
- }
- }
- ISubSystem[] result = new ISubSystem[subsystems.size()];
- subsystems.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystem(java.lang.String)
- */
- public ISubSystem getSubSystem(String absoluteSubSystemName)
- {
- ISubSystem result = null;
- // 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());
-
- ISystemProfile profile = getSystemProfile(srcProfileName);
- if (profile != null) {
- result = getSubSystem(profile, srcConnectionName, srcSubSystemConfigurationId);
- }
- }
-
- return result;
- }
-
- /**
- * Resolve a subsystem from it's profile, connection and subsystem name.
- *
- * @param profile the profile to search
- * @param srcConnectionName the name of the connection
- * @param subsystemConfigurationId the factory Id of the subsystem
- *
- * @return the subsystem
- */
- public ISubSystem getSubSystem(ISystemProfile profile, String srcConnectionName, String subsystemConfigurationId)
- {
- // find the src connection
- IHost[] connections = getHostsByProfile(profile);
- if (connections == null)
- {
- // if the profile can't be found, get all connections
- connections = 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(subsystemConfigurationId))
- {
- 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(subsystemConfigurationId))
- {
- return subsystem;
- }
- }
- }
- }
- }
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getAbsoluteNameForSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- 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();
- }
-
- /**
- * Adapt the given element to an adapter that allows reading the element's
- * absolute name and parent subsystem.
- *
- * @param element an element to adapt.
- * @return the requested adapter, or <code>null</code> if the element is
- * not adaptable as needed.
- * @since org.eclipse.rse.core 3.0
- */
- public static ISystemDragDropAdapter getSystemDragDropAdapter(Object element) {
- if (element == null)
- return null;
- Object adapter = null;
- if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) element;
- adapter = adaptable.getAdapter(ISystemDragDropAdapter.class);
- if (adapter == null) {
- adapter = Platform.getAdapterManager().getAdapter(element, "org.eclipse.rse.ui.view.ISystemViewElementAdapter"); //$NON-NLS-1$
- if (adapter == null) {
- return null;
- }
- assert false : "Found ISystemViewElementAdapter but no ISystemDragDropAdapter"; //$NON-NLS-1$
- }
- } else {
- IAdapterManager am = Platform.getAdapterManager();
- adapter = am.getAdapter(element, ISystemDragDropAdapter.class.getName());
- if (adapter == null) {
- adapter = am.getAdapter(element, "org.eclipse.rse.ui.view.ISystemViewElementAdapter"); //$NON-NLS-1$
- if (adapter == null) {
- return null;
- }
- assert false : "Found ISystemViewElementAdapter but no ISystemDragDropAdapter"; //$NON-NLS-1$
- }
- }
- // At this point, we know for sure that we can adapt!
- return (ISystemDragDropAdapter) adapter;
- }
-
- /**
- * Check if two objects refers to the same system object by comparing their
- * absolute Names and subsystem id's.
- *
- * @param firstObject the first object to compare
- * @param firstObjectFullName the full name of the firstObject. If null, get
- * the full name from the firstObject
- * @param secondObject the second object to compare
- * @param secondObjectFullName the full name of the secondObject. If null,
- * get the full name from the secondObject
- * @return <code>true</code> if the objects to be compared are the same
- * instance; or, if both objects are non-null and adaptable to an
- * RSE ISystemDragDropAdapter each, and those adapters do return a
- * valid absolute name that's the same for both elements, and both
- * elements belong to the same subsystem instance. Otherwise,
- * <code>false</code> in all other cases.
- */
- public static boolean isSameObjectByAbsoluteName(Object firstObject, String firstObjectFullName, Object secondObject, String secondObjectFullName)
- {
- if (firstObject == secondObject) {
- return true;
- }
- // should never be comparing null objects
- if (firstObject == null || secondObject == null){
- return false;
- }
-
- // two different message objects should not be considered the same
- if (firstObject instanceof SystemMessageObject){
- return false;
- }
-
- ISystemDragDropAdapter adA = null;
- ISystemDragDropAdapter adB = null;
- if (firstObjectFullName == null) {
- adA = getSystemDragDropAdapter(firstObject);
- if (adA != null) {
- firstObjectFullName = adA.getAbsoluteName(firstObject);
- }
- }
- if (secondObjectFullName == null) {
- adB = getSystemDragDropAdapter(secondObject);
- if (adB != null) {
- secondObjectFullName = adB.getAbsoluteName(secondObject);
- }
- }
- if (firstObjectFullName != null && firstObjectFullName.equals(secondObjectFullName)) {
- // full names exist and are the same: compare the subsystems
- if (adA == null) { // firstFullName was passed in
- adA = getSystemDragDropAdapter(firstObject);
- assert adA != null : "full name \"" + firstObjectFullName + "\" has no ISystemDragDropAdapter!"; //$NON-NLS-1$ //$NON-NLS-2$
- assert firstObjectFullName.equals(adA.getAbsoluteName(firstObject)) : "full name \"" + firstObjectFullName + "\" differs from adapter response: " + adA.getAbsoluteName(firstObject); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (adB == null) { // secondFullName was passed in
- adB = getSystemDragDropAdapter(secondObject);
- assert adB != null : "full name \"" + secondObjectFullName + "\" has no ISystemDragDropAdapter!"; //$NON-NLS-1$ //$NON-NLS-2$
- assert secondObjectFullName.equals(adB.getAbsoluteName(secondObject)) : "full name \"" + firstObjectFullName + "\" differs from adapter response: " + adB.getAbsoluteName(secondObject); //$NON-NLS-1$ //$NON-NLS-2$
- }
- ISubSystem ssA = adA.getSubSystem(firstObject);
- ISubSystem ssB = adB.getSubSystem(secondObject);
- return ssA == ssB;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getAbsoluteNameForConnection(org.eclipse.rse.core.model.IHost)
- */
- public String getAbsoluteNameForConnection(IHost connection)
- {
- StringBuffer dataStream = new StringBuffer();
-
- String profileName = connection.getSystemProfileName();
- String connectionName = connection.getAliasName();
-
- dataStream.append(profileName);
- dataStream.append(".");
- dataStream.append(connectionName);
- return dataStream.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubsystems(org.eclipse.rse.core.model.IHost, java.lang.Class)
- */
- public ISubSystem[] getSubsystems(IHost host, Class subsystemInterface)
- {
- List matches = new ArrayList();
- ISubSystem[] allSS = getSubSystems(host);
- for (int i = 0; i < allSS.length; i++)
- {
- ISubSystem ss = allSS[i];
- if (subsystemInterface.isInstance(ss))
- {
- matches.add(ss);
- }
- }
- return (ISubSystem[])matches.toArray(new ISubSystem[matches.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getServiceSubSystems(org.eclipse.rse.core.model.IHost, java.lang.Class)
- */
- public ISubSystem[] getServiceSubSystems(IHost host, Class serviceType)
- {
- List matches = new ArrayList();
- ISubSystem[] allSS = getSubSystems(host);
- for (int i = 0; i < allSS.length; i++)
- {
- ISubSystem ss = allSS[i];
- Class thisServiceType = ss.getServiceType();
- if (thisServiceType == serviceType)
- {
- matches.add(ss);
- }
- }
- return (ISubSystem[])matches.toArray(new ISubSystem[matches.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSubSystemsBySubSystemConfigurationCategory(java.lang.String, org.eclipse.rse.core.model.IHost)
- */
- public ISubSystem[] getSubSystemsBySubSystemConfigurationCategory(String factoryCategory, IHost host)
- {
- ISubSystem[] subsystems = getSubSystems(host);
- 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]);
- }
-
- public ISubSystemConfiguration[] getSubSystemConfigurations() {
- // fixed Bugzilla Bug 160115 - added non-null guard for config
- 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 = subsystem.getSubSystemConfiguration();
- 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) {
- ISystemHostPool result = SystemHostPool.getSystemHostPool(profile);
- return result;
- }
-
- /**
- * 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;
- IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
- IHost[] conns = getHostsBySystemType(localType);
- 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.
- * All array elements are valid hosts (never returns null elements).
- */
- public IHost[] getHosts()
- {
- ISystemHostPool[] pools = getHostPools();
- List hosts = new ArrayList();
- for (int idx = 0; idx < pools.length; idx++) {
- IHost[] conns = pools[idx].getHosts();
- if (conns != null) {
- for (int jdx = 0; jdx < conns.length; jdx++) {
- //ISystemHostPool ensures that we never have "null" hosts.
- assert conns[jdx]!=null : "Null host in pool "+pools[idx].getName()+" at "+jdx;
- hosts.add(conns[jdx]);
- }
- }
- }
- IHost[] allConns = (IHost[])hosts.toArray(new IHost[hosts.size()]);
- return allConns;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsByProfile(org.eclipse.rse.core.model.ISystemProfile)
- */
- public IHost[] getHostsByProfile(ISystemProfile profile)
- {
- ISystemHostPool pool = getHostPool(profile);
- return pool.getHosts();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySubSystemConfigurationCategory(java.lang.String)
- */
- public IHost[] getHostsBySubSystemConfigurationCategory(String factoryCategory)
- {
- Vector v = new Vector();
- if (subsystemConfigurationProxies != null)
- {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
- {
- if (subsystemConfigurationProxies[idx].getCategory().equals(factoryCategory))
- {
- ISubSystemConfiguration factory = subsystemConfigurationProxies[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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySystemType(org.eclipse.rse.core.IRSESystemType)
- */
- public IHost[] getHostsBySystemType(IRSESystemType systemType) {
- List connections = new ArrayList();
-
- if (systemType != null) {
- IHost[] candidates = getHosts();
- for (int i = 0; i < candidates.length; i++) {
- IHost candidate = candidates[i];
- IRSESystemType candidateType = candidate.getSystemType();
- if (systemType.equals(candidateType)) {
- connections.add(candidate);
- }
- }
- }
-
- return (IHost[])connections.toArray(new IHost[connections.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostsBySystemTypes(org.eclipse.rse.core.IRSESystemType[])
- */
- public IHost[] getHostsBySystemTypes(IRSESystemType[] systemTypes)
- {
- List systemTypesList = Arrays.asList(systemTypes);
- IHost[] connections = getHosts();
- Vector v = new Vector();
- for (int idx = 0; idx < connections.length; idx++)
- {
- IRSESystemType systemType = connections[idx].getSystemType();
- if (systemTypesList.contains(systemType)) {
- v.addElement(connections[idx]);
- }
- }
- return (IHost[])v.toArray(new IHost[v.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHost(org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
- */
- public IHost getHost(ISystemProfile profile, String connectionName)
- {
- return getHostPool(profile).getHost(connectionName);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostPosition(org.eclipse.rse.core.model.IHost)
- */
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostCount(org.eclipse.rse.core.model.ISystemProfile)
- */
- public int getHostCount(ISystemProfile profile)
- {
- return getHostPool(profile).getHostCount();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostCountWithinProfile(org.eclipse.rse.core.model.IHost)
- */
- public int getHostCountWithinProfile(IHost conn)
- {
- return conn.getHostPool().getHostCount();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostCount()
- */
- public int getHostCount()
- {
- ISystemHostPool[] pools = getHostPools();
- int total = 0;
- for (int idx = 0; idx < pools.length; idx++)
- {
- total += pools[idx].getHostCount();
- }
- return total;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostAliasNames(org.eclipse.rse.core.model.ISystemProfile)
- */
- public Vector getHostAliasNames(ISystemProfile profile)
- {
- ISystemHostPool pool = getHostPool(profile);
- Vector names = new Vector();
- IHost[] conns = pool.getHosts();
- for (int idx = 0; idx < conns.length; idx++)
- {
- names.addElement(conns[idx].getAliasName());
- }
- return names;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostAliasNamesForAllActiveProfiles()
- */
- public Vector getHostAliasNamesForAllActiveProfiles()
- {
- ISystemHostPool[] allPools = getHostPools();
- Vector allNames = new Vector();
- for (int idx = 0; idx < allPools.length; idx++)
- {
- Vector v = getHostAliasNames(getSystemProfile(allPools[idx]));
- for (int jdx = 0; jdx < v.size(); jdx++)
- allNames.addElement(v.elementAt(jdx));
- }
- return allNames;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getHostNames(org.eclipse.rse.core.IRSESystemType)
- */
- public String[] getHostNames(IRSESystemType systemType)
- {
- Vector v = new Vector();
-
- if (systemType != null)
- {
- IHost[] conns = getHosts();
- for (int idx = 0; idx < conns.length; idx++)
- {
- // Note: IHost.getHostName() can return null if the connection is using
- // any non-IP based connectivity (serial line, JTAG, ...). Adding
- // null unchecked to the result list will trigger InvalidArgumentExceptions
- // in SystemConnectionForm.
- if (conns[idx].getHostName() != null && !v.contains(conns[idx].getHostName()))
- {
- if (conns[idx].getSystemType().equals(systemType))
- v.addElement(conns[idx].getHostName());
- }
- }
- }
- if ((systemType != null) && (systemType.isLocal() && (v.size() == 0)))
- v.addElement("localhost");
- return (String[])v.toArray(new String[v.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#createLocalHost(org.eclipse.rse.core.model.ISystemProfile, java.lang.String, java.lang.String)
- */
- 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
- {
- IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
- localConn = createHost(
- profile.getName(), localType,
- name, // connection name
- "localhost", // hostname //$NON-NLS-1$
- "", // description
- // DY: defect 42101, description cannot be null
- // null, // description
- userId, // default user Id
- IRSEUserIdConstants.USERID_LOCATION_DEFAULT_SYSTEMTYPE, null);
-
- }
- catch (Exception exc)
- {
- RSECorePlugin.getDefault().getLogger().logError("Error creating local connection", exc);
- }
- return localConn;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#createHost(java.lang.String, org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int, org.eclipse.rse.core.model.ISubSystemConfigurator[])
- */
- public IHost createHost(
- String profileName,
- IRSESystemType systemType,
- String connectionName,
- String hostName,
- String description,
- String defaultUserId,
- int defaultUserIdLocation,
- ISubSystemConfigurator[] configurators)
- throws Exception
- {
- return createHost(profileName, systemType, connectionName, hostName, description, defaultUserId, defaultUserIdLocation, true, configurators);
- }
-
- /**
- * Create a host object, given its host pool and its attributes.
- * <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 types defined via the systemTypes extension point.
- * @param hostName unique connection name.
- * @param hostAddress 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 createSubSystems <code>true</code> to create subsystems for the host, <code>false</code> otherwise.
- * @param configurators the list of all configurators supplied by the subsystem configuration 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(final String profileName, final IRSESystemType systemType, final String hostName,
- final String hostAddress, final String description, final String defaultUserId,
- final int defaultUserIdLocation, final boolean createSubSystems,
- final ISubSystemConfigurator[] configurators) throws Exception {
- final ISystemRegistry sr = this;
- class CreateHostOperation implements ISystemProfileOperation {
- private IHost host = null;
- private ISubSystem[] subsystems = new ISubSystem[0];
- IHost getHost() {
- return host;
- }
- public ISubSystem[] getSubSystems() {
- return subsystems;
- }
- public IStatus run() {
- IStatus status = Status.OK_STATUS;
- ISystemHostPool pool = getHostPool(profileName);
- try {
- // create, register and save new connection...
- String uid = defaultUserId;
- if ((uid != null) && (uid.length() == 0)) {
- uid = null;
- }
- host = pool.createHost(systemType, hostName, hostAddress, description, uid, defaultUserIdLocation);
- if (host == null) { // did not create since host already exists
- host = pool.getHost(hostName);
- }
- } catch (Exception e) {
- String pluginId = RSECorePlugin.getDefault().getBundle().getSymbolicName();
- String message = NLS.bind(RSECoreMessages.MSG_CREATEHOST_EXCEPTION, hostName);
- status = new Status(IStatus.ERROR, pluginId, message, e);
- }
- if (status.isOK()) {
- if (createSubSystems) {
- // determine the list of configs to use to create subsystems from
- List configs = new ArrayList(10); // arbitrary but reasonable
- if (configurators != null) {
- // if there are configurators need to at least use those
- for (int i = 0; i < configurators.length; i++) {
- configs.add(configurators[i].getSubSystemConfiguration());
- }
- // add any non-service subsystem configs that aren't already there that apply to this systemtype
- ISubSystemConfiguration[] configsArray = getSubSystemConfigurationsBySystemType(systemType, false);
- for (int i = 0; i < configsArray.length; i++) {
- ISubSystemConfiguration config = configsArray[i];
- boolean isStrange = (config.getServiceType() == null);
- boolean isAbsent = !configs.contains(config);
- if (isStrange && isAbsent) {
- configs.add(config);
- }
- }
- } else {
- // just get the defaults with the service subsystems filtered
- ISubSystemConfiguration[] configsArray = getSubSystemConfigurationsBySystemType(systemType, true);
- configs = Arrays.asList(configsArray);
- }
- // only subsystem configuration is used per service type
- subsystems = new ISubSystem[configs.size()];
- ISystemProfile profile = host.getSystemProfile();
- int i = 0;
- for (Iterator z = configs.iterator(); z.hasNext();) {
- ISubSystemConfiguration config = (ISubSystemConfiguration) z.next();
- config.getFilterPoolManager(profile, true); // create the filter pool
- ISubSystemConfigurator[] interestingPages = getApplicableConfigurators(config, configurators);
- subsystems[i] = config.createSubSystem(host, true, interestingPages); // give it the opportunity to create a subsystem
- i++;
- }
- }
- host.commit();
- }
- return status;
- }
- }
- CreateHostOperation op = new CreateHostOperation();
- IStatus status = SystemProfileManager.run(op);
- lastException = (Exception) status.getException();
- if (lastException != null) {
- RSECorePlugin.getDefault().getLogger().logError(status.getMessage(), lastException);
- throw lastException;
- }
- IHost host = op.getHost();
- if (modelListenerManager.hasListeners()) {
- ISubSystem[] subsystems = op.getSubSystems();
- FireNewHostEvents fire = new FireNewHostEvents(host, subsystems, sr, configurators != null);
- // FIXME bug 240991: With the current workaround, we might miss events
- // in SystemPreferencesManager. Instead of Display.getDefault(),
- // we should use the IRSEInteractionProvider here.
- Display.getDefault().asyncExec(fire);
- }
-
- // //SystemPreferencesManager listens itself to FireNewHostEvents now
- //SystemPreferencesManager.setConnectionNamesOrder(); // update preferences order list
- return host;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#createSubSystems(org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.subsystems.ISubSystemConfiguration[])
- */
- public ISubSystem[] createSubSystems(IHost host, ISubSystemConfiguration[] configurations) {
-
- ISubSystem[] subsystems = new ISubSystem[configurations.length];
-
- for (int i = 0; i < configurations.length; i++) {
- subsystems[i] = configurations[i].createSubSystem(host, true, null);
- }
-
- for (int j = 0; j < subsystems.length; j++) {
- if (subsystems[j] != null) {
- fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystems[j], null);
- }
- }
-
- host.commit();
- return subsystems;
- }
-
- class NotifyModelChangedRunnable implements Runnable
- {
- private ISystemModelChangeEvent _event;
- public NotifyModelChangedRunnable(ISystemModelChangeEvent event)
- {
- _event = event;
- }
-
- public void run()
- {
- modelListenerManager.notify(_event);
- }
- }
-
- class NotifyResourceChangedRunnable implements Runnable
- {
- private ISystemResourceChangeEvent _event;
- public NotifyResourceChangedRunnable(ISystemResourceChangeEvent event)
- {
- _event = event;
- }
-
- public void run()
- {
- listenerManager.notify(_event);
- }
- }
-
- class NotifyPreferenceChangedRunnable implements Runnable
- {
- private ISystemPreferenceChangeEvent _event;
- public NotifyPreferenceChangedRunnable(ISystemPreferenceChangeEvent event)
- {
- _event = event;
- }
-
- public void run()
- {
- preferenceListManager.notify(_event);
- }
- }
-
- class PreferenceChangedRunnable implements Runnable
- {
- private ISystemPreferenceChangeEvent _event;
- private ISystemPreferenceChangeListener _listener;
-
- public PreferenceChangedRunnable(ISystemPreferenceChangeEvent event, ISystemPreferenceChangeListener listener)
- {
- _event = event;
- _listener = listener;
- }
-
- public void run()
- {
- _listener.systemPreferenceChanged(_event);
- }
- }
-
- class ModelResourceChangedRunnable implements Runnable
- {
- private ISystemModelChangeListener _listener;
- private ISystemModelChangeEvent _event;
- public ModelResourceChangedRunnable(ISystemModelChangeEvent event, ISystemModelChangeListener listener)
- {
- _event = event;
- _listener = listener;
- }
-
- public void run()
- {
- _listener.systemModelResourceChanged(_event);
- }
- }
-
- class ResourceChangedRunnable implements Runnable
- {
- private ISystemResourceChangeListener _listener;
- private ISystemResourceChangeEvent _event;
- public ResourceChangedRunnable(ISystemResourceChangeEvent event, ISystemResourceChangeListener listener)
- {
- _event = event;
- _listener = listener;
- }
-
- public void run()
- {
- _listener.systemResourceChanged(_event);
- }
- }
-
- class RemoteResourceChangedRunnable implements Runnable
- {
- private ISystemRemoteChangeListener _listener;
- private ISystemRemoteChangeEvent _event;
- public RemoteResourceChangedRunnable(ISystemRemoteChangeEvent event, ISystemRemoteChangeListener listener)
- {
- _event = event;
- _listener = listener;
- }
-
- public void run()
- {
- _listener.systemRemoteResourceChanged(_event);
- }
- }
-
- class RemoteChangedRunnable implements Runnable
- {
- private ISystemRemoteChangeEvent _event;
- public RemoteChangedRunnable(ISystemRemoteChangeEvent event)
- {
- _event = event;
- }
-
- public void run()
- {
- remoteListManager.notify(_event);
- }
- }
-
-
- class FireNewHostEvents implements Runnable
- {
- private ISubSystem[] subSystems;
- private IHost conn;
- private ISystemRegistry reg;
- private boolean expandHost;
-
- public FireNewHostEvents(IHost host, ISubSystem[] subSystems, ISystemRegistry registry, boolean expandHost)
- {
- this.subSystems= subSystems;
- this.conn = host;
- this.reg = registry;
- this.expandHost = expandHost;
- }
-
- public void run()
- {
- int eventType = ISystemResourceChangeEvents.EVENT_ADD_RELATIVE;
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(conn, eventType, reg);
- //event.setPosition(pool.getConnectionPosition(conn));
- //event.setPosition(getConnectionPositionInView(conn));
- IHost previous = getPreviousHost(conn);
- if (previous != null)
- {
- event.setRelativePrevious(previous);
- }
- else
- {
- event.setType(ISystemResourceChangeEvents.EVENT_ADD);
- }
- fireEvent(event);
- fireModelChangeEvent(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED,
- ISystemModelChangeEvents.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);
- }
-
- // for bug 249247 - expand the connection after completing the wizard
- if (expandHost){
- SystemResourceChangeEvent expandEvent = new SystemResourceChangeEvent(conn, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, reg);
- fireEvent(expandEvent);
- }
- }
- }
-
- private ISubSystemConfigurator[] getApplicableConfigurators(ISubSystemConfiguration ssf, ISubSystemConfigurator[] 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;
- ISubSystemConfigurator[] subPages = new ISubSystemConfigurator[count];
- count = 0;
- for (int idx = 0; idx < allPages.length; idx++)
- if (allPages[idx].getSubSystemConfiguration() == ssf)
- subPages[count++] = allPages[idx];
- return subPages;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#createHost(java.lang.String, org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String)
- */
- public IHost createHost(String profileName, IRSESystemType systemType, String connectionName, String hostName, String description)
- throws Exception
- {
- return createHost(profileName, systemType, connectionName, hostName, description, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#createHost(java.lang.String, org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String, boolean)
- */
- public IHost createHost(String profileName, IRSESystemType systemType, String connectionName, String hostName, String description, boolean createSubSystems) throws Exception
- {
- return createHost(profileName, systemType, connectionName, hostName, description, null, IRSEUserIdConstants.USERID_LOCATION_HOST, createSubSystems, null);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#createHost(org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String)
- */
- public IHost createHost(IRSESystemType 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);
- }
-
- /**
- * 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#updateHost(org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.IRSESystemType, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
- */
- public void updateHost(IHost conn, IRSESystemType 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)
- {
- RSECorePlugin.getDefault().getLogger().logError("Exception in updateConnection for " + connectionName, exc);
- lastException = exc;
- return;
- }
- catch (Exception exc)
- {
- RSECorePlugin.getDefault().getLogger().logError("Exception in updateConnection for " + connectionName, exc);
- lastException = exc;
- return;
- }
- boolean skipUpdate = (defaultUserIdChanged && !hostNameChanged && !connectionNameChanged);
- if (!skipUpdate) fireEvent(new SystemResourceChangeEvent(
- //conn,ISystemResourceChangeEvent.EVENT_CHANGE,this));
- conn, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, this)); // only update simple property sheet values here
- if (!skipUpdate) fireModelChangeEvent(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED,
- ISystemModelChangeEvents.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().clearCredentials();
- }
- subsystems[idx].getConnectorService().clearPassword(false, true);
- }
- catch (Exception exc)
- {
- } // msg already shown
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#setHostOffline(org.eclipse.rse.core.model.IHost, boolean)
- */
- 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));
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#deleteHost(org.eclipse.rse.core.model.IHost)
- */
- 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.
- fireModelChangeEvent(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED,
- ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION,
- conn, null);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#renameHost(org.eclipse.rse.core.model.IHost, java.lang.String)
- */
- 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();
-
-
- // DKM - changing how this is done since there are services with different configurations now
- ISubSystem[] subsystems = conn.getSubSystems();
- for (int i = 0; i < subsystems.length; i++)
- {
- ISubSystem ss = subsystems[i];
- ss.getSubSystemConfiguration().renameSubSystemsByConnection(conn, newName);
- }
-
- /*
- 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
- ////Listening to events now
- //SystemPreferencesManager.setConnectionNamesOrder(); // update preferences order list
- fireModelChangeEvent(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED,
- ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION,
- conn, oldName);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#moveHosts(java.lang.String, org.eclipse.rse.core.model.IHost[], int)
- * FIXME PROBLEM: CAN'T RE-ORDER FOLDERS SO CAN WE SUPPORT THIS ACTION?</b>
- */
- public void moveHosts(String profileName, IHost conns[], int delta)
- {
- ISystemHostPool pool = getHostPool(profileName);
- pool.moveHosts(conns, delta);
- ////Listening to Event now
- //SystemPreferencesManager.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(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED,
- ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION,
- conns[idx], null);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#copyHost(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
- */
- public IHost copyHost(IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor) 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;
-
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), "Start of system connection copy. From: " + oldName + " to: " + newName);
-
- // 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);
- // Fix bug#282238: NPE when copying host and overwrite itself
- if (newConn == null) {
- return null;
- }
-
- // STEP 2: COPY ALL SUBSYSTEMS FOR THE COPIED CONNECTION
- msg = RSECoreMessages.MSG_COPYSUBSYSTEMS_PROGRESS;
- //monitor.subTask(msg);
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), msg);
-
- ISubSystem[] subsystems = null;
- ISubSystemConfiguration factory = null;
- msg = "Copying subsystems for connection " + conn.getAliasName();
- //monitor.subTask(msg);
- RSECorePlugin.getDefault().getLogger().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();
- //monitor.subTask(msg);
- RSECorePlugin.getDefault().getLogger().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)
- {
- RSECorePlugin.getDefault().getLogger().logError("Exception (ignored) cleaning up from copy-connection exception.", exc);
- }
- throw (lastExc);
- }
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), "Copy of system connection " + oldName + " to " + newName + " successful");
- 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(
- ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED,
- ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION,
- newConn, null);
- return newConn;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#moveHost(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.rse.core.model.IHost, org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
- */
- public IHost moveHost(IHost conn, ISystemProfile targetProfile, String newName, IProgressMonitor monitor) throws Exception
- {
- IHost newConn = null;
- try
- {
- newConn = copyHost(conn, targetProfile, newName, monitor);
- if (newConn != null)
- {
- deleteHost(conn); // delete old connection now that new one created successfully
- RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), "Move of system connection " + conn.getAliasName() + " to profile " + targetProfile.getName() + " successful");
- fireEvent(new SystemResourceChangeEvent(conn, ISystemResourceChangeEvents.EVENT_DELETE, this));
- }
- }
- catch (Exception exc)
- {
- //RSECorePlugin.getDefault().getLogger().logError("Exception moving system connection " + conn.getAliasName() + " to profile " + targetProfile.getName(), exc);
- throw exc;
- }
- return newConn;
- }
-
- /*
- * (non-Javadoc)
- * @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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#isAnySubSystemConnected(org.eclipse.rse.core.model.IHost)
- */
- public boolean isAnySubSystemConnected(IHost conn)
- {
- boolean any = false;
- ISubSystem[] subsystems = getSubSystems(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;
- }
-
- /**
- * Check if there are any subsystem configurations that have not yet been instantiated
- * and apply to the given system type.
- * @param systemType the system type to check
- * @return <code>true</code> if there are any matching subsystem configurations not yet instantiated.
- */
- public boolean hasInactiveSubsystemConfigurations(IRSESystemType systemType)
- {
- if (subsystemConfigurationProxies != null)
- {
- for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
- {
- if (!subsystemConfigurationProxies[idx].isSubSystemConfigurationActive()
- && subsystemConfigurationProxies[idx].appliesToSystemType(systemType))
- {
- return true;
- }
- }
- }
- return false;
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#areAllSubSystemsConnected(org.eclipse.rse.core.model.IHost)
- */
- public boolean areAllSubSystemsConnected(IHost conn)
- {
- boolean all = true;
- if (hasInactiveSubsystemConfigurations(conn.getSystemType())) {
- //any uninitialized subsystem configuration that applies to the system type can not be connected.
- //TODO this may change in the future: We might want to have markup in the plugin.xml
- //to check whether a subsystem configuration is actually connectable or not
- return false;
- }
-
- //May force load subsystem configurations here because there are no inactive ones for our system type.
- //Do we need to force load actual subsystems too, just to check if they are connected?
- ISubSystem[] subsystems = getSubSystems(conn);
- if (subsystems == null) {
- //If there are no subsystems, they are all connected.
- return true;
- }
-
- for (int idx = 0; all && (idx < subsystems.length); idx++)
- {
- ISubSystem ss = subsystems[idx];
- if (!ss.isConnected() && ss.getSubSystemConfiguration().supportsSubSystemConnect())
- {
- //we ignore unconnected subsystems that can not be connected anyways.
- return false;
- }
- }
- return all;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#disconnectAllSubSystems(org.eclipse.rse.core.model.IHost)
- */
- public void disconnectAllSubSystems(IHost conn)
- {
- // get subsystems lazily, because not instantiated ones cannot be disconnected anyways.
- ISubSystem[] subsystems = getSubSystems(conn);
- if (subsystems == null)
- return;
-
- // dy: defect 47281, user repeatedly 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() && ss.getSubSystemConfiguration().supportsSubSystemConnect())
- {
- try
- {
- //ss.getConnectorService().disconnect(); defect 40675
- ss.disconnect();
- }
- catch (InterruptedException exc)
- {
- System.out.println("Cancelled");
- cancelled = true;
- }
- catch (Exception exc)
- {
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#connectedStatusChange(org.eclipse.rse.core.subsystems.ISubSystem, boolean, boolean)
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected)
- {
- connectedStatusChange(subsystem, connected, wasConnected, true);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#connectedStatusChange(org.eclipse.rse.core.subsystems.ISubSystem, boolean, boolean, boolean)
- */
- public void connectedStatusChange(ISubSystem subsystem, boolean connected, boolean wasConnected, boolean collapseTree)
- {
- IHost conn = subsystem.getHost();
-
- IConnectorService effectedConnectorService = subsystem.getConnectorService();
-
- if (connected != wasConnected)
- {
- int eventId = ISystemResourceChangeEvents.EVENT_ICON_CHANGE;
- fireEvent(new SystemResourceChangeEvent(conn, eventId, this));
-
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(subsystem, eventId, conn);
- fireEvent(event);
-
-
- // fire for each subsystem
- ISubSystem[] sses = getSubSystems(conn);
- for (int i = 0; i < sses.length; i++)
- {
- ISubSystem ss = sses[i];
-
- // only fire the event for subsystems that share the effected connector service
- if (ss != subsystem && ss.getConnectorService().equals(effectedConnectorService))
- {
- 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];
-
- // only fire the event for subsystems that share the effected connector service
- if (ss != subsystem && ss.getConnectorService().equals(effectedConnectorService) && !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);
- }
- /**
- * 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);
- }
- /**
- * 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);
- }
- }
- }
-
- if (!listenerManager.hasListeners()) return;
-
- if (onMainThread()) {
- listenerManager.notify(event);
- }
- else {
- runOnMainThread(new NotifyResourceChangedRunnable(event));
- }
-
- }
- /**
- * Notify a specific listener of a change to a system resource such as a connection.
- */
- public void fireEvent(ISystemResourceChangeListener l, ISystemResourceChangeEvent event)
- {
- if (onMainThread()) {
- l.systemResourceChanged(event);
- }
- else {
- runOnMainThread(new ResourceChangedRunnable(event, l));
- }
- }
-
- /**
- * Return the listener manager such that the SystemRegistryUI
- * can re-use it for posting events that can only be posted
- * in UI.
- * @return the System resource change listener manager
- * used by the registry.
- */
- public SystemResourceChangeManager getResourceChangeManager() {
- return listenerManager;
- }
-
- // ----------------------------
- // 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);
- }
- /**
- * De-Register your interest in being told when an RSE model resource is changed.
- */
- public void removeSystemModelChangeListener(ISystemModelChangeListener l)
- {
- modelListenerManager.removeSystemModelChangeListener(l);
- }
-
- private boolean onMainThread()
- {
- return Display.getCurrent() != null;
- }
-
- private void runOnMainThread(Runnable runnable)
- {
- Display.getDefault().asyncExec(runnable);
- }
-
- /**
- * 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)
- {
- if (!modelListenerManager.hasListeners()) return;
- if (onMainThread()) {
- modelListenerManager.notify(event);
- }
- else {
- // fire this on the main thread
- runOnMainThread(new NotifyModelChangedRunnable(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 (!modelListenerManager.hasListeners()) return;
- SystemModelChangeEvent modelEvent = new SystemModelChangeEvent();
- modelEvent.setEventType(eventType);
- modelEvent.setResourceType(resourceType);
- modelEvent.setResource(resource);
- modelEvent.setOldName(oldName);
-
- if (onMainThread()) {
- modelListenerManager.notify(modelEvent);
- }
- else {
- // fire this one the main thread
- runOnMainThread(new NotifyModelChangedRunnable(modelEvent));
- }
- }
-
-
-
- /**
- * Notify a specific listener of a change to a system model resource such as a connection.
- */
- public void fireEvent(ISystemModelChangeListener l, ISystemModelChangeEvent event)
- {
- if (onMainThread()) {
- l.systemModelResourceChanged(event);
- }
- else {
- runOnMainThread(new ModelResourceChangedRunnable(event, l));
- }
- }
-
- // --------------------------------
- // 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);
- }
- /**
- * De-Register your interest in being told when a remote resource is changed.
- */
- public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- remoteListManager.removeSystemRemoteChangeListener(l);
- }
-
- /**
- * Query if the ISystemRemoteChangeListener is already listening for SystemRemoteChange events
- */
- public boolean isRegisteredSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- return remoteListManager.isRegisteredSystemRemoteChangeListener(l);
- }
-
- /**
- * Notify all listeners of a change to a remote resource such as a file.
- * You would not normally call this as the methods in this class call it when appropriate.
- */
- public void fireEvent(ISystemRemoteChangeEvent event)
- {
- if (!remoteListManager.hasListeners()) return;
- if (onMainThread()) {
- remoteListManager.notify(event);
- }
- else {
- runOnMainThread(new RemoteChangedRunnable(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.core.events.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 oldNames - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
- */
- public void fireRemoteResourceChangeEvent(int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
- {
- if (resourceParent instanceof ISystemContainer)
- {
- ((ISystemContainer)resourceParent).markStale(true);
- }
- // mark stale any filters that reference this object
- invalidateFiltersFor(resourceParent, subsystem);
-
- if (!remoteListManager.hasListeners()) return;
-
- SystemRemoteChangeEvent remoteEvent = new SystemRemoteChangeEvent();
- remoteEvent.setEventType(eventType);
- remoteEvent.setResource(resource);
- remoteEvent.setResourceParent(resourceParent);
- remoteEvent.setOldNames(oldNames);
- remoteEvent.setSubSystem(subsystem);
-
- if (onMainThread())
- {
- remoteListManager.notify(remoteEvent);
- }
- else
- {
- runOnMainThread(new RemoteChangedRunnable(remoteEvent));
- }
- }
-
- /**
- * 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.core.events.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 oldNames - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
- * @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[] oldNames, Object originatingViewer)
- {
- if (resourceParent instanceof ISystemContainer)
- {
- ((ISystemContainer)resourceParent).markStale(true);
- }
- // mark stale any filters that reference this object
- invalidateFiltersFor(resourceParent, subsystem);
-
- if (!remoteListManager.hasListeners()) return;
-
- SystemRemoteChangeEvent remoteEvent = new SystemRemoteChangeEvent();
- remoteEvent.setEventType(eventType);
- remoteEvent.setResource(resource);
- remoteEvent.setResourceParent(resourceParent);
- remoteEvent.setOldNames(oldNames);
- remoteEvent.setSubSystem(subsystem);
- remoteEvent.setOriginatingViewer(originatingViewer);
-
- if (onMainThread())
- {
- remoteListManager.notify(remoteEvent);
- }
- else
- {
- runOnMainThread(new RemoteChangedRunnable(remoteEvent));
- }
- }
-
- /**
- * 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 operation - the operation for which this event was fired
- * @param eventType - one of the constants from {@link org.eclipse.rse.core.events.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 oldNames - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
- */
- public void fireRemoteResourceChangeEvent(String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
- {
- if (resourceParent instanceof ISystemContainer)
- {
- ((ISystemContainer)resourceParent).markStale(true);
- }
- // mark stale any filters that reference this object
- invalidateFiltersFor(resourceParent, subsystem);
-
- if (!remoteListManager.hasListeners()) return;
-
- SystemRemoteChangeEvent remoteEvent = new SystemRemoteChangeEvent();
- remoteEvent.setOperation(operation);
- remoteEvent.setEventType(eventType);
- remoteEvent.setResource(resource);
- remoteEvent.setResourceParent(resourceParent);
- remoteEvent.setOldNames(oldNames);
- remoteEvent.setSubSystem(subsystem);
-
- if (onMainThread())
- {
- remoteListManager.notify(remoteEvent);
- }
- else
- {
- runOnMainThread(new RemoteChangedRunnable(remoteEvent));
- }
- }
-
- /**
- * 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 operation - the operation for which this event was fired
- * @param eventType - one of the constants from {@link org.eclipse.rse.core.events.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 oldNames - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
- * @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(String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames, Object originatingViewer)
- {
- if (resourceParent instanceof ISystemContainer)
- {
- ((ISystemContainer)resourceParent).markStale(true);
- }
- // mark stale any filters that reference this object
- invalidateFiltersFor(resourceParent, subsystem);
-
- if (!remoteListManager.hasListeners()) return;
-
- SystemRemoteChangeEvent remoteEvent = new SystemRemoteChangeEvent();
- remoteEvent.setOperation(operation);
- remoteEvent.setEventType(eventType);
- remoteEvent.setResource(resource);
- remoteEvent.setResourceParent(resourceParent);
- remoteEvent.setOldNames(oldNames);
- remoteEvent.setSubSystem(subsystem);
- remoteEvent.setOriginatingViewer(originatingViewer);
-
- if (onMainThread())
- {
- remoteListManager.notify(remoteEvent);
- }
- else
- {
- runOnMainThread(new RemoteChangedRunnable(remoteEvent));
- }
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected IRemoteObjectIdentifier getRemoteObjectIdentifier(Object o)
- {
- //Try 1: element already an instance of IRemoteObjectIdentifier?
- if (o instanceof IRemoteObjectIdentifier) {
- return (IRemoteObjectIdentifier)o;
- }
- //Try 2: adapts to IRemoteObjectIdentifier (non-UI code only!)
- IRemoteObjectIdentifier adapter = null;
- if (o instanceof IAdaptable) {
- adapter = (IRemoteObjectIdentifier)((IAdaptable)o).getAdapter(IRemoteObjectIdentifier.class);
- if (adapter!=null) return adapter;
- } else if (o==null) {
- return null;
- }
- //Try 3: IRemoteObjectIdentifier via factories.
- //TODO Try loadAdapter() to force lazy loading?
- adapter = (IRemoteObjectIdentifier)Platform.getAdapterManager().getAdapter(o, IRemoteObjectIdentifier.class);
- if (adapter==null) {
- //Try 4: ISystemDragDropAdapter, fallback to old factories provided via AbstractSystemViewRemoteAdapterFactory
- //This is a fallback for pre-RSE-3.0 code and may introduce UI dependency!
- if (o instanceof IAdaptable) {
- //TODO Try loadAdapter() to force lazy loading?
- adapter = (ISystemDragDropAdapter)((IAdaptable)o).getAdapter(ISystemDragDropAdapter.class);
- if (adapter!=null) return adapter;
- }
- adapter = (ISystemDragDropAdapter)Platform.getAdapterManager().getAdapter(o, ISystemDragDropAdapter.class);
- }
- return adapter;
- }
-
- 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();
- if (!ss.isOffline()){
- remoteResource = ss.getTargetForFilter(ref);
- }
- else {
- return null;
- }
-
- IRemoteObjectIdentifier rid = getRemoteObjectIdentifier(remoteResource);
- if (rid == null)
- return null;
- remoteResourceName = rid.getAbsoluteName(remoteResource);
- }
- else
- {
- IRemoteObjectIdentifier rid = getRemoteObjectIdentifier(remoteResource);
- if (rid == null)
- return null;
- remoteResourceName = rid.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)
- {
- return findFilterReferencesFor(resource, subsystem, true);
- }
-
- public List findFilterReferencesFor(Object resource, ISubSystem subsystem, boolean onlyCached)
- {
- String elementName = getRemoteResourceAbsoluteName(resource);
- List results = new ArrayList();
- if (subsystem != null && elementName != null && subsystem.getSubSystemConfiguration().supportsFilters())
- {
- ISystemFilterReference[] refs = subsystem.getFilterPoolReferenceManager().getSystemFilterReferences(subsystem);
- for (int i = 0; i < refs.length; i++)
- {
- ISystemFilterReference filterRef = refs[i];
-
- if (!onlyCached || (!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)
- {
- if (onMainThread()) {
- l.systemRemoteResourceChanged(event);
- }
- else {
- runOnMainThread(new RemoteResourceChangedRunnable(event, l));
- }
-
- }
-
- // ----------------------------
- // 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)
- {
- if (!preferenceListManager.hasListeners()) return;
- if (onMainThread()) {
- preferenceListManager.notify(event);
- }
- else {
- runOnMainThread(new NotifyPreferenceChangedRunnable(event));
- }
- }
- /**
- * Notify a specific listener of a change to a system preference
- */
- public void fireEvent(ISystemPreferenceChangeListener l, ISystemPreferenceChangeEvent event)
- {
- if (!preferenceListManager.hasListeners()) return;
- if (onMainThread()) {
- l.systemPreferenceChanged(event);
- }
- else {
- runOnMainThread(new PreferenceChangedRunnable(event, l));
- }
- }
-
- // ----------------------------
- // 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()
- {
- ISystemProfile[] notSaved = RSECorePlugin.getThePersistenceManager().commitProfiles(5000);
- return notSaved.length > 0;
- }
-
- /**
- * Save specific connection pool
- * @return true if saved ok, false if error encountered. If false, call getLastException().
- */
- public boolean saveHostPool(ISystemHostPool pool)
- {
- return pool.commit();
- }
-
- /**
- * Save specific connection
- * @return true if saved ok, false if error encountered. If false, call getLastException().
- */
- public boolean saveHost(IHost conn)
- {
- return conn.commit();
- }
-
- /**
- * 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 = RSECorePlugin.getTheSystemProfileManager();
-
- SystemHostPool pool = null;
- SystemPreferencesManager prefmgr = SystemPreferencesManager.getPreferencesManager();
- if (!RSECorePlugin.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;
- RSECorePlugin.getDefault().getLogger().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.getInstance();
- }
-
- // ----------------------------------
- // SYSTEMVIEWINPUTPROVIDER METHODS...
- // ----------------------------------
-
- /**
- * Return the child objects to constitute the root elements in the system view tree.
- * We return all connections that have an enabled system type.
- */
- 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 = con.getSystemType();
- // sysType can be null if workspace contains a host that is no longer defined by the workbench
- if (sysType != null && sysType.isEnabled()) {
- // Note: System types without registered subsystems get disabled by the default
- // AbstractRSESystemType implementation itself! There is no need to re-check this here again.
- 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);
- }
-
- /**
- * 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(java.lang.Object)
- */
- public void setViewer(Object viewer)
- {
- this.viewer = viewer;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getViewer()
- */
- public Object getViewer()
- {
- return viewer;
- }
-
-
-}//SystemRegistryImpl \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRemoteChangeEventManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRemoteChangeEventManager.java
deleted file mode 100644
index 453f63569..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRemoteChangeEventManager.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [207100] adding SystemRemoteChangeEventManager.isRegisteredSystemRemoteChangeListener
- * Martin Oberhuber (Wind River) - [218659] Make *EventManager, *ChangeManager thread-safe
- * David Dykstal (IBM) - [227750] add a test for registered listeners
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-
-/**
- * Manages the list of registered remote resource change listeners.
- */
-public class SystemRemoteChangeEventManager
-{
- private ISystemRemoteChangeListener[] listeners = new ISystemRemoteChangeListener[0];
- private Object lockObject = new Object();
-
- /**
- * Constructor
- */
- public SystemRemoteChangeEventManager()
- {
- }
-
- /**
- * Query if the given listener is already listening for SystemRemoteChange events.
- * @param l the listener to check
- * @return <code>true</code> if the listener is already registered
- */
- public boolean isRegisteredSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- synchronized(lockObject) {
- for(int i=0; i<listeners.length; i++) {
- if(listeners[i].equals(l)) {
- return true;
- }
- }
- return false;
- }
- }
-
- /**
- * Add a listener to list of listeners.
- * If this object is already in the list, this does nothing.
- * @param l the new listener to add.
- */
- public void addSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- if (l==null) throw new IllegalArgumentException();
- synchronized(lockObject) {
- if (!isRegisteredSystemRemoteChangeListener(l)) {
- int len = listeners.length;
- ISystemRemoteChangeListener[] oldListeners = listeners;
- listeners = new ISystemRemoteChangeListener[len+1];
- System.arraycopy(oldListeners, 0, listeners, 0, len);
- listeners[len] = l;
- }
- }
- }
-
- /**
- * Remove a listener from the list of listeners.
- * If this object is not in the list, this does nothing.
- * @param l the listener to remove
- */
- public void removeSystemRemoteChangeListener(ISystemRemoteChangeListener l)
- {
- synchronized(lockObject) {
- if (isRegisteredSystemRemoteChangeListener(l)) {
- //Thread-safety: create a new List when removing, to avoid problems in notify()
- int len = listeners.length;
- ISystemRemoteChangeListener[] oldListeners = listeners;
- listeners = new ISystemRemoteChangeListener[len-1];
- for (int i=0, j=0; i<len; i++) {
- if (!oldListeners[i].equals(l)) {
- listeners[j++] = oldListeners[i];
- }
- }
- }
- }
- }
-
- /**
- * Notify all registered listeners of the given event.
- * TODO document on which thread the event is being sent.
- * @param event the event to send.
- */
- public void notify(ISystemRemoteChangeEvent event)
- {
- //Thread-safe event firing: fire events on a current snapshot of the list.
- //If not done that way, and a thread removes a listener while event firing
- //is in progress, an ArrayIndexOutOfBoundException might occur.
- ISystemRemoteChangeListener[] currentListeners;
- synchronized(lockObject) {
- currentListeners = listeners;
- }
- for (int idx=0; idx<currentListeners.length; idx++) {
- currentListeners[idx].systemRemoteResourceChanged(event);
- }
- }
-
- /**
- * Test if a manager has any listeners registered.
- * @return true if there are any listeners, false if not.
- */
- public boolean hasListeners() {
- boolean result = false;
- synchronized(lockObject) {
- result = listeners.length > 0;
- }
- return result;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemResourceChangeManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemResourceChangeManager.java
deleted file mode 100644
index d207012e0..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemResourceChangeManager.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [218659] Make *EventManager, *ChangeManager thread-safe
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [227750] add a test for registered listeners
- ********************************************************************************/
-
-package org.eclipse.rse.internal.core.model;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-
-
-/**
- * Manages the list of registered resource change listeners.
- */
-public class SystemResourceChangeManager
-{
- private List listeners = new ArrayList();
- private Object lockObject = new Object();
-
- /**
- * Constructor
- */
- public SystemResourceChangeManager()
- {
- }
-
- /**
- * Query if the given listener is already listening for SystemResourceChange events.
- * @param l the listener to check
- * @return <code>true</code> if the listener is already registered
- */
- public boolean isRegisteredSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- synchronized(lockObject) {
- return listeners.contains(l);
- }
- }
-
- /**
- * Add a listener to list of listeners.
- * If this object is already in the list, this does nothing.
- * @param l the listener to add
- */
- public void addSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- synchronized(lockObject) {
- if (!listeners.contains(l))
- listeners.add(l);
- }
- }
-
- /**
- * Remove a listener from the list of listeners.
- * If this object is not in the list, this does nothing.
- * @param l the listener to remove
- */
- public void removeSystemResourceChangeListener(ISystemResourceChangeListener l)
- {
- synchronized(lockObject) {
- //Thread-safety: create a new List when removing, to avoid problems in notify()
- listeners = new ArrayList(listeners);
- listeners.remove(l);
- }
- }
-
- /**
- * Notify all registered listeners of the given event.
- * @param event the event to send
- */
- public void notify(ISystemResourceChangeEvent event)
- {
- //Thread-safe event firing: fire events on a current snapshot of the list.
- //If not done that way, and a thread removes a listener while event firing
- //is in progress, an ArrayIndexOutOfBoundException might occur.
- List currentListeners;
- synchronized(lockObject) {
- currentListeners = listeners;
- }
- for (int idx=0; idx<currentListeners.size(); idx++) {
- ISystemResourceChangeListener l = (ISystemResourceChangeListener)currentListeners.get(idx);
- l.systemResourceChanged(event);
- }
- }
-
- /**
- * Post a notify to all registered listeners of the given event.
- * @param event the event to send
- */
- public void postNotify(ISystemResourceChangeEvent event)
- {
- List currentListeners;
- synchronized(lockObject) {
- currentListeners = listeners;
- }
- for (int idx=0; idx<currentListeners.size(); idx++) {
- ISystemResourceChangeListener listener = (ISystemResourceChangeListener)currentListeners.get(idx);
- new SystemPostableEventNotifier(listener, event); // create and run the notifier
- //l.systemResourceChanged(event);
- }
- }
-
- /**
- * Test if a manager has any listeners registered.
- * @return true if there are any listeners, false if not.
- */
- public boolean hasListeners() {
- boolean result = false;
- synchronized(lockObject) {
- result = listeners.size() > 0;
- }
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/AbstractCacheManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/AbstractCacheManager.java
deleted file mode 100644
index 5c732dce9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/AbstractCacheManager.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [190231] Moved from org.eclipse.rse.ui/subsystems to core
- *********************************************************************************/
-
-package org.eclipse.rse.internal.core.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.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java
deleted file mode 100644
index 7c4f8fc53..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxy.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Uwe Stieber (Wind River) - systemTypeIds attribute extension and dynamic association
- * of system types.
- * David Dykstal (IBM) - 168870: move core function from UI to core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * David Dykstal (IBM) - [197036] delay the creation of filterPoolManagers when restoring
- * David McKnight (IBM) - [230997] subsystem configuration extension without "description" screws up RSE init
- *******************************************************************************/
-
-package org.eclipse.rse.internal.core.subsystems;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemTypeMatcher;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.logging.Logger;
-import org.osgi.framework.Bundle;
-
-/**
- * Represents a registered subsystem factory extension.
- */
-public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy {
- // The associated configuration element this proxy is wrapping
- private IConfigurationElement element = null;
-
- // The subsystem configuration id
- private String id;
- // The subsystem configuration name
- private String name;
- // The subsystem configuration description
- private String description;
- // The list of associated system types by id as it appears in the plugin.xml
- private String systemTypeIds;
-
- // The list of resolved system types supported by this subsystem configuration.
- private IRSESystemType[] resolvedSystemTypes;
-
- // The subsystem configuration vendor
- private String vendor;
- // The remote system resource category
- private String category;
- // The subsystem configuration priority
- private int priority;
-
- // The subsystem configuration implementation class
- private ISubSystemConfiguration configuration = null;
- // Flag to mark if the subsystem configration class has been initialized.
- // We need this flag as the class may fail to load and we cannot determine it
- // only by the null value of the field configuration.
- private boolean subSystemConfigurationInitialized = false;
-
- private final SystemTypeMatcher systemTypeMatcher;
-
- /**
- * Constructor
- * @param element The IConfigurationElement for this factory's plugin
- */
- public SubSystemConfigurationProxy(IConfigurationElement element) {
- assert element != null;
- // Read the single attributes from the configuration element
- this.element = element;
- this.id = element.getAttribute("id"); //$NON-NLS-1$
-
- this.name = element.getAttribute("name"); //$NON-NLS-1$
- if (this.name != null)
- this.name = this.name.trim();
-
- this.description = element.getAttribute("description"); //$NON-NLS-1$
- if (this.description != null)
- this.description = this.description.trim();
-
- this.systemTypeIds = element.getAttribute("systemTypeIds"); //$NON-NLS-1$
- this.vendor = element.getAttribute("vendor"); //$NON-NLS-1$
- this.category = element.getAttribute("category"); //$NON-NLS-1$
- this.priority = Integer.MAX_VALUE;
-
- String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$
- try {
- if (priorityStr != null) priority = Integer.parseInt(priorityStr);
- } catch (NumberFormatException e) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.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$
-
- systemTypeMatcher = new SystemTypeMatcher(getDeclaredSystemTypeIds());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getVendor()
- */
- public String getVendor() {
- return vendor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getDescription()
- */
- public String getDescription() {
- return description;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getId()
- */
- public String getId() {
- return id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getDeclaringBundle()
- */
- public Bundle getDeclaringBundle() {
- assert element != null;
- return Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getDeclaredSystemTypeIds()
- */
- public String getDeclaredSystemTypeIds() {
- return systemTypeIds;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getSystemTypes()
- */
- public IRSESystemType[] getSystemTypes() {
- if (resolvedSystemTypes == null) {
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
-
- // If the subsystem configuration supports all system types, just add all
- // currently registered system types to the resolved list
- if (supportsAllSystemTypes()) {
- resolvedSystemTypes = systemTypes;
- } else {
- // We have to match the given lists of system type ids against
- // the list of available system types. As the list of system types cannot
- // change ones it has been initialized, we filter out the not matching ones
- // here directly.
- List systemTypesList = new ArrayList(systemTypes.length);
- for (int i = 0; i < systemTypes.length; i++) {
- IRSESystemType systemType = systemTypes[i];
- if (isMatchingDeclaredSystemTypes(systemType)
- || (systemType.getSubsystemConfigurationIds() != null
- && Arrays.asList(systemType.getSubsystemConfigurationIds()).contains(getId()))
- ) {
- if (!systemTypesList.contains(systemType)) {
- systemTypesList.add(systemType);
- }
- }
- }
- resolvedSystemTypes = (IRSESystemType[])systemTypesList.toArray(new IRSESystemType[systemTypesList.size()]);
- }
- }
- return resolvedSystemTypes;
- }
-
- /**
- * Checks if the specified system type is supported by this subsystem configuration.
- *
- * @param systemType The system type to check. Must be not <code>null</code>.
- * @return <code>True</code> if the system type is supported by this subsystem configuration, <code>false</code> otherwise.
- */
- protected boolean isMatchingDeclaredSystemTypes(IRSESystemType systemType) {
- return systemTypeMatcher.matches(systemType);
- }
-
- /**
- * Return true if this factory supports all system types
- */
- public boolean supportsAllSystemTypes() {
- return systemTypeMatcher.supportsAllSystemTypes();
- }
-
- /**
- * Return the value of the "category" attribute
- */
- public String getCategory() {
- return category;
- }
-
- /* (non-Javadoc)
- * @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 name.
- */
- public boolean appliesToSystemType(IRSESystemType type) {
- assert type != null;
- if (systemTypeMatcher.supportsAllSystemTypes()) return true;
- return Arrays.asList(getSystemTypes()).contains(type);
- }
-
- /**
- * 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 (configuration != 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 (!subSystemConfigurationInitialized && configuration == null) {
- try {
- Object executable = element.createExecutableExtension("class"); //$NON-NLS-1$
- if (executable instanceof ISubSystemConfiguration) {
- configuration = (ISubSystemConfiguration) executable;
- configuration.setSubSystemConfigurationProxy(this); // side effect: restores filter pools
- }
- } catch (Exception exc) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.logError("Unable to start subsystem factory " + id, exc); //$NON-NLS-1$
- }
-
- // Attempt to restore the subsystem configuration completely.
- restore();
-
- subSystemConfigurationInitialized = true;
- }
-
- return configuration;
- }
-
- /**
- * Reset for a full refresh from disk, such as after a team synch.
- */
- public void reset() {
- if (configuration != null) configuration.reset();
- }
-
- /**
- * After a reset, restore from disk
- */
- public void restore() {
- // Filter pool managers do not need to be created until they are needed.
-// try {
-// configuration.getAllSystemFilterPoolManagers();
-// } catch (Exception exc) {
-// RSECorePlugin.getDefault().getLogger().logError("Error restoring subsystem for configuration " + getName(), exc); //$NON-NLS-1$
-// }
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- 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;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return id.hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return id + "." + name; //$NON-NLS-1$
- }
-
- private URL getLocation(String fileName) {
- URL result = null;
- if (fileName != null) {
- URL path = getDeclaringBundle().getEntry("/"); //$NON-NLS-1$
- try {
- result = new URL(path, fileName);
- } catch (MalformedURLException e) {
- }
- }
- return result;
- }
-
- public URL getImageLocation() {
- URL result = getLocation(element.getAttribute("icon")); //$NON-NLS-1$
- return result;
- }
-
- public URL getLiveImageLocation() {
- URL result = getLocation(element.getAttribute("iconlive")); //$NON-NLS-1$
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxyComparator.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxyComparator.java
deleted file mode 100644
index d45b5bb51..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/subsystems/SubSystemConfigurationProxyComparator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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) - [165674] Sort subsystem configurations by priority then Id
- *******************************************************************************/
-package org.eclipse.rse.internal.core.subsystems;
-
-import java.util.Comparator;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-
-public class SubSystemConfigurationProxyComparator implements Comparator {
-
- /**
- * Constructor.
- */
- public SubSystemConfigurationProxyComparator() {
- }
-
- /**
- * Compares subsystem configuration proxies by Priority, then Id.
- * @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 proxy1.getId().compareTo(proxy2.getId());
- }
- }
- return 0;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LogListener.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LogListener.java
deleted file mode 100644
index ae2461fc9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LogListener.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.
- */
-public class LogListener 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 LogListener(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;
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java
deleted file mode 100644
index c25f8a3e2..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/logging/LoggingPreferenceInitializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.logging;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.logging.Logger;
-
-/**
- * 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 = RSECorePlugin.getDefault().getPluginPreferences();
- prefs.setDefault(Logger.LOGGING_LEVEL, Logger.LOG_ERROR);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/IRSEImportExportProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/IRSEImportExportProvider.java
deleted file mode 100644
index 91ccf7579..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/IRSEImportExportProvider.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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.
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- *********************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-/**
- * An import export provider is an add-in interface for a persistence provider. If the provider
- * implements this interface then it may be used for import/export operations.
- */
-public interface IRSEImportExportProvider {
-
- /**
- * Exports an RSEDOM using this provider to a location named by the file parameter.
- * The export is synchronous.
- * @param folder the File object into which to export
- * @param dom the DOM to export
- * @param monitor the monitor to use for progress reporting and cancellation
- * @return true if the export completed.
- */
- public boolean exportRSEDOM(File folder, RSEDOM dom, IProgressMonitor monitor);
-
- /**
- * Imports an RSEDOM using this provider from a location named by the file parameter.
- * The import is synchronous.
- * @param folder the File object from which to import. The DOM is located within this
- * folder and the persistence provider must be able to find it. There must be only
- * one DOM in this folder.
- * @param monitor the monitor to use for progress reporting and cancellation
- * @return the DOM that was imported or null if the import did not succeed.
- */
- public RSEDOM importRSEDOM(File folder, IProgressMonitor monitor);
-
- /**
- * Sets the provider identifier for this provider. This id is the one specified
- * in the extension point that defined the provider, or the id that was specified for
- * the provider when it was added to the manager.
- * @param providerId The id for this provider.
- */
- public void setId(String providerId);
-
- /**
- * Gets the provider identifier for this provider. This id is the one specified
- * in the extension point that defined the provider, or the id that was specified for
- * the provider when it was added to the manager.
- * @return The id for this provider.
- */
- public String getId();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFConstants.java
deleted file mode 100644
index 8e0f95506..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFConstants.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.persistence;
-
-interface PFConstants {
-
- 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.
- */
- static final String[] MT_ATTRIBUTE_TYPE = new String[] { "04-attr-type", "attr-type" }; //$NON-NLS-1$ //$NON-NLS-2$
- static final String[] MT_ATTRIBUTE = new String[] { "03-attr", "attr" }; //$NON-NLS-1$ //$NON-NLS-2$
- static final String[] MT_CHILD = new String[] { "06-child", "child" }; //$NON-NLS-1$ //$NON-NLS-2$
- static final String[] MT_NODE_TYPE = new String[] { "01-type", "01-node-type", "n-type" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- static final String[] MT_NODE_NAME = new String[] { "00-name", "00-node-name", "n-name" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- static final String[] MT_REFERENCE = new String[] { "05-ref", "ref" }; //$NON-NLS-1$ //$NON-NLS-2$
-
- /* Type abbreviations */
- static final String AB_SUBSYSTEM = "SS"; //$NON-NLS-1$
- static final String AB_SERVICE_LAUNCHER = "SL"; //$NON-NLS-1$
- static final String AB_PROPERTY_SET = "PS"; //$NON-NLS-1$
- static final String AB_PROPERTY = "P"; //$NON-NLS-1$
- static final String AB_HOST = "H"; //$NON-NLS-1$
- static final String AB_FILTER_STRING = "FS"; //$NON-NLS-1$
- static final String AB_FILTER_POOL_REFERENCE = "FPR"; //$NON-NLS-1$
- static final String AB_FILTER_POOL = "FP"; //$NON-NLS-1$
- static final String AB_FILTER = "F"; //$NON-NLS-1$
- static final String AB_CONNECTOR_SERVICE = "CS"; //$NON-NLS-1$
- static final String AB_PROFILE = "PRF"; //$NON-NLS-1$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemAnchor.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemAnchor.java
deleted file mode 100644
index 30244eca4..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemAnchor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- *******************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.io.File;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-class PFFileSystemAnchor implements PFPersistenceAnchor {
-
- private File providerFolder = null;
-
- public PFFileSystemAnchor(File providerFolder) {
- this.providerFolder = providerFolder;
- }
-
- public IStatus deleteProfileLocation(String profileName, IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- File profileFolder = getProfileFolder(profileName);
- if (profileFolder.exists()) {
- delete(profileFolder);
- }
- return result;
- }
-
- public PFPersistenceLocation getProfileLocation(String profileLocationName) {
- File profileFolder = getProfileFolder(profileLocationName);
- PFPersistenceLocation result = new PFFileSystemLocation(profileFolder);
- return result;
- }
-
- public String[] getProfileLocationNames() {
- List names = new Vector(10);
- File[] profileCandidates = providerFolder.listFiles();
- for (int i = 0; i < profileCandidates.length; i++) {
- File profileCandidate = profileCandidates[i];
- if (profileCandidate.isDirectory()) {
- String candidateName = profileCandidate.getName();
- if (candidateName.startsWith(PFConstants.AB_PROFILE)) {
- names.add(candidateName);
- }
- }
- }
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.internal.persistence.PFPersistenceAnchor#makeSaveJob(org.eclipse.rse.persistence.dom.RSEDOM, org.eclipse.rse.persistence.IRSEPersistenceProvider)
- */
- public Job makeSaveJob(RSEDOM dom, IRSEPersistenceProvider provider) {
- return new PFFileSystemJob(dom, provider);
- }
-
- /**
- * Returns the File (directory) in which a profile is stored.
- * @return The folder that was created or found.
- */
- private File getProfileFolder(String profileLocationName) {
- File profileFolder = getFolder(providerFolder, profileLocationName);
- return profileFolder;
- }
-
- /**
- * Returns the specified folder of the parent container. If the folder does
- * not exist it creates it.
- * @param parent the parent folder
- * @param name the name of the folder to find or create
- * @return the found or created folder
- */
- private File getFolder(File parent, String name) {
- File folder = new File(parent, name);
- if (!folder.exists()) {
- folder.mkdir();
- }
- return folder;
- }
-
- /**
- * Delete a File resource. If the resource is a directory then
- * delete its children first.
- * @param resource
- */
- private void delete(File resource) {
- if (resource.isDirectory()) {
- File[] resources = resource.listFiles();
- for (int i = 0; i < resources.length; i++) {
- File child = resources[i];
- delete(child);
- }
- }
- resource.delete();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemJob.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemJob.java
deleted file mode 100644
index 4d38e07da..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemJob.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [188863] created out of SaveRSEDOMJob
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- *******************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-/**
- * The PFMetadataJob is a Job that belongs to the family
- * {@link RSECorePlugin#getThePersistenceManager()}. It is used to
- * save a DOM to the workspace metadata area. A DOM corresponds to a profile.
- */
-public class PFFileSystemJob extends Job {
-
- private static Object jobFamily = RSECorePlugin.getThePersistenceManager();
-
- private RSEDOM _dom;
- private IRSEPersistenceProvider _provider;
-
- private class SerializingRule implements ISchedulingRule {
- public boolean contains(ISchedulingRule rule) {
- return this == rule;
- }
- public boolean isConflicting(ISchedulingRule rule) {
- return (rule instanceof SerializingRule);
- }
- }
-
- public PFFileSystemJob(RSEDOM dom, IRSEPersistenceProvider provider) {
- super("Saving Profile"); //$NON-NLS-1$
- String title = NLS.bind(RSECoreMessages.SaveRSEDOMJob_SavingProfileJobName, dom.getName());
- setName(title);
- setRule(new SerializingRule());
- _dom = dom;
- _provider = provider;
- }
-
- public IStatus run(IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- boolean saved = _provider.saveRSEDOM(_dom, monitor);
- if (!saved) {
- result = Status.CANCEL_STATUS;
- }
- return result;
- }
-
- public boolean belongsTo(Object family) {
- Object[] families = new Object[] {jobFamily};
- for (int i = 0; i < families.length; i++) {
- Object object = families[i];
- if (family == object) return true;
- }
- return super.belongsTo(family);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemLocation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemLocation.java
deleted file mode 100644
index 30b14389f..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFFileSystemLocation.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.internal.persistence;
-
-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.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.rse.core.RSECorePlugin;
-
-class PFFileSystemLocation implements PFPersistenceLocation {
-
- private File _baseFolder;
-
- public PFFileSystemLocation(File baseFolder) {
- _baseFolder = baseFolder;
- }
-
- public void ensure() {
- if (!exists()) {
- _baseFolder.mkdirs();
- }
- }
- public boolean exists() {
- return _baseFolder.exists();
- }
-
- public PFPersistenceLocation getChild(String childName) {
- File childFolder = new File(_baseFolder, childName);
- return new PFFileSystemLocation(childFolder);
- }
-
- public PFPersistenceLocation[] getChildren() {
- File[] members = _baseFolder.listFiles();
- if (members == null) members = new File[0];
- List children = new ArrayList(members.length);
- for (int i = 0; i < members.length; i++) {
- File member = members[i];
- if (member.isDirectory()) {
- PFPersistenceLocation child = new PFFileSystemLocation(member);
- children.add(child);
- }
- }
- PFPersistenceLocation[] result = new PFPersistenceLocation[children.size()];
- children.toArray(result);
- return result;
- }
-
- public InputStream getContents() {
- InputStream stream = null;
- File contentsFile = getContentsFile();
- try {
- stream = new FileInputStream(contentsFile);
- } catch (FileNotFoundException e) {
- logException(e);
- }
- return stream;
- }
-
- public URI getLocator() {
- return _baseFolder.toURI();
- }
-
- public String getName() {
- return _baseFolder.getName();
- }
-
- public boolean hasContents() {
- return getContentsFile().exists();
- }
-
- public void keepChildren(Set keepSet) {
- File[] children = _baseFolder.listFiles();
- if (children == null) children = new File[0];
- for (int i = 0; i < children.length; i++) {
- File child = children[i];
- if (!keepSet.contains(child.getName())) {
- deleteFile(child);
- }
- }
- }
-
- public void setContents(InputStream stream) {
- ensure();
- OutputStream out = null;
- try {
- out = new FileOutputStream(getContentsFile());
- byte[] buffer = new byte[1000];
- int n = stream.read(buffer);
- while(n > 0) {
- out.write(buffer, 0, n);
- n = stream.read(buffer);
- }
- } catch (FileNotFoundException e) {
- logException(e);
- } catch (IOException e) {
- logException(e);
- }
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- logException(e);
- }
- }
- try {
- stream.close();
- } catch (IOException e) {
- logException(e);
- }
- }
-
- /**
- * Force the deletion of the named "file" (which may be a folder).
- * The file's children must be deleted first.
- * @param file the file to delete.
- */
- private void deleteFile(File file) {
- if (file.exists()) {
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++) {
- File child = children[i];
- deleteFile(child);
- }
- }
- file.delete();
- }
- }
-
- private File getContentsFile() {
- File contentsFile = new File(_baseFolder, PFConstants.PROPERTIES_FILE_NAME);
- return contentsFile;
- }
-
- private void logException(Exception e) {
- RSECorePlugin.getDefault().getLogger().logError("unexpected exception", e); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceAnchor.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceAnchor.java
deleted file mode 100644
index b90c198c1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceAnchor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.persistence;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-interface PFPersistenceAnchor {
-
- /**
- * @return the names of all valid profiles. Can be used to get a profile
- * location from getProfileLocation().
- */
- String[] getProfileLocationNames();
-
- /**
- * @param profileName The name of a profile
- * @param monitor a progress monitor for progress and canceling
- * @return an IStatus indicating if the delete operation succeeded
- */
- IStatus deleteProfileLocation(String profileName, IProgressMonitor monitor);
-
- /**
- * @param profileName the name of the profile to get the location for
- * @return the location of the profile
- */
- PFPersistenceLocation getProfileLocation(String profileName);
-
- /**
- * Factory method to return a new Job instance to save an RSE DOM
- * to the persistence location managed by this anchor.
- * @param dom the RSEDOM (Profile) to save.
- * @param provider the Persistence Provider asking for save.
- * @return a Job to perform the save operation with proper
- * scheduling rules.
- */
- Job makeSaveJob(RSEDOM dom, IRSEPersistenceProvider provider);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceLocation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceLocation.java
deleted file mode 100644
index 32d1afb75..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFPersistenceLocation.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.persistence;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Set;
-
-interface PFPersistenceLocation {
-
- /**
- * @return true if the location actually exists
- */
- boolean exists();
-
- /**
- * Ensures the existence of the base location
- */
- void ensure();
-
- /**
- * @return true if the location has contents associated with it. The
- * contents may be retrieved using getContents()
- */
- boolean hasContents();
-
- /**
- * @return the URI of this location. Should only be used for display
- * purposes since the protocol is not guaranteed to be understood by
- * any existing URI processor.
- */
- URI getLocator();
-
- /**
- * @return the locations of the children of this location. It is possible
- * for a location to have both contents and children. Since this location
- * is a handle it may not exist, in which case this returns an empty array.
- */
- PFPersistenceLocation[] getChildren();
-
-
- /**
- * Return the child of a particular simple name. This is a handle operation.
- * The child does not need to exist to for this to produce a location.
- * @param childName The name of the child.
- * @return The child of that name.
- */
- PFPersistenceLocation getChild(String childName);
-
- /**
- * @return The simple name of this location, relative to its parent location.
- */
- String getName();
-
- /**
- * Keeps only those children from this location that are in the keep set.
- * Typically used to clean renamed nodes from the tree on a save operation.
- * If the location does not yet exist, this does nothing.
- * @param keepSet The names of the children that should be kept. Others are discarded.
- */
- void keepChildren(Set keepSet);
-
- /**
- * Sets the contents of this location to a particular stream.
- * Implementations must close this stream when finished.
- * This forces the location to come into existence if it does not already exist.
- * @param stream the stream from which to read the new contents of this location.
- */
- void setContents(InputStream stream);
-
- /**
- * Returns an open stream which can be read to retrieve the contents of this
- * location. The client is responsible for closing this stream.
- * If the location does not yet exist this will return null and log the attempt.
- * @return a stream that will retrieve the contents of this location.
- */
- InputStream getContents();
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceAnchor.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceAnchor.java
deleted file mode 100644
index 7aa927150..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceAnchor.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * David Dykstal (IBM) - [189858] delayed the creation of the remote systems project by using handle-only operations.
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- *******************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IContainer;
-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.core.runtime.jobs.Job;
-import org.eclipse.rse.core.IRSECoreStatusCodes;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-class PFWorkspaceAnchor implements PFPersistenceAnchor {
-
- public String[] getProfileLocationNames() {
- List names = new Vector(10);
- IFolder providerFolder = getProviderFolder();
- if (providerFolder.isAccessible()) {
- 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();
- if (candidateName.startsWith(PFConstants.AB_PROFILE)) {
- names.add(candidateName);
- }
- }
- }
- } catch (CoreException e) {
- logException(e);
- }
- }
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- public IStatus deleteProfileLocation(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, RSECorePlugin.PLUGIN_ID, IRSECoreStatusCodes.EXCEPTION_OCCURRED, RSECoreMessages.PropertyFileProvider_UnexpectedException, e);
- }
- }
- return result;
- }
-
- public PFPersistenceLocation getProfileLocation(String profileLocationName) {
- IFolder profileFolder = getProfileFolder(profileLocationName);
- PFPersistenceLocation result = new PFWorkspaceLocation(profileFolder);
- return result;
- }
-
- public Job makeSaveJob(RSEDOM dom, IRSEPersistenceProvider provider) {
- return new PFWorkspaceJob(dom, provider);
- }
-
- /**
- * Returns the IFolder in which a profile is stored.
- * This is a handle operation, the resulting folder may not exist.
- * @return The folder that was found.
- */
- private IFolder getProfileFolder(String profileLocationName) {
- IFolder providerFolder = getProviderFolder();
- IFolder profileFolder = getFolder(providerFolder, profileLocationName);
- return profileFolder;
- }
-
- /**
- * Returns the IFolder in which this persistence provider stores its profiles.
- * This is a handle operation. It will not create the folder if it is not
- * found.
- * @return The folder that contains the profiles for this provider.
- */
- private IFolder getProviderFolder() {
- IProject project = SystemResourceManager.getRemoteSystemsProject(false);
- if (project.isAccessible()) {
- try {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception e) {
- }
- }
- IFolder providerFolder = getFolder(project, "dom.properties"); //$NON-NLS-1$
- return providerFolder;
- }
-
- /**
- * Returns the specified folder of the parent container.
- * This is a handle operation. The folder may not exist.
- * @param parent the parent container - typically a project or folder
- * @param name the name of the folder to find
- * @return the found folder (may not exist)
- */
- private IFolder getFolder(IContainer parent, String name) {
- IPath path = new Path(name);
- IFolder folder = parent.getFolder(path);
- return folder;
- }
-
- private void logException(Exception e) {
- RSECorePlugin.getDefault().getLogger().logError("unexpected exception", e); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceJob.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceJob.java
deleted file mode 100644
index 3ce341f7b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceJob.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [188863] created out of SaveRSEDOMJob
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- *******************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-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.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-/**
- * The PFWorkspaceJob is a workspace job that belongs to the family
- * {@link RSECorePlugin#getThePersistenceManager()}. It is used to
- * save a DOM to the workspace. A DOM corresponds to a profile.
- */
-public class PFWorkspaceJob extends WorkspaceJob {
-
- private RSEDOM _dom;
- private IRSEPersistenceProvider _provider;
-
- public PFWorkspaceJob(RSEDOM dom, IRSEPersistenceProvider provider) {
- super("Saving Profile"); //$NON-NLS-1$
- String title = NLS.bind(RSECoreMessages.SaveRSEDOMJob_SavingProfileJobName, dom.getName());
- setName(title);
- setRule(ResourcesPlugin.getWorkspace().getRoot());
- _dom = dom;
- _provider = provider;
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- IStatus result = Status.OK_STATUS;
- boolean saved = _provider.saveRSEDOM(_dom, monitor);
- if (!saved) {
- result = Status.CANCEL_STATUS;
- }
- return result;
- }
-
- public boolean belongsTo(Object family) {
- Object[] families = new Object[] {RSECorePlugin.getThePersistenceManager()};
- for (int i = 0; i < families.length; i++) {
- Object object = families[i];
- if (family == object) return true;
- }
- return super.belongsTo(family);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceLocation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceLocation.java
deleted file mode 100644
index 0136dcbb9..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PFWorkspaceLocation.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- * David Dykstal (IBM) - [189858] delayed the creation of the remote systems project by
- * using handle-only operations. The project is created only
- * if required to exist for writing.
- * David Dykstal (IBM) - [191130] use explicit getRemoteSystemsProject(boolean) method
- *******************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-
-class PFWorkspaceLocation implements PFPersistenceLocation {
- IFolder baseFolder = null;
-
- public PFWorkspaceLocation(IFolder baseResource) {
- this.baseFolder = baseResource;
- }
-
- public boolean exists() {
- return baseFolder.exists();
- }
-
- public void ensure() {
- ensure(baseFolder);
- }
-
- public PFPersistenceLocation getChild(String childName) {
- IPath path = new Path(childName);
- IFolder member = baseFolder.getFolder(path);
- PFPersistenceLocation result = new PFWorkspaceLocation(member);
- return result;
- }
-
- public PFPersistenceLocation[] getChildren() {
- IResource[] members;
- try {
- members = baseFolder.members();
- } catch (CoreException e) {
- logException(e);
- members = new IResource[0];
- }
- List children = new ArrayList(members.length);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if (member.getType() == IResource.FOLDER) {
- PFPersistenceLocation child = new PFWorkspaceLocation((IFolder)member);
- children.add(child);
- }
- }
- PFPersistenceLocation[] result = new PFPersistenceLocation[children.size()];
- children.toArray(result);
- return result;
- }
-
- public URI getLocator() {
- return baseFolder.getLocationURI();
- }
-
- public String getName() {
- return baseFolder.getName();
- }
-
- public boolean hasContents() {
- IPath propertiesFileName = new Path(PFConstants.PROPERTIES_FILE_NAME);
- IFile propertiesFile = baseFolder.getFile(propertiesFileName);
- boolean result = propertiesFile.exists();
- return result;
- }
-
- public void keepChildren(Set keepSet) {
- try {
- IResource[] children = baseFolder.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) {
- logException(e);
- }
- }
-
- public void setContents(InputStream stream) {
- IPath propertiesFileName = new Path(PFConstants.PROPERTIES_FILE_NAME);
- IFile propertiesFile = baseFolder.getFile(propertiesFileName);
- try {
- if (propertiesFile.exists()) {
- propertiesFile.setContents(stream, IResource.FORCE | IResource.KEEP_HISTORY, null);
- } else {
- propertiesFile.create(stream, IResource.FORCE | IResource.KEEP_HISTORY, null);
- }
- } catch (CoreException e) {
- logException(e);
- }
- }
-
- public InputStream getContents() {
- InputStream result = null;
- IPath propertiesFileName = new Path(PFConstants.PROPERTIES_FILE_NAME);
- IFile propertiesFile = baseFolder.getFile(propertiesFileName);
- if (propertiesFile.exists()) {
- try {
- result = propertiesFile.getContents();
- } catch (CoreException e) {
- logException(e);
- }
- }
- return result;
- }
-
- private void ensure(IContainer resource) {
- if (!resource.isAccessible()) {
- if (resource.getType() == IResource.PROJECT) {
- SystemResourceManager.getRemoteSystemsProject(true);
- } else {
- IFolder folder = (IFolder) resource;
- ensure(folder.getParent());
- try {
- folder.create(true, true, null);
- } catch (CoreException e) {
- logException(e);
- }
- }
- }
- }
-
- private void logException(Exception e) {
- RSECorePlugin.getDefault().getLogger().logError("unexpected exception", e); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java
deleted file mode 100644
index 238011efc..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java
+++ /dev/null
@@ -1,904 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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 the initial implementation:
- * David McKnight, David Dykstal.
- *
- * Contributors:
- * David Dykstal (IBM) - removed printlns, printStackTrace and added logging.
- * David Dykstal (IBM) - [177882] fixed escapeValue for garbling of CJK characters
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [188863] fix job conflict problems for save jobs, ignore bad profiles on restore
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- * David Dykstal (IBM) - [252357] made nested property sets and properties embedded nodes in the persistent form
- ********************************************************************************/
-package org.eclipse.rse.internal.persistence;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-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.regex.Matcher;
-import java.util.regex.Pattern;
-
-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.rse.core.IRSECoreStatusCodes;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.logging.Logger;
-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, IRSEImportExportProvider {
-
- private static final String NULL_VALUE_STRING = "null"; //$NON-NLS-1$
- /* interesting character sets */
- private static final String VALID = "abcdefghijklmnopqrstuvwxyz0123456789-._"; //$NON-NLS-1$
- private static final String UPPER = "ABCDEFGHIJKLMNOPQRTSUVWXYZ"; //$NON-NLS-1$
-
- /* properties */
-
- /**
- * anchor location - can be workspace or metadata
- */
- private static final String P_LOCATION = "location"; //$NON-NLS-1$
-
- /* property values */
- private static final String PV_LOCATION_WORKSPACE = "workspace"; //$NON-NLS-1$
- private static final String PV_LOCATION_METADATA = "metadata"; //$NON-NLS-1$
-
- /* location names */
- private static final String LOC_PROFILES = "profiles"; //$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();
- private Map saveJobs = new HashMap();
-// private PFPersistenceAnchor anchor = null;
- private Properties properties = null;
- private String providerId = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSavedProfileNames()
- */
- public String[] getSavedProfileNames() {
- String[] locationNames = getAnchor().getProfileLocationNames();
- List names = new ArrayList(locationNames.length);
- for (int i = 0; i < locationNames.length; i++) {
- String locationName = locationNames[i];
- String profileName = getNodeName(locationName);
- if (isValidName(profileName)) {
- names.add(profileName);
- }
- }
- String[] result = new String[names.size()];
- names.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#deleteProfile(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus deleteProfile(String profileName, IProgressMonitor monitor) {
- String profileLocationName = getLocationName(PFConstants.AB_PROFILE, profileName);
- IStatus result = getAnchor().deleteProfileLocation(profileLocationName, monitor);
- 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) {
- boolean saved = false;
- synchronized (dom) {
- String profileLocationName = getLocationName(dom);
- PFPersistenceAnchor anchor = getAnchor();
- saved = save(dom, anchor, profileLocationName, monitor);
- if (saved) {
- dom.markUpdated();
- }
- }
- return saved;
- }
-
- /* (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) {
- String profileLocationName = getLocationName(PFConstants.AB_PROFILE, profileName);
- PFPersistenceAnchor anchor = getAnchor();
- RSEDOM dom = load(anchor, profileLocationName, monitor);
- return dom;
- }
-
- /**
- * Load a DOM from a named location within an anchor
- * @param anchor the anchor that contained named locations for DOMs
- * @param name the named location of that DOM
- * @param monitor for progress reporting and cancelation
- * @return the DOM what was loaded or null if the load failed
- */
- private RSEDOM load(PFPersistenceAnchor anchor, String name, IProgressMonitor monitor) {
- RSEDOM dom = null;
- PFPersistenceLocation location = anchor.getProfileLocation(name);
- if (location.exists()) {
- int n = countLocations(location);
- monitor.beginTask(RSECoreMessages.PropertyFileProvider_LoadingTaskName, n);
- dom = (RSEDOM)loadNode(null, location, monitor);
- monitor.done();
- } else {
- String message = location.getLocator().toString() + " does not exist."; //$NON-NLS-1$
- getLogger().logError(message, null);
- }
- return dom;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSaveJob(org.eclipse.rse.persistence.dom.RSEDOM)
- */
- public Job getSaveJob(RSEDOM dom) {
- Job saveJob = (Job) saveJobs.get(dom);
- if (saveJob == null) {
- PFPersistenceAnchor anchor = getAnchor();
- saveJob = anchor.makeSaveJob(dom, this);
- saveJobs.put(dom, saveJob);
- }
- return saveJob;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#setProperties(java.util.Properties)
- */
- public void setProperties(Properties properties) {
- Properties defaults = new Properties();
- defaults.setProperty(P_LOCATION, PV_LOCATION_WORKSPACE);
- this.properties = new Properties(defaults);
- Set keys = properties.keySet();
- for (Iterator z = keys.iterator(); z.hasNext();) {
- String key = (String) z.next();
- String value = properties.getProperty(key);
- if (value != null) {
- this.properties.put(key, value);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.persistence.IRSEImportExportProvider#exportRSEDOM(java.io.File, org.eclipse.rse.persistence.dom.RSEDOM, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean exportRSEDOM(File folder, RSEDOM dom, IProgressMonitor monitor) {
- PFPersistenceAnchor anchor = new PFFileSystemAnchor(folder);
- String name = "DOM"; //$NON-NLS-1$
- boolean saved = save(dom, anchor, name, monitor);
- return saved;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.persistence.IRSEImportExportProvider#importRSEDOM(java.io.File, org.eclipse.core.runtime.IProgressMonitor)
- */
- public RSEDOM importRSEDOM(File folder, IProgressMonitor monitor) {
- PFPersistenceAnchor anchor = new PFFileSystemAnchor(folder);
- String name = "DOM"; //$NON-NLS-1$
- RSEDOM dom = load(anchor, name, monitor);
- return dom;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.persistence.IRSEImportExportProvider#setId(java.lang.String)
- */
- public void setId(String providerId) {
- this.providerId = providerId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.persistence.IRSEImportExportProvider#getId()
- */
- public String getId() {
- return providerId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#setMigratedMark(java.lang.String, boolean)
- */
- public IStatus setMigrationMark(String profileName, boolean migrated) {
- String message = "PropertyFileProvider does not support profile migration"; //$NON-NLS-1$
- return new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IRSECoreStatusCodes.MIGRATION_NOT_SUPPORTED, message, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#supportsMigration()
- */
- public boolean supportsMigration() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getMigratedProfileNames()
- */
- public String[] getMigratedProfileNames() {
- return new String[0];
- }
-
- /**
- * Checks a profile name for validity. Currently all names are valid except for completely blank names.
- * @param profileName the name to check
- * @return true if the name is valid.
- */
- private boolean isValidName(String profileName) {
- return (profileName.trim().length() > 0);
- }
-
- private PFPersistenceAnchor getAnchor() {
- PFPersistenceAnchor anchor = null;
- String location = properties.getProperty(P_LOCATION);
- if (location.equals(PV_LOCATION_WORKSPACE)) {
- anchor = new PFWorkspaceAnchor();
- } else if (location.equals(PV_LOCATION_METADATA)) {
- File profilesFolder = getProfilesFolder();
- anchor = new PFFileSystemAnchor(profilesFolder);
- } else {
- // if no explicit location is specified we assume the metadata location
- File profilesFolder = getProfilesFolder();
- anchor = new PFFileSystemAnchor(profilesFolder);
- }
- return anchor;
- }
-
- /**
- * @return the folder that acts as the parent for profile folders.
- */
- private File getProfilesFolder() {
- IPath statePath = RSECorePlugin.getDefault().getStateLocation();
- File stateFolder = new File(statePath.toOSString());
- File profilesFolder = new File(stateFolder, LOC_PROFILES);
- if (!profilesFolder.exists()) {
- profilesFolder.mkdir();
- }
- return profilesFolder;
- }
-
- /**
- * Save a DOM
- * @param dom the DOM to save
- * @param anchor the anchor in which DOMs may be saved
- * @param name the name of the saved DOM within the anchor
- * @param monitor for progress reporting and cancelation
- * @return true if the DOM was saved to the named location within the anchor.
- */
- private boolean save(RSEDOM dom, PFPersistenceAnchor anchor, String name, IProgressMonitor monitor) {
- boolean saved = false;
- PFPersistenceLocation profileLocation = anchor.getProfileLocation(name);
- try {
- int n = countNodes(dom);
- monitor.beginTask(RSECoreMessages.PropertyFileProvider_SavingTaskName, n);
- saveNode(dom, profileLocation, monitor);
- monitor.done();
- saved = true;
- } catch (Exception e) {
- logException(e);
- }
- return saved;
- }
-
- /**
- * Saves a node from the DOM to the file system.
- * @param node The node to save.
- * @param location The location in which to save this node.
- * @param monitor The progress monitor. If the monitor has been cancel then
- * this method will do nothing and return null.
- */
- private void saveNode(RSEDOMNode node, PFPersistenceLocation location, IProgressMonitor monitor) {
- if (monitor.isCanceled()) return;
- location.ensure();
- Properties properties = getProperties(node, false, monitor);
- RSEDOMNode[] childNodes = node.getChildren();
- Set childNames = new HashSet();
- for (int i = 0; i < childNodes.length; i++) {
- RSEDOMNode childNode = childNodes[i];
- String index = getIndexString(i);
- if (!isNodeEmbedded(childNode)) {
- String key = combine(PFConstants.MT_REFERENCE[0], index);
- String childName = getLocationName(childNode);
- PFPersistenceLocation childLocation = location.getChild(childName);
- saveNode(childNode, childLocation, monitor);
- properties.put(key, childName);
- childNames.add(childName);
- }
- }
- location.keepChildren(childNames);
- writeProperties(properties, "RSE DOM Node", location); //$NON-NLS-1$
- }
-
- /**
- * Returns the node name derived from the location name.
- * Location names are constructed to be valid file system resource names and
- * node names may be arbitrary. There is a mapping between the two.
- * @param locationName The location name from which to derive the node name.
- * @return the node name.
- */
- private String getNodeName(String locationName) {
- String[] parts = split(locationName, 2);
- String frozenName = parts[1];
- String result = thaw(frozenName);
- return result;
- }
-
- /**
- * Returns the name of a location that can be used to store a node of a particular
- * type. The name is contructed to conform to the rules for file systems.
- * 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 location name.
- * @param node The node that will eventually be stored in this location.
- * @return The name of the location to store this node.
- */
- private String getLocationName(RSEDOMNode node) {
- String type = node.getType();
- type = (String) typeQualifiers.get(type);
- String name = node.getName();
- String result = getLocationName(type, name);
- return result;
- }
-
- /**
- * Returns the name of a location that can be used to store a node of a particular
- * type. The name is contructed to conform to the rules for file systems.
- * 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 location name.
- * @param nodeName The node that will eventually be stored in this location.
- * @param typeName The type abbreviation for the node at this location.
- * @return The name of the location to store this node.
- */
- private String getLocationName(String typeName, String nodeName) {
- String name = freeze(nodeName);
- String result = combine(typeName, name);
- return result;
- }
-
- /**
- * 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, PFConstants.AB_CONNECTOR_SERVICE);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER, PFConstants.AB_FILTER);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_POOL, PFConstants.AB_FILTER_POOL);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_POOL_REFERENCE, PFConstants.AB_FILTER_POOL_REFERENCE);
- typeQualifiers.put(IRSEDOMConstants.TYPE_FILTER_STRING, PFConstants.AB_FILTER_STRING);
- typeQualifiers.put(IRSEDOMConstants.TYPE_HOST, PFConstants.AB_HOST);
- typeQualifiers.put(IRSEDOMConstants.TYPE_PROFILE, PFConstants.AB_PROFILE);
- typeQualifiers.put(IRSEDOMConstants.TYPE_PROPERTY, PFConstants.AB_PROPERTY);
- typeQualifiers.put(IRSEDOMConstants.TYPE_PROPERTY_SET, PFConstants.AB_PROPERTY_SET);
- typeQualifiers.put(IRSEDOMConstants.TYPE_SERVER_LAUNCHER, PFConstants.AB_SERVICE_LAUNCHER);
- typeQualifiers.put(IRSEDOMConstants.TYPE_SUBSYSTEM, PFConstants.AB_SUBSYSTEM);
- return typeQualifiers;
- }
-
- /**
- * Write a set of properties to a location.
- * @param properties The Properties object to write.
- * @param header The header to include in the location contents.
- * @param location The PersistenceLocation which will contain the properties.
- * @param monitor The progress monitor.
- */
- private void writeProperties(Properties properties, String header, PFPersistenceLocation location) {
- 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$
- out.println(keyvalue);
- }
- out.close();
- ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
- location.setContents(inStream);
- }
-
- /**
- * 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.
- * @param node The node to be tested.
- * @return true if the node is to be embedded.
- */
- private boolean isNodeEmbedded(RSEDOMNode node) {
- String nodeType = node.getType();
- if (nodeType.equals(IRSEDOMConstants.TYPE_FILTER)) return true;
- if (nodeType.equals(IRSEDOMConstants.TYPE_CONNECTOR_SERVICE)) return true;
- if (nodeType.equals(IRSEDOMConstants.TYPE_PROPERTY)) return true;
- if (nodeType.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)) {
- RSEDOMNode parent = node.getParent();
- String parentType = parent.getType();
- if (parentType.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)) return true;
- }
- return false;
- }
-
- /**
- * 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(PFConstants.MT_NODE_NAME[0], node.getName());
- properties.put(PFConstants.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(PFConstants.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);
- }
- }
- }
- 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(PFConstants.MT_ATTRIBUTE[0], attributeName);
- properties.put(propertyKey, fixValue(attribute.getValue()));
- String attributeType = attribute.getType();
- if (attributeType != null) {
- propertyKey = combine(PFConstants.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 minimum 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;
- }
-
- /**
- * Counts the number of locations that have contents in this location 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 location
- * @return the number of locations that have contents.
- */
- private int countLocations(PFPersistenceLocation location) {
- int result = 0;
- if (location.hasContents()) {
- result += 1;
- }
- PFPersistenceLocation[] children = location.getChildren();
- for (int i = 0; i < children.length; i++) {
- PFPersistenceLocation child = children[i];
- result += countLocations(child);
- }
- return result;
- }
-
- /**
- * Loads a node from a location.
- * @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 nodeLocation The location in which the contents of this node is found.
- * @param monitor The monitor used to report progress and cancelation. If the monitor is
- * in cancelled state then it this does method does nothing and returns null. If the monitor
- * is not cancelled then its work count is incremented by one.
- * @return The newly loaded node.
- */
- private RSEDOMNode loadNode(RSEDOMNode parent, PFPersistenceLocation nodeLocation, IProgressMonitor monitor) {
- RSEDOMNode node = null;
- if (!monitor.isCanceled()) {
- Properties properties = loadProperties(nodeLocation);
- if (properties != null) {
- node = makeNode(parent, nodeLocation, properties, monitor);
- }
- monitor.worked(1);
- }
- return node;
- }
-
- /**
- * Loads the properties found in the location. Returns null if no properties
- * were found.
- * @param location The location in which to look for properties.
- * @return The Properties object.
- */
- private Properties loadProperties(PFPersistenceLocation location) {
- Properties properties = null;
- if (location.hasContents()) {
- properties = new Properties();
- InputStream inStream = location.getContents();
- try {
- properties.load(inStream);
- inStream.close();
- } catch (IOException e) {
- logException(e);
- }
- }
- 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 location The location in which referenced child folders can be found.
- * @param properties The properties from which to create the node.
- * @param monitor a monitor to support cancellation and progress reporting.
- * @return the newly created DOM node and its children.
- */
- private RSEDOMNode makeNode(RSEDOMNode parent, PFPersistenceLocation location, Properties properties, IProgressMonitor monitor) {
- String nodeType = getProperty(properties, PFConstants.MT_NODE_TYPE);
- String nodeName = getProperty(properties, PFConstants.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, PFConstants.MT_ATTRIBUTE)) {
- String value = properties.getProperty(key);
- attributes.put(words[1], value);
- } else if (find(metatype, PFConstants.MT_ATTRIBUTE_TYPE)) {
- String type = properties.getProperty(key);
- attributeTypes.put(words[1], type);
- } else if (find(metatype, PFConstants.MT_REFERENCE)) {
- referenceKeys.add(key);
- } else if (find(metatype, PFConstants.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, location, p, monitor);
- }
- for (Iterator z = referenceKeys.iterator(); z.hasNext();) {
- String key = (String) z.next();
- String childLocationName = properties.getProperty(key);
- PFPersistenceLocation childLocation = location.getChild(childLocationName);
- loadNode(node, childLocation, 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;
- }
-
- /**
- * 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);
- }
-
- private Logger getLogger() {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- return logger;
- }
-
- private void logException(Exception e) {
- getLogger().logError("unexpected exception", e); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEEnvelope.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEEnvelope.java
deleted file mode 100644
index c52d7c941..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEEnvelope.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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.
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- * David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
- * David Dykstal (IBM) - [233876] Filters lost after restart
- *********************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.io.BufferedReader;
-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.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-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.Status;
-import org.eclipse.rse.core.IRSECoreStatusCodes;
-import org.eclipse.rse.core.RSECorePlugin;
-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.IPropertySet;
-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.internal.core.RSECoreMessages;
-import org.eclipse.rse.internal.core.filters.HostOwnedFilterPoolPattern;
-import org.eclipse.rse.internal.persistence.dom.RSEDOMExporter;
-import org.eclipse.rse.internal.persistence.dom.RSEDOMImporter;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-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;
-
-/**
- * An envelope holds a version of a DOM that can be used for import and export of host, filterpool, and propertyset
- * information. The envelope is capable of adding its contents to a profile (an import) and can also be used for generating a
- * stream of its contents that can be used later for restore (an export).
- */
-public class RSEEnvelope {
-
- // IStatus is immutable so we can do this safely
- private static IStatus INVALID_FORMAT = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IRSECoreStatusCodes.INVALID_FORMAT, RSECoreMessages.RSEEnvelope_IncorrectFormat, null);
- private static IStatus MODEL_NOT_EXPORTED = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, RSECoreMessages.RSEEnvelope_ModelNotExported);
-
- private RSEDOM dom = null;
-
- /**
- * Creates an import/export envelope.
- */
- public RSEEnvelope() {
- }
-
- /**
- * Replaces the contents of this envelope with the contents found on the input stream.
- * The format of the stream is determined by the persistence provider used to write the contents of that stream.
- * The stream is closed at the end of the operation.
- * This operation is performed in the thread of the caller.
- * If asynchronous operation is desired place this invocation inside a job.
- * @param in the input stream which is read into the envelope.
- * @param monitor a monitor used for tracking progress and cancelation.
- * If the monitor is cancelled this envelope will be empty.
- * @throws CoreException if a problem occur reading the stream.
- */
- public void get(InputStream in, IProgressMonitor monitor) throws CoreException {
- File envelopeFolder = getTemporaryFolder();
- IStatus status = unzip(in, envelopeFolder);
- if (status.isOK()) {
- String providerId = loadProviderId(envelopeFolder);
- IRSEPersistenceManager manager = RSECorePlugin.getThePersistenceManager();
- IRSEPersistenceProvider provider = manager.getPersistenceProvider(providerId);
- if (provider != null) {
- if (provider instanceof IRSEImportExportProvider) {
- IRSEImportExportProvider ieProvider = (IRSEImportExportProvider) provider;
- dom = ieProvider.importRSEDOM(envelopeFolder, monitor);
- if (dom == null) {
- status = INVALID_FORMAT;
- }
- } else {
- // invalid format due to bad persistence provider specfied
- status = INVALID_FORMAT;
- }
- } else {
- // invalid format due to provider not installed in this workbench
- status = INVALID_FORMAT;
- }
- }
- deleteFileSystemObject(envelopeFolder);
- if (!status.isOK()) {
- throw new CoreException(status);
- }
- }
-
- /**
- * Exports the contents of the envelope to output stream.
- * The format of the stream is determined by the persistence provider used.
- * The id of the persistence provider is also recorded in the stream.
- * The stream is closed at the end of the operation.
- * This operation is performed in the same thread as the caller.
- * If asynchronous operation is desired place this invocation inside a job.
- * @param out the output stream into which the contents of this envelope will be written
- * @param provider the persistence provider used to write the contents of this envelope
- * @param monitor a monitor used for tracking progress and cancelation. If the monitor is cancelled the
- * receiving location is deleted.
- * @throws CoreException containing a status describing the error, in particular this may be causes by
- * an IOException while preparing the contents or if the provider does not support export.
- */
- public void put(OutputStream out, IRSEPersistenceProvider provider, IProgressMonitor monitor) throws CoreException {
- IStatus status = Status.OK_STATUS;
- if (provider instanceof IRSEImportExportProvider) {
- IRSEImportExportProvider exportProvider = (IRSEImportExportProvider) provider;
- File envelopeFolder = getTemporaryFolder();
- boolean saved = exportProvider.exportRSEDOM(envelopeFolder, dom, monitor);
- if (saved) {
- status = saveProviderId(envelopeFolder, exportProvider);
- if (status.isOK()) {
- status = zip(envelopeFolder, out);
- }
- deleteFileSystemObject(envelopeFolder);
- } else {
- status = MODEL_NOT_EXPORTED;
- }
- } else {
- status = MODEL_NOT_EXPORTED;
- }
- try {
- out.close();
- } catch (IOException e) {
- status = makeStatus(e);
- }
- if (!status.isOK()) {
- throw new CoreException(status);
- }
- }
-
- /**
- * Adds a host to the envelope.
- * If a host of the same name is already present in the envelope the new host will
- * be renamed prior to adding it.
- * @param host the host to be added to the envelope
- */
- public void add(final IHost host) {
- // find and add the host-unique filter pools
- ISubSystem[] subsystems = host.getSubSystems();
- for (int i = 0; i < subsystems.length; i++) {
- ISubSystem subsystem = subsystems[i];
- ISystemFilterPool pool = subsystem.getUniqueOwningSystemFilterPool(false);
- if (pool != null) {
- add(pool);
- }
- }
- // add the host
- String type = IRSEDOMConstants.TYPE_HOST;
- String name = host.getName();
- Runnable action = new Runnable() {
- public void run() {
- RSEDOMExporter.getInstance().createNode(dom, host, true);
- }
- };
- addNode(type, name, action);
- }
-
- /**
- * Adds a filter pool to the envelope.
- * If a filter pool of the same name is already present in the envelope the new filter pool will
- * be renamed prior to adding it.
- * @param pool the filter pool to be added to the envelope
- */
- public void add(final ISystemFilterPool pool) {
- // add the pool
- String type = IRSEDOMConstants.TYPE_FILTER_POOL;
- String name = pool.getName();
- Runnable action = new Runnable() {
- public void run() {
- RSEDOMExporter.getInstance().createNode(dom, pool, true);
- }
- };
- addNode(type, name, action);
- }
-
- /**
- * Adds a property set to the envelope.
- * If a property set of the same name is already present in the envelope the new property set will
- * be renamed prior to adding it.
- * @param propertySet the property set to be added to the envelope
- */
- public void add(final IPropertySet propertySet) {
- // add the property set
- String type = IRSEDOMConstants.TYPE_FILTER_POOL;
- String name = propertySet.getName();
- Runnable action = new Runnable() {
- public void run() {
- RSEDOMExporter.getInstance().createNode(dom, propertySet, true);
- }
- };
- addNode(type, name, action);
- }
-
- /**
- * Merges the contents of the envelope into the profile.
- * @param profile the profile which is updated with the changes. The profile may be active or inactive.
- */
- public void mergeWith(ISystemProfile profile) throws CoreException {
- List hostNodes = new ArrayList(10);
- List filterPoolNodes = new ArrayList(10);
- List propertySetNodes = new ArrayList(10);
- Map hostMap = new HashMap(10); // associates an original host name with a HostRecord
- if (dom != null) {
- RSEDOMNode[] children = dom.getChildren();
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
- String nodeType = child.getType();
- if (nodeType.equals(IRSEDOMConstants.TYPE_HOST)) {
- hostNodes.add(child);
- } else if (nodeType.equals(IRSEDOMConstants.TYPE_FILTER_POOL)) {
- filterPoolNodes.add(child);
- } else if (nodeType.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)) {
- propertySetNodes.add(child);
- } else {
- throw new IllegalArgumentException("invalid dom node type"); //$NON-NLS-1$
- }
- }
- // create the hosts
- for (Iterator z = hostNodes.iterator(); z.hasNext();) {
- RSEDOMNode hostNode = (RSEDOMNode) z.next();
- String originalName = hostNode.getName();
- IHost host = mergeHost(profile, hostNode);
- hostMap.put(originalName, host);
- }
- // create the filter pools
- for (Iterator z = filterPoolNodes.iterator(); z.hasNext();) {
- RSEDOMNode filterPoolNode = (RSEDOMNode) z.next();
- String filterPoolName = filterPoolNode.getName();
- String configurationId = filterPoolNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_ID).getValue();
- HostOwnedFilterPoolPattern pattern = new HostOwnedFilterPoolPattern(configurationId);
- String hostName = pattern.extract(filterPoolName);
- if (hostName != null) {
- IHost host = (IHost) hostMap.get(hostName);
- if (host != null) {
- mergeHostFilterPool(profile, host, filterPoolNode);
- } else {
- mergeFilterPool(profile, filterPoolNode);
- }
- } else {
- mergeFilterPool(profile, filterPoolNode);
- }
- }
- // TODO create the property sets
- }
- }
-
- private IHost mergeHost(ISystemProfile profile, RSEDOMNode hostNode) {
- IHost host = null;
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- String baseHostName = hostNode.getName();
- String hostName = baseHostName;
- if (registry.getHost(profile, hostName) != null) {
- int n = 0;
- while (registry.getHost(profile, hostName) != null) {
- n++;
- hostName = baseHostName + "-" + n; //$NON-NLS-1$
- }
- hostNode.setName(hostName);
- }
- RSEDOMImporter importer = RSEDOMImporter.getInstance();
- host = importer.restoreHost(profile, hostNode);
- return host;
- }
-
- private void mergeHostFilterPool(ISystemProfile profile, IHost host, RSEDOMNode filterPoolNode) {
- String configurationId = filterPoolNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_ID).getValue();
- HostOwnedFilterPoolPattern pattern = new HostOwnedFilterPoolPattern(configurationId);
- String hostName = host.getAliasName();
- String filterPoolName = pattern.make(hostName);
- filterPoolNode.setName(filterPoolName);
- RSEDOMImporter importer = RSEDOMImporter.getInstance();
- ISystemFilterPool filterPool = importer.restoreFilterPool(profile, filterPoolNode);
- filterPool.setOwningParentName(hostName);
- }
-
- private ISystemFilterPool mergeFilterPool(ISystemProfile profile, RSEDOMNode filterPoolNode) {
- ISystemFilterPool filterPool = getMatchingFilterPool(profile, filterPoolNode);
- if (filterPool != null) {
- String filterPoolName = filterPoolNode.getName();
- int n = 0;
- while (filterPool != null) {
- n++;
- filterPoolName = filterPoolName + "-" + n; //$NON-NLS-1$
- filterPoolNode.setName(filterPoolName);
- filterPool = getMatchingFilterPool(profile, filterPoolNode);
- }
- }
- RSEDOMImporter importer = RSEDOMImporter.getInstance();
- filterPool = importer.restoreFilterPool(profile, filterPoolNode);
- return filterPool;
- }
-
- private ISystemFilterPool getMatchingFilterPool(ISystemProfile profile, RSEDOMNode filterPoolNode) {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- String filterPoolName = filterPoolNode.getName();
- String configurationId = filterPoolNode.getAttribute(IRSEDOMConstants.ATTRIBUTE_ID).getValue();
- ISubSystemConfiguration subsystemConfiguration = registry.getSubSystemConfiguration(configurationId);
- ISystemFilterPoolManager manager = subsystemConfiguration.getFilterPoolManager(profile);
- ISystemFilterPool filterPool = manager.getSystemFilterPool(filterPoolName);
- return filterPool;
- }
-
- private IStatus saveProviderId(File parent, IRSEImportExportProvider provider) {
- IStatus status = Status.OK_STATUS;
- String providerId = provider.getId();
- File idFile = new File(parent, "provider.id"); //$NON-NLS-1$
- try {
- OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(idFile));
- out.write(providerId);
- out.close();
- } catch (IOException e) {
- status = makeStatus(e);
- }
- return status;
- }
-
- private String loadProviderId(File parent) throws CoreException {
- String providerId = null;
- File idFile = new File(parent, "provider.id"); //$NON-NLS-1$
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(idFile)));
- providerId = in.readLine();
- in.close();
- } catch (IOException e) {
- IStatus status = INVALID_FORMAT;
- throw new CoreException(status);
- }
- return providerId;
- }
-
- private void addNode(String type, String name, Runnable action) {
- ensureDOM();
- RSEDOMNode existingNode = dom.getChild(type, name);
- if (existingNode != null) {
- dom.removeChild(existingNode);
- }
- action.run();
- }
-
- private void ensureDOM() {
- if (dom == null) {
- dom = new RSEDOM("dom"); //$NON-NLS-1$
- }
- }
-
- private String generateName(List usedNames) {
- String prefix = "env_"; //$NON-NLS-1$
- int n = 0;
- String name = prefix + n;
- while (usedNames.contains(name)) {
- n += 1;
- name = prefix + n;
- }
- return name;
- }
-
- private IStatus zip(File source, OutputStream target) {
- IStatus status = Status.OK_STATUS;
- try {
- ZipOutputStream out = new ZipOutputStream(target);
- zipEntry(out, source, ""); //$NON-NLS-1$
- out.close();
- } catch (IOException e) {
- status = makeStatus(e);
- }
- return status;
- }
-
- private void zipEntry(ZipOutputStream out, File file, String entryName) {
- if (file.isDirectory()) {
- zipDirectoryEntry(out, file, entryName);
- } else {
- zipFileEntry(out, file, entryName);
- }
- }
-
- private void zipDirectoryEntry(ZipOutputStream out, File file, String entryName) {
- String fileName = file.getName();
- if (!(fileName.equals(".") || fileName.equals(".."))) { //$NON-NLS-1$ //$NON-NLS-2$
- if (entryName.length() > 0) {
- try {
- ZipEntry entry = new ZipEntry(entryName + "/"); //$NON-NLS-1$
- out.putNextEntry(entry);
- out.closeEntry();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- File[] files = file.listFiles();
- for (int i = 0; i < files.length; i++) {
- File child = files[i];
- String childName = child.getName();
- String childEntryName = entryName + "/" + childName; //$NON-NLS-1$
- zipEntry(out, child, childEntryName);
- }
- }
- }
-
- private void zipFileEntry(ZipOutputStream out, File file, String entryName) {
- try {
- ZipEntry entry = new ZipEntry(entryName);
- out.putNextEntry(entry);
- byte[] buffer = new byte[4096];
- FileInputStream in = new FileInputStream(file);
- for (int n = in.read(buffer); n >= 0; n = in.read(buffer)) {
- out.write(buffer, 0, n);
- }
- in.close();
- out.closeEntry();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private IStatus unzip(InputStream in, File root) {
- IStatus status = Status.OK_STATUS;
- try {
- ZipInputStream inZip = new ZipInputStream(in);
- ZipEntry entry = inZip.getNextEntry();
- while (entry != null) {
- String name = entry.getName();
- File target = new File(root, name);
- if (entry.isDirectory()) {
- target.mkdir();
- } else {
- byte[] buffer = new byte[4096];
- FileOutputStream out = new FileOutputStream(target);
- for (int n = inZip.read(buffer); n >= 0; n = inZip.read(buffer)) {
- out.write(buffer, 0, n);
- }
- out.close();
- }
- entry = inZip.getNextEntry();
- }
- } catch (FileNotFoundException e) {
- status = makeStatus(e);
- } catch (ZipException e) {
- RSECorePlugin.getDefault().getLogger().logError(RSECoreMessages.RSEEnvelope_IncorrectFormat, e);
- status = INVALID_FORMAT;
- } catch (IOException e) {
- status = makeStatus(e);
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- status = makeStatus(e);
- }
- }
- return status;
- }
-
- private IStatus deleteFileSystemObject(File file) {
- IStatus status = Status.OK_STATUS;
- String fileName = file.getName();
- if (!(fileName.equals(".") || fileName.equals(".."))) { //$NON-NLS-1$ //$NON-NLS-2$
- if (file.exists()) {
- if (file.isDirectory()) {
- File[] files = file.listFiles();
- for (int i = 0; i < files.length; i++) {
- File child = files[i];
- deleteFileSystemObject(child);
- }
- }
- file.delete();
- }
- }
- return status;
- }
-
- private IStatus makeStatus(Exception e) {
- IStatus status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, "Unexpected exception", e); //$NON-NLS-1$
- return status;
- }
-
- /**
- * @return a file handle to a temporary directory
- */
- private File getTemporaryFolder() {
- IPath stateLocation = RSECorePlugin.getDefault().getStateLocation();
- File stateFolder = new File(stateLocation.toOSString());
- File envelopesFolder = new File(stateFolder, "envelopes"); //$NON-NLS-1$
- envelopesFolder.mkdir();
- List envelopeNames = Arrays.asList(envelopesFolder.list());
- String envelopeName = generateName(envelopeNames);
- File envelopeFolder = new File(envelopesFolder, envelopeName);
- envelopeFolder.mkdir();
- return envelopeFolder;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
deleted file mode 100644
index 9da776b92..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/RSEPersistenceManager.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Martin Oberhuber (Wind River) - [196919] Fix deadlock with workspace operations
- * Martin Oberhuber (Wind River) - [202416] Protect against NPEs when importing DOM
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- * David Dykstal (IBM) - [226728] NPE during init with clean workspace
- * David Dykstal (IBM) - [197027] Can lose data if closing eclipse before profile is saved
- * Kevin Doyle (IBM) - [243821] Save occurring on Main Thread
- * David Dykstal (IBM) - [243128] Problem during migration - NPE if provider does save without using a job.
- * Martin Oberhuber (Wind River) - [261503][cleanup] Get rid of deprecated getPluginPreferences()
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-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 org.eclipse.core.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.rse.core.IRSEPreferenceNames;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-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;
-import org.eclipse.rse.services.Mutex;
-
-/**
- * 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 class RSESaveParticipant implements ISaveParticipant {
-
- public RSESaveParticipant() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
- */
- public void doneSaving(ISaveContext context) {
- canScheduleSave = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
- */
- public void prepareToSave(ISaveContext context) throws CoreException {
- canScheduleSave = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
- */
- public void rollback(ISaveContext context) {
- canScheduleSave = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
- */
- public void saving(ISaveContext context) throws CoreException {
- List jobs = new ArrayList(10);
- synchronized(saveJobs) {
- jobs.addAll(saveJobs);
- }
- for (Iterator z = jobs.iterator(); z.hasNext();) {
- Job job = (Job) z.next();
- try {
- job.join();
- } catch (InterruptedException e) {
- // do nothing
- }
- }
- }
-
- }
-
- private class RSESaveJobChangeListener implements IJobChangeListener {
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#aboutToRun(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void aboutToRun(IJobChangeEvent event) {
- // do nothing
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#awake(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void awake(IJobChangeEvent event) {
- // do nothing
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void done(IJobChangeEvent event) {
- synchronized (saveJobs) {
- saveJobs.remove(event.getJob());
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#running(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void running(IJobChangeEvent event) {
- // do nothing
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#scheduled(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void scheduled(IJobChangeEvent event) {
- synchronized (saveJobs) {
- saveJobs.add(event.getJob());
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.IJobChangeListener#sleeping(org.eclipse.core.runtime.jobs.IJobChangeEvent)
- */
- public void sleeping(IJobChangeEvent event) {
- // do nothing
- }
- }
-
- private class ProviderRecord {
- private String providerId = null;
- private IConfigurationElement configurationElement = null;
- private IRSEPersistenceProvider provider = null;
- private boolean restored = false;
- synchronized boolean isRestored() {
- return restored;
- }
- synchronized void setRestored(boolean restored) {
- this.restored = restored;
- }
- boolean isAutostart() {
- boolean isAutostart = (configurationElement != null && ("true".equals(configurationElement.getAttribute("autostart")))); //$NON-NLS-1$ //$NON-NLS-2$
- boolean isDefault = (providerId.equals(getDefaultPersistenceProviderId()));
- return isAutostart || isDefault;
- }
- }
-
- private Map knownProviders = new HashMap(10);
- private Map loadedProviders = new HashMap(10);
- private Set saveJobs = new HashSet(10);
- private RSEDOMExporter _exporter;
- private RSEDOMImporter _importer;
- private RSESaveParticipant saveParticipant = new RSESaveParticipant();
- private RSESaveJobChangeListener jobChangeListener = new RSESaveJobChangeListener();
- private Mutex mutex = new Mutex();
- private volatile boolean canScheduleSave = true;
-
- public RSEPersistenceManager(ISystemRegistry registry) {
- _exporter = RSEDOMExporter.getInstance();
- _importer = RSEDOMImporter.getInstance();
- _importer.setSystemRegistry(registry);
- try {
- ResourcesPlugin.getWorkspace().addSaveParticipant(RSECorePlugin.getDefault(), saveParticipant);
- } catch (CoreException e) {
- RSECorePlugin.getDefault().getLogger().logError("Could not register save participant.", e); //$NON-NLS-1$
- }
- getProviderExtensions();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#isExporting()
- */
- public boolean isBusy() {
- return mutex.isLocked();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#registerPersistenceProvider(java.lang.String, org.eclipse.rse.persistence.IRSEPersistenceProvider)
- */
- public void registerPersistenceProvider(String id, IRSEPersistenceProvider provider) {
- ProviderRecord pr = getProviderRecord(id);
- if (provider instanceof IRSEImportExportProvider) {
- IRSEImportExportProvider ieProvider = (IRSEImportExportProvider) provider;
- ieProvider.setId(id);
- }
- pr.provider = provider;
- loadedProviders.put(provider, id);
- }
-
- /**
- * 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 getPersistenceProvider(String id) {
- ProviderRecord pr = getProviderRecord(id);
- if (pr.provider == null) {
- IRSEPersistenceProvider provider = loadProvider(pr.configurationElement);
- registerPersistenceProvider(id, provider);
- }
- return pr.provider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#getPersistenceProviderIds()
- */
- public String[] getPersistenceProviderIds() {
- Set ids = knownProviders.keySet();
- String[] result = new String[ids.size()];
- ids.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#commitProfile(org.eclipse.rse.core.model.ISystemProfile)
- */
- public boolean commitProfile(ISystemProfile profile, long timeout) {
- boolean result = false;
- result = save(profile, true, timeout);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#commitProfiles()
- */
- public ISystemProfile[] commitProfiles(long timeout) {
- List failed = new ArrayList(10);
- ISystemProfile[] profiles = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfiles();
- for (int idx = 0; idx < profiles.length; idx++) {
- ISystemProfile profile = profiles[idx];
- try {
- boolean ok = commitProfile(profile, timeout);
- if (!ok) {
- failed.add(profile);
- }
- } catch (Exception exc) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- String profileName = profile.getName();
- String message = "Error saving profile " + profileName; //$NON-NLS-1$
- logger.logError(message, exc);
- failed.add(profile);
- }
- }
- ISystemProfile[] result = new ISystemProfile[failed.size()];
- failed.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#migrateProfile(org.eclipse.rse.core.model.ISystemProfile, org.eclipse.rse.persistence.IRSEPersistenceProvider)
- */
- public void migrateProfile(ISystemProfile profile, IRSEPersistenceProvider persistenceProvider) {
- migrateProfile(profile, persistenceProvider, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#migrateProfile(org.eclipse.rse.core.model.ISystemProfile, org.eclipse.rse.persistence.IRSEPersistenceProvider, boolean)
- */
- public IStatus migrateProfile(ISystemProfile profile, IRSEPersistenceProvider persistenceProvider, boolean delete) {
- IStatus result = Status.OK_STATUS;
- IRSEPersistenceProvider oldProvider = profile.getPersistenceProvider();
- oldProvider = (oldProvider == null) ? getDefaultPersistenceProvider() : oldProvider;
- IRSEPersistenceProvider newProvider = persistenceProvider;
- newProvider = (newProvider == null) ? getDefaultPersistenceProvider() : newProvider;
- if (oldProvider != newProvider) {
- String profileName = profile.getName();
- profile.setPersistenceProvider(newProvider);
- profile.commit();
- if (delete) {
- deleteProfile(oldProvider, profileName);
- } else {
- result = oldProvider.setMigrationMark(profileName, true);
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#deleteProfile(java.lang.String)
- */
- public void deleteProfile(final IRSEPersistenceProvider persistenceProvider, final String profileName) {
- Job job = new Job(RSECoreMessages.RSEPersistenceManager_DeleteProfileJobName) {
- protected IStatus run(IProgressMonitor monitor) {
- IRSEPersistenceProvider p = persistenceProvider != null ? persistenceProvider : getDefaultPersistenceProvider();
- IStatus result = p.deleteProfile(profileName, monitor);
- return result;
- }
- };
- job.schedule();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#restoreProfiles()
- */
- public ISystemProfile[] restoreProfiles(long timeout) {
- String[] ids = getPersistenceProviderIds();
- List selectedRecords = new ArrayList(10);
- for (int i = 0; i < ids.length; i++) {
- String id = ids[i];
- ProviderRecord pr = getProviderRecord(id);
- if (pr.isAutostart()) {
- IRSEPersistenceProvider provider = getPersistenceProvider(id);
- if (provider != null) {
- pr.setRestored(false);
- selectedRecords.add(pr);
- }
- }
- }
- List profiles = new ArrayList(10);
- for (Iterator z = selectedRecords.iterator(); z.hasNext();) {
- ProviderRecord pr = (ProviderRecord) z.next();
- ISystemProfile[] providerProfiles = restoreProfiles(pr.provider, timeout);
- profiles.addAll(Arrays.asList(providerProfiles));
- }
- ISystemProfile[] result = new ISystemProfile[profiles.size()];
- profiles.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#restoreProfiles(org.eclipse.rse.persistence.IRSEPersistenceProvider)
- */
- public ISystemProfile[] restoreProfiles(IRSEPersistenceProvider provider, long timeout) {
- ProviderRecord pr = getProviderRecord(provider);
- pr.setRestored(false); // may already be false or true
- List profiles = loadProfiles(provider, timeout);
- pr.setRestored(true);
- ISystemProfile[] result = new ISystemProfile[profiles.size()];
- profiles.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceManager#isRestoreComplete(java.lang.String)
- */
- public boolean isRestoreComplete() {
- boolean isComplete = true;
- String[] ids = getPersistenceProviderIds();
- for (int i = 0; i < ids.length && isComplete; i++) {
- String id = ids[i];
- ProviderRecord pr = getProviderRecord(id);
- if (pr.isAutostart()) {
- isComplete = isComplete && pr.isRestored();
- }
- }
- return isComplete;
- }
-
- private ProviderRecord getProviderRecord(String providerId) {
- ProviderRecord providerRecord = (ProviderRecord) knownProviders.get(providerId);
- if (providerRecord == null) {
- providerRecord = new ProviderRecord();
- knownProviders.put(providerId, providerRecord);
- }
- return providerRecord;
- }
-
- /**
- * Returns the provider record for a given persistence provider.
- * @param provider the provider for which to retrieve the provider record.
- * @return the provider record.
- */
- private ProviderRecord getProviderRecord(IRSEPersistenceProvider provider) {
- ProviderRecord pr = null;
- String id = (String) loadedProviders.get(provider);
- if (id != null) {
- pr = getProviderRecord(id);
- } else {
- pr = new ProviderRecord();
- }
- return pr;
- }
-
- /**
- * Loads the map of known providers from the extensions made by all the plugins.
- * This is done once at initialization of the manager. As these ids are resolved to
- * their providers as needed, the configuration elements are replaced in the map
- * by the persistence providers they reference.
- */
- private void getProviderExtensions() {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- 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 configurationElement = providerCandidates[j];
- if (configurationElement.getName().equals("persistenceProvider")) { //$NON-NLS-1$
- String candidateId = configurationElement.getAttribute("id"); //$NON-NLS-1$
- if (candidateId != null) {
- ProviderRecord pr = getProviderRecord(candidateId);
- pr.configurationElement = configurationElement;
- pr.providerId = candidateId;
- } 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$
- }
- }
- }
-
- /**
- * Loads a provider given a configuration element.
- * After loading, the provider will be initialized with any
- * properties found in the extension.
- * @param configurationElement the element that contains the class and properties to load
- * @return the provider
- */
- private IRSEPersistenceProvider loadProvider(IConfigurationElement configurationElement) {
- IRSEPersistenceProvider provider = null;
- try {
- provider = (IRSEPersistenceProvider) configurationElement.createExecutableExtension("class"); //$NON-NLS-1$
- Properties properties = new Properties();
- IConfigurationElement[] children = configurationElement.getChildren("property"); //$NON-NLS-1$
- for (int i = 0; i < children.length; i++) {
- IConfigurationElement child = children[i];
- String name = child.getAttribute("name"); //$NON-NLS-1$
- String value = child.getAttribute("value"); //$NON-NLS-1$
- properties.put(name, value);
- }
- provider.setProperties(properties);
- } catch (CoreException e) {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- logger.logError("Exception loading persistence provider", e); //$NON-NLS-1$
- }
- return provider;
- }
-
- /**
- * Retrieves the default persistence provider for this workbench configuration.
- * Several persistence providers may be registered, but the default one is used for all
- * profiles that do not have one explicitly specified.
- * This persistence provider's identifier is specified in the org.eclipse.rse.core/DEFAULT_PERSISTENCE_PROVIDER
- * preference and can be specified a product's plugin_customization.ini file.
- * @see IRSEPreferenceNames
- * @return the default IRSEPersistenceProvider for this installation.
- */
- private IRSEPersistenceProvider getDefaultPersistenceProvider() {
- String providerId = getDefaultPersistenceProviderId();
- IRSEPersistenceProvider provider = getPersistenceProvider(providerId);
- return provider;
- }
-
- /**
- * Retrieves the default persistence provider id from the preferences. This
- * persistence provider identifier is specified in the
- * org.eclipse.rse.core/DEFAULT_PERSISTENCE_PROVIDER preference and can be
- * specified a product's plugin_customization.ini file.
- *
- * @return the specified default persistence provider, or the empty string
- * <code>""</code> if not set.
- */
- private String getDefaultPersistenceProviderId() {
- IPreferencesService ps = Platform.getPreferencesService();
- String providerId = ps.getString(RSECorePlugin.PLUGIN_ID, IRSEPreferenceNames.DEFAULT_PERSISTENCE_PROVIDER, "", null); //$NON-NLS-1$
- return providerId;
- }
-
- /**
- * Loads the profiles for a given persistence provider.
- * @param persistenceProvider
- * @return a list of profiles
- */
- private List loadProfiles(IRSEPersistenceProvider persistenceProvider, long timeout) {
- List profiles = new ArrayList(10);
- String[] profileNames = persistenceProvider.getSavedProfileNames();
- for (int i = 0; i < profileNames.length; i++) {
- String profileName = profileNames[i];
- ISystemProfile profile = load(persistenceProvider, profileName, timeout);
- if (profile!=null) {
- profiles.add(profile);
- }
- }
- return profiles;
- }
-
- /**
- * Loads a profile of the given name using the given persistence provider. If the provider cannot
- * find a profile with that name, return null.
- * @param provider the persistence provider that understands the name and can produce a profile.
- * @param profileName the name of the profile to produce
- * @return the profile or null
- */
- private ISystemProfile load(IRSEPersistenceProvider provider, String profileName, long timeout) {
- ISystemProfile profile = null;
- if (mutex.waitForLock(null, timeout)) {
- try {
- RSEDOM dom = provider.loadRSEDOM(profileName, new NullProgressMonitor());
- if (dom != null) {
- profile = _importer.restoreProfile(dom);
- if (profile!=null) {
- profile.setPersistenceProvider(provider);
- cleanTree(profile);
- }
- }
- } finally {
- mutex.release();
- }
- }
- return profile;
- }
-
- /**
- * Writes a profile 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, long timeout) {
- boolean result = false;
- if (mutex.waitForLock(null, timeout)) {
- try {
- IRSEPersistenceProvider provider = profile.getPersistenceProvider();
- if (provider == null) {
- provider = getDefaultPersistenceProvider();
- profile.setPersistenceProvider(provider);
- }
- RSEDOM dom = _exporter.createRSEDOM(profile, force);
- cleanTree(profile);
- if (dom.needsSave()) {
- Job job = provider.getSaveJob(dom);
- if (job != null && canScheduleSave) {
- job.addJobChangeListener(jobChangeListener);
- job.schedule(2000); // two second delay
- } else {
- provider.saveRSEDOM(dom, new NullProgressMonitor());
- }
- }
- result = true;
- } finally {
- mutex.release();
- }
- }
- return result;
- }
-
- private void cleanTree(IRSEPersistableContainer node) {
- node.setWasRestored(true);
- node.setTainted(false);
- node.setDirty(false);
- IRSEPersistableContainer[] children = node.getPersistableChildren();
- for (int i = 0; i < children.length; i++) {
- IRSEPersistableContainer child = children[i];
- cleanTree(child);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/SerializingProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/SerializingProvider.java
deleted file mode 100644
index da24f8a2b..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/SerializingProvider.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [191130] use explicit getRemoteSystemsProject(boolean) method
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- ********************************************************************************/
-
-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.Properties;
-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.ILog;
-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.core.IRSECoreStatusCodes;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.internal.core.RSECoreMessages;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-
-/**
- * This is class is used to restore an RSE DOM from disk and import it into RSE.
- * @author dmcknigh
- *
- */
-public class SerializingProvider implements IRSEPersistenceProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSavedProfileNames()
- */
- public String[] getSavedProfileNames() {
- /*
- * We look for folders inside the RemoteSystemsConnections folder that contain
- * a single file named folderName.rsedom. We return the array of folder names.
- */
- List names = new Vector(10);
- try {
- IProject project = SystemResourceManager.getRemoteSystemsProject(false);
- if (project.isAccessible()) {
- 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) {
- IStatus status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IRSECoreStatusCodes.EXCEPTION_OCCURRED, "Unexpected CoreException", e); //$NON-NLS-1$
- ILog log = RSECorePlugin.getDefault().getLog();
- log.log(status);
- }
- 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()) {
- try {
- InputStream iStream = profileFile.getContents();
-
- ObjectInputStream inStream = new ObjectInputStream(iStream);
- dom = (RSEDOM) inStream.readObject();
- inStream.close();
- } catch (Exception e) {
- e.printStackTrace();
- try {
- profileFile.delete(true, false, monitor);
- } catch (Exception e2) {
- e.printStackTrace();
- }
-
- }
- }
- return dom;
- }
-
- private IFile getProfileFile(String domName, IProgressMonitor monitor) {
- IProject project = SystemResourceManager.getRemoteSystemsProject(true);
-
- // 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();
- try {
- OutputStream oStream = new FileOutputStream(osFile);
- ObjectOutputStream outStream = new ObjectOutputStream(oStream);
- outStream.writeObject(dom);
- outStream.close();
- profileFile.getParent().refreshLocal(IResource.DEPTH_ONE, monitor);
- dom.markUpdated();
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
-
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getSaveJob(org.eclipse.rse.persistence.dom.RSEDOM)
- */
- public Job getSaveJob(RSEDOM dom) {
- return null;
- }
-
- 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, IRSECoreStatusCodes.EXCEPTION_OCCURRED, RSECoreMessages.SerializingProvider_UnexpectedException, e);
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#supportsMigration()
- */
- public boolean supportsMigration() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#setMigratedMark(java.lang.String, boolean)
- */
- public IStatus setMigrationMark(String profileName, boolean migrated) {
- return new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IRSECoreStatusCodes.MIGRATION_NOT_SUPPORTED, "Profile migration is not supported by the serializing provider.", null); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#getMigratedProfileNames()
- */
- public String[] getMigratedProfileNames() {
- return new String[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.persistence.IRSEPersistenceProvider#setProperties(java.util.Properties)
- */
- public void setProperties(Properties properties) {
- // Do nothing. The serializing provider does not make use of properties
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMExporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMExporter.java
deleted file mode 100644
index 7adaf9fdd..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMExporter.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-import org.eclipse.rse.persistence.dom.RSEDOMNode;
-
-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);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMImporter.java
deleted file mode 100644
index 75c681eb1..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/IRSEDOMImporter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
-import org.eclipse.rse.persistence.dom.RSEDOM;
-import org.eclipse.rse.persistence.dom.RSEDOMNode;
-
-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);
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java
deleted file mode 100644
index 1b48a0f46..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Kevin Doyle (IBM) - [163883] Multiple filter strings are disabled
- * Kevin Doyle (IBM) - [197199] Renaming a Profile doesn't cause a save
- * David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- * David Dykstal (IBM) - [232126] persist filter type attribute
- * David McKnight (IBM) - [247011] Process subsystem disappears after restart
- *******************************************************************************/
-
-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.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.RSEDOM;
-import org.eclipse.rse.persistence.dom.RSEDOMNode;
-
-public class RSEDOMExporter implements IRSEDOMExporter {
-
- private static RSEDOMExporter _instance = new RSEDOMExporter();
- private Map _domMap;
-
- /**
- * Constructor to create a new DOM exporter.
- */
- protected RSEDOMExporter() {
- _domMap = new HashMap();
- }
-
- /**
- * @return the singleton instance of this exporter
- */
- public static RSEDOMExporter getInstance() {
- return _instance;
- }
-
- /**
- * Returns the RSEDOM for this profile if it exists
- * @param profile the profile for which to get the DOM
- * @return the DOM for a particular profile, null if the DOM does not exist
- */
- public RSEDOM getRSEDOM(ISystemProfile profile) {
- return (RSEDOM) _domMap.get(profile);
- }
-
- /**
- * Creates the RSE DOM for this profile. After it has found the DOM it will
- * synchronize on the DOM to ensure its integrity while it is being updated.
- * @param profile the profile for which to create the DOM
- * @param clean indicates whether to create from scratch or merge with existing DOM
- * @return The DOM for this profile
- */
- public RSEDOM createRSEDOM(ISystemProfile profile, boolean clean) {
- RSEDOM dom = getRSEDOM(profile);
- if (dom == null) {
- dom = new RSEDOM(profile);
- _domMap.put(profile, dom);
- clean = true;
- }
- synchronized (dom) {
- populateRSEDOM(dom, profile, clean);
- }
- return dom;
- }
-
- /**
- * Creates an RSE DOM for use in persistence
- * @param dom the root node for the target DOM
- * @param profile the profile from which to populate the DOM
- * @param clean indicates whether to create from scratch or merge with existing DOM
- * @return The DOM, updated with the data from the profile
- */
- public RSEDOM populateRSEDOM(RSEDOM dom, ISystemProfile profile, boolean clean) {
- // for now we do complete refresh
- // clean dom for fresh creation
- if (clean) {
- dom.clearChildren();
- }
-
- if (clean || profile.isDirty() || dom.isDirty()) {
- // Doing a rename requires the dom to update it's name
- dom.setName(profile.getName());
- 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();
- RSEDOMNode[] result = new RSEDOMNode[propertySets.length];
- for (int i = 0; i < propertySets.length; i++) {
- IPropertySet set = propertySets[i];
- RSEDOMNode propertySetNode = createNode(parent, set, clean);
- result[i] = propertySetNode;
- }
- return result;
- }
-
- /**
- * Creates a DOM node for a property set
- * @param parent the owning parent of the node
- * @param set the property set from which to create a node
- * @param clean true if we are creating, false if we are merging
- * @return the DOM node representing the property set
- */
- public RSEDOMNode createNode(RSEDOMNode parent, IPropertySet set, boolean clean) {
- RSEDOMNode propertySetNode = new RSEDOMNode(parent, IRSEDOMConstants.TYPE_PROPERTY_SET, set.getName());
- propertySetNode.addAttribute(IRSEDOMConstants.ATTRIBUTE_DESCRIPTION, set.getDescription());
- 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);
- RSEDOMNode propertyNode = new RSEDOMNode(propertySetNode, IRSEDOMConstants.TYPE_PROPERTY, key);
- propertyNode.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, type.toString());
- propertyNode.addAttribute(IRSEDOMConstants.ATTRIBUTE_VALUE, value);
-
- }
- // persist nested property sets of property set
- if (set instanceof IRSEModelObject){
- createPropertySetNodes(propertySetNode, (IRSEModelObject)set, clean);
- }
- return propertySetNode;
- }
-
- /**
- * 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_OWNING_PARENT_NAME, filterPool.getOwningParentName());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE, getBooleanString(filterPool.isNonRenamable()));
-
- boolean isSingleFilterStringOnly = false;
- boolean isSingleFilterStringOnlyESet = filterPool.isSetSingleFilterStringOnly();
-
- // if ESet is true then calling isSingleFilterStringOnly() will return
- // the value stored in the filter pool and not in the fp manager
- // in the false case isSingleFilterStringOnly should be false as that what it is by default
- if (isSingleFilterStringOnlyESet) {
- isSingleFilterStringOnly = filterPool.isSingleFilterStringOnly();
- } else {
- isSingleFilterStringOnly = false;
- }
-
- node.addAttribute("singleFilterStringOnlyESet", getBooleanString(isSingleFilterStringOnlyESet)); //$NON-NLS-1$
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY, getBooleanString(isSingleFilterStringOnly));
-
- }
- 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()));
- String filterType = filter.getType();
- if (filterType != null) {
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_FILTER_TYPE, filter.getType());
- }
- }
-
- // 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().getName());
- node.addAttribute(IRSEDOMConstants.ATTRIBUTE_SYSTEM_TYPE, host.getSystemType().getId());
- 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];
-
- // for bug 247011 - Process subsystem disappears after restart
- // commenting out the next line since it's preventing the subsystem from being persisted
- // if (!(service instanceof IDelegatingConnectorService)) // don't persist delegated ones
- {
- 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()) {
- // can't do this until 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);
- String name = filterPoolReference.getFullName();
- node.setName(name); // filter pool references must write out the fully qualified name of their referenced filter pool
- 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 && parent != null) {
- node = parent.getChild(type, name);
- if (node != null && modelObject.isDirty()) {
- node.clearAttributes();
- node.setDirty(true);
- }
- }
- if (node == null) {
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
deleted file mode 100644
index 4fb40f08e..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Kevin Doyle (IBM) - [163883] Multiple filter strings are disabled
- * Martin Oberhuber (Wind River) - [202416] Protect against NPEs when importing DOM
- * David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
- * David Dykstal (IBM) - [197036] respond to removal of SystemProfile.createHost()
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- * David Dykstal (IBM) - [232126] retrieve persisted filter type attribute
- * David Dykstal (IBM) - [233876] filters lost after restart
- * David Dykstal (IBM) - [236516] Bug in user code causes failure in RSE initialization
- * David McKnight (IBM) - [245198] [dstore] ServerLauncherProperties not restored
- * David McKnight (IBM) - [267052] need to be able to create subsystems-after-the-fact
- * David McKnight (IBM) - [271243] [files] Switching service type brings up TWO file subsystems after restart
- * Uwe Stieber (Wind River) - [283844] NPE on restoring property set if persistent data is corrupted
- ********************************************************************************/
-
-package org.eclipse.rse.internal.persistence.dom;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.IRSECoreStatusCodes;
-import org.eclipse.rse.core.IRSESystemType;
-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.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.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.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.core.filters.HostOwnedFilterPoolPattern;
-import org.eclipse.rse.internal.core.model.SystemProfile;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-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;
-
-public class RSEDOMImporter {
- 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 dom the DOM from which to restore
- * @return the restored profile
- */
- public ISystemProfile restoreProfile(RSEDOM dom) {
- ISystemProfile profile = null;
- String profileName = dom.getName();
- if (profileName != null) {
- boolean defaultPrivate = getBooleanValue(dom, IRSEDOMConstants.ATTRIBUTE_DEFAULT_PRIVATE);
- boolean isActive = getBooleanValue(dom, IRSEDOMConstants.ATTRIBUTE_IS_ACTIVE);
- profile = new SystemProfile(profileName, isActive);
- profile.setDefaultPrivate(defaultPrivate);
- SystemProfileManager.getDefault().addSystemProfile(profile);
- // restore the children for the profile
- RSEDOMNode[] children = dom.getChildren();
- for (int i = 0; i < children.length; i++) {
- try {
- RSEDOMNode child = children[i];
- String type = child.getType();
- if (IRSEDOMConstants.TYPE_HOST.equals(type)) {
- restoreHost(profile, child);
- } else if (IRSEDOMConstants.TYPE_FILTER_POOL.equals(type)) {
- restoreFilterPool(profile, child);
- } else if (IRSEDOMConstants.TYPE_PROPERTY_SET.equals(type)) {
- restorePropertySet(profile, child);
- } else {
- logNullAttribute(child, "type"); //$NON-NLS-1$
- }
- } catch(Exception e) {
- logException(e);
- }
- }
- } else {
- logNullAttribute(dom, "name"); //$NON-NLS-1$
- }
- return profile;
- }
-
- /**
- * Restores the host represented by hostNode
- */
- public IHost restoreHost(ISystemProfile profile, RSEDOMNode hostNode) {
- IHost host = null;
-
- // get host node attributes
- String hostName = hostNode.getName();
- // we changed from storing names to storing IDs, so these may be null
- String systemTypeName = getAttributeValueMaybeNull(hostNode, IRSEDOMConstants.ATTRIBUTE_TYPE);
- String systemTypeId = getAttributeValueMaybeNull(hostNode, IRSEDOMConstants.ATTRIBUTE_SYSTEM_TYPE);
- String hostAddress = getAttributeValue(hostNode, IRSEDOMConstants.ATTRIBUTE_HOSTNAME);
- String description = getAttributeValue(hostNode, IRSEDOMConstants.ATTRIBUTE_DESCRIPTION);
- boolean isOffline = getBooleanValue(hostNode, IRSEDOMConstants.ATTRIBUTE_OFFLINE);
- boolean isPromptable = getBooleanValue(hostNode, IRSEDOMConstants.ATTRIBUTE_PROMPTABLE);
-
- // 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
- IRSECoreRegistry coreRegistry = RSECorePlugin.getTheCoreRegistry();
- IRSESystemType systemType = null;
- if (systemTypeId != null) {
- systemType = coreRegistry.getSystemTypeById(systemTypeId);
- } else if (systemTypeName != null) {
- systemType = coreRegistry.getSystemType(systemTypeName);
- }
- //cannot create a host from a profile if we do not know the systemType
- if (systemType != null) {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- String profileName = profile.getName();
- host = registry.createHost(profileName, systemType, hostName, hostAddress, description, false);
- host.setOffline(isOffline);
- host.setPromptable(isPromptable);
- } else {
- StringBuffer msg = new StringBuffer(80);
- msg.append("unknown systemType \""); //$NON-NLS-1$
- msg.append(systemTypeName);
- msg.append("\" ("); //$NON-NLS-1$
- msg.append(systemTypeId);
- msg.append(") in "); //$NON-NLS-1$
- msg.append(profile.getName());
- msg.append(':');
- msg.append(hostName);
- logWarning(msg.toString());
- }
- } catch (Exception e) {
- logException(e);
- }
-
- // restore children of host
- if (host!=null) {
- RSEDOMNode[] children = hostNode.getChildren();
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
- String type = child.getType();
- if (IRSEDOMConstants.TYPE_CONNECTOR_SERVICE.equals(type)) {
- restoreConnectorService(host, child);
- } else if (IRSEDOMConstants.TYPE_PROPERTY_SET.equals(type)) {
- restorePropertySet(host, child);
- } else {
- logNullAttribute(child, "type"); //$NON-NLS-1$
- }
- }
- }
- 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, IRSEDOMConstants.ATTRIBUTE_USE_SSL);
- int port = getIntegerValue(connectorServiceNode, IRSEDOMConstants.ATTRIBUTE_PORT);
-
- boolean setServerLauncherProperties = false;
-
- // 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) {
- ISubSystemConfiguration subsystemConfiguration = subSystem.getSubSystemConfiguration();
- if (service == null){
- service = subsystemConfiguration.getConnectorService(host);
- }
- if (service != null && !setServerLauncherProperties) {
- if (subsystemConfiguration.supportsServerLaunchProperties(host)) {
- IServerLauncherProperties sl = subsystemConfiguration.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);
- setServerLauncherProperties = true;
- }
- }
- }
- service.setPort(port);
- service.setIsUsingSSL(useSSL);
- }
- }
- if (service != null && subSystem != null) {
- subSystem.setConnectorService(service);
- }
- }
-
- // are the subsystems that were installed after the last session?
- ISubSystem[] sses = host.getSubSystems();
- ISubSystemConfiguration[] configs = _registry.getSubSystemConfigurationsBySystemType(host.getSystemType(), true, true);
-
- // create subsystems if they never existed before
- for (int c = 0; c < configs.length; c++){
- ISubSystemConfiguration config = configs[c];
- boolean found = false;
-
- // is there a corresponding subsystem for this configuration?
- for (int i = 0; i < sses.length && !found; i++){
- ISubSystem ss = sses[i];
- ISubSystemConfiguration ssConfig = ss.getSubSystemConfiguration();
- if (ssConfig == config){
- found = true;
- }
- else {
- // check if the subsystem config service type is of the same type
- Class ssServiceType = ssConfig.getServiceType();
- Class serviceType = config.getServiceType();
- if (ssServiceType != null && serviceType != null && ssServiceType.equals(serviceType)){
- found = true;
- }
-
- }
- }
-
- // if not, create the subsystem after the fact
- if (!found){ // create this after the fact
- if (config.supportsFilters()){
- config.getFilterPoolManager(host.getSystemProfile(), true); // create the filter pool
- }
- config.createSubSystem(host, true, null);
- }
- }
-
- // 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 = getAttributeValue(subSystemNode, IRSEDOMConstants.ATTRIBUTE_TYPE);
- boolean isHidden = getBooleanValue(subSystemNode, IRSEDOMConstants.ATTRIBUTE_HIDDEN);
- ISubSystem subSystem = null;
- ISubSystemConfiguration factory = getSubSystemConfiguration(type);
- if (factory != null) {
- Class serviceType = factory.getServiceType();
- if (serviceType != null) {
- ISubSystem[] existingSubSystems = _registry.getServiceSubSystems(host, serviceType);
- if (existingSubSystems != null && existingSubSystems.length > 0) {
- subSystem = existingSubSystems[0];
- // need to switch factories
- subSystem.switchServiceFactory(factory);
- }
- } else {
- ISubSystemConfiguration config = _registry.getSubSystemConfiguration(type);
- if (config!=null) {
- ISubSystem[] existingSubSystems = config.getSubSystems(host, true);
- if (existingSubSystems != null && existingSubSystems.length > 0) {
- subSystem = existingSubSystems[0];
- }
- }
- }
-
- if (subSystem == null) {
- // subSystem = factory.createSubSystemInternal(host);
- ISubSystem[] createdSystems = _registry.createSubSystems(host, new ISubSystemConfiguration[]{factory});
- subSystem = createdSystems[0];
- }
- if (subSystem != null) {
- subSystem.setHidden(isHidden);
- subSystem.setHost(host);
- subSystem.setSubSystemConfiguration(factory);
- subSystem.setName(factory.getName());
- subSystem.setConfigurationId(factory.getId());
-
- if (factory.supportsFilters()) {
- ISystemFilterStartHere startHere = _registry.getSystemFilterStartHere();
- ISystemFilterPoolReferenceManager fprMgr = startHere.createSystemFilterPoolReferenceManager(subSystem, factory, name);
- subSystem.setFilterPoolReferenceManager(fprMgr);
- ISystemFilterPoolManager defaultFilterPoolManager = factory.getFilterPoolManager(host.getSystemProfile());
- fprMgr.setDefaultSystemFilterPoolManager(defaultFilterPoolManager);
- }
-
- // restore filter 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);
- }
- subSystem.wasRestored();
- }
- }
- 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, IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS);
- int relativeOrder = getIntegerValue(node, IRSEDOMConstants.ATTRIBUTE_RELATIVE_ORDER);
- boolean isDefault = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_DEFAULT);
- boolean isSetStringsCaseSensitive = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE);
- boolean isPromptable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_PROMPTABLE);
- boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS);
- boolean isNonDeletable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_NON_DELETABLE);
- boolean isNonRenamable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE);
- boolean isNonChangable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_NON_CHANGEABLE);
- boolean isStringsNonChangable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_STRINGS_NON_CHANGABLE);
- int release = getIntegerValue(node, IRSEDOMConstants.ATTRIBUTE_RELEASE);
- boolean isSetSingleFilterStringOnly = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY);
- String filterType = getAttributeValueMaybeNull(node, IRSEDOMConstants.ATTRIBUTE_FILTER_TYPE);
-
- // create the filter strings
- RSEDOMNode[] filterStringNodes = node.getChildren(IRSEDOMConstants.TYPE_FILTER_STRING);
- String[] filterStrings = new String[filterStringNodes.length];
- for (int i = 0; i < filterStringNodes.length; i++) {
- RSEDOMNode filterStringNode = filterStringNodes[i];
- filterStrings[i] = filterStringNode.getName();
- }
-
- // create the filter
- ISystemFilter filter = filterPool.createSystemFilter(name, filterStrings);
- 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);
- filter.setType(filterType);
-
- // 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 = getAttributeValue(node, IRSEDOMConstants.ATTRIBUTE_TYPE);
- String id = getAttributeValue(node, IRSEDOMConstants.ATTRIBUTE_ID);
- boolean supportsNestedFilters = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_SUPPORTS_NESTED_FILTERS);
- boolean isDeletable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_DELETABLE);
- boolean isDefault = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_DEFAULT);
- boolean isSetStringsCaseSensitive = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_STRING_CASE_SENSITIVE);
- boolean isSetSupportsDuplicateFilterStrings = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_SUPPORTS_DUPLICATE_FILTER_STRINGS);
- int release = getIntegerValue(node, IRSEDOMConstants.ATTRIBUTE_RELEASE);
-
- // Since old profiles won't have an "singleFilterStringOnlyESet" attribute
- // we must give it a default value.
- // False has been chosen because if the persistence is not correct then we
- // don't know what the proper value should be, so
- // we want it to check with the filter pool manager to decide
- // if multi filter strings are allowed
- boolean isSingleFilterStringOnlyESet = false;
- boolean isSetSingleFilterStringOnly = false;
- RSEDOMNodeAttribute attribute = node.getAttribute("singleFilterStringOnlyESet"); //$NON-NLS-1$
- if (attribute != null) {
- isSingleFilterStringOnlyESet = getBooleanValue(attribute.getValue());
- isSetSingleFilterStringOnly = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_SINGLE_FILTER_STRING_ONLY);
- }
-
- String owningParentName = getAttributeValue(node, IRSEDOMConstants.ATTRIBUTE_OWNING_PARENT_NAME);
- boolean isNonRenamable = getBooleanValue(node, IRSEDOMConstants.ATTRIBUTE_NON_RENAMABLE);
-
- // 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 = mgr.createSystemFilterPool(name, isDeletable);
-// filterPool = new SystemFilterPool(name, supportsNestedFilters, isDeletable);
-// filterPool.setSystemFilterPoolManager(mgr);
-// mgr.getPools().add(filterPool);
- }
- filterPool.setType(type);
- filterPool.setDefault(isDefault);
- filterPool.setSupportsNestedFilters(supportsNestedFilters);
- filterPool.setStringsCaseSensitive(isSetStringsCaseSensitive);
- filterPool.setSupportsDuplicateFilterStrings(isSetSupportsDuplicateFilterStrings);
- filterPool.setRelease(release);
-
- // if single filter string only has been set in the past then set
- // the value to the persisted one which will set ESet to true
- // In the false case we don't do anything because the persistence
- // could be messed up or ESet has never been set before
- // in which case single filter string only should be false
- if (isSingleFilterStringOnlyESet) {
- filterPool.setSingleFilterStringOnly(isSetSingleFilterStringOnly);
- }
-
- filterPool.setOwningParentName(owningParentName);
- filterPool.setNonRenamable(isNonRenamable);
-// filterPool.wasRestored();
- }
- } catch (Exception e) {
- logException(e);
- }
-
- // restore children
- if (filterPool != null) {
- RSEDOMNode[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
- String ctype = child.getType();
- if (IRSEDOMConstants.TYPE_FILTER.equals(ctype)) {
- restoreFilter(filterPool, child);
- } else if (IRSEDOMConstants.TYPE_PROPERTY_SET.equals(ctype)) {
- restorePropertySet(filterPool, child);
- } else {
- logNullAttribute(child, "type"); //$NON-NLS-1$
- }
- }
- }
- return filterPool;
- }
-
- /**
- * Restore the filter pool reference that is represented by the node
- */
- public ISystemFilterPoolReference restoreFilterPoolReference(ISubSystem subsystem, RSEDOMNode node) {
- ISystemFilterPoolReference filterPoolReference = null;
- String filterPoolName = node.getName();
- ISystemProfile profile = subsystem.getSystemProfile();
- String profileName = profile.getName();
- String baseFilterPoolName = filterPoolName;
- String[] part = filterPoolName.split("___", 2); //$NON-NLS-1$
- if (part.length == 2) { // name is qualified and refers to a filter pool in a specific profile
- profileName = part[0];
- baseFilterPoolName = part[1];
- }
- // special processing for host owned pool references
- String configurationId = subsystem.getConfigurationId();
- HostOwnedFilterPoolPattern pattern = new HostOwnedFilterPoolPattern(configurationId);
- if (pattern.matches(baseFilterPoolName)) { // if this is a host owned pool then fix up this reference
- String hostName = subsystem.getHostAliasName();
- baseFilterPoolName = pattern.make(hostName);
- }
- // qualify the name and construct the reference
- filterPoolName = profileName + "___" + baseFilterPoolName; //$NON-NLS-1$
- ISystemFilterPoolReferenceManager referenceManager = subsystem.getFilterPoolReferenceManager();
- filterPoolReference = referenceManager.addReferenceToSystemFilterPool(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);
- // properties used to be stored as attributes, get those first for compatibility
- RSEDOMNodeAttribute[] attributes = propertySetNode.getAttributes();
- for (int i = 0; i < attributes.length; i++) {
- RSEDOMNodeAttribute attribute = attributes[i];
- if (IRSEDOMConstants.ATTRIBUTE_DESCRIPTION.equals(attribute.getKey())) { // descriptions really are stored as attributes
- set.setDescription(attribute.getValue());
- } else {
- String typeStr = attribute.getType();
- // We keep getting reports throwing NPE in PropertyType.fromString(...).
- // If the data is corrupted and the type cannot be determined, it is better
- // to just drop the single property than the whole property set
- if (typeStr != null) {
- IPropertyType type = PropertyType.fromString(typeStr);
- set.addProperty(attribute.getKey(), attribute.getValue(), type);
- }
- }
- }
- // properties are now stored as children, get those next
- RSEDOMNode[] children = propertySetNode.getChildren();
- for (int i = 0; i < children.length; i++) {
- RSEDOMNode child = children[i];
-
- // is this a property set or a property?
- String type = child.getType();
- if (set instanceof IRSEModelObject && type.equals(IRSEDOMConstants.TYPE_PROPERTY_SET)){
- restorePropertySet((IRSEModelObject)set, child);
- }
- else {
- String propertyName = child.getName();
- String propertyValue = getAttributeValue(child, IRSEDOMConstants.ATTRIBUTE_VALUE);
- String propertyTypeName = getAttributeValue(child, IRSEDOMConstants.ATTRIBUTE_TYPE);
- IPropertyType propertyType = PropertyType.fromString(propertyTypeName);
- if (IPropertySet.DESCRIPTION_KEY.equals(propertyName)) { // any descriptions found as properties should be set directly
- set.setDescription(propertyValue);
- } else {
- set.addProperty(propertyName, propertyValue, propertyType);
- }
- }
- }
- 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);
- }
-
- private String getAttributeValue(RSEDOMNode node, String attributeName) {
- String result = null;
- RSEDOMNodeAttribute attribute = node.getAttribute(attributeName);
- if (attribute == null) {
- logNullAttribute(node, attributeName);
- } else {
- result = attribute.getValue();
- }
- return result;
- }
-
- private String getAttributeValueMaybeNull(RSEDOMNode node, String attributeName) {
- String result = null;
- RSEDOMNodeAttribute attribute = node.getAttribute(attributeName);
- if (attribute != null) {
- result = attribute.getValue();
- }
- return result;
- }
-
- private boolean getBooleanValue(RSEDOMNode node, String attributeName) {
- String booleanStr = getAttributeValue(node, attributeName);
- if (booleanStr==null) logNullAttribute(node, attributeName);
- return getBooleanValue(booleanStr);
- }
-
- private int getIntegerValue(RSEDOMNode node, String attributeName) {
- String intStr = getAttributeValue(node, attributeName);
- if (intStr==null) logNullAttribute(node, attributeName);
- return getIntegerValue(intStr);
- }
-
- private void logException(Exception e) {
- RSECorePlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, RSECorePlugin.getDefault().getBundle().getSymbolicName(), IRSECoreStatusCodes.EXCEPTION_OCCURRED, e.getMessage(), e));
- }
-
- private void logWarning(String msg) {
- RSECorePlugin.getDefault().getLog().log(
- new Status(IStatus.WARNING, RSECorePlugin.getDefault().getBundle().getSymbolicName(), 0, "RSEDOMImporter: "+msg, null)); //$NON-NLS-1$
- }
-
- private void logNullAttribute(RSEDOMNode node, String attributeName) {
- StringBuffer msg = new StringBuffer(80);
- msg.append("RSEDOMImporter: null attr \""); //$NON-NLS-1$
- msg.append(attributeName==null ? "null" : attributeName); //$NON-NLS-1$
- msg.append("\" in "); //$NON-NLS-1$
- int len = msg.length();
- RSEDOMNode parent = node.getParent();
- while (parent!=null) {
- String parentName = parent.getName();
- msg.insert(len, parentName==null ? "null/" : parentName+'/'); //$NON-NLS-1$
- parent = parent.getParent();
- }
- msg.append(node.getName()==null ? "null" : node.getName()); //$NON-NLS-1$
- RSECorePlugin.getDefault().getLog().log(
- new Status(IStatus.WARNING, RSECorePlugin.getDefault().getBundle().getSymbolicName(), 0, msg.toString(), null));
- }
-
-} \ 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 8f0c80b3d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferenceManager.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [213353] fix move of filter pool references within its container
- *******************************************************************************/
-
-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.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.
- * @see #getName()
- */
- 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.
- * This does not call back or send any events nor does it mark anything dirty.
- * @param newPosition New zero-based position
- * @param object The referencing object to move
- */
- public void moveReferencingObjectPosition(int newPosition, IRSEBasePersistableReferencingObject object) {
- int oldPosition = referencingObjectList.indexOf(object);
- if (oldPosition >= 0) {
- if (oldPosition != newPosition) {
- referencingObjectList.remove(oldPosition);
- referencingObjectList.add(newPosition, object);
- invalidateCache();
- }
- }
- }
-
- /**
- * 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
- // ---------------------------------------------------------------------------
-
- /**
- * 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();
- }
-
-}
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 c3b3b4e72..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObject.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- ********************************************************************************/
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEPersistableReferencedObject;
-import org.eclipse.rse.core.references.SystemReferencedObject;
-
-/**
- * @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 bdb0c3415..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencedObjectHelper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
-import org.eclipse.rse.core.references.SystemReferencedObjectHelper;
-
-/**
- * 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 referenceName The unique name that can be stored to identify this object.
- */
- protected SystemPersistableReferencedObjectHelper(String referenceName) {
- 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 2f3bdddbe..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObject.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- ********************************************************************************/
-
-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;
-import org.eclipse.rse.core.references.SystemReferencingObject;
-
-/**
- * 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 bdef7c81a..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/references/SystemPersistableReferencingObjectHelper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.references;
-
-import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.references.SystemReferencingObjectHelper;
-
-/**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/Logger.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/Logger.java
deleted file mode 100644
index c2b148c4c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/Logger.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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;
-import org.eclipse.rse.internal.logging.LogListener;
-
-/**
- * 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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * Use {@link LoggerFactory} to create instances.
- */
-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;
-
- /**
- * Name of the key that controls the logging level.<br>
- * (value is "debug_level").
- */
- public static final String LOGGING_LEVEL = "logging_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;
-
- private ILog systemsPluginLog = null;
-
- private LogListener logListener = null;
-
- private String pluginId = null;
-
- private Plugin systemPlugin = null;
-
- private int debug_level = Logger.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();
- }
-
- public synchronized void freeResources() {
- logListener.freeResources();
- }
-
- public synchronized int getDebugLevel() {
- return debug_level;
- }
-
- /**
- * 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 >= Logger.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 >= Logger.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 >= Logger.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 >= Logger.LOG_WARNING) {
- if (message == null) message = ""; //$NON-NLS-1$
- Status warningStatus = new Status(IStatus.WARNING, pluginId, IStatus.OK, message, ex);
- systemsPluginLog.log(warningStatus);
- }
- }
-
- /**
- * Handle changes from a Preferences page.
- */
- public synchronized void propertyChange(PropertyChangeEvent event) {
- Preferences prefs = systemPlugin.getPluginPreferences();
- debug_level = prefs.getInt(Logger.LOGGING_LEVEL);
- }
-
- public synchronized void setDebugLevel(int level) {
- debug_level = level;
- }
-
- /**
- * 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 LogListener(systemPlugin);
- systemsPluginLog.addLogListener(logListener);
- Preferences store = systemPlugin.getPluginPreferences();
- debug_level = store.getInt(Logger.LOGGING_LEVEL);
- store.addPropertyChangeListener(this);
- store.addPropertyChangeListener(logListener);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/LoggerFactory.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/LoggerFactory.java
deleted file mode 100644
index 3b81d883c..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/logging/LoggerFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-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.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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);
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceManager.java
deleted file mode 100644
index c6fe429ea..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceManager.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * David Dykstal (IBM) - [cleanup] adding noimplement tag
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.persistence;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.core.model.ISystemProfile;
-
-/**
- * This interface defines the services provided by a persistence manager for
- * RSE. There is typically only one persistence manager instance defined when
- * RSE is running. The persistence manager controls the persistence of RSE
- * profiles through the use of registered persistence providers.
- *
- * @noimplement this interface is not intended to be implemented by clients
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRSEPersistenceManager {
-
- /**
- * Schedules a save of particular profile. If the profile has an existing persistence provider
- * it is saved by that persistence provider. If the profile has no persistence provider
- * then the default persistence provider is used. If the persistence manager is in a state where
- * it is saving or restoring another profile on another thread this call will block for the
- * timeout value specified. If the timeout expires this call will return false.
- * @param profile the profile to save
- * @param timeout the timeout value in milliseconds. If the operation cannot be started in this time
- * it will return false.
- * @return true if the save was scheduled and false if the timeout expired without scheduling the save.
- */
- public boolean commitProfile(ISystemProfile profile, long timeout);
-
- /**
- * Save all profiles. Will attempt to schedule a save of all profiles. Each attempt will time out after
- * the number of milliseconds specified if the operation cannot be started.
- * @param timeout the maximum number of milliseconds to wait until the persistence manager becomes available
- * to schedule a save for an individual profile.
- * @return the list of profiles that could not be scheduled for save.
- */
- public ISystemProfile[] commitProfiles(long timeout);
-
- /**
- * Restore all profiles known to autostart persistence providers.
- * @param timeout the maximum number of milliseconds to wait for the manager to become idle for each profile.
- * @return an array of restored profiles.
- */
- public ISystemProfile[] restoreProfiles(long timeout);
-
- /**
- * Restore the profiles for a particular provider.
- * @param provider a persistence provider
- * @param timeout the maximum number of milliseconds to wait for the manager to become idle before restoring this
- * the each profile managed by this provider.
- * @return an array of the restored profiles.
- */
- public ISystemProfile[] restoreProfiles(IRSEPersistenceProvider provider, long timeout);
-
- /**
- * Delete the persistent form of a profile.
- * @param persistenceProvider the persistence provider to use to delete the profile.
- * If this is null the default persistence provider is used.
- * @param profileName The name of the profile to delete
- */
- public void deleteProfile(IRSEPersistenceProvider persistenceProvider, String profileName);
-
- /**
- * Migrates a profile to a new persistence provider.
- * It will delete the persistent form known to its previous persistence provider.
- * If the new provider and the previous provider are the same this does nothing.
- * Exactly the same as <code>migrateProfile(profile, persistenceProvider, true);</code>
- * @param profile the system profile to be migrated
- * @param persistenceProvider the persistence provider to which this profile will be migrated.
- */
- public void migrateProfile(ISystemProfile profile, IRSEPersistenceProvider persistenceProvider);
-
- /**
- * Migrates a profile to a new persistence provider. It will mark the
- * persistent form known to its previous persistence provider as migrated.
- * This may, in fact, result in the persistent form of this profile being
- * deleted. If the new provider and the previous provider are the same this
- * does nothing.
- *
- * @param profile the system profile to be migrated
- * @param persistenceProvider the persistence provider to which this profile
- * will be migrated.
- * @param delete true if the persistent form of this profile is to be
- * deleted from the old provider, false if the persistent form of
- * the profile is to be marked as migrated.
- * @return an IStatus indicating the success of the migration.
- * @since org.eclipse.rse.core 3.0
- */
- public IStatus migrateProfile(ISystemProfile profile, IRSEPersistenceProvider persistenceProvider, boolean delete);
-
- /**
- * Register the persistence provider to be used when saving and restoring RSE doms.
- * The provider is registered under the provided id.
- * If the id has already been registered, this provider replaces the previous provider
- * with that id.
- * @param id the provider id.
- * @param provider the provider.
- */
- public void registerPersistenceProvider(String id, IRSEPersistenceProvider provider);
-
- /**
- * @return an array of persistence provider ids known to this workbench. These may have been
- * provided by extension point or by registering them using
- * {@link #registerPersistenceProvider(String, IRSEPersistenceProvider)}
- */
- public String[] getPersistenceProviderIds();
-
- /**
- * Retrieves the persistence provider named by a particular id. It can return null if there
- * is no provider known by that id. This may have the effect of activating the plugin that
- * contains this provider.
- * @param id the id of the persistence provider to locate
- * @return the persistence provider or null
- */
- public IRSEPersistenceProvider getPersistenceProvider(String id);
-
- /**
- * @return true if this instance of the persistence manager is currently saving or restoring a profile.
- */
- public boolean isBusy();
-
- /**
- * Indicate if all profiles for all autostart persistence provider have been restored.
- * These profiles are restored when RSE is activated and when profiles
- * are reloaded by the user.
- * This can be used from a different thread
- * than the one that requested the restore.
- * @return true if the profiles have been fully restored
- */
- public boolean isRestoreComplete();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceProvider.java
deleted file mode 100644
index b304c1597..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/IRSEPersistenceProvider.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 177329: added getSaveJob so that the persistence provider
- * determines the job characteristics.
- * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated
- ********************************************************************************/
-
-package org.eclipse.rse.persistence;
-
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.IRSECoreStatusCodes;
-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 the RSE DOM.
- *
- * This interface is used by the persistence manager to schedule loads and saves
- * of the DOM and should only be used by the persistence manager.
- */
-public interface IRSEPersistenceProvider {
-
- /**
- * Sets the properties for this provider. This must be done immediately
- * after the provider is instantiated. The persistence manager will
- * provide these properties for providers defined as extensions.
- * @param properties the properties object containing the properties
- * supplied in the extension.
- */
- public void setProperties(Properties properties);
-
- /**
- * Restores an RSE DOM given a profileName.
- *
- * @param profileName name of the Profile to load
- * @param monitor The monitor to use for progress monitoring and cancellation.
- * Must not be null.
- * @return the RSE DOM for the specified profile
- */
- public RSEDOM loadRSEDOM(String profileName, IProgressMonitor monitor);
-
- /**
- * Persists an RSE DOM. Writes the DOM to some form of external storage and
- * then marks the DOM as clean using {@link RSEDOM#markUpdated()}.
- * @param dom the RSE DOM to persist.
- * @param monitor The monitor to use for progress monitoring and cancellation.
- * Must not be null.
- * @return true if succcessful
- */
- public boolean saveRSEDOM(RSEDOM dom, IProgressMonitor monitor);
-
- /**
- * Returns a job suitable for saving a DOM.
- * The result can be null if the persistence provider determines that
- * a job would not be the best way of saving a particular DOM.
- * @param dom the DOM for which to construct the job.
- * @return The job that can be scheduled to perform the save operation.
- */
- public Job getSaveJob(RSEDOM dom);
-
- /**
- * @return The names of the profiles that have been saved by this persistence provider.
- * Profiles that have been marked as migrated are not returned in this list.
- * This may be an empty array but will never be null.
- */
- 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 to use for progress monitoring and cancellation.
- * Must not be null.
- * @return the IStatus indicating the operations success.
- */
- public IStatus deleteProfile(String profileName, IProgressMonitor monitor);
-
- /**
- * Sets the migration state of a profile.
- * @param profileName the name of the profile of which to set the migration state
- * @param migrated true if the profile is to be marked as migrated, false if it is to be marked as normal.
- * Normal profiles are returned in {@link #getSavedProfileNames()}, migrated profiles are returned
- * in {@link #getMigratedProfileNames()}.
- * @return a status representing the resulting state of the migration. An OK status
- * indicates a successful marking. An ERROR status indicates an unsuccessful marking.
- * @see IRSECoreStatusCodes
- * @since org.eclipse.rse.core 3.0
- */
- public IStatus setMigrationMark(String profileName, boolean migrated);
-
- /**
- * @return The names of the profiles that have been migrated by this persistence provider.
- * The names of profiles that have been marked as migrated are returned in this list.
- * The appearance of a profile name in this list implies that the profile may be
- * unmigrated by this provider by using {@link #setMigrationMark(String, boolean)}.
- * This may be an empty array but will never be null.
- * @since org.eclipse.rse.core 3.0
- */
- public String[] getMigratedProfileNames();
-
- /**
- * Indicates whether or not this persistence provider supports migration.
- * @return true if the provider supports marking of the persistence form of profiles
- * as migrated, false otherwise.
- * @since org.eclipse.rse.core 3.0
- */
- public boolean supportsMigration();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
deleted file mode 100644
index 3fb06e734..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/IRSEDOMConstants.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [cleanup] Add API "since" Javadoc tags
- * David Dykstal (IBM) - add attribute name for filter type
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-/**
- * Constants used in RSE DOMs.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-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$
- public static final String ATTRIBUTE_DESCRIPTION = "description"; //$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_SYSTEM_TYPE = "systemType"; //$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$
- /**
- * A constant that specifies the filter type attribute in the DOM structure.
- * Value "filterType".
- * @since org.eclipse.rse.core 3.0
- */
- public static final String ATTRIBUTE_FILTER_TYPE = "filterType"; //$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$
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOM.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOM.java
deleted file mode 100644
index e81a9c9ca..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOM.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-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.
- * @noextend This class is not intended to be subclassed by clients.
- */
-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 transient ISystemProfile _profile;
-
- public RSEDOM(ISystemProfile profile) {
- super(null, IRSEDOMConstants.TYPE_PROFILE, profile.getName());
- _profile = profile;
- }
-
- public RSEDOM(String profileName) {
- super(null, IRSEDOMConstants.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$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNode.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNode.java
deleted file mode 100644
index 67a921c1d..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNode.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RSEDOMNode implements Serializable {
-
- private static final long serialVersionUID = 1L; // This should be updated if there is a schema change.
- 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;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public void setType(String type) {
- _type = type;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java
deleted file mode 100644
index 543cb07e5..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/RSEDOMNodeAttribute.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.rse.persistence.dom;
-
-import java.io.Serializable;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- */
-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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/package.html b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/package.html
deleted file mode 100644
index 31fe153b3..000000000
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/persistence/dom/package.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="David Dykstal (IBM)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for manipulating the RSE document object model.
-<h2>
-Package Specification</h2>
-<p>
-The package provides classes that define the document object model (DOM)
-for the RSE model objects. The RSE model consists of those objects which are typically
-presented in the RSE system view. The DOM is created/updated from this model when the model is persisted.
-Persistence providers will use this DOM to write a persistent form.
-Likewise, the persistence provider will update or construct a DOM when restoring a model from its persistent form.
-</p>
-</body>
-</html>
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 b7464f3ca..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.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.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 14c43db40..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 8fe1207e2..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/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.dstore.security; singleton:=true
-Bundle-Version: 3.0.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.dstore.security.UniversalSecurityPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.resources,
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.dstore.security;x-internal:=true,
- org.eclipse.rse.internal.dstore.security.preference;x-internal:=true,
- org.eclipse.rse.internal.dstore.security.util;x-internal:=true,
- org.eclipse.rse.internal.dstore.security.widgets;x-internal:=true,
- org.eclipse.rse.internal.dstore.security.wizards;x-internal:=true
-Import-Package: com.ibm.icu.text
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 d4cc693f9..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 5, 2007</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 b75cf978e..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 0c0bb8358..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore SSL Support
-providerName = Eclipse.org - DSDP
-
-KeystoreProviderName = Universal Keystore Provider
-PreferencePage.SSL = SSL
-PropertyPage.ServerConnectionSecurity = Server Connection Security
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 ed5d4ad8e..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/plugin.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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) - [186525] Move keystoreProviders to core
--->
-<?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.internal.dstore.security.preference.UniversalSecurityPreferencePage"
- id="org.eclipse.rse.dstore.security.preference.UniversalSecurityPreferencePage">
- </page>
- </extension>
-
- <extension point="org.eclipse.rse.core.keystoreProviders">
- <keystoreProvider
- id="org.eclipse.rse.dstore.security.UniversalKeystoreProvider"
- name="%KeystoreProviderName"
- class="org.eclipse.rse.internal.dstore.security.UniversalKeystoreProvider">
- </keystoreProvider>
- </extension>
-
- <!-- ============================================ -->
- <!-- Define Workbench Properties Pages -->
- <!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%PropertyPage.ServerConnectionSecurity"
- class="org.eclipse.rse.internal.ui.propertypages.ServerConnectionSecurityPropertyPage"
- id="org.eclipse.rse.connectionsecurity.PropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- <enabledWhen>
- <or>
- <instanceof value="org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem"/>
- <instanceof value="org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem"/>
- <instanceof value="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem"/>
- </or>
- </enabledWhen>
- </page>
- </extension>
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/ImageRegistry.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/ImageRegistry.java
deleted file mode 100644
index a517d1e17..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/ImageRegistry.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalKeystoreProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalKeystoreProvider.java
deleted file mode 100644
index f93dbd7d8..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalKeystoreProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.dstore.security;
-
-
-import java.util.List;
-
-import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
-import org.eclipse.rse.internal.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityPlugin.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityPlugin.java
deleted file mode 100644
index d41f9625c..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityPlugin.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-
-package org.eclipse.rse.internal.dstore.security;
-
-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;
- 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 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$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.java
deleted file mode 100644
index 0d4b9a937..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [181112] NLS missing messages
- * Martin Oberhuber (Wind River) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.dstore.security;
-
-import org.eclipse.osgi.util.NLS;
-
-public class UniversalSecurityProperties extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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_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_ALGORITHM_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_STORE_ERROR_;
- 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_ALGORITHM_ERROR_;
- public static String RESID_SECURITY_LOAD_KEYSTORE_ERROR_;
- public static String RESID_SECURITY_KEY_LOAD_ERROR_;
- public static String RESID_SECURITY_INITIALIZE_ERROR_;
- public static String RESID_SECURITY_SECURITY_PROVIDER_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;
-
- public static String RESID_SECURITY_VALIDITY_LBL;
-
- 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/internal/dstore/security/UniversalSecurityProperties.properties b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.properties
deleted file mode 100644
index aefd0f186..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/UniversalSecurityProperties.properties
+++ /dev/null
@@ -1,73 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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) - [235626] Convert dstore.security to MessageBundle format
-# David McKnight (IBM) - [235718] [nls] Missing PII Strings in dstore.security / UniversalSecurityProperties
-###############################################################################
-
-# 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_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_ALGORITHM_LBL = Algorithm:
- 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_STORE_ERROR_ = Key store exception, for operations dealing with key store in\n%1.
- 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.
-# FIXME MISSING STRINGS START
- RESID_SECURITY_ALGORITHM_ERROR_ = The algorithm used to check the integrity of the key store\n%1\ncannot be found.
- RESID_SECURITY_LOAD_KEYSTORE_ERROR_ = Failed to load key store.
- RESID_SECURITY_KEY_LOAD_ERROR_ = One or more certificates in the\n%1\nkey store could not be loaded.
- RESID_SECURITY_INITIALIZE_ERROR_ = Unable to initialize key store \n%1.
- RESID_SECURITY_SECURITY_PROVIDER_ERROR_ = Requested security provider not available.
-# FIXME MISSING STRINGS END
- 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:
-
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertPropertiesDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertPropertiesDialog.java
deleted file mode 100644
index e76241770..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertPropertiesDialog.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-
-package org.eclipse.rse.internal.dstore.security.preference;
-
-
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.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, 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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableContentProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableContentProvider.java
deleted file mode 100644
index dac689e7a..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableContentProvider.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.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) {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableLabelProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableLabelProvider.java
deleted file mode 100644
index 4e652a808..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableLabelProvider.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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$
- }
-
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableSorter.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableSorter.java
deleted file mode 100644
index 717787764..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/CertTableSorter.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/Element.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/Element.java
deleted file mode 100644
index 2b8075d17..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/Element.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.dstore.security.preference;
-
-import org.eclipse.rse.internal.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();
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyElement.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyElement.java
deleted file mode 100644
index a3f72c5d3..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.dstore.security.preference;
-
-
-import java.security.Key;
-
-import org.eclipse.rse.internal.dstore.security.ImageRegistry;
-import org.eclipse.rse.internal.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 UniversalSecurityProperties.RESID_SECURITY_KEY_ENTRY;
- }
-
- public String getAlgorithm()
- {
- return _key.getAlgorithm();
- }
-
- public String getFormat()
- {
- return _key.getFormat();
- }
-
- public Image getImage()
- {
- return org.eclipse.rse.internal.dstore.security.ImageRegistry.getImage(ImageRegistry.IMG_CERTIF_FILE);
- }
-
- public Object getCert()
- {
- return _key;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyPropertiesDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyPropertiesDialog.java
deleted file mode 100644
index 5ca24cde7..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/KeyPropertiesDialog.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.dstore.security.preference;
-
-import org.eclipse.swt.widgets.Shell;
-
-public class KeyPropertiesDialog extends CertPropertiesDialog
-{
- public KeyPropertiesDialog(Shell parentShell, KeyElement element)
- {
- super(parentShell, element.getCert());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/NewCertDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/NewCertDialog.java
deleted file mode 100644
index 8d1b8c07e..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/NewCertDialog.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.dstore.security.UniversalSecurityPlugin;
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.dstore.security.util.GridUtil;
-import org.eclipse.rse.internal.dstore.security.util.StringModifier;
-import org.eclipse.rse.internal.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, 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 = UniversalSecurityProperties.RESID_SECURITY_KEY_IO_ERROR_;
- text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
- String msg = UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_;
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
-
- }
- catch(IOException e){
-
- String text = 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 = UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_;
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,e);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
-
- }
- catch(CertificateException exc){
-
- String text = UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_EXC_;
- text = StringModifier.change(text, "%1", _certForm.getPath()); //$NON-NLS-1$
-
- String msg = UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_;
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
-
- }
- catch(KeyStoreException exc){
- String text = UniversalSecurityProperties.RESID_SECURITY_KEY_STORE_ERROR_;
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin.getKeyStoreLocation()); //$NON-NLS-1$
- String msg = UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_LOAD_EXC_;
-
- Status err = new Status(IStatus.ERROR,ResourcesPlugin.PI_RESOURCES,IStatus.ERROR,text,exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
- }
-
- if (_certificate instanceof X509Certificate)
- {
- X509CertificateElement elem = new X509CertificateElement(_certForm.getAliasName(), 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/RenameCertDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/RenameCertDialog.java
deleted file mode 100644
index 52576b82e..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/RenameCertDialog.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-
-package org.eclipse.rse.internal.dstore.security.preference;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.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, 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(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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/UniversalSecurityPreferencePage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/UniversalSecurityPreferencePage.java
deleted file mode 100644
index dae03012a..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/UniversalSecurityPreferencePage.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [232131] fix minor layout problems along with date formats
- * Martin Oberhuber (Wind River) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.dstore.security.UniversalSecurityPlugin;
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.dstore.security.util.GridUtil;
-import org.eclipse.rse.internal.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.setBackground(composite.getBackground());
- label.setText(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;
- table.setLayoutData(data);
-
- TableLayout tableLayout = new TableLayout();
-
-
- TableColumn aliasColumn = new TableColumn(table, SWT.LEFT);
- aliasColumn.setText(UniversalSecurityProperties.RESID_SECURITY_PREF_ALIAS_NAME);
- tableLayout.addColumnData(new ColumnPixelData(100));
-
- TableColumn toColumn = new TableColumn(table, SWT.LEFT);
- toColumn.setText(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_TO);
- tableLayout.addColumnData(new ColumnPixelData(150));
-
- TableColumn frmColumn = new TableColumn(table, SWT.LEFT);
- frmColumn.setText(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_FROM);
- tableLayout.addColumnData(new ColumnPixelData(150));
-
- TableColumn expColumn = new TableColumn(table, SWT.LEFT);
- expColumn.setText(UniversalSecurityProperties.RESID_SECURITY_PREF_EXPIRES);
- tableLayout.addColumnData(new ColumnPixelData(150));
- table.setLayout(tableLayout);
-
- // Adjust the table viewer.
- String[] properties = new String[] {"STRING", "STRING", "STRING", "STRING"}; //$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, UniversalSecurityProperties.RESID_SECURITY_ADD_LBL, this);
-
-
- _removeButton = SystemWidgetHelpers.createPushButton(buttonComposite, UniversalSecurityProperties.RESID_SECURITY_REMOVE_LBL, this);
- _removeButton.setEnabled(false);
-
- _renameButton = SystemWidgetHelpers.createPushButton(buttonComposite, UniversalSecurityProperties.RESID_SECURITY_RENAME_LBL, this);
- _renameButton.setEnabled(false);
-
- _propertiesButton = SystemWidgetHelpers.createPushButton(buttonComposite, 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 = 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 = UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, e);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
-
- }
- catch (CertificateException exc)
- {
-
- String text = UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_STORE_ERROR_;
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin
- .getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
-
- }
- catch (KeyStoreException exc)
- {
- String text = UniversalSecurityProperties.RESID_SECURITY_UNINIT_KEYSTORE_ERROR_;
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- return false;
-
- }
- catch (NoSuchAlgorithmException exc2)
- {
- String text = UniversalSecurityProperties.RESID_SECURITY_ALGORITHM_ERROR_;
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityProperties.RESID_SECURITY_KEYSTORE_SAVE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc2);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
- 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,
- UniversalSecurityProperties.RESID_SECURITY_KEY_ENTRY,
- key);
- _tableItems.add(elem);
- }
- catch (UnrecoverableKeyException e)
- {
- /* Probably ignore the key in this case */
- }
- }
-
- }
- }
- catch (IOException e)
- {
-
- String text = UniversalSecurityProperties.RESID_SECURITY_LOAD_IO_EXC_;
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityProperties.RESID_SECURITY_LOAD_KEYSTORE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, e);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
-
- }
- catch (CertificateException exc)
- {
-
- String text = UniversalSecurityProperties.RESID_SECURITY_KEY_LOAD_ERROR_;
- text = StringModifier.change(text, "%1", storePath); //$NON-NLS-1$
- String msg = UniversalSecurityProperties.RESID_SECURITY_LOAD_KEYSTORE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
-
- }
- catch (KeyStoreException exc)
- {
-
- String text = UniversalSecurityProperties.RESID_SECURITY_INITIALIZE_ERROR_;
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityProperties.RESID_SECURITY_LOAD_KEYSTORE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
-
- }
- catch (NoSuchProviderException exc2)
- {
-
- String text = UniversalSecurityProperties.RESID_SECURITY_SECURITY_PROVIDER_ERROR_;
- String msg = UniversalSecurityProperties.RESID_SECURITY_INITIALIZE_ERROR_;
- 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(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
-
- }
- catch (NoSuchAlgorithmException exc2)
- {
- String text = UniversalSecurityProperties.RESID_SECURITY_ALGORITHM_ERROR_;
- text = StringModifier.change(text, "%1", UniversalSecurityPlugin //$NON-NLS-1$
- .getKeyStoreLocation());
- String msg = UniversalSecurityProperties.RESID_SECURITY_LOAD_KEYSTORE_ERROR_;
-
- Status err = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES,
- IStatus.ERROR, text, exc2);
- ErrorDialog.openError(UniversalSecurityPlugin.getActiveWorkbenchShell(), UniversalSecurityProperties.RESID_SECURITY_SEC_MSG, msg, err);
-
- }
-
- _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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificateElement.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificateElement.java
deleted file mode 100644
index 0cf6b08c2..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificateElement.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - use ICU for date formats
- *******************************************************************************/
-
-package org.eclipse.rse.internal.dstore.security.preference;
-
-
-import java.security.cert.X509Certificate;
-import java.util.Date;
-
-import com.ibm.icu.text.DateFormat;
-
-
-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()
- {
- Date date = _cert.getNotBefore();
- String result = DateFormat.getDateInstance(DateFormat.LONG).format(date);
- return result;
- }
-
- public String getNotAfter()
- {
- Date date = _cert.getNotAfter();
- String result = DateFormat.getDateInstance(DateFormat.LONG).format(date);
- return result;
- }
-
- public String getExpirationDate()
- {
- return getNotAfter();
- }
-
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificatePropertiesDialog.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificatePropertiesDialog.java
deleted file mode 100644
index 1cdb60ec8..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/preference/X509CertificatePropertiesDialog.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.dstore.security.preference;
-
-import org.eclipse.swt.widgets.Shell;
-
-public class X509CertificatePropertiesDialog extends CertPropertiesDialog
-{
- public X509CertificatePropertiesDialog(Shell parentShell, X509CertificateElement element)
- {
- super(parentShell, element.getCert());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/GridUtil.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/GridUtil.java
deleted file mode 100644
index 47a415d01..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/GridUtil.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/StringModifier.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/StringModifier.java
deleted file mode 100644
index ba7934865..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/util/StringModifier.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.internal.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();
- }
- }
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificateForm.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificateForm.java
deleted file mode 100644
index 385f7da16..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificateForm.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [230815] fix layout problems with long labels
- * Martin Oberhuber (Wind River) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-
-package org.eclipse.rse.internal.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.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.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();
- nameGroup.setLayoutData(data);
- nameGroup.setLayout(layout);
-
- Label lblPath = new Label(nameGroup, SWT.NONE);
- lblPath.setText(UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_FILE);
- _pathField = new Text(nameGroup, SWT.BORDER);
- _pathField.setLayoutData(GridUtil.createHorizontalFill());
- ((GridData)_pathField.getLayoutData()).widthHint = 150;
- _pathField.setText(""); //$NON-NLS-1$
-
- _browseButton = new Button(nameGroup, SWT.PUSH);
- _browseButton.setText(UniversalSecurityProperties.RESID_SECURITY_BROWSE);
-
- _browseButton.addListener(SWT.Selection, this);
-
- Label lblName = new Label(nameGroup, SWT.NONE);
- lblName.setText(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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificatePropertiesForm.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificatePropertiesForm.java
deleted file mode 100644
index f6c1eeca1..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/widgets/CertificatePropertiesForm.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [231913] increasing width of form to accommodate translation
- * David Dykstal (IBM) - [232131] using ICU for DateFormat
- * Martin Oberhuber (Wind River) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.dstore.security.widgets;
-
-import java.security.Key;
-import java.security.cert.X509Certificate;
-
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.dstore.security.util.GridUtil;
-import org.eclipse.rse.internal.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;
-
-import com.ibm.icu.text.DateFormat;
-
-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(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(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(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(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(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(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 = 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 = 600;
- //data.heightHint = 300;
- layout.numColumns = 2;
- content.setLayout(layout);
- content.setLayoutData(data);
-
- if (_alias != null)
- {
- Label lblAlias = new Label(content, SWT.NONE);
- lblAlias.setText(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(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(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(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(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(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 = 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/NewCertTableLabelProvider.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/NewCertTableLabelProvider.java
deleted file mode 100644
index b40458935..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/NewCertTableLabelProvider.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.dstore.security.wizards;
-
-
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.rse.internal.dstore.security.preference.Element;
-import org.eclipse.rse.internal.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$
- }
-
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertAction.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertAction.java
deleted file mode 100644
index 124b7e2e7..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [235756] [dstore] Unable to connect to host with SSL via REXEC
- *******************************************************************************/
-
-package org.eclipse.rse.internal.dstore.security.wizards;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.comm.ISystemKeystoreProvider;
-import org.eclipse.rse.internal.dstore.security.ImageRegistry;
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseWizardAction;
-
-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),
- SystemBasePlugin.getActiveWorkbenchShell()
- );
- _certificates = certs;
- _provider = provider;
- _systemName = systemName;
- }
-
- public IWizard createWizard()
- {
- SystemImportCertWizard importWiz = new SystemImportCertWizard(_provider, _systemName);
- importWiz.setInputObject(_certificates);
- return importWiz;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizard.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizard.java
deleted file mode 100644
index 5625aa65f..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizard.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.comm.ISystemKeystoreProvider;
-import org.eclipse.rse.internal.dstore.security.ImageRegistry;
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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/internal/dstore/security/wizards/SystemImportCertWizardAliasPage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardAliasPage.java
deleted file mode 100644
index ef7e015b4..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardAliasPage.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.internal.dstore.security.UniversalSecurityPlugin;
-import org.eclipse.rse.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardMainPage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardMainPage.java
deleted file mode 100644
index 87643e66b..000000000
--- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/internal/dstore/security/wizards/SystemImportCertWizardMainPage.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [235626] Convert dstore.security to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.dstore.security.UniversalSecurityProperties;
-import org.eclipse.rse.internal.dstore.security.preference.CertTableContentProvider;
-import org.eclipse.rse.internal.dstore.security.preference.X509CertificateElement;
-import org.eclipse.rse.internal.dstore.security.preference.X509CertificatePropertiesDialog;
-import org.eclipse.rse.internal.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 verbiage = new Composite(parent, SWT.NULL);
- GridLayout vlayout = new GridLayout();
- GridData vdata = new GridData(GridData.FILL_BOTH);
- vlayout.numColumns = 1;
- verbiage.setLayout(vlayout);
- verbiage.setLayoutData(vdata);
-
- SystemWidgetHelpers.createLabel(verbiage, UniversalSecurityProperties.RESID_SECURITY_CERTIFICATE_INFORMATION);
- createTableViewer(verbiage);
-
- 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(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_TO);
- tableLayout.addColumnData(new ColumnPixelData(90));
-
- TableColumn frmColumn = new TableColumn(table, SWT.LEFT);
- frmColumn.setText(UniversalSecurityProperties.RESID_SECURITY_PREF_ISSUED_FROM);
- tableLayout.addColumnData(new ColumnPixelData(90));
-
- TableColumn expColumn = new TableColumn(table, SWT.RIGHT);
- expColumn.setText(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());
-
- if (_certificates != null)
- {
- 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;
- }
-
-
-}
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 3772ede93..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.eclipse.filesystem</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.eclipse.filesystem/moved_project.txt b/rse/plugins/org.eclipse.rse.eclipse.filesystem/moved_project.txt
deleted file mode 100644
index c98a28c56..000000000
--- a/rse/plugins/org.eclipse.rse.eclipse.filesystem/moved_project.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The contents of this plugin was moved and split into
- org.eclipse.rse.efs
- org.eclipse.rse.efs.ui
-respectively.
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/.classpath b/rse/plugins/org.eclipse.rse.efs.ui/.classpath
deleted file mode 100644
index b7464f3ca..000000000
--- a/rse/plugins/org.eclipse.rse.efs.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.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.efs.ui/.cvsignore b/rse/plugins/org.eclipse.rse.efs.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/.project b/rse/plugins/org.eclipse.rse.efs.ui/.project
deleted file mode 100644
index 296cce739..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.efs.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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.efs.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.efs.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 9c9696721..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/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.efs.ui;singleton:=true
-Bundle-Version: 2.1.101.qualifier
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.filesystem,
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.files.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.efs;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.core.resources,
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.ui.ide,
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.efs.ui;x-internal:=true
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/about.html b/rse/plugins/org.eclipse.rse.efs.ui/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.efs.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 5, 2007</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.efs.ui/build.properties b/rse/plugins/org.eclipse.rse.efs.ui/build.properties
deleted file mode 100644
index db12cec46..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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) - [181917] EFS Improvements: Avoid unclosed Streams,
-# - Fix early startup issues by deferring FileStore evaluation and classloading,
-# - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
-# - Also remove unnecessary class RSEFileCache and obsolete branding files.
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/plugin.properties b/rse/plugins/org.eclipse.rse.efs.ui/plugin.properties
deleted file mode 100644
index 723077540..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Eclipse Filesystem (EFS) Provider UI Support
-providerName = Eclipse.org - DSDP
-
-createRemoteProject.label = Create Remote Project
-createRemoteProject.tooltip = Create a remote project using this folder
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/plugin.xml b/rse/plugins/org.eclipse.rse.efs.ui/plugin.xml
deleted file mode 100644
index 77e95f135..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/plugin.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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:
- Kushal Munir (IBM) - Changed paths to reflect internal packages
- Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- Martin Oberhuber (Wind River) - [235145] Add comments how to hide "Create Remote Project" action by means of Activity
- -->
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="org.eclipse.rse.eclipse.filesystemSupport"
- point="org.eclipse.ui.ide.filesystemSupport">
- <filesystemContributor
- scheme="rse"
- class="org.eclipse.rse.internal.efs.ui.RSEFileSystemContributor"
- label="RSE">
- </filesystemContributor>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"
- id="org.eclipse.rse.efs.createproject">
- <visibility>
- <objectState name="isdirectory" value="true"/>
- </visibility>
- <action
- label="%createRemoteProject.label"
- tooltip="%createRemoteProject.tooltip"
- class="org.eclipse.rse.internal.efs.ui.CreateRemoteProjectActionDelegate"
- menubarPath="group.importexport"
- enablesFor="1"
- id="createRemoteProject">
- </action>
- </objectContribution>
- </extension>
-
- <!-- Here is some sample XML code that shows how Eclipse Activities -->
- <!-- can be used to hide the "Create Remote Project" action in a -->
- <!-- product built on top of TM. Just copy that XML code to a -->
- <!-- product's plugin.xml (can be any other plugin) and uncomment. -->
- <!-- -->
- <!-- NOTE: As per Eclipse 3.5 (Galileo), a separate plugin is -->
- <!-- available from CVS holding activity definitions, but not the -->
- <!-- categories: "org.eclipse.rse.ui.capabilities". For details, -->
- <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=252807#c36 -->
- <!-- http://wiki.eclipse.org/Galileo_Capabilities -->
-
- <!--
- <!- - Hide the "Create Remote Project" popupMenu by default - ->
- <extension point="org.eclipse.ui.activities">
- <activity id="org.eclipse.rse.CreateRemoteProject"
- description="Filters EFS Create Remote Project menu in the RSE Views"
- name="RSE Create Remote Project" />
-
- <!- - put the activity in the category: By means of not putting it
- in any category, the Activity is invisible in the Prefspage UI.
- Products can add categories, or define trigger points to enable it.
- <category id="org.eclipse.rse.Category"
- description="Remote System Explorer (RSE) Activities"
- name="Remote System Explorer" />
- <categoryActivityBinding activityId="org.eclipse.rse.CreateRemoteProject"
- categoryId="org.eclipse.rse.Category" />
- - ->
-
- <!- - bind all contributions from plugin org.eclipse.rse.efs.ui - ->
- <activityPatternBinding
- activityId="org.eclipse.rse.CreateRemoteProject"
- pattern="org\.eclipse\.rse\.efs\.ui/createRemoteProject"/>
-
- <!- - our activity should NOT be enabled by default
- <defaultEnablement id="org.eclipse.rse.CreateRemoteProject" />
- - ->
- </extension>
- -->
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java b/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java
deleted file mode 100644
index 09694118f..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2009 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:
- * IBM Corporation - initial API and implementation
- * Kushal Munir (IBM) - moved to internal package
- * Martin Oberhuber (Wind River) - added progress dialog
- * - (adapted from org.eclipse.ui.actions.CopyProjectAction, copyright IBM)
- * Martin Oberhuber (Wind River) - [181917] EFS Improvements: Avoid unclosed Streams,
- * - Fix early startup issues by deferring FileStore evaluation and classloading,
- * - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
- * - Also remove unnecessary class RSEFileCache and obsolete branding files.
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * Remy Chi Jian Suen (IBM) - [192906][efs] No Error when trying to Create Remote Project when project with name exists
- * Martin Oberhuber (Wind River) - [182350] Support creating remote project on Windows Drive
- * Remy Chi Jian Suen (IBM) - [202098][efs][nls] Improve error message when creating a remote project with existing name
- * David McKnight (IBM) - [287185] EFS provider should interpret the URL host component as RSE connection name rather than a hostname
- ********************************************************************************/
-
-package org.eclipse.rse.internal.efs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-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.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.efs.Activator;
-import org.eclipse.rse.internal.efs.RSEFileSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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;
- private IStatus errorStatus;
-
- //----------------------------------------------------------------------------
- // <Adapted from org.eclipse.ui.actions.CopyProjectAction as of Eclipse 3.3M6>
- // (Copyright 2000, 2006 IBM Corporation and others)
- //----------------------------------------------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action)
- {
- errorStatus = null;
-
- IRemoteFile directory = (IRemoteFile)fSelection.getFirstElement();
-
- boolean completed = performCreateRemoteProject(directory);
-
- if (!completed) {
- return; // not appropriate to show errors
- }
-
- // If errors occurred, open an Error dialog
- if (errorStatus != null) {
- ErrorDialog.openError(getShell(), getErrorsTitle(), null, errorStatus);
- errorStatus = null;
- }
- }
-
- /**
- * Records the core exception to be displayed to the user once the action is
- * finished.
- *
- * @param error
- * a <code>CoreException</code>
- */
- final void recordError(CoreException error) {
- this.errorStatus = error.getStatus();
- }
-
- /**
- * Opens an error dialog to display the given message.
- * <p>
- * Note that this method must be called from UI thread.
- * </p>
- *
- * @param message
- * the message
- */
- void displayError(String message) {
- MessageDialog.openError(getShell(), getErrorsTitle(), message);
- }
-
- /**
- * Return the title of the errors dialog.
- *
- * @return java.lang.String
- */
- protected String getErrorsTitle() {
- return "Error creating remote project"; //$NON-NLS-1$
- }
-
- /**
- * Creates a remote project.
- *
- * @param directory
- * the remote folder on which the EFS project should be located
- * @return <code>true</code> if the copy operation completed, and
- * <code>false</code> if it was abandoned part way
- */
- boolean performCreateRemoteProject(final IRemoteFile directory) {
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- createRemoteProject(directory, monitor);
- } catch (InvocationTargetException e) {
- throw e;
- } catch (Exception e) {
- if (e.getCause() instanceof CoreException) {
- recordError((CoreException)e.getCause());
- } else {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- -1, e.getMessage(), e));
- displayError(e.getMessage());
- }
- }
- }
- };
-
- try {
- //TODO make this a Job an run in foreground with option to send to background
- ProgressMonitorDialog mon = new ProgressMonitorDialog(getShell()) {
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(Messages.CreateRemoteProjectActionDelegate_CREATING_TITLE);
- }
- };
- mon.run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- displayError("Internal Error: "+e.getTargetException().getMessage()); //$NON-NLS-1$
- return false;
- }
-
- return true;
- }
-
- //----------------------------------------------------------------------------
- // </Adapted from org.eclipse.ui.actions.CopyProjectAction as of Eclipse 3.3M6>
- // (Copyright 2000, 2006 IBM Corporation and others)
- //----------------------------------------------------------------------------
-
- private IProject createRemoteProject(IRemoteFile directory, IProgressMonitor monitor) throws InvocationTargetException
- {
- IWorkspaceRoot root = SystemBasePlugin.getWorkspaceRoot();
-
- String projectName = directory.getHost().getAliasName() + '_' + directory.getName();
- projectName = projectName.replaceAll("[/:*?\"<>|\\\\]", ""); //$NON-NLS-1$ //$NON-NLS-2$
- IProject editProject = root.getProject(projectName);
-
- try {
- if (editProject.exists())
- {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- NLS.bind(Messages.CreateRemoteProjectActionDelegate_PROJECT_EXISTS, projectName)));
- }
-
- IProjectDescription description = root.getWorkspace().newProjectDescription(projectName);
- IHost host = directory.getParentRemoteFileSubSystem().getHost();
- String hostNameOrAddr = host.getHostName();
- String hostAliasName = host.getAliasName();
- String absolutePath = directory.getAbsolutePath();
- URI location = RSEFileSystem.getURIFor(hostNameOrAddr, absolutePath, hostAliasName);
- description.setLocationURI(location);
-
- editProject.create(description, monitor);
-
- editProject.open(monitor);
-
- editProject.refreshLocal(IResource.DEPTH_ONE, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
-
- 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.efs.ui/src/org/eclipse/rse/internal/efs/ui/Messages.java b/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/Messages.java
deleted file mode 100644
index 579e38bd3..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/Messages.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * Remy Chi Jian Suen (IBM) - [202098][efs][nls] Improve error message when creating a remote project with existing name
- *******************************************************************************/
-package org.eclipse.rse.internal.efs.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.efs.ui.messages"; //$NON-NLS-1$
- public static String CreateRemoteProjectActionDelegate_CREATING_TITLE;
- public static String CreateRemoteProjectActionDelegate_PROJECT_EXISTS;
- static {
-// initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java b/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java
deleted file mode 100644
index 6baa30a50..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/RSEFileSystemContributor.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * Kushal Munir (IBM) - moved to internal package.
- * Martin Oberhuber (Wind River) - [181917] EFS Improvements: Avoid unclosed Streams,
- * - Fix early startup issues by deferring FileStore evaluation and classloading,
- * - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
- * - Also remove unnecessary class RSEFileCache and obsolete branding files.
- * Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * Martin Oberhuber (Wind River) - [189441] fix EFS operations on Windows (Local) systems
- * David Dykstal (IBM) - [235840] externalizing dialog title
- * David McKnight (IBM) - [280763] [efs] Cannot pick a file when linking a resource (only folders)
- * David McKnight (IBM) - [287185] EFS provider should interpret the URL host component as RSE connection name rather than a hostname
- ********************************************************************************/
-
-
-package org.eclipse.rse.internal.efs.ui;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.SystemRemoteFileDialog;
-import org.eclipse.rse.internal.efs.RSEFileStoreImpl;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
-
-public class RSEFileSystemContributor extends FileSystemContributor {
-
-
- public URI browseFileSystem(String initialPath, Shell shell) {
-
- SystemRemoteFileDialog dlg = new SystemRemoteFileDialog(shell);
-
-
- if (!initialPath.equals("")) { //$NON-NLS-1$
-
- try {
- URI uri = new URI(initialPath);
- IHost host = RSEFileStoreImpl.getConnectionFor(uri.getHost(), uri.getQuery(), new NullProgressMonitor());
- IRemoteFileSubSystem fs = RSEFileStoreImpl.getRemoteFileSubSystem(host);
- dlg.setInputObject(fs.getRemoteFileObject(uri.getPath(), new NullProgressMonitor()));
- }
- catch (Exception e) {
- }
- }
-
- dlg.setNeedsProgressMonitor(true);
-
- 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);
- }
- }
-
- IHost host = dlg.getSelectedConnection();
- String hostName = host.getHostName();
- String aliasName = host.getAliasName();
-
- IRemoteFile file = (IRemoteFile)selected;
- String path = file.getAbsolutePath();
- if (host.getSystemType().isWindows()) {
- path = path.replace('\\', '/');
- }
- path = fixPathForURI(path);
- try {
- return new URI("rse", hostName, path, aliasName, null); //$NON-NLS-1$
- }
- catch (URISyntaxException e) {
- SystemMessageDialog.displayErrorMessage(SystemMessageDialog.getDefaultShell(), e.getLocalizedMessage());
- }
- }
- return null;
- }
-
- /**
- * Adapt a local file system path such that it can be used as
- * path in an URI. Converts path delimiters do '/' default
- * delimiter, and adds a slash in front if necessary.
- * @param path the path to adapt
- * @return adapted path
- */
- private String fixPathForURI(String path) {
- String sep = PathUtility.getSeparator(path);
- if (!sep.equals("/")) { //$NON-NLS-1$
- path = path.replace(sep.charAt(0), '/');
- }
- //<adapted from org.eclipse.core.filesystem.URIUtil.toURI() Copyright(c) 2005, 2006 IBM>
- final int length = path.length();
- StringBuffer pathBuf = new StringBuffer(length + 3);
- //There must be a leading slash in a hierarchical URI
- if (length > 0 && (path.charAt(0) != '/'))
- pathBuf.append('/');
- //additional double-slash for UNC paths to distinguish from host separator
- if (path.startsWith("//")) //$NON-NLS-1$
- pathBuf.append('/').append('/');
- pathBuf.append(path);
- //</adapted from org.eclipse.core.filesystem.URIUtil.toURI() Copyright(c) 2005, 2006 IBM>
- return pathBuf.toString();
- }
-
- public URI getURI(String string){
- try {
- return new URI(string);
- }
- catch (URISyntaxException e) {
- //Do not show an error or log here, since this method is called repeatedly while typing
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/messages.properties b/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/messages.properties
deleted file mode 100644
index da9940a02..000000000
--- a/rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/messages.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Copyright (c) 2007, 2008 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
-# Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
-# Remy Chi Jian Suen (IBM) - [202098][efs][nls] Improve error message when creating a remote project with existing name
-# David Dykstal (IBM) - [cleanup] using messageformat_var instead of messageformat_none
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-CreateRemoteProjectActionDelegate_CREATING_TITLE=Creating Remote Project
-CreateRemoteProjectActionDelegate_PROJECT_EXISTS = A project named {0} already exists.
diff --git a/rse/plugins/org.eclipse.rse.efs/.classpath b/rse/plugins/org.eclipse.rse.efs/.classpath
deleted file mode 100644
index b7464f3ca..000000000
--- a/rse/plugins/org.eclipse.rse.efs/.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.efs/.cvsignore b/rse/plugins/org.eclipse.rse.efs/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.efs/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.efs/.project b/rse/plugins/org.eclipse.rse.efs/.project
deleted file mode 100644
index f823509d0..000000000
--- a/rse/plugins/org.eclipse.rse.efs/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.efs</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.efs/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.efs/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.efs/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.efs/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.efs/META-INF/MANIFEST.MF
deleted file mode 100644
index afe7bc92c..000000000
--- a/rse/plugins/org.eclipse.rse.efs/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.efs;singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.efs.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.filesystem,
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.1,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="3.4.0",
- org.eclipse.ui;bundle-version="3.4.0",
- org.eclipse.ui.ide;bundle-version="3.4.0",
- org.eclipse.ui.editors;bundle-version="3.4.0"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.efs;x-friends:="org.eclipse.rse.efs.ui"
diff --git a/rse/plugins/org.eclipse.rse.efs/about.html b/rse/plugins/org.eclipse.rse.efs/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.efs/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 5, 2007</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.efs/build.properties b/rse/plugins/org.eclipse.rse.efs/build.properties
deleted file mode 100644
index db12cec46..000000000
--- a/rse/plugins/org.eclipse.rse.efs/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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) - [181917] EFS Improvements: Avoid unclosed Streams,
-# - Fix early startup issues by deferring FileStore evaluation and classloading,
-# - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
-# - Also remove unnecessary class RSEFileCache and obsolete branding files.
-###############################################################################
-bin.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- .
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.efs/plugin.properties b/rse/plugins/org.eclipse.rse.efs/plugin.properties
deleted file mode 100644
index 2e1cc4510..000000000
--- a/rse/plugins/org.eclipse.rse.efs/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 2009 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David 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
-
-pluginName = RSE Eclipse Filesystem (EFS) Provider
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.efs/plugin.xml b/rse/plugins/org.eclipse.rse.efs/plugin.xml
deleted file mode 100644
index e9cfc23db..000000000
--- a/rse/plugins/org.eclipse.rse.efs/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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:
-Kushal Munir (IBM) - Changed paths to reflect internal packages
-Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
--->
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="org.eclipse.rse.efs.filesystem"
- point="org.eclipse.core.filesystem.filesystems">
- <filesystem scheme="rse">
- <run class="org.eclipse.rse.internal.efs.RSEFileSystem"/>
- </filesystem>
- </extension>
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Activator.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Activator.java
deleted file mode 100644
index aa1bd9228..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Activator.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kushal Munir (IBM) - moved to internal package
- * Martin Oberhuber (Wind River) - [181917] EFS Improvements: Avoid unclosed Streams,
- * - Fix early startup issues by deferring FileStore evaluation and classloading,
- * - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
- * - Also remove unnecessary class RSEFileCache and obsolete branding files.
- * Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * David McKnight (IBM) - [241316] [efs] Cannot restore editors for RSE/EFS-backed resources
- ********************************************************************************/
-
-package org.eclipse.rse.internal.efs;
-
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-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;
-
- public static final String PLUGIN_ID = "org.eclipse.rse.efs"; //$NON-NLS-1$
-
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- final RemoteEditorManager mgr = RemoteEditorManager.getDefault();
- ResourcesPlugin.getWorkspace().addSaveParticipant(this, mgr);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(mgr, IResourceChangeEvent.POST_CHANGE);
-
- Job job = new Job("Add Listener"){ //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
-
- while (!PlatformUI.isWorkbenchRunning()){
- try {
- //Checks in the loop are fast enough so we can poll often
- Thread.sleep(100);
- }
- catch (InterruptedException e){}
- }
- IWorkbench wb = PlatformUI.getWorkbench();
- wb.addWorkbenchListener(mgr);
- return Status.OK_STATUS;
- }
- };
- job.schedule();
-
- }
-
- public void stop(BundleContext context) throws Exception {
- try {
- ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(RemoteEditorManager.getDefault());
- } finally {
- super.stop(context);
- }
- plugin = null;
- }
- /**
- * Returns the shared instance.
- *
- * @return the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public static IStatus errorStatus(Throwable e) {
- return new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Messages.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Messages.java
deleted file mode 100644
index f006fd895..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/Messages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: Kevin Doyle.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.efs;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.efs.messages"; //$NON-NLS-1$
-
- public static String RESOURCES_NOT_LOADED;
- public static String CONNECTION_NOT_FOUND;
- public static String NO_FILE_SUBSYSTEM;
- public static String COULD_NOT_CONNECT;
- public static String COULD_NOT_GET_REMOTE_FILE;
- public static String FILE_STORE_DOES_NOT_EXIST;
- public static String UNKNOWN_EXCEPTION;
- public static String FILE_NAME_EXISTS;
- public static String CANNOT_OPEN_STREAM_ON_FOLDER;
- public static String DELETE_FAILED;
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStore.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStore.java
deleted file mode 100644
index 0d0269979..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStore.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kushal Munir (IBM) - moved to internal package
- * Martin Oberhuber (Wind River) - [181917] EFS Improvements: Avoid unclosed Streams,
- * - Fix early startup issues by deferring FileStore evaluation and classloading,
- * - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
- * - Also remove unnecessary class RSEFileCache and obsolete branding files.
- * Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * Martin Oberhuber (Wind River) - [189441] fix EFS operations on Windows (Local) systems
- * Martin Oberhuber (Wind River) - [191589] fix Rename by adding putInfo() for RSE EFS, and fetch symlink info
- * Kevin Doyle (IBM) - [210673] [efs][nls] Externalize Strings in RSEFileStore and RSEFileStoreImpl
- * Timur Shipilov (Xored) - [224538] RSEFileStore.getParent() returns null for element which is not root of filesystem
- * David McKnight (IBM) - [287185] EFS provider should interpret the URL host component as RSE connection name rather than a hostname
- * David McKnight (IBM) - [291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced
- ********************************************************************************/
-
-package org.eclipse.rse.internal.efs;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.HashMap;
-
-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.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.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * Implementation of IFileStore for RSE.
- *
- * An RSEFileStore is an immutable object. Once created, it always
- * references the same remote item. Therefore, instances can be
- * shared.
- *
- * @since RSE 2.0
- */
-public class RSEFileStore extends FileStore
-{
- private RSEFileStore _parent;
- private String _host;
- private String _name;
- private String _alias;
- private IPath _absolutePath;
-
- //cached IRemoteFile object: an Object to avoid early class loading
- private transient RSEFileStoreImpl _impl = null;
- private static HashMap instanceMap = new HashMap();
-
- /**
- * Constructor to use if the parent file store is known.
- * @param parent the parent file store.
- * @param name the name of the file store.
- */
- private RSEFileStore(RSEFileStore parent, String name) {
- _parent = parent;
- _host = parent.getHost();
- _name = name;
- _absolutePath = parent._absolutePath.append(name);
- }
-
- /**
- * Constructor to use if the file store is a handle.
- * @param host the connection name for the file store.
- * @param absolutePath an absolute path to the file, valid on the remote file system.
- */
- private RSEFileStore(String host, String absolutePath) {
- _parent = null;
- _host = host;
- _absolutePath = new Path(absolutePath);
- _name = _absolutePath.lastSegment();
- if (_name == null) {
- //Windows Root Drive has no segments but needs a name
- _name = _absolutePath.getDevice();
- if (_name == null) {
- _name = ""; //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Constructor to use if the file store is a handle.
- * @param host the connection name for the file store.
- * @param absolutePath an absolute path to the file, valid on the remote file system.
- * @param aliasName the connection alias for the file store
- */
- private RSEFileStore(String host, String absolutePath, String aliasName) {
- _parent = null;
- _host = host;
- _absolutePath = new Path(absolutePath);
- _alias = aliasName;
- _name = _absolutePath.lastSegment();
- if (_name == null) {
- //Windows Root Drive has no segments but needs a name
- _name = _absolutePath.getDevice();
- if (_name == null) {
- _name = ""; //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Public factory method for obtaining RSEFileStore instances.
- * @param uri URI to get a fileStore for
- * @return an RSEFileStore instance for the URI.
- */
- public static RSEFileStore getInstance(URI uri) {
- synchronized(instanceMap) {
- RSEFileStore store = (RSEFileStore)instanceMap.get(uri);
- if (store==null) {
- String path = uri.getPath();
- String hostName = uri.getHost();
- String aliasName = uri.getQuery();
- store = new RSEFileStore(hostName, path, aliasName);
- instanceMap.put(uri, store);
- }
- return store;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#getChild(java.lang.String)
- */
- public IFileStore getChild(String name) {
- RSEFileStore tmpChild = new RSEFileStore(this, name);
- URI uri = tmpChild.toURI();
- synchronized(instanceMap) {
- RSEFileStore storedChild = (RSEFileStore)instanceMap.get(uri);
- if (storedChild==null) {
- instanceMap.put(uri, tmpChild);
- } else {
- tmpChild = storedChild;
- }
- }
- return tmpChild;
- }
-
- /**
- * Returns the host name or address for this file store.
- * @return the host name or address for this file store.
- */
- /*package*/ String getHost() {
- //TODO consider computing this instead of storing it
- return _host;
- }
-
- String getAlias() {
- return _alias;
- }
-
- /**
- * Returns an absolute path for this file store.
- *
- * The absolute path is in normalized form, as it can use in URIs
- * (with separator '/').
- *
- * @return an absolute path for this file store in normalized form.
- */
- /*package*/ String getAbsolutePath() {
- //TODO consider computing this instead of storing it
- return _absolutePath.toString();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#getName()
- */
- public String getName() {
- return _name;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#getParent()
- */
- public IFileStore getParent() {
- if (_parent == null && _absolutePath.segmentCount() > 0) {
- String parentPath = _absolutePath.removeLastSegments(1).toString();
- URI parentUri = RSEFileSystem.getURIFor(_host, parentPath);
- _parent = RSEFileStore.getInstance(parentUri);
- }
- return _parent;
- }
-
- /**
- * Returns the parent file store as an RSEFileStore.
- * @return the parent file store as an RSEFileStore.
- */
- /*package*/ RSEFileStore getParentStore() {
- return _parent;
- }
-
- /**
- * Get FileStore implementation.
- * <p>
- * Moved implementation to separate class in order to defer class loading
- * until resources plugin is up.
- * </p>
- * @return the RSEFileStoreImpl implementation.
- */
- /*package*/ RSEFileStoreImpl getImpl() throws CoreException {
- //FIXME Workaround for Platform bug 181998 - activation problems on early startup:
- //Resources plugin opens the workspace in its start() method, triggers the
- //save manager and this in turn would activate org.eclipse.rse.ui which depends
- //on resources... this activation circle does not work, therefore throw an
- //exception if resources are not yet up.
- if (_impl==null) {
- if (!isResourcesPluginUp()) {
- throw new CoreException(new Status(IStatus.WARNING,
- Activator.getDefault().getBundle().getSymbolicName(),
- Messages.RESOURCES_NOT_LOADED));
- }
- _impl = new RSEFileStoreImpl(this);
- }
- return _impl;
- }
-
- private static Bundle resourcesBundle = null;
- private static boolean isResourcesPluginUp()
- {
- if (resourcesBundle==null) {
- BundleContext ctx = Activator.getDefault().getBundle().getBundleContext();
- Bundle[] bundles = ctx.getBundles();
- for (int i=0; i<bundles.length; i++) {
- if ("org.eclipse.core.resources".equals(bundles[i].getSymbolicName())) { //$NON-NLS-1$
- if (resourcesBundle==null && bundles[i].getState()==Bundle.ACTIVE) {
- resourcesBundle = bundles[i];
- }
- }
- }
- }
- return resourcesBundle != null && resourcesBundle.getState()==Bundle.ACTIVE;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#childNames(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
- return getImpl().childNames(options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#childInfos(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
- return getImpl().childInfos(options, monitor);
- }
-
- /**
- * Fetch information for this file store.
- * <p>
- * FIXME This is a HACK to fix early startup problems until
- * Platform bug 182006 is resolved! Returns an info
- * object indicating a non-existing file while the Eclipse resources
- * plugin is not fully activated. This is in order to avoid problems
- * of activating too much of RSE while Eclipse is not yet ready.
- * </p>
- * @return a file info object for this file store.
- */
- public IFileInfo fetchInfo() {
- try {
- return fetchInfo(EFS.NONE, null);
- } catch (CoreException e) {
- if (!isResourcesPluginUp()) {
- //FIXME HACK workaround for platform bug 182006:
- //Claim that files do not exist while resources
- //plugin is not yet fully up.
- return new FileInfo(getName());
- }
- //Whoa! Bad bad... wrapping a checked exception in an unchecked one...
- throw new RuntimeException(e);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#fetchInfo(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
- return getImpl().fetchInfo(options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#putInfo(org.eclipse.core.filesystem.IFileInfo, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
- getImpl().putInfo(info, options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#openInputStream(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException
- {
- return getImpl().openInputStream(options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#toURI()
- */
- public URI toURI() {
- return RSEFileSystem.getURIFor(getHost(), getAbsolutePath());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#mkdir(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException
- {
- return getImpl().mkdir(options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#openOutputStream(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException
- {
- return getImpl().openOutputStream(options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#delete(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void delete(int options, IProgressMonitor monitor) throws CoreException
- {
- getImpl().delete(options, monitor);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java
deleted file mode 100644
index 44d974810..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java
+++ /dev/null
@@ -1,798 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kushal Munir (IBM) - moved to internal package
- * Martin Oberhuber (Wind River) - [181917] EFS Improvements: Avoid unclosed Streams,
- * - Fix early startup issues by deferring FileStore evaluation and classloading,
- * - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
- * - Also remove unnecessary class RSEFileCache and obsolete branding files.
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * Martin Oberhuber (Wind River) - [191581] clear local IRemoteFile handle cache when modifying remote
- * Martin Oberhuber (Wind River) - [197025][197167] Improved wait for model complete
- * Martin Oberhuber (Wind River) - [191589] fix Rename by adding putInfo() for RSE EFS, and fetch symlink info
- * Martin Oberhuber (Wind River) - [199552] fix deadlock with dstore-backed efs access
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * Kevin Doyle (IBM) - [210673] [efs][nls] Externalize Strings in RSEFileStore and RSEFileStoreImpl
- * Timur Shipilov (Xored) - [224540] [efs] RSEFileStore.mkdir(EFS.NONE, null) doesn't create parent folder
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- * Martin Oberhuber (Wind River) - [233993] Improve EFS error reporting
- * Martin Oberhuber (Wind River) - [220300] EFS Size Property not properly updated after saving
- * Martin Oberhuber (Wind River) - [234026] Clarify IFileService#createFolder() Javadocs
- * David McKnight (IBM) - [287185] EFS provider should interpret the URL host component as RSE connection name rather than a hostname
- * David McKnight (IBM) - [291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced
- ********************************************************************************/
-
-package org.eclipse.rse.internal.efs;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-
-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.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundException;
-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.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.servicesubsystem.IFileServiceSubSystem;
-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.RemoteFileContext;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * Implementation of IFileStore for RSE.
- *
- * The RSEFileStore delegates to this impl class in order to defer class
- * loading until file contents are really needed.
- */
-public class RSEFileStoreImpl extends FileStore
-{
- private RSEFileStore _store;
-
- // to help with with performance issues when eclipse makes excessing fetchInfo calls
- private long _lastFetch = 0;
- private int _fetchWaitThreshold = 1000;
-
- //cached IRemoteFile object: an Object to avoid early class loading
- private transient volatile IRemoteFile _remoteFile;
-
- //markup to know that RSE has been initialized
- private static boolean _initialized;
-
- /**
- * Constructor to use if the file store handle is known.
- * @param store the file store handle for this implementation object.
- */
- public RSEFileStoreImpl(RSEFileStore store) {
- _store = store;
-
- String waitStr = System.getProperty("rse_efs_fetch_wait_threshold"); //$NON-NLS-1$
- if (waitStr != null && waitStr.length() > 0){
- try {
- _fetchWaitThreshold = Integer.parseInt(waitStr);
- }
- catch (Exception e){
- _fetchWaitThreshold = 1000;
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#getChild(java.lang.String)
- */
- public IFileStore getChild(String name) {
- return _store.getChild(name);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#getName()
- */
- public String getName() {
- return _store.getName();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#getParent()
- */
- public IFileStore getParent() {
- return _store.getParent();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#toURI()
- */
- public URI toURI() {
- return _store.toURI();
- }
-
- /**
- * Wait for RSE persistence to fully initialize
- */
- private static void waitForRSEInit() {
- if (!_initialized) {
- //Force activating RSEUIPlugin, which kicks off InitRSEJob
- RSEUIPlugin.getDefault();
- Job[] jobs = Job.getJobManager().find(null);
- for (int i=0; i<jobs.length; i++) {
- if ("Initialize RSE".equals(jobs[i].getName())) { //$NON-NLS-1$
- try {
- jobs[i].join();
- } catch(InterruptedException e) {
- }
- break;
- }
- }
- _initialized = true;
- }
- }
-
- /**
- * Return the best RSE connection object matching the given host name and/or connection alias.
- *
- * @param hostNameOrAddr the host name IP address of requested host.
- * @param aliasName the connection alias of the requested host
- * @return RSE connection object matching the given connection alias, host name, or
- * <code>null</code> if no matching connection object was found.
- */
- public static IHost getConnectionFor(String hostNameOrAddr, String aliasName, IProgressMonitor monitor) {
- if (hostNameOrAddr==null) {
- return null;
- }
- if (!_initialized) {
- waitForRSEInit();
- }
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- IHost[] connections = sr.getHosts();
-
- IHost unconnected = null;
-
- // first look for connection alias
- if (aliasName != null){
- for (int i = 0; i < connections.length; i++) {
- IHost con = connections[i];
-
- if (aliasName.equalsIgnoreCase(con.getAliasName())){
- IRemoteFileSubSystem fss = getRemoteFileSubSystem(con);
- if (fss!=null && fss.isConnected()) {
- return con;
- } else {
- unconnected = con;
- }
- }
- }
- }
-
- if (unconnected == null){
- // if nothing matches the connection alias, fall back to hostname
- for (int i = 0; i < connections.length; i++) {
- IHost con = connections[i];
- //TODO use more elaborate methods of checking whether two
- //host names/IP addresses are the same; or, use the host alias
- if (hostNameOrAddr.equalsIgnoreCase(con.getHostName())) {
- IRemoteFileSubSystem fss = getRemoteFileSubSystem(con);
- if (fss!=null && fss.isConnected()) {
- return con;
- } else {
- unconnected = con;
- }
- }
- }
- }
-
- return unconnected;
- }
-
-
- /**
- * Return the best available remote file subsystem for a connection.
- * Criteria are:
- * <ol>
- * <li>A connected FileServiceSubsystem</li>
- * <li>A connected IRemoteFileSubSystem</li>
- * <li>An unconnected FileServiceSubsystem</li>
- * <li>An unconnected IRemoteFileSubSystem</li>
- * </ol>
- *
- * @param host the connection to check
- * @return an IRemoteFileSubSystem for the given connection, or
- * <code>null</code> if no IRemoteFileSubSystem is configured.
- */
- public static IRemoteFileSubSystem getRemoteFileSubSystem(IHost host) {
- IRemoteFileSubSystem candidate = null;
- FileServiceSubSystem serviceCandidate = null;
- IRemoteFileSubSystem[] subSys = RemoteFileUtility.getFileSubSystems(host);
- for (int i=0; i<subSys.length; i++) {
- if (subSys[i] instanceof FileServiceSubSystem) {
- if (subSys[i].isConnected()) {
- //best candidate: service and connected
- return subSys[i];
- } else if (serviceCandidate==null) {
- serviceCandidate = (FileServiceSubSystem)subSys[i];
- }
- } else if(candidate==null) {
- candidate=subSys[i];
- } else if(subSys[i].isConnected() && !candidate.isConnected()) {
- candidate=subSys[i];
- }
- }
- //Now find the best candidate
- if (candidate!=null && candidate.isConnected()) {
- return candidate;
- } else if (serviceCandidate!=null) {
- return serviceCandidate;
- }
- return candidate;
- }
-
- /**
- * Returns the best connected file subsystem for this file store.
- * Never returns <code>null</code>.
- * @param hostNameOrAddr host name or IP address
- * @param aliasName the connection alias
- * @param monitor progress monitor
- * @return The best connected file subsystem for this file store.
- * @throws CoreException if no file subsystem could be found or connected.
- */
- public static IRemoteFileSubSystem getConnectedFileSubSystem(String hostNameOrAddr, String aliasName, IProgressMonitor monitor) throws CoreException
- {
- IHost con = RSEFileStoreImpl.getConnectionFor(hostNameOrAddr, aliasName, monitor);
- if (con == null) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- NLS.bind(Messages.CONNECTION_NOT_FOUND, hostNameOrAddr)));
- }
- IRemoteFileSubSystem subSys = RSEFileStoreImpl.getRemoteFileSubSystem(con);
- if (subSys == null) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- NLS.bind(Messages.NO_FILE_SUBSYSTEM, hostNameOrAddr, con.getAliasName())));
- }
- if (!subSys.isConnected()) {
- try {
- if (monitor==null) monitor=new NullProgressMonitor();
- subSys.connect(monitor, false);
- }
- catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- NLS.bind(Messages.COULD_NOT_CONNECT, hostNameOrAddr, subSys.getConfigurationId()), e));
- }
- }
- return subSys;
- }
-
- /**
- * Return the cached IRemoteFile handle. Used only as a handle into
- * ISubSystem operations, attributes of this handle are never considered
- * except for exists() checking.
- * @return
- */
- private IRemoteFile getCachedRemoteFile() {
- return _remoteFile;
- }
-
- private void cacheRemoteFile(IRemoteFile remoteFile) {
- //if (_remoteFile != remoteFile) _remoteFile = remoteFile;
- if (_remoteFile != null && _remoteFile != remoteFile) {
- _remoteFile.markStale(true);
- }
- _remoteFile = remoteFile;
- }
-
- /**
- * Returns an IRemoteFile for this file store.
- * Requires that the file subsystem is connected.
- * @param monitor progress monitor
- * @param forceExists if <code>true</code>, throw an exception if the remote file does not exist
- * @return an IRemoteFile for this file store
- * @throws CoreException if connecting is not possible.
- */
- private IRemoteFile getRemoteFileObject(IProgressMonitor monitor, boolean forceExists) throws CoreException {
- IRemoteFile remoteFile = getCachedRemoteFile();
- if (remoteFile!=null) {
- if (remoteFile.getParentRemoteFileSubSystem().isConnected()) {
- return remoteFile;
- } else {
- //need to re-initialize cache
- remoteFile=null;
- cacheRemoteFile(null);
- }
- }
-
- RSEFileStore parentStore = _store.getParentStore();
- if (parentStore!=null) {
- //Handle was created naming a parent file store
- IRemoteFile parent = parentStore.getImpl().getRemoteFileObject(monitor, forceExists);
- if (parent==null) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- Messages.COULD_NOT_GET_REMOTE_FILE));
- }
- try {
- remoteFile = parent.getParentRemoteFileSubSystem().getRemoteFileObject(parent, getName(), monitor);
- } catch(SystemMessageException e) {
- rethrowCoreException(e, EFS.ERROR_READ);
- }
- } else {
- //Handle was created with an absolute name
- String aliasName = _store.getAlias();
- String hostName = _store.getHost();
- IRemoteFileSubSystem subSys = RSEFileStoreImpl.getConnectedFileSubSystem(hostName, aliasName, monitor);
-
- try {
- remoteFile = subSys.getRemoteFileObject(_store.getAbsolutePath(), monitor);
- }
- catch (SystemMessageException e) {
- rethrowCoreException(e, EFS.ERROR_READ);
- }
- }
-
- cacheRemoteFile(remoteFile);
- if (forceExists && (remoteFile == null || !remoteFile.exists())) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- EFS.ERROR_NO_LOCATION,
- Messages.FILE_STORE_DOES_NOT_EXIST, null));
- }
- return remoteFile;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#childNames(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
-
- String[] names;
- IRemoteFile remoteFile = getRemoteFileObject(monitor, true);
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
- if (!remoteFile.isStale() && remoteFile.hasContents(RemoteChildrenContentsType.getInstance()) && !(subSys instanceof IFileServiceSubSystem))
- {
- 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 = null;
-
- if (subSys instanceof FileServiceSubSystem) {
- FileServiceSubSystem fileServiceSubSystem = ((FileServiceSubSystem)subSys);
- IHostFile[] results = fileServiceSubSystem.getFileService().list(remoteFile.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, monitor); //$NON-NLS-1$
- IRemoteFileSubSystemConfiguration config = subSys.getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
- filterString.setShowFiles(true);
- filterString.setShowSubDirs(true);
- RemoteFileContext context = new RemoteFileContext(subSys, remoteFile, filterString);
- children = fileServiceSubSystem.getHostFileToRemoteFileAdapter().convertToRemoteFiles(fileServiceSubSystem, context, remoteFile, results);
- }
- else {
- children = subSys.list(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];
- }
- }
-
- return names;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#childInfos(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
-
- FileInfo[] infos;
- IRemoteFile remoteFile = getRemoteFileObject(monitor, true);
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
- if (!remoteFile.isStale() && remoteFile.hasContents(RemoteChildrenContentsType.getInstance()) && !(subSys instanceof IFileServiceSubSystem))
- {
- Object[] children = remoteFile.getContents(RemoteChildrenContentsType.getInstance());
-
- infos = new FileInfo[children.length];
-
- for (int i = 0; i < children.length; i++)
- {
- IRemoteFile file = (IRemoteFile)(children[i]);
- FileInfo info = new FileInfo(file.getName());
-
- if (!file.exists()) {
- info.setExists(false);
- }
- else {
- info.setExists(true);
- info.setLastModified(file.getLastModified());
- boolean isDir = file.isDirectory();
- info.setDirectory(isDir);
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, !file.canWrite());
- info.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, file.isExecutable());
- info.setAttribute(EFS.ATTRIBUTE_ARCHIVE, file.isArchive());
- info.setAttribute(EFS.ATTRIBUTE_HIDDEN, file.isHidden());
-
- if (!isDir) {
- info.setLength(file.getLength());
- }
- }
-
- infos[i] = info;
- }
- }
- else
- {
- try {
-
- IRemoteFile[] children = null;
-
- if (subSys instanceof FileServiceSubSystem) {
- FileServiceSubSystem fileServiceSubSystem = ((FileServiceSubSystem)subSys);
- IHostFile[] results = fileServiceSubSystem.getFileService().list(remoteFile.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, monitor); //$NON-NLS-1$
- IRemoteFileSubSystemConfiguration config = subSys.getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString filterString = new RemoteFileFilterString(config, remoteFile.getAbsolutePath(), "*"); //$NON-NLS-1$
- filterString.setShowFiles(true);
- filterString.setShowSubDirs(true);
- RemoteFileContext context = new RemoteFileContext(subSys, remoteFile, filterString);
- children = fileServiceSubSystem.getHostFileToRemoteFileAdapter().convertToRemoteFiles(fileServiceSubSystem, context, remoteFile, results);
- }
- else {
- children = subSys.list(remoteFile, monitor);
- }
-
- infos = new FileInfo[children.length];
-
- for (int i = 0; i < children.length; i++)
- {
- IRemoteFile file = children[i];
- FileInfo info = new FileInfo(file.getName());
-
- if (!file.exists()) {
- info.setExists(false);
- }
- else {
- info.setExists(true);
- info.setLastModified(file.getLastModified());
- boolean isDir = file.isDirectory();
- info.setDirectory(isDir);
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, !file.canWrite());
- info.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, file.isExecutable());
- info.setAttribute(EFS.ATTRIBUTE_ARCHIVE, file.isArchive());
- info.setAttribute(EFS.ATTRIBUTE_HIDDEN, file.isHidden());
- //TODO Add symbolic link attribute
-
- if (!isDir) {
- info.setLength(file.getLength());
- }
- }
-
- infos[i] = info;
- }
- }
- catch (SystemMessageException e) {
- //TODO check whether we should not throw an exception ourselves
- infos = new FileInfo[0];
- }
- }
-
- return infos;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#fetchInfo(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
- long curTime = System.currentTimeMillis();
-
-
- // don't clear cache when there are several successive queries in a short time-span
- if (_lastFetch == 0 || ((curTime - _lastFetch) > _fetchWaitThreshold)){
- // clear cache in order to query latest info
- cacheRemoteFile(null);
- _lastFetch = curTime;
- }
-
- // connect if needed. Will throw exception if not successful.
- IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
- String classification = (remoteFile==null) ? null : remoteFile.getClassification();
-
- FileInfo info = new FileInfo(_store.getName());
- if (remoteFile == null || !remoteFile.exists()) {
- info.setExists(false);
- //broken symbolic link handling
- if (classification!=null && classification.startsWith("broken symbolic link")) { //$NON-NLS-1$
- info.setAttribute(EFS.ATTRIBUTE_SYMLINK, true);
- int i1 = classification.indexOf('\'');
- if (i1>0) {
- int i2 = classification.indexOf('´');
- if (i2>i1) {
- info.setStringAttribute(EFS.ATTRIBUTE_LINK_TARGET, classification.substring(i1+1,i2));
- }
- }
- }
- return info;
- }
-
- info.setExists(true);
- 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 (classification!=null && classification.startsWith("symbolic link")) { //$NON-NLS-1$
- info.setAttribute(EFS.ATTRIBUTE_SYMLINK, true);
- int idx = classification.indexOf(':');
- if (idx>0) {
- info.setStringAttribute(EFS.ATTRIBUTE_LINK_TARGET, classification.substring(idx+1));
- }
- }
-
- if (!isDir) {
- info.setLength(remoteFile.getLength());
- }
-
- return info;
- }
-
- /**
- * Return a message for logging, built from
- * @param item item where failure occurred
- * @param e exception
- * @return
- */
- private String getExceptionMessage(String item, Throwable e) {
- String exceptionText;
- if (e!=null) {
- if (e.getLocalizedMessage()!=null) {
- exceptionText = e.getLocalizedMessage();
- } else {
- exceptionText = e.getClass().getName();
- }
- } else {
- exceptionText = Messages.UNKNOWN_EXCEPTION;
- }
- if (item!=null && item.length()>0) {
- return exceptionText + ": " + item; //$NON-NLS-1$
- }
- return exceptionText;
- }
-
- /**
- * Re-interpret RSE internal exceptions into proper EFS CoreException.
- *
- * @param e Original exception from RSE SubSystems
- * @param codeHint hint as to what the EFS Error Code might be
- * @throws CoreException create CoreException according to EFS specification
- */
- private void rethrowCoreException(Exception e, int codeHint) throws CoreException {
- //default pluginId to the EFS provider; override by root if possible
- String pluginId = Activator.getDefault().getBundle().getSymbolicName();
- String msg = getExceptionMessage(toString(), e);
- int code = codeHint;
- if (e instanceof SystemElementNotFoundException) {
- code = EFS.ERROR_NOT_EXISTS;
- }
- throw new CoreException(new Status(IStatus.ERROR, pluginId, code, msg, e));
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#putInfo(org.eclipse.core.filesystem.IFileInfo, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
- // connect if needed. Will throw exception if not successful.
- IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
- try {
- if ((options & EFS.SET_ATTRIBUTES) != 0) {
- // We cannot currently write isExecutable(), isHidden()
- subSys.setReadOnly(remoteFile, info.getAttribute(EFS.ATTRIBUTE_READ_ONLY), monitor);
- }
- if ((options & EFS.SET_LAST_MODIFIED) != 0) {
- subSys.setLastModified(remoteFile, info.getLastModified(), monitor);
- }
- } catch (Exception e) {
- rethrowCoreException(e, EFS.ERROR_WRITE);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#openInputStream(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException
- {
- IRemoteFile remoteFile = getRemoteFileObject(monitor, true);
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
-
- if (remoteFile.isDirectory()) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- EFS.ERROR_WRONG_TYPE,
- Messages.CANNOT_OPEN_STREAM_ON_FOLDER, null));
- }
-
- if (remoteFile.isFile()) {
- try {
- cacheRemoteFile(null);
- return subSys.getInputStream(remoteFile.getParentPath(), remoteFile.getName(), true, monitor);
- }
- catch (SystemMessageException e) {
- cacheRemoteFile(null);
- rethrowCoreException(e, EFS.ERROR_READ);
- }
- }
-
- //file does not exist, apparently
- //TODO use Java MessageFormat for embedding filename in message
- throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(),
- // EFS.ERROR_NOT_EXISTS,
- EFS.ERROR_READ, Messages.FILE_STORE_DOES_NOT_EXIST + ": " + toString(), null)); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#mkdir(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException
- {
- cacheRemoteFile(null);
- IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
- if (remoteFile==null) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- EFS.ERROR_NOT_EXISTS,
- Messages.COULD_NOT_GET_REMOTE_FILE, null));
- }
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
- if (!remoteFile.exists()) {
- try {
- if ((options & EFS.SHALLOW) != 0) {
- //MUST NOT create parents, so we need to check ourselves
- //here according to IRemoteFileSubSystem.createFolder() docs
- if (!remoteFile.getParentRemoteFile().exists()) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- EFS.ERROR_WRITE,
- Messages.FILE_STORE_DOES_NOT_EXIST, null));
- }
- remoteFile = subSys.createFolder(remoteFile, monitor);
- } else {
- remoteFile = subSys.createFolders(remoteFile, monitor);
- }
- cacheRemoteFile(remoteFile);
- }
- catch (SystemMessageException e) {
- rethrowCoreException(e, EFS.ERROR_WRITE);
- }
- return _store;
- }
- else if (remoteFile.isFile()) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- EFS.ERROR_WRONG_TYPE,
- Messages.FILE_NAME_EXISTS, null));
- }
- else {
- return _store;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#openOutputStream(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
- cacheRemoteFile(null);
- IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
- if (remoteFile==null) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- Messages.COULD_NOT_GET_REMOTE_FILE));
- }
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
- if (!remoteFile.exists()) {
- try {
- remoteFile = subSys.createFile(remoteFile, monitor);
- cacheRemoteFile(remoteFile);
- }
- catch (SystemMessageException e) {
- rethrowCoreException(e, EFS.ERROR_WRITE);
- }
- }
-
- if (remoteFile.isFile()) {
- try {
- // Convert from EFS option constants to IFileService option constants
- if ((options & EFS.APPEND) != 0) {
- options = IFileService.APPEND;
- } else {
- options = IFileService.NONE;
- }
- cacheRemoteFile(null);
- return subSys.getOutputStream(remoteFile.getParentPath(), remoteFile.getName(), options, monitor);
- }
- catch (SystemMessageException e) {
- rethrowCoreException(e, EFS.ERROR_WRITE);
- }
- }
- else if (remoteFile.isDirectory()) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- EFS.ERROR_WRONG_TYPE,
- Messages.CANNOT_OPEN_STREAM_ON_FOLDER, null));
- }
- //Fallback: No file, no folder?
- //TODO check what to do for symbolic links and other strange stuff
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#delete(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void delete(int options, IProgressMonitor monitor) throws CoreException
- {
- IRemoteFile remoteFile = getRemoteFileObject(monitor, false);
- IRemoteFileSubSystem subSys = remoteFile.getParentRemoteFileSubSystem();
- try {
- cacheRemoteFile(null);
- subSys.delete(remoteFile, monitor);
- }
- catch (SystemElementNotFoundException e) {
- /* not considered an error by EFS -- ignore */
- }
- catch (SystemMessageException e) {
- rethrowCoreException(e, EFS.ERROR_DELETE);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java
deleted file mode 100644
index 9d9f4aebe..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileSystem.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Kushal Munir (IBM) - moved to internal package
- * Martin Oberhuber (Wind River) - [181917] EFS Improvements: Avoid unclosed Streams,
- * - Fix early startup issues by deferring FileStore evaluation and classloading,
- * - Improve performance by RSEFileStore instance factory and caching IRemoteFile.
- * - Also remove unnecessary class RSEFileCache and obsolete branding files.
- * Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
- * Martin Oberhuber (Wind River) - [199587] return attributes of RSEFileSystem
- * David McKnight (IBM) - [287185] EFS provider should interpret the URL host component as RSE connection name rather than a hostname
- ********************************************************************************/
-
-package org.eclipse.rse.internal.efs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileSystem;
-
-public class RSEFileSystem extends FileSystem
-{
- private static RSEFileSystem _instance = new RSEFileSystem();
-
- /**
- * Default constructor.
- */
- public RSEFileSystem() {
- super();
- }
-
- /**
- * Return the singleton instance of this file system.
- * @return the singleton instance of this file system.
- */
- public static RSEFileSystem getInstance() {
- return _instance;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileSystem#attributes()
- */
- public int attributes() {
- //Attributes supported by RSE IFileService
- return EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE
- | EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileSystem#canDelete()
- */
- public boolean canDelete() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileSystem#canWrite()
- */
- public boolean canWrite() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileSystem#getStore(java.net.URI)
- */
- public IFileStore getStore(URI uri) {
- try {
- return RSEFileStore.getInstance(uri);
- }
- catch (Exception e) {
- //Could be an URI format exception
- return EFS.getNullFileSystem().getStore(uri);
- }
- }
-
- /**
- * Return an URI uniquely naming an RSE remote resource.
- * @param hostNameOrAddr host name or IP address of remote system
- * @param absolutePath absolute path to resource as valid on the remote system
- * @return an URI uniquely naming the remote resource.
- */
- public static URI getURIFor(String hostNameOrAddr, String absolutePath) {
- //FIXME backslashes are valid in UNIX file names. This is not correctly handled yet.
- if (absolutePath.charAt(0) != '/') {
- absolutePath = "/" + absolutePath.replace('\\', '/'); //$NON-NLS-1$
- }
- try {
- return new URI("rse", hostNameOrAddr, absolutePath, null); //$NON-NLS-1$
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Return an URI uniquely naming an RSE remote resource.
- * @param hostNameOrAddr host name or IP address of remote system
- * @param absolutePath absolute path to resource as valid on the remote system
- * @param alias the alias name for the connection
- * @return an URI uniquely naming the remote resource.
- */
- public static URI getURIFor(String hostNameOrAddr, String absolutePath, String alias) {
- //FIXME backslashes are valid in UNIX file names. This is not correctly handled yet.
- if (absolutePath.charAt(0) != '/') {
- absolutePath = "/" + absolutePath.replace('\\', '/'); //$NON-NLS-1$
- }
- try {
- return new URI("rse", hostNameOrAddr, absolutePath, alias, null); //$NON-NLS-1$
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException(e);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java
deleted file mode 100644
index 47263e114..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RemoteEditorManager.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Mike Kucera.
- *
- * Contributors:
- * Mike Kucera (IBM) - [241316] [efs] Cannot restore editors for RSE/EFS-backed resources
- * David McKnight (IBM) - [241316] [efs] Cannot restore editors for RSE/EFS-backed resources
- * David McKnight (IBM) - [291738] [efs] repeated queries to RSEFileStoreImpl.fetchInfo() in short time-span should be reduced
- ********************************************************************************/
-package org.eclipse.rse.internal.efs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-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.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchListener;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.progress.UIJob;
-
-public class RemoteEditorManager implements ISaveParticipant, IResourceChangeListener, IWorkbenchListener {
- public static final String PREFERENCE_EDITOR_LIST = "org.eclipse.rse.internal.efs.EditorSaver.preferenceEditorList"; //$NON-NLS-1$
-
- private static RemoteEditorManager defaultInstance;
-
- private Map projectNameToUriMap = null;
-
- private RemoteEditorManager() {}
-
- public static synchronized RemoteEditorManager getDefault() {
- if(defaultInstance == null)
- defaultInstance = new RemoteEditorManager();
- return defaultInstance;
- }
-
-
- /**
- * Restores remote editors when a remote project is opened.
- */
- public void resourceChanged(IResourceChangeEvent event) {
- String pref = RSEUIPlugin.getDefault().getPreferenceStore().getString(PREFERENCE_EDITOR_LIST);
- Map projectNameToUriMap = getProjectNameToUriMap(pref);
- if(projectNameToUriMap.isEmpty())
- return;
-
- IResourceDelta[] children = event.getDelta().getAffectedChildren();
- for(int i = 0; i < children.length; i++) {
- IResourceDelta delta = children[i];
-
- // if a project has just been opened
- if((delta.getFlags() & IResourceDelta.OPEN) != 0) {
- IProject project = delta.getResource().getProject();
- if(project.isOpen()) {
-
- // restore remote editors for the project
- List uris = (List) projectNameToUriMap.remove(project.getName());
- if(uris != null) {
- for(Iterator iter = uris.iterator(); iter.hasNext();) {
- final String uriString = (String) iter.next();
-
- Job job = new UIJob("Restore Remote Editor") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if(monitor.isCanceled())
- return Status.OK_STATUS;
-
- try {
- // got this code from http://wiki.eclipse.org/FAQ_How_do_I_open_an_editor_programmatically%3F
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IFileStore fileStore = EFS.getStore(new URI(uriString));
- IDE.openEditorOnFileStore(page, fileStore);
- } catch (URISyntaxException e) {
- return Activator.errorStatus(e);
- } catch (PartInitException e) {
- return Activator.errorStatus(e);
- } catch (CoreException e) {
- return Activator.errorStatus(e);
- }
- return Status.OK_STATUS;
- }
- };
- job.schedule();
-
- }
- }
- }
- }
- }
-
- }
-
- /**
- * Saves the URIs of remote resources that are open in editors into the
- * plugin's preference store.
- */
- public synchronized void saveRemoteEditors() {
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
- if(windows.length > 0) {
- String list = generateEditorList();
- RSEUIPlugin.getDefault().getPreferenceStore().putValue(PREFERENCE_EDITOR_LIST, list);
- }
- projectNameToUriMap = null;
- }
-
- private Map getProjectNameToUriMap(String raw) {
- if(projectNameToUriMap == null) {
- projectNameToUriMap = new HashMap();
-
- if(raw == null || raw.length() == 0)
- return projectNameToUriMap;
-
- int index = 0;
- while(true) {
- int i = raw.indexOf(IPath.SEPARATOR, index);
- if(i < 0) break;
- String projectName = raw.substring(index, i);
- index = i + 1;
- i = raw.indexOf(' ', index);
- if(i < 0) break;
- String uriString = raw.substring(index, i);
- index = i + 1;
-
- List uris = (List) projectNameToUriMap.get(projectName);
- if(uris == null) {
- uris = new LinkedList();
- projectNameToUriMap.put(projectName, uris);
- }
- uris.add(uriString);
- }
- }
- return projectNameToUriMap;
- }
-
-
- private String generateEditorList() {
- final StringBuffer sb = new StringBuffer();
-
- forEachOpenRemoteEditor(new IEditorCallback() {
- public void apply(IWorkbenchPage page, IEditorPart editor, IFile file) {
- IProject project = file.getProject();
- URI uri = file.getLocationURI();
- sb.append(project.getName());
- sb.append(IPath.SEPARATOR); // not allowed in resource names
- sb.append(uri);
- sb.append(' '); // not allowed in URIs
- }
- });
-
- return sb.toString();
- }
-
-
- private static interface IEditorCallback {
- public void apply(IWorkbenchPage page, IEditorPart editor, IFile file);
- }
-
- private static void forEachOpenRemoteEditor(IEditorCallback callback) {
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
- for (int w = 0; w < windows.length; w++){
- IWorkbenchWindow win = windows[w];
- IWorkbenchPage[] pages = win.getPages();
- for (int p = 0; p < pages.length; p++){
- IWorkbenchPage page = pages[p];
- IEditorReference[] activeReferences = page.getEditorReferences();
- for (int er = 0; er < activeReferences.length; er++){
- IEditorReference editorReference = activeReferences[er];
-
- try {
- IEditorInput input = editorReference.getEditorInput();
- if (input instanceof FileEditorInput){
- IFile file = ((FileEditorInput)input).getFile();
- URI uri = file.getLocationURI();
- if (uri != null && uri.getScheme() != null){
- if ("rse".equals(uri.getScheme())) { //$NON-NLS-1$
- IEditorPart editor = editorReference.getEditor(false);
- callback.apply(page, editor, file);
- }
- }
- }
- } catch (PartInitException e){
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- /**
- * Close each editor that is open for any file that uses "rse" as it's uri scheme
- * @return true if successful, false otherwise
- */
- public boolean closeRemoteEditors() {
- boolean result = true;
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
- for (int w = 0; w < windows.length; w++){
- IWorkbenchWindow win = windows[w];
- IWorkbenchPage[] pages = win.getPages();
- for (int p = 0; p < pages.length && result; p++){
- IWorkbenchPage page = pages[p];
- IEditorReference[] activeReferences = page.getEditorReferences();
- for (int er = 0; er < activeReferences.length; er++){
- IEditorReference editorReference = activeReferences[er];
-
- try {
- IEditorInput input = editorReference.getEditorInput();
- if (input instanceof FileEditorInput){
- IFile file = ((FileEditorInput)input).getFile();
- URI uri = file.getLocationURI();
- if ("rse".equals(uri.getScheme())) { //$NON-NLS-1$
- IEditorPart editor = editorReference.getEditor(false);
-
- // close the editor
- result = page.closeEditor(editor, true);
- }
- }
- } catch (PartInitException e){
- e.printStackTrace();
- }
- }
- }
- }
- return result;
- }
-
-
- public void saving(ISaveContext context) throws CoreException {
- saveRemoteEditors();
- }
-
-
- public void doneSaving(ISaveContext context) {
- }
-
- public void prepareToSave(ISaveContext context) throws CoreException {
- }
-
- public void rollback(ISaveContext context) {
- }
-
-
- // for IWorkbenchListener
- public void postShutdown(IWorkbench workbench) {
- }
-
- // for IWorkbenchListener
- public boolean preShutdown(IWorkbench workbench, boolean forced) {
- saveRemoteEditors();
- return closeRemoteEditors();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/messages.properties b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/messages.properties
deleted file mode 100644
index d132a6f83..000000000
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/messages.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2008 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:
-# Kevin Doyle (IBM) - [210628] Externalize Strings in RSEFileStore and RSEFileStoreImpl
-# Xuan Chen (IBM) - added NLS_MESSAGEFORMAT comments
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESOURCES_NOT_LOADED=Cannot access file: Resources not loaded yet
-CONNECTION_NOT_FOUND=Connection not found for host: {0}
-NO_FILE_SUBSYSTEM=No file subsystem found on host: {0} connection {1}
-COULD_NOT_CONNECT=Could not connect to host: {0} subsystem {1}
-COULD_NOT_GET_REMOTE_FILE=Could not get remote file
-FILE_STORE_DOES_NOT_EXIST=The file store does not exist
-UNKNOWN_EXCEPTION=Unknown exception
-FILE_NAME_EXISTS=A file of that name already exists
-CANNOT_OPEN_STREAM_ON_FOLDER=Can't open a stream on a folder
-DELETE_FAILED=Could not delete file \ 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 e831f3aba..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/rse/**"/>
- <accessrule kind="discouraged" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <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.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 0ff14a415..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.files.ui/.settings/.api_filters b/rse/plugins/org.eclipse.rse.files.ui/.settings/.api_filters
deleted file mode 100644
index 4e9ac5857..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.settings/.api_filters
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.files.ui" version="2">
- <resource path="src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java" type="org.eclipse.rse.internal.files.ui.view.SystemViewRemoteFileAdapter">
- <filter id="642777099">
- <message_arguments>
- <message_argument value="AbstractSystemViewAdapter"/>
- <message_argument value="SystemViewRemoteFileAdapter"/>
- <message_argument value="getUniquePropertyDescriptors()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java" type="org.eclipse.rse.internal.files.ui.view.SystemViewRemoteSearchResultAdapter">
- <filter id="642777099">
- <message_arguments>
- <message_argument value="AbstractSystemViewAdapter"/>
- <message_argument value="SystemViewRemoteSearchResultAdapter"/>
- <message_argument value="getUniquePropertyDescriptors()"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java" type="org.eclipse.rse.internal.files.ui.propertypages.UniversalPreferencePage">
- <filter id="572522506">
- <message_arguments>
- <message_argument value="SystemFileTransferModeMapping"/>
- <message_argument value="UniversalPreferencePage"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 6851533f2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,41 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.files.ui;singleton:=true
-Bundle-Version: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.files.ui.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- 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;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-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.resources,
- org.eclipse.rse.files.ui.widgets,
- org.eclipse.rse.internal.files.ui;x-internal:=true,
- org.eclipse.rse.internal.files.ui.actions;x-internal:=true,
- org.eclipse.rse.internal.files.ui.dialogs;x-internal:=true,
- org.eclipse.rse.internal.files.ui.propertypages;x-internal:=true,
- org.eclipse.rse.internal.files.ui.resources;x-internal:=true,
- org.eclipse.rse.internal.files.ui.search;x-internal:=true,
- org.eclipse.rse.internal.files.ui.view;x-internal:=true,
- org.eclipse.rse.internal.files.ui.widgets;x-internal:=true,
- org.eclipse.rse.internal.files.ui.wizards;x-internal:=true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Import-Package: com.ibm.icu.text
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 d4cc693f9..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 5, 2007</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 d57294b41..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.files.ui/icons/full/elcl16/synced.gif b/rse/plugins/org.eclipse.rse.files.ui/icons/full/elcl16/synced.gif
deleted file mode 100644
index 870934b69..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/icons/full/elcl16/synced.gif
+++ /dev/null
Binary files differ
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/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 860495a5f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/plugin.properties
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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:
-# Willian Mitsuda - [184824] added a Remote action set item
-# David McKnight (IBM) - [187711] Link with Editor action for System View
-# David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
-# David McKnight (IBM) - [218227][usability] Contribute a "Show in RSE" action to Resource Navigator and Project Explorer
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Files UI
-providerName = Eclipse.org - DSDP
-
-PreferencePage.UniversalFiles = Files
-PreferencePage.Cache = File Cache
-
-RemotePropertyPage.File.Info = Info
-RemotePropertyPage.File.Permissions = Permissions
-
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-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
-
-# Actions
-synchronizeCache.label=Synchronize Cache
-synchronizeCache.tooltip=Refresh changed files in the Remote System Explorer file cache.
-Search.Page = Remote Search
-searchMenu.label = Se&arch
-Remote.ActionSet = Remote...
-Remote.Search = &Remote...
-Remote.Search.tooltip = Opens Remote Search dialog page for text and file searching on remote systems
-
-LinkWithSystemView.label = Link with Editor
-
-# Show in RSE View
-ShowInRSEView.label = Show in Remote Systems view
-ShowInRSEView.tooltip = Display the selected resource in the Remote Systems view
-
-
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 356216287..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/plugin.xml
+++ /dev/null
@@ -1,501 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2009 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) - [180519] declaratively register adapter factories
-Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
-Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
-David McKnight (IBM) - [187711] Link with Editor action for System View
-David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
-Johnson Ma (Wind River) - [195402] Add tar.gz archive support
-David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
-David McKnight (IBM) - [218227][usability] Contribute a "Show in RSE" action to Resource Navigator and Project Explorer
--->
-<?eclipse version="3.0"?>
-<plugin>
-
-<!-- ============================================ -->
-<!-- Register Adapter Factories -->
-<!-- ============================================ -->
-
- <extension point="org.eclipse.core.runtime.adapters">
- <!-- Remote Files -->
- <factory
- class="org.eclipse.rse.internal.files.ui.view.SystemViewFileAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <!-- all adapter types which are subject to getAdapter() need to be registered! -->
- <!-- just having it in AdapterFactory#getAdapterList() is not sufficient. -->
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- -->
- </factory>
- <!-- SearchResultSet -->
- <factory
- class="org.eclipse.rse.internal.files.ui.view.SystemViewSearchResultSetAdapterFactory"
- adaptableType="org.eclipse.rse.services.search.IHostSearchResultSet">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoveElementAdapter"/>
- -->
- </factory>
- <!-- SearchResult -->
- <factory
- class="org.eclipse.rse.internal.files.ui.view.SystemViewSearchResultAdapterFactory"
- adaptableType="org.eclipse.rse.services.search.IHostSearchResult">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- -->
- </factory>
- <!-- SubSystemConfiguration -->
- <factory
- class="org.eclipse.rse.internal.files.ui.view.RemoteFileSubSystemConfigurationAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration">
- <adapter type="org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter"/>
- </factory>
- </extension>
-
-<!-- ============================================ -->
-<!-- Define Files Preference Pages -->
-<!-- ============================================ -->
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PreferencePage.UniversalFiles"
- category="org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"
- class="org.eclipse.rse.internal.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.internal.files.ui.propertypages.SystemCachePreferencePage"
- id="org.eclipse.rse.core.ui.preferences.SystemCachePreferencePage">
- </page>
- </extension>
-
-
-<!-- ============================================ -->
-<!-- Define Remote Object Properties Pages -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%RemotePropertyPage.File.Info"
- class="org.eclipse.rse.internal.files.ui.propertypages.SystemFilePropertyPage"
- id="org.eclipse.rse.files.PropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- </enabledWhen>
- </page>
- <page
- name="%RemotePropertyPage.File.Permissions"
- class="org.eclipse.rse.internal.files.ui.propertypages.SystemFilePermissionsPropertyPage"
- id="org.eclipse.rse.files.PermissionsPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
- </enabledWhen>
- <filter name="supportspermissions" value="true"/>
-
- </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
- name="%PropertyPage.ServerLauncherSettings"
- class="org.eclipse.rse.internal.ui.propertypages.ServerLauncherPropertyPage"
- id="org.eclipse.rse.ui.propertypages.ServerLauncherPropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem"/>
- </enabledWhen>
- </page>
-
-
- <page
- name="%PropertyPage.Service"
- class="org.eclipse.rse.internal.files.ui.propertypages.FileServicesPropertyPage"
- id="org.eclipse.rse.files.ui.propertypages.FileServicesPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem"/>
- </enabledWhen>
- </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.internal.files.ui.search.SystemSearchPage"
- sizeHint="250,160"
- id="org.eclipse.rse.internal.files.ui.search.searchPage">
- </page>
- </extension>
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%Remote.ActionSet"
- 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.internal.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.services.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.gz"
- name="SystemTargzHandler"
- class="org.eclipse.rse.services.clientserver.archiveutils.SystemTgzHandler"
- id="org.eclipse.rse.services.clientserver.archiveutils.systemtargzhandler">
- </archivehandler>
- <archivehandler
- fileNameExtension="tgz"
- name="SystemTgzHandler"
- class="org.eclipse.rse.services.clientserver.archiveutils.SystemTgzHandler"
- id="org.eclipse.rse.services.clientserver.archiveutils.systemtgzhandler">
- </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.internal.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>
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"
- id="org.eclipse.rse.files.ui.actions.synchronizeCache">
- <visibility>
- <objectState name="isdirectory" value="true"/>
- </visibility>
- <action
- label="%synchronizeCache.label"
- tooltip="%synchronizeCache.tooltip"
- class="org.eclipse.rse.internal.files.ui.actions.SynchronizeCacheActionDelegate"
- menubarPath="group.importexport"
- id="synchronizeCache">
- <enablement>
- <objectState name="offline" value="false"/>
- </enablement>
- </action>
- </objectContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.viewActions">
- <viewContribution
- targetID="org.eclipse.rse.ui.view.systemView"
- id="org.eclipse.rse.ui.view.systemView.toolbar">
- <action
- id="org.eclipse.rse.ui.view.systemView.toolbar.linkWithSystemView"
- toolbarPath="navigationGroup"
- class="org.eclipse.rse.internal.files.ui.actions.LinkWithSystemViewAction"
- icon="$nl$/icons/full/elcl16/synced.gif"
- style="toggle"
- helpContextId="link_editor_with_system_view_action_context"
- label="%LinkWithSystemView.label">
- </action>
- </viewContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- id="org.eclipse.rse.ui.ShowResourceInSystemsView">
- <action id="org.eclipse.rse.ui.ShowResourceInSystemsViewAction"
- label="%ShowInRSEView.label"
- tooltip="%ShowInRSEView.tooltip"
- class="org.eclipse.rse.internal.files.ui.actions.ShowResourceInSystemsViewDelegate">
- menubarPath="group.goto"
- enablesFor="1"
- id="showResourceInSystemsView">
- </action>
- </objectContribution>
- </extension>
-</plugin>
- \ 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/ISystemFileMessages.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java
deleted file mode 100644
index f71ac25b6..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/ISystemFileMessages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.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"; //$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$
-}
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 69e6b557e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFileAction.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Xuan Chen (IBM) - [220999] [api] Need to change class SystemSelectRemoteFileAction to use SystemRemoteFileDialog
- * Xuan Chen (IBM) - [220999] [api] [breaking] Also need to remove unnecessary APIs
- * Xuan Chen (IBM) - [231346] [api][regression] No longer able to restrict selection to files only in SystemSelectRemoteFileAction
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.ui.SystemActionViewerFilter;
-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.ISystemRemoteElementAdapter;
-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(IRSESystemType)} or {@link #setSystemTypes(IRSESystemType[])}
- * <li>{@link #setRootFolder(IHost, String)} or {@link #setRootFolder(IRemoteFile)} or {@link #setPreSelection(IRemoteFile)}
- * <li>{@link #setShowPropertySheet(boolean)} or {@link #setShowPropertySheet(boolean,boolean)}
- * <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 IRSESystemType[] systemTypes;
- private IHost systemConnection, outputConnection;
- private IHost rootFolderConnection;
- private IRemoteFile preSelection;
- private String rootFolderAbsPath;
- private String message, treeTip, dlgTitle;
- private boolean showNewConnectionPrompt = true;
- private boolean showPropertySheet = false;
- private boolean showPropertySheetDetailsButtonInitialState;
- private boolean showPropertySheetDetailsButton = false;
- private boolean multipleSelectionMode = false;
- private boolean onlyConnection = false;
- private IValidatorRemoteSelection clientProvidedSelectionValidator = null;
- private List viewerFilters = new ArrayList();
- private SystemActionViewerFilter customViewerFilter = null;
- private boolean allowFolderSelection = true;
-
- static class RemoteFileSelectionValidator implements IValidatorRemoteSelection
- {
- private boolean allowFolderSelect = true;
- private IValidatorRemoteSelection previousInChain = null;
- public RemoteFileSelectionValidator(boolean allowFolderSelection, IValidatorRemoteSelection previousInChain)
- {
- super();
- this.allowFolderSelect = allowFolderSelection;
- this.previousInChain = previousInChain;
- }
-
- /**
- * 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.
- SimpleSystemMessage msg = null;
-
- if (selectedObjects == null || selectedObjects.length == 0)
- {
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IStatus.INFO,
- FileResources.MSG_MAKE_SELECTION);
- return msg;
- }
-
- if (allowFolderSelect == true)
- {
- if (previousInChain != null)
- {
- return previousInChain.isValid(selectedConnection, selectedObjects, remoteAdaptersForSelectedObjects);
- }
- else
- {
- return null;
- }
- }
-
- for (int i = 0; i < selectedObjects.length; i++)
- {
- if (selectedObjects[i] instanceof IRemoteFile)
- {
- IRemoteFile selectedFile = (IRemoteFile)selectedObjects[i];
- if (selectedFile != null && selectedFile.isDirectory()) {
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IStatus.INFO,
- FileResources.MSG_SELECT_FOLDER_NOT_VALID);
- return msg;
- }
- }
- }
-
- if (previousInChain != null)
- {
- return previousInChain.isValid(selectedConnection, selectedObjects, remoteAdaptersForSelectedObjects);
- }
-
- return null;
- }
-
- }
- /**
- * 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 string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- */
- 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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
-
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new IRSESystemType[] {systemType})
- *
- * @param systemType The name of the system type to restrict to, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemType(IRSESystemType systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new IRSESystemType[] {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;
- }
-
- /**
- * 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;
-
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(rootFolderConnection);
- if (ss != null)
- {
- try
- {
- IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath, new NullProgressMonitor());
- if (rootFolder != null)
- {
- setPreSelection(rootFolder);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- onlyConnection = true;
- }
- /**
- * 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.getHost(),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;
- }
-
- /**
- * 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.clientProvidedSelectionValidator = 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 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;
- }
- return null;
- }
-
- /**
- * 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
- return null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- /**
- * @since 3.0
- */
- public void setCustomViewerFilter(SystemActionViewerFilter filter)
- {
- customViewerFilter = filter;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- /**
- * Called by eclipse when user selects this action
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemRemoteFileDialog dlg = null;
- if (dlgTitle == null)
- dlg = new SystemRemoteFileDialog(shell);
- else
- dlg = new SystemRemoteFileDialog(shell, dlgTitle);
-
-
- dlg.setMultipleSelectionMode(multipleSelectionMode);
- dlg.setShowNewConnectionPrompt(showNewConnectionPrompt);
-
- if (systemConnection != null)
- {
- dlg.setDefaultSystemConnection(systemConnection, onlyConnection);
- }
- dlg.setCustomViewerFilter(customViewerFilter);
-
- 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 (preSelection != null)
- dlg.setPreSelection(preSelection);
-
- 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);
- */
- IValidatorRemoteSelection selectionValidator = new RemoteFileSelectionValidator(allowFolderSelection, clientProvidedSelectionValidator);
-
- 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)
- {
- 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
- }
-
- /**
- * 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 097f3b733..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/actions/SystemSelectRemoteFolderAction.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Xuan Chen (IBM) - [220995] [api] Need to add setCustomViewFilter API to SystemSelectRemoteFileAction
- * Xuan Chen (IBM) - [220995] [api] Need to remove unnecessary APIs.
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.actions;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
-import org.eclipse.rse.internal.files.ui.FileResources;
-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.SystemActionViewerFilter;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
-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(IRSESystemType)} or {@link #setSystemTypes(IRSESystemType[])}
- * <li>{@link #setShowPropertySheet(boolean)}
- * <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 IRSESystemType[] systemTypes;
- private boolean foldersOnly = false;
- private IHost systemConnection, outputConnection;
- private IHost rootFolderConnection;
- private IRemoteFile preSelection;
- private String rootFolderAbsPath;
- private String message, treeTip, dlgTitle;
- private boolean showNewConnectionPrompt = true;
- 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 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 string to display in menu or toolbar
- * @param tooltip string to display when user hovers mouse over action.
- */
- 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;
- }
-
- public void setFoldersOnly(boolean flag)
- {
- this.foldersOnly = flag;
- }
-
- /**
- * 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(IRSESystemType[] 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,
- * or <code>null</code> to allow all valid system types.
- * A system type is valid if at least one subsystem
- * configuration is registered against it.
- */
- public void setSystemType(IRSESystemType systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new IRSESystemType[] {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;
- }
-
- /**
- * 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;
-
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(rootFolderConnection);
- if (ss != null)
- {
- try
- {
- IRemoteFile rootFolder = ss.getRemoteFileObject(rootFolderAbsPath, new NullProgressMonitor());
- if (rootFolder != null)
- {
- setPreSelection(rootFolder);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- 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.getHost(),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;
- }
-
- /**
- * 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;
- }
-
- /**
- * 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 null;
- }
-
- /**
- * Return selected connection
- */
- public IHost getSelectedConnection()
- {
- return outputConnection;
- }
-
- /**
- * @since 3.0
- */
- public void setCustomViewerFilter(SystemActionViewerFilter filter)
- {
- customViewerFilter = filter;
- }
-
- // -------------------
- // INTERNAL METHODS...
- // -------------------
-
- /**
- * Called by eclipse when user selects this action
- */
- protected Dialog createDialog(Shell shell)
- {
- SystemRemoteResourceDialog dlg = null;
- if (foldersOnly)
- {
- if (dlgTitle == null)
- {
- dlg = new SystemRemoteFolderDialog(shell);
- }
- else
- {
- dlg = new SystemRemoteFolderDialog(shell, dlgTitle);
- }
- }
- else
- {
- if (dlgTitle == null)
- {
- dlg = new SystemRemoteFileDialog(shell);
- }
- else
- {
- dlg = new SystemRemoteFileDialog(shell, dlgTitle);
- }
- }
- dlg.setMultipleSelectionMode(multipleSelectionMode);
- if (systemConnection != null)
- {
- dlg.setDefaultSystemConnection(systemConnection, onlyConnection);
- }
- dlg.setCustomViewerFilter(customViewerFilter);
-
- /*
- 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 (systemConnection != null)
- {
- if (onlyConnection)
- dlg.setSystemConnection(systemConnection);
- else
- dlg.setDefaultConnection(systemConnection);
- }
- */
-
- if (message != null)
- dlg.setMessage(message);
- if (treeTip != null)
- dlg.setSelectionTreeToolTipText(treeTip);
-
- 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)
- {
- 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
- }
-
-} \ 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 c8c00f3ab..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/compare/SystemCompareInput.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128][refactoring] Move IProgressMonitor last in public base classes
- *******************************************************************************/
-
-package org.eclipse.rse.files.ui.compare;
-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.osgi.util.NLS;
-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 = NLS.bind(format, _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((DiffNode) fRoot, pm);
- }
- finally
- {
- if (_diffViewer != null)
- _diffViewer.refresh();
- setDirty(false);
- }
- }
-
- }
-
- /*
- * Recursively walks the diff tree and commits all changes.
- */
- private void commit(DiffNode node, IProgressMonitor pm) 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((DiffNode) element, pm);
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/FileDialogFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/FileDialogFactory.java
deleted file mode 100644
index e3934896b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/FileDialogFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [225506] initial contribution
- * Martin Oberhuber (Wind River) - [225506] Adding Javadoc
- *********************************************************************************/
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.internal.files.ui.dialogs.SaveAsDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Utility class with factory methods for creating some RSE Standard Dialogs,
- * for working with remote files.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since org.eclipse.rse.files.ui 3.0
- */
-public class FileDialogFactory {
-
- /**
- * Create an ISaveAsDialog instance with the given title, initialized for
- * selecting a file to save to.
- *
- * @param shell parent shell for the dialog
- * @param title title for the dialog
- * @return New ISaveAsDialog instance
- */
- public static ISaveAsDialog makeSaveAsDialog(Shell shell, String title)
- {
- return new SaveAsDialog(shell, title);
- }
-
- /**
- * Create an ISaveAsDialog instance, initialized for selecting a folder to
- * save to. The dialog title will be a standard title ("Browse for Folder").
- *
- * @param shell parent shell for the dialog
- * @return new ISaveAsDialog instance
- */
- public static ISaveAsDialog makeSaveAsDialog(Shell shell)
- {
- return new SaveAsDialog(shell);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/ISaveAsDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/ISaveAsDialog.java
deleted file mode 100644
index 3b6915042..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/ISaveAsDialog.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.files.ui.dialogs;
-
-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);
-
-}
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 c627f7cf8..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemPromptForHomeFolderDialog.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.internal.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;
- }
-
-
-}
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 0e12acfd9..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, 2007 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) - [190442] made SystemActionViewerFilter API
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.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 getVerbiage()
- {
- return SystemFileResources.RESID_SELECTFILE_VERBIAGE;
- }
-
- 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 9ecdd94d2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/dialogs/SystemRemoteFileDialog.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Kevin Doyle (IBM) - Added Double Click Listener that closes dialog on file double click
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.files.ui.view.SystemRemoteFileSelectionInputProvider;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-import org.eclipse.rse.ui.dialogs.SystemRemoteResourceDialog;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-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 getVerbiage()
- {
- return SystemFileResources.RESID_SELECTFILE_VERBIAGE;
- }
-
- public String getTreeTip()
- {
- return SystemFileResources.RESID_SELECTFILE_SELECT_TOOLTIP;
- }
-
- public SystemActionViewerFilter getViewerFilter()
- {
- return null;
- }
-
- /**
- * Override of parent.
- */
- protected Control createContents(Composite parent)
- {
- Control control = super.createContents(parent);
- getSystemTree().addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
- return control;
- }
-
- /**
- * Handles double clicks in viewer.
- * Closes the dialog if a file is double clicked
- */
- protected void handleDoubleClick(DoubleClickEvent event)
- {
- ISystemTree tree = getSystemTree();
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
- if (isPageComplete() && !tree.isExpandable(element))
- {
- setReturnCode(OK);
- if (processOK())
- {
- okPressed = true;
- close();
- }
- }
- }
-}
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 3ab3eb045..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, 2007 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) - [190442] made SystemActionViewerFilter API
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.dialogs;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.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 getVerbiage()
- {
- return SystemFileResources.RESID_SELECTDIRECTORY_VERBIAGE;
- }
-
- 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/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 c31ae8366..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemMountPathMapper.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [195285] mount path mapper changes
- *******************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * This interface is used to provide a common way of mapping mounted resources to the temp files project.
- * Since local (or remote) mounts can change or be removed (i.e. disconnected) this provides a way for a vendor to
- * remap a particular resource if the vendor software is able to determine the new mount location.
- *
- * There are a number of use cases where a customized workspace mapping would be desirable:
- * <ul>
- * <li>Two connections to the same host using different user IDs for each connection. In that case, it may make
- * sense to store the temp files differently for each connection (for example, qualified by user ID).
- * <li>If port-forwarding is used then a port could be used to qualify the temp file path.
- * <li>If the remote path contains invalid characters for the local file system, then the temp file mapping could
- * be made such that invalid characters ( e.g. :<>?* on Windows) translate to a sequence of valid characters on the client.
- * </ul>
- *
- *
- * Implementors of this interface should register their mappers via the mountPathMappers extension point.
- */
-public interface ISystemMountPathMapper
-{
-
-
- /**
- * Returns the qualified workspace path for a replica of this mounted file. Since the
- * system path is not unique for mounted files, this allows a vendor 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 file subsystem
- * @param subsystem the remote file subsystem. User the subsystem to customize how the temp file is located. If null
- * is specified, then the subsystem is not used in determining the mapping
- * @return the corresponding workspace replica mapping
- * @since 3.0
- */
- public String getWorkspaceMappingFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem);
-
-
-
- /**
- * Returns the corresponding hostname for the specified path on the specified host. If a file is mounted
- * 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. If the file is remote (i.e. not locally mounted) then
- * this will return the same as the hostname 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 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. Vendors
- * 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);
-
- /**
- * Indicates whether this mapper handles remapping of the specified resource. If more than one mount
- * path mapper returns true for this, then the getPriority() method will be used to determine precedence.
- * @param hostname the remote host
- * @param remotePath the remote path as seen by the file subsystem
- * @param subsystem the remote file subsystem
- * @return whether this mapper handles remapping of the specified remote resource
- * @since 3.0
- */
- public boolean handlesMappingFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem);
-
-
- /**
- *
- * Returns the priority of this mount path mapper. This is used to determine which mount
- * path mapper to use when more than one are applicable. The lower the return value, the
- * higher priority.
- *
- * @param hostname the host name for the file system
- * @param remotePath the path on the remote file system
- * @param subsystem the subsystem used to retrieve files
- *
- * @return the priority, where the lower in value, the higher the priority.
- * @since 3.0
- */
- int getPriority(String hostname, String remotePath, IRemoteFileSubSystem subsystem);
-}
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 64a10f867..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteEditResourceManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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 key remote path to use as a key
- * @param editObj 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 key 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();
-}
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 783e597e4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteManager.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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 monitor 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 monitor progress monitor for long running operations, or null
- * if none is desired.
- */
- public void shutdown(IProgressMonitor monitor);
-}
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 b0e02d0c7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemoteMarker.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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"; //$NON-NLS-1$
-
- /**
- * 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);
-}
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 c9ed5b489..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/ISystemRemotePath.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-package org.eclipse.rse.files.ui.resources;
-
-/**
- * This interface defines a remote path.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended 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);
-}
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/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
deleted file mode 100644
index 2290037f0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java
+++ /dev/null
@@ -1,1996 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [187130] New Folder/File, Move and Rename should be available for read-only folders
- * Kevin Doyle (IBM) - [197976] Changing a file to read-only when it is open doesn't update local copy
- * David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect()
- * David McKnight (IBM) - [209660] check for changed encoding before using cached file
- * David McKnight (IBM) - [210812] for text transfer, need to tell editor to use local encoding
- * Xuan Chen (IBM) - [210816] Archive testcases throw ResourceException if they are run in batch
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [222406] Need to be able to override local encoding
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * Kevin Doyle (IBM) - [224162] SystemEditableRemoteFile.saveAs does not work because FileServiceSubSytem.upload does invalid check
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
- * David McKnight (IBM) - [247189] SystemEditableRemoteFile.openEditor() not updating the default editor properly
- * David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
- * David McKnight (IBM) - [267247] Wrong encoding
- * David McKnight (IBM) - [272772] Exception handling in SystemEditableRemoteFile
- * David McKnight (IBM) - [284420] nullprogressmonitor is needed
- *******************************************************************************/
-
-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.osgi.util.NLS;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.files.ui.actions.SystemDownloadConflictAction;
-import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.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.files.core.subsystems.IVirtualRemoteFile;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.internal.WorkbenchPage;
-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
-{
- 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 //$NON-NLS-1$
- }
-
- /**
- *
- */
- 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 IEditorDescriptor _editorDescriptor = null;
- private boolean _isRemoteFileMounted = false;
- private String _actualRemoteHost = null;
- private String _actualRemotePath = null;
-
- /**
- * Constructor for SystemEditableRemoteFile
- *
- * @since 3.0 changed String editorId into IEditorDescriptor
- */
- public SystemEditableRemoteFile(IWorkbenchPage page, IRemoteFile remoteFile, IEditorDescriptor editorDescriptor)
- {
- super();
- this.page = page;
- this.remoteFile = remoteFile;
- this.remotePath = remoteFile.getAbsolutePath();
- this.subsystem = remoteFile.getParentRemoteFileSubSystem();
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
-
- // if remote edit project doesn't exist, create it
- if (!mgr.doesRemoteEditProjectExist())
- mgr.getRemoteEditProject();
-
- this.root = mgr.getRemoteEditProjectLocation().makeAbsolute().toOSString();
- this.localPath = getDownloadPath();
- this._editorDescriptor = editorDescriptor;
- }
-
- /**
- * Constructor for SystemEditableRemoteFile
- *
- * @since 3.0 changed String editorId into IEditorDescriptor
- */
- public SystemEditableRemoteFile(IRemoteFile remoteFile, IEditorDescriptor editorDescriptor)
- {
- this(null, remoteFile, editorDescriptor);
- }
-
- /**
- * Constructor for SystemEditableRemoteFile
- */
- public SystemEditableRemoteFile(IRemoteFile remoteFile)
- {
- super();
- this.remoteFile = remoteFile;
- this.remotePath = remoteFile.getAbsolutePath();
- this.subsystem = remoteFile.getParentRemoteFileSubSystem();
- this.root = SystemRemoteEditManager.getInstance().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();
- }
- this._editorDescriptor = descriptor;
- }
-
- 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 = RSECorePlugin.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
- IRSESystemType systemType = fs.getHost().getSystemType();
-
- // on windows systems, we need to take into account drives and different separators
- boolean isWindows = systemType.isWindows();
-
- 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, new NullProgressMonitor());
-
- 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 read-only
- */
- public boolean isReadOnly()
- {
-
- if (!subsystem.isConnected())
- {
- try
- {
- if (Display.getCurrent() == null) {
- subsystem.connect(new NullProgressMonitor(), false);
- } else {
- subsystem.connect(false, null);
- }
- }
- 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);
- }
- IFile file = getLocalResource();
- setReadOnly(file, false);
- SystemIFileProperties properties = new SystemIFileProperties(file);
- properties.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(), monitor);
-
- // 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
- {
- String encoding = properties.getEncoding();
- if (properties.getUsedBinaryTransfer() == remoteFile.isBinary() &&
- encoding != null && encoding.equals(remoteFile.getEncoding()) // changed encodings matter too
- )
- {
- // 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;
- }
-
- try
- {
- subsystem.download(remoteFile, localPath, remoteFile.getEncoding(), monitor);
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog.displayMessage(e);
- return false;
- }
- if (monitor.isCanceled())
- {
- return false;
- }
-
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
-
- 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.markStale(true); // as per bug 249544, we should mark stale to ensure we get a fresh copy
- remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
- }
- 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(IProgressMonitor monitor) throws Exception
- {
-
- if (!subsystem.isConnected())
- {
- if (Display.getCurrent() == null) {
- subsystem.connect(new NullProgressMonitor(), false);
- } else {
- subsystem.connect(false, null);
- }
- }
-
- IFile file = getLocalResource();
- String srcEncoding = RemoteFileUtility.getSourceEncoding(file);
-
- subsystem.upload(localPath, remoteFile, srcEncoding, monitor);
-
- // update timestamp
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- //DKM- saveAS fix
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
- 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)
- {
- return SystemRemoteEditManager.getInstance().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath, subsystem);
- }
- return remotePath;
- }
-
- public String getActualHostFor(String remotePath)
- {
- String hostname = subsystem.getHost().getHostName();
- if (subsystem != null
- //DKM && subsystem.getHost().getSystemType().isLocal()
- )
- {
- String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath, subsystem);
- 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();
- if (activeWindow != null)
- {
- activePage = activeWindow.getActivePage();
- }
- else
- {
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
- if (windows != null && windows.length > 0)
- {
- activePage = windows[0].getActivePage();
- }
- }
- }
-
- if (activePage == null){
- return NOT_OPEN;
- }
-
- 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();
- if (path!=null && lFile.compareTo(new java.io.File(path.toOSString()))==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!=null && 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(), new NullProgressMonitor());
- }
-
- if (!remoteFile.exists())
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
-
- 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, new NullProgressMonitor());
- if (!fakeRemoteFile.exists())
- { // this could be because file doesn't exist
- download(shell);
- }
-
- String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
- String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_DOWNLOAD_NO_WRITE,
- IStatus.WARNING, msgTxt, msgDetails);
- 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)
- {
- String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, remotePath, subsystem.getHost().getHostName());
- String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS, remotePath, subsystem.getHost().getHostName());
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR,
- IStatus.WARNING, msgTxt, msgDetails);
-
- 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(false, monitor);
- }
-
- /**
- * Open in editor
- */
- public void open(boolean readOnly, IProgressMonitor monitor)
- {
-
- try
- {
-
- // ensure the file is stale
- remoteFile.markStale(true, false);
- {
- remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
- }
-
- if (!remoteFile.exists())
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
-
- 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, monitor);
- if (!fakeRemoteFile.exists())
- { // this could be because file doesn't exist
- download(monitor);
- }
-
- String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
- String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_DOWNLOAD_NO_WRITE,
- IStatus.WARNING, msgTxt, msgDetails);
-
- 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.getHost().getSystemType().isLocal())
- {
- // 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 = RSECorePlugin.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 = remoteFile.getEncoding();
- properties.setEncoding(encoding);
-
- 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);
- }
- }
-
-
- try
- {
- if (encoding != null)
- {
- if (remoteFile.isBinary()){
- if (!file.isSynchronized(IResource.DEPTH_ZERO))
- {
- file.refreshLocal(IResource.DEPTH_ZERO, null/*monitor*/);
- }
- if (!file.getCharset().equals(encoding))
- {
- file.setCharset(encoding, null);
- }
- }
- else {
- // using text mode so the char set needs to be local
- if (properties.getLocalEncoding() != null){
- String localEncoding = properties.getLocalEncoding();
- file.setCharset(localEncoding, null);
- }
-
- // otherwise, the default charset is inherited so no need to set
- }
- }
- }
- 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)
- if (!remoteFile.getParentRemoteFileSubSystem().isOffline()){
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
- SystemMessageDialog.displayExceptionMessage(SystemMessageDialog.getDefaultShell(), e);
- return;
- }
- }
- boolean readOnly = !remoteFile.canWrite();
- ResourceAttributes attr = file.getResourceAttributes();
- if (attr!=null) {
- attr.setReadOnly(readOnly);
- try
- {
- file.setResourceAttributes(attr);
- }
- catch (Exception e)
- {
-
- }
- }
-
- // set editor as preferred editor for this file
-
- String editorId = null;
- if (_editorDescriptor != null)
- editorId = _editorDescriptor.getId();
-
- 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);
- if (_editorDescriptor != null && _editorDescriptor.isOpenExternal()){
- editor = ((WorkbenchPage)activePage).openEditorFromDescriptor(new FileEditorInput(file), _editorDescriptor, true, null);
- }
- else {
- editor = activePage.openEditor(finput, _editorDescriptor.getId());
- }
-
-
- 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
- String editorId = null;
- if (_editorDescriptor != null)
- editorId = _editorDescriptor.getId();
- 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();
- setReadOnly(file, true);
-
- SystemIFileProperties properties = new SystemIFileProperties(file);
- properties.setReadOnly(true);
- }
-
- /**
- * Refresh
- */
- private void refresh()
- {
-
- SystemRemoteEditManager.getInstance().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(new NullProgressMonitor());
- }
- }
- 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$
- String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
-
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR, msgTxt);
- 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(progressMonitor);
- } catch (SystemMessageException e) {
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), e.getSystemMessage());
- dialog.open();
- return true;
- } catch (Exception e)
- {
- SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
- String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
-
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR, msgTxt);
- 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();
- }
-
-}
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 dcf18ca2c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemSafeFileOutputStream.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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"; //$NON-NLS-1$
-
- /**
- * Constructor for SystemSafeFileOutputStream.
- * @param file the destination file.
- */
- public SystemSafeFileOutputStream(File file) throws IOException {
- this(file.getAbsolutePath(), null);
- }
-
- /**
- * Constructor for SystemSafeFileOutputStream.
- * @param destinationName the destination file name
- */
- public SystemSafeFileOutputStream(String destinationName) throws IOException {
- this(destinationName, null);
- }
-
- /**
- * Constructor for SystemSafeFileOutputStream.
- * @param destinationPath the destination file name
- * @param tempPath 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 sourceFile the source file
- * @param destinationFile 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 tempPath 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 b the integer to write
- */
- public void write(int b) throws IOException {
-
- try {
- output.write(b);
- }
- catch (IOException e) {
- failed = true;
- throw e;
- }
- }
-}
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 caecc53ec..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java
+++ /dev/null
@@ -1,800 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * Martin Oberhuber (Wind River) - [199573] Fix potential threading issues in SystemTempFileListener
- * David McKnight (IBM) - [205297] Editor upload should not be on main thread
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
- * David McKnight (IBM) - [251631] NullPointerException in SystemTempFileListener
- * David McKnight (IBM) - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
- *******************************************************************************/
-
-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.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.resources.ResourcesPlugin;
-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.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.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.subsystems.files.core.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.files.core.subsystems.RemoteFileSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 class TempFileSaveParticipant implements ISaveParticipant
- {
- private SystemTempFileListener _listener;
-
- public TempFileSaveParticipant(SystemTempFileListener listener){
- _listener = listener;
- }
-
- public void doneSaving(ISaveContext context) {
- }
-
- public void prepareToSave(ISaveContext context) throws CoreException {
- }
-
- public void rollback(ISaveContext context) {
- }
-
- public void saving(ISaveContext context) throws CoreException {
-
- // wait for completion of synch
- while (isSynching()){
- try {
- Thread.sleep(1000);
- }
- catch (Exception e){
-
- }
- }
- }
-
- private boolean isSynching()
- {
- return _isSynching || _changedResources.size() > 0;
- }
-
- }
-
- private ArrayList _changedResources;
- private ArrayList _ignoredFiles = new ArrayList();
- private volatile boolean _isSynching;
- private boolean _isEnabled;
-
- public SystemTempFileListener()
- {
- _changedResources = new ArrayList();
- _isSynching = false;
- _isEnabled = true;
-
- ISaveParticipant saveParticipant = new TempFileSaveParticipant(this);
- try {
- ResourcesPlugin.getWorkspace().addSaveParticipant(Activator.getDefault(), saveParticipant);
- }
- catch (CoreException e){
- SystemBasePlugin.logError("Exception adding save participant", e); //$NON-NLS-1$
- }
- }
-
- 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
- {
- IPath location = file.getLocation();
-
- if (location == null){
- // linked into remote file system -- ignore in tempfile listener
- return true;
- }
- else {
- String path = location.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)
- {
- 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)
- {
- // indicating synching here instead of in SynchResourcesJob because
- // otherwise two calls can get into here creating two jobs
- _isSynching = true;
- synchRemoteResourcesOnThread();
- }
- }
- else
- {
- if (!RSECorePlugin.getThePersistenceManager().isBusy())
- {
- 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)
- {
- monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, _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;
- }
- }
-
- /***
- * @deprecated don't use this class, it's only here because to remove it would be
- * an API change, and we can't do that until 3.0. Instead of using this,
- * SynchResourcesJob should be used.
- */
- public class RefreshResourcesUIJob extends WorkbenchJob
- {
- public RefreshResourcesUIJob()
- {
- super(FileResources.RSEOperation_message);
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- _isSynching = true;
- try {
- IFile[] filesToSync;
- synchronized(_changedResources) {
- filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
- _changedResources.clear();
- }
- monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, IProgressMonitor.UNKNOWN);
- setName(FileResources.MSG_SYNCHRONIZE_PROGRESS);
- for (int i = 0; i < filesToSync.length; i++)
- {
- synchronizeTempWithRemote(filesToSync[i], monitor);
- }
- } finally {
- _isSynching = false;
- monitor.done();
- }
- return Status.OK_STATUS;
- }
- }
-
-
-
- /**
- * Used for doing the upload from a job
- * @author dmcknigh
- *
- */
- private class SynchResourcesJob extends Job
- {
- public SynchResourcesJob()
- {
- super(FileResources.RSEOperation_message);
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try {
- // using while loop because changed resources could get added after the original batch
- while (!_changedResources.isEmpty()){
- IFile[] filesToSync;
- synchronized(_changedResources) {
- filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
- _changedResources.clear();
- }
-
- monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, IProgressMonitor.UNKNOWN);
- setName(FileResources.MSG_SYNCHRONIZE_PROGRESS);
- for (int i = 0; i < filesToSync.length; i++)
- {
- synchronizeTempWithRemote(filesToSync[i], monitor);
- }
- }
- }
- catch (Exception e){
- e.printStackTrace();
- }
- finally {
- _isSynching = false;
- monitor.done();
- }
- return Status.OK_STATUS;
- }
- }
-
- private void refreshRemoteResourcesOnMainThread(List resources)
- {
- RefreshResourcesJob job = new RefreshResourcesJob(resources);
- job.setPriority(Job.INTERACTIVE);
- job.schedule();
- }
-
- private void synchRemoteResourcesOnThread()
- {
- SynchResourcesJob job = new SynchResourcesJob();
- 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.getTheSystemRegistryUI().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)
- {
-
- // 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 = RSECorePlugin.getTheSystemRegistry().getSubSystem(ssStr);
- if (doesHandle(ss))
- {
- synchronized(_changedResources) {
- //avoid ConcurrentModificationException
- _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 = RSECorePlugin.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
- IRSESystemType systemType = fs.getHost().getSystemType();
-
- // on windows systems, we need to take into account drives and different separators
- boolean isWindows = systemType.isWindows();
-
- 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();
- }
-
- // attempt the remote file synchronization
- if (doesHandle(fs))
- {
- if (!fs.isOffline()){
- // see if we're connected
- try
- {
- // check that the remote file system is connected
- // if not, attempt to connect to it
- if (!fs.isConnected())
- {
- // make sure we connect synchronously from here
- fs.connect(monitor, false);
- }
- }
- 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);
-
- // as per bug 256048 - comment#6 if we're not connected follow through to
- // doResourceSynchronization so we have the change to mark the SystemTextEditor dirty
- }
- }
- doResourceSynchronization(fs, file, uploadPath, monitor);
- }
- }
- }
-
- protected void refreshRemoteResource(Object parent)
- {
- ISystemRegistry registry = RSECorePlugin.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 subsystem the remote file subsystem of the remote file
- * @param tempFile the temporary file
- * @param resourceId 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 = RSECorePlugin.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.getInstance().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;
- }
-
-
-
-}
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 a7e633ab9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [205297] Editor upload should not be on main thread
- * David McKnight (IBM) - [195285] mount path mapper changes
- * Kevin Doyle (IBM) - [197976] Synch up Read-Only attribute when performing save based on local copy
- * Kevin Doyle (IBM) - [204810] Saving file in Eclipse does not update remote file
- * Kevin Doyle (IBM) - [210389] Display error dialog when setting file not read-only fails when saving
- * David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
- * David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
- * David McKnight (IBM) - [256048] Saving a member open in Remote LPEX editor while Working Offline doesn't set the dirty property
- ********************************************************************************/
-
-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.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.actions.SystemUploadConflictAction;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-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.SystemIFileProperties;
-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.SystemBasePlugin;
-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;
-import org.eclipse.ui.PartInitException;
-
-/**
- * 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 subsystem the remote file subsystem of the remote file
- * @param tempFile the temporary file
- * @param resourceId the remote file
- * @param monitor progress monitor
- */
- 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
- // also as per bug 256048 - comment#6 if we're not connected we still need to do the same thing
- if (fs.isOffline() || !fs.isConnected())
- {
- // offline mode - make sure the file stays dirty
- properties.setDirty(true);
-
- // try to reset the dirty indicator for the editor if it's open
- // will only work for lpex right now
- SystemEditableRemoteFile editable = null;
- if (properties.getRemoteFileObject() instanceof SystemEditableRemoteFile){
- editable = (SystemEditableRemoteFile)properties.getRemoteFileObject();
- editable.updateDirtyIndicator();
- }
-
- return;
- }
- else
- {
- // for mounting...
- //if (fs.getHost().getSystemType().isLocal())
- {
- boolean isMounted = properties.getRemoteFileMounted();
- if (isMounted)
- {
- String mappedHostPath = properties.getResolvedMountedRemoteFilePath();
- String mappedHostName = properties.getResolvedMountedRemoteFileHost();
- String systemRemotePath = SystemRemoteEditManager.getInstance().getMountPathFor(mappedHostName, mappedHostPath, (IRemoteFileSubSystem)subsystem);
-
- 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, monitor);
-
- if (remoteFile != null)
- {
-
- // make sure we have uptodate file
- remoteFile.markStale(true);
- remoteFile = fs.getRemoteFileObject(resourceId, monitor);
-
- // get modification stamp and dirty state
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // If remote file is read-only make it writable as the local
- // copy has changed to be writable
- if (remoteFile.exists() && !remoteFile.canWrite() && !tempFile.isReadOnly()) {
- remoteFile.getParentRemoteFileSubSystem().setReadOnly(
- remoteFile, false, new NullProgressMonitor());
- }
-
- boolean openEditorAfterUpload = false;
-
- // 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);
- }
-
- openEditorAfterUpload = true;
- editable.setLocalResourceProperties();
- }
-
- upload(fs, remoteFile, tempFile, properties, storedModifiedStamp, editable, monitor);
-
- if (openEditorAfterUpload){
- // moving this to after the upload because otherwise it queries the remote file and that messes up the timestamps needed by upload
- final SystemEditableRemoteFile fEditable = editable;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
-
- // 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 (fEditable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN)
- {
- try {
- fEditable.openEditor(); // open e
- }
- catch (PartInitException e) {
- }
- }
-
- fEditable.addAsListener();
- }
- });
- }
- }
- }
- catch (SystemMessageException e) {
- DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(e.getSystemMessage());
- Display.getDefault().syncExec(msgAction);
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
- }
-
- }
-
- /**
- * This method attempts to upload a temporary file in the workspace to a corresponding remote file location. It
- * checks whether the timestamp of the remote file has changed since the temporary file was last known to
- * be in synch with the remote file. If the timestamp has not changed, then it is assumed that the remote
- * file has not changed and therefore it is safe to do an upload. If the timestamp has changed, then the remote
- * file must have changed independently and there is a conflict and the upload conflict action is invoked.
- *
- * <p>
- * <b>Warning</b> It is important to make sure that the remoteFile that gets passed in is up-to-date AND is the
- * current cached version. If the remoteFile is not up-to-date then the timestamp of the actual remote file may
- * be wrong and lead to the following problems:
- *
- * <ul>
- * <li> If the detected remote timestamp is not the actual remote timestamp but it is the same as the storedModifiedStamp, an
- * upload without detecting a conflict will cause lost data on the remote side!
- * <li> If the detected remote timestamp is not the actual remote timestamp and the actual timestamp is the same as the
- * storedModifiedStamp, a conflict will be indicated that doesn't actually exist
- * </ul>
- *
- * If the remoteFile is not the current cached version then the following problem occurs. After the upload, the remote file is
- * marked stale so that the up-to-date remote file can be retrieved with the updated actual timestamp. Because the remoteFile
- * that was passed into this method is not the cached version, marking it stale will not mark the cached version stale and
- * thus, when a re-query of the file is done after the upload, the original cached version gets returned as opposed to a fresh
- * version with the correct timestamp.
- *
- * <p>
- * Because of these problems, it is recommended that, before calling upload(), the remoteFile is retrieved from the cache and is
- * marked stale like the following example:
- *
- * <code>
- * ...
- * // get the remote file from the cache
- * IRemoteFile remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
- *
- * // mark it stale
- * remoteFile.markStale(true);
- *
- * // re-query the remote file to make sure you have the latest
- * remoteFile = fs.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
- *
- * // call upload
- * upload(fs, remoteFile, ...);
- * ....
- * </code>
- *
- *
- * @param fs the file subsystem that corresponds with the file to upload
- * @param remoteFile the remote file location to upload to
- * @param tempFile the source temp file to upload
- * @param properties the remote file properties of the file to upload
- * @param storedModifiedStamp the last timestamp of the remote file for which a temp file was in synch with the remote file
- * @param editable the wrapper that associates the remote file, temp file and editor together
- * @param monitor the progress monitor
- */
- 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
- String srcEncoding = tempFile.getCharset(true);
-
- if (srcEncoding == null) {
- srcEncoding = remoteFile.getEncoding();
- }
-
- fs.upload(tempFile.getLocation().makeAbsolute().toOSString(), remoteFile, srcEncoding, 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);
- }
-
- // requery the file so get the new timestamp
- remoteFile.markStale(true);
- remoteFile =fs.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
-
- IRemoteFile parent = remoteFile.getParentRemoteFile();
-
-
- long ts = remoteFile.getLastModified();
-
- // set the stored timestamp to be the same as the remote timestamp
- properties.setRemoteFileTimeStamp(ts);
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- // refresh
- if (parent != null)
- {
- registry.fireEvent(new SystemResourceChangeEvent(parent, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- }
-
- registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, remoteFile));
-
-
- // 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
- final 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
-
- final SystemEditableRemoteFile remoteEdit = editable;
- final IFile tFile = tempFile;
- final IRemoteFile rFile = remoteFile;
-
- // upload is run in a job, so the conflict action/dialog needs to run in UI thread
- Display.getDefault().asyncExec(new Runnable()
- {
- public void run()
- {
- Shell shell = RSEUIPlugin.getTheSystemRegistryUI().getShell();
-
- SystemUploadConflictAction conflictAction = new SystemUploadConflictAction(shell, tFile, rFile, remoteNewer);
- conflictAction.run();
- remoteEdit.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 1302b1498..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java
+++ /dev/null
@@ -1,3153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * Xuan Chen (IBM) - [187548] Editor shows incorrect file name after renaming file on Linux dstore
- * David McKnight (IBM) - [191472] should not use super transfer with SSH/FTP Folder Copy and Paste
- * Xuan Chen (IBM) - [191367] with supertransfer on, Drag & Drop Folder from DStore to DStore doesn't work
- * Xuan Chen (IBM) - [201790] [dnd] Copy and Paste across connections to a Drive doesn't work
- * Xuan Chen (IBM) - [202668] [supertransfer] Subfolders not copied when doing first copy from dstore to Local
- * Xuan Chen (IBM) - [202670] [supertransfer] After doing a copy to a directory that contains folders some folders name's display "deleted"
- * Xuan Chen (IBM) - [202949] [archives] copy a folder from one connection to an archive file in a different connection does not work
- * David McKnight (IBM) - [205819] Need to use input stream copy when EFS files are the src
- * David McKnight (IBM) - [195285] mount path mapper changes
- * Kevin Doyle (IBM) - [203014] Copy/Paste Across Connections doesn't display Overwrite dialog when folder already exists
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [209375] new API copyRemoteResourcesToWorkspaceMultiple to optimize downloads
- * Rupen Mardirossian (IBM) - [208435] added constructor to nested RenameRunnable class to take in names that are previously used as a parameter for multiple renaming instances, passed through check collision as well through overloading.
- * Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [203114] don't treat XML files specially (no hidden prefs for bin vs text)
- * David McKnight (IBM) - [209552] get rid of copy APIs to be clearer with download and upload
- * David McKnight (IBM) - [143503] encoding and isBinary needs to be stored in the IFile properties
- * Xuan Chen (IBM) - [191370] [dstore] supertransfer zip not deleted when canceling copy
- * Xuan Chen (IBM) - [210816] Archive testcases throw ResourceException if they are run in batch
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Rupen Mardirossian (IBM) - [210682] Collisions when doing a copy operation across systems will us the SystemCopyDialog
- * Xuan Chen (IBM) - [229093] set charset of the temp file of the text remote file to its remote encoding
- * Rupen Mardirossian (IBM) - [198728] downloadResourcesToWorkspace now creates empty folders for copying across connections via createEmptyFolders method
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * Kevin Doyle (IBM) - [227391] Saving file in Eclipse does not update remote file
- * David McKnight (IBM) - [234924] [ftp][dnd][Refresh] Copy/Paste file from Package Explorer doesn't refresh folder
- * David McKnight (IBM) - [236723] UniversalFileTransferUtility..uploadResourcesFromWorkspace should query remote folder encoding
- * Radoslav Gerganov (ProSyst) - [231428] [files] NPE on canceling copy operation from remote host
- * David McKnight (IBM) - [262092] Special characters are missing when pasting a file on a different connection
- * David McKnight (IBM) - [271831] Set the readonly file attribute when download the file
- * David McKnight (IBM) - [251136] Error copying local file to remote system when temp file is readonly
- * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
- * David McKnight (IBM) - [276534] Cache Conflict After Synchronization when Browsing Remote System with Case-Differentiated-Only Filenames
- * David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
- * David McKnight (IBM) - [234258] [dnd] Drag&Drop a folder silently ignores elements without permissions
- *******************************************************************************/
-
-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.InputStream;
-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.IFolder;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.internal.ui.dialogs.CopyRunnable;
-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.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
-import org.eclipse.rse.services.files.IFileService;
-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.SystemIFileProperties;
-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.IVirtualRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Utility class for doing file transfers on universal systems.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class UniversalFileTransferUtility {
- static final boolean doCompressedTransfer = true;//false;
-
- static final String _rootPath = SystemRemoteEditManager.getInstance().getRemoteEditProjectLocation().makeAbsolute().toOSString();
-
- public static class RenameStatus extends Status {
-
- private static final int CANCEL_ALL = 16;
-
- /**
- * Creates a new RenameStatus object. The created status has no
- * children.
- *
- * @param severity the severity; one of <code>OK</code>,
- * <code>ERROR</code>, <code>INFO</code>,
- * <code>WARNING</code>, or <code>CANCEL</code>
- * @param pluginId the unique identifier of the relevant plug-in
- * @param code the plug-in-specific status code, or <code>OK</code>
- * @param message a human-readable message, localized to the current
- * locale
- * @param exception a low-level exception, or <code>null</code> if not
- * applicable
- */
- public RenameStatus(int severity, String pluginId, int code, String message, Throwable exception) {
- super(severity, pluginId, code, message, exception);
- }
- }
-
- /**
- * Indicates whether super transfer should be used for a particular file transfer. This will return true if both
- * the preference for super transfer is turned on and the subsystem configuration supports archives
- * @param subsystem the subsystem used to transfer files and folders
- * @return true if super transfer should be used
- */
- private static boolean doSuperTransfer(IRemoteFileSubSystem subsystem)
- {
- boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER) &&
- subsystem.getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- return doSuperTransferProperty;
- }
-
- /**
- * 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 = downloadResourceToWorkspace(srcFileOrFolder, monitor);
- if (tempSrc instanceof IResource)
- {
- uploadResourceFromWorkspace((IResource) tempSrc, tgtFolder, monitor);
- }
- }
-
- private static boolean tempFileAvailable(IFile tempFile, IRemoteFile remoteFile) throws RemoteFileIOException
- {
- // 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);
-
- String replicaRemoteFilePath = properties.getRemoteFilePath();
- String remoteFilePath = remoteFile.getAbsolutePath();
-
- if (!remoteFilePath.equals(replicaRemoteFilePath)){
- // this temp file is for a file of different case
- Exception e = new Exception(FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST);
- throw new RemoteFileIOException(e);
- }
-
-
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
-
- // compare timestamps
- if (storedModifiedStamp > 0)
- {
- // ;if they're the same, just use temp file
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- boolean usedBin = properties.getUsedBinaryTransfer();
- boolean shouldUseBin = remoteFile.isBinary();
-
- // changed encodings matter too
- String remoteEncoding = remoteFile.getEncoding();
- String lastEncoding = properties.getEncoding();
- if (storedModifiedStamp == remoteModifiedStamp &&
- (usedBin == shouldUseBin) &&
- (remoteEncoding.equals(lastEncoding))
- )
- {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * replicates a remote 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, or <code>null</code> if the
- * operation was cancelled before the download was complete
- * @since 3.0
- */
- protected static IFile downloadFileToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
- {
- IRemoteFileSubSystem srcFS = srcFileOrFolder.getParentRemoteFileSubSystem();
- IResource tempResource = getTempFileFor(srcFileOrFolder);
-
- IFile tempFile = (IFile) tempResource;
-
- boolean available = true;
- try {
- available = tempFileAvailable(tempFile, srcFileOrFolder);
- }
- catch (RemoteFileIOException e){
- // this is the case where a temp file exists for a file of a different case
- // bug 276534
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- Object obj = properties.getRemoteFileObject();
- if (obj != null && obj instanceof SystemEditableRemoteFile)
- {
- SystemEditableRemoteFile editable = (SystemEditableRemoteFile) obj;
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN){
- // editor open for this file
- // for now, best we may be able to do is just keep this one and warn
- String remotePath = editable.getAbsolutePath();
- String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, remotePath);
- String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
-
- final SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR,
- IStatus.WARNING, msgTxt, msgDetails);
-
- runInDisplayThread(new Runnable() {
- public void run() {
- SystemMessageDialog dlg = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
- dlg.open();
- }});
- return null;
- }
- else {
- // get rid of the current temp file
- try {
- tempFile.delete(true, monitor);
- }
- catch (CoreException ex){}
- tempResource = getTempFileFor(srcFileOrFolder);
- tempFile = (IFile) tempResource;
-
- available = false;
- }
- }
- else {
- // file not being edited, so overwrite it
- available = false;
- }
- }
- if (available){
- return tempFile;
- }
-
- try
- {
- // copy remote file to workspace
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(tempFile);
- String remoteEncoding = srcFileOrFolder.getEncoding();
- srcFS.download(srcFileOrFolder, tempFile.getLocation().makeAbsolute().toOSString(), remoteEncoding, 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())
- {
- // set the appropriate readonly flag
- boolean readOnly = !srcFileOrFolder.canWrite();
- setReadOnly(tempFile, readOnly);
-
- if (remoteEncoding != null)
- {
- if (srcFileOrFolder.isBinary())
- {
- if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
- {
- tempFile.refreshLocal(IResource.DEPTH_ZERO, null/*monitor*/);
- }
- if (!tempFile.getCharset().equals(remoteEncoding))
- {
- tempFile.setCharset(remoteEncoding, null);
- }
- }
- else
- {
- // using text mode so the char set needs to be local
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
- if (properties.getLocalEncoding() != null){
- String localEncoding = properties.getLocalEncoding();
- tempFile.setCharset(localEncoding, null);
- }
- // otherwise, the default charset is inherited so no need to set
- }
- }
- }
- }
- catch (SystemOperationCancelledException soce) {
- return null;
- }
- catch (final SystemMessageException 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 = RSECorePlugin.getTheSystemRegistry();
- String subSystemId = registry.getAbsoluteNameForSubSystem(subSystem);
- properties.setRemoteFileSubSystem(subSystemId);
- properties.setRemoteFilePath(remotePath);
-
-
- properties.setEncoding(remoteFile.getEncoding());
- properties.setUsedBinaryTransfer(remoteFile.isBinary());
-
- // 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);
- }
- }
-
- /**
- * Used for local files - special case!
- * @param tempFile
- * @param remoteFile
- * @param hostname
- * @param userId
- * @since 3.0
- */
- protected static void setIFileProperties(IFile tempFile, File remoteFile, String hostname, String userId)
- {
- // 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();
- properties.setRemoteFilePath(remotePath);
- try
- {
- properties.setEncoding(tempFile.getCharset());
- }
- catch (CoreException e){
- }
-
-
- // 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, null); // no subsystem
- properties.setRemoteFileMounted(isMounted);
- if (isMounted)
- {
- String actualRemoteHost = getActualHostFor(hostname, remotePath, null); // no subsystem
- String actualRemotePath = getWorkspaceRemotePath(hostname, remotePath, null); // no subsystem
- properties.setResolvedMountedRemoteFileHost(actualRemoteHost);
- properties.setResolvedMountedRemoteFilePath(actualRemotePath);
- }
- }
-
- /**
- * This method downloads a set of remote resources to the workspace. It uses
- * the downloadMultiple() API of the remote file subsystem and service
- * layers so for some service implementations, this is a big optimization
- *
- * @param remoteSet the set of resources to download
- * @param monitor the progress monitor
- * @return the set of temporary files created as a result of the download.
- * This may contain fewer files than requested in case the operation
- * was cancelled.
- * @since 3.0
- */
- public static SystemWorkspaceResourceSet downloadResourcesToWorkspaceMultiple(SystemRemoteResourceSet remoteSet, IProgressMonitor monitor)
- {
- IContainer broadestContainer = null;
- SystemWorkspaceResourceSet resultSet = new SystemWorkspaceResourceSet();
- List set = remoteSet.getResourceSet();
- IRemoteFileSubSystem srcFS = (IRemoteFileSubSystem)remoteSet.getSubSystem();
-
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
-
-
- List remoteFilesForDownload = new ArrayList();
- List tempFilesForDownload = new ArrayList();
- List remoteEncodingsForDownload = new ArrayList();
- List emptyFolders = new ArrayList();
-
- // step 1: pre-download processing
- for (int i = 0; i < set.size() && !resultSet.hasMessage(); i++){
-
- if (monitor != null && monitor.isCanceled())
- {
- return resultSet;
- }
-
- IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
- // first check for existence
- if (!srcFileOrFolder.exists()){
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
-
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- resultSet.setMessage(errorMessage);
-
- }
- else
- {
- if (srcFileOrFolder.isFile()) // file transfer only
- {
- IResource tempResource = getTempFileFor(srcFileOrFolder);
-
- IFile tempFile = (IFile) tempResource;
-
- boolean problem = false;
- boolean available = true;
- try {
- available = tempFileAvailable(tempFile, srcFileOrFolder);
- }
- catch (RemoteFileIOException e){
- // this is the case where a temp file exists for a file of a different case
- // bug 276534
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
-
- Object obj = properties.getRemoteFileObject();
- if (obj != null && obj instanceof SystemEditableRemoteFile)
- {
- SystemEditableRemoteFile editable = (SystemEditableRemoteFile) obj;
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN){
- // editor open for this file
- // for now, best we may be able to do is just keep this one and warn
- String remotePath = srcFileOrFolder.getAbsolutePath();
- String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, remotePath);
- String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR,
- IStatus.WARNING, msgTxt, msgDetails);
-
- resultSet.setMessage(message);
- problem = true;
- }
- else {
- // get rid of the current temp file
- try {
- tempFile.delete(true, monitor);
- }
- catch (CoreException ex){}
- tempResource = getTempFileFor(srcFileOrFolder);
- tempFile = (IFile) tempResource;
- }
- available = false;
- }
- else {
- // file not being edited, so overwrite it
- available = false;
- }
- }
-
- if (available){
- resultSet.addResource(tempFile);
- }
- else if (!problem){
- listener.addIgnoreFile(tempFile);
-
- remoteFilesForDownload.add(srcFileOrFolder);
- tempFilesForDownload.add(tempFile);
- remoteEncodingsForDownload.add(srcFileOrFolder.getEncoding());
-
- IContainer parent = tempFile.getParent();
- if (broadestContainer == null || parent.contains(broadestContainer)){
- broadestContainer = parent;
- }
- else {
- if (!broadestContainer.contains(parent)) { // siblings?
- broadestContainer = broadestContainer.getParent();
- }
- }
- }
- }
- else if (srcFileOrFolder.isDirectory()) // recurse for empty folders and add to our consolidated resource set
- {
- IResource tempFolder = getTempFileFor(srcFileOrFolder);
- try
- {
- //get contents of folder
- IRemoteFile[] children = srcFS.list(srcFileOrFolder,IFileService.FILE_TYPE_FILES_AND_FOLDERS,monitor);
- //check for empty folder and add to set
- if(children==null || children.length==0)
- {
- emptyFolders.add(tempFolder);
- }
- //get all subfolders
- children=srcFS.list(srcFileOrFolder, IFileService.FILE_TYPE_FOLDERS, monitor);
- if(!(children==null) && !(children.length==0))
- {
- SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
- //recurse with subfolders to check for empty folders
- SystemWorkspaceResourceSet childResults = downloadResourcesToWorkspaceMultiple(childSet, monitor);
- if (childResults.hasMessage())
- {
- resultSet.setMessage(childResults.getMessage());
- }
- resultSet.addResource(tempFolder);
- }
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError(e.getMessage(), e);
- SystemMessageDialog.displayMessage(e);
- }
- }
- }
- }
-
- // step 2: downloading
- IRemoteFile[] sources = (IRemoteFile[])remoteFilesForDownload.toArray(new IRemoteFile[remoteFilesForDownload.size()]);
-
- String[] encodings = (String[])remoteEncodingsForDownload.toArray(new String[remoteEncodingsForDownload.size()]);
-
- // destinations
- String[] destinations = new String[remoteFilesForDownload.size()];
- for (int t = 0; t < tempFilesForDownload.size(); t++){
- IFile destFile = (IFile)tempFilesForDownload.get(t);
-
- // make sure the file isn't read-only during the download
- if (destFile.isReadOnly()){
- setReadOnly(destFile, false);
- }
-
- destinations[t] = destFile.getLocation().toOSString();
- }
-
- if (sources.length > 0){
- try {
- srcFS.downloadMultiple(sources, destinations, encodings, monitor);
- }
- catch (SystemMessageException e){
- resultSet.setMessage(e.getSystemMessage());
- }
- }
-
- // step 2.1: refresh the broadest container (keep it down to 1 big refresh)
- try
- {
- if (broadestContainer != null && !broadestContainer.isSynchronized(IResource.DEPTH_INFINITE)){
- broadestContainer.refreshLocal(IResource.DEPTH_INFINITE, null);//monitor);
- }
- }
- catch (Exception e)
- {
-
- }
- //Create empty folders
- try
- {
- createEmptyFolders(monitor, emptyFolders);
- }
- catch(CoreException e)
- {
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_FILE_FAILED,
- IStatus.ERROR, FileResources.FILEMSG_CREATE_FILE_FAILED, e);
- resultSet.setMessage(errorMessage);
- }
-
- // step 3: post download processing
- if (!resultSet.hasMessage())
- {
-
- for (int p = 0; p < remoteFilesForDownload.size(); p++) {
-
- IRemoteFile srcFileOrFolder = (IRemoteFile)remoteFilesForDownload.get(p);
- IFile tempFile = (IFile)tempFilesForDownload.get(p);
- resultSet.addResource(tempFile);
- String remoteEncoding = (String)remoteEncodingsForDownload.get(p);
- listener.removeIgnoreFile(tempFile);
-
- SystemIFileProperties properties = new SystemIFileProperties(tempFile);
- long storedTime = properties.getRemoteFileTimeStamp();
- long currentTime = srcFileOrFolder.getLastModified();
- String storedEncoding = properties.getEncoding();
- String currentEncoding = srcFileOrFolder.getEncoding();
-
- if (storedTime != currentTime && (storedEncoding == null || !storedEncoding.equals(currentEncoding)))
- {
- if (tempFile.exists())
- {
- // set the appropriate readonly flag
- boolean readOnly = !srcFileOrFolder.canWrite();
- setReadOnly(tempFile, readOnly);
-
- try
- {
- if (remoteEncoding != null)
- {
- if (srcFileOrFolder.isBinary())
- {
- if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
- {
- tempFile.refreshLocal(IResource.DEPTH_ZERO, null/*monitor*/);
- }
- if (!tempFile.getCharset().equals(remoteEncoding))
- {
- tempFile.setCharset(remoteEncoding, null);
- }
- }
- else
- {
- // using text mode so the char set needs to be local
- if (properties.getLocalEncoding() != null){
- String localEncoding = properties.getLocalEncoding();
- tempFile.setCharset(localEncoding, null);
- }
- // otherwise, the default charset is inherited so no need to set
- }
- }
- }
- catch (Exception e)
- {
- SimpleSystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_FAILED,
- IStatus.ERROR, "", e); //$NON-NLS-1$
- resultSet.setMessage(errorMessage);
- return null;
- }
-
-
- try
- {
- setIFileProperties(tempFile, srcFileOrFolder, srcFS);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
- return resultSet;
- }
-
- private static void createEmptyFolders(IProgressMonitor monitor, List emptyFolders) throws CoreException
- {
- IContainer empty;
- IFolder emptyFolder;
- List emptyParent;
- boolean go=false;
- for(int i=0; i<emptyFolders.size();i++)
- {
- emptyParent = new ArrayList();
- empty = (IContainer) emptyFolders.get(i);
- go=true;
- //check to see which parent folders need to be created
- while(go)
- {
- empty = empty.getParent();
- if(!empty.exists() && empty instanceof IFolder)
- {
- emptyParent.add(empty);
- }
- else
- {
- go=false;
- }
- }
- //create empty parent folders
- for(int j=emptyParent.size()-1;j>=0;j--)
- {
- emptyFolder = (IFolder) emptyParent.get(j);
- if(!emptyFolder.exists())
- {
- emptyFolder.create(true, true, monitor);
- }
- }
- //create empty folders
- emptyFolder = (IFolder) emptyFolders.get(i);
- if(!emptyFolder.exists())
- {
- emptyFolder.create(true, true, monitor);
- }
- }
- }
-
-
- /**
- * 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
- * @since 3.0
- */
- public static SystemWorkspaceResourceSet downloadResourcesToWorkspace(SystemRemoteResourceSet remoteSet, IProgressMonitor monitor)
- {
- boolean ok = true;
- SystemWorkspaceResourceSet resultSet = new SystemWorkspaceResourceSet();
- IRemoteFileSubSystem srcFS = (IRemoteFileSubSystem)remoteSet.getSubSystem();
-
- if (!srcFS.isConnected())
- {
- return null;
- }
-
- boolean doSuperTransferProperty = doSuperTransfer(srcFS);
-
- List set = remoteSet.getResourceSet();
- List emptyFolders = new ArrayList();
-
- 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())
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
-
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- resultSet.setMessage(errorMessage);
-
- }
- else
- {
- if (srcFileOrFolder.isFile()) // file transfer
- {
-
- IFile tempFile = downloadFileToWorkspace(srcFileOrFolder, monitor);
- if (monitor != null && monitor.isCanceled())
- {
- return resultSet;
- }
- resultSet.addResource(tempFile);
- }
- else // folder transfer
- {
- IResource tempFolder = null;
-
- if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot()
- && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().isLocal()))
- {
- try
- {
- tempFolder = compressedDownloadToWorkspace(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.list(srcFileOrFolder,monitor);
- //check for empty folder and add to set
- if(children==null || children.length==0)
- {
- emptyFolders.add(tempFolder);
- }
-
- SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
- SystemWorkspaceResourceSet childResults = downloadResourcesToWorkspace(childSet, monitor);
- if (childResults.hasMessage())
- {
- resultSet.setMessage(childResults.getMessage());
- }
- resultSet.addResource(tempFolder);
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError(e.getMessage(), e);
- SystemMessageDialog.displayMessage(e);
- }
- }
- }
- }
- }
-
- //Create empty folders
- try
- {
- createEmptyFolders(monitor, emptyFolders);
- }
- catch(CoreException e)
- {
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_FILE_FAILED,
- IStatus.ERROR, FileResources.FILEMSG_CREATE_FILE_FAILED, e);
- resultSet.setMessage(errorMessage);
- }
-
- // 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 != null && !tempResource.exists()) // need to check for null resource
- // because it's possible to be null when the download fails
- {
- // 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 void discardReplicasOfDeletedFiles(IRemoteFileSubSystem ss, IContainer folder)
- {
- try
- {
- IResource[] members = folder.members();
- for (int i = members.length -1; i >= 0; i--)
- {
- IResource member = members[i];
- if (member instanceof IFile)
- {
- // is this a valid replica?
- SystemIFileProperties properties = new SystemIFileProperties(member);
- String path = properties.getRemoteFilePath();
- if (path != null)
- {
- IRemoteFile remoteFile = null;
- if (ss instanceof RemoteFileSubSystem)
- {
- // mark any cached remote file stale so we know for sure
- remoteFile = ((RemoteFileSubSystem)ss).getCachedRemoteFile(path);
- if (remoteFile != null)
- {
- remoteFile.markStale(true);
- }
- }
- remoteFile = ss.getRemoteFileObject(path, new NullProgressMonitor());
- if (remoteFile != null && !remoteFile.exists())
- {
- // this must be old so we should delete this
- member.delete(true, new NullProgressMonitor());
- }
- }
- }
- else if (member instanceof IContainer)
- {
- discardReplicasOfDeletedFiles(ss, (IContainer)member);
- }
- }
- }
- catch (Exception e)
- {
- }
- }
-
- /**
- * @since 3.0
- */
- public static Object downloadResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
-
- if (!srcFileOrFolder.exists()) {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), "LOCALHOST"); //$NON-NLS-1$
-
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- return errorMessage;
- }
-
- if (srcFileOrFolder.isFile()) {
- IFile tempFile = downloadFileToWorkspace(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", System.getProperty("user.name")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- return tempFile;
- }
- else {
- return null;
- }
- }
-
- /**
- * Replicates a local file to the temporary files project in the workspace.
- * @param srcFileOrFolder the file to copy.
- * @param monitor the progress monitor.
- * @return the resulting local replica.
- * @since 3.0
- */
- protected static IFile downloadFileToWorkspace(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 = RemoteFileUtility.getSystemFileTransferModeRegistry().isBinary(srcFileOrFolder);
- if (storedModifiedStamp == remoteModifiedStamp && (usedBin == shouldUseBin))
- {
- // set the appropriate readonly flag
- boolean readOnly = !srcFileOrFolder.canWrite();
- setReadOnly(tempFile, readOnly);
-
- return tempFile;
- }
- }
- }
-
- try
- {
- // copy remote file to workspace
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(tempFile);
- String encoding = tempFile.getParent().getDefaultCharset();
-
- download(srcFileOrFolder, tempFile, encoding, 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())
- {
- // set the appropriate readonly flag
- boolean readOnly = !srcFileOrFolder.canWrite();
- setReadOnly(tempFile, readOnly);
-
- if (RemoteFileUtility.getSystemFileTransferModeRegistry().isText(srcFileOrFolder))
- {
- try
- {
- if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
- {
- tempFile.refreshLocal(IResource.DEPTH_ZERO, null/*monitor*/);
- }
- String cset = tempFile.getCharset();
- if (!cset.equals(encoding))
- {
- tempFile.setCharset(encoding, monitor);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError("An exception occured " + e.getMessage(), e); //$NON-NLS-1$
- 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();
- }
- else {
- // make sure the temp file can be written to
- if (tempFile.isReadOnly()){
- setReadOnly(tempFile, false);
- }
- }
-
- // encoding conversion required if it a text file but not an xml file
- boolean isBinary = RemoteFileUtility.getSystemFileTransferModeRegistry().isBinary(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)
- {
- String s = new String(buffer, 0, bytesRead, hostEncoding);
- if (bufWriter != null)
- 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)
- {
- 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
- * @since 3.0
- */
- public static Object downloadResourceToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
- {
-
- boolean ok = true;
-
- IRemoteFileSubSystem srcFS = srcFileOrFolder.getParentRemoteFileSubSystem();
-
- if (!srcFS.isConnected())
- {
- return null;
- }
- if (!srcFileOrFolder.exists())
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
-
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- return errorMessage;
- }
-
- if (srcFileOrFolder.isFile())
- {
- IFile tempFile = downloadFileToWorkspace(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 = doSuperTransfer(srcFileOrFolder.getParentRemoteFileSubSystem());
-
- if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot()
- && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().isLocal()))
- {
- try
- {
- tempFolder = compressedDownloadToWorkspace(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.list(srcFileOrFolder, monitor);
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError(e.getMessage(), e);
- SystemMessageDialog.displayMessage(e);
- }
- IResource[] childResources = null;
-
- if (children != null)
- {
- childResources = new IResource[children.length];
- 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 = downloadFileToWorkspace(child, monitor);
- }
- else
- {
- childResource = (IResource) downloadResourceToWorkspace(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 && childResources != 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 = RSECorePlugin.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().isLocal())
- {
- 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
- * @since 3.0
- */
- public static Object uploadResourceFromWorkspace(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor)
- {
- return uploadResourceFromWorkspace(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
- * @since 3.0
- */
- public static SystemRemoteResourceSet uploadResourcesFromWorkspace(SystemWorkspaceResourceSet workspaceSet, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
- {
-
-
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
-
- boolean doSuperTransferPreference = doSuperTransfer(targetFS);
- SystemRemoteResourceSet resultSet = new SystemRemoteResourceSet(targetFS);
-
- if (targetFolder.isStale())
- {
- try
- {
- targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor);
- }
- catch (Exception e)
- {
- }
- }
-
- if (!targetFolder.canWrite())
- {
- String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
-
- SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- resultSet.setMessage(errorMsg);
-
- return resultSet;
- }
-
- if (!targetFS.isConnected())
- {
- return null;
- }
- boolean isTargetArchive = targetFolder.isArchive();
- boolean isTargetVirtual = ArchiveHandlerManager.isVirtual(targetFolder.getAbsolutePath());
- if (isTargetArchive && !targetFolder.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement()) return null;
- StringBuffer newPathBuf = new StringBuffer(targetFolder.getAbsolutePath());
- if (isTargetArchive)
- {
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- }
- else if (isTargetVirtual)
- {
- //if the target is a virtual folder, we need to append ArchiveHandlerManager.VIRTUAL_FOLDER_SEPARATOR
- //instead of the file separator of the file subsystem.
- newPathBuf.append(ArchiveHandlerManager.VIRTUAL_FOLDER_SEPARATOR);
- }
- else
- {
- int newPathBufLenth = newPathBuf.length();
- if (newPathBufLenth > 0 && !((newPathBuf.charAt(newPathBufLenth - 1) == targetFolder.getSeparatorChar())))
- {
- 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
- {
- String[] folderAndFilePaths = (String[])newFilePathList.toArray(new String[newFilePathList.size()]);
- IRemoteFile[] results = targetFS.getRemoteFileObjects(folderAndFilePaths, monitor);
- existingFiles = new SystemRemoteResourceSet(targetFS, results);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
-
- // clear the list so that next time we use renamed names
- newFilePathList.clear();
- //List toCopyNames = new ArrayList(); //was used for rename operation (no longer needed)
- List copyFilesOrFolders = new ArrayList();
- List existingFilesOrFolders = new ArrayList();
-
- for (int i = 0; i < resources.size() && !resultSet.hasMessage(); i++)
- {
- if (monitor != null && monitor.isCanceled())
- {
- try
- {
- IRemoteFile[] results = targetFS.getRemoteFileObjects((String[])newFilePathList.toArray(new String[newFilePathList.size()]), monitor);
- resultSet = new SystemRemoteResourceSet(targetFS, results);
- if (workspaceSet.hasMessage())
- {
- resultSet.setMessage(workspaceSet.getMessage());
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return resultSet;
- }
-
-
- IResource srcFileOrFolder = (IResource)resources.get(i);
- String name = srcFileOrFolder.getName();
-
- if (srcFileOrFolder instanceof IFile)
- {
- String oldPath = newPathBuf.toString() + name;
- if (checkForCollisions)
- {
- if(existingFiles!=null)
- {
- if(checkForCollision(existingFiles, targetFolder, oldPath))
- {
- existingFilesOrFolders.add(existingFiles.get(oldPath));
- }
- }
- //below code is used for renaming operation, which is no longer needed
- /*int severity = status.getSeverity();
-
- if (severity == IStatus.OK) {
- name = status.getMessage();
- toCopyNames.add(name);
- }
- else if (severity == IStatus.CANCEL) {
-
- int code = status.getCode();
-
- if (code == IStatus.CANCEL) {
- continue;
- }
- else if (code == RenameStatus.CANCEL_ALL) {
- break;
- }
- }*/
- }
- copyFilesOrFolders.add(srcFileOrFolder);
- }
-
- else if (srcFileOrFolder instanceof IContainer)
- {
- String oldPath = newPathBuf.toString() + name;
- if (checkForCollisions)
- {
- if(existingFiles!=null)
- {
- if(checkForCollision(existingFiles, targetFolder, oldPath))
- {
- existingFilesOrFolders.add(existingFiles.get(oldPath));
- }
- }
- //below code is used for renaming operation, which is no longer needed
- /*
- RenameStatus status = checkForCollision(existingFiles, targetFolder, name, oldPath, toCopyNames);
- int severity = status.getSeverity();
-
- if (severity == IStatus.OK) {
- name = status.getMessage();
- toCopyNames.add(name);
- }
- else if (severity == IStatus.CANCEL) {
-
- int code = status.getCode();
-
- if (code == IStatus.CANCEL) {
- continue;
- }
- else if (code == RenameStatus.CANCEL_ALL) {
- break;
- }
- }
- */
-
- }
- copyFilesOrFolders.add(srcFileOrFolder);
- }
- }
- boolean overwrite=false;
- if(existingFilesOrFolders.size()>0)
- {
- CopyRunnable cr = new CopyRunnable(existingFilesOrFolders);
- Display.getDefault().syncExec(cr);
- overwrite = cr.getOk();
- }
- if(existingFilesOrFolders.size()==0 || overwrite)
- {
- for (int i = 0; i < copyFilesOrFolders.size() && !resultSet.hasMessage(); i++)
- {
-
- IResource srcFileOrFolder = (IResource)copyFilesOrFolders.get(i);
- String name = srcFileOrFolder.getName();
-
- String newPath = newPathBuf.toString() + name;
-
- if (srcFileOrFolder instanceof IFile)
- {
- try
- {
- String srcCharSet = RemoteFileUtility.getSourceEncoding((IFile)srcFileOrFolder);
-
- String srcFileLocation = srcFileOrFolder.getLocation().toOSString();
-
- // for bug 236723, getting remote encoding for target instead of default for target fs
- String remoteEncoding = targetFolder.getEncoding();
- String systemEncoding = targetFS.getRemoteEncoding();
-
- targetFS.upload(srcFileLocation, srcCharSet, newPath, remoteEncoding,monitor);
- newFilePathList.add(newPath);
-
- // should check preference first
- if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
- {
- SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
- try {
- IRemoteFile newFile = targetFS.getRemoteFileObject(newPath, monitor);
- targetFS.setLastModified(newFile, properties.getRemoteFileTimeStamp(), monitor);
- }
- catch (SystemUnsupportedOperationException e){
- // service doesn't support setLastModified
- SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
- }
- }
- }
-
- catch (RemoteFileIOException e)
- {
- resultSet.setMessage(e.getSystemMessage());
- }
- catch (SystemMessageException e)
- {
- resultSet.setMessage(e.getSystemMessage());
- }
-
- if (resultSet.hasMessage())
- {
- return resultSet;
- }
- }
- if(srcFileOrFolder instanceof IContainer)
- {
- IContainer directory = (IContainer) srcFileOrFolder;
- if (!directory.exists())
- {
- try
- {
- directory.refreshLocal(IResource.DEPTH_ONE, monitor);
- }
- catch (Exception e)
- {
-
- }
- }
- try
- {
- if (existingFiles != null)
- {
- IRemoteFile newTargetFolder = (IRemoteFile)existingFiles.get(newPath);
- // newTargetFolder will be null if user chose to do a rename
- if (newTargetFolder == null) {
- newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor);
- }
- if (newTargetFolder != null && !newTargetFolder.exists())
- {
- newTargetFolder = targetFS.createFolder(newTargetFolder, monitor);
- }
-
- boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().isLocal();
- boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive();
-
- if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal)
- {
- compressedUploadFromWorkspace(directory, newTargetFolder, monitor);
- }
- else
- {
- //sometimes, IContainer#members does not return the right members under
- //this folder. We need to call refreshLocal() first to overcome this problem
- directory.refreshLocal(IResource.DEPTH_ONE, monitor);
- IResource[] children = directory.members();
- SystemWorkspaceResourceSet childSet = new SystemWorkspaceResourceSet(children);
- SystemRemoteResourceSet childResults = uploadResourcesFromWorkspace(childSet, newTargetFolder, monitor, false);
- if (childResults == null)
- {
- return null;
- }
- if (childResults.hasMessage())
- {
- resultSet.setMessage(childResults.getMessage());
- }
- }
-
- newFilePathList.add(newPath);
- }
- }
- catch (SystemMessageException e)
- {
- workspaceSet.setMessage(e.getSystemMessage());
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
-
- try
- {
- IRemoteFile[] results = targetFS.getRemoteFileObjects((String[])newFilePathList.toArray(new String[newFilePathList.size()]), monitor);
- resultSet = new SystemRemoteResourceSet(targetFS, results);
- if (workspaceSet.hasMessage())
- {
- resultSet.setMessage(workspaceSet.getMessage());
- }
- }
- 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
- * @since 3.0
- */
- public static Object uploadResourceFromWorkspace(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
- {
- Object result = null;
-
- IRemoteFileSubSystem targetFS = targetFolder.getParentRemoteFileSubSystem();
-
- if (targetFolder.isStale())
- {
- try
- {
- targetFolder = targetFS.getRemoteFileObject(targetFolder.getAbsolutePath(), monitor);
- }
- catch (Exception e)
- {
- }
- }
-
- if (!targetFolder.canWrite())
- {
- String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
- SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- 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 srcCharSet = null;
-
- boolean isText = RemoteFileUtility.getSystemFileTransferModeRegistry().isText(newPath);
- if (isText)
- {
- srcCharSet = RemoteFileUtility.getSourceEncoding((IFile)srcFileOrFolder);
- }
- IPath location = srcFileOrFolder.getLocation();
- IRemoteFile copiedFile = null;
- if (location == null) // remote EFS file?
- {
- if (srcFileOrFolder instanceof IFile)
- {
- // copy using input stream
- try
- {
- InputStream inStream = ((IFile)srcFileOrFolder).getContents();
-
- if (targetFS instanceof FileServiceSubSystem)
- {
- /*
- OutputStream outStream = targetFS.getOutputStream(targetFolder.getAbsolutePath(), name, IFileService.NONE, monitor);
-
- byte[] buffer = new byte[1024];
- int readCount;
- while( (readCount = inStream.read(buffer)) > 0)
- {
- outStream.write(buffer, 0, readCount);
- }
- outStream.close();
- */
- IFileService fileService = ((FileServiceSubSystem)targetFS).getFileService();
-
- // for bug 236723, getting remote encoding for target instead of default for target fs
- String remoteEncoding = targetFolder.getEncoding();
- fileService.upload(inStream, targetFolder.getAbsolutePath(), name, !isText, remoteEncoding, monitor);
- }
- }
- catch (Exception e)
- {
- }
-
- }
- }
- else
- {
- // just copy using local location
- String srcFileLocation = location.toOSString();
-
- // for bug 236723, getting remote encoding for target instead of default for target fs
- String remoteEncoding = targetFolder.getEncoding();
- targetFS.upload(srcFileLocation, srcCharSet, newPath, remoteEncoding, monitor);
- }
-
- copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor);
-
- // should check preference first
-
- if (RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS))
- {
- SystemIFileProperties properties = new SystemIFileProperties(srcFileOrFolder);
- long timestamp = properties.getRemoteFileTimeStamp();
-
- // srcFileOrFolder may not be a file from the RemoteSystemTempFiles folder in which
- // case there will be no stored property for the remote timestamp.
- if (timestamp == 0)
- timestamp = srcFileOrFolder.getLocalTimeStamp();
-
- try {
- targetFS.setLastModified(copiedFile, timestamp, monitor);
- }
- catch (SystemUnsupportedOperationException e){
- // service doesn't support setLastModified
- SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
- }
- }
-
- return copiedFile;
- }
-
- catch (RemoteFileIOException e)
- {
- SystemMessageDialog.displayMessage(e);
- return e.getSystemMessage();
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog.displayMessage(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, monitor);
- if (!newTargetFolder.exists())
- {
- targetFS.createFolder(newTargetFolder, monitor);
- newTargetFolder.markStale(true);
- newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor);
- }
-
-
- if (!directory.isSynchronized(IResource.DEPTH_ONE))
- {
- try
- {
- directory.refreshLocal(IResource.DEPTH_ONE, monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
-
- boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().isLocal();
- boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive();
- boolean doSuperTransferPreference = doSuperTransfer(targetFS);
- if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal)
- {
- compressedUploadFromWorkspace(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 (uploadResourceFromWorkspace(child, newTargetFolder, monitor, false) == null)
- {
- return null;
- }
- }
- }
- }
- return newTargetFolder;
-
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog.displayMessage(e);
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- return null;
- }
-
- return result;
- }
-
- /**
- * @since 3.0
- */
- public static void compressedUploadFromWorkspace(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;
- IRemoteFileSubSystem targetFS = null;
- IRemoteFile remoteArchive = 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(), monitor); //$NON-NLS-1$
- FileServiceSubSystem localSS = (FileServiceSubSystem)getLocalFileSubSystem();
- try
- {
- localSS.delete(destinationArchive, monitor);
- }
- catch (Exception e)
- {
-
- }
- localSS.createFile(destinationArchive, monitor);
-
- 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(), monitor);
- 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(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
- remoteArchive = targetFS.getRemoteFileObject(newPath, monitor);
-
- monitor.subTask(FileResources.RESID_SUPERTRANSFER_PROGMON_SUBTASK_EXTRACT);
- String compressedFolderPath = newPath + ArchiveHandlerManager.VIRTUAL_SEPARATOR + directory.getName();
- IRemoteFile compressedFolder = targetFS.getRemoteFileObject(compressedFolderPath, monitor);
-
- // extract the compressed folder from the temp archive on remote
- targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor);
-
- }
- catch (SystemMessageException e)
- {
- if (monitor.isCanceled())
- {
- //If this operation if cancelled, and if the destination has already been created (partially)
- //in the host, we need to delete it.
- if (newTargetFolder.exists())
- {
- targetFS.delete(newTargetFolder, null);
- }
- }
- throw e;
- //SystemMessageDialog.displayMessage(e);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- throw e;
- }
- finally {
- if (newPath == null) cleanup(destinationArchive, null);
- else cleanup(destinationArchive, new File(newPath));
-
- // delete the temp remote archive
- // now, DStoreFileService#getFile() (which is invoked by getRemoteFileObject() call)
- // has been updated to also put the query object into the dstore file map,
- // we don't need to do the query on the remoteArchive object before the
- // delete.
- if (remoteArchive != null && remoteArchive.exists())
- {
- targetFS.delete(remoteArchive, null);
- }
- monitor.done();
- }
- }
-
- 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);
- try {
- target.getParentRemoteFileSubSystem().setLastModified(target, properties.getRemoteFileTimeStamp(), monitor);
- }
- catch (SystemUnsupportedOperationException e){
- // service doesn't support setLastModified
- SystemBasePlugin.logError("Unable to set last modified", e); //$NON-NLS-1$
- }
- }
- 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(), monitor);
- if (!newtarget.exists()) return;
- transferProperties(child, newtarget, monitor);
- }
- }
- }
- }
-
- protected static String getArchiveExtensionFromProperties()
- {
-
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- String archiveType = store.getString(ISystemFilePreferencesConstants.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;
- }
-
- /**
- * @since 3.0
- */
- public static IResource compressedDownloadToWorkspace(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, monitor);
- if (destinationArchive.exists())
- {
- directory.getParentRemoteFileSubSystem().delete(destinationArchive, monitor);
- }
- directory.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor);
- }
- catch (RemoteFileSecurityException e)
- {
- // can't write to this directory
- }
- }
- if (destinationArchive == null)
- {
- String homeFolder = directory.getParentRemoteFileSubSystem().getRemoteFileObject("./", monitor).getAbsolutePath(); //$NON-NLS-1$
- String destArchPath = homeFolder + separator + file.getName();
- destinationArchive = directory.getParentRemoteFileSubSystem().getRemoteFileObject(destArchPath, monitor);
- if (destinationArchive.exists()) directory.getParentRemoteFileSubSystem().delete(destinationArchive,monitor);
- destinationArchive = directory.getParentRemoteFileSubSystem().createFile(destinationArchive, monitor);
- }
-
- 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(), monitor);
-
- // DKM - copy src dir to remote temp archive
- try
- {
- sourceFS.copy(sourceDir, destinationArchive, sourceDir.getName(), monitor);
- }
- catch (SystemMessageException e)
- {
- if (monitor.isCanceled())
- {
- cleanup(destinationArchive, null);
- return targetResource;
- }
- }
- destinationArchive.markStale(true);
-
- // reget it so that it's properties (namely "size") are correct
- cpdest = destinationArchive = destinationArchive.getParentRemoteFileSubSystem().getRemoteFileObject(destinationArchive.getAbsolutePath(), monitor);
-
- 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.getAbsolutePath(), System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
-
-
- ISystemArchiveHandler handler = ArchiveHandlerManager.getInstance().getRegisteredHandler(dest);
-
- VirtualChild[] arcContents = handler.getVirtualChildrenList(null);
- 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) == null) continue;
- String currentTargetPath = targetResource.getParent().getLocation().toOSString() + localSS.getSeparator() + useLocalSeparator(arcContents[i].fullName);
- IRemoteFile currentTarget = localSS.getRemoteFileObject(currentTargetPath, monitor);
- 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, monitor);
- boolean shouldExtract = currentSource.isFile();
-
- if (!shouldExtract)
- {
- // check for empty dir
- IRemoteFile[] children = localSS.list(currentSource, monitor);
-
- if (children == null || children.length == 0)
- {
- shouldExtract = true;
- }
- }
-
- if (shouldExtract)
- {
- String msgTxt = NLS.bind(FileResources.MSG_EXTRACT_PROGRESS, currentSource.getName());
- monitor.subTask(msgTxt);
-
-
- boolean canWrite = true;
- if (currentTarget != null)
- {
- 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;
- }
-
- }
- }
- }
- catch (SystemMessageException e)
- {
- SystemMessageDialog.displayMessage(e);
- cleanup(cpdest, dest);
- }
- 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 (SystemMessageException e)
- {
- SystemMessageDialog.displayMessage(e);
- }
- 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.getInstance();
- 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.getHost().getSystemType().isLocal())
- {
- absolutePath = editMgr.getWorkspacePathFor(actualHost, srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getParentRemoteFileSubSystem());
- }
-
- IPath remote = new Path(absolutePath);
- absolutePath = SystemFileNameHelper.getEscapedPath(remote.toOSString());
-
- 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.getInstance();
- 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"; //$NON-NLS-1$
- path = path.append(separator + actualHost + separator);
-
- // this is only for local, so no remote name required
- String absolutePath = editMgr.getWorkspacePathFor(actualHost, srcFileOrFolder.getAbsolutePath(), null); // no subsystem
-
- 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);
- try {
- IResource[] resources = container.members();
- boolean found = false;
- for (int r = 0; r < resources.length && !found; r++){
- IResource resource = resources[r];
- if (resource instanceof IFile){
- String resourceName = resource.getName();
- if (resourceName.toLowerCase().equals(fileName.toLowerCase())){
- found = true;
- fileName = resourceName;
- }
- }
- }
- }
- catch (CoreException e){}
-
- actualPath = container.getLocation().append(fileName);
- return actualPath;
- }
-
- return expectedPath;
- }
-
-
- /**
- * @since 3.0
- */
- public static String getActualHostFor(IRemoteFileSubSystem subsystem, String remotePath)
- {
- String hostname = subsystem.getHost().getHostName();
- if (subsystem.getHost().getSystemType().isLocal())
- {
- String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath, subsystem);
- return result;
- }
- return hostname;
- }
-
- /**
- * @since 3.0
- */
- public static String getActualHostFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- return SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath, subsystem);
- }
-
- 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.getHost().getSystemType().isLocal())
- {
- String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath, (IRemoteFileSubSystem)subsystem);
- if (!result.equals(hostname))
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @since 3.0
- */
- protected static boolean isRemoteFileMounted(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- String result = SystemRemoteEditManager.getInstance().getActualHostFor(hostname, remotePath, subsystem);
-
- if (!result.equals(hostname)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * @since 3.0
- */
- protected static String getWorkspaceRemotePath(IRemoteFileSubSystem subsystem, String remotePath) {
-
- if (subsystem != null) {
- return SystemRemoteEditManager.getInstance().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath, subsystem);
- }
-
- return remotePath;
- }
-
- /**
- * @since 3.0
- */
- protected static String getWorkspaceRemotePath(String hostname, String remotePath, IRemoteFileSubSystem subsystem) {
- return SystemRemoteEditManager.getInstance().getWorkspacePathFor(hostname, remotePath, subsystem);
- }
-
- protected static RenameStatus checkForCollision(SystemRemoteResourceSet existingFiles, IRemoteFile targetFolder, String oldName, String oldPath)
- {
- return checkForCollision(existingFiles, targetFolder, oldName, oldPath, null);
- }
- /**
- * @since 3.0
- */
- protected static RenameStatus checkForCollision(SystemRemoteResourceSet existingFiles, IRemoteFile targetFolder, String oldName, String oldPath, List NamesInUse)
- {
- String newName = oldName;
-
- 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, NamesInUse);
- 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); //$NON-NLS-1$
- }
- else if (state == RenameRunnable.RENAME_DIALOG_CANCELLED) {
- status = new RenameStatus(IStatus.CANCEL, Activator.getDefault().getBundle().getSymbolicName(), IStatus.CANCEL, "", null); //$NON-NLS-1$
- }
- }
- else {
- status = new RenameStatus(IStatus.OK, Activator.getDefault().getBundle().getSymbolicName(), IStatus.OK, newName, null);
- }
- }
-
-
- return status;
- }
-
- /**
- * @since 3.0
- */
- protected static boolean checkForCollision(SystemRemoteResourceSet existingFiles, IRemoteFile targetFolder, String oldPath)
- {
-
- IRemoteFile targetFileOrFolder = (IRemoteFile) existingFiles.get(oldPath);
-
-
- if (targetFileOrFolder != null && targetFileOrFolder.exists())
- return true;
- else
- return false;
- }
-
- /**
- * @since 3.0
- */
- public static class RenameRunnable implements Runnable
- {
- private IRemoteFile _targetFileOrFolder;
- private String _newName;
- private List _namesInUse = new ArrayList();
- private int cancelStatus;
-
- /**
- * @since 3.0
- */
- public static int RENAME_DIALOG_NOT_CANCELLED = -1;
- /**
- * @since 3.0
- */
- public static int RENAME_DIALOG_CANCELLED = 0;
- /**
- * @since 3.0
- */
- public static int RENAME_DIALOG_CANCELLED_ALL = 1;
-
- public RenameRunnable(IRemoteFile targetFileOrFolder)
- {
- _targetFileOrFolder = targetFileOrFolder;
- cancelStatus = RENAME_DIALOG_NOT_CANCELLED;
- }
-
- /**
- * @since 3.0
- */
- public RenameRunnable(IRemoteFile targetFileOrFolder, List namesInUse)
- {
- _targetFileOrFolder = targetFileOrFolder;
- cancelStatus = RENAME_DIALOG_NOT_CANCELLED;
- _namesInUse=namesInUse;
- }
-
- public void run() {
- ValidatorFileUniqueName validator = null;
- SystemRenameSingleDialog dlg;
- if(_namesInUse!=null && _namesInUse.size()>0)
- {
- dlg = new SystemRenameSingleDialog(null, true, _targetFileOrFolder, validator, _namesInUse); // true => copy-collision-mode
- }
- else
- {
- 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, new NullProgressMonitor());
-
- //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); //$NON-NLS-1$
- }
-
- 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);
- }
- }
-
-
-
-
- /**
- * replicates a remote 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
- *
- * @deprecated use downloadFileToWorkspace
- */
- protected static IFile copyRemoteFileToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
- {
- return downloadFileToWorkspace(srcFileOrFolder, monitor);
- }
-
-
-
-
- /**
- * This method downloads a set of remote resources to the workspace. It uses
- * the downloadMultiple() API of the remote file subsystem and service layers so
- * for some service implementations, this is a big optimization
- *
- * @param remoteSet the set of resources to download
- * @param monitor the progress monitor
- * @return the set of temp files created as a result of the download.
- *
- * @deprecated use downloadResourcesToWorkspaceMultiple
- * @since 3.0
- */
- public static SystemWorkspaceResourceSet copyRemoteResourcesToWorkspaceMultiple(SystemRemoteResourceSet remoteSet, IProgressMonitor monitor)
- {
- return downloadResourcesToWorkspaceMultiple(remoteSet, monitor);
- }
-
-
- /**
- * 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
- *
- * @deprecated use downloadResourcesToWorkspace
- */
- public static SystemWorkspaceResourceSet copyRemoteResourcesToWorkspace(SystemRemoteResourceSet remoteSet, IProgressMonitor monitor)
- {
- return downloadResourcesToWorkspace(remoteSet, monitor);
- }
-
- /**
- *
- * @deprecated use downloadResourceToWorkspace
- */
- public static Object copyRemoteResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
- return downloadResourceToWorkspace(srcFileOrFolder, monitor);
- }
-
- /**
- * 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.
- *
- * @deprecated use downloadFileToWorkspace
- */
- protected static IFile copyRemoteFileToWorkspace(File srcFileOrFolder, IProgressMonitor monitor)
- {
- return downloadFileToWorkspace(srcFileOrFolder, monitor);
- }
-
-
-
- /**
- * 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
- *
- * @deprecated use downloadResourceToWorkspace
- */
- public static Object copyRemoteResourceToWorkspace(IRemoteFile srcFileOrFolder, IProgressMonitor monitor)
- {
- return downloadResourceToWorkspace(srcFileOrFolder, monitor);
- }
- /**
- * 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
- *
- * @deprecated use uploadResourceFromWorkspace
- */
- public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor)
- {
- return uploadResourceFromWorkspace(srcFileOrFolder, targetFolder, monitor);
- }
-
- /**
- * 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 collisions or not
- * @return the resulting remote objects
- *
- * @deprecated use uploadResourcesFromWorkspace
- */
- public static SystemRemoteResourceSet copyWorkspaceResourcesToRemote(SystemWorkspaceResourceSet workspaceSet, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
- {
- return uploadResourcesFromWorkspace(workspaceSet, targetFolder, monitor, checkForCollisions);
- }
-
- /**
- * 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 collisions or not
- * @return the result remote object
- *
- * @deprecated use uploadResourceFromWorkspace
- */
- public static Object copyWorkspaceResourceToRemote(IResource srcFileOrFolder, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions)
- {
- return uploadResourceFromWorkspace(srcFileOrFolder, targetFolder, monitor, checkForCollisions);
- }
-
- /**
- * @param directory
- * @param newTargetFolder
- * @param monitor
- * @throws Exception
- *
- * @deprecated use compressedUploadFromWorkspace
- */
- public static void compressedCopyWorkspaceResourceToRemote(IContainer directory, IRemoteFile newTargetFolder, IProgressMonitor monitor) throws Exception
- {
- compressedUploadFromWorkspace(directory, newTargetFolder, monitor);
- }
-
- /**
- *
- * @param directory
- * @param monitor
- * @return
- * @throws Exception
- *
- * @deprecated use compressedDownloadToWorkspace
- */
- public static IResource compressedCopyRemoteResourceToWorkspace(IRemoteFile directory, IProgressMonitor monitor) throws Exception
- {
- return compressedDownloadToWorkspace(directory, monitor);
- }
-
-}
-
-
-
-
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/SaveAsForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java
deleted file mode 100644
index 20ecd4dda..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.widgets;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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.rse.ui.view.SystemAdapterHelpers;
-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, new NullProgressMonitor());
- }
- catch (Exception e)
- {
- }
-
- //System.out.println("...saveasMbr null? "+ (saveasMbr==null));
- if (saveasFile != null && saveasFile.exists())
- {
- String msgTxt = NLS.bind(FileResources.MSG_UPLOAD_FILE_EXISTS, fileName);
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_UPLOAD_FILE_EXISTS,
- IStatus.WARNING, msgTxt);
- 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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 = getSelectedParent();
-
- if (remoteFile.isFile())
- {
- fileName = remoteAdapter.getName(selectedObject);
- fileNameText.setText(fileName);
- }
- else
- {
- fileName =initialFileName;
- if (fileName != null)
- {
- 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/widgets/SystemFileFilterStringEditPane.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java
deleted file mode 100644
index 268bd8bc8..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java
+++ /dev/null
@@ -1,865 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.widgets;
-
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-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.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.internal.ui.actions.SystemTestFilterStringAction;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-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 subsetByFileNameRadioButton;
- protected Button subsetByFileTypesRadioButton;
- protected Button selectTypesButton;
- protected Label labelFile;
- protected Label labelTypes;
- protected Text textFile;
- protected Text 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
- private SystemTestFilterStringAction testAction = null;
- private 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);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#setEditable(boolean)
- */
- public void setEditable(boolean editable) {
- super.setEditable(editable);
- enable(filesOnlyCheckBox, editable);
- enable(subsetByFileNameRadioButton, editable);
- enable(selectTypesButton, editable);
- enable(labelFile, editable);
- enable(textFile, editable);
- enable(folderCombo, editable);
- enable(subsetByFileTypesRadioButton, editable);
- enable(labelTypes, editable);
- enable(textTypes, editable);
- }
-
- /**
- * 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 //$NON-NLS-1$
- else
- historyKey = "files.filterStringDialog"; // unique to us //$NON-NLS-1$
-
- boolean readonly = false;
- folderCombo = SystemFileWidgetHelpers.createFolderCombo(composite_prompts, null, gridColumns, historyKey, readonly);
- folderCombo.setShowNewConnectionPrompt(false);
- SystemWidgetHelpers.setHelp(folderCombo, RSEUIPlugin.HELPPREFIX+"ffsd0001"); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite_prompts," ",gridColumns); // FILLER //$NON-NLS-1$
-
- // 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"); //$NON-NLS-1$
- updateGridData(subsetByFileNameRadioButton, gridColumns);
-
- // File name prompt
- //textFile = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, rb, RESID_FILEFILTERSTRING_FILE_ROOT);
- String indent = " "; //$NON-NLS-1$
- 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"); //$NON-NLS-1$
- updateGridData(textFile, gridColumns-1);
- textFile.setText("*"); //$NON-NLS-1$
-
-
- // "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"); //$NON-NLS-1$
- 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"); //$NON-NLS-1$
- 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 //$NON-NLS-1$
- filesOnlyCheckBox = SystemWidgetHelpers.createCheckBox(composite_prompts, gridColumns, null,
- SystemFileResources.RESID_FILEFILTERSTRING_INCFILESONLY_LABEL, SystemFileResources.RESID_FILEFILTERSTRING_INCFILESONLY_TOOLTIP);
- SystemWidgetHelpers.setHelp(filesOnlyCheckBox, RSEUIPlugin.HELPPREFIX+"ffsd0006"); //$NON-NLS-1$
-
- // 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);
-
- setEditable(editable);
- 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); //$NON-NLS-1$
- String defaultFile = rffs.getFile();
- textFile.setText((defaultFile==null) ? "" : defaultFile); //$NON-NLS-1$
- String defaultTypes = rffs.getTypesAsString();
- textTypes.setText((defaultTypes==null) ? "" : defaultTypes); //$NON-NLS-1$
- 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(""); //$NON-NLS-1$
- textFile.setText("*"); //$NON-NLS-1$
- textTypes.setText(""); //$NON-NLS-1$
- 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 && fileNameText != null) {
- return fileNameText.equals("*"); //$NON-NLS-1$
- }
- // 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
- */
- private 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_ERROR_NOFILETYPES,
- IStatus.ERROR, FileResources.FILEMSG_ERROR_NOFILETYPES, FileResources.FILEMSG_ERROR_NOFILETYPES_DETAILS);
- }
- }
- controlInError = textFile;
- }
- if ((errorMessage == null) && (inputFilterStrings!=null) && !skipUniquenessChecking)
- {
- boolean notUnique = false;
- String currFilterString = getFilterString();
- if (containsFilterString(currFilterString))
- notUnique = true;
- if (notUnique)
- {
- String msgTxt = NLS.bind(FileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, currFilterString);
- errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE,
- IStatus.ERROR, msgTxt);
- }
- 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_VALIDATE_PATH_EMPTY,
- IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
- }
- }
- // 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("*")) { //$NON-NLS-1$
-
- // 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_VALIDATE_PATH_EMPTY,
- IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
- }
- }
- }
- }
- }
- // 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"); //$NON-NLS-1$
- 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)
- {
- String[] strings = filter.getFilterStrings();
- Vector v = new Vector(strings.length);
- v.addAll(Arrays.asList(strings));
- 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("*")) { //$NON-NLS-1$
- 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/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 9a4f8edba..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java
+++ /dev/null
@@ -1,789 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect()
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.widgets;
-import java.util.Hashtable;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.osgi.util.NLS;
-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.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.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-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.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-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.Display;
-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 subsystemConfiguration = null;
- //private String subsystemConfigurationID = null;
- //private IRemoteFile[] folders = null;
- private Hashtable resolvedFolders = new Hashtable();
- //private String[] folderStrings = null;
- private IRSESystemType[] 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(IRSESystemType)
- */
- 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);
- browseButton.setToolTipText(SystemFileResources.WIDGET_BROWSE_TOOLTIP);
- 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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new IRSESystemType[] {systemType})
- *
- * @param systemType The system type to restrict to, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemType(IRSESystemType systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new IRSESystemType[] {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;
- 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 = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = sr.getSystemProfile(profileName);
- if (profile == null)
- return null;
- IHost conn = RSECorePlugin.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.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 = RSECorePlugin.getTheSystemRegistry();
-
- // turn profile name into profile object...
- ISystemProfile profile = sr.getSystemProfile(profileName);
- if (profile == null)
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_PROFILE_NOTFOUND, profileName);
- throw new Exception(msgTxt);
- }
-
- // turn connection name into connection object...
- IHost conn = RSECorePlugin.getTheSystemRegistry().getHost(profile,connName);
- if (conn == null)
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_CONNECTION_NOTFOUND, connName);
- throw new Exception(msgTxt);
- }
-
- // turn folder name into folder object...
- IRemoteFile remoteFolder = null;
- ISubSystem[] filesubsystems = null;
- //if (subsystemConfigurationID == null)
- filesubsystems = RemoteFileUtility.getFileSubSystems(conn);
- //else
- // filesubsystems = sr.getSubSystems(subsystemConfigurationID, conn);
-
- if (filesubsystems.length == 0)
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_CONNECTION_NOTFOUND, connName);
- throw new Exception(msgTxt);
- }
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)filesubsystems[0]; // what else to do?
- if (!ss.isConnected())
- {
- try
- {
- if (Display.getCurrent() == null) {
- ss.connect(new NullProgressMonitor(), false);
- } else {
- ss.connect(false, null);
- }
- } catch (OperationCanceledException exc)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELLED, conn.getHostName());
- throw new Exception(msgTxt);
- } catch (Exception exc)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, conn.getHostName());
- throw new Exception(msgTxt);
- }
- }
- if (ss.isConnected())
- remoteFolder = ss.getRemoteFileObject(dirName, new NullProgressMonitor());
- 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 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;
- 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.getHost();
-
- 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/SystemRemoteFolderCombo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java
deleted file mode 100644
index 030b8243e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemRemoteFolderCombo.java
+++ /dev/null
@@ -1,577 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- ********************************************************************************/
-
-package org.eclipse.rse.files.ui.widgets;
-import java.util.Iterator;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-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.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-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 subsystemConfiguration = null;
- private IRSESystemType[] 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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
-
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new IRSESystemType[] {systemType})
- *
- * @param systemType The system type to restrict to, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemType(IRSESystemType systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new IRSESystemType[] {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)
- {
- folderLabel.setEnabled(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.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 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;
- 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.setFoldersOnly(true);
- 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, new NullProgressMonitor());
- } catch(SystemMessageException e) {
- SystemBasePlugin.logError("SystemRemoteFolderCombo.wdigetSelected", e); //$NON-NLS-1$
- }
- 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 subsystemConfigurationId 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 203ad6a39..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java
+++ /dev/null
@@ -1,1078 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [229752] [api][regression] SystemSelectRemoteFileOrFolderForm.getInputProvider() cannot be overriden
- ********************************************************************************/
-
-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.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemRemoteObjectMatcher;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.SystemFilterUtil;
-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.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.internal.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.SystemBasePlugin;
-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.ISystemSelectRemoteObjectAPIProvider;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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(IRSESystemType[])}
- * <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)}
- * </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
-{
- protected static final int PROMPT_WIDTH = 400; // The maximum width of the dialog's prompt, in pixels.
-
- // GUI widgets
- protected Label verbiageLabel, spacer1, spacer2;
- protected Text nameEntryValue;
- private SystemViewForm tree;
- private SystemPropertySheetForm ps;
- protected ISystemMessageLine msgLine;
- protected Composite outerParent, ps_composite;
- // inputs
- protected ISystemRegistry sr = null;
- protected String verbiage = 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 ISystemSelectRemoteObjectAPIProvider 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(IRSESystemType[])
- * @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);
- sr = RSECorePlugin.getTheSystemRegistry();
-
- // set default GUI
- verbiage = fileMode ? SystemFileResources.RESID_SELECTFILE_VERBIAGE: SystemFileResources.RESID_SELECTDIRECTORY_VERBIAGE;
- 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
- *
- * @since 3.0 replaced SystemSelectRemoteObjectAPIProvider by
- * ISystemSelectRemoteObjectAPIProvider
- */
- protected ISystemSelectRemoteObjectAPIProvider 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);
- }
-
- /**
- * 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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] 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.verbiage = message;
- if (verbiageLabel != null)
- verbiageLabel.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 = RSECorePlugin.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;
- ISystemFilter 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 = SystemFilterUtil.makeSimpleFilter(filterName);
- filter.setSubSystem(ss);
- filter.setFilterStrings(new String[] {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 = SystemFilterUtil.makeSimpleFilter(rffs.toStringNoSwitches());
- filter.setSubSystem(ss);
- filter.setFilterStrings(new String[] {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.getHost(),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 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/VERBIAGE TEXT AT TOP
- verbiageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, verbiage, gridColumns, false, PROMPT_WIDTH);
- //verbiageLabel = SystemWidgetHelpers.createLabel(composite_prompts, verbiage, 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.getSystemTree().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.getSystemTree().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.
- */
- 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;
- }
-
- /**
- * Returns the system tree
- *
- * @return the system tree
- * @since 3.0 replacing the previous getSystemViewForm method
- */
- public ISystemTree getSystemTree()
- {
- return tree.getSystemTree();
- }
-
- /**
- * @since 3.0
- */
- public Object getSelectedParent()
- {
- return tree.getSelectedParent();
- }
-} \ 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 075925c5b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java
+++ /dev/null
@@ -1,623 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-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.core.runtime.IStatus;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
-import org.eclipse.rse.internal.files.ui.widgets.SystemFileTreeAndListGroup;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes)
- {
- dirCombo.setSystemTypes(systemTypes);
- }
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new IRSESystemType[] {systemType})
- *
- * @param systemType The system type to restrict to, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemType(IRSESystemType systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new IRSESystemType[] {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(); //$NON-NLS-1$
- 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
- */
- private 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_EXCEPTION_OCCURRED,
- IStatus.ERROR, CommonMessages.MSG_EXCEPTION_OCCURRED, 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/internal/files/ui/Activator.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java
deleted file mode 100644
index a2f580b72..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/Activator.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [180519][api] declaratively register adapter factories
- * David McKnight (IBM) - [205820] create the temp files project (if not there) when files.ui is loaded
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [228353] Asynchronously initialize the remote edit project
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui;
-
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-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.core.runtime.preferences.DefaultScope;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.files.ui.resources.SystemUniversalTempFileListener;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-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;
-
- public final static String PLUGIN_ID = "org.eclipse.rse.files.ui"; //$NON-NLS-1$
- public static final String HELPPREFIX = "org.eclipse.rse.files.ui."; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- private class InitRemoteEditJob extends Job {
- public InitRemoteEditJob() {
- super("InitRemoteEditJob"); //$NON-NLS-1$
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- // create the temp files project if it doesn't exist
- // fix for bug 205820
- SystemRemoteEditManager.getInstance().getRemoteEditProject();
-
- // refresh the remote edit project at plugin startup, to ensure
- // it's never closed
- SystemRemoteEditManager.getInstance().refreshRemoteEditProject();
-
- // universal temp file listener
- _tempFileListener = SystemUniversalTempFileListener.getListener();
- // add listener for temp files
- int eventMask = IResourceChangeEvent.POST_CHANGE;
- IWorkspace ws = ResourcesPlugin.getWorkspace();
- ws.addResourceChangeListener(_tempFileListener, eventMask);
-
- return Status.OK_STATUS;
- }
-
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- // DKM - workaround for issue in 175295
- // I had tried SystemFilePreferenceInitializer but it was not being started by the platform because
- // the preference store is rse.ui. In order to fix that, we'd have to migrate the
- // preferences for files to the files.ui preference store.
- // Instead calling this directly at startup.
- initializeDefaultRSEPreferences();
-
- //Bug 228353: Initialize remote edit project in a Job
- //The Job must run AFTER initializeDefaultRSEPreferences(), because that one
- //needs some classes loaded, and the class loader could fall into a deadlock
- //when the deferred Job also wants to load some classes but cannot continue
- //because the start() method is not yet finished
- InitRemoteEditJob job = new InitRemoteEditJob();
- job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.schedule();
-
- }
-
- /**
- * Initializes preferences.
- */
- public void initializeDefaultRSEPreferences()
- {
- //FIXME This should really be migrated into a Preferences Initializer Extension
- //in order to avoid unnecessary plugin activation
- //IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
-
- // as per bug 245260, using scoped store for preference initialization
- IPreferenceStore store = new ScopedPreferenceStore(new DefaultScope(), RSEUIPlugin.getDefault().getBundle().getSymbolicName());
-
- // system cache preferences
- if (store.isDefault(ISystemFilePreferencesConstants.LIMIT_CACHE)){
- store.setDefault(ISystemFilePreferencesConstants.LIMIT_CACHE, ISystemFilePreferencesConstants.DEFAULT_LIMIT_CACHE);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.MAX_CACHE_SIZE)){
- store.setDefault(ISystemFilePreferencesConstants.MAX_CACHE_SIZE, ISystemFilePreferencesConstants.DEFAULT_MAX_CACHE_SIZE);
- }
-
-
- // universal preferences
- if (store.isDefault(ISystemFilePreferencesConstants.FILETRANSFERMODEDEFAULT)){
- store.setDefault(ISystemFilePreferencesConstants.FILETRANSFERMODEDEFAULT, ISystemFilePreferencesConstants.DEFAULT_FILETRANSFERMODE);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.SHOWHIDDEN)){
- store.setDefault(ISystemFilePreferencesConstants.SHOWHIDDEN, false);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS)){
- store.setDefault(ISystemFilePreferencesConstants.PRESERVETIMESTAMPS, ISystemFilePreferencesConstants.DEFAULT_PRESERVETIMESTAMPS);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.SHARECACHEDFILES)){
- store.setDefault(ISystemFilePreferencesConstants.SHARECACHEDFILES, ISystemFilePreferencesConstants.DEFAULT_SHARECACHEDFILES);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.DOSUPERTRANSFER)){
- store.setDefault(ISystemFilePreferencesConstants.DOSUPERTRANSFER, ISystemFilePreferencesConstants.DEFAULT_DOSUPERTRANSFER);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE)){
- store.setDefault(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE, ISystemFilePreferencesConstants.DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE)){
- store.setDefault(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE, ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE);
- }
-
- if (store.isDefault(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE)){
- store.setDefault(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE, ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE);
- }
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception
- {
- super.stop(context);
- if (_tempFileListener != null) {
- IWorkspace ws = ResourcesPlugin.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); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java
deleted file mode 100644
index a137b6b61..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
- * David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * Rupen Mardirossian (IBM) - [227213] Added RESID_CONFLICT_COPY_PATTERN to be used for copying resources to parent folder.
- * David Dykstal (IBM) [231841] Correcting messages for folder creation
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class FileResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.files.ui.FileResources"; //$NON-NLS-1$
-
- public static String RESID_FILES_DOWNLOAD;
-
- 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_existsTitle;
- public static String FileEditorPreference_existsMessage;
-
-
- public static String DefaultEditorDescription_name;
-
-
-
- // 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_SHOWHIDDEN_LABEL;
-
- public static String RESID_PREF_UNIVERSAL_PRESERVE_TIMESTAMPS_LABEL;
-
- public static String RESID_PREF_UNIVERSAL_SHARE_CACHED_FILES_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_TOGGLEBUTTON_LABEL;
- public static String RESID_PREF_UNIVERSAL_FILES_FILETYPES_TOGGLEBUTTON_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;
-
-
-
- public static String RESID_SEARCH_MESSAGE_SEARCHING;
-
- // 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;
-
- // Resource conflict constants
- public static String RESID_CONFLICT_COPY_PATTERN;
-
- // RSE Cache Preferences
- public static String RESID_PREF_CACHE_CLEAR;
- public static String RESID_PREF_CACHE_CLEAR_TOOLTIP;
- public static String RESID_PREF_CACHE_LIMIT_CACHE_SIZE_LABEL;
- public static String RESID_PREF_CACHE_LIMIT_CACHE_SIZE_TOOLTIP;
- public static String RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL;
- public static String RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP;
- 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;
-
- // 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;
-
-
-
- // 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;
-
- // Property Pages
- public static String MESSAGE_ENCODING_NOT_SUPPORTED;
-
- // synchronize cache action
- public static String MESSAGE_ERROR_CACHING_REMOTE_FILES;
- public static String MESSAGE_SYNCHRONIZING_REMOTE_FILE_CACHE;
-
- // link with editor
- public static String MESSAGE_EXPANDING_FOLDER;
- public static String MESSAGE_EXPANDING_FILTER;
- public static String MESSSAGE_QUERYING_FILE;
-
- // file permisssions property page
- public static String MESSAGE_FILE_PERMISSIONS_NOT_SUPPORTED;
- public static String RESID_PREF_PERMISSIONS_PERMISSIONS_LABEL;
- public static String RESID_PREF_PERMISSIONS_TYPE_LABEL;
- public static String RESID_PREF_PERMISSIONS_READ_LABEL;
- public static String RESID_PREF_PERMISSIONS_WRITE_LABEL;
- public static String RESID_PREF_PERMISSIONS_EXECUTE_LABEL;
- public static String RESID_PREF_PERMISSIONS_USER_LABEL;
- public static String RESID_PREF_PERMISSIONS_GROUP_LABEL;
- public static String RESID_PREF_PERMISSIONS_OTHERS_LABEL;
- public static String RESID_PREF_PERMISSIONS_OWNERSHIP_LABEL;
-
- // file permissions messages
- public static String MESSAGE_PENDING;
- public static String MESSAGE_NOT_SUPPORTED;
- public static String MESSAGE_GETTING_PERMISSIONS;
-
- 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_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_EXTENSION_LABEL;
- public static String RESID_PROPERTY_FILE_EXTENSION_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_PERMISSIONS_LABEL;
- public static String RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_OWNER_LABEL;
- public static String RESID_PROPERTY_FILE_OWNER_TOOLTIP;
-
- public static String RESID_PROPERTY_FILE_GROUP_LABEL;
- public static String RESID_PROPERTY_FILE_GROUP_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_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;
-
- public static String RESID_PROPERTY_SEARCH_STATUS_ACTIVE_VALUE;
- public static String RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE;
-
-
- // messages
- public static String MSG_ERROR_FILE_NOTFOUND;
-
- // Remote editing messages
- public static String MSG_DOWNLOAD_NO_WRITE;
- public static String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR;
- public static String MSG_UPLOAD_FILE_EXISTS;
- public static String MSG_DOWNLOAD_NO_WRITE_DETAILS;
- public static String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS;
-
- // file transfer messages
- public static String MSG_SYNCHRONIZE_PROGRESS;
- public static String MSG_EXTRACT_PROGRESS;
- public static String MSG_DOWNLOADING_PROGRESS;
- public static String MSG_UPLOADING_PROGRESS;
-
- // Remote File Exception Messages
- public static String FILEMSG_SECURITY_ERROR;
- public static String FILEMSG_IO_ERROR;
- public static String FILEMSG_FOLDER_NOTFOUND;
- public static String FILEMSG_FILE_NOTFOUND;
-
- public static String FILEMSG_SECURITY_ERROR_DETAILS;
- public static String FILEMSG_IO_ERROR_DETAILS;
-
-
-
- // --------------------------
- // UNIVERSAL FILE MESSAGES...
- // --------------------------
- public static String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE;
-
-
- public static String FILEMSG_DELETE_FILE_FAILED;
- public static String FILEMSG_CREATE_FILE_FAILED;
- public static String FILEMSG_CREATE_FILE_FAILED_EXIST;
- public static String FILEMSG_CREATE_FOLDER_FAILED;
- public static String FILEMSG_CREATE_FOLDER_FAILED_EXIST;
- public static String FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
- public static String FILEMSG_ERROR_NOFILETYPES;
- public static String FILEMSG_COPY_FILE_FAILED;
- public static String FILEMSG_MOVE_FILE_FAILED;
- public static String FILEMSG_MOVE_TARGET_EQUALS_SOURCE;
- public static String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE;
- public static String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE;
- public static String FILEMSG_MOVE_FILTER_NOT_VALID;
-
- public static String FILEMSG_DELETE_FILE_FAILED_DETAILS;
- public static String FILEMSG_CREATE_FILE_FAILED_DETAILS;
- public static String FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS;
- public static String FILEMSG_CREATE_FOLDER_FAILED_DETAILS;
- public static String FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS;
- public static String FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
- public static String FILEMSG_ERROR_NOFILETYPES_DETAILS;
- public static String FILEMSG_COPY_FILE_FAILED_DETAILS;
- public static String FILEMSG_MOVE_FILE_FAILED_DETAILS;
- public static String FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS;
- public static String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS;
- public static String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS;
- public static String FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS;
-
- public static String FILEMSG_MOVE_INTERRUPTED;
- public static String FILEMSG_COPY_INTERRUPTED;
- public static String FILEMSG_MOVE_INTERRUPTED_DETAILS;
- public static String FILEMSG_COPY_INTERRUPTED_DETAILS;
-
- // cache preferences
- public static String MSG_CACHE_UPLOAD_BEFORE_DELETE;
- public static String MSG_CACHE_UNABLE_TO_SYNCH;
-
- public static String MSG_ERROR_PROFILE_NOTFOUND;
- public static String MSG_ERROR_CONNECTION_NOTFOUND;
-
- public static String MSG_VALIDATE_PATH_EMPTY;
-
- public static String MSG_VALIDATE_PATH_EMPTY_DETAILS;
-
-
-
-
- // remote search messages
- public static String MSG_REMOTE_SEARCH_INVALID_REGEX;
- public static String MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS;
-
-
-
- public static String MSG_CREATEFILEGENERIC_PROGRESS;
- public static String MSG_CREATEFOLDERGENERIC_PROGRESS;
-
- public static String MSG_MAKE_SELECTION;
- public static String MSG_SELECT_FOLDER_NOT_VALID;
-
-
- // preferences
- public static String MSG_ERROR_FILENAME_INVALID;
-
- public static String EditorManager_saveResourcesTitle;
-
- public static String OpenWithMenu_Other;
- public static String OpenWithMenu_OtherDialogDescription;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, FileResources.class);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties
deleted file mode 100644
index efd770a34..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties
+++ /dev/null
@@ -1,418 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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:
-# David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
-# David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button
-# David McKnight(IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
-# David McKnight (IBM)- [216252] [nls] Resources specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-# David McKnight (IBM) - [224377] "open with" menu does not have "other" option
-# Martin Oberhuber (Wind River) - [226784] [nls] Standardize on Cancelled in PII
-# Rupen Mardirossian (IBM) - [227213] Added RESID_CONFLICT_COPY_PATTERN to be used for copying resources to parent folder.
-# David Dykstal (IBM) [231841] Correcting messages for folder creation
-# Kevin Doyle (IBM) - [242389] [usability] RSE Save Conflict dialog should indicate which file is in conflict
-# David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_FILES_DOWNLOAD=Download
-
-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_existsTitle = File Type Exists
-FileEditorPreference_existsMessage = An entry already exists for that 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=Parent folder
-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=New 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=New folder name
-RESID_NEWFOLDER_NAME_TOOLTIP=Enter a folder name for the new folder
-RESID_NEWFOLDER_FOLDER_LABEL=Parent folder
-RESID_NEWFOLDER_FOLDER_TIP=Folder in which the new folder will be created
-
-##############################################################
-# Preference pages for universal file system
-##############################################################
-RESID_PREF_UNIVERSAL_SHOWHIDDEN_LABEL=Show hidden files
-
-RESID_PREF_UNIVERSAL_PRESERVE_TIMESTAMPS_LABEL=Copy timestamps during file transfer
-
-RESID_PREF_UNIVERSAL_SHARE_CACHED_FILES_LABEL=Share cached files between different connections to the same host
-
-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_TOGGLEBUTTON_LABEL=Toggle
-RESID_PREF_UNIVERSAL_FILES_FILETYPES_TOGGLEBUTTON_TOOLTIP=Toggle between binary and text transfer mode
-
-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
-
-# Search dialog
-RESID_SEARCH_MESSAGE_SEARCHING= Searching...
-
-##################################################################################
-############################Resource Conflict Dlgs #########################
-##################################################################################
-RESID_CONFLICT_SAVE_TITLE= Save Conflict
-RESID_CONFLICT_SAVE_MESSAGE= The file "{0}" 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
-
-##################################################################################
-############################Resource Conflict Constants #########################
-##################################################################################
-
-RESID_CONFLICT_COPY_PATTERN =Copy{0,choice,1#|1< ({0,number,integer})} of {1}
-
-
-#==============================================================
-# REMOTE FILE SYSTEM CACHE PREFERENCE PAGE
-#=============================================================
-RESID_PREF_CACHE_CLEAR=Clear Cached Files
-RESID_PREF_CACHE_CLEAR_TOOLTIP=Delete remote files that have been cached in the local workspace
-RESID_PREF_CACHE_LIMIT_CACHE_SIZE_LABEL=&Limit cache size
-RESID_PREF_CACHE_LIMIT_CACHE_SIZE_TOOLTIP=Check this box to limit the cache size. Leave unchecked to specify no limit.
-RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL=&Maximum cache size (MB):
-RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP=Enter the maxium size space that can be used by the cache
-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
-
-#=============================================================
-# 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
-
-
-#=============================================================
-# 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
-
-#=============================================================
-# Property Pages...
-#=============================================================
-MESSAGE_ENCODING_NOT_SUPPORTED=The selected encoding is not supported.
-
-
-#=============================================================
-# Synchronize Cache Action...
-#=============================================================
-MESSAGE_ERROR_CACHING_REMOTE_FILES=Error Caching Remote Files
-MESSAGE_SYNCHRONIZING_REMOTE_FILE_CACHE=Synchronizing Remote File Cache
-
-#=============================================================
-# Link with Editor...
-#=============================================================
-MESSAGE_EXPANDING_FOLDER=Expanding Folder...
-MESSAGE_EXPANDING_FILTER=Expanding Filter...
-MESSSAGE_QUERYING_FILE=Querying File...
-
-#=============================================================
-# File Permissions Property Page...
-#=============================================================
-MESSAGE_FILE_PERMISSIONS_NOT_SUPPORTED=Permissions and ownership not supported
-RESID_PREF_PERMISSIONS_PERMISSIONS_LABEL=Permissions
-RESID_PREF_PERMISSIONS_TYPE_LABEL=Type
-RESID_PREF_PERMISSIONS_READ_LABEL=Read
-RESID_PREF_PERMISSIONS_WRITE_LABEL=Write
-RESID_PREF_PERMISSIONS_EXECUTE_LABEL=Execute
-RESID_PREF_PERMISSIONS_USER_LABEL=User
-RESID_PREF_PERMISSIONS_GROUP_LABEL=Group
-RESID_PREF_PERMISSIONS_OTHERS_LABEL=Others
-RESID_PREF_PERMISSIONS_OWNERSHIP_LABEL=Ownership
-
-#=============================================================
-# File Permissions Messages...
-#=============================================================
-MESSAGE_PENDING=Pending...
-MESSAGE_NOT_SUPPORTED=Not supported
-MESSAGE_GETTING_PERMISSIONS=Getting permissions for {0}
-
-
-#FILE PROPERTIES
-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_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
-RESID_PROPERTY_FILE_EXTENSION_LABEL=Extension
-RESID_PROPERTY_FILE_EXTENSION_TOOLTIP=Extension of this file
-
-RESID_PROPERTY_FILE_PERMISSIONS_LABEL=Permissions
-RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP=The user, group and other permissions of this file
-RESID_PROPERTY_FILE_OWNER_LABEL=Owner
-RESID_PROPERTY_FILE_OWNER_TOOLTIP=The owner of this file
-RESID_PROPERTY_FILE_GROUP_LABEL=Group
-RESID_PROPERTY_FILE_GROUP_TOOLTIP=The group 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
-
-RESID_PROPERTY_SEARCH_STATUS_ACTIVE_VALUE=Running
-RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE=Finished
-
-
-#MESSAGES
-MSG_ERROR_FILE_NOTFOUND=File {0} not found on host {1}
-
-MSG_DOWNLOAD_NO_WRITE=You do not have write access to file {0} on {1}. Do you want to open the file in browse mode?
-MSG_DOWNLOAD_NO_WRITE_DETAILS=You do not have write permission to the file {0} on {1}. 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.
-MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR=You are currently editing file {0} on {1}. Do you want to open the file in browse mode?
-MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS=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.
-MSG_UPLOAD_FILE_EXISTS=File {0} already exists. Do you want to replace it?
-
-
-MSG_SYNCHRONIZE_PROGRESS=Synchronizing Resources...
-MSG_EXTRACT_PROGRESS=Extracting {0}
-
-MSG_DOWNLOADING_PROGRESS=Downloading resources...
-MSG_UPLOADING_PROGRESS=Uploading resources...
-
-# REMOTE FILE SYSTEM EXCEPTION ERROR MESSAGES
-FILEMSG_SECURITY_ERROR=Operation failed. Security violation
-FILEMSG_SECURITY_ERROR_DETAILS=Message reported from file system: {0}
-
-FILEMSG_IO_ERROR=Operation failed. File system input or output error
-FILEMSG_IO_ERROR_DETAILS=Message reported from file system: {0}
-
-FILEMSG_FOLDER_NOTFOUND=Folder ''{0}'' not found
-FILEMSG_FILE_NOTFOUND=File ''{0}'' not found
-
-# PATH VALIDATION
-MSG_VALIDATE_PATH_EMPTY=Enter path
-MSG_VALIDATE_PATH_EMPTY_DETAILS=You must specify a file system path.
-
-# Universal File Messages
-FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE=Filter string ''{0}'' already exists in this filter
-
-FILEMSG_DELETE_FILE_FAILED=Deletion of the object {0} failed
-FILEMSG_DELETE_FILE_FAILED_DETAILS=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
-
-FILEMSG_CREATE_FILE_FAILED=No authority or file name not valid
-FILEMSG_CREATE_FILE_FAILED_DETAILS=The file could not be created because of one of the following reasons:\n- the user does not have enough authority to create the file \n- the file name is not valid
-
-FILEMSG_CREATE_FOLDER_FAILED=No authority or folder name not valid
-FILEMSG_CREATE_FOLDER_FAILED_DETAILS=The folder could not be created because of one of the following reasons:\n- the user does not have enough authority to create the folder \n- the folder name is not valid
-
-FILEMSG_CREATE_FILE_FAILED_EXIST=File already exists
-FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS=The new file {0} already exists
-
-FILEMSG_CREATE_FOLDER_FAILED_EXIST= Folder already exists
-FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS=The new folder {0} already exists
-
-FILEMSG_CREATE_RESOURCE_NOTVISIBLE=New resource will not be visible due to subsetting. Create it anyway?
-FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS=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.
-
-FILEMSG_ERROR_NOFILETYPES =No file types specified
-FILEMSG_ERROR_NOFILETYPES_DETAILS=Either specify one or more file types, or select to subset by file name
-
-FILEMSG_COPY_FILE_FAILED=Copy of the file or folder {0} failed
-FILEMSG_COPY_FILE_FAILED_DETAILS=The file system reported the copy operation failed. You may not have authority to the target folder, or it may be in use
-
-FILEMSG_MOVE_FILE_FAILED=Move of the file or folder {0} failed
-FILEMSG_MOVE_FILE_FAILED_DETAILS=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
-
-FILEMSG_MOVE_TARGET_EQUALS_SOURCE=Target folder cannot equal source folder
-FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS=It is impossible to move a folder to itself.
-
-FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE = Target folder cannot equal parent of source file/folder.
-FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS =A file or folder cannot be moved into the directory in which it exists. If you wish to rename the file, use the rename action.
-
-FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE =Target folder cannot descend from source folder
-FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS=It is impossible to move a folder to one of its subfolders.
-
-FILEMSG_MOVE_FILTER_NOT_VALID = Selected filter is not a valid destination.
-FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS=Some filters, such as the Root or Drives filter, do not designate locations on the remote file system and cannot have files moved into them.
-
-MSG_ERROR_CONNECTION_NOTFOUND = Connection {0} not found
-
-MSG_ERROR_PROFILE_NOTFOUND =Profile {0} not found
-
-FILEMSG_MOVE_INTERRUPTED = Operation interrupted. Some objects have been moved.
-FILEMSG_MOVE_INTERRUPTED_DETAILS = The following objects have been moved:\n{0}
-FILEMSG_COPY_INTERRUPTED = Operation interrupted. Some objects have been copied to the destination.
-FILEMSG_COPY_INTERRUPTED_DETAILS=The following objects have been copied:\n{0}
-
-# cache preferences
-MSG_CACHE_UPLOAD_BEFORE_DELETE = One or more cached files have changes that have not been saved on the host.
-MSG_CACHE_UNABLE_TO_SYNCH = Unable to synchronize cache changes to host. Operation cancelled.
-
-# remote search messages
-MSG_REMOTE_SEARCH_INVALID_REGEX = Regular expression is not valid.
-MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS=The value {0} you entered is not a valid regular expression.
-
-MSG_CREATEFILEGENERIC_PROGRESS = Creating file {0}...
-MSG_CREATEFOLDERGENERIC_PROGRESS =Creating folder {0}...
-
-# preferences
-MSG_ERROR_FILENAME_INVALID = File type extension must not contain '*' or '.'
-
-EditorManager_saveResourcesTitle = Save Resources
-
-OpenWithMenu_Other=Other...
-OpenWithMenu_OtherDialogDescription=Choose the editor for opening {0}:
-
-MSG_MAKE_SELECTION = Please make a selection.
-MSG_SELECT_FOLDER_NOT_VALID=Folder is not a valid selection.
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/ISystemFileConstants.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/ISystemFileConstants.java
deleted file mode 100644
index 80c85124c..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/ISystemFileConstants.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [216252] cleaning up message ids and strings
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui;
-
-
-/**
- * Constants used throughout the System plugin
- */
-public interface ISystemFileConstants
-{
- // --------------------------------
- // Message Ids
- // -------------------------------
- // 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$
- public static final String MSG_ERROR_FILE_NOTFOUND = "RSEG1106"; //$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$
-
- 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$
-
- // --------------------------
- // 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_SOURCE = "RSEF1312"; //$NON-NLS-1$
- public static final String FILEMSG_DELETING = "RSEF1315"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE = "RSEF1314"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_FILTER_NOT_VALID = "RSEF1313"; //$NON-NLS-1$
-
- public static final String FILEMSG_RENAME_INTERRUPTED = "RSEG1246"; //$NON-NLS-1$
- public static final String FILEMSG_DELETE_INTERRUPTED = "RSEG1247"; //$NON-NLS-1$
- public static final String FILEMSG_COPY_INTERRUPTED = "RSEG1248"; //$NON-NLS-1$
- public static final String FILEMSG_MOVE_INTERRUPTED = "RSEG1245"; //$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$
-
- public static final String MSG_ERROR_FILENAME_INVALID = "RSEF6002"; //$NON-NLS-1$
-
-
- // remote search messages
- public static final String MSG_REMOTE_SEARCH_INVALID_REGEX = "RSEG1601"; //$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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java
deleted file mode 100644
index 40bad1583..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/LinkWithSystemViewAction.java
+++ /dev/null
@@ -1,532 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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.
- *
- * Contributors:
- * David McKnight (IBM) - [187711] Link with Editor action for System View
- * David McKnight (IBM) - [238294] ClassCastException using Link With Editor
- * David McKnight (IBM) - [281309] RSE Explorer View is not able to be sync with Editor in next Eclipse launched
- *******************************************************************************/
-package org.eclipse.rse.internal.files.ui.actions;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFile;
-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.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.view.ContextObject;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.IViewLinker;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.part.FileEditorInput;
-
-public class LinkWithSystemViewAction implements IViewActionDelegate {
-
- /**
- * Main thread runnable used to create tree items in system view and look for the target remote file
- * item in the tree. If the remote file item is not found, then this indirectly recurses via a new
- * LinkFromFolderJob.
- */
- private class ShowChildrenInTree implements Runnable
- {
- private Object _parentObject;
- private Object[] _children;
- private ISystemTree _systemTree;
- private IAdaptable _targetRemoteObj;
- private ISystemFilterReference _filterReference;
-
- public ShowChildrenInTree(Object parentObject, Object[] children, ISystemFilterReference filterReference, ISystemTree systemTree, IAdaptable targetRemoteObj)
- {
- _parentObject = parentObject;
- _children = children;
- _systemTree = systemTree;
- _targetRemoteObj = targetRemoteObj;
- _filterReference = filterReference;
- }
-
- private String getAbsolutePath(IAdaptable adaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- return adapter.getAbsoluteName(adaptable);
- }
-
- public void run()
- {
- // make sure the filter is expanded
- _systemTree.revealAndExpand(_filterReference.getSubSystem(), _filterReference.getReferencedFilter());
-
- Vector matches = new Vector();
-
- _systemTree.findAllRemoteItemReferences(_parentObject, _parentObject, matches);
- if (matches.size() > 0){
- TreeItem item = (TreeItem)matches.get(0);
- _systemTree.createTreeItems(item, _children);
- item.setExpanded(true);
-
- IAdaptable containingFolder = null;
-
- // is one of these items our remote file?
- for (int i = 0; i < item.getItemCount(); i++){
- TreeItem childItem = item.getItem(i);
- Object data = childItem.getData();
- if (data instanceof IAdaptable){
- IAdaptable childObj = (IAdaptable)data;
- String childPath = getAbsolutePath(childObj);
- String targetPath = getAbsolutePath(_targetRemoteObj);
- if (childPath.equals(targetPath)){
- // select our remote file
- _systemTree.getTree().setSelection(childItem);
- return; // we're done!
- }
- else if (targetPath.startsWith(childPath)){
- containingFolder = childObj; // using this to start a deeper search for the target remote file
- }
- }
- }
-
- // remote file not found so now we have to expand further
- if (containingFolder != null){
- LinkFromFolderJob job = new LinkFromFolderJob(containingFolder, _filterReference, _targetRemoteObj, _systemTree);
- job.schedule();
- }
- }
- }
- }
-
- /**
- * Job for doing a query on a folder and then using Display.asyncExec() to reveal the results in the tree.
- */
- private class LinkFromFolderJob extends Job
- {
- private ISubSystem _subSystem;
- private IAdaptable _remoteFolder;
- private IAdaptable _targetRemoteObj;
- private ISystemTree _systemTree;
- private ISystemFilterReference _filterRef;
- private ISystemViewElementAdapter _adapter;
-
- public LinkFromFolderJob(IAdaptable remoteFolder, ISystemFilterReference filterRef, IAdaptable targetRemoteObj, ISystemTree systemTree) {
- super(FileResources.MESSAGE_EXPANDING_FOLDER);
- _remoteFolder = remoteFolder;
- _subSystem = getSubSystem(remoteFolder);
- _filterRef = filterRef; // used for context of query
- _targetRemoteObj = targetRemoteObj;
- _systemTree = systemTree;
- }
-
- private ISubSystem getSubSystem(IAdaptable adaptable)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- return adapter.getSubSystem(adaptable);
- }
-
- public IStatus run(IProgressMonitor monitor){
- try
- {
- // get the adapter
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)_remoteFolder).getAdapter(ISystemViewElementAdapter.class);
-
- // get the context
- ContextObject contextObject = new ContextObject(_remoteFolder, _subSystem, _filterRef);
-
- // get the children
- Object[] children = adapter.getChildren(contextObject, monitor);
-
- if (monitor.isCanceled()){
- return Status.CANCEL_STATUS;
- }
-
- // put these items in the tree and look for remoteFile
- // if we can't find the remote file under this filter, the ShowChildrenInTree will recurse
- Display.getDefault().asyncExec(new ShowChildrenInTree(_remoteFolder, children, _filterRef, _systemTree, _targetRemoteObj));
- }
- catch (Exception e){
- }
- return Status.OK_STATUS;
- }
-
- }
-
- /**
- * Job for doing a query on a filter and then using Display.asyncExec() to reveal the results in the tree.
- */
- private class LinkFromFilterJob extends Job
- {
- private ISubSystem _subSystem;
- private IAdaptable _targetRemoteObj;
- private ISystemTree _systemTree;
-
- public LinkFromFilterJob(IAdaptable targetRemoteObject, ISystemTree systemTree) {
- super(FileResources.MESSAGE_EXPANDING_FILTER);
-
- _targetRemoteObj = targetRemoteObject;
- _subSystem = getSubSystem(_targetRemoteObj);
- _systemTree = systemTree;
- }
-
- private ISystemViewElementAdapter getAdapter(IAdaptable adaptable)
- {
- return (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- }
-
- private ISubSystem getSubSystem(IAdaptable adaptable)
- {
- ISystemViewElementAdapter adapter = getAdapter(adaptable);
- return adapter.getSubSystem(adaptable);
- }
-
- public IStatus run(IProgressMonitor monitor){
- try
- {
- // find matching filter reference
- ISystemFilterReference ref = findMatchingFilterReference();
- if (ref == null)
- {
- // the object is nowhere to be found!
- return Status.OK_STATUS;
- }
-
- // get the context
- ContextObject contextObject = new ContextObject(ref, _subSystem, ref);
-
- // get the children
- Object[] children = getAdapter((IAdaptable)ref).getChildren(contextObject, monitor);
-
- if (monitor.isCanceled()){
- return Status.CANCEL_STATUS;
- }
-
- // put these items in the tree and look for remoteFile
- // if we can't find the remote file under this filter, the ShowChildrenInTree will recurse
- Display.getDefault().asyncExec(new ShowChildrenInTree(ref, children, ref, _systemTree, _targetRemoteObj));
- }
- catch (Exception e){
- e.printStackTrace();
- }
- return Status.OK_STATUS;
- }
-
- private ISystemFilterReference findMatchingFilterReference()
- {
- String remoteObjectName = getAbsolutePath(_targetRemoteObj);
- ISystemFilterPoolReferenceManager refmgr = _subSystem.getFilterPoolReferenceManager();
- if (refmgr != null){
- ISystemFilterReference[] refs = refmgr.getSystemFilterReferences(_subSystem);
- for (int i = 0; i < refs.length; i++) {
- ISystemFilterReference ref = refs[i];
-
- if (doesFilterEncompass(ref.getReferencedFilter(), remoteObjectName)){
- return ref;
- }
- }
- }
- return null;
- }
-
- private String getAbsolutePath(IAdaptable adaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- return adapter.getAbsoluteName(adaptable);
- }
-
- private boolean doesFilterEncompass(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- 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$
- {
- // my home filter - will encompass iff remoteObjectAbsoluteName is within the home dir
- try
- {
- IAdaptable homeObj = (IAdaptable)_subSystem.getObjectWithAbsoluteName(".", new NullProgressMonitor());
- if (homeObj != null){
- String homePath = getAbsolutePath(homeObj);
- would = remoteObjectAbsoluteName.startsWith(homePath);
- }
- }
- catch (Exception e){
- }
- }
- else
- would = doesFilterStringEncompass(strings[idx], remoteObjectAbsoluteName);
- }
- }
- return would;
- }
-
- private boolean doesFilterStringEncompass(String filterString, String remoteObjectAbsoluteName)
- {
- if (_subSystem instanceof IRemoteFileSubSystem){
- RemoteFileFilterString rffs = new RemoteFileFilterString(((IRemoteFileSubSystem)_subSystem).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
- {
- IAdaptable containerObj = (IAdaptable)_subSystem.getObjectWithAbsoluteName(container, new NullProgressMonitor());
- if (containerObj != null){
- container = getAbsolutePath(containerObj);
- }
- }
- catch (Exception e)
- {
- }
- }
-
- if (remoteObjectAbsoluteName.startsWith(container)){
- return true;
- }
- }
-
- return false;
- }
-
- }
-
- /**
- * Job for doing a query on a file. After the query it checks for the file in the tree on the main thread. If the item
- * is not found, then a search is started from the first matching filter via the LinkFromFilterJob.
- */
- private class SelectFileJob extends Job
- {
- private ISubSystem _subSystem;
- private String _path;
- private ISystemTree _systemTree;
-
- public SelectFileJob(ISubSystem subSystem, String path, ISystemTree systemTree) {
- super(FileResources.MESSSAGE_QUERYING_FILE);
- _subSystem = subSystem;
- _path = path;
- _systemTree = systemTree;
- }
-
- public IStatus run(IProgressMonitor monitor){
- try
- {
- // doing query to get the remote file
- final IAdaptable remoteObj = (IAdaptable)_subSystem.getObjectWithAbsoluteName(_path, monitor);
-
- Display.getDefault().asyncExec(new Runnable()
- {
- public void run()
- {
- // on main thread, looking for the reference in the tree
- TreeItem item = (TreeItem)_systemTree.findFirstRemoteItemReference(remoteObj, null);
- if (item != null){
- _systemTree.getTree().setSelection(item);
- }
- else
- {
- // no reference in the tree so we will search forward from the filter in a job (avoiding query on the main thread)
- LinkFromFilterJob job = new LinkFromFilterJob(remoteObj, _systemTree);
- job.schedule();
- }
- }
- });
- }
- catch (Exception e){
- }
- return Status.OK_STATUS;
- }
- }
-
- public class ViewLinker implements IViewLinker
- {
- public void linkViewToEditor(Object remoteObject, IWorkbenchPage page)
- {
- Object obj = remoteObject;
- if (obj instanceof IAdaptable)
- {
- try
- {
- ISystemRemoteElementAdapter adapter = (ISystemRemoteElementAdapter)((IAdaptable)obj).getAdapter(ISystemRemoteElementAdapter.class);
- if (adapter != null)
- {
-
- if (adapter.canEdit(obj))
- {
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++)
- {
- IEditorReference editorRef = editorRefs[i];
-
- IEditorPart editor = editorRef.getEditor(true);
- if (editor != null)
- {
- IEditorInput input = editor.getEditorInput();
- if (input instanceof FileEditorInput)
- {
- ((FileEditorInput)input).getFile();
- 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();
- }
- }
- }
-
- public void linkEditorToView(IEditorPart editor, ISystemTree systemTree)
- {
- IEditorInput input = editor.getEditorInput();
- if (input instanceof IFileEditorInput)
- {
- IFileEditorInput fileInput = (IFileEditorInput) input;
- fileInput.getFile();
-
- IFile file = fileInput.getFile();
- SystemIFileProperties properties = new SystemIFileProperties(file);
- Object rmtEditable = properties.getRemoteFileObject();
- IAdaptable remoteObj = null;
- ISubSystem subSystem = null;
- if (rmtEditable != null && rmtEditable instanceof ISystemEditableRemoteObject)
- {
- ISystemEditableRemoteObject editable = (ISystemEditableRemoteObject) rmtEditable;
- remoteObj = editable.getRemoteObject();
-
- TreeItem item = (TreeItem)systemTree.findFirstRemoteItemReference(remoteObj, null);
- if (item != null){
- systemTree.getTree().setSelection(item);
- }
- else
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)remoteObj.getAdapter(ISystemViewElementAdapter.class);
- subSystem = adapter.getSubSystem(remoteObj);
-
- // no match, so we will expand from filter
- // query matching filter in a job (to avoid main thread)
- LinkFromFilterJob job = new LinkFromFilterJob(remoteObj, systemTree);
- job.schedule();
-
- }
- }
- else
- {
- String subsystemId = properties.getRemoteFileSubSystem();
- String path = properties.getRemoteFilePath();
- if (subsystemId != null && path != null)
- {
- subSystem = RSECorePlugin.getTheSystemRegistry().getSubSystem(subsystemId);
- if (subSystem != null)
- {
- // query for file in a job (to avoid main thread)
- SelectFileJob job = new SelectFileJob(subSystem, path, systemTree);
- job.schedule();
- }
- }
- }
- }
- }
-
-
- }
-
- private SystemViewPart _systemViewPart;
- private IAction _action;
- private IViewLinker _linker;
-
- public LinkWithSystemViewAction()
- {
- super();
- }
-
- public void init(IViewPart view) {
- _systemViewPart = (SystemViewPart)view;
- _linker = new ViewLinker();
-
- boolean isLinkingEnabled = _systemViewPart.isLinkingEnabled();
- if (isLinkingEnabled){
- // set it here by default to true so that we have a _linker at the start
- // and restore from memento will be able to use the linker
- _systemViewPart.setLinkingEnabled(isLinkingEnabled, _linker);
- }
- }
-
- public void run(IAction action) {
- if (_systemViewPart != null){
- boolean isToggled = action.isChecked();
- _systemViewPart.setLinkingEnabled(isToggled, _linker);
-
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (_action == null) {
- _action= action;
- _action.setChecked(_systemViewPart.isLinkingEnabled());
- }
- if (_systemViewPart.isLinkingEnabled() && !_action.isChecked()){ // if restored from memento
- _action.setChecked(true);
- _systemViewPart.setLinkingEnabled(true, _linker);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/ShowResourceInSystemsViewDelegate.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/ShowResourceInSystemsViewDelegate.java
deleted file mode 100644
index eef0da362..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/ShowResourceInSystemsViewDelegate.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [218227][usability] Contribute a "Show in RSE" action to Resource Navigator and Project Explorer
- ********************************************************************************/
-package org.eclipse.rse.internal.files.ui.actions;
-
-import java.net.URI;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-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.internal.ui.actions.ShowInSystemsViewDelegate;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-public class ShowResourceInSystemsViewDelegate extends
- ShowInSystemsViewDelegate {
-
- public void run(IAction action) {
-
- if (_selectedObject instanceof IResource){
- Object remoteObject = null;
- IResource resource = (IResource)_selectedObject;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- // need to find the remote equivalent of this
- IPath location = resource.getLocation();
-
- if (location != null){
- String fullPath = location.toOSString();
-
- IHost localHost = sr.getLocalHost();
- if (localHost != null){
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(localHost);
- try {
- remoteObject = ss.getRemoteFileObject(fullPath, new NullProgressMonitor());
- }
- catch (Exception e) {
- }
- }
- }
- else {
- URI uri = resource.getLocationURI();
-
- String hostName = uri.getHost();
- String fullPath = uri.getPath();
-
- IHost host = null;
-
- // find the host
- ISystemProfile[] profiles = sr.getSystemProfileManager().getActiveSystemProfiles();
- for (int i = 0; i < profiles.length && host == null; i++){
- ISystemProfile profile = profiles[i];
- host = sr.getHost(profile, hostName);
- }
-
- if (host != null){
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(host);
- try {
- remoteObject = ss.getRemoteFileObject(fullPath, new NullProgressMonitor());
- }
- catch (Exception e) {
- }
- }
-
- }
-
- if (remoteObject != null){
- _selectedObject = remoteObject;
- }
- else {
- //unable to find remote object equivalent so returning
- return;
- }
- }
- super.run(action);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java
deleted file mode 100644
index b2cceaeda..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SynchronizeCacheActionDelegate.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- * David McKnight (IBM) [143503] [updating] need a synchronize cache operation
- * David McKnight (IBM) - [276534] Cache Conflict After Synchronization when Browsing Remote System with Case-Differentiated-Only Filenames
- ********************************************************************************/
-package org.eclipse.rse.internal.files.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-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.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-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.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.IActionDelegate;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This action downloads remote files of a directory to the temp file cache
- * if the lastest versions have not yet been cached.
- *
- */
-public class SynchronizeCacheActionDelegate implements IActionDelegate {
-
- protected IStructuredSelection fSelection;
- private IStatus errorStatus;
- private SystemMessage systemMessage;
-
- public SynchronizeCacheActionDelegate() {
- }
-
- public void run(IAction action) {
- errorStatus = null;
- systemMessage = null;
-
- IRemoteFile[] files = getRemoteFiles(fSelection);
- boolean completed = performCacheRemoteFiles(files);
-
- if (!completed) {
- return; // not appropriate to show errors
- }
-
- // If errors occurred, open an Error dialog
- if (errorStatus != null) {
- ErrorDialog.openError(getShell(), FileResources.MESSAGE_ERROR_CACHING_REMOTE_FILES, null, errorStatus);
- errorStatus = null;
- }
- else if (systemMessage != null){
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), systemMessage);
- dlg.open();
- systemMessage = null;
- }
- }
-
- private void cacheRemoteFiles(IRemoteFile[] files, IProgressMonitor monitor) throws SystemMessageException
- {
- SystemRemoteResourceSet[] sets = getResourceSetsFor(files);
- for (int i = 0; i < sets.length; i++){
- SystemRemoteResourceSet set = sets[i];
- ISystemResourceSet resultSet = set.getAdapter().doDrag(set, monitor);
-
- systemMessage = resultSet.getMessage();
- }
- }
-
- private SystemRemoteResourceSet[] getResourceSetsFor(IRemoteFile[] files)
- {
- ISystemViewElementAdapter adapter = null;
- Map sets = new HashMap();
- for (int i = 0; i < files.length; i++){
- IRemoteFile file = files[i];
- if (adapter == null){
- adapter = (ISystemViewElementAdapter)((IAdaptable)file).getAdapter(ISystemViewElementAdapter.class);
- }
- IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
- SystemRemoteResourceSet set = (SystemRemoteResourceSet)sets.get(ss);
- if (set == null){
- set = new SystemRemoteResourceSet(ss, adapter);
- sets.put(ss, set);
- }
- set.addResource(file);
- }
- Iterator iterator = sets.values().iterator();
- List results = new ArrayList();
- while (iterator.hasNext()){
- results.add(iterator.next());
- }
- return (SystemRemoteResourceSet[])results.toArray(new SystemRemoteResourceSet[results.size()]);
- }
-
- boolean performCacheRemoteFiles(final IRemoteFile[] files) {
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- // download all files that need to be cached
- cacheRemoteFiles(files, monitor);
- }
- catch (Exception e) {
- if (e.getCause() instanceof CoreException) {
- recordError((CoreException)e.getCause());
- }
- else {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR,
- Activator.getDefault().getBundle().getSymbolicName(),
- -1, e.getMessage(), e));
- displayError(e.getMessage());
- }
- }
- }
- };
-
- try {
- //TODO make this a Job an run in foreground with option to send to background
- ProgressMonitorDialog mon = new ProgressMonitorDialog(getShell()) {
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(FileResources.MESSAGE_SYNCHRONIZING_REMOTE_FILE_CACHE);
- }
- };
- mon.run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- displayError("Internal Error: "+e.getTargetException().getMessage()); //$NON-NLS-1$
- return false;
- }
-
- return true;
- }
-
-
- /**
- * Opens an error dialog to display the given message.
- * <p>
- * Note that this method must be called from UI thread.
- * </p>
- *
- * @param message
- * the message
- */
- void displayError(String message) {
- MessageDialog.openError(getShell(), FileResources.MESSAGE_ERROR_CACHING_REMOTE_FILES, message);
- }
-
-
- /**
- * Records the core exception to be displayed to the user once the action is
- * finished.
- *
- * @param error
- * a <code>CoreException</code>
- */
- final void recordError(CoreException error) {
- this.errorStatus = error.getStatus();
- }
-
- /**
- * 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 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 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java
deleted file mode 100644
index bca27c990..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-
-
-/**
- * Open a remote file as read-only
- */
-public class SystemBrowseFileAction extends SystemEditFileAction {
-
-
- /**
- * Constructor for SystemBrowseFileAction.
- * @param text
- * @param tooltip
- * @param image
- * @param parent
- * @param editorDescriptor
- */
- public SystemBrowseFileAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor) {
- super(text, tooltip, image, parent, editorDescriptor);
- }
-
- /**
- * @see org.eclipse.rse.internal.files.ui.actions.SystemEditFileAction#process(IRemoteFile)
- */
- protected void process(IRemoteFile remoteFile) {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorDescriptor);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java
deleted file mode 100644
index 0aea2f670..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-
-/**
- * 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, IEditorDescriptor editorDescriptor,
- IRemoteFile remoteFile, int line, int charStart, int charEnd) {
- super(text, tooltip, image, parent, editorDescriptor, remoteFile, line, charStart, charEnd);
- }
-
- /**
- * @see org.eclipse.rse.internal.files.ui.actions.SystemEditFileAction#process(IRemoteFile)
- */
- protected void process(IRemoteFile remoteFile) {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorDescriptor);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true);
- handleGotoLine();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareFilesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareFilesAction.java
deleted file mode 100644
index 77cb768a5..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareFilesAction.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [256644][refresh] RSE Compare with should refresh file cache before opening compare editor
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.compare.SystemCompareInput;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.internal.files.ui.FileResources;
-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)); //$NON-NLS-1$
- SystemCompareInput fInput = new SystemCompareInput(cc);
-
- for (int i = 0; i < _selected.size(); i++)
- {
- IRemoteFile file = (IRemoteFile) _selected.get(i);
- // make sure this is the most up-to-date version
- try {
- file = file.getParentRemoteFileSubSystem().getRemoteFileObject(file.getAbsolutePath(), new NullProgressMonitor());
- // ensure that, if this is cached, we get the latest on download
- file.markStale(true);
- }
- catch (Exception e){
- }
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareWithEditionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareWithEditionAction.java
deleted file mode 100644
index 8e835ba69..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCompareWithEditionAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.actions;
-
-import org.eclipse.compare.internal.ICompareContextIds;
-import org.eclipse.rse.internal.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", //$NON-NLS-1$
- false);
-
- this.fHelpContextId= ICompareContextIds.COMPARE_WITH_EDITION_DIALOG;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java
deleted file mode 100644
index 8049f2776..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java
+++ /dev/null
@@ -1,599 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [196588] Move Dialog doesn't show Archives
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Rupen Mardirossian (IBM) - [210682] created checkForCollision method that returns a boolean for SystemCopyDialog enhancement
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- * David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-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.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.swt.widgets.Display;
-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;
- else {
- enable = !((IRemoteFile)selectedObject).getParentRemoteFileSubSystem().isOffline();
- }
- }
- return enable;
- }
-
- // --------------------------
- // PARENT METHOD OVERRIDES...
- // --------------------------
- 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;
- }
- }
-
-
- /**
- * @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, monitor);
-
-
- //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);
- 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;
- }
- /**
- * @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 oldName will be the name of the IRemoteFile object currently being copied
- */
- protected boolean checkForCollision(Shell shell, IProgressMonitor monitor,
- Object targetContainer, String oldName)
- {
- try
- {
- targetFolder = (IRemoteFile)targetContainer;
- ss = targetFolder.getParentRemoteFileSubSystem();
- targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName, monitor);
-
- if (targetFileOrFolder.exists())
- {
- return true;
- }
-
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("SystemCopyRemoteFileAction.checkForCollision()", e); //$NON-NLS-1$
- }
- return false;
-
- }
-
- /**
- * @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
- * @param monitor Usually not needed
- * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- throws Exception
- {
- targetFolder = (IRemoteFile)targetContainer;
- IRemoteFile srcFileOrFolder = (IRemoteFile)oldObject;
-
- IHost targetConnection = targetFolder.getHost();
- IHost srcConnection = srcFileOrFolder.getHost();
-
- boolean ok = false;
- if (targetConnection == srcConnection)
- {
- ss = targetFolder.getParentRemoteFileSubSystem();
- ss.copy(srcFileOrFolder, targetFolder, newName, null);
- ok = true;
- 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.getInstance();
- // 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, SystemEncodingUtil.ENCODING_UTF_8, null);
- targetFS.upload(tempFile, SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), null); //$NON-NLS-1$
- }
- else
- {
-
- IRemoteFile newTargetFolder = targetFS.getRemoteFileObject(newPath, monitor);
- targetFS.createFolder(newTargetFolder, monitor);
- IRemoteFile[] children = srcFS.list(srcFileOrFolder, monitor);
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- IRemoteFile child = children[i];
- monitor.subTask("copying " + child.getName()); //$NON-NLS-1$
- doCopy(newTargetFolder, child, child.getName(), monitor);
- 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;
- }
-
-
- /**
- * @see SystemBaseCopyAction#getOldAbsoluteNames()
- */
- protected String[] getOldAbsoluteNames()
- {
- IRemoteFile[] files = getSelectedFiles();
- String[] names = new String[files.length];
- for (int idx=0; idx<files.length; idx++)
- names[idx] = files[idx].getAbsolutePath();
- 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.getHost();
- 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();
- boolean supportsArchiveManagement = firstSelectionParent.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- if (supportsArchiveManagement)
- {
- // Set a new viewer filter
- SystemActionViewerFilter _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$
- dlg.setCustomViewerFilter(_filter);
- }
- /*
- 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 //$NON-NLS-1$
- 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();
- IProgressMonitor monitor = new NullProgressMonitor();
- 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, monitor);
- }
- catch (Exception e)
- {
- }
-
- if (par != null)
- 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(String operation)
- {
- if (copiedFiles.size() == 0)
- return;
-
- // refresh all instances of this parent, and all affected filters...
- ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem();
- Viewer originatingViewer = getViewer();
-
- targetFolder.markStale(true);
-
- // invalidate filters
- invalidateFilterReferences(targetFolder);
-
- if (operation == null){
- operation = ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY;
- }
-
-
- RSECorePlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent(operation,
- ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, copiedFiles, targetFolder.getAbsolutePath(), fileSS, getOldAbsoluteNames(), originatingViewer);
-
- }
-
- // ------------------
- // 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/internal/files/ui/actions/SystemCreateEditActions.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCreateEditActions.java
deleted file mode 100644
index 50deb006a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCreateEditActions.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemSeparatorAction;
-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.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"); //$NON-NLS-1$
- }
- /**
- * 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, descriptor);
-
- // 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 && editorDesc != null) {
-
- if (editorDesc.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID))
- imageDesc = registry.getSystemExternalEditorImageDescriptor(remoteFile.getName());
- }
-
- return imageDesc;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDoubleClickEditAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDoubleClickEditAction.java
deleted file mode 100644
index efd5fe4dd..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDoubleClickEditAction.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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"); //$NON-NLS-1$
- }
- /**
- * @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);
-
- }
- SystemEditFileAction editAction = new SystemEditFileAction(null, null, null, null, descriptor);
- editAction.setSelection(new StructuredSelection(element));
- editAction.run();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDownloadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDownloadConflictAction.java
deleted file mode 100644
index f96042dd8..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemDownloadConflictAction.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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(SWT.BEGINNING, SWT.CENTER, false, false));
-
- Text text = new Text(m, SWT.WRAP | SWT.MULTI);
- text.setEditable(false);
- text.setText(_dialogText);
- text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-
- 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"); //$NON-NLS-1$
- return dlg;
- }
-
- /**
- * Called when this action is invoked
- */
- public void run()
- {
- setShell(RSEUIPlugin.getTheSystemRegistryUI().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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java
deleted file mode 100644
index 450db7194..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.files.ui.view.DownloadAndOpenJob;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-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;
-
-
-
-public class SystemEditFileAction extends SystemBaseAction {
-
-
- protected IEditorDescriptor _editorDescriptor;
-
- /**
- * Constructor for SystemEditFileAction
- */
- public SystemEditFileAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor) {
- super(text, tooltip, null, image, parent);
- init();
- _editorDescriptor = editorDescriptor;
- }
-
- /**
- * Constructor for SystemEditFileAction
- */
- public SystemEditFileAction(String text, String tooltip, ImageDescriptor image, int style, Shell parent, IEditorDescriptor editorDescriptor) {
- super(text, tooltip, null, image, style, parent);
- init();
- _editorDescriptor = editorDescriptor;
- }
-
- /**
- * 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(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
-
-
-
- String remoteEncoding = remoteFile.getEncoding();
- String storedEncoding = properties.getEncoding();
-
- boolean encodingChanged = storedEncoding == null || !(remoteEncoding.equals(storedEncoding));
-
- boolean usedBinary = properties.getUsedBinaryTransfer();
- boolean isBinary = remoteFile.isBinary();
-
- return (!dirty &&
- !remoteNewer &&
- usedBinary == isBinary &&
- !encodingChanged);
- }
- return false;
- }
-
-
- /**
- * Process the object: download file, open in editor, etc.
- */
- protected void process(IRemoteFile remoteFile) {
-
- SystemEditableRemoteFile editable = SystemRemoteEditManager.getEditableRemoteObject(remoteFile, null);
- if (editable == null){
- // case for cancelled operation when user was prompted to save file of different case
- return;
- }
- else
- {
- try
- {
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- if (isFileCached(editable, remoteFile))
- {
- editable.openEditor();
- }
- else
- {
- DownloadAndOpenJob oJob = new DownloadAndOpenJob(editable, false);
- oJob.schedule();
- }
- }
- else
- {
- editable.setLocalResourceProperties();
- editable.openEditor();
- }
- }
- catch (Exception e)
- {
- }
-
-
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileInPlaceAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileInPlaceAction.java
deleted file mode 100644
index 4b6f18a03..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileInPlaceAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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/internal/files/ui/actions/SystemEditFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileLineAction.java
deleted file mode 100644
index 368f46873..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileLineAction.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.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, IEditorDescriptor editorDescriptor, IRemoteFile remoteFile, int line, int charStart, int charEnd) {
- super(text, tooltip, image, parent, editorDescriptor);
- _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); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
- }
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilePlatformAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilePlatformAction.java
deleted file mode 100644
index d6a481610..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilePlatformAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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/internal/files/ui/actions/SystemEditFilesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java
deleted file mode 100644
index cc5448f67..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFilesAction.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [209660] check for changed encoding before using cached file
- * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.files.ui.view.DownloadAndOpenJob;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-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 {
-
-
- 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(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
-
- String remoteEncoding = remoteFile.getEncoding();
- String storedEncoding = properties.getEncoding();
-
- boolean encodingChanged = storedEncoding == null || !(remoteEncoding.equals(storedEncoding));
-
- boolean usedBinary = properties.getUsedBinaryTransfer();
- boolean isBinary = remoteFile.isBinary();
-
- return (!dirty &&
- !remoteNewer &&
- usedBinary == isBinary &&
- !encodingChanged);
-
- }
- 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 = SystemRemoteEditManager.getEditableRemoteObject(remoteFile, des);
- if (editable == null){
- // case for cancelled operation when user was prompted to save file of different case
- return;
- }
- else
- {
- try
- {
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.OPEN_IN_SAME_PERSPECTIVE)
- {
- if (isFileCached(editable, remoteFile))
- {
- editable.openEditor();
- }
- else
- {
- DownloadAndOpenJob oJob = new DownloadAndOpenJob(editable, false);
- oJob.schedule();
- }
- }
- else
- {
- editable.setLocalResourceProperties();
- editable.openEditor();
- }
- }
- catch (Exception e)
- {
- }
-
- }
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java
deleted file mode 100644
index ae17b2bc9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditionAction.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [267247] Wrong encoding
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.resources.ResourcesPlugin;
-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.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 cancelled 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 encoding = ResourcesPlugin.getEncoding();
- String text = Utilities.readString(is, encoding);
- 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemFileUpdateFilterAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemFileUpdateFilterAction.java
deleted file mode 100644
index d97d8accf..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemFileUpdateFilterAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.actions;
-import org.eclipse.rse.files.ui.widgets.SystemFileFilterStringEditPane;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.internal.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));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java
deleted file mode 100644
index 6b86110c4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [198007] Moving multiple folders allows moving to themselves
- * Kevin Doyle (IBM) - [160769] Move Resource dialog allows user to continue on invalid destination
- * Kevin Doyle (IBM) - [199324] [nls] Move dialog SystemMessages should be added/updated
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Rupen Mardirossian (IBM) - [210682] Modified MoveRemoteFileJob.runInWorkspace to use SystemCopyDialog for collisions in move operations
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-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.jface.viewers.Viewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-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.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.ui.dialogs.CopyRunnable;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseCopyAction;
-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.Display;
-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 targetEqualsParentSrcMsg = null;
- private SystemMessage targetDescendsFromSrcMsg = null;
- private SystemMessage invalidFilterMsg = null;
- protected Vector movedFiles = new Vector();
- protected Vector movedFileNames = new Vector();
-
- private class MoveRemoteFileJob extends WorkspaceJob
- {
-
- /**
- * RenameJob job.
- * @param message text used as the title of the job
- */
- public MoveRemoteFileJob(String message)
- {
- super(message);
- setUser(true);
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor)
- {
- SystemMessage msg = getCopyingMessage();
-
- IStatus status = Status.OK_STATUS;
-
- //holds existing objects
- List existing = new ArrayList();
- //holds objects to be copied
- List toCopy = new ArrayList();
- boolean overwrite = false;
-
-
- 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];
- //go through all files to see if they exist
- for (int idx=0; copiedOk && (idx<steps); idx++)
- {
- oldName = oldNames[idx];
- oldObject = oldObjects[idx];
- //monitor.subTask(getCopyingMessage(oldName).getLevelOneText());
- if(checkForCollision(getShell(), monitor, targetContainer, oldName))
- {
- existing.add(oldObject);
- }
- toCopy.add(oldObject);
- /*newName = checkForCollision(getShell(), monitor, targetContainer, oldObject, oldName);
- if (newName == null)
- copiedOk = false;
- else
- copiedOk = doCopy(targetContainer, oldObject, newName, monitor);
- newNames[idx] = newName;
- monitor.worked(1);
- movedFileNames.add(oldName);*/ //remember the old name, in case we need it later.
- }
- //monitor.done();
-
- //SystemCopyDialog used here with all existing objects
- if(existing.size()>0)
- {
- CopyRunnable cr = new CopyRunnable(existing);
- Display.getDefault().syncExec(cr);
- overwrite = cr.getOk();
- if(!overwrite)
- {
- status = Status.CANCEL_STATUS;
- }
- }
- //Proceed with copy if user chose to overwrite or there were no copy collisions
- if(existing.size()==0 || overwrite)
- {
- try
- {
- for (int idx=0; copiedOk && (idx<steps); idx++)
- {
- newName = oldNames[idx];
- oldObject = oldObjects[idx];
- monitor.subTask(getCopyingMessage(newName).getLevelOneText());
- copiedOk = doCopy(targetContainer, oldObject, newName, monitor);
- monitor.worked(1);
- newNames[idx] = newName;
- movedFileNames.add(newName);
- monitor.done();
- }
- }
- catch (SystemMessageException exc)
- {
- copiedOk = false;
- //If this operation is cancelled, need to display a proper message to the user.
- if (monitor.isCanceled() && movedFileNames.size() > 0)
- {
- //Get the moved file names
- String movedFileNamesList = (String)(movedFileNames.get(0));
- for (int i=1; i<(movedFileNames.size()); i++)
- {
- movedFileNamesList = movedFileNamesList + "\n" + (String)(movedFileNames.get(i)); //$NON-NLS-1$
- }
- String msgTxt = FileResources.FILEMSG_MOVE_INTERRUPTED;
- String msgDetails = NLS.bind(FileResources.FILEMSG_MOVE_INTERRUPTED_DETAILS, movedFileNamesList);
-
- SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_MOVE_INTERRUPTED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(shell, thisMessage);
-
- status = Status.CANCEL_STATUS;
- }
- else
- {
- SystemMessageDialog.displayErrorMessage(shell, exc.getSystemMessage());
- }
- }
- catch (Exception exc)
- {
- copiedOk = false;
- exc.printStackTrace();
- }
- }
- if (movedFiles.size() > 0)
- {
- copyComplete(ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_MOVE); //Need to reflect the views.
- }
-
- return status;
- }
- }
- /**
- * 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;
- }
-
- public void run(IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException,
- java.lang.InterruptedException
- {
- SystemMessage moveMessage = getCopyingMessage();
- moveMessage.makeSubstitution(""); //$NON-NLS-1$
- MoveRemoteFileJob moveRemoteFileJob = new MoveRemoteFileJob(moveMessage.getLevelOneText());
- moveRemoteFileJob.schedule();
- }
-
- /**
- * @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
- * @param monitor Usually not needed
- * @see SystemBaseCopyAction#doCopy(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor) throws Exception {
- IRemoteFile targetFolder = (IRemoteFile) targetContainer;
- IRemoteFile srcFileOrFolder = (IRemoteFile) oldObject;
-
- IRemoteFileSubSystem ss = targetFolder.getParentRemoteFileSubSystem();
-
- ss.move(srcFileOrFolder, targetFolder, newName, monitor);
- 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 true;
- }
-
- /**
- * 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.
- IRemoteFile[] files = getSelectedFiles();
- Object selectedObject = selectedObjects[0];
- if (!(selectedObject instanceof IRemoteFile || selectedObject instanceof ISystemFilterReference) || files == null) {
- return null;
- }
-
- if (selectedObject instanceof IRemoteFile) {
- IRemoteFile selectedFolder = (IRemoteFile)selectedObject;
- String selectedFolderPath = selectedFolder.getAbsolutePath();
-
- for (int i = 0; i < files.length; i++) {
- IRemoteFile selectedFile = files[i];
- if (selectedFile != null && selectedFile.getParentRemoteFile() != null) {
- IRemoteFile selectedParentFile = selectedFile.getParentRemoteFile();
-
- if (selectedFolderPath.equals(selectedParentFile.getAbsolutePath()))
- {
- if (targetEqualsParentSrcMsg == null){
- targetEqualsParentSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE,
- IStatus.ERROR,
- FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE,
- FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS);
-
-
- }
- return targetEqualsParentSrcMsg;
- }
- else if (selectedFolderPath.equals(selectedFile.getAbsolutePath()))
- {
- if (targetEqualsSrcMsg == null){
- targetEqualsSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_MOVE_TARGET_EQUALS_SOURCE,
- IStatus.ERROR,
- FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE,
- FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS);
- }
- return targetEqualsSrcMsg;
- }
- else if (selectedFolder.isDescendantOf(selectedFile))
- {
- if (targetDescendsFromSrcMsg == null){
- targetDescendsFromSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE,
- IStatus.ERROR,
- FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE,
- FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS);
-
- }
- return targetDescendsFromSrcMsg;
- }
- }
- }
- } else if (selectedObject instanceof ISystemFilterReference) {
- ISystemFilterReference filter = (ISystemFilterReference) selectedObject;
- String[] filterStrings = filter.getReferencedFilter().getFilterStrings();
- String firstFilterString = filterStrings[0];
- // Check only first filter string as by convention we move files only
- // to the first filter string. * and /* are invalid as they represent
- // Drives and Root Filters which we can't Move files to.
- if (firstFilterString.equals("*") || firstFilterString.equals("/*")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (invalidFilterMsg == null) {
- invalidFilterMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_MOVE_FILTER_NOT_VALID,
- IStatus.ERROR,
- FileResources.FILEMSG_MOVE_FILTER_NOT_VALID,
- FileResources.FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS);
-
- }
- return invalidFilterMsg;
- }
- }
- 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(String operation)
- {
- // 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();
-
- if (operation == null){
- operation = ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_MOVE;
- }
-
-
- Viewer originatingViewer = getViewer();
- RSECorePlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent(operation,
- ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, movedFiles, firstSelectionParent.getAbsolutePath(), fileSS, getOldAbsoluteNames(), originatingViewer);
-
- super.copyComplete(operation);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileAction.java
deleted file mode 100644
index 3fe62fb93..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileAction.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.wizards.SystemNewFileWizard;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.rse.ui.view.ISystemViewElementAdapter;
-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;
- }
-
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof IAdaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)selectedObject).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null){
- ISubSystem ss = adapter.getSubSystem(selectedObject);
- if (ss != null){
- if (ss.isOffline()){
- return false;
- }
- }
- }
- }
- return true;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterAction.java
deleted file mode 100644
index 102e93dc0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterAction.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [175680] Deprecate obsolete ISystemRegistry methods
- * David McKnight (IBM) - [238158] Can create duplicate filters
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.files.ui.widgets.SystemFileFilterStringEditPane;
-import org.eclipse.rse.internal.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.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile;
-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;
- private SubSystem _selectedSubSystem;
-
- /**
- * Constructor
- */
- public SystemNewFileFilterAction(IRemoteFileSubSystemConfiguration subsystemConfiguration, 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()));
- }
-
- public void run()
- {
- if (_selectedSubSystem != null){
- setAllowFilterPoolSelection(_selectedSubSystem.getFilterPoolReferenceManager().getReferencedSystemFilterPools());
- }
- else {
- // disallow filter pool select (because this is from a filter pool)
- setAllowFilterPoolSelection((ISystemFilterPool[])null);
- setAllowFilterPoolSelection((ISystemFilterPoolWrapperInformation)null);
-
- callbackConfigurator = null;
- callbackConfiguratorCalled = false;
- }
- 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)
- {
- _selectedSubSystem = null;
- Iterator e = selection.iterator();
- Object selected = e.next();
-
- if (selected != null && selected instanceof SubSystem)
- {
- _selectedSubSystem = (SubSystem) selected;
- }
-
- return super.updateSelection(selection);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterFromFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterFromFolderAction.java
deleted file mode 100644
index 23f1d9c22..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFileFilterFromFolderAction.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [238158] Can create duplicate filters
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.ISystemFilterPoolManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.core.subsystems.SubSystem;
-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"); //$NON-NLS-1$
- }
-
-
- public void run()
- {
- IRemoteFileSubSystem fileSubsystem = _selected.getParentRemoteFileSubSystem();
-
- ISystemFilterPool defaultFilterPool = ((SubSystem)fileSubsystem).getConnectionPrivateFilterPool(true);
- if (defaultFilterPool == null){
- ISystemFilterPoolManager mgr = fileSubsystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager();
- defaultFilterPool = mgr.getFirstDefaultSystemFilterPool();
- }
-
- setParentFilterPool(defaultFilterPool);
- 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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFolderAction.java
deleted file mode 100644
index 2f70fbc9b..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemNewFolderAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.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.rse.ui.view.ISystemViewElementAdapter;
-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;
- }
-
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof IAdaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)selectedObject).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null){
- ISubSystem ss = adapter.getSubSystem(selectedObject);
- if (ss != null){
- if (ss.isOffline()){
- return false;
- }
- }
- }
- }
- return true;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java
deleted file mode 100644
index 11aaf9c02..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.subsystems.IRemoteLineReference;
-import org.eclipse.rse.files.ui.resources.ISystemTextEditor;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.subsystems.files.core.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.rse.ui.SystemBasePlugin;
-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"); //$NON-NLS-1$
- }
-
-
-
- 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;
- if (file.isFile())
- {
- return file;
- }
- return null;
- }
- }
- }
-
- return file;
- }
-
-
-
- protected void openEditor(IRemoteFile file, IEditorDescriptor descriptor)
- {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(file, descriptor);
- 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();
- }
- }
- }
- }
- }
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java
deleted file mode 100644
index 3f7721a56..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java
+++ /dev/null
@@ -1,564 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * David McKnight (IBM) - [277141] System Editor Passed Incorrect Cache Information in Presence of Case-Differentiated-Only filenames
- * David McKnight (IBM) - [284596] [regression] Open with-> problem when descriptor doesn't match previous
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.resources.ResourceAttributes;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.ContributionItem;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.files.ui.view.DownloadAndOpenJob;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-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.IEditorPart;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.EditorSelectionDialog;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.WorkbenchPage;
-import org.eclipse.ui.part.FileEditorInput;
-
-
-/**
- * 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 && editorDesc != 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);
-}
-
-/**
- * Creates the Other... menu item
- *
- * @param menu the menu to add the item to
- */
-private void createOtherMenuItem(final Menu menu, final IRemoteFile remoteFile) {
-
- new MenuItem(menu, SWT.SEPARATOR);
- final MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
- menuItem.setText(FileResources.OpenWithMenu_Other);
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- switch (event.type) {
- case SWT.Selection:
- EditorSelectionDialog dialog = new EditorSelectionDialog(
- menu.getShell());
- dialog
- .setMessage(NLS
- .bind(
- FileResources.OpenWithMenu_OtherDialogDescription,
- remoteFile.getName()));
- if (dialog.open() == Window.OK) {
- IEditorDescriptor editor = dialog.getSelectedEditor();
- if (editor != null) {
- openEditor(remoteFile, editor);
- }
- }
- break;
- }
- }
- };
- menuItem.addListener(SWT.Selection, listener);
-}
-
-
-protected void openEditor(IRemoteFile remoteFile, IEditorDescriptor descriptor) {
-
- SystemEditableRemoteFile editable = SystemRemoteEditManager.getEditableRemoteObject(remoteFile, descriptor);
- if (editable == null){
- // case for cancelled operation when user was prompted to save file of different case
- return;
- }
-
- boolean systemEditor = descriptor != null && descriptor.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
-
- if (isFileCached(editable, remoteFile)) {
-
- try {
- if (systemEditor) {
- editable.openSystemEditor();
- }
- else {
- if (descriptor != null){
- hackOpenEditor(editable, descriptor);
- }
- else {
- editable.openEditor();
- }
- }
- }
- catch (Exception e) {}
- }
- else {
- DownloadAndOpenJob oJob = new DownloadAndOpenJob(editable, systemEditor);
- oJob.schedule();
- }
-}
-
-/**
- * This method is a hack to deal with bug 284596 while no API exists to set the editor descriptor for a
- * given SystemEditableRemoteFile. The code here is essentially a modified version of
- * SystemEditableRemoteFile.openEditor()
- */
-private void hackOpenEditor(SystemEditableRemoteFile editable, IEditorDescriptor descriptor) throws PartInitException
-{
- IWorkbenchPage activePage = this.page;
- IWorkbench wb = PlatformUI.getWorkbench();
- if (activePage == null)
- {
- activePage = wb.getActiveWorkbenchWindow().getActivePage();
- }
- IFile file = editable.getLocalResource();
-
- IRemoteFile remoteFile = editable.getRemoteFile();
- // get fresh remote file object
- remoteFile.markStale(true); // make sure we get the latest remote file (with proper permissions and all)
- IRemoteFileSubSystem ss = remoteFile.getParentRemoteFileSubSystem();
- if (!remoteFile.getParentRemoteFileSubSystem().isOffline()){
- try{
- remoteFile = ss.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (Exception e){
- SystemMessageDialog.displayExceptionMessage(SystemMessageDialog.getDefaultShell(), e);
- return;
- }
- }
- editable.setRemoteFile(remoteFile);
-
- boolean readOnly = !remoteFile.canWrite();
- ResourceAttributes attr = file.getResourceAttributes();
- if (attr!=null) {
- attr.setReadOnly(readOnly);
- try {
- file.setResourceAttributes(attr);
- }
- catch (Exception e)
- {}
- }
-
- // set editor as preferred editor for this file
- String editorId = descriptor.getId();
- IDE.setDefaultEditor(file, editorId);
-
- FileEditorInput finput = new FileEditorInput(file);
-
- IEditorPart editor = null;
- if (descriptor.isOpenExternal()){
- editor = ((WorkbenchPage)activePage).openEditorFromDescriptor(new FileEditorInput(file), descriptor, true, null);
- }
- else {
- editor = activePage.openEditor(finput, descriptor.getId());
- }
- editable.setEditor(editor);
-
- SystemIFileProperties properties = new SystemIFileProperties(file);
- properties.setRemoteFileObject(this);
-}
-
-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(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
-
- String remoteEncoding = remoteFile.getEncoding();
- String storedEncoding = properties.getEncoding();
-
- boolean encodingChanged = storedEncoding == null || !(remoteEncoding.equals(storedEncoding));
-
- boolean usedBinary = properties.getUsedBinaryTransfer();
- boolean isBinary = remoteFile.isBinary();
-
- return (!dirty &&
- !remoteNewer &&
- usedBinary == isBinary &&
- !encodingChanged);
- }
- 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-NLS-1$
-}
-
-/* (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 //$NON-NLS-1$
- 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);
-
- // create other menu
- createOtherMenuItem(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
- */
-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); //$NON-NLS-1$
- }
- }
- break;
- }
- }
- };
-
- menuItem.addListener(SWT.Selection, listener);
-}
-
-protected IEditorDescriptor getEditorDescriptor(IRemoteFile file) throws PartInitException {
- return IDE.getEditorDescriptor(file.getName(), true);
-}
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java
deleted file mode 100644
index b2e3cfdd2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileSearchOpenWithMenu.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.services.search.IHostSearchResult;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
- }
- }
-
- 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/internal/files/ui/actions/SystemReplaceWithEditionAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemReplaceWithEditionAction.java
deleted file mode 100644
index b42dd0f78..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemReplaceWithEditionAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.actions;
-
-import org.eclipse.compare.internal.ICompareContextIds;
-import org.eclipse.rse.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchAction.java
deleted file mode 100644
index 4bfff2d56..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.search.SystemSearchPage;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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"); //$NON-NLS-1$
-
- allowOnMultipleSelection(false);
- }
-
- public void run() {
- NewSearchUI.openSearchDialog(SystemBasePlugin.getActiveWorkbenchWindow(), SystemSearchPage.SYSTEM_SEARCH_PAGE_ID);
- }
-
- public boolean checkObjectType(Object selectedObject)
- {
- if (selectedObject instanceof IAdaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)selectedObject).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null){
- ISubSystem ss = adapter.getSubSystem(selectedObject);
- if (ss != null){
- if (ss.isOffline()){
- return false;
- }
- }
- }
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java
deleted file mode 100644
index 768a36e6f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-
-
-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 editorDescriptor the editor id.
- * @param remoteFile the remote file that is to be opened.
- * @param searchResult the line number.
- */
- public SystemSearchBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor, IRemoteFile remoteFile, IRemoteSearchResult searchResult) {
- super(text, tooltip, image, parent, editorDescriptor, remoteFile, searchResult);
- }
-
- /**
- * @see org.eclipse.rse.internal.files.ui.actions.SystemEditFileAction#process(IRemoteFile)
- */
- protected void process(IRemoteFile remoteFile) {
- SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorDescriptor);
- editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true);
- handleGotoLine(_remoteFile, _searchResult);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java
deleted file mode 100644
index 8c4d66f47..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.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 searchResult the line number.
- */
- public SystemSearchEditFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor, IRemoteFile remoteFile, IRemoteSearchResult searchResult) {
- super(text, tooltip, image, parent, editorDescriptor);
- 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); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
- }
- }
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java
deleted file mode 100644
index 1d81103d9..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSelectFileTypesAction.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java
deleted file mode 100644
index fd62d81d4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java
+++ /dev/null
@@ -1,638 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * Xuan Chen (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
- * David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
- * Kevin Doyle (IBM) - [242389] [usability] RSE Save Conflict dialog should indicate which file is in conflict
- * David McKnight (IBM) - [267247] Wrong encoding
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem.SystemMessageDialogRunnable;
-import org.eclipse.rse.files.ui.dialogs.FileDialogFactory;
-import org.eclipse.rse.files.ui.dialogs.ISaveAsDialog;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.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.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 //$NON-NLS-1$
- _saveasFile = saveasFile;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- if (_saveasFile != null)
- {
- IRemoteFileSubSystem fs = _saveasFile.getParentRemoteFileSubSystem();
- try
- {
- if (!_saveasFile.exists())
- {
- _saveasFile = fs.createFile(_saveasFile, monitor);
- }
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
-
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR, CommonMessages.MSG_ERROR_UNEXPECTED);
- SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
- SystemMessageDialogRunnable runnable = ((SubSystem)fs).new SystemMessageDialogRunnable(dialog);
- Display.getDefault().asyncExec(runnable);
- }
-
- try
- {
- String srcEncoding = RemoteFileUtility.getSourceEncoding(_tempFile);
- // copy temp file to remote system
- fs.upload(_tempFile.getLocation().makeAbsolute().toOSString(), _saveasFile, srcEncoding, 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 //$NON-NLS-1$
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try
- {
- IRemoteFileSubSystem fs = _remoteFile.getParentRemoteFileSubSystem();
- SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
-
- // download remote version
- String srcEncoding = RemoteFileUtility.getSourceEncoding(_tempFile);
-
- fs.download(_remoteFile, _tempFile.getLocation().makeAbsolute().toOSString(), srcEncoding, monitor);
-
- properties.setRemoteFileTimeStamp(_remoteFile.getLastModified());
- //properties.setRemoteFileTimeStamp(-1);
-
- properties.setDirty(false);
- properties.setUsedBinaryTransfer(_remoteFile.isBinary());
- }
- catch (final SystemMessageException e)
- {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- SystemMessageDialog.displayMessage(e);
- }
- });
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return Status.OK_STATUS;
- }
- }
-
- private class BackgroundUploadJob extends Job
- {
-
- public BackgroundUploadJob()
- {
- super("Upload"); // need to externalize //$NON-NLS-1$
- }
-
- 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);
-
- // making sure we have the same version as is in the cache
- _remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath(), monitor);
-
- String srcEncoding = RemoteFileUtility.getSourceEncoding(_tempFile);
-
- fs.upload(_tempFile.getLocation().makeAbsolute().toOSString(), _remoteFile, srcEncoding, monitor);
-
- // wait for timestamp to update before re-fetching remote file
- _remoteFile.markStale(true);
- _remoteFile = fs.getRemoteFileObject(_remoteFile.getAbsolutePath(), monitor);
-
- long ts = _remoteFile.getLastModified();
- properties.setRemoteFileTimeStamp(ts);
- 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;
- private String _uploadFile;
-
- /**
- * Constructor.
- * @param shell the parent shell of the dialog
- */
- public UploadConflictDialog(Shell shell, String file)
- {
- super(shell, FileResources.RESID_CONFLICT_SAVE_TITLE);
- _uploadFile = file;
- //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(SWT.FILL, SWT.TOP, true, false));
-
- Label label = new Label(m, SWT.NONE);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
-
- Text text = new Text(m, SWT.WRAP | SWT.MULTI);
- text.setEditable(false);
- text.setText(NLS.bind(FileResources.RESID_CONFLICT_SAVE_MESSAGE, _uploadFile));
- GridData textData = new GridData(SWT.FILL, SWT.CENTER, true, false);
- text.setLayoutData(textData);
-
- 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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_VALIDATE_PATH_EMPTY,
- IStatus.ERROR,
- FileResources.MSG_VALIDATE_PATH_EMPTY,
- FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
-
- setErrorMessage(_errorMessage);
-
- }
- }
- else
- {
- _browseButton.setEnabled(false);
- _saveasFileEntry.setEnabled(false);
- enableOkButton(true);
- _errorMessage = null;
- setErrorMessage(_errorMessage);
- }
-
- if (e.getSource() == _browseButton)
- {
-
- ISaveAsDialog dlg = FileDialogFactory.makeSaveAsDialog(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(), new NullProgressMonitor());
- RSECorePlugin.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);
- 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(), _remoteFile.getName());
- 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SaveAsDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SaveAsDialog.java
deleted file mode 100644
index 35642a962..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SaveAsDialog.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.
- * Xuan Chen (IBM) - [220999] [api] Need to change class SystemSelectRemoteFileAction to use SystemRemoteFileDialog
- * Move SystemSelectRemoteFileOrFolderDialog to internal package first.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.dialogs;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.files.ui.dialogs.ISaveAsDialog;
-import org.eclipse.rse.files.ui.widgets.SaveAsForm;
-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 {
-
-
- private SaveAsForm form;
-
- /**
- * Constructor
- *
- * @param shell The shell to hang the dialog off of
- *
- */
- public 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
- */
- public SaveAsDialog(Shell shell, String title)
- {
- super(shell, title, true);
- }
-
-
- 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(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java
deleted file mode 100644
index 0f65c5ca0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/dialogs/SystemSelectRemoteFileOrFolderDialog.java
+++ /dev/null
@@ -1,609 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Kevin Doyle (IBM) - Added a double click listener that closes the dialog if appropriate
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Xuan Chen (IBM) - [220999] [api] Need to change class SystemSelectRemoteFileAction to use SystemRemoteFileDialog
- * Move SystemSelectRemoteFileOrFolderDialog to internal package first.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.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.ViewerFilter;
-import org.eclipse.rse.core.IRSESystemType;
-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.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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.ISystemTree;
-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(IRSESystemType[])}
- * <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
- *
- * @deprecated should be using SystemRemoteResourceDialog now
- * @see org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog
- * @see org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog
- *
- */
-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);
- }
-
- /**
- * 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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] 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;
- }
-
-
- // ------------------
- // PRIVATE METHODS...
- // ------------------
- /**
- * Private method.
- * @see SystemPromptDialog#createContents(Composite)
- */
- protected Control createContents(Composite parent)
- {
- Control control = super.createContents(parent);
- form.getSystemTree().addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(event);
- }
- });
- return control;
- }
-
- /**
- * Handles double clicks in viewer.
- * Closes the dialog if a file is double clicked
- */
- protected void handleDoubleClick(DoubleClickEvent event)
- {
- ISystemTree tree = form.getSystemTree();
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null)
- return;
- if (FILE_MODE && form.isPageComplete() && !tree.isExpandable(element))
- {
- setReturnCode(OK);
- if (processOK())
- {
- okPressed = true;
- close();
- }
- }
- }
-
- /**
- * 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/internal/files/ui/propertypages/FileServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java
deleted file mode 100644
index 74580a93a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.ISystemRegistry;
-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.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 = getFileServiceSubSystemConfigurations(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[] getFileServiceSubSystemConfigurations(IRSESystemType systemType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, false);
-
- 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 ISubSystemConfiguration getCurrentSubSystemConfiguration()
- {
- 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/internal/files/ui/propertypages/SystemCachePreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java
deleted file mode 100644
index 452458a0d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [239459] Clear Cached Files action should not delete project metadata
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.IStatus;
-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.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.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.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 _limitCacheCheckbox;
- private Text _maxCacheSize;
- private Label maxCacheSizeLabel;
-
- /**
- * 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"); //$NON-NLS-1$
- }
-
- /**
- *
- */
- protected Control createContents(Composite gparent)
- {
- Composite parent = SystemWidgetHelpers.createComposite(gparent, 2);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- _limitCacheCheckbox = SystemWidgetHelpers.createCheckBox(parent, FileResources.RESID_PREF_CACHE_LIMIT_CACHE_SIZE_LABEL, this);
- _limitCacheCheckbox.setToolTipText(FileResources.RESID_PREF_CACHE_LIMIT_CACHE_SIZE_TOOLTIP);
- _limitCacheCheckbox.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false));
- ((GridData)_limitCacheCheckbox.getLayoutData()).horizontalSpan = 2;
-
- maxCacheSizeLabel = new Label(parent, SWT.NONE);
- maxCacheSizeLabel.setText(FileResources.RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL);
- maxCacheSizeLabel.setToolTipText(FileResources.RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP);
- maxCacheSizeLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
-
- _maxCacheSize = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
- gd.widthHint = 75;
- _maxCacheSize.setLayoutData(gd);
- _maxCacheSize.setTextLimit(5);
- _maxCacheSize.setToolTipText(FileResources.RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP);
- _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.BEGINNING, SWT.BEGINNING, false, false));
- ((GridData)_clearButton.getLayoutData()).horizontalSpan = 2;
- _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.setBackground(parent.getBackground());
- warning.setText(FileResources.RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION);
- warning.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
- ((GridData)warning.getLayoutData()).horizontalSpan = 2;
-
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent);
-
- initControls();
- return parent;
- }
-
- private void initControls()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- boolean enableMaxSize = store.getBoolean(ISystemFilePreferencesConstants.LIMIT_CACHE);
- _maxCacheSize.setEnabled(enableMaxSize);
-
- String maxCacheSizeStr = store.getString(ISystemFilePreferencesConstants.MAX_CACHE_SIZE);
-
- if (maxCacheSizeStr == null || maxCacheSizeStr.equals("")) { //$NON-NLS-1$
- maxCacheSizeStr = ISystemFilePreferencesConstants.DEFAULT_MAX_CACHE_SIZE;
- }
-
- _maxCacheSize.setText(maxCacheSizeStr);
- _limitCacheCheckbox.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(ISystemFilePreferencesConstants.LIMIT_CACHE);
- _limitCacheCheckbox.setSelection(enableMaxSize);
-
- maxCacheSizeLabel.setEnabled(enableMaxSize);
-
- _maxCacheSize.setEnabled(enableMaxSize);
- _maxCacheSize.setText(store.getDefaultString(ISystemFilePreferencesConstants.MAX_CACHE_SIZE));
- }
-
- /**
- * Set default preferences for the communications preference page.
- *
- * @param store PreferenceStore used for this preference page.
- * @deprecated moved to Activator
- */
- public static void initDefaults(IPreferenceStore store)
- {
- // no longer needed here - moved to Activator
- }
-
- /**
- * @see FieldEditorPreferencePage#performOk()
- */
- public boolean performOk()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- String size = _maxCacheSize.getText();
-
- if (size == null || size.trim().equals("")) { //$NON-NLS-1$
- size = ISystemFilePreferencesConstants.DEFAULT_MAX_CACHE_SIZE;
- }
-
- store.setValue(ISystemFilePreferencesConstants.MAX_CACHE_SIZE, size);
- store.setValue(ISystemFilePreferencesConstants.LIMIT_CACHE, _limitCacheCheckbox.getSelection());
-
- return super.performOk();
- }
-
- private class ClearTempFilesRunnable implements IRunnableWithProgress
- {
- /**
- * Returns false if the member is a dot file under the project, otherwise true
- * @param member
- * @return whether to delete this file
- */
- private boolean isDeletable(IResource member)
- {
- if (member instanceof IFile){
- String name = member.getName();
- if (name.startsWith(".")){ //$NON-NLS-1$
- return false;
- }
- }
- return true;
- }
-
- public void run(IProgressMonitor monitor)
- {
- SystemRemoteEditManager mgr = SystemRemoteEditManager.getInstance();
- // if no temp file project, nothing to do
- if (!mgr.doesRemoteEditProjectExist())
- {
- return;
- }
-
- IProject tempFiles = mgr.getRemoteEditProject();
- if (tempFiles != null)
- {
- try
- {
- IResource[] members = tempFiles.members();
- if (members != null)
- {
- for (int i = 0; i < members.length; i++)
- {
- IResource member = members[i];
- if (isDeletable(member))
- {
- // 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();
- }
-
- }
- }
- }
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().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 == _limitCacheCheckbox)
- {
- _maxCacheSize.setEnabled(_limitCacheCheckbox.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 = RSECorePlugin.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.getInstance();
- 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.getInstance();
-
- // 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 = RSECorePlugin.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.getInstance();
- if (!mgr.doesRemoteEditProjectExist())
- {
- return true;
- }
-
- List dirtyEditors = new ArrayList();
- if (!getDirtyReplicas(dirtyEditors))
- {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_CACHE_UNABLE_TO_SYNCH,
- IStatus.ERROR, FileResources.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 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_CACHE_UPLOAD_BEFORE_DELETE,
- IStatus.ERROR, FileResources.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(FileResources.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/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java
deleted file mode 100644
index 2e5e7a950..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePermissionsPropertyPage.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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.
- *
- * Contributors:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * David McKnight (IBM) - [209703] apply encoding and updating remote file when apply on property page
- * Martin Oberhuber (Wind River) - [234038] Force refresh IRemoteFile after changing permissions
- * David McKnight (IBM) - [234038] [files][refresh] Changing file permissions does not update property sheet or refresh tree
- * David McKnight (IBM) - [234045] [ftp] Errors while changing file permissions are not displayed to the user
- *********************************************************************************/
-package org.eclipse.rse.internal.files.ui.propertypages;
-
-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.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.PendingHostFilePermissions;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.swt.SWT;
-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.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Property page for viewing and changing the user, group and permissions
- * for a particular file.
- * */
-public class SystemFilePermissionsPropertyPage extends SystemBasePropertyPage {
-
- private Button _userRead;
- private Button _userWrite;
- private Button _userExecute;
- private Button _groupRead;
- private Button _groupWrite;
- private Button _groupExecute;
- private Button _otherRead;
- private Button _otherWrite;
- private Button _otherExecute;
-
- private Text _userEntry;
- private Text _groupEntry;
-
- private IHostFilePermissions _permissions;
- private String _owner;
- private String _group;
-
- /**
- * Get the input remote file object
- */
- protected IRemoteFile getRemoteFile()
- {
- Object element = getElement();
- IRemoteFile file = (IRemoteFile)element;
-
-
- return file;
- }
-
- protected Control createContentArea(Composite parent) {
-
-
- // Inner composite
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 1);
-
- IRemoteFile file = getRemoteFile();
- IFilePermissionsService service = getPermissionsService(file);
- if (service == null ||
- (service.getCapabilities(file.getHostFile()) & IFilePermissionsService.FS_CAN_GET_PERMISSIONS) == 0){
- // not supported
- SystemWidgetHelpers.createLabel(parent, FileResources.MESSAGE_FILE_PERMISSIONS_NOT_SUPPORTED);
- }
- else
- {
- Group permissionsGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts,4, FileResources.RESID_PREF_PERMISSIONS_PERMISSIONS_LABEL);
- GridData data = new GridData();
- data.horizontalSpan = 5;
- data.horizontalAlignment = SWT.FILL;
- data.grabExcessHorizontalSpace = false;
- data.verticalAlignment = SWT.BEGINNING;
- data.grabExcessVerticalSpace = false;
- permissionsGroup.setLayoutData(data);
-
- Label userTypeLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_TYPE_LABEL);
-
- Label readLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_READ_LABEL);
- data = new GridData();
- data.horizontalIndent = 20;
- readLabel.setLayoutData(data);
-
- Label writeLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_WRITE_LABEL);
- data = new GridData();
- data.horizontalIndent = 20;
- writeLabel.setLayoutData(data);
-
- Label executeLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_EXECUTE_LABEL);
- data = new GridData();
- data.horizontalIndent = 20;
- executeLabel.setLayoutData(data);
-
-
- Label userLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_USER_LABEL);
- _userRead = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _userRead.setLayoutData(data);
-
- _userWrite = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _userWrite.setLayoutData(data);
-
- _userExecute = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _userExecute.setLayoutData(data);
-
- Label groupLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_GROUP_LABEL);
-
- _groupRead = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _groupRead.setLayoutData(data);
-
- _groupWrite = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _groupWrite.setLayoutData(data);
-
- _groupExecute = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _groupExecute.setLayoutData(data);
-
- Label otherLabel = SystemWidgetHelpers.createLabel(permissionsGroup, FileResources.RESID_PREF_PERMISSIONS_OTHERS_LABEL);
- _otherRead = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _otherRead.setLayoutData(data);
-
- _otherWrite = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _otherWrite.setLayoutData(data);
-
- _otherExecute = new Button(permissionsGroup, SWT.CHECK);
- data = new GridData();
- data.horizontalIndent = 20;
- _otherExecute.setLayoutData(data);
-
- Group ownerGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, FileResources.RESID_PREF_PERMISSIONS_OWNERSHIP_LABEL);
- data = new GridData();
- data.horizontalSpan = 1;
- data.verticalSpan = 5;
- data.horizontalAlignment = SWT.FILL;
- data.grabExcessHorizontalSpace = false;
- data.verticalAlignment = SWT.BEGINNING;
- data.grabExcessVerticalSpace = false;
- ownerGroup.setLayoutData(data);
-
- Label userOwnerLabel = SystemWidgetHelpers.createLabel(ownerGroup, FileResources.RESID_PREF_PERMISSIONS_USER_LABEL);
- _userEntry = new Text(ownerGroup, SWT.BORDER);
- data = new GridData();
- data.widthHint = 100;
- _userEntry.setLayoutData(data);
-
- Label groupOwnerLabel = SystemWidgetHelpers.createLabel(ownerGroup, FileResources.RESID_PREF_PERMISSIONS_GROUP_LABEL);
- _groupEntry = new Text(ownerGroup, SWT.BORDER);
- data = new GridData();
- data.widthHint = 100;
- _groupEntry.setLayoutData(data);
-
-
- initFields();
- }
-
- return composite_prompts;
- }
-
- protected boolean verifyPageContents() {
- return true;
- }
-
- private void enableOwnershipFields(boolean enabled) {
-
- _userEntry.setEnabled(enabled);
- _groupEntry.setEnabled(enabled);
- }
-
- private void enablePermissionFields(boolean enabled){
-
- _groupExecute.setEnabled(enabled);
- _groupRead.setEnabled(enabled);
- _groupWrite.setEnabled(enabled);
-
- _userExecute.setEnabled(enabled);
- _userRead.setEnabled(enabled);
- _userWrite.setEnabled(enabled);
-
- _otherExecute.setEnabled(enabled);
- _otherRead.setEnabled(enabled);
- _otherWrite.setEnabled(enabled);
- }
-
- private IFilePermissionsService getPermissionsService(IRemoteFile remoteFile){
-
- if (remoteFile instanceof IAdaptable){
- return (IFilePermissionsService)((IAdaptable)remoteFile).getAdapter(IFilePermissionsService.class);
- }
-
- return null;
- }
-
-
-
-
- private void initFields() {
- IRemoteFile remoteFile = getRemoteFile();
-
- IFilePermissionsService ps = getPermissionsService(remoteFile);
- if (ps == null){
- enablePermissionFields(false);
- enableOwnershipFields(false);
- }
- else {
- initPermissionFields(remoteFile, ps);
- }
- }
-
- private void initPermissionFields(IRemoteFile file, IFilePermissionsService service){
- _permissions = null; // null set so that we make sure we're getting fresh permissions
-
- final IRemoteFile rFile = file;
- final IFilePermissionsService pService = service;
-
- int capabilities = service.getCapabilities(file.getHostFile());
- if ((capabilities & IFilePermissionsService.FS_CAN_SET_PERMISSIONS) != 0){
- enablePermissionFields(true);
- }
- else {
- enablePermissionFields(false);
- }
-
- if ((capabilities & IFilePermissionsService.FS_CAN_SET_OWNER) != 0){
- enableOwnershipFields(true);
- }
- else {
- enableOwnershipFields(false);
- }
-
- if ((capabilities & IFilePermissionsService.FS_CAN_GET_PERMISSIONS) != 0){
- _permissions = file.getPermissions();
- if (_permissions == null || _permissions instanceof PendingHostFilePermissions){
- Job deferredFetch = new Job(FileResources.MESSAGE_GETTING_PERMISSIONS)
- {
- public IStatus run(IProgressMonitor monitor){
- try
- {
- _permissions = pService.getFilePermissions(rFile.getHostFile(), monitor);
-
- // notify change
- Display.getDefault().asyncExec(new Runnable()
- {
- public void run()
- {
- _userRead.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_USER_READ));
- _userWrite.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_USER_WRITE));
- _userExecute.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_USER_EXECUTE));
- _groupRead.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_GROUP_READ));
- _groupWrite.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_GROUP_WRITE));
- _groupExecute.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_GROUP_EXECUTE));
- _otherRead.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_OTHER_READ));
- _otherWrite.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_OTHER_WRITE));
- _otherExecute.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_OTHER_EXECUTE));
-
- _owner = _permissions.getUserOwner();
- _group = _permissions.getGroupOwner();
-
- _userEntry.setText(_owner);
- _groupEntry.setText(_group);
-
- }
- });
- }
- catch (SystemMessageException e)
- {
- setMessage(e.getSystemMessage());
- }
- return Status.OK_STATUS;
- }
- };
- deferredFetch.schedule();
- }
- else {
- _userRead.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_USER_READ));
- _userWrite.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_USER_WRITE));
- _userExecute.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_USER_EXECUTE));
- _groupRead.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_GROUP_READ));
- _groupWrite.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_GROUP_WRITE));
- _groupExecute.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_GROUP_EXECUTE));
- _otherRead.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_OTHER_READ));
- _otherWrite.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_OTHER_WRITE));
- _otherExecute.setSelection(_permissions.getPermission(IHostFilePermissions.PERM_OTHER_EXECUTE));
-
- _owner = _permissions.getUserOwner();
- _group = _permissions.getGroupOwner();
-
- _userEntry.setText(_owner);
- _groupEntry.setText(_group);
- }
- }
- else {
- enablePermissionFields(false);
- enableOwnershipFields(false);
- }
- }
-
-
-
- public boolean performOk() {
- IRemoteFile remoteFile = getRemoteFile();
-
- boolean changed = false;
-
- // permission changes
- if (_permissions != null){
- IFilePermissionsService service = getPermissionsService(remoteFile);
-
- int capabilities = service.getCapabilities(remoteFile.getHostFile());
- if ((capabilities & IFilePermissionsService.FS_CAN_SET_PERMISSIONS) != 0){
- try
- {
- IHostFilePermissions newPermissions = (IHostFilePermissions)_permissions.clone();
-
- if (_permissions.getPermission(IHostFilePermissions.PERM_USER_READ) != _userRead.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_USER_READ, _userRead.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_USER_WRITE) != _userWrite.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_USER_WRITE, _userWrite.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_USER_EXECUTE) != _userExecute.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_USER_EXECUTE, _userExecute.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_GROUP_READ) != _groupRead.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_GROUP_READ, _groupRead.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_GROUP_WRITE) != _groupWrite.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_GROUP_WRITE, _groupWrite.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_GROUP_EXECUTE) != _groupExecute.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_GROUP_EXECUTE, _groupExecute.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_OTHER_READ) != _otherRead.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_OTHER_READ, _otherRead.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_OTHER_WRITE) != _otherWrite.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_OTHER_WRITE, _otherWrite.getSelection());
- }
- if (_permissions.getPermission(IHostFilePermissions.PERM_OTHER_EXECUTE) != _otherExecute.getSelection()){
- changed = true;
- newPermissions.setPermission(IHostFilePermissions.PERM_OTHER_EXECUTE, _otherExecute.getSelection());
- }
-
- if (_owner != _userEntry.getText()){
- changed = true;
- newPermissions.setUserOwner(_userEntry.getText());
- }
- if (_group != _groupEntry.getText()){
- changed = true;
- newPermissions.setGroupOwner(_groupEntry.getText());
- }
-
-
- if (changed){
- //mark file stale even if an exception is thrown later, to ensure proper re-get
- remoteFile.markStale(true, true);
- // assuming permissions are good
- service.setFilePermissions(remoteFile.getHostFile(), newPermissions, new NullProgressMonitor());
-
- _permissions = newPermissions;
- }
- }
- catch (SystemMessageException e){
- setMessage(e.getSystemMessage());
- }
- catch (CloneNotSupportedException e){
- // unexpected, not showing but logging
- SystemBasePlugin.logError(e.getMessage());
- }
- }
- }
-
- if (changed){
- remoteFile.markStale(true);
- // notify views of change
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- // refresh the file, since ftp and ssh will need new file objects
- registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, remoteFile));
-
- //registry.fireEvent(new SystemResourceChangeEvent(remoteFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, remoteFile));
- }
-
-
- return super.performOk();
- }
-
- protected boolean wantDefaultAndApplyButton()
- {
- return true;
- }
-
- protected void performApply() {
- performOk();
- }
-
- protected void performDefaults() {
- IRemoteFile file = getRemoteFile();
- IFilePermissionsService service = (IFilePermissionsService)((IAdaptable)file).getAdapter(IFilePermissionsService.class);
- initPermissionFields(file, service);
- }
-
- public void setVisible(boolean visible) {
- if (visible){
- IRemoteFile file = getRemoteFile();
- if (file.isStale()){ // has file changed?
- try
- {
- file = file.getParentRemoteFileSubSystem().getRemoteFileObject(file.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (SystemMessageException e){
- // unexpected, logging but not showing user
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
- setElement((IAdaptable)file);
-
- // reset according to the changed file
- performDefaults();
- }
- }
- super.setVisible(visible);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java
deleted file mode 100644
index fee82d3f3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java
+++ /dev/null
@@ -1,676 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [160776] format file size according to client system conventions and locale
- * David McKnight (IBM) - [173518] [refresh] Read only changes are not shown in RSE until the parent folder is refreshed
- * Kevin Doyle (IBM) - [197976] Changing a file to read-only when it is open doesn't update local copy
- * Kevin Doyle (IBM) - [186125] Changing encoding of a file is not reflected when it was opened before
- * David McKnight (IBM) - [209660] use parent encoding as default, rather than system encoding
- * David McKnight (IBM) - [209703] apply encoding and updating remote file when apply on property page
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226574][api] Add ISubSystemConfiguration#supportsEncoding()
- * Xuan Chen (IBM) - [228707] get NPE when click ok on the properties page of an I5/OS IFS file
- * David McKnight (IBM) - [230001] Property page contains invalid values
- * David McKnight (IBM) - [199596] [refresh][ftp] Changing a file/folder's Read-Only attribute doesn't always update IRemoteFile
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.propertypages;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.subsystems.files.core.subsystems.IVirtualRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEncodingManager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.SWT;
-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.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.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.ide.IDEEncoding;
-
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.text.NumberFormat;
-
-
-/**
- * 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 Button defaultEncodingButton, otherEncodingButton;
- protected Combo otherEncodingCombo;
- protected String errorMessage;
- protected boolean initDone = false;
- protected boolean wasReadOnly = false;
- protected String prevEncoding;
-
- private boolean encodingFieldAdded = false;
- private String defaultEncoding = null;
- private boolean isValidBefore = true;
-
- /**
- * Constructor for SystemFilterPropertyPage
- */
- public SystemFilePropertyPage()
- {
- super();
- }
-
-
- /**
- * 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, ""); //$NON-NLS-1$
- 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, ""); //$NON-NLS-1$
- 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, ""); //$NON-NLS-1$
- 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, ""); //$NON-NLS-1$
- 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, ""); //$NON-NLS-1$
- 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;
- }
-
- // check if an encodings field should be added. Add only if the subsystem
- // indicates that it supports encodings
- IRemoteFileSubSystem subSys = file.getParentRemoteFileSubSystem();
- IHost host = subSys.getHost();
- if (subSys.getSubSystemConfiguration().supportsEncoding(host)) {
- SystemWidgetHelpers.createLabel(composite_prompts, "", 2); //$NON-NLS-1$
-
- // encoding field
- Group encodingGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, SystemFileResources.RESID_PP_FILE_ENCODING_GROUP_LABEL);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = SWT.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = SWT.BEGINNING;
- data.grabExcessVerticalSpace = false;
- encodingGroup.setLayoutData(data);
-
- SelectionAdapter defaultButtonSelectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEncodingGroupState(defaultEncodingButton.getSelection());
- updateValidState();
- }
- };
-
- // default encoding field
- IRemoteFile parentFile = file.getParentRemoteFile();
- if (parentFile == null){
- defaultEncoding = file.getParentRemoteFileSubSystem().getRemoteEncoding();
- }
- else {
- defaultEncoding = parentFile.getEncoding();
- }
-
- String defaultEncodingLabel = SystemFileResources.RESID_PP_FILE_ENCODING_DEFAULT_LABEL;
- int idx = defaultEncodingLabel.indexOf('%');
-
- if (idx != -1) {
- defaultEncodingLabel = defaultEncodingLabel.substring(0, idx) +
- defaultEncoding +
- defaultEncodingLabel.substring(idx+2);
- }
-
- defaultEncodingButton = SystemWidgetHelpers.createRadioButton(encodingGroup, null, defaultEncodingLabel, SystemFileResources.RESID_PP_FILE_ENCODING_DEFAULT_TOOLTIP);
- data = new GridData();
- data.horizontalSpan = 2;
- defaultEncodingButton.setLayoutData(data);
- defaultEncodingButton.addSelectionListener(defaultButtonSelectionListener);
-
- Composite otherComposite = new Composite(encodingGroup, SWT.NONE);
- GridLayout otherLayout = new GridLayout();
- otherLayout.numColumns = 2;
- otherLayout.marginWidth = 0;
- otherLayout.marginHeight = 0;
- otherComposite.setLayout(otherLayout);
- otherComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- // other encoding field
- otherEncodingButton = SystemWidgetHelpers.createRadioButton(otherComposite, null, SystemFileResources.RESID_PP_FILE_ENCODING_OTHER_LABEL, SystemFileResources.RESID_PP_FILE_ENCODING_OTHER_TOOLTIP);
-
- SelectionAdapter otherButtonSelectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEncodingGroupState(!otherEncodingButton.getSelection());
- updateValidState();
- }
- };
-
- otherEncodingButton.addSelectionListener(otherButtonSelectionListener);
-
- // other encoding combo
- otherEncodingCombo = SystemWidgetHelpers.createCombo(otherComposite, null, SystemFileResources.RESID_PP_FILE_ENCODING_ENTER_TOOLTIP);
- data = new GridData();
- data.horizontalAlignment = SWT.BEGINNING;
- data.grabExcessHorizontalSpace = true;
- otherEncodingCombo.setLayoutData(data);
-
- otherEncodingCombo.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- updateValidState();
- }
- });
-
- otherEncodingCombo.addKeyListener(new KeyAdapter(){
- public void keyReleased(KeyEvent e) {
- updateValidState();
- }
- });
-
- SystemWidgetHelpers.createLabel(encodingGroup, ""); //$NON-NLS-1$
-
- SystemWidgetHelpers.createLabel(composite_prompts, "", 2); //$NON-NLS-1$
-
- encodingFieldAdded = true;
- }
- else {
- encodingFieldAdded = false;
- }
-
- if (!initDone)
- doInitializeFields();
-
- if (!file.isRoot() && file.showReadOnlyProperty())
- cbReadonlyPrompt.addSelectionListener(this);
-
- return composite_prompts;
- }
-
- /**
- * Update the encoding group state.
- * @param useDefault whether to update the state with default option on. <code>true</code> if the default option
- * should be on, <code>false</code> if it should be off.
- */
- private void updateEncodingGroupState(boolean useDefault) {
- defaultEncodingButton.setSelection(useDefault);
- otherEncodingButton.setSelection(!useDefault);
-
- if (useDefault) {
- otherEncodingCombo.setText(getDefaultEncoding());
- }
-
- otherEncodingCombo.setEnabled(!useDefault);
- updateValidState();
- }
-
- /**
- * Updates the valid state of the encoding group.
- */
- private void updateValidState() {
- boolean isValid = isEncodingValid();
-
- if (isValid != isValidBefore) {
- isValidBefore = isValid;
-
- if (isValidBefore) {
- clearErrorMessage();
- }
- else {
- // TODO make this a SystemMessage
- setErrorMessage(FileResources.MESSAGE_ENCODING_NOT_SUPPORTED);
- }
- }
- }
-
- /**
- * Returns the default encoding.
- * @return the default encoding
- */
- protected String getDefaultEncoding() {
- return defaultEncoding;
- }
-
- /**
- * Returns the currently selected encoding.
- * @return the currently selected encoding.
- */
- protected String getSelectedEncoding() {
- if (null != defaultEncodingButton && defaultEncodingButton.getSelection()) {
- return defaultEncoding;
- }
-
- if (otherEncodingCombo != null)
- {
- return otherEncodingCombo.getText();
- }
-
- return null;
- }
-
- /**
- * Returns whether the encoding is valid.
- * @return <code>true</code> if the encoding is valid, <code>false</code> otherwise.
- */
- private boolean isEncodingValid() {
- return defaultEncodingButton.getSelection() || isEncodingValid(otherEncodingCombo.getText());
- }
-
- /**
- * Returns whether or not the given encoding is valid.
- * @param encoding the encoding.
- * @return <code>true</code> if the encoding is valid, <code>false</code> otherwise.
- */
- private boolean isEncodingValid(String encoding) {
- try {
- return Charset.isSupported(encoding);
- }
- catch (IllegalCharsetNameException e) {
- return false;
- }
- }
-
- /**
- * Get the input remote file object
- */
- protected IRemoteFile getRemoteFile()
- {
- Object element = getElement();
- IRemoteFile file = (IRemoteFile)element;
-
- return file;
- }
-
- /**
- * 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("..."); //$NON-NLS-1$
- 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) {
- NumberFormat fmt = NumberFormat.getIntegerInstance();
- String formattedNumber = fmt.format(file.getLength());
- labelSize.setText(formattedNumber);
- }
- // modified
- if (labelModified != null)
- {
- Date date = file.getLastModifiedDate();
- if (date != null)
- {
- DateFormat datefmt = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.FULL);
- String formattedDate = datefmt.format(date);
- labelModified.setText(formattedDate);
- }
- }
- // readonly
- if (file.showReadOnlyProperty()) {
- if (cbReadonlyPrompt != null)
- {
- cbReadonlyPrompt.setSelection(!file.canWrite());
- wasReadOnly = !file.canWrite();
- if (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);
- }
-
- // the file encoding group
- if (encodingFieldAdded) {
- List encodings = IDEEncoding.getIDEEncodings();
- String[] encodingStrings = new String[encodings.size()];
- encodings.toArray(encodingStrings);
- otherEncodingCombo.setItems(encodingStrings);
-
- String encoding = file.getEncoding();
- prevEncoding = encoding;
-
- // if the encoding is the same as the default encoding, then we want to choose the default encoding option
- if (encoding.equalsIgnoreCase(defaultEncoding)) {
- updateEncodingGroupState(true);
- }
- // otherwise choose the other encoding option
- else {
- otherEncodingCombo.setText(encoding);
- updateEncodingGroupState(false);
- }
- }
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean ok = super.performOk();
- boolean readOnlySelected = cbReadonlyPrompt != null ? cbReadonlyPrompt.getSelection() : false;
- IRemoteFile remoteFile = getRemoteFile();
-
- if (ok && (cbReadonlyPrompt!=null) &&
- ((readOnlySelected && !wasReadOnly) ||
- (!readOnlySelected && wasReadOnly)))
- {
- try
- {
- // get old can write attribute
- boolean oldCanWrite = remoteFile.canWrite();
-
- //set readonly
- remoteFile.getParentRemoteFileSubSystem().setReadOnly(remoteFile,readOnlySelected, new NullProgressMonitor());
-
- // get the new can write attribute
- boolean updatedValue = remoteFile.canWrite();
-
- // check if the file is open in an editor
- SystemEditableRemoteFile editable = new SystemEditableRemoteFile(remoteFile);
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN) {
- // Need to keep local copy and remote copies up to date
- editable.setReadOnly(readOnlySelected);
- }
-
- // if the values haven't changed, then we need to
- // refresh
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- remoteFile.markStale(true);
-
- // oldCanWrite and updatedValue may not be the same depending on the underlying file service
- // If the file service updates the underlying object, then there is no need for a remote refresh
- if (oldCanWrite == updatedValue)
- {
- if (remoteFile.isDirectory())
- {
- sr.fireEvent(new SystemResourceChangeEvent(remoteFile.getParentRemoteFile(),ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE,
- remoteFile.getParentRemoteFile()
- ));
- }
- else
- {
- sr.fireEvent(new SystemResourceChangeEvent(remoteFile,ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, remoteFile));
- }
- }
- else
- {
- sr.fireEvent(new SystemResourceChangeEvent(remoteFile,ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE,null));
- }
- }
- catch (RemoteFileIOException exc) {
- String msgDetails = NLS.bind(FileResources.FILEMSG_IO_ERROR_DETAILS, exc.getMessage());
- setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_IO_ERROR,
- IStatus.ERROR, FileResources.FILEMSG_IO_ERROR, msgDetails));
-
- }
- catch (RemoteFileSecurityException exc) {
- String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, exc.getMessage());
- setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, FileResources.FILEMSG_SECURITY_ERROR, msgDetails));
-
- }
- catch (SystemMessageException e) {
- setMessage(e.getSystemMessage());
- }
- }
-
- // set the encoding
- String selectedEncoding = getSelectedEncoding();
-
-
- if (ok && encodingFieldAdded && prevEncoding != null && !prevEncoding.equals(selectedEncoding)) {
- IRemoteFile rfile = getRemoteFile();
- IRemoteFileSubSystem subsys = rfile.getParentRemoteFileSubSystem();
- String hostName = subsys.getHost().getHostName();
-
- RemoteFileEncodingManager mgr = RemoteFileEncodingManager.getInstance();
- if (defaultEncodingButton.getSelection())
- {
- mgr.setEncoding(hostName, rfile.getAbsolutePath(),null);
- }
- else
- {
- mgr.setEncoding(hostName, rfile.getAbsolutePath(), getSelectedEncoding());
- }
-
-
- SystemEditableRemoteFile editable = new SystemEditableRemoteFile(remoteFile);
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN) {
- IFile file = editable.getLocalResource();
- try {
- file.setCharset(selectedEncoding, null);
- } catch (CoreException e) {
- }
- }
-
- }
-
- return ok;
- }
-
- protected boolean wantDefaultAndApplyButton()
- {
- return true;
- }
-
- protected void performApply() {
- performOk();
- }
-
- protected void performDefaults() {
- doInitializeFields();
- }
-
-
- /**
- * 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)
- {
-
- }
-
-
- public void setVisible(boolean visible) {
- if (visible){
- IRemoteFile file = getRemoteFile();
- if (file.isStale()){ // has file changed?
- try
- {
- file = file.getParentRemoteFileSubSystem().getRemoteFileObject(file.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (Exception e){
- }
- setElement((IAdaptable)file);
-
- // reset according to the changed file
- performDefaults();
- }
- }
- super.setVisible(visible);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java
deleted file mode 100644
index 34095e824..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/UniversalPreferencePage.java
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [177523] Unify singleton getter methods
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [208951] no longer used editor registry for file type associations
- * David McKnight (IBM) - [203114] Usability improvements for file transfer mode prefs
- * David McKnight (IBM) - [210142] for accessibility need transfer mode toggle button
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-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.resource.ImageDescriptor;
-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.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.DecorationOverlayIcon;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeMapping;
-import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping;
-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.ISharedImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.internal.dialogs.FileExtensionDialog;
-
-/**
- * "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, ICellModifier
-{
-
-
-
- protected Label resourceTypeLabel;
- protected Table resourceTypeTable;
- protected Button addResourceTypeButton;
- protected Button removeResourceTypeButton;
- protected Button toggleModeButton;
-
- protected Button doSuperTransferButton;
-
- protected Button defaultBinaryButton;
- protected Button defaultTextButton;
-
- protected SystemFileTransferModeRegistry modeRegistry;
-
- protected ArrayList modeMappings;
- protected ArrayList imagesToDispose;
-
- protected Combo archiveTypeCombo;
- protected Combo defaultArchiveTypeCombo;
-
- protected Text downloadBufferSize;
- protected Text uploadBufferSize;
-
- protected Image fileImage;
- protected Image binaryFileImage;
-
- protected String[] columnProperties = { "P_ICON", "P_TYPE", "P_CONTENT" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- /**
- * 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"); //$NON-NLS-1$
- }
-
-
- protected void createFieldEditors() {
-
- modeRegistry = SystemFileTransferModeRegistry.getInstance();
-
- modeMappings = 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.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);
-
- toggleModeButton = new Button(groupComponent, SWT.PUSH);
- toggleModeButton.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TOGGLEBUTTON_LABEL);
- toggleModeButton.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TOGGLEBUTTON_TOOLTIP);
- toggleModeButton.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, toggleModeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- toggleModeButton.setLayoutData(data);
-
-
-
- Composite afterTableComposite = new Composite(parent, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.verticalSpacing = 10;
- layout.horizontalSpacing = 10;
- afterTableComposite.setLayout(layout);
- data = new GridData();
- data.horizontalSpan = 2;
- afterTableComposite.setLayoutData(data);
-
- // default file transfer mode
- Group defaultModeGroup = new Group(afterTableComposite, 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_HORIZONTAL);
- data.horizontalSpan = 1;
- 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);
-
-
- Composite propertiesComposite = new Composite(afterTableComposite, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 1;
-
- data = new GridData();
- data.horizontalSpan = 1;
- propertiesComposite.setLayout(layout);
- propertiesComposite.setLayoutData(data);
-
-
- // Add the boolean field editor for users to choose whether
- // hidden files should be displayed
- BooleanFieldEditor showHiddenEditor = new BooleanFieldEditor(
- ISystemFilePreferencesConstants.SHOWHIDDEN,
- FileResources.RESID_PREF_UNIVERSAL_SHOWHIDDEN_LABEL,
- propertiesComposite);
-
- addField(showHiddenEditor);
-
-
- // field to indicate whether or not to preserve timestamps during copy
- BooleanFieldEditor preserveTimestamps = new BooleanFieldEditor(
- ISystemFilePreferencesConstants.PRESERVETIMESTAMPS,
- FileResources.RESID_PREF_UNIVERSAL_PRESERVE_TIMESTAMPS_LABEL,
- propertiesComposite);
-
- addField(preserveTimestamps);
-
-
- // field to indicate whether or not to share cached files between different connections
- // to the same remote host
- BooleanFieldEditor shareCachedFiles = new BooleanFieldEditor (
- ISystemFilePreferencesConstants.SHARECACHEDFILES,
- FileResources.RESID_PREF_UNIVERSAL_SHARE_CACHED_FILES_LABEL,
- propertiesComposite);
-
- addField(shareCachedFiles);
-
- // 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() + ""); //$NON-NLS-1$
- 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() +""); //$NON-NLS-1$
- 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);
-
-
- 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();
- }
-
- updateEnabledState();
-
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent);
-
- }
-
- public void init(IWorkbench workbench)
- {
- }
-
- /**
- *
- * @deprecated moved to Activator
- */
- public static void initDefaults(IPreferenceStore store)
- {
- // no longer needed here - moved to Activator
- }
-
-
- /**
- * Fill the resource type table
- */
- protected void fillResourceTypeTable() {
-
-
-
- // Setup the columns (icon, type)
- TableLayout tableLayout = new TableLayout();
- resourceTypeTable.setLayout(tableLayout);
- resourceTypeTable.setHeaderVisible(true);
- resourceTypeTable.setLinesVisible(true);
-
- // cell modifier stuff so that we can change the transfer
- // mode directly from the cell
- TableViewer tableViewer = new TableViewer(resourceTypeTable);
- tableViewer.setCellModifier(this);
-
- ColumnLayoutData layoutData = new ColumnPixelData(20, false);
- tableLayout.addColumnData(layoutData);
- TableColumn tableCol = new TableColumn(resourceTypeTable, SWT.NONE, 0);
- tableCol.setResizable(false);
- tableCol.pack();
- tableCol.setWidth(20);
- tableCol.setText(""); //$NON-NLS-1$
-
-
- layoutData = new ColumnWeightData(40, true);
- tableLayout.addColumnData(layoutData);
- tableCol = new TableColumn(resourceTypeTable, SWT.NONE, 1);
- tableCol.setResizable(true);
- tableCol.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_LABEL);
- tableCol.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_TABLECOL_TOOLTIP);
- tableCol.pack();
- tableCol.setWidth(100);
-
-
- layoutData = new ColumnWeightData(60, true);
- tableLayout.addColumnData(layoutData);
- tableCol = new TableColumn(resourceTypeTable, SWT.NONE, 2);
- tableCol.setResizable(true);
- tableCol.setText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_LABEL);
- tableCol.setToolTipText(FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TOOLTIP);
- tableCol.pack();
- tableCol.setWidth(200);
-
-
-
- String[] contentTypes = new String[2];
- contentTypes[0] = FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL;
- contentTypes[1] = FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL;
-
- CellEditor editors[] = new CellEditor[3];
- editors[0] = null;
- editors[1] = new TextCellEditor(resourceTypeTable);
- editors[2] = new ComboBoxCellEditor(resourceTypeTable, contentTypes, SWT.READ_ONLY);
-
-
- tableViewer.setColumnProperties(columnProperties);
- tableViewer.setCellEditors(editors);
-
-
- initControls();
-
- }
-
- private void initControls()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
- // init mode mappings for resource type table control
- ISystemFileTransferModeMapping[] mappings = getModeMappings();
- for (int i = 0; i < mappings.length; i++) {
- newResourceTableItem(mappings[i], i, false);
- }
-
- // init default file transfer controls
- int defaultFileTransferMode = getFileTransferModeDefaultPreference();
- if (defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY)
- {
- defaultBinaryButton.setSelection(true);
- }
- else if (defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_TEXT)
- {
- defaultTextButton.setSelection(true);
- }
-
- // init super transfer controls
- String superTransferArcType = store.getString(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE);
- archiveTypeCombo.setText(superTransferArcType);
-
- boolean doSuperTransfer = store.getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- doSuperTransferButton.setSelection(doSuperTransfer);
-
- // buffer sizes
- int downloadSize = store.getInt(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE);
- downloadBufferSize.setText(downloadSize + ""); //$NON-NLS-1$
-
- int uploadSize = store.getInt(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE);
- uploadBufferSize.setText(uploadSize + ""); //$NON-NLS-1$
-
- }
-
- protected ISystemFileTransferModeMapping[] getModeMappings()
- {
- // cloning the registry ones so that we can restore later
- ISystemFileTransferModeMapping[] mappings = modeRegistry.getModeMappings();
-
- ISystemFileTransferModeMapping[] clonedMappings = new ISystemFileTransferModeMapping[mappings.length];
- for (int i = 0; i < mappings.length; i++){
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)mappings[i];
- clonedMappings[i] = (ISystemFileTransferModeMapping)mapping.clone();
- }
- return clonedMappings;
- }
-
- /**
- * Used during reset defaults
- */
- protected void resetResourceTypeTable()
- {
- //clear table and reload defaults
- modeRegistry.renit();
- modeMappings.clear();
- resourceTypeTable.setRedraw(false);
- resourceTypeTable.removeAll();
-
- ISystemFileTransferModeMapping[] mappings = getModeMappings();
- for (int i = 0; i < mappings.length; i++)
- {
- newResourceTableItem(mappings[i], i, false);
- }
- resourceTypeTable.setRedraw(true);
-
- IEclipsePreferences prefs = new DefaultScope().getNode(RSEUIPlugin.getDefault().getBundle().getSymbolicName());
-
- int defaultFileTransferMode = prefs.getInt(ISystemFilePreferencesConstants.FILETRANSFERMODEDEFAULT, ISystemFilePreferencesConstants.DEFAULT_FILETRANSFERMODE);
-
- defaultBinaryButton.setSelection(defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY);
- defaultTextButton.setSelection(defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_TEXT);
-
- if (resourceTypeTable.getItemCount() > 0)
- {
- resourceTypeTable.setSelection(0);
- resourceTypeTable.setFocus();
- }
-
- updateEnabledState();
-
- archiveTypeCombo.setEnabled(false);
- }
-
- protected void resetSuperTransferPrefs()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- String superTransferArcType = store.getDefaultString(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE);
- archiveTypeCombo.setText(superTransferArcType);
-
- boolean doSuperTransfer = store.getDefaultBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- doSuperTransferButton.setSelection(doSuperTransfer);
- }
-
- protected void resetBufferSizePrefs()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
-
- int downloadSize = store.getDefaultInt(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE);
- downloadBufferSize.setText(downloadSize + ""); //$NON-NLS-1$
-
- int uploadSize = store.getDefaultInt(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE);
- uploadBufferSize.setText(uploadSize + ""); //$NON-NLS-1$
- }
-
-
- private Image applyBinaryDecoration(Image source) {
- ImageDescriptor binaryOverlay = Activator.getImageDescriptor("/icons/full/ovr16/binary_ovr.gif"); //$NON-NLS-1$
- DecorationOverlayIcon icon = new DecorationOverlayIcon(source, binaryOverlay, 3);
- return icon.createImage();
- }
-
- private Image getImageFor(ISystemFileTransferModeMapping mapping)
- {
- if (fileImage == null){
- fileImage = WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FILE).createImage();
- }
- if (binaryFileImage == null)
- {
- binaryFileImage = applyBinaryDecoration(fileImage);
- }
-
- // for now just always using the same image
- if (mapping.isBinary())
- {
- return binaryFileImage;
- }
- else
- {
- return fileImage;
- }
- }
-
- /**
- * Create a new <code>TableItem</code> to represent the resource
- * type editor description supplied.
- */
- protected TableItem newResourceTableItem(ISystemFileTransferModeMapping mapping, int index, boolean selected) {
-
- modeMappings.add(index, mapping);
-
- Image image = getImageFor(mapping);
- if (image != null)
- imagesToDispose.add(image);
-
- TableItem item = new TableItem(resourceTypeTable, SWT.NULL, index);
- item.setData(mapping);
- item.setImage(0, image);
- item.setText(1, mapping.getLabel());
-
- boolean binary = mapping.isBinary();
- item.setText(2, binary ? FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL : FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL);
-
-
- 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 == addResourceTypeButton) && (event.type == SWT.Selection)) {
- promptForResourceType();
- }
- else if ((event.widget == removeResourceTypeButton) && (event.type == SWT.Selection)) {
- removeSelectedResourceType();
- }
- else if ((event.widget == toggleModeButton) && (event.type == SWT.Selection)) {
- toggleSelectedResourceTypeMode();
- }
- else if ((event.widget == doSuperTransferButton) && (event.type == SWT.Selection))
- {
- doSuperTransferButtonSelected();
- }
- updateEnabledState();
- }
-
-
- /**
- * 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();
-
- // add the resource type
- addResourceType(name, extension);
- }
- }
-
-
- /**
- * Remove the type from the table
- */
- public void removeSelectedResourceType() {
-
- int index = resourceTypeTable.getSelectionIndex();
-
- modeMappings.remove(index);
-
- TableItem[] items = resourceTypeTable.getSelection();
-
- if (items.length > 0) {
- items[0].dispose();
- }
- }
-
- public void toggleSelectedResourceTypeMode() {
-
- TableItem item= resourceTypeTable.getSelection()[0];
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)item.getData();
-
- if (mapping.isBinary()){
- mapping.setAsText();
- item.setText(2, FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL);
- item.setImage(getImageFor(mapping));
- }
- else if (mapping.isText()){
- mapping.setAsBinary();
- item.setText(2, FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL);
- item.setImage(getImageFor(mapping));
- }
- }
-
- /**
- * 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) {
-
- if (newName == null || newName.length() < 1) {
- newName = "*"; //$NON-NLS-1$
- }
- 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();
- String msgTxt = FileResources.MSG_ERROR_FILENAME_INVALID;
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILENAME_INVALID,
- IStatus.ERROR, msgTxt);
- SystemMessageDialog.displayErrorMessage(shell, message);
- return;
- }
- }
- }
-
- // Find the index at which to insert the new entry.
- String newFileName = null;
-
- if (newExtension == null || newExtension.length() < 1) {
- newFileName = newName.toUpperCase();
- }
- else {
- newFileName = (newName + "." + newExtension).toUpperCase(); //$NON-NLS-1$
- }
-
-
- boolean found = false;
- int i = 0;
- SystemFileTransferModeMapping mapping = null;
-
- while (i < modeMappings.size() && !found) {
-
- mapping = (SystemFileTransferModeMapping)(modeMappings.get(i));
-
- int result = newFileName.compareTo(mapping.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);
-
- // select the existing mapping
- resourceTypeTable.select(i);
- return;
- }
-
- if (result < 0)
- {
- found = true;
- }
- else
- i++;
- }
-
-
- // Create the new type and insert it
- mapping = new SystemFileTransferModeMapping(newName,newExtension);
-
- // default to default
- if (defaultBinaryButton.getSelection()) {
- mapping.setAsBinary();
- }
- else {
- mapping.setAsText();
- }
-
- newResourceTableItem(mapping, i, true);
-
- resourceTypeTable.setFocus();
- }
-
-
- private void doSuperTransferButtonSelected()
- {
- if (doSuperTransferButton.getSelection())
- {
- archiveTypeCombo.setEnabled(true);
- }
- else
- {
- archiveTypeCombo.setEnabled(false);
- }
- }
-
-
-
- /**
- * 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)
- {
- //IFileEditorMapping[] originalMappingArray = editorRegistry.getFileEditorMappings();
-
- // 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();
-
- // editorRegistry.removePropertyListener(this);
- int defaultFileTransferMode = ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY;
- if (defaultBinaryButton.getSelection())
- {
- defaultFileTransferMode = ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY;
- }
- else
- {
- defaultFileTransferMode = ISystemFilePreferencesConstants.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(ISystemFilePreferencesConstants.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(ISystemFilePreferencesConstants.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(ISystemFilePreferencesConstants.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(ISystemFilePreferencesConstants.SUPERTRANSFER_ARC_TYPE,type);
- savePreferenceStore();
- }
-
- public static boolean getDoSuperTransfer()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- }
-
- public static int getDownloadBufferSize()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- int result = store.getInt(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE);
- if (result == 0)
- {
- result = ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE;
- }
- return result;
- }
-
- public static int getUploadBufferSize()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- int result = store.getInt(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE);
- if (result == 0)
- {
- result = ISystemFilePreferencesConstants.DEFAULT_DOWNLOAD_BUFFER_SIZE;
- }
- return result;
- }
-
- public static void setDoSuperTransfer(boolean flag)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemFilePreferencesConstants.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(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE, size);
- savePreferenceStore();
- }
- }
-
- public static void setUploadBufferSize(int size)
- {
- if (size > 0)
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE, size);
- savePreferenceStore();
- }
- }
-
- /**
- * Save the preference store
- */
- private static void savePreferenceStore()
- {
- RSEUIPlugin.getDefault().savePluginPreferences();
- }
-
- public boolean canModify(Object element, String property) {
- if (property.equals(columnProperties[2]))
- {
- return true;
- }
- else if (property.equals(columnProperties[1]))
- {
- return true;
- }
- return false;
- }
-
- public Object getValue(Object element, String property) {
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)element;
- if (property.equals(columnProperties[2])){
- return mapping.isBinary() ? new Integer(0) : new Integer(1);
- }
- else if (property.equals(columnProperties[1])){
- return mapping.getLabel();
- }
- return null;
- }
-
- public void modify(Object element, String property, Object value)
- {
- TableItem item = (TableItem)element;
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)item.getData();
- if (mapping != null)
- {
- if (property.equals(columnProperties[2])){
-
- if (value instanceof Integer)
- {
- int index = ((Integer)value).intValue();
- if (index == 0)
- {
- mapping.setAsBinary();
- item.setText(2, FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_BINARY_LABEL);
- item.setImage(getImageFor(mapping));
- }
- else
- {
- mapping.setAsText();
- item.setText(2, FileResources.RESID_PREF_UNIVERSAL_FILES_FILETYPES_MODE_TEXT_LABEL);
- item.setImage(getImageFor(mapping));
- }
- }
-
- }
- else if (property.equals(columnProperties[1])){
- if (value instanceof String)
- {
- String nameExtension = (String)value;
-
- int dotIndex = nameExtension.lastIndexOf('.');
- if (dotIndex != -1)
- {
- String name = nameExtension.substring(0, dotIndex);
-
- String ext = nameExtension.substring(dotIndex + 1);
-
- mapping.setName(name);
- mapping.setExtension(ext);
- item.setText(1, nameExtension);
- }
- }
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java
deleted file mode 100644
index e51d40d17..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/DefaultMountPathMapper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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.
- * David McKnight (IBM) - [195285] mount path mapper changes
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.resources;
-
-import java.io.File;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.files.ui.resources.ISystemMountPathMapper;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-public class DefaultMountPathMapper implements ISystemMountPathMapper
-{
-
- public boolean handlesMappingFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- return false;
- }
-
- public String getActualHostFor(String hostname, String remotePath)
- {
- return hostname;
- }
-
- public String getWorkspaceMappingFor(String hostname, String remotePath, IRemoteFileSubSystem subSystem)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- boolean shareCachedFiles = store.getBoolean(ISystemFilePreferencesConstants.SHARECACHEDFILES);
-
- // if we're not sharing cached files, then we need a unique path for each connection
- if (!shareCachedFiles){
- // prefix with the connection alias
- String alias = subSystem.getHostAliasName();
- String configID = subSystem.getConfigurationId();
- return alias + '.' + configID + File.separatorChar + remotePath;
- }
- else {
- return remotePath;
- }
- }
-
- /**
- * Returns the remote path.
- */
- public String getMountedMappingFor(String hostname, String remotePath)
- {
- return remotePath;
- }
-
- public int getPriority(String hostname, String remotePath,
- IRemoteFileSubSystem subsystem) {
- return Integer.MAX_VALUE;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/ISystemRemoteCoreConstants.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/ISystemRemoteCoreConstants.java
deleted file mode 100644
index be74af06f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/ISystemRemoteCoreConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-/**
- * Interface that contains all constants needed for remote resource management.
- */
-public interface ISystemRemoteCoreConstants {
-
-
-
- public static final int M_MARKERS_DIRTY = 0x1000;
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemFileNameHelper.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemFileNameHelper.java
deleted file mode 100644
index b5b06c5b2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemFileNameHelper.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.resources;
-
-import java.io.File;
-
-import org.eclipse.rse.core.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/internal/files/ui/resources/SystemRemoteEditManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java
deleted file mode 100644
index 5f2cb11f3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteEditManager.java
+++ /dev/null
@@ -1,894 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [195285] mount path mapper changes
- * David McKnight (IBM) - [228343] RSE unable to recover after RemoteSystemsTempfiles deletion
- * David McKnight (IBM) - [253262] Cache Cleanup is removing .settings directory
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.resources.ISystemMountPathMapper;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorDescriptor;
-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"; //$NON-NLS-1$
- public static final String REMOTE_EDIT_PROJECT_NATURE_ID = "org.eclipse.rse.ui.remoteSystemsTempNature"; //$NON-NLS-1$
- public static final String REMOTE_EDIT_PROJECT_BUILDER_ID = "org.eclipse.rse.ui.remoteSystemsTempBuilder"; //$NON-NLS-1$
-
- 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 getInstance()
- {
- 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
- * @param subsystem the subsystem
- * @return the actual host where the resource exists
- */
- public String getActualHostFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- ISystemMountPathMapper mapper = getMountPathMapperFor(hostname, remotePath, subsystem);
- 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
- * @param subsystem the subsystem
- * @return the system path
- */
- public String getMountPathFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- ISystemMountPathMapper mapper = getMountPathMapperFor(hostname, remotePath, subsystem);
- 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)
- * @param subsystem the remote subsystem. The subsystem may be null if none
- * is available.
- * @return the relative replica path
- */
- public String getWorkspacePathFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- ISystemMountPathMapper mapper = getMountPathMapperFor(hostname, remotePath, subsystem);
-
- if (mapper != null)
- {
- return mapper.getWorkspaceMappingFor(hostname, remotePath, subsystem);
- }
- else
- {
- return remotePath;
- }
- }
-
- /**
- * Return the appropriate registered mapper for a host & path
- *
- * @param hostname the originating remote host
- * @param remotePath the file path on the system (i.e. Windows)
- * @param subsystem the remote subsystem. The subsystem may be null if none
- * is available.
- * @return appropriate mapper
- */
- public ISystemMountPathMapper getMountPathMapperFor(String hostname, String remotePath, IRemoteFileSubSystem subsystem)
- {
- ISystemMountPathMapper result = null;
- for (int i = 0; i < _mountPathMappers.size(); i++)
- {
- ISystemMountPathMapper mapper = (ISystemMountPathMapper) _mountPathMappers.get(i);
- if (mapper != null)
- {
- if (mapper.handlesMappingFor(hostname, remotePath, subsystem))
- {
- if (result == null) {
- result = mapper;
- }
- else if (mapper.getPriority(hostname, remotePath, subsystem) < result.getPriority(hostname, remotePath, subsystem)){
- result = mapper;
- }
- }
- }
- }
-
- // no result - fall back to the default
- if (result == null){
- return new DefaultMountPathMapper();
- }
-
- return result;
- }
-
- 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"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < systemTypeExtensions.length; i++)
- {
- try
- {
- _mountPathMappers.add(systemTypeExtensions[i].createExecutableExtension("class")); //$NON-NLS-1$
- }
- 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 != null)
- {
- IProgressMonitor monitor = new NullProgressMonitor();
- if (!editProject.exists())
- editProject.create(monitor);
-
- if (!editProject.isOpen()){
- try {
- editProject.open(monitor);
- }
- catch (CoreException e) {
- // probably no .project file
- // time to start again!
- editProject.delete(true, monitor);
- editProject.create(monitor);
- editProject.open(monitor);
- }
- }
-
- 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); //$NON-NLS-1$
- }
- 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)
- {
- if (!child.getName().equals(".settings")){ //$NON-NLS-1$
- candidate = getLeastRecentlyChangedFile((IFolder) child, deletedList);
- }
- }
- else
- {
- candidate = (IFile) child;
- }
-
- if (candidate != null && !deletedList.contains(candidate) && !candidate.getName().startsWith(".") && !isFileInUse(candidate, true)) //$NON-NLS-1$
- {
- 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 = RSECorePlugin.getTheSystemRegistry().getSubSystem(subsystemStr);
- if (subsystem != null)
- {
- Object rmtObject = null;
- try
- {
- rmtObject = subsystem.getObjectWithAbsoluteName(pathStr, new NullProgressMonitor());
- }
- 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;
-
- 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(ISystemFilePreferencesConstants.LIMIT_CACHE);
- if (enableMaxSize)
- {
- int max = Integer.parseInt(ISystemFilePreferencesConstants.DEFAULT_MAX_CACHE_SIZE) * 1000000;
-
- // get the cache limit
- try {
- String maxSize = store.getString(ISystemFilePreferencesConstants.MAX_CACHE_SIZE);
-
- if (maxSize != null && !maxSize.equals("")) { //$NON-NLS-1$
- max = Integer.parseInt(maxSize) * 1000000;
- }
- }
- catch (NumberFormatException nfe) {
- SystemBasePlugin.logError("Could not get max cache size", nfe); //$NON-NLS-1$
- max = Integer.parseInt(ISystemFilePreferencesConstants.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); //$NON-NLS-1$
- // 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); //$NON-NLS-1$
- }
- }
-
- /**
- * 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); //$NON-NLS-1$
- }
- }
-
-
- public static SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditorDescriptor descriptor)
- {
- SystemEditableRemoteFile editable = null;
- RemoteFile remoteFile = (RemoteFile) element;
- if (remoteFile.isFile())
- {
- try
- {
- IFile file = (IFile)UniversalFileTransferUtility.getTempFileFor(remoteFile);
- if (file != null)
- {
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- Object obj = properties.getRemoteFileObject();
- if (obj != null && obj instanceof SystemEditableRemoteFile)
- {
- editable = (SystemEditableRemoteFile) obj;
-
- String remotePath = remoteFile.getAbsolutePath();
- String replicaRemotePath = editable.getAbsolutePath();
- // first make sure that the correct remote file is referenced (might be difference because of different case)
- if (!replicaRemotePath.equals(remotePath)){ // for bug 276103
-
- IEditorPart editor = editable.getEditorPart();
- boolean editorWasClosed = false;
- if (editor.isDirty()){
- editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
- if (editorWasClosed)
- editable.doImmediateSaveAndUpload();
- }
- else {
- editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
- }
-
- if (!editorWasClosed){
- // use cancelled operation so we need to get out of here
- return null;
- }
-
- try {
- IFile originalFile = editable.getLocalResource();
- originalFile.delete(true, new NullProgressMonitor());
- }
- catch (CoreException e){
- }
- // fall through and let the new editable get created
- }
- else {
- return editable;
- }
- }
- }
-
- if (descriptor != null){
- editable = new SystemEditableRemoteFile(remoteFile, descriptor);
- }
- else {
- editable = new SystemEditableRemoteFile(remoteFile);
- }
- }
- catch (Exception e)
- {
- }
- }
- return editable;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarker.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarker.java
deleted file mode 100644
index 13d75b762..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarker.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.files.ui.resources;
-
-import java.util.Map;
-
-import org.eclipse.rse.files.ui.resources.ISystemRemoteMarker;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteResource;
-
-/**
- * This class is an internal implementation of the ISystemRemoteMarker
- * interface.
- *
- * @noextend This class is not intended to be subclassed 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
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerInfo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerInfo.java
deleted file mode 100644
index 27dbbf5b2..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerInfo.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.files.ui.resources.ISystemRemoteMarkerSetElement;
-
-/**
- * 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 id 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 type 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 attributes 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 makeCopy 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 creationTime 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 attributeNames 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 attributeName 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 value 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 attributeName the attribute name
- * @param value 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 attributeNames the attribute names
- * @param values 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]);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerManager.java
deleted file mode 100644
index 362e02990..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerManager.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteManager;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteMarker;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteMarkerSetElement;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteResource;
-
-/**
- * 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 resource the resource
- * @param newMarkers 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 resource the resource.
- * @param id 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 resource the resource.
- * @param id 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 resource the resource
- * @param type the type
- * @param includeSubtypes 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 resource the resource
- * @param id 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 resource the resource
- * @param type the type
- * @param includeSubtypes 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 info 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 marker 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 infos 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) {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerSet.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerSet.java
deleted file mode 100644
index 181c4d3e3..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerSet.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-import org.eclipse.rse.files.ui.resources.ISystemRemoteMarkerSetElement;
-
-/**
- * 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 capacity 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 element 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 elements 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 id 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 id 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 id 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 element the element
- */
- public void remove(ISystemRemoteMarkerSetElement element) {
- remove(element.getId());
- }
-
- /**
- * Removes all of the elements in the given array from the set.
- * @param elements 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinition.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinition.java
deleted file mode 100644
index a892ee479..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinition.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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")) { //$NON-NLS-1$
- String type = element.getAttribute("type"); //$NON-NLS-1$
-
- if (type != null) {
-
- if (types == null) {
- types = new HashSet(3);
- }
-
- types.add(type);
- }
- }
-
- // attribute name
- if (element.getName().equalsIgnoreCase("attribute")) { //$NON-NLS-1$
- String name = element.getAttribute("name"); //$NON-NLS-1$
-
- if (name != null) {
-
- if (attributes == null) {
- attributes = new HashSet(3);
- }
-
- attributes.add(name);
- }
- }
-
- // persistence
- if (element.getName().equalsIgnoreCase("persistent")) { //$NON-NLS-1$
- String bool = element.getAttribute("value"); //$NON-NLS-1$
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java
deleted file mode 100644
index 947e470af..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteMarkerTypeDefinitionCache.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.files.ui.resources.ISystemRemoteMarker;
-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 type 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 type a marker type
- * @param superType 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));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemotePath.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemotePath.java
deleted file mode 100644
index dbf67757d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemotePath.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-import org.eclipse.rse.files.ui.resources.ISystemRemotePath;
-
-/**
- * A default implementation of a remote path.
- */
-public class SystemRemotePath implements ISystemRemotePath {
-
-
-
- public static final ISystemRemotePath ROOT = new SystemRemotePath("", "", "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- protected String profileName;
- protected String connectionName;
- protected String path;
-
- /**
- * Constructor for SystemRemotePath.
- * @param profileName profile name
- * @param connectionName connection name
- * @param path
- */
- public SystemRemotePath(String profileName, String connectionName, String path) {
- super();
- setProfileName(profileName);
- setConnectionName(connectionName);
- setPath(path);
- }
-
- /**
- * Set the profile name.
- * @param profileName the profile name
- */
- public void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
- /**
- * Set the connection name.
- * @param connectionName the connection name
- */
- public void setConnectionName(String connectionName) {
- this.connectionName = connectionName;
- }
-
- /**
- * Set the remote path.
- * @param path 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));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResource.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResource.java
deleted file mode 100644
index 7c00cd885..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResource.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteMarker;
-import org.eclipse.rse.files.ui.resources.ISystemRemotePath;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteResource;
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceInfo.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceInfo.java
deleted file mode 100644
index 59cbc1f6d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceInfo.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [219975] Fix implementations of clone()
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.resources;
-
-/**
- * Class that keeps information about a remote resource. Clients should not
- * use this class.
- */
-public class SystemRemoteResourceInfo {
-
-
-
- /**
- * 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 mask the mask
- */
- public void set(int mask) {
- flags |= mask;
- }
-
- /**
- * Clears all of the bits indicated by the mask.
- * @param mask 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.
- */
- 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 markerSet 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceManager.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceManager.java
deleted file mode 100644
index c1304990e..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/resources/SystemRemoteResourceManager.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.files.ui.resources;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.files.ui.resources.ISystemRemoteManager;
-import org.eclipse.rse.files.ui.resources.ISystemRemotePath;
-
-/**
- * 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() {}
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemOpenSearchPageAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemOpenSearchPageAction.java
deleted file mode 100644
index 08b8f5a82..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemOpenSearchPageAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.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/internal/files/ui/search/SystemSearchPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java
deleted file mode 100644
index 675e3ea32..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java
+++ /dev/null
@@ -1,1620 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [182024] Folder field only initialized if selection supports search
- * Kevin Doyle (IBM) - [189430] Limited System Types displayed in Folder Dialog
- * Kevin Doyle (IBM) - [187427] Selecting an Archive will check Search Archives checkbox
- * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
- * David McKnight (IBM) - [279307] NPE when select a filter remove search dialog
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.search;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.osgi.util.NLS;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-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.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.ui.view.search.SystemSearchUI;
-import org.eclipse.rse.internal.ui.view.search.SystemSearchViewPart;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.search.internal.ui.SearchMessages;
-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.internal.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 fileNameCaseSensitiveButton;
- private boolean initialFileNameCaseSensitive;
- 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_CASE_SENSITIVE = "fileNameCaseSensitive"; //$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_CASE_SENSITIVE = "fileNameCaseSensitive"; //$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 search 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 fileNameCaseSensitive;
- 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 fileNameCaseSensitive <code>true</code> if the file name is searched case sensitively, <code>false</code> otherwise.
- * @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 fileNameCaseSensitive, 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.fileNameCaseSensitive = fileNameCaseSensitive;
- 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.internal.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.internal.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);
-
- // preselection
- if (nameCombo.getText().length() > 0)
- {
- String preconnectionname = getConnectionName();
- if (preconnectionname != null && preconnectionname.length() > 0)
- {
- ISystemProfile profile = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getDefaultPrivateSystemProfile();
- IHost prehost = RSECorePlugin.getTheSystemRegistry().getHost(profile, preconnectionname);
- if (prehost != null)
- {
- // host preselection
- selectFolderAction.setDefaultConnection(prehost);
-
- String prepath = getFolderPath();
- if (prepath != null && prepath.length() > 0)
- {
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(prehost);
- try
- {
- IRemoteFile selection = ss.getRemoteFileObject(prepath, new NullProgressMonitor());
- if (selection != null)
- {
- // path preselection
- selectFolderAction.setPreSelection(selection);
- }
- }
- catch (Exception e)
- {}
- }
- }
- }
- }
-
- // limit the system types displayed to those that can support search
- List types = new LinkedList();
- IRSESystemType[] allSystemTypes = SystemWidgetHelpers.getValidSystemTypes(null);
- for (int i = 0; i < allSystemTypes.length; i++)
- {
- IRemoteFileSubSystemConfiguration rfssc = RemoteFileUtility.getFileSubSystemConfiguration(allSystemTypes[i]);
- if (rfssc != null && rfssc.supportsSearch())
- {
- types.add(allSystemTypes[i]);
- }
- }
-
- IRSESystemType[] allowedTypes = new IRSESystemType[types.size()];
- types.toArray(allowedTypes);
-
- selectFolderAction.setSystemTypes(allowedTypes);
-
- // 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();
- if (remoteFile == null){
- // could have selected a filter reference
- Object value = selectFolderAction.getValue();
- if (value instanceof ISystemFilterReference){
- ISystemFilterReference fref = (ISystemFilterReference)value;
- ISubSystem ss = fref.getSubSystem();
-
- // target for filter should give the most relevant folder
- Object target = ss.getTargetForFilter(fref);
- if (target instanceof IRemoteFile){
- remoteFile = (IRemoteFile)target;
- }
- }
-
- }
- String folderPath = remoteFile.getAbsolutePath();
-
- // store connection and profile
- IHost conn = selectFolderAction.getSelectedConnection();
- String profileName = conn.getSystemProfileName();
- String connectionName = conn.getAliasName();
-
- setFolderText(profileName, connectionName, folderPath);
-
- String absPath = remoteFile.getAbsolutePath();
- boolean supportsSearch = remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsSearch();
- boolean supportsArchiveManagement = remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- // if the file/folder is part of an archive select the search archives checkbox
- if (supportsSearch && supportsArchiveManagement && (remoteFile.isArchive() || (absPath.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0)))
- searchArchivesButton.setSelection(true);
- }
- }
-
- /**
- * 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 != null) {
- data.searchString = searchString;
- data.caseSensitive = caseButton.getSelection();
- data.stringRegex = stringRegexButton.getSelection();
- data.fileNames = getFileNames();
- data.fileNameCaseSensitive = fileNameCaseSensitiveButton.getSelection();
- 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(), fileNameCaseSensitiveButton.getSelection(), 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)) {
-
- String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX;
- String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, searchString);
-
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_REMOTE_SEARCH_INVALID_REGEX,
- IStatus.ERROR, msgTxt, msgDetails);
- 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)) {
- String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX;
- String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, fileNameString);
-
- SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_REMOTE_SEARCH_INVALID_REGEX,
- IStatus.ERROR, msgTxt, msgDetails);
- 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.fileNameCaseSensitive, 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, new NullProgressMonitor());
- }
- catch (SystemMessageException e) {
- // TODO: show error
- SystemBasePlugin.logError("Error occured trying to get remote file object", e); //$NON-NLS-1$
- 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() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- 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;
- boolean isPartOfArchive = false;
-
- // 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();
- boolean supportsSearch = remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsSearch();
-
- // if it's a file, but not an archive, get the file name, connection info, and parent folder name
- if (supportsSearch && remoteFile.isFile() && !remoteFile.isArchive()) {
- fileName = remoteFile.getName();
- IHost conn = remoteFile.getHost();
- profileName = conn.getSystemProfileName();
- connectionName = conn.getAliasName();
- folderName = remoteFile.getParentPath();
- }
- // otherwise if it's a folder or an archive, get the connection info and the name
- else if (supportsSearch && (remoteFile.isDirectory() || (remoteFile.isArchive() && supportsArchiveManagement))) {
- IHost conn = remoteFile.getHost();
- profileName = conn.getSystemProfileName();
- connectionName = conn.getAliasName();
- folderName = remoteFile.getAbsolutePath();
- }
- String absPath = remoteFile.getAbsolutePath();
- // Determine if we support search + archives and selection is part of an archive
- isPartOfArchive = supportsSearch && supportsArchiveManagement && (remoteFile.isArchive() || (absPath.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0));
- }
- }
- // 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);
-
- // if the file/folder is part of an archive select the search archives checkbox
- if (isPartOfArchive)
- {
- searchArchivesButton.setSelection(true);
- }
-
- // 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
- Mnemonics m = new Mnemonics();
- StringBuffer usedMnemonics = new StringBuffer(5);
- usedMnemonics.append(Mnemonics.getMnemonic(SearchMessages.SearchDialog_customize));
- usedMnemonics.append(Mnemonics.getMnemonic(SearchMessages.SearchDialog_searchAction));
- m.clear(usedMnemonics.toString());
- m.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);
- fileNameCaseSensitiveButton.setSelection(data.fileNameCaseSensitive);
- 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 = RSECorePlugin.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 case sensitivity
- fileNameCaseSensitiveButton = new Button(comp, SWT.CHECK);
- fileNameCaseSensitiveButton.setText(FileResources.RESID_SEARCH_CASE_BUTTON_LABEL);
- fileNameCaseSensitiveButton.setToolTipText(FileResources.RESID_SEARCH_CASE_BUTTON_TOOLTIP);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- fileNameCaseSensitiveButton.setLayoutData(gd);
- fileNameCaseSensitiveButton.setSelection(initialFileNameCaseSensitive);
-
- // 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);
-
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.horizontalSpan = 3;
-
- 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);
- initialFileNameCaseSensitive = s.getBoolean(STORE_CONFIG_FILENAME_CASE_SENSITIVE);
- if (!initialFileNameCaseSensitive){
- // make sure it was set this way as opposed to defaulting
- // in order to preserve the 3.0 behaviour, the default needs to be true
- String value = s.get(STORE_CONFIG_FILENAME_CASE_SENSITIVE);
- if (value == null){
- initialFileNameCaseSensitive = true;
- }
- }
-
- 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_CASE_SENSITIVE, fileNameCaseSensitiveButton.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 fileNameCaseSensitive = dataSection.getBoolean(STORE_DATA_FILE_NAME_CASE_SENSITIVE);
- 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, fileNameCaseSensitive, 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_CASE_SENSITIVE, data.fileNameCaseSensitive);
- 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderAction.java
deleted file mode 100644
index 2e7542db0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderAction.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- *******************************************************************************/
-package org.eclipse.rse.internal.files.ui.search;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.IRSESystemType;
-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 IRSESystemType[] 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 types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes)
- {
- this.systemTypes = systemTypes;
- }
-
- /**
- * Convenience method to restrict to a single system type.
- * Same as setSystemTypes(new IRSESystemType[] {systemType})
- *
- * @param systemType The system type to restrict to, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemType(IRSESystemType systemType)
- {
- if (systemType == null)
- setSystemTypes(null);
- else
- setSystemTypes(new IRSESystemType[] {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.getHost(),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.setDefaultSystemConnection(systemConnection, true);
- else
- dlg.setDefaultSystemConnection(systemConnection, false);
- }
- 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/internal/files/ui/search/SystemSearchRemoteFolderDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderDialog.java
deleted file mode 100644
index 23cfe3372..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderDialog.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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.
- * Kevin Doyle (IBM) [189433] - Added Viewer Filter to display directories & archives
- * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API
- ********************************************************************************/
-package org.eclipse.rse.internal.files.ui.search;
-
-import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Select dialog for search.
- */
-public class SystemSearchRemoteFolderDialog extends SystemRemoteFolderDialog {
-
- private SystemActionViewerFilter _filter;
-
- /**
- * Constructor.
- * @param shell the parent shell.
- */
- public SystemSearchRemoteFolderDialog(Shell shell) {
- super(shell);
- }
-
- /**
- * Contructor.
- * @param shell the parent shell.
- * @param title the the title of the dialog.
- */
- public SystemSearchRemoteFolderDialog(Shell shell, String title) {
- super(shell, 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;
- }
-
- /**
- * 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/internal/files/ui/search/SystemSearchRemoteFolderForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java
deleted file mode 100644
index 397e5db5a..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteFolderForm.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Kushal Munir (IBM) - initial API and implementation.
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-package org.eclipse.rse.internal.files.ui.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.ISystemSelectRemoteObjectAPIProvider;
-
-/**
- * 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 ISystemSelectRemoteObjectAPIProvider 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/internal/files/ui/search/SystemSearchRemoteObjectAPIProvider.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteObjectAPIProvider.java
deleted file mode 100644
index c5738c221..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchRemoteObjectAPIProvider.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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:
- * Kushal Munir (IBM) - initial API and implementation.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.search;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.view.SystemSelectRemoteObjectAPIProviderImpl;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-
-/**
- * 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, IRSESystemType[] 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.internal.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/internal/files/ui/search/SystemSearchSelectFileTypesAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java
deleted file mode 100644
index 5643f70aa..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-
-package org.eclipse.rse.internal.files.ui.search;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.internal.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/internal/files/ui/search/SystemSearchSelectFileTypesDialog.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesDialog.java
deleted file mode 100644
index 9cdb3202f..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/search/SystemSearchSelectFileTypesDialog.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.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(" "); //$NON-NLS-1$
- }
- 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("")) { //$NON-NLS-1$
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/DownloadAndOpenJob.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/DownloadAndOpenJob.java
deleted file mode 100644
index 3950ec420..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/DownloadAndOpenJob.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Kevin Doyle (IBM) - [194463] Use the result of _editable.download() to decide if file is to be opened
- * David McKnight (IBM) - [189873] Improve remote shell editor open action with background jobs
- * David McKnight (IBM) - [246651] FTP subsystem doesn't handle disconnected situation well
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.subsystems.ISubSystem;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.SystemUniversalTempFileListener;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.actions.SystemRemoteFileLineOpenWithMenu;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.swt.widgets.Display;
-
-public class DownloadAndOpenJob extends Job
-{
- private static class OpenEditorRunnable implements Runnable
- {
- private ISystemEditableRemoteObject _editable;
- private boolean _systemEditor;
- private int _line;
- private int _charStart;
- private int _charEnd;
-
- public OpenEditorRunnable(ISystemEditableRemoteObject editable, boolean systemEditor)
- {
- _editable = editable;
- _systemEditor = systemEditor;
- _line = -1;
- _charStart = -1;
- _charEnd = -1;
- }
-
- public OpenEditorRunnable(ISystemEditableRemoteObject editable, boolean systemEditor, int line, int charStart, int charEnd)
- {
- _editable = editable;
- _systemEditor = systemEditor;
- _line = line;
- _charStart = charStart;
- _charEnd = charEnd;
- }
-
-
- public void run()
- {
- try
- {
- _editable.addAsListener();
- _editable.setLocalResourceProperties();
- if (_systemEditor)
- {
- ((SystemEditableRemoteFile)_editable).openSystemEditor();
- }
- else
- {
- _editable.openEditor();
- }
-
- if (_line > -1 || (_charStart > -1 && _charEnd > -1)){
- SystemRemoteFileLineOpenWithMenu.handleGotoLine((IRemoteFile)_editable.getRemoteObject(), _line, _charStart, _charEnd);
- }
- }
- catch (Exception e)
- {
- }
- }
-
- }
-
- private ISystemEditableRemoteObject _editable;
- private boolean _systemEditor;
- private int _line;
- private int _charStart;
- private int _charEnd;
-
- /**
- * Download job.
- * @param editable the editable remote object.
- * @param systemEditor whether to use the system editor.
- */
- public DownloadAndOpenJob(ISystemEditableRemoteObject editable, boolean systemEditor)
- {
- super(FileResources.RESID_FILES_DOWNLOAD);
- _editable = editable;
- _systemEditor = systemEditor;
- _line = -1;
- _charStart = -1;
- _charEnd = -1;
- }
-
- /**
- * Download job
- * @param editable the editable remote object
- * @param systemEditor whether to use the system editor
- * @param line the line to jump to after opening
- */
- public DownloadAndOpenJob(ISystemEditableRemoteObject editable, boolean systemEditor, int line, int charStart, int charEnd)
- {
- super(FileResources.RESID_FILES_DOWNLOAD);
- _editable = editable;
- _systemEditor = systemEditor;
- _line = line;
- _charStart = charStart;
- _charEnd = charEnd;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- boolean downloadSuccessful = false;
- try
- {
- IFile localFile = _editable.getLocalResource();
- ISubSystem ss = _editable.getSubSystem();
-
-
- // if we're not connected, connect
- if (!ss.isConnected()){
- ss.connect(monitor, false);
- }
- if (ss.isConnected()){
- SystemUniversalTempFileListener listener = SystemUniversalTempFileListener.getListener();
- listener.addIgnoreFile(localFile);
- downloadSuccessful = _editable.download(monitor);
- listener.removeIgnoreFile(localFile);
- }
- else {
- return Status.CANCEL_STATUS;
- }
- }
- catch (Exception e)
- {
- }
- if (downloadSuccessful)
- {
- OpenEditorRunnable oe = null;
- if (_line > -1 || (_charStart > -1 && _charEnd > -1)){
- oe = new OpenEditorRunnable(_editable, _systemEditor, _line, _charStart, _charEnd);
- }
- else{
- oe = new OpenEditorRunnable(_editable, _systemEditor);
- }
- Display.getDefault().asyncExec(oe);
- }
-
- return Status.OK_STATUS;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java
deleted file mode 100644
index fb9b33d25..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-
-import java.util.ArrayList;
-import java.util.Vector;
-
-import org.eclipse.jface.action.IAction;
-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.model.ISystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.files.ui.actions.SystemFileUpdateFilterAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemNewFileAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemNewFileFilterAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemNewFolderAction;
-import org.eclipse.rse.internal.files.ui.wizards.SystemFileNewConnectionWizardPage;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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.IContextObject;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.wizards.newconnection.ISystemNewConnectionWizardPage;
-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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#getAdditionalFilterActions(org.eclipse.rse.core.subsystems.ISubSystemConfiguration, org.eclipse.rse.core.filters.ISystemFilter, org.eclipse.swt.widgets.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));
-
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().getSystemClipboard();
- _additionalActions.add(new SystemPasteFromClipboardAction(shell, clipboard));
- }
- return _additionalActions;
- }
-
- /**
- * Checks the preference setting for hidden files and filters out hidden files if the preference setting is to not show hidden files.
- * @see org.eclipse.rse.ui.view.SubSystemConfigurationAdapter#applyViewFilters(org.eclipse.rse.ui.view.IContextObject, java.lang.Object[])
- */
- public Object[] applyViewFilters(IContextObject parent, Object[] children) {
-
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.SHOWHIDDEN);
-
- if (showHidden) {
- return children;
- }
- else {
-
- ArrayList results = new ArrayList(children.length);
-
- for (int i = 0; i < children.length; i++) {
-
- if (children[i] instanceof IRemoteFile) {
- IRemoteFile remoteFile = (IRemoteFile)(children[i]);
-
- if (!remoteFile.isHidden()) {
- results.add(remoteFile);
- }
- }
- else if (children[i] instanceof ISystemMessageObject){
- results.add(children[i]);
- }
- }
-
- return results.toArray();
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 3b158a2cc..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/RemoteFileSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-
-public class RemoteFileSubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new RemoteFileSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java
deleted file mode 100644
index 3ef3f26ae..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemRemoteFileSelectionInputProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.view.SystemResourceSelectionInputProvider;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-
-
-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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewFileAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewFileAdapterFactory.java
deleted file mode 100644
index b81b7e13d..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewFileAdapterFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [180519][api] declaratively register adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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();
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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()); //$NON-NLS-1$
- }
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
deleted file mode 100644
index 0ac736487..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java
+++ /dev/null
@@ -1,3715 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * Xuan Chen (IBM) - [180671] [refresh] It is not possible to refresh editor with double clicking on it
- * David Dykstal (IBM) - [160776] format file size according to client system conventions and locale
- * David McKnight (IBM) - [197089] Need to set the filter when there is no separator in filter string
- * David McKnight (IBM) - [196662] hasChildren() should return false when the file doesn't exist
- * David McKnight (IBM) - [197784] Need to check if last separator is at 0
- * Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children
- * David McKnight (IBM) - [199568] Removing synchronized from internalGetChildren
- * Kevin Doyle (IBM) - [197855] Can't Delete/Rename/Move a Read-Only File
- * Xuan Chen (IBM) - [202949] [archives] copy a folder from one connection to an archive file in a different connection does not work
- * Kevin Doyle (IBM) - [204810] Saving file in Eclipse does not update remote file
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Kevin Doyle (IBM) - [186125] Changing encoding of a file is not reflected when it was opened before
- * David McKnight (IBM) - [208803] add exists() method
- * David McKnight (IBM) - [209375] download using copyRemoteResourcesToWorkspaceMultiple
- * Rupen Mardirossian (IBM) - [208435] added constructor to nested RenameRunnable class to take in names that are previously used as a parameter for multiple renaming instances
- * David McKnight (IBM) - [209660] need to check if remote encoding has changed before using cached file
- * Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when cancelling copy
- * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Rupen Mardirossian (IBM) - [210682] Copy collisions will use SystemCopyDialog now instead of renameDialog when there is a copy collision within the same connection
- * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * Rupen Mardirossian (IBM) - [198728] Folder being copied across systems is added to original set of files in order to extract empty (sub)folders in doDrop method
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * Rupen Mardirossian (IBM) - [227213] Copy and pasting to the parent folder will create a "Copy of" that resource
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- * Anna Dushistova (MontaVista) - [226550] [api] Launch Shell and Launch Terminal actions should be contributed declaratively
- * Martin Oberhuber (Wind River) - [234215] improve API documentation for doDelete and doDeleteBatch
- * David McKnight (IBM) - [251860] Rename a file/folder to a hidden file causes problems
- * David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
- * David McKnight (IBM) - [254769] Don't get latest file when opening a file always
- * David McKnight (IBM) - [264607] Unable to delete a broken symlink
- * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
- * David McKnight (IBM) - [276534] Cache Conflict After Synchronization when Browsing Remote System with Case-Differentiated-Only Filenames
- * David McKnight (IBM) - [280466] File download keeps running in case sensitive case
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-import java.io.File;
-import java.text.MessageFormat;
-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.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.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-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.Viewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.SystemFilterReference;
-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.SystemMessageObject;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.internal.files.ui.actions.SystemCompareFilesAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemCompareWithEditionAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemEditFilesAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemMoveRemoteFileAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemNewFileAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemNewFileFilterFromFolderAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemNewFolderAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemRemoteFileOpenWithMenu;
-import org.eclipse.rse.internal.files.ui.actions.SystemReplaceWithEditionAction;
-import org.eclipse.rse.internal.files.ui.actions.SystemSearchAction;
-import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.CopyRunnable;
-import org.eclipse.rse.internal.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.internal.ui.view.SystemDNDTransferRunnable;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.internal.ui.view.search.SystemSearchTableView;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.StringCompare;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.rse.services.files.PendingHostFilePermissions;
-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.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileRemoteTypes;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.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.IContextObject;
-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.ISystemViewDropDestination;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-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;
-
-import com.ibm.icu.text.DateFormat;
-import com.ibm.icu.text.NumberFormat;
-
-/**
- * Adapter for displaying remote file system objects in tree views.
- * These are children of RemoteFileSubSystem filter strings
- */
-public class SystemViewRemoteFileAdapter
- extends AbstractSystemViewAdapter
- implements ISystemRemoteElementAdapter
-{
-
- 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 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 String _uploadMessage = FileResources.MSG_UPLOADING_PROGRESS;
- static final String _downloadMessage = FileResources.MSG_DOWNLOADING_PROGRESS;
-
- /**
- * Constructor
- */
- public SystemViewRemoteFileAdapter()
- {
- super();
- xlatedSize = FileResources.RESID_PROPERTY_FILE_SIZE_VALUE;
- xlatedCompressedSize = FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_VALUE;
- xlatedExpandedSize = FileResources.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$
- super.setFilterString(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 super.getFilterString();
- }
-
- /**
- * 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 canRead = true;
- boolean supportsSearch = true;
- boolean supportsArchiveManagement = false;
- boolean offline = 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();
- canRead = firstFile.canRead();
-
- IRemoteFileSubSystem fileSubSystem = firstFile.getParentRemoteFileSubSystem();
-
- offline = fileSubSystem.isOffline();
-
- supportsSearch = fileSubSystem.getParentRemoteFileSubSystemConfiguration().supportsSearch();
- supportsArchiveManagement = fileSubSystem.getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- }
- else
- return;
-
-
- if (isArchive)
- {
- Iterator elements = selection.iterator();
- Object element = null;
-
- while (elements.hasNext())
- {
- element = elements.next();
- IRemoteFile remoteObj = (IRemoteFile) element;
- if (!remoteObj.isArchive())
- {
- break;
- }
- }
- }
-
- if ((elementType == 1 || (isArchive && supportsArchiveManagement)))
- {
- if (!foldersOnly)
- {
- if (addNewFile == null)
- {
- addNewFile = new SystemNewFileAction(shell);
- }
- addNewFile.setEnabled(canRead && !offline);
- menu.add(ISystemContextMenuConstants.GROUP_NEW, addNewFile);
- }
- if (!filesOnly)
- {
- if (addNewFolder == null)
- {
- addNewFolder = new SystemNewFolderAction(shell);
- }
- addNewFolder.setEnabled(canRead && !offline);
- 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 {
- // 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);
- action.setEnabled(canRead && !offline);
-
- // 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 (moveAction == null)
- moveAction = new SystemMoveRemoteFileAction(shell);
-
- //ISubSystem subsys = firstFile.getParentRemoteFileSubSystem();
-
- // DKM - clipboard based copy actions
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().getSystemClipboard();
-
- if (pasteClipboardAction == null)
- {
- pasteClipboardAction = new SystemPasteFromClipboardAction(shell, clipboard);
- }
- if (copyClipboardAction == null)
- {
- copyClipboardAction = new SystemCopyToClipboardAction(shell, clipboard);
- }
- 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 (supportsSearch)
- {
- //menu.add(ISystemContextMenuConstants.GROUP_IMPORTEXPORT, addToArchiveAction);
-
- // add search action
- menu.add(ISystemContextMenuConstants.GROUP_SEARCH, searchAction);
- searchAction.setEnabled(canRead && !offline);
- }
-
- if (!firstFile.isRoot())
- {
- menu.add(menuGroup, copyClipboardAction);
- copyClipboardAction.setEnabled(canRead && !offline);
- if (elementType == 0)
- {
- menu.add(ISystemContextMenuConstants.GROUP_COMPAREWITH, compareFilesAction);
- menu.add(ISystemContextMenuConstants.GROUP_COMPAREWITH, compareEditionAction);
- menu.add(ISystemContextMenuConstants.GROUP_REPLACEWITH, replaceEditionAction);
-
- compareFilesAction.setEnabled(canRead && !offline);
- compareEditionAction.setEnabled(canRead && !offline);
- replaceEditionAction.setEnabled(canRead && !offline);
- }
- }
-
- if (elementType == 1 || (isArchive && supportsArchiveManagement))
- {
- menu.add(menuGroup, pasteClipboardAction);
- pasteClipboardAction.setEnabled(canRead && !offline);
- }
- if (!firstFile.isRoot())
- {
- menu.add(menuGroup, moveAction);
- moveAction.setEnabled(canRead && !offline);
- }
- }
-
- /**
- * 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 there are children but they are empty then we've queried this but there are no children
- // so we have an empty open folder
- Object[] contents = file.getContents(RemoteChildrenContentsType.getInstance());
- if (contents != null && contents.length == 0)
- 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$
- }
-
- /**
- * Returns whether the specified element is represented as existing. Note that
- * it's possible that the represented element will been seen to exist when on
- * a remote host it may not - that is because this call does not query the host.
- * Returns whether the remote file representation exists.
- *
- * @param element the element to check
- * @return true if the element exists
- *
- */
- public boolean exists(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- if (file != null)
- {
- return file.exists();
- }
- return false;
- }
-
- /**
- * 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(IAdaptable element, IProgressMonitor monitor)
- {
- return internalGetChildren(element, null, monitor);
- }
-
- /**
- * Return the children of this object.
- * If this is a folder or root, we list all child folders and files.
- */
- public Object[] getChildren(IContextObject context, IProgressMonitor monitor)
- {
- return internalGetChildren(context.getModelObject(), context.getFilterReference(), monitor);
- }
-
- private Object[] internalGetChildren(IAdaptable element, ISystemFilterReference filterReference, IProgressMonitor monitor)
- {
- //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();
-
-
- 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
- */
- String filter = null;
- if (filterReference != null)
- {
- ISystemFilter filterObject = filterReference.getReferencedFilter();
- if (filterObject.getFilterStringCount() > 0)
- {
- String filterString = filterObject.getFilterStrings()[0];
- String separator = PathUtility.getSeparator(filterString);
-
- int sepIndex = filterString.lastIndexOf(separator);
- if (sepIndex >= 0)
- {
- filter = filterString.substring(sepIndex + 1);
- }
- else
- {
- // fix for 197089
- filter = filterString;
- }
- }
- }
- else
- {
-
- String filterString = getFilterString();
- 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);
- children = filterChildren(children);
- }
- else
- {
- try
- {
- if (monitor != null)
- {
-
- children = ss.resolveFilterString(file, filter, monitor);
- }
- else
- {
- children = ss.resolveFilterString(file, filter, new NullProgressMonitor());
- }
-
- if ((children == null) || (children.length == 0))
- {
- children = EMPTY_LIST;
- }
- else
- {
- if (children.length == 1 && children[0] instanceof SystemMessageObject)
- {
- // don't filter children so that the message gets propagated
- }
- else
- {
- children = filterChildren(children);
- }
- }
-
- }
- catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_EXPAND_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_EXPAND_CANCELLED);
- children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_CANCEL, element);
- }
- catch (Exception exc)
- {
- children = new SystemMessageObject[1];
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_EXPAND_FAILED,
- IStatus.ERROR,
- CommonMessages.MSG_EXPAND_FAILED);
- children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
- } // message already issued
- }
- file.markStale(false);
- return children;
- }
-
- private Object[] filterChildren(Object[] children) {
-
- boolean showHidden = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.SHOWHIDDEN);
-
- if (showHidden) {
- return children;
- }
- else {
-
- ArrayList results = new ArrayList(children.length);
-
- for (int i = 0; i < children.length; i++) {
-
- if (children[i] instanceof IRemoteFile) {
- IRemoteFile remoteFile = (IRemoteFile)(children[i]);
-
- if (!remoteFile.isHidden()) {
- results.add(remoteFile);
- }
- }
- }
-
- return results.toArray();
- }
- }
-
- /**
- * 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(IContextObject element)
- {
- return internalHasChildren(element.getModelObject(), element.getFilterReference());
- }
-
- /**
- * 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(IAdaptable element)
- {
- return internalHasChildren(element, null);
- }
-
- public boolean internalHasChildren(IAdaptable element, ISystemFilterReference filterReference)
- {
- IRemoteFile file = (IRemoteFile) element;
-
- if (!file.exists())
- return false;
-
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- boolean hasChildren = false;
-
- String filter = "*"; //$NON-NLS-1$
- if (filterReference != null)
- {
- ISystemFilter filterObject = filterReference.getReferencedFilter();
- if (filterObject.getFilterStringCount() > 0)
- {
- String filterString = filterObject.getFilterStrings()[0];
- String separator = PathUtility.getSeparator(filterString);
-
- int sepIndex = filterString.lastIndexOf(separator);
- if (sepIndex > 0)
- {
- filter = filterString.substring(sepIndex + 1);
- }
- }
- }
-
- 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(), filter);
- }
- }
- else
- {
- // check that the children are actually there
- //Object[] contents = file.getContents(RemoteChildrenContentsType.getInstance());
- hasChildren = file.hasContents(RemoteChildrenContentsType.getInstance(), filter);
- //if (!hasChildren && !file.isStale())
- if (!hasChildren && file.isStale() && (file.isDirectory() || file.isArchive())) // there are no children, but the resource is stale, therefore it still needs to be queried
- hasChildren = true;
- }
-
- return hasChildren;
- }
-
-
-
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
-
- IRemoteFile file = null;
- if (propertySourceInput instanceof IRemoteFile)
- {
- file = (IRemoteFile) propertySourceInput;
-
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
-
- boolean isArchive = file.isArchive() && supportsArchiveManagement;
- boolean isVirtual = 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 = 8;
- 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(ISystemPropertyConstants.P_FILE_CLASSIFICATION, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CLASSIFICATION, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CLASSIFICATION, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
-
- // last modified
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_LASTMODIFIED, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_LASTMODIFIED, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_LASTMODIFIED, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
-
- // size
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_SIZE, FileResources.RESID_PROPERTY_FILE_SIZE_LABEL, FileResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_SIZE, FileResources.RESID_PROPERTY_FILE_SIZE_LABEL, FileResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_SIZE, FileResources.RESID_PROPERTY_FILE_SIZE_LABEL, FileResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
-
- // canonical path
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
-
- // file extension
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, FileResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, FileResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, FileResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, FileResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, FileResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, FileResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
-
- // file permissions
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PERMISSIONS, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_LABEL, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PERMISSIONS, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_LABEL, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PERMISSIONS, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_LABEL, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP);
-
- // file owner
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_OWNER, FileResources.RESID_PROPERTY_FILE_OWNER_LABEL, FileResources.RESID_PROPERTY_FILE_OWNER_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_OWNER, FileResources.RESID_PROPERTY_FILE_OWNER_LABEL, FileResources.RESID_PROPERTY_FILE_OWNER_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_OWNER, FileResources.RESID_PROPERTY_FILE_OWNER_LABEL, FileResources.RESID_PROPERTY_FILE_OWNER_TOOLTIP);
-
- // file group
- if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_GROUP, FileResources.RESID_PROPERTY_FILE_GROUP_LABEL, FileResources.RESID_PROPERTY_FILE_GROUP_TOOLTIP);
- else if (isVirtual) uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_GROUP, FileResources.RESID_PROPERTY_FILE_GROUP_LABEL, FileResources.RESID_PROPERTY_FILE_GROUP_TOOLTIP);
- else if (isArchive) uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_GROUP, FileResources.RESID_PROPERTY_FILE_GROUP_LABEL, FileResources.RESID_PROPERTY_FILE_GROUP_TOOLTIP);
-
-
- if (isVirtual)
- {
- // add virtual property descriptors...
-
- // compressed size
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMPRESSEDSIZE, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_DESCRIPTION);
-
- // compression ratio
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_DESCRIPTION);
-
- // compression method
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONMETHOD, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_DESCRIPTION);
-
- // comment
- uniqueVirtualDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMMENT, FileResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_DESCRIPTION);
- }
- else if (isArchive)
- {
- // add archive property descriptors...
-
- // expanded size
- uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_ARCHIVE_EXPANDEDSIZE, FileResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_LABEL, FileResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_DESCRIPTION);
-
- // comment
- uniqueArchiveDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_ARCHIVE_COMMENT, FileResources.RESID_PROPERTY_ARCHIVE_COMMENT_LABEL, FileResources.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 = 12;
- 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(ISystemPropertyConstants.P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
-
- // filter string
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
- briefPropertyDescriptorArray[++briefIdx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILTERSTRING, SystemViewResources.RESID_PROPERTY_FILTERSTRING_LABEL,SystemViewResources.RESID_PROPERTY_FILTERSTRING_TOOLTIP);
-
- // canonical path
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL,FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL,FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CANONICAL_PATH, FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_LABEL,FileResources.RESID_PROPERTY_FILE_CANONICAL_PATH_TOOLTIP);
-
- // last modified
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_LASTMODIFIED, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_LASTMODIFIED, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL,FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_LASTMODIFIED, FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_LABEL,FileResources.RESID_PROPERTY_FILE_LASTMODIFIED_TOOLTIP);
-
- // size
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_SIZE, FileResources.RESID_PROPERTY_FILE_SIZE_LABEL, FileResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_SIZE, FileResources.RESID_PROPERTY_FILE_SIZE_LABEL, FileResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_SIZE, FileResources.RESID_PROPERTY_FILE_SIZE_LABEL, FileResources.RESID_PROPERTY_FILE_SIZE_TOOLTIP);
-
- // classification
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CLASSIFICATION, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CLASSIFICATION, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_CLASSIFICATION, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, FileResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
-
- // readonly
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_READONLY, FileResources.RESID_PROPERTY_FILE_READONLY_LABEL, FileResources.RESID_PROPERTY_FILE_READONLY_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_READONLY, FileResources.RESID_PROPERTY_FILE_READONLY_LABEL, FileResources.RESID_PROPERTY_FILE_READONLY_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_READONLY, FileResources.RESID_PROPERTY_FILE_READONLY_LABEL, FileResources.RESID_PROPERTY_FILE_READONLY_TOOLTIP);
-
- // hidden
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_HIDDEN, FileResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, FileResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_HIDDEN, FileResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, FileResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_HIDDEN, FileResources.RESID_PROPERTY_FILE_HIDDEN_LABEL, FileResources.RESID_PROPERTY_FILE_HIDDEN_TOOLTIP);
-
- // file extension
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, FileResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, FileResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, FileResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, FileResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_EXTENSION, FileResources.RESID_PROPERTY_FILE_EXTENSION_LABEL, FileResources.RESID_PROPERTY_FILE_EXTENSION_TOOLTIP);
-
- // file permissions
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PERMISSIONS, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_LABEL, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PERMISSIONS, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_LABEL, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PERMISSIONS, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_LABEL, FileResources.RESID_PROPERTY_FILE_PERMISSIONS_TOOLTIP);
-
- // file owner
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_OWNER, FileResources.RESID_PROPERTY_FILE_OWNER_LABEL, FileResources.RESID_PROPERTY_FILE_OWNER_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_OWNER, FileResources.RESID_PROPERTY_FILE_OWNER_LABEL, FileResources.RESID_PROPERTY_FILE_OWNER_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_OWNER, FileResources.RESID_PROPERTY_FILE_OWNER_LABEL, FileResources.RESID_PROPERTY_FILE_OWNER_TOOLTIP);
-
- // file group
- if (isRegular) propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_GROUP, FileResources.RESID_PROPERTY_FILE_GROUP_LABEL, FileResources.RESID_PROPERTY_FILE_GROUP_TOOLTIP);
- else if (isVirtual) virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_GROUP, FileResources.RESID_PROPERTY_FILE_GROUP_LABEL, FileResources.RESID_PROPERTY_FILE_GROUP_TOOLTIP);
- else if (isArchive) archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_GROUP, FileResources.RESID_PROPERTY_FILE_GROUP_LABEL, FileResources.RESID_PROPERTY_FILE_GROUP_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(ISystemPropertyConstants.P_VIRTUAL_COMPRESSEDSIZE, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSEDSIZE_DESCRIPTION);
-
- // compression ratio
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONRATIO_DESCRIPTION);
-
- // compression method
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONMETHOD, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMPRESSIONMETHOD_DESCRIPTION);
-
- // comment
- virtualDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_VIRTUAL_COMMENT, FileResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_LABEL, FileResources.RESID_PROPERTY_VIRTUALFILE_COMMENT_DESCRIPTION);
- }
-
- else if (isArchive)
- {
- // add archive property descriptors...
-
- // expanded size
- archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_ARCHIVE_EXPANDEDSIZE, FileResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_LABEL, FileResources.RESID_PROPERTY_ARCHIVE_EXPANDEDSIZE_DESCRIPTION);
-
- // comment
- archiveDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_ARCHIVE_COMMENT, FileResources.RESID_PROPERTY_ARCHIVE_COMMENT_LABEL, FileResources.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(ISystemPropertyConstants.P_NBRCHILDREN))
- {
- IRemoteFile file = (IRemoteFile) propertySourceInput;
- {
- 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)
- {
- DateFormat datefmt = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM);
- String formattedDate = datefmt.format(date);
- return formattedDate;
- }
- else
- {
- return date;
- }
- }
- return date;
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_SIZE))
- {
- if (formatted)
- {
- NumberFormat fmt = NumberFormat.getIntegerInstance();
- String formattedNumber = fmt.format(file.getLength());
- return sub(xlatedSize, MSG_SUB1, formattedNumber);
- }
- else
- {
- return new Long(file.getLength());
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_ARCHIVE_EXPANDEDSIZE))
- {
- if (!isVirtual || virtualFile == null) 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 || virtualFile == null) 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_EXTENSION))
- {
- if(!file.isDirectory()) {
- String ext = file.getExtension();
- return ext == null?"":ext; //$NON-NLS-1$
- }
- else
- return ""; //$NON-NLS-1$
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_PERMISSIONS))
- {
- IHostFilePermissions permissions = file.getPermissions();
- if (permissions == null){
-
- if (getFilePermissions(file)){
- return FileResources.MESSAGE_PENDING;
- }
- return FileResources.MESSAGE_NOT_SUPPORTED;
- }
- if (permissions instanceof PendingHostFilePermissions){
- return FileResources.MESSAGE_PENDING;
- }
- return permissions.toAlphaString();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_OWNER))
- {
- IHostFilePermissions permissions = file.getPermissions();
- if (permissions == null){
-
- if (getFilePermissions(file)){
- return FileResources.MESSAGE_PENDING;
- }
- return FileResources.MESSAGE_NOT_SUPPORTED;
- }
- if (permissions instanceof PendingHostFilePermissions){
- return FileResources.MESSAGE_PENDING;
- }
- return permissions.getUserOwner();
- }
- else if (name.equals(ISystemPropertyConstants.P_FILE_GROUP))
- {
- IHostFilePermissions permissions = file.getPermissions();
- if (permissions == null){
-
- if (getFilePermissions(file)){
- return FileResources.MESSAGE_PENDING;
- }
- return FileResources.MESSAGE_NOT_SUPPORTED;
- }
- if (permissions instanceof PendingHostFilePermissions){
- return FileResources.MESSAGE_PENDING;
- }
- return permissions.getGroupOwner();
- }
- 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 || virtualFile == null) return ""; //$NON-NLS-1$
- return virtualFile.getCompressionMethod();
- }
- else if (name.equals(ISystemPropertyConstants.P_VIRTUAL_COMPRESSIONRATIO))
- {
- if (virtualFile != null)
- {
- Double ratio = new Double(virtualFile.getCompressionRatio());
- if (formatted)
- {
- NumberFormat numfmt = NumberFormat.getPercentInstance();
- return numfmt.format(ratio);
- }
- else
- {
- return ratio;
- }}
- else
- return null;
- }
- else
- return null; //super.getPropertyValue(name);
- }
-
- private boolean getFilePermissions(IRemoteFile file){
- if (file instanceof IAdaptable){
- final IFilePermissionsService service = (IFilePermissionsService)((IAdaptable)file).getAdapter(IFilePermissionsService.class);
-
- if (service != null && (service.getCapabilities(file.getHostFile()) & IFilePermissionsService.FS_CAN_GET_PERMISSIONS) != 0){
-
- final IRemoteFile rFile = file;
- if (rFile.getHostFile() instanceof IHostFilePermissionsContainer){
- ((IHostFilePermissionsContainer)rFile.getHostFile()).setPermissions(new PendingHostFilePermissions());
- }
-
- Job deferredFetch = new Job(NLS.bind(FileResources.MESSAGE_GETTING_PERMISSIONS, file.getAbsolutePath()))
- {
- public IStatus run(IProgressMonitor monitor){
- try
- {
- // service will take care of setting this on the host file
- service.getFilePermissions(rFile.getHostFile(), monitor);
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(rFile, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, rFile));
- }
- catch (Exception e)
- {
- }
- return Status.OK_STATUS;
- }
- };
- deferredFetch.schedule();
-
-
- return true; // query kicked off
- }
- }
- return false; // no query kicked off
- }
-
-
- // 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)
- {
- IRemoteFile file = (IRemoteFile)element;
- boolean offline = file.getParentRemoteFileSubSystem().isOffline();
- return file.canRead() && !offline;
- }
- 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 offline = file.getParentRemoteFileSubSystem().isOffline();
- boolean supportsArchiveManagement = file.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement();
- return !offline && 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.downloadResourceToWorkspace(srcFileOrFolder, monitor);
- }
- else if (element instanceof File) {
- return UniversalFileTransferUtility.downloadResourceToWorkspace((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 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(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- if (!doSuperTransferProperty && supportsSearch)
- {
- //flatset will contain all FILES that will be copied to workspace in UniversalFileTransferUtility and create corresponding folders. Empty folders will be ignored
- SystemRemoteResourceSet flatSet = new SystemRemoteResourceSet(set.getSubSystem(), set.getAdapter());
- long totalByteSize = getFlatRemoteResourceSet(set.getResourceSet(), flatSet, monitor);
- flatSet.setByteSize(totalByteSize);
-
- if (monitor != null)
- {
- monitor.beginTask(_downloadMessage, (int)totalByteSize);
- //monitor.done();
- }
-
- //add folders to set that are being copied to the workspace in order to strip out empty folders in UniversalFileTransferUtility
- for (int i=0;i<set.size();i++)
- {
- IRemoteFile remoteFile = (IRemoteFile)set.get(i);
- //make sure it is a folder as files are being accounted for already
- if(remoteFile.isDirectory())
- {
- flatSet.addResource(remoteFile);
- }
- }
-
- try
- {
- //SystemWorkspaceResourceSet flatResult = UniversalFileTransferUtility.copyRemoteResourcesToWorkspace(flatSet, monitor);
- // for bug 209375, using multiple instead of single
- SystemWorkspaceResourceSet flatResult = UniversalFileTransferUtility.downloadResourcesToWorkspaceMultiple(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);
- IResource tempResource = UniversalFileTransferUtility.getTempFileFor(remoteFile);
- if (tempResource instanceof IContainer)
- {
- UniversalFileTransferUtility.discardReplicasOfDeletedFiles((IRemoteFileSubSystem)set.getSubSystem(), (IContainer)tempResource);
- }
- hierarchicalResult.addResource(tempResource);
- }
- return hierarchicalResult;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return null;
- }
- }
- else
- {
- return UniversalFileTransferUtility.downloadResourcesToWorkspace(set, monitor);
- }
- }
-
- /**
- * Helper method to get the local file subsystem.
- * @return the local file subsystem
- */
- private IRemoteFileSubSystem getLocalFileSubSystem()
- {
- ISystemRegistry registry = RSECorePlugin.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().isLocal())
- {
- 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;
-
- for (int i = 0; i < initialResources.size(); i++)
- {
- IRemoteFile remoteFile = (IRemoteFile)initialResources.get(i);
-
- // get all files within directory
- if (remoteFile.isDirectory())
- {
- SystemSearchString searchString = null;
- if (ArchiveHandlerManager.isVirtual(remoteFile.getAbsolutePath()))
- {
- //If this file to create flatset with is a virtual directory, we want to make sure the includeArchives flag
- //for the searchString is set to true. This way, we could search inside the archive file
- searchString = new SystemSearchString("*", false, false, "*", false, true, true); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- {
- searchString = new SystemSearchString("*", false, false, "*", false, false, true); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // 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)
- {
- if (submonitor != null)
- submonitor.worked(1);
- Object[] results = config.getResults();
- if (results == null || results.length == 0){
- // make sure search is really done
- System.out.println("waiting for results"); //$NON-NLS-1$
-
- }
-
-
- 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;
- private List _namesInUse = new ArrayList();
- public RenameRunnable(IRemoteFile targetFileOrFolder)
- {
- _targetFileOrFolder = targetFileOrFolder;
- }
- public RenameRunnable(IRemoteFile targetFileOrFolder, List namesInUse)
- {
- _targetFileOrFolder = targetFileOrFolder;
- _namesInUse=namesInUse;
- }
-
- public void run() {
- ValidatorFileUniqueName validator = null;
- SystemRenameSingleDialog dlg;
- if(_namesInUse!=null && _namesInUse.size()>0)
- {
- dlg = new SystemRenameSingleDialog(null, true, _targetFileOrFolder, validator, _namesInUse); // true => copy-collision-mode
- }
- else
- {
- 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 fromSet the source objects for the drop
- * @param target 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(), monitor);
- }
- catch (Exception e)
- {
- }
-
- if (!targetFolder.canWrite())
- {
- String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
- SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- 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(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- if (!doSuperTransferProperty)
- {
- SystemWorkspaceResourceSet flatFromSet = new SystemWorkspaceResourceSet();
- long totalByteSize = getFlatWorkspaceResourceSet(fromSet.getResourceSet(), flatFromSet, monitor);
-
- if (monitor != null)
- {
- int size = (int)totalByteSize;
- monitor.beginTask(_uploadMessage, size);
- }
- // back to hierarchy
- resultSet = UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)fromSet, targetFolder, monitor, true);
- }
- else
- {
- resultSet = UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)fromSet, targetFolder, monitor, true);
- }
- if (resultSet.hasMessage())
- {
- SystemMessage msg = resultSet.getMessage();
- if (monitor.isCanceled() && resultSet.size() > 0)
- {
- //Get the moved file names
- Object thisObject = resultSet.get(0);
- String copiedFileNames = null;
- if (thisObject instanceof IRemoteFile)
- {
- copiedFileNames = ((IRemoteFile)thisObject).getName();
- for (int i=1; i<(resultSet.size()); i++)
- {
- if (thisObject instanceof IRemoteFile)
- {
- copiedFileNames = copiedFileNames + "\n" + ((IRemoteFile)thisObject).getName(); //$NON-NLS-1$
- }
- }
- }
- //getMessage("RSEG1125").makeSubstitution(movedFileName));
- if (copiedFileNames != null)
- {
- String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
- String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
-
- SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_COPY_INTERRUPTED,
- IStatus.ERROR, msgTxt, msgDetails);
- resultSet.setMessage(thisMessage);
- //SystemMessageDialog.displayErrorMessage(shell, thisMessage);
- }
- }
- }
- return resultSet;
- }
- 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(filterReference.getReferencedFilter().getFilterStrings(), monitor);
- }
- catch (Exception e)
- {
- }
-
- if (children != null)
- {
- 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();
- List existing = new ArrayList();
- boolean overwrite=false;
-
- for (int i = 0; i < set.size(); i++)
- {
- IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
- if (!srcFileOrFolder.exists())
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND,
- srcFileOrFolder.getAbsolutePath(),
- srcFileOrFolder.getHost().getAliasName());
-
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- 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();
- String originalName = srcFileOrFolder.getName();
- int count = 1;
- boolean go = true;
-
- // same systemfor
- if (sameSystem)
- {
- try
- {
- if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath()))
- {
- //Handle resources being copied to their parent folder. Name = "Copy of " + name
- if(targetFolder.getAbsolutePath().equals(srcFileOrFolder.getParentRemoteFile().getAbsolutePath()))
- {
- name = MessageFormat.format(FileResources.RESID_CONFLICT_COPY_PATTERN, new Object[] {
- new Integer(count), originalName });
- while(go)
- {
- IRemoteFile existingFileOrFolder = ((IRemoteFileSubSystem)srcSubSystem).getRemoteFileObject(targetFolder, name, monitor);
- if (existingFileOrFolder.exists())
- {
- count++;
- name = MessageFormat.format(FileResources.RESID_CONFLICT_COPY_PATTERN, new Object[] {
- new Integer(count), originalName });
- }
- else
- {
- toCopy.add(srcFileOrFolder);
- toCopyNames.add(name);
- go = false;
- }
- }
- }
- else
- {
- // should be better doing a query for all in the set
- IRemoteFile existingFileOrFolder = ((IRemoteFileSubSystem)srcSubSystem).getRemoteFileObject(targetFolder, name, monitor);
- if (existingFileOrFolder.exists())
- {
- /*RenameRunnable rr = new RenameRunnable(existingFileOrFolder, toCopyNames);
- Display.getDefault().syncExec(rr);
- name = rr.getNewName();
- */
- existing.add(existingFileOrFolder);
- }
-
- if (name != null)
- {
- toCopy.add(srcFileOrFolder);
- toCopyNames.add(name);
- //toCopyBatch.add(srcFileOrFolder);
- }
- /*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?!!");
- }
- }
-
-
- if(existing.size()>0)
- {
- CopyRunnable rr = new CopyRunnable(existing);
- Display.getDefault().syncExec(rr);
- overwrite = rr.getOk();
- }
-
-
-
- //Following code used originally with the rename dialog which no longer exists
- //Resources will be copied with same names if an overwrite is desired from the user
- //Resources that are copied to their parent will be renamed to "Copy of " + name of source
- if(existing.size()==0 || overwrite)
- {
- 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
- {
- targetFS.copy(srcFileOrFolder, targetFolder, name, monitor);
- IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor);
- resultSet.addResource(copiedFile);
- }
- catch (SystemMessageException e)
- {
- if (monitor.isCanceled() && resultSet.size() > 0)
- {
- //Get the moved file names
- Object thisObject = resultSet.get(0);
- String copiedFileNames = null;
- if (thisObject instanceof IRemoteFile)
- {
- copiedFileNames = ((IRemoteFile)thisObject).getName();
- for (int i=1; i<(resultSet.size()); i++)
- {
- if (thisObject instanceof IRemoteFile)
- {
- copiedFileNames = copiedFileNames + "\n" + ((IRemoteFile)thisObject).getName(); //$NON-NLS-1$
- }
- }
- }
- //getMessage("RSEG1125").makeSubstitution(movedFileName));
- if (copiedFileNames != null)
- {
- String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
- String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
-
- SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_COPY_INTERRUPTED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(shell, thisMessage);
- }
- else
- {
- SystemMessageDialog.displayMessage(e);
- }
- }
- else
- {
- SystemMessageDialog.displayMessage(e);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- // deal with batch copies now
- /*if(existing.size()==0 || overwrite)
- {
- 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(), monitor);
- resultSet.addResource(copiedFile);
- }
- }
- }
- catch (SystemMessageException e)
- {
- if (monitor.isCanceled() && srcFileOrFolders.length > 1)
- {
- //ISystemViewElementAdapter adapter = fromSet.getViewAdapter();
- for (int i = 0; i < srcFileOrFolders.length; i++)
- {
- IRemoteFile thisCopiedFile = null;
- try
- {
- thisCopiedFile = targetFS.getRemoteFileObject(targetFolder, srcFileOrFolders[i].getName(), null);
- }
- catch (SystemMessageException thsiException)
- {
- thsiException.printStackTrace();
- thisCopiedFile = null;
- }
- if (thisCopiedFile != null && thisCopiedFile.exists())
- {
- //This object has been deleted
- resultSet.addResource(thisCopiedFile);
- }
- }
- if (resultSet.size() > 0)
- {
- //Get the copied file names
- Object thisObject = resultSet.get(0);
- String copiedFileNames = null;
- copiedFileNames = ((IRemoteFile)thisObject).getName();
- for (int i=1; i<(resultSet.size()); i++)
- {
- thisObject = resultSet.get(i);
- copiedFileNames = copiedFileNames + "\n" + ((IRemoteFile)resultSet.get(i)).getName(); //$NON-NLS-1$
- }
- String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
- String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
-
- SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_COPY_INTERRUPTED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(shell, thisMessage);
- }
- else
- {
- SystemMessageDialog.displayMessage(e);
- }
- }
- else
- {
- SystemMessageDialog.displayMessage(e);
- }
- }
- 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 sameSystemType indication of whether the source and target reside on the same type of system
- * @param sameSystem an indication whether the target and source reside on the same type of system
- * @param sourceType 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(), monitor);
- }
- catch (Exception e)
- {
- }
-
- if (!targetFolder.canWrite())
- {
- String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
- SystemMessage errorMsg = null;
-
- errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
-
- 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, monitor);
- 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.uploadResourceFromWorkspace(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(filterReference.getReferencedFilter().getFilterStrings(), monitor);
- }
- catch (Exception e)
- {
- }
-
- if (children != null)
- {
- 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())
- {
- String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND,
- srcFileOrFolder.getAbsolutePath(),
- srcFileOrFolder.getHost().getAliasName());
-
- SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- return errorMessage;
- }
-
- String msgTxt = NLS.bind(CommonMessages.MSG_COPY_PROGRESS, srcFileOrFolder.getName(), targetFolder.getAbsolutePath());
- SystemMessage copyMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_COPY_PROGRESS,
- IStatus.INFO, msgTxt);
-
-
- IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem();
-
- String name = srcFileOrFolder.getName();
-
- if (localFS == targetFS)
- {
- if (!targetFolder.getAbsolutePath().equals(srcFileOrFolder.getAbsolutePath()))
- {
- IRemoteFile existingFileOrFolder = localFS.getRemoteFileObject(targetFolder, name, monitor);
-
- if (existingFileOrFolder.exists())
- {
- RenameRunnable rr = new RenameRunnable(existingFileOrFolder);
- Display.getDefault().syncExec(rr);
- name = rr.getNewName();
- }
-
- if (name != null)
- {
- monitor.subTask(copyMessage.getLevelOneText());
- targetFS.copy(srcFileOrFolder, targetFolder, name, monitor);
- IRemoteFile copiedFile = targetFS.getRemoteFileObject(targetFolder, name, monitor);
- return copiedFile;
- }
- }
- }
- else
- {
- // Not sure how we can get here since if the source and target subsystems are different, then a doDrag() needs to
- // occur, resulting in a local resource (i.e. IFile) rather than a remote resource (i.e. IRemoteFile).
- // TODO investigate to see if we can get rid of this code
- 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(), SystemEncodingUtil.ENCODING_UTF_8, newPath, System.getProperty("file.encoding"), monitor); //$NON-NLS-1$
-
- result = targetFS.getRemoteFileObject(targetFolder, name, monitor);
- return result;
-
- }
- catch (SystemMessageException 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, monitor);
- targetFS.createFolder(newTargetFolder, monitor);
-
- IRemoteFile[] children = localFS.list(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();
- }
- }
- }
- }
-
-
- 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, new NullProgressMonitor());
-
- //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;
- boolean offline = file.getParentRemoteFileSubSystem().isOffline();
-
- if (offline || file.isRoot()){
- return false;
- }
- else {
- /*
- if (file.getHost().getSystemType().isWindows()){
- return true;
- }
- else {
- // for deletion, you need write access to the containing directory
- IRemoteFile parentFile = file.getParentRemoteFile();
- return parentFile.canWrite();
- }*/
- return true;
- }
- }
-
-
- /**
- * {@inheritDoc}
- * <p>
- * 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);
-
- // get rid of associated editable if there was one before
- SystemIFileProperties properties = new SystemIFileProperties(tmp);
- properties.setRemoteFileObject(null);
- }
- catch (Exception e)
- {
- }
- }
-
- ss.delete(file, monitor);
- ok = true;
- file.markStale(true);
- parentFile.markStale(true);
- }
- catch (Exception exc)
- {
- ok = false;
- String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString());
- String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_DELETE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(shell, msg);
- }
- return ok;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * Defers request to the remote file subsystem
- */
- public boolean doDeleteBatch(Shell shell, List resourceSet, IProgressMonitor monitor) throws Exception
- {
- 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)
- {
- String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString());
- String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_DELETE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(shell, msg);
- }
- }
- if (ss != null)
- {
- ss.deleteBatch(files, monitor);
- }
- return true;
- }
- // FOR COMMON RENAME ACTIONS
- /**
- * Yes, remote file objects are renamable!
- */
- public boolean canRename(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- boolean offline = file.getParentRemoteFileSubSystem().isOffline();
- return !file.isRoot() && file.canRead() && !offline;
- }
-
- 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;
-
- // is this open?
- if (editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN){
- // there's an in-memory editable, so change the associated remote file
- IRemoteFile newRemoteFile = ss.getRemoteFileObject(remotePath, new NullProgressMonitor());
- 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, IProgressMonitor monitor) throws Exception
- {
- IRemoteFile file = (IRemoteFile) element;
- IRemoteFileSubSystem ss = file.getParentRemoteFileSubSystem();
-
-
- String newRemotePath = file.getParentPath() + "/" + newName; //$NON-NLS-1$
- IResource localResource = null;
- if (SystemRemoteEditManager.getInstance().doesRemoteEditProjectExist())
- {
- localResource = UniversalFileTransferUtility.getTempFileFor(file);
- }
-
- ss.rename(file, newName, monitor);
- if (localResource != null && localResource.exists())
- {
-
- IPath newLocalPath = localResource.getParent().getFullPath().append(newName);
- moveTempResource(localResource, newLocalPath, ss, newRemotePath);
- }
-
- // Firing a refresh event before a rename event will cause views to refresh
- // but the TreeItems contain the old data, and refresh will display an error
- // below the TreeItem saying it's not readable as it's using the old name.
- // This is not an issue for the SystemView as it does the refresh in a job, so
- // the rename event is actually handled first then the refresh.
- // Commented out for bug #198576
-// 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);
- return true;
-
- }
-
- /**
- * 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...
- // --------------------------------------------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- IRemoteFile file = (IRemoteFile) element;
- return file.getAbsolutePath();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
- */
- 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 super.getSubSystem(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)
- {
- 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.isDirectory() && newFile.isDirectory()) )) {
- 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) 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!
-
- // changed to do the same as the new file wizards since
- // as per bug 251860, we can't use the cache and we need to bypass the hidden preference
- IRemoteFile parentFolder = file.getParentRemoteFile();
- IRemoteFile[] children = parentFolder.getParentRemoteFileSubSystem().list(parentFolder, monitor);
-
- if ((children == null) || (children.length == 0))
- return names;
-
- names = new String[children.length];
- for (int idx = 0; idx < names.length; idx++)
- {
- names[idx] = (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())
- {
- // make sure we're using the latest version of remoteFile
- try {
- remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (Exception e){
- }
-
- // only handle double click if object is a file
- ISystemEditableRemoteObject editable = getEditableRemoteObject(remoteFile);
- if (editable != null)
- {
- String remotePath = remoteFile.getAbsolutePath();
- String replicaRemotePath = editable.getAbsolutePath();
- // first make sure that the correct remote file is referenced (might be difference because of different case)
- if (!replicaRemotePath.equals(remotePath)){ // for bug 276103
-
- IEditorPart editor = editable.getEditorPart();
- boolean editorWasClosed = false;
- if (editor == null){
- editorWasClosed = true;
- }
- else if (editor.isDirty()){
- editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
- if (editorWasClosed)
- editable.doImmediateSaveAndUpload();
- }
- else {
- editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
- }
-
- if (!editorWasClosed){
- // use cancelled operation so we need to get out of here
- return false;
- }
-
- try {
- IFile file = editable.getLocalResource();
- file.delete(true, new NullProgressMonitor());
- }
- catch (CoreException e){
- }
-
- // open new editor for correct replica
- editable = getEditableRemoteObject(remoteFile);
- }
-
- try
- {
- boolean isOpen = editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN;
- boolean isFileCached = isFileCached(editable, remoteFile);
- if (isFileCached)
- {
- if (!isOpen) {
- editable.setLocalResourceProperties();
- editable.addAsListener();
- }
- editable.openEditor();
- }
- else
- {
- DownloadAndOpenJob oJob = new DownloadAndOpenJob(editable, false);
- oJob.schedule();
- }
-
- }
- 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)
- {
- // we have a local copy of this file, so we need to compare timestamps
-
- // get stored modification stamp
- long storedModifiedStamp = properties.getRemoteFileTimeStamp();
- long oldRemoteModifiedStamp = remoteFile.getLastModified();
-
- // get updated remoteFile so we get the current remote timestamp
- IRemoteFileSubSystem subsystem = remoteFile.getParentRemoteFileSubSystem();
- if (!subsystem.isOffline()){ // only do this check when online..if offline we assume the temp file is okay
- remoteFile.markStale(true);
- try
- {
- remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
- }
-
- // make sure that the editable is using an uptodate version
- ((SystemEditableRemoteFile)editable).setRemoteFile(remoteFile);
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (oldRemoteModifiedStamp != remoteModifiedStamp) || (storedModifiedStamp != remoteModifiedStamp);
-
- String remoteEncoding = remoteFile.getEncoding();
- String storedEncoding = properties.getEncoding();
-
- boolean encodingChanged = storedEncoding == null || !(remoteEncoding.equals(storedEncoding));
-
- boolean usedBinary = properties.getUsedBinaryTransfer();
- boolean isBinary = remoteFile.isBinary();
-
- return (!dirty &&
- !remoteNewer &&
- usedBinary == isBinary &&
- !encodingChanged);
- }
- return false;
- }
-
- public boolean canEdit(Object element)
- {
- IRemoteFile remoteFile = (IRemoteFile) element;
- if (remoteFile.isFile())
- {
- boolean offline = remoteFile.getParentRemoteFileSubSystem().isOffline();
- return remoteFile.canRead() && !offline;
- }
- return false;
- }
-
- public ISystemEditableRemoteObject getEditableRemoteObject(Object element)
- {
- RemoteFile remoteFile = (RemoteFile) element;
- if (remoteFile.isFile())
- {
- try
- {
- IFile file = getCachedCopy(remoteFile); // Note that this is a case-sensitive check
- if (file != null)
- {
- SystemIFileProperties properties = new SystemIFileProperties(file);
-
- Object obj = properties.getRemoteFileObject();
- if (obj != null && obj instanceof SystemEditableRemoteFile)
- {
- SystemEditableRemoteFile rmtObj = (SystemEditableRemoteFile) obj;
- return rmtObj; // return regardless of whehter it's open - open handling is taken care of after
- }
- }
- return new SystemEditableRemoteFile(remoteFile);
- }
- catch (Exception e)
- {
- }
- }
- return null;
- }
-
- public IFile getCachedCopy(IRemoteFile remoteFile) throws SystemMessageException
- {
- if (SystemRemoteEditManager.getInstance().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$
- }
- else if (inName.equals("supportspermissions")) //$NON-NLS-1$
- {
- if (value.equals("true")){ //$NON-NLS-1$
- // check service
- if (tgt instanceof IAdaptable){
- IFilePermissionsService service = (IFilePermissionsService)((IAdaptable)tgt).getAdapter(IFilePermissionsService.class);
- if (service != null){
-
- return (service.getCapabilities(tgt.getHostFile()) & IFilePermissionsService.FS_CAN_GET_PERMISSIONS) != 0;
- }
- }
- }
- return false;
- }
- }
-
- return super.testAttribute(target, name, value);
- }
-
- /*
- * Return whether deferred queries are supported.
- */
- public boolean supportsDeferredQueries(ISubSystem subSys)
- {
- return !subSys.getHost().getSystemType().isLocal();
- }
-
-
- protected SystemFetchOperation getSystemFetchOperation(Object o, IElementCollector collector)
- {
- return new SystemFetchOperation(null, o, this, collector, true);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java
deleted file mode 100644
index e0b9d5183..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultAdapter.java
+++ /dev/null
@@ -1,823 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562] dont implement ISystemOutputRemoteTypes
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.actions.SystemRemoteFileSearchOpenWithMenu;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-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.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.SystemAdapterHelpers;
-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
-{
-
- public class DelayedGotoSearchResultJob extends Job
- {
- private DelayedGotoSearchResult _gotoLine;
- public DelayedGotoSearchResultJob(DelayedGotoSearchResult gotoLine)
- {
- super("Goto Line");
- _gotoLine = gotoLine;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try
- {
- // wait for a bit so that download can complete - otherwise
- // we could end up spawning this job too frequently
- Thread.sleep(1000);
- }
- catch (Exception e)
- {
- }
- PlatformUI.getWorkbench().getDisplay().asyncExec(_gotoLine);
- return Status.OK_STATUS;
- }
- }
-
-
-
- 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 {
- DelayedGotoSearchResultJob job = new DelayedGotoSearchResultJob(this);
- job.schedule();
- }
- }
-
- 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;
- }
- }
-
-
- 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.getTheSystemRegistryUI().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(IAdaptable element, IProgressMonitor monitor)
- {
- return null;
- }
-
- /**
- * Returns false.
- */
- public boolean hasChildren(IAdaptable 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) throws Exception
- {
- return null;
- }
-
- public IPropertyDescriptor[] getUniquePropertyDescriptors()
- {
- return new IPropertyDescriptor[0];
- }
-
- /**
- * Returns the unique property descriptors for a search result
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (_propertyDescriptors == null)
- {
- _propertyDescriptors = new PropertyDescriptor[2];
- int idx = -1;
-
- // path
- _propertyDescriptors[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILE_PATH, SystemViewResources.RESID_PROPERTY_FILE_PATH_LABEL, SystemViewResources.RESID_PROPERTY_FILE_PATH_TOOLTIP);
-
- // char start
- _propertyDescriptors[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_SEARCH_LINE, FileResources.RESID_PROPERTY_SEARCH_LINE_LABEL, FileResources.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(ISystemPropertyConstants.P_FILE_PATH))
- {
- return output.getAbsolutePath();
- }
- else if (name.equals(ISystemPropertyConstants.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, IProgressMonitor monitor) 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 srcType 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 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 FileResources.RESID_PROPERTY_SEARCH_STATUS_ACTIVE_VALUE;
- }
- else
- {
- return FileResources.RESID_PROPERTY_SEARCH_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$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java
deleted file mode 100644
index 1c0777384..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-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.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
-{
- /**
- * Constructor.
- */
- 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();
- String msg = null;
-
- if (set.isRunning()) {
- msg = CommonMessages.MSG_OPERATION_RUNNING;
- }
- else if (set.isFinished()) {
- msg = CommonMessages.MSG_OPERATION_FINISHED;
- }
- else if (set.isCancelled()) {
- msg = CommonMessages.MSG_OPERTION_STOPPED;
- }
- else if (set.isDisconnected()) {
- msg = CommonMessages.MSG_OPERATION_DISCONNECTED;
- }
-
- if (msg != null)
- {
- msg = NLS.bind(msg, name);
- return msg;
- }
- }
-
- 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(IAdaptable element, IProgressMonitor monitor) {
-
- 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(IAdaptable 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- //FIXME this is forbidden by the API
- 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) 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;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultAdapterFactory.java
deleted file mode 100644
index 17b3c2e64..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultAdapterFactory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.services.search.IHostSearchResult;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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};
- }
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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()); //$NON-NLS-1$
- }
- return adapter;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultSetAdapterFactory.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultSetAdapterFactory.java
deleted file mode 100644
index 70c28c028..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewSearchResultSetAdapterFactory.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [180519][api] declaratively register adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.view;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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};
- }
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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()); //$NON-NLS-1$
- }
- return adapter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/widgets/SystemFileTreeAndListGroup.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/widgets/SystemFileTreeAndListGroup.java
deleted file mode 100644
index 7c89030c0..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/widgets/SystemFileTreeAndListGroup.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.internal.files.ui.widgets;
-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 event the selection changed event
- */
- 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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemFileNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemFileNewConnectionWizardPage.java
deleted file mode 100644
index d9c74a4a4..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemFileNewConnectionWizardPage.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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 verbiage
- String text = null;
- text = SystemResources.RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBIAGE1;
- //,
- // 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_VERBIAGE2;
- //,
- // 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"); //$NON-NLS-1$
-
- 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);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemNewSubSystemProperties#applyValues(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean applyValues(ISubSystem ss) {
- return true;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java
deleted file mode 100644
index 2f20a9f63..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [168975] Move RSE Events API to Core
- * Rupen Mardirossian (IBM) - [187530] Commented out line 192, in order to stop logging of SystemMessageException
- * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
- * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * David Dykstal (IBM) - [231841] Incorrect create messages being used. Cannot use NLS.bind if no substitution variables
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.wizards;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.filters.ISystemFilter;
-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.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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"; //$NON-NLS-1$
-
- private class CreateNewFileJob extends WorkspaceJob
- {
- IRemoteFile parentFolder = null;
- String name = null;
- String absName = null;
- String message = null;
-
- /**
- * CreateNewFileJob job.
- * @param message text used as the title of the job
- */
- public CreateNewFileJob(IRemoteFile parentFolder, String name, String absName, String message)
- {
- super(message);
- this.parentFolder = parentFolder;
- this.name = name;
- this.absName = absName;
- this.message = message;
- setUser(true);
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor)
- {
- boolean ok = true;
- IStatus status = Status.OK_STATUS;
- SystemMessage msg;
- IRemoteFileSubSystem rfss = parentFolder.getParentRemoteFileSubSystem();
-
- // ok, proceed with actual creation...
- IRemoteFile newFile = null;
- try
- {
- IRemoteFile newFilePath = rfss.getRemoteFileObject(parentFolder, name, monitor);
- newFile = rfss.createFile(newFilePath, monitor);
- }
- catch (RemoteFileIOException exc )
- {
- ok = false;
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED;
- String msgDetails = FileResources.FILEMSG_CREATE_FILE_FAILED_DETAILS;
-
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(null, msg);
- }
- catch (RemoteFileSecurityException e)
- {
- ok = false;
- String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED;
- String msgDetails = FileResources.FILEMSG_CREATE_FILE_FAILED_DETAILS;
-
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
-
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SystemMessageDialog.displayErrorMessage(null, msg);
- }
- catch (SystemMessageException exc)
- {
- ok = false;
- if (monitor.isCanceled())
- {
- status = Status.CANCEL_STATUS;
- }
- SystemMessageDialog.displayErrorMessage(null, exc.getSystemMessage());
- }
-
- if (ok)
- {
- updateGUI(parentFolder, newFile, getViewer(), isInputAFilter(), getSelectedFilterReference());
- }
-
- return status;
- }
-
- }
-
- /**
- * 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); //$NON-NLS-1$
- }
- }
-
- /**
- * 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);
- 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
- */
- {
- String msgTxt = NLS.bind(FileResources.FILEMSG_FOLDER_NOTFOUND, parentFolder.getAbsolutePath());
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- 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...
-
- String msgTxt = NLS.bind(FileResources.MSG_CREATEFILEGENERIC_PROGRESS, name);
- CreateNewFileJob createNewFileJob = new CreateNewFileJob(parentFolder, name, absName, msgTxt);
- createNewFileJob.schedule();
- }
- 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("*")) { //$NON-NLS-1$
- return true;
- }
- }
- }
-
- boolean meets = parentSubSystem.doesFilterMatch(filter, newAbsName);
-
- if (!meets)
- {
- String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
- String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_RESOURCE_NOTVISIBLE,
- IStatus.ERROR, msgTxt, msgDetails);
- 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)
- {
- ISystemRegistry sr = RSECorePlugin.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.
- sr.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, new NullProgressMonitor());
- // 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
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizardMainPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizardMainPage.java
deleted file mode 100644
index 995a516e7..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizardMainPage.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Kevin Doyle (IBM) - Changed name Validator to ValidatorFileUniqueName
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [216252] cleaning up system message ids and strings
- * David McKnight (IBM) - [231671] TVT34:TCT171: PLK: No help text for new remote file
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-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.util.ValidatorFileUniqueName;
-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.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", //$NON-NLS-1$
- 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 + ISystemFileConstants.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);
-
- // get existing names
- if (parentFolders != null && parentFolders.length > 0)
- {
- IRemoteFile parentFolder = parentFolders[0];
- nameValidator = new ValidatorFileUniqueName(getShell(),parentFolder,false);
- }
- else
- {
- nameValidator = null;
- }
-
- 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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java
deleted file mode 100644
index 0ea253e80..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [188718] fix error messages showing up as info messages on wizard page
- * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David Dykstal (IBM) [231841] Correcting messages for folder creation
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.wizards;
-
-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.osgi.util.NLS;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.internal.files.ui.Activator;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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"; //$NON-NLS-1$
-
- private class CreateNewFolderJob extends WorkspaceJob
- {
- IRemoteFile parentFolder = null;
- String name = null;
- String absName = null;
- String message = null;
-
- /**
- * CreateNewFileJob job.
- * @param message text used as the title of the job
- */
- public CreateNewFolderJob(IRemoteFile parentFolder, String name, String absName, String message)
- {
- super(message);
- this.parentFolder = parentFolder;
- this.name = name;
- this.absName = absName;
- this.message = message;
- setUser(true);
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor)
- {
- boolean ok = true;
- IStatus status = Status.OK_STATUS;
- SystemMessage msg;
- IRemoteFileSubSystem rfss = parentFolder.getParentRemoteFileSubSystem();
-
- // ok, proceed with actual creation...
- IRemoteFile newFolder = null;
- try
- {
- IRemoteFile newFolderPath = rfss.getRemoteFileObject(absName, monitor);
- newFolder = rfss.createFolder(newFolderPath, monitor);
- }
- catch (RemoteFileIOException exc )
- {
- ok = false;
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String msgTxt = FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST;
- String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS, absName);
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_FOLDER_FAILED_EXIST,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.displayErrorMessage(null, msg);
- }
- catch (RemoteFileSecurityException e)
- {
- ok = false;
- String msgTxt = FileResources.FILEMSG_CREATE_FOLDER_FAILED;
- String msgDetails = FileResources.FILEMSG_CREATE_FOLDER_FAILED_DETAILS;
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_FOLDER_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SystemMessageDialog.displayErrorMessage(null, msg);
- }
- catch (SystemMessageException exc)
- {
- ok = false;
- if (monitor.isCanceled())
- {
- status = Status.CANCEL_STATUS;
- }
- SystemMessageDialog.displayErrorMessage(null, exc.getSystemMessage());
- }
-
- if (ok)
- {
- SystemNewFileWizard.updateGUI(parentFolder, newFolder, getViewer(), isInputAFilter(), getSelectedFilterReference());
- }
-
- return status;
- }
-
- }
-
- /**
- * 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); //$NON-NLS-1$
- }
- }
-
- /**
- * 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);
- 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
- */
- {
- String msgTxt = NLS.bind(FileResources.FILEMSG_FILE_NOTFOUND, parentFolder.getAbsolutePath());
- msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
-
- 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...
- String msgTxt = NLS.bind(FileResources.MSG_CREATEFOLDERGENERIC_PROGRESS, name);
-
- CreateNewFolderJob createNewFolderJob = new CreateNewFolderJob(parentFolder, name, absName, msgTxt);
- createNewFolderJob.schedule();
-
- }
- 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! //$NON-NLS-1$
- {
- if (strings.length > 0 && !filterString.startsWith(parentFolder.getAbsolutePath()))
- {
- if (!filterString.equals("./*")) //DKM - ./ will always meet //$NON-NLS-1$
- {
- meets = false;
- }
- else
- {
- meets = true;
- }
- }
- else
- {
- meets = true;
- }
- }
- }
- }
- if (!meets)
- {
- String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
- String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileConstants.FILEMSG_CREATE_RESOURCE_NOTVISIBLE,
- IStatus.WARNING, msgTxt, msgDetails);
- 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
diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizardMainPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizardMainPage.java
deleted file mode 100644
index cf3d5ed47..000000000
--- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizardMainPage.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Kevin Doyle (IBM) - Changed name Validator to ValidatorFileUniqueName
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [216252] cleaning up system message ids and strings
- * David McKnight (IBM) - [231671] TVT34:TCT171: PLK: No help text for new remote file
- *******************************************************************************/
-
-package org.eclipse.rse.internal.files.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
-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.util.ValidatorFileUniqueName;
-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.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", //$NON-NLS-1$
- FileResources.RESID_NEWFOLDER_PAGE1_TITLE,
- FileResources.RESID_NEWFOLDER_PAGE1_DESCRIPTION);
- // nameValidator = new ValidatorProfileName(RSECorePlugin.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+ISystemFileConstants.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);
- // get existing names
- if (parentFolders != null && parentFolders.length > 0)
- {
- IRemoteFile parentFolder = parentFolders[0];
- nameValidator = new ValidatorFileUniqueName(getShell(),parentFolder, true);
- }
- else
- {
- nameValidator = null;
- }
- 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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/.classpath b/rse/plugins/org.eclipse.rse.importexport/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/.classpath
+++ /dev/null
@@ -1,7 +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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.importexport/.cvsignore b/rse/plugins/org.eclipse.rse.importexport/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.importexport/.project b/rse/plugins/org.eclipse.rse.importexport/.project
deleted file mode 100644
index 51eec03a7..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.importexport</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.importexport/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.importexport/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7fb85b98b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,75 +0,0 @@
-#Fri Feb 06 12:03:25 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-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=warning
-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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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.5
diff --git a/rse/plugins/org.eclipse.rse.importexport/HelpContexts.xml b/rse/plugins/org.eclipse.rse.importexport/HelpContexts.xml
deleted file mode 100644
index 15203023b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/HelpContexts.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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) - [174945] split importexport icons from rse.ui
--->
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<contexts>
-
-<!-- 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>
-
-</contexts> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.importexport/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.importexport/META-INF/MANIFEST.MF
deleted file mode 100644
index c046534b9..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,31 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.importexport; singleton:=true
-Bundle-Version: 1.2.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.importexport.RemoteImportExportPlugin
-Bundle-Localization: plugin
-Export-Package: org.eclipse.rse.internal.importexport;x-internal:=true,
- org.eclipse.rse.internal.importexport.files;x-internal:=true,
- org.eclipse.rse.internal.synchronize;x-internal:=true,
- org.eclipse.rse.internal.synchronize.filesystem;x-internal:=true,
- org.eclipse.rse.internal.synchronize.filesystem.subscriber;x-internal:=true,
- org.eclipse.rse.internal.synchronize.filesystem.ui;x-internal:=true,
- org.eclipse.rse.internal.synchronize.provisional;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.files.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.compare,
- org.eclipse.team.core,
- org.eclipse.team.ui
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/rse/plugins/org.eclipse.rse.importexport/about.html b/rse/plugins/org.eclipse.rse.importexport/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/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 5, 2007</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.importexport/build.properties b/rse/plugins/org.eclipse.rse.importexport/build.properties
deleted file mode 100644
index 4d88b2fcc..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 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) - remove branding plugin files
-###############################################################################
-bin.includes = META-INF/,\
- .,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml
-src.includes = about.html
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_export.gif b/rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_export.gif
deleted file mode 100644
index a13e02f6b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_export.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_import.gif b/rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_import.gif
deleted file mode 100644
index 5709c2ec8..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/icons/full/etool16/file_import.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.importexport/icons/full/wizards/fsicon_wiz.gif b/rse/plugins/org.eclipse.rse.importexport/icons/full/wizards/fsicon_wiz.gif
deleted file mode 100644
index af038fa69..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/icons/full/wizards/fsicon_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/export_wiz.gif b/rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/export_wiz.gif
deleted file mode 100644
index 41a782321..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/export_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/import_wiz.gif b/rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/import_wiz.gif
deleted file mode 100644
index caffb689e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/icons/full/wizban/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.importexport/plugin.properties b/rse/plugins/org.eclipse.rse.importexport/plugin.properties
deleted file mode 100644
index f49c8197a..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/plugin.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - add providerName
-# Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
-# David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# Plugin name
-pluginName = RSE Import/Export
-providerName = Eclipse.org - DSDP
-
-# Remote file import and export wizards
-newWizardCategoryName = Remote Systems
-
-RemoteFileSystemExportWizard.label = Remote file system
-RemoteFileSystemExportWizard.description = Export resources to a remote file system
-RemoteFileSystemImportWizard.label = Remote file system
-RemoteFileSystemImportWizard.description = Import resources from a remote file system
-
-# Remote file export action
-RemoteFileExportAction.label = E&xport to Remote File System
-RemoteFileExportAction.tooltip = Exports resources to a remote file system based on the selected export description file
-
-# Open remote file export wizard
-OpenRemoteFileExport.label = Ope&n Remote File Exporter...
-OpenRemoteFileExport.tooltip = Opens the remote file system export wizard based on the selected export description file
-
-# Remote file import action
-RemoteFileImportAction.label = Import from Remote File System
-RemoteFileImportAction.tooltip = Imports resources from a remote file system based on the selected import description file
-
-# Open remote file import wizard
-OpenRemoteFileImport.label = Ope&n Remote File Importer...
-OpenRemoteFileImport.tooltip = Opens the remote file system import wizard based on the selected import description file
-
-# Import to project
-ImportToProject.label = Import To Project...
-ImportToProject.tooltip = Import contents of selected folder to a project
-
-# Export from project
-ExportFromProject.label = Export From Project...
-ExportFromProject.tooltip = Export contents of project to the selected folder
-
-# Run synchronization
-Synchronize.label = Synchronize with ...
-Synchronize.tooltip = Synchronize contents in local with remote
-
-RSESyncParticipant.name = RSE Synchronize \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.importexport/plugin.xml b/rse/plugins/org.eclipse.rse.importexport/plugin.xml
deleted file mode 100644
index 05b0d9e92..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/plugin.xml
+++ /dev/null
@@ -1,259 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2002, 2009 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:
-David McKnight (IBM) - [261019] New File/Folder actions available in Work Offline mode
-Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization (adapted from org.eclipse.team.examples.filesystem / plugin.xml)
-David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
--->
-
-<?eclipse version="3.0"?>
-<plugin>
-
-<!-- ========================================================================= -->
-<!-- Remote File System import and export wizards. -->
-<!-- ========================================================================= -->
- <extension point="org.eclipse.ui.importWizards">
- <category name="%newWizardCategoryName" id="org.eclipse.rse.importexport.importWizards">
- </category>
- <wizard
- name="%RemoteFileSystemImportWizard.label"
- icon="icons/full/etool16/file_import.gif"
- category="org.eclipse.rse.importexport.importWizards"
- class="org.eclipse.rse.internal.importexport.files.RemoteImportWizard"
- id="org.eclipse.rse.files.importexport.fileImportWizard">
- <description>
- %RemoteFileSystemImportWizard.description
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- nameFilter="*.rimpfd"
- id="org.eclipse.rse.files.importexport.runFileImport">
- <action
- label="%RemoteFileImportAction.label"
- tooltip="%RemoteFileImportAction.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileImportActionDelegate"
- menubarPath="additions"
- enablesFor="+"
- id="importRemoteFiles">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- nameFilter="*.rimpfd"
- id="org.eclipse.rse.files.importexport.openFileImport">
- <action
- label="%OpenRemoteFileImport.label"
- tooltip="%OpenRemoteFileImport.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileOpenImportWizardActionDelegate"
- menubarPath="additions"
- enablesFor="1"
- id="openRemoteFileImport">
- </action>
- </objectContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.exportWizards">
-
- <category name="%newWizardCategoryName" id="org.eclipse.rse.importexport.exportWizards">
- </category>
- <wizard
- name="%RemoteFileSystemExportWizard.label"
- icon="icons/full/etool16/file_export.gif"
- category="org.eclipse.rse.importexport.exportWizards"
- class="org.eclipse.rse.internal.importexport.files.RemoteExportWizard"
- id="org.eclipse.rse.files.importexport.fileExportWizard">
- <description>
- %RemoteFileSystemExportWizard.description
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- nameFilter="*.rexpfd"
- id="org.eclipse.rse.files.importexport.runFileExport">
- <action
- label="%RemoteFileExportAction.label"
- tooltip="%RemoteFileExportAction.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileExportActionDelegate"
- menubarPath="additions"
- enablesFor="+"
- id="exportRemoteFiles">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- nameFilter="*.rexpfd"
- id="org.eclipse.rse.files.importexport.openFileExport">
- <action
- label="%OpenRemoteFileExport.label"
- tooltip="%OpenRemoteFileExport.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileOpenExportWizardActionDelegate"
- menubarPath="additions"
- enablesFor="1"
- id="openRemoteFileExport">
- </action>
- </objectContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"
- id="org.eclipse.rse.files.importexport.projectImportExport">
- <filter name="isDirectory" value="true"/>
-
- <action
- label="%ImportToProject.label"
- tooltip="%ImportToProject.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileImportToProjectActionDelegate"
- menubarPath="group.importexport"
- enablesFor="1"
- id="importToProject">
- <enablement>
- <objectState name="offline" value="false"/>
- </enablement>
- </action>
-
- <action
- label="%ExportFromProject.label"
- tooltip="%ExportFromProject.tooltip"
- class="org.eclipse.rse.internal.importexport.files.RemoteFileExportFromProjectActionDelegate"
- menubarPath="group.importexport"
- enablesFor="1"
- id="exportFromProject">
- <enablement>
- <objectState name="offline" value="false"/>
- </enablement>
- </action>
- </objectContribution>
- </extension>
-
- <!-- ======================================= -->
- <!-- Synchronize Popup Menu Actions -->
- <!-- ======================================= -->
-<!-- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"
- nameFilter="*.rexpfd"
- id="org.rse.synchronize.runResynchronization">
- <action
- label="ReSynchronize with"
- tooltip="Rerun synchronization which is alreay mapped to remote"
- class="org.eclipse.rse.internal.synchronize.ResynchronizeActionDelegate"
- menubarPath="additions"
- enablesFor="1"
- id="resynchronize">
- </action>
- </objectContribution>
- </extension>
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"
- nameFilter="*.rimpfd"
- id="org.rse.synchronize.runResynchronization">
- <action
- label="ReSynchronize with"
- tooltip="Rerun synchronization which is alreay mapped to remote"
- class="org.eclipse.rse.internal.synchronize.ResynchronizeActionDelegate"
- menubarPath="additions"
- enablesFor="1"
- id="resynchronize">
- </action>
- </objectContribution>
- </extension>-->
-<!-- =================================================================================== -->
-<!-- Repository Providers -->
-<!-- =================================================================================== -->
-
-<extension point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider"
- id="org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider">
- </repository>
-</extension>
-
-<!-- =================================================================================== -->
-<!-- Synchronize Participants -->
-<!-- =================================================================================== -->
-
- <extension
- point="org.eclipse.team.ui.synchronizeParticipants">
- <participant
- persistent="false"
- class="org.eclipse.rse.internal.synchronize.filesystem.ui.FileSystemSynchronizeParticipant"
- icon="icons/full/wizards/fsicon_wiz.gif"
- name="%RSESyncParticipant.name"
- id="org.eclipse.rse.internal.synchronize.filesystem.participant"/>
- </extension>
-
-<!-- =================================================================================== -->
-<!-- Common Navigator viewer for the file systen synchronizations -->
-<!-- =================================================================================== -->
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewer
- viewerId="org.eclipse.rse.internal.synchronize.filesystem.syncViewer">
- <popupMenu
- allowsPlatformContributions="false"
- id="org.eclipse.rse.synchronize.filesystem.syncViewer#PopupMenu">
- <insertionPoint name="file"/>
- <insertionPoint name="edit"/>
- <insertionPoint name="synchronize"/>
- <insertionPoint
- name="navigate"
- separator="true"/>
- <insertionPoint
- name="merge"
- separator="true"/>
- <insertionPoint
- name="put"
- separator="false"/>
- <insertionPoint
- name="get"
- separator="false"/>
- <insertionPoint
- name="overwrite"
- separator="true"/>
- <insertionPoint
- name="other"
- separator="true"/>
- <insertionPoint
- name="sort"
- separator="true"/>
- <insertionPoint
- name="additions"
- separator="true"/>
- <insertionPoint
- name="properties"
- separator="true"/>
- </popupMenu>
- </viewer>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/IRemoteImportExportConstants.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/IRemoteImportExportConstants.java
deleted file mode 100644
index a38c7f90b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/IRemoteImportExportConstants.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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 McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport;
-
-/**
- * Interface containing contstants required for import and export.
- */
-public interface IRemoteImportExportConstants {
- /**
- * Remote file import description file extension, "rimpfd".
- */
- public static final String REMOTE_FILE_IMPORT_DESCRIPTION_FILE_EXTENSION = "rimpfd"; //$NON-NLS-1$
- /**
- * An array of import description file extensions.
- */
- public static final String[] REMOTE_IMPORT_DESCRIPTION_FILE_EXTENSIONS = { REMOTE_FILE_IMPORT_DESCRIPTION_FILE_EXTENSION };
- /**
- * Remote file export description file extension, "rexpfd".
- */
- public static final String REMOTE_FILE_EXPORT_DESCRIPTION_FILE_EXTENSION = "rexpfd"; //$NON-NLS-1$
- /**
- * Remote jar export description file extension, "rmtjardesc".
- */
- public static final String REMOTE_JAR_EXPORT_DESCRIPTION_FILE_EXTENSION = "rmtjardesc"; //$NON-NLS-1$
- /**
- * An array of export description file extensions.
- */
- public static final String[] REMOTE_EXPORT_DESCRIPTION_FILE_EXTENSIONS = { REMOTE_FILE_EXPORT_DESCRIPTION_FILE_EXTENSION, REMOTE_JAR_EXPORT_DESCRIPTION_FILE_EXTENSION };
-
-
- // message ids
- // -------------------------
- // 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$
-
- // 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$
-
-
- public static final String FILEMSG_CREATE_FOLDER_FAILED = "RSEF1304"; //$NON-NLS-1$
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportDescriptionFilesViewerFilter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportDescriptionFilesViewerFilter.java
deleted file mode 100644
index 11d9c1974..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportDescriptionFilesViewerFilter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- * This class defines a viewer filter that can be used with a selection dialog, e.g. <code>ElementTreeSelectionDialog</code>.
- * The viewer filter only allows description files for import/export. Current known extensions are defined
- * in class <code>RemoteFileImportExportConstants</code>.
- */
-public class RemoteImportExportDescriptionFilesViewerFilter extends ViewerFilter {
- /**
- * Constant indicating descriptor files for both import and export should be allowed.
- */
- public static final int IMPORT_EXPORT = 0;
- /**
- * Constant indicating that only descriptor files for imports should be allowed.
- */
- public static final int IMPORT_ONLY = 1;
- /**
- * Constant indicating that only descriptor files for exports should be allowed.
- */
- public static final int EXPORT_ONLY = 2;
- private int mode;
-
- /**
- * Constructor.
- * @param mode the mode. One of <code>IMPORT_EXPORT</code>, <code>IMPORT_ONLY</code>, or <code>EXPORT_ONLY</code>.
- */
- public RemoteImportExportDescriptionFilesViewerFilter(int mode) {
- Assert.isLegal((mode == IMPORT_EXPORT) || (mode == IMPORT_ONLY) || (mode == EXPORT_ONLY));
- this.mode = mode;
- }
-
- /**
- * Allows containers and import/export description files.
- * @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) {
- if (element instanceof IResource) {
- IResource resource = (IResource) element;
- if (resource.getType() == IResource.FILE) {
- String extension = resource.getFileExtension();
- if (extension == null || extension.equals("")) { //$NON-NLS-1$
- return false;
- }
- switch (mode) {
- case IMPORT_EXPORT:
- return (contains(IRemoteImportExportConstants.REMOTE_IMPORT_DESCRIPTION_FILE_EXTENSIONS, extension) || contains(
- IRemoteImportExportConstants.REMOTE_EXPORT_DESCRIPTION_FILE_EXTENSIONS, extension));
- case IMPORT_ONLY:
- return contains(IRemoteImportExportConstants.REMOTE_IMPORT_DESCRIPTION_FILE_EXTENSIONS, extension);
- case EXPORT_ONLY:
- return contains(IRemoteImportExportConstants.REMOTE_EXPORT_DESCRIPTION_FILE_EXTENSIONS, extension);
- // should never be here
- default:
- return false;
- }
- } else {
- return true;
- }
- } else {
- return false;
- }
- }
-
- /**
- * Returns whether an extension exists in an array of extensions.
- * @param extensions an array to extensions.
- * @param extension the extension.
- * @return <code>true</code> if the extension exists in the array of extensions, <code>false</code> otherwise.
- */
- private boolean contains(String[] extensions, String extension) {
- for (int i = 0; i < extensions.length; i++) {
- if (extensions[i].equals(extension)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportPlugin.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportPlugin.java
deleted file mode 100644
index ac50f52f7..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportPlugin.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport;
-
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class RemoteImportExportPlugin extends SystemBasePlugin {
-
- public static final String PLUGIN_ID ="org.eclipse.rse.importexport"; //$NON-NLS-1$
- public static final String HELPPREFIX = "org.eclipse.rse.importexport."; //$NON-NLS-1$
-
- // Icons
- public static final String PREFIX = PLUGIN_ID + "."; //$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_EXPORTWIZARD_ROOT = "export_wiz"; //$NON-NLS-1$
- public static final String ICON_EXPORTWIZARD = ICON_WIZARD_DIR + ICON_EXPORTWIZARD_ROOT + ICON_EXT;
- public static final String ICON_EXPORTWIZARD_ID = PREFIX + ICON_EXPORTWIZARD_ROOT + ICON_BANNER_SUFFIX;
- public static final String ICON_IMPORTWIZARD_ROOT = "import_wiz"; //$NON-NLS-1$
- public static final String ICON_IMPORTWIZARD = ICON_WIZARD_DIR + ICON_IMPORTWIZARD_ROOT + ICON_EXT;
- public static final String ICON_IMPORTWIZARD_ID = PREFIX + ICON_IMPORTWIZARD_ROOT + ICON_BANNER_SUFFIX;
-
- //The shared instance.
- private static RemoteImportExportPlugin plugin;
-
- /**
- * The constructor.
- */
- public RemoteImportExportPlugin() {
- super();
- 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 RemoteImportExportPlugin getDefault() {
- return plugin;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#initializeImageRegistry()
- */
- protected void initializeImageRegistry()
- {
- //SystemElapsedTimer timer = new SystemElapsedTimer();
- //timer.setStartTime();
-
- String path = getIconPath();
- // Wizards...
- putImageInRegistry(ICON_EXPORTWIZARD_ID, path+ICON_EXPORTWIZARD);
- putImageInRegistry(ICON_IMPORTWIZARD_ID, path+ICON_IMPORTWIZARD);
-
- //timer.setEndTime();
- //System.out.println("Time to load images: "+timer);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportProblemDialog.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportProblemDialog.java
deleted file mode 100644
index 86253852e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportProblemDialog.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-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;
-
-/**
- * Overrides <code>ErrorDialog</code> to provide a dialog with
- * the image that corresponds to the <code>IStatus</code>.
- *
- * This behavior should be implemented in the ErrorDialog itself,
- * see: 1GJU7TK: ITPUI:WINNT - DCR: ErrorDialog should not always show the error icon
- * The class can be removed when the above PR is fixed
- *
- * @see org.eclipse.core.runtime.IStatus
- */
-public class RemoteImportExportProblemDialog extends ErrorDialog {
- private Image fImage;
-
- /**
- * Creates a problem dialog.
- *
- * @param parent the shell under which to create this dialog
- * @param title the title to use for this dialog,
- * or <code>null</code> to indicate that the default title should be used
- * @param message the message to show in this dialog,
- * or <code>null</code> to indicate that the error's message should be shown
- * as the primary message
- * @param image the image to be used
- * @param status the error to show to the user
- * @param displayMask the mask to use to filter the displaying of child items,
- * as per <code>IStatus.matches</code>
- * @see org.eclipse.core.runtime.IStatus#matches
- */
- protected RemoteImportExportProblemDialog(Shell parent, String title, String message, Image image, IStatus status, int displayMask) {
- super(parent, title, message, status, displayMask);
- fImage = image;
- }
-
- /*
- * Overrides method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- if (fImage == null) {
- return composite;
- }
- // find the label that contains the image
- Control[] kids = composite.getChildren();
- int childCount = kids.length;
- Label label = null;
- int i = 0;
- while (i < childCount) {
- if (kids[i] instanceof Label) {
- label = (Label) kids[i];
- if (label.getImage() != null) {
- break;
- }
- }
- i++;
- }
- if (i < childCount && label != null) {
- label.setImage(fImage);
- }
- applyDialogFont(composite);
- return composite;
- }
-
- /**
- * Opens a warning dialog to display the given warning. Use this method if the
- * warning object being displayed does not contain child items, or if you
- * wish to display all such items without filtering.
- *
- * @param parent the parent shell of the dialog, or <code>null</code> if none
- * @param title the title to use for this dialog,
- * or <code>null</code> to indicate that the default title should be used
- * @param message the message to show in this dialog,
- * or <code>null</code> to indicate that the error's message should be shown
- * as the primary message
- * @param status the error to show to the user
- * @return the code of the button that was pressed that resulted in this dialog
- * closing. This will be <code>Dialog.OK</code> if the OK button was
- * pressed, or <code>Dialog.CANCEL</code> if this dialog's close window
- * decoration or the ESC key was used.
- */
- public static int open(Shell parent, String title, String message, IStatus status) {
- return open(parent, title, message, status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
- }
-
- /**
- * Opens a dialog to display either an error or warning dialog. Use this method if the
- * status being displayed contains child items <it>and</it> you wish to
- * specify a mask which will be used to filter the displaying of these
- * children. The error dialog will only be displayed if there is at
- * least one child status matching the mask.
- *
- * @param parent the parent shell of the dialog, or <code>null</code> if none
- * @param title the title to use for this dialog,
- * or <code>null</code> to indicate that the default title should be used
- * @param message the message to show in this dialog,
- * or <code>null</code> to indicate that the error's message should be shown
- * as the primary message
- * @param status the error to show to the user
- * @param displayMask the mask to use to filter the displaying of child items,
- * as per <code>IStatus.matches</code>
- * @return the code of the button that was pressed that resulted in this dialog
- * closing. This will be <code>Dialog.OK</code> if the OK button was
- * pressed, or <code>Dialog.CANCEL</code> if this dialog's close window
- * decoration or the ESC key was used.
- * @see org.eclipse.core.runtime.IStatus#matches
- */
- public static int open(Shell parent, String title, String message, IStatus status, int displayMask) {
- Image image;
- Display display = parent.getDisplay();
- if (status == null || status.matches(IStatus.ERROR)) {
- image = display.getSystemImage(SWT.ICON_ERROR);
- } else if (status.matches(IStatus.WARNING)) {
- image = display.getSystemImage(SWT.ICON_WARNING);
- } else {
- image = display.getSystemImage(SWT.ICON_INFORMATION);
- }
- ErrorDialog dialog = new RemoteImportExportProblemDialog(parent, title, message, image, status, displayMask);
- return dialog.open();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.java
deleted file mode 100644
index 80b26ad3d..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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 McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport;
-
-import org.eclipse.osgi.util.NLS;
-
-public class RemoteImportExportResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.importexport.RemoteImportExportResources"; //$NON-NLS-1$
- public static String IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_TITLE;
- public static String IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_MESSAGE;
- public static String IMPORT_EXPORT_ERROR_DESCRIPTION_ABSOLUTE;
- public static String IMPORT_EXPORT_ERROR_DESCRIPTION_EXISTING_CONTAINER;
- public static String IMPORT_EXPORT_ERROR_DESCRIPTION_NO_CONTAINER;
- public static String IMPORT_EXPORT_ERROR_DESCRIPTION_INVALID_EXTENSION;
- public static String IMPORT_EXPORT_ERROR_CREATE_FILES_FAILED;
- public static String IMPORT_EXPORT_ERROR_CREATE_FILE_FAILED;
- public static String IMPORT_EXPORT_EXPORT_ACTION_DELEGATE_TITLE;
- public static String IMPORT_EXPORT_IMPORT_ACTION_DELEGATE_TITLE;
- public static String IMPORT_EXPORT_ERROR_DESCRIPTION_READ;
- public static String IMPORT_EXPORT_ERROR_DESCRIPTION_CLOSE;
- public static String WizardDataTransfer_existsQuestion;
- public static String WizardDataTransfer_overwriteNameAndPathQuestion;
- public static String Question;
-
-
- public static String FILEMSG_COPY_ROOT;
-
- public static String FILEMSG_IMPORT_ERROR;
- public static String FILEMSG_IMPORT_PROBLEMS;
- public static String FILEMSG_IMPORT_SELF;
- public static String FILEMSG_EXPORT_ERROR;
- public static String FILEMSG_EXPORT_PROBLEMS;
- public static String FILEMSG_NOT_WRITABLE;
-
- public static String FILEMSG_TARGET_EXISTS;
- public static String FILEMSG_TARGET_EXISTS_DETAILS;
- public static String FILEMSG_FOLDER_IS_FILE;
- public static String FILEMSG_FOLDER_IS_FILE_DETAILS;
- public static String FILEMSG_DESTINATION_CONFLICTING;
- public static String FILEMSG_DESTINATION_CONFLICTING_DETAILS;
- public static String FILEMSG_SOURCE_IS_FILE;
- public static String FILEMSG_SOURCE_IS_FILE_DETAILS;
- public static String FILEMSG_SOURCE_EMPTY;
- public static String FILEMSG_SOURCE_EMPTY_DETAILS;
- public static String FILEMSG_EXPORT_FAILED;
- public static String FILEMSG_EXPORT_NONE_SELECTED;
- public static String FILEMSG_EXPORT_NONE_SELECTED_DETAILS;
- public static String FILEMSG_DESTINATION_EMPTY;
- public static String FILEMSG_DESTINATION_EMPTY_DETAILS;
- public static String FILEMSG_IMPORT_FAILED;
- public static String FILEMSG_IMPORT_NONE_SELECTED;
- public static String FILEMSG_IMPORT_NONE_SELECTED_DETAILS;
- public static String FILEMSG_IMPORT_FILTERING;
-
- public static String FILEMSG_CREATE_FOLDER_FAILED;
- public static String FILEMSG_CREATE_FOLDER_FAILED_DETAILS;
-
- // file import/export messages
- public static String MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION;
- public static String MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION;
- public static String MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS;
- public static String MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION_DETAILS;
-
-
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, RemoteImportExportResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.properties b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.properties
deleted file mode 100644
index dc7760bd8..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.properties
+++ /dev/null
@@ -1,89 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 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 McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-# Description file messages
-IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_TITLE = Save As
-IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_MESSAGE = Select location and name for the description
-IMPORT_EXPORT_ERROR_DESCRIPTION_ABSOLUTE = Description file path must be absolute (i.e. begins with /)
-IMPORT_EXPORT_ERROR_DESCRIPTION_EXISTING_CONTAINER = The description file location must not be an existing container
-IMPORT_EXPORT_ERROR_DESCRIPTION_NO_CONTAINER = Container for description file does not exist
-IMPORT_EXPORT_ERROR_DESCRIPTION_INVALID_EXTENSION = Description file extension must be ''.{0}''
-
-# Creation failure messages
-IMPORT_EXPORT_ERROR_CREATE_FILES_FAILED = Creation of some files failed. See details for additional information.
-IMPORT_EXPORT_ERROR_CREATE_FILE_FAILED = File creation failed. See details for additional information.
-
-# Description file error messages
-IMPORT_EXPORT_ERROR_DESCRIPTION_READ = Error reading {0}: {1}
-IMPORT_EXPORT_ERROR_DESCRIPTION_CLOSE = Error closing description reader for {0}
-
-# Action delegate
-IMPORT_EXPORT_EXPORT_ACTION_DELEGATE_TITLE = Remote File Export
-IMPORT_EXPORT_IMPORT_ACTION_DELEGATE_TITLE = Remote File Import
-
-#Generic messages
-WizardDataTransfer_existsQuestion = ''{0}'' already exists. Would you like to overwrite it?
-WizardDataTransfer_overwriteNameAndPathQuestion = Overwrite ''{0}'' in folder ''{1}''?
-Question = Question
-
-
-FILEMSG_COPY_ROOT = Can not copy root file system
-
-FILEMSG_IMPORT_ERROR = Unable to import {0}: {1}
-FILEMSG_IMPORT_PROBLEMS = Problems were encountered during import
-
-FILEMSG_IMPORT_SELF = Unable to import {0}
-FILEMSG_EXPORT_ERROR = Error occurred while exporting {0}: {1}
-FILEMSG_EXPORT_PROBLEMS = Problems were encountered during export
-FILEMSG_NOT_WRITABLE = Cannot overwrite file {0}
-
-FILEMSG_TARGET_EXISTS = Target folder does not exist. Would you like to create it?
-FILEMSG_TARGET_EXISTS_DETAILS =Press Yes to create the folder {0}, No to cancel
-
-FILEMSG_FOLDER_IS_FILE =Target folder already exists, as a file
-FILEMSG_FOLDER_IS_FILE_DETAILS=The remote resource {0} already exists, but as a file, not a folder
-
-FILEMSG_DESTINATION_CONFLICTING = Destination folder conflicts with location of {0}
-FILEMSG_DESTINATION_CONFLICTING_DETAILS =You are attempting to export to the local file system, to a location that overlaps the resources being exported.
-
-FILEMSG_SOURCE_IS_FILE = Source is a file, not a folder
-FILEMSG_SOURCE_IS_FILE_DETAILS=The remote resource {0} is a file, but a folder is required<
-
-FILEMSG_SOURCE_EMPTY = Enter or select a source folder
-FILEMSG_SOURCE_EMPTY_DETAILS =You have left the source folder empty, but it must be set to continue.
-
-FILEMSG_EXPORT_FAILED =Export problems
-FILEMSG_EXPORT_NONE_SELECTED = There are no resources currently selected for export
-FILEMSG_EXPORT_NONE_SELECTED_DETAILS =Select resources to be exported and try again
-
-FILEMSG_DESTINATION_EMPTY = Please enter a destination folder
-FILEMSG_DESTINATION_EMPTY_DETAILS = The destination folder is empty. You must select a destination folder.
-
-FILEMSG_IMPORT_FAILED = Import problems
-FILEMSG_IMPORT_NONE_SELECTED = There are no resources currently selected for import
-FILEMSG_IMPORT_NONE_SELECTED_DETAILS = Select resources to be imported and try again
-
-FILEMSG_IMPORT_FILTERING = Filtering selection...;
-
-FILEMSG_CREATE_FOLDER_FAILED = Creation of the folder failed
-FILEMSG_CREATE_FOLDER_FAILED_DETAILS = The folder {0} could not be created because of one of the following reasons:\n- the user does not have enough authority to create the folder\n- the folder name is not valid
-
-
-MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION = Unable to use connection.
-MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS = Please correct, or select alternate connection.
-
-MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION =Unexpected exception received: {0}.
-MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION_DETAILS =Please see error log for details.
-
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportRunnable.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportRunnable.java
deleted file mode 100644
index cdf5a8460..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportRunnable.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * A runnable class that exports from an export description file. Use this class
- * to export in a non-UI thread, by using Display.syncExec() or Display.asyncExec().
- */
-public class RemoteImportExportRunnable implements Runnable {
- // description file
- private IFile file;
- private boolean export;
-
- /**
- * Constrcutor.
- * @param descriptionFile the description file.
- * @param export <code>true</code> to export, otherwise <code>false</code>.
- */
- public RemoteImportExportRunnable(IFile descriptionFile, boolean export) {
- this.file = descriptionFile;
- this.export = export;
- }
-
- /**
- * @see java.lang.Runnable#run()
- */
- public void run() {
- if (export) {
- RemoteImportExportUtil.getInstance().exportFromDescriptionFile(file);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportUtil.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportUtil.java
deleted file mode 100644
index c0f0fa0ea..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/RemoteImportExportUtil.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.internal.importexport.files.RemoteFileExportActionDelegate;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * Utility class for import and export. A singleton class.
- */
-public class RemoteImportExportUtil {
- private static RemoteImportExportUtil instance;
-
- /**
- * Dummy action. Does nothing.
- */
- private class DummyAction extends Action {
- /**
- * Constructor.
- */
- public DummyAction() {
- super();
- }
- }
-
- private RemoteImportExportUtil() {
- }
-
- public static RemoteImportExportUtil getInstance() {
- if (instance == null) {
- instance = new RemoteImportExportUtil();
- }
- return instance;
- }
-
- /**
- * Does an export from a description file. The given description file must exist.
- * @param descriptionFile the export description file.
- */
- public void exportFromDescriptionFile(IFile descriptionFile) {
- Assert.isLegal((descriptionFile != null) && descriptionFile.exists());
- IFile file = descriptionFile;
- String extension = file.getFileExtension();
- if (extension == null || extension.equals("")) { //$NON-NLS-1$
- return;
- }
- if (extension.equals(IRemoteImportExportConstants.REMOTE_FILE_EXPORT_DESCRIPTION_FILE_EXTENSION)) {
- RemoteFileExportActionDelegate action = new RemoteFileExportActionDelegate();
- DummyAction dummy = new DummyAction();
- action.selectionChanged(dummy, new StructuredSelection(file));
- action.run(dummy);
- } else if (extension.equals(IRemoteImportExportConstants.REMOTE_JAR_EXPORT_DESCRIPTION_FILE_EXTENSION)) {
- // TODO
- // CreateRemoteJarActionDelegate action = new CreateRemoteJarActionDelegate();
- // DummyAction dummy = new DummyAction();
- // action.selectionChanged(dummy, new StructuredSelection(file));
- // action.run(dummy);
- }
- }
-
- /**
- * Helper method for case insensitive file systems. Returns
- * an existing resource whose path differs only in case from
- * the given path, or null if no such resource exists.
- */
- public IResource findExistingResourceVariant(IPath target) {
- IWorkspace workspace = SystemBasePlugin.getWorkspace();
- // check if local file system is case sensitive
- boolean isCaseInsensitive = Platform.getOS().equals(Platform.OS_WIN32);
- // if so, we don't need to go any further
- if (!isCaseInsensitive) {
- return null;
- }
- IWorkspaceRoot root = workspace.getRoot();
- IPath result = root.getFullPath();
- IContainer container = root;
- int segmentCount = target.segmentCount();
- for (int i = 0; i < segmentCount; i++) {
- IResource[] children = null;
- if (i != 0) {
- IResource resource = root.findMember(result);
- if ((resource != null) && (resource instanceof IContainer)) {
- container = (IContainer) resource;
- } else {
- return null;
- }
- }
- try {
- children = container.members();
- } catch (CoreException e) {
- SystemBasePlugin.logError("Exception occured trying to get children of " + result, e); //$NON-NLS-1$
- }
- String name = findVariant(target.segment(i), children);
- if (name == null) {
- return null;
- }
- result = result.append(name);
- }
- return root.findMember(result);
- }
-
- /**
- * Searches for a variant of the given target in the list,
- * that differs only in case. Returns the variant from
- * the list if one is found, otherwise returns null.
- * @param target the name.
- * @param list the list of resources that may have the variant
- */
- private String findVariant(String target, IResource[] list) {
- if (list == null) {
- return null;
- }
- // go through list
- for (int i = 0; i < list.length; i++) {
- String name = list[i].getName();
- // see if there is a variant, and if so, return it
- if (target.equalsIgnoreCase(name)) {
- return name;
- }
- }
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.java
deleted file mode 100644
index b5216f8c6..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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 McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * Martin Oberhuber (Wind River) - [185925] Support Platform/Team Synchronization
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SystemImportExportResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.importexport.SystemImportExportResources";//$NON-NLS-1$
-
- // REMOTE FILE EXPORT WIZARD...
- public static String RESID_FILEEXPORT_TITLE;
- public static String RESID_FILEEXPORT_PAGE1_TITLE;
- public static String RESID_FILEEXPORT_PAGE1_DESCRIPTION;
- public static String RESID_FILEEXPORT_DESTINATION_LABEL;
- public static String RESID_FILEEXPORT_DESTINATION_TOOLTIP;
- public static String RESID_FILEEXPORT_DESTINATION_BROWSE_LABEL;
- public static String RESID_FILEEXPORT_DESTINATION_BROWSE_TOOLTIP;
- public static String RESID_FILEEXPORT_REVIEW_LABEL;
- public static String RESID_FILEEXPORT_REVIEW_TOOLTIP;
- public static String RESID_FILEEXPORT_OPTION_OVERWRITE_LABEL;
- public static String RESID_FILEEXPORT_OPTION_OVERWRITE_TOOLTIP;
- public static String RESID_FILEEXPORT_OPTION_CREATEALL_LABEL;
- public static String RESID_FILEEXPORT_OPTION_CREATEALL_TOOLTIP;
- public static String RESID_FILEEXPORT_OPTION_CREATESEL_LABEL;
- public static String RESID_FILEEXPORT_OPTION_CREATESEL_TOOLTIP;
- public static String RESID_FILEEXPORT_OPTION_SETTINGS_LABEL;
- public static String RESID_FILEEXPORT_OPTION_SETTINGS_TOOLTIP;
- public static String RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_LABEL;
- public static String RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_PATH_TOOLTIP;
- public static String RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_BROWSE_LABEL;
- public static String RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_BROWSE_TOOLTIP;
-
- public static String RESID_FILEEXPORT_EXPORTING;
- // REMOTE FILE IMPORT WIZARD...
- public static String RESID_FILEIMPORT_TITLE;
- public static String RESID_FILEIMPORT_PAGE1_TITLE;
- public static String RESID_FILEIMPORT_PAGE1_DESCRIPTION;
- public static String RESID_FILEIMPORT_REVIEW_LABEL;
- public static String RESID_FILEIMPORT_REVIEW_TOOLTIP;
- public static String RESID_FILEIMPORT_OPTION_OVERWRITE_LABEL;
- public static String RESID_FILEIMPORT_OPTION_OVERWRITE_TOOLTIP;
- public static String RESID_FILEIMPORT_OPTION_CREATEALL_LABEL;
- public static String RESID_FILEIMPORT_OPTION_CREATEALL_TOOLTIP;
- public static String RESID_FILEIMPORT_OPTION_CREATESEL_LABEL;
- public static String RESID_FILEIMPORT_OPTION_CREATESEL_TOOLTIP;
- public static String RESID_FILEIMPORT_OPTION_SETTINGS_LABEL;
- public static String RESID_FILEIMPORT_OPTION_SETTINGS_TOOLTIP;
- public static String RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_LABEL;
- public static String RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_PATH_TOOLTIP;
- public static String RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_BROWSE_LABEL;
- public static String RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_BROWSE_TOOLTIP;
- public static String RESID_FILEIMPORT_SOURCE_LABEL;
- public static String RESID_FILEIMPORT_SOURCE_TOOLTIP;
-
- public static String RESID_FILEIMPORT_IMPORTING;
- public static String RESID_FILEIMPEXP_BUTTON_SELECTALL_LABEL;
- public static String RESID_FILEIMPEXP_BUTTON_SELECTALL_TOOLTIP;
- public static String RESID_FILEIMPEXP_BUTTON_DESELECTALL_LABEL;
- public static String RESID_FILEIMPEXP_BUTTON_DESELECTALL_TOOLTIP;
- public static String RESID_FILEIMPEXP_BUTTON_SELECTTYPES_LABEL;
- public static String RESID_FILEIMPEXP_BUTTON_SELECTTYPES_TOOLTIP;
-
- // synchronize actions
- public static String RESID_SYNCHRONIZE_ACTIONS_PUT_LABEL;
- public static String RESID_SYNCHRONIZE_ACTIONS_PUT_ALL_LABEL;
- public static String RESID_SYNCHRONIZE_ACTIONS_GET_LABEL;
- public static String RESID_SYNCHRONIZE_ACTIONS_GET_ALL_LABEL;
- public static String RESID_SYNCHRONIZE_ACTIONS_MERGE_LABEL;
- public static String RESID_SYNCHRONIZE_ACTIONS_MERGE_ALL_LABEL;
-
- public static String RESID_SYNCHRONIZE_DISCONNECT_WARNING;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemImportExportResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties
deleted file mode 100644
index e7e98a2d3..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/SystemImportExportResources.properties
+++ /dev/null
@@ -1,104 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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 McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-# Martin Oberhuber (Wind River) - [185925] Support Platform/Team Synchronization
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-#=============================================================
-# REMOTE FILE EXPORT WIZARD...
-#=============================================================
-RESID_FILEEXPORT_TITLE=Export
-RESID_FILEEXPORT_PAGE1_TITLE=Remote file system
-RESID_FILEEXPORT_PAGE1_DESCRIPTION=Export resources to a remote file system.
-RESID_FILEEXPORT_EXPORTING=Exporting:
-
-RESID_FILEEXPORT_DESTINATION_LABEL=Destination folder, qualified by its remote connection name
-RESID_FILEEXPORT_DESTINATION_TOOLTIP=Select the destination folder by browsing a remote system for it
-
-RESID_FILEEXPORT_DESTINATION_BROWSE_LABEL=Browse...
-RESID_FILEEXPORT_DESTINATION_BROWSE_TOOLTIP=Select the destination folder by browsing a remote system for it
-
-RESID_FILEEXPORT_REVIEW_LABEL=Review/Synchronize
-RESID_FILEEXPORT_REVIEW_TOOLTIP=Review/Synchronize
-
-RESID_FILEEXPORT_OPTION_OVERWRITE_LABEL=Overwrite existing files without warning
-RESID_FILEEXPORT_OPTION_OVERWRITE_TOOLTIP=If a file being exported already exists remotely, replace it without a message
-
-RESID_FILEEXPORT_OPTION_CREATEALL_LABEL=Create directory structure for files
-RESID_FILEEXPORT_OPTION_CREATEALL_TOOLTIP=Create hierarchy (folder) structure in the file system as it exists in the Workbench
-
-RESID_FILEEXPORT_OPTION_CREATESEL_LABEL=Create only selected directories
-RESID_FILEEXPORT_OPTION_CREATESEL_TOOLTIP=Create hierarchy (folder) structure in the file system only for selected folders
-
-RESID_FILEEXPORT_OPTION_SETTINGS_LABEL=Save the settings of this export in the workspace (e.g. /ExportSettings/hello.rexpfd)
-RESID_FILEEXPORT_OPTION_SETTINGS_TOOLTIP=Save the export settings to a description file for quicker export in the future
-
-RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_LABEL=Description file:
-
-RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_PATH_TOOLTIP=Enter the description file path
-
-RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_BROWSE_LABEL=Browse...
-RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_BROWSE_TOOLTIP=Specify the description file by browsing the workspace
-
-
-
-#=============================================================
-# REMOTE FILE IMPORT WIZARD...
-#=============================================================
-RESID_FILEIMPORT_TITLE=Import
-RESID_FILEIMPORT_PAGE1_TITLE=Remote file system
-RESID_FILEIMPORT_PAGE1_DESCRIPTION=Import resources from a remote file system.
-RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_LABEL=Description file:
-RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_PATH_TOOLTIP=Enter the description file path
-RESID_FILEIMPORT_IMPORTING=Importing:
-
-RESID_FILEIMPORT_REVIEW_LABEL=Review/Synchronize
-RESID_FILEIMPORT_REVIEW_TOOLTIP=Review/Synchronize
-
-RESID_FILEIMPORT_OPTION_OVERWRITE_LABEL=Overwrite existing resources without warning
-RESID_FILEIMPORT_OPTION_OVERWRITE_TOOLTIP=If a file being exported already exists remotely, replace it without a message
-
-RESID_FILEIMPORT_OPTION_CREATEALL_LABEL=Create complete folder structure
-RESID_FILEIMPORT_OPTION_CREATEALL_TOOLTIP=Create hierarchy (folder) structure in the Workbench, including parent folders
-
-RESID_FILEIMPORT_OPTION_CREATESEL_LABEL=Create selected folders only
-RESID_FILEIMPORT_OPTION_CREATESEL_TOOLTIP=Create hierarchy (folder) structure in the Workbench
-
-RESID_FILEIMPORT_OPTION_SETTINGS_LABEL=Save the settings of this import in the workspace (e.g. /ImportSettings/hello.rimpfd)
-RESID_FILEIMPORT_OPTION_SETTINGS_TOOLTIP=Save the import settings to a description file for quicker import in the future
-
-RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_BROWSE_LABEL=Browse...
-RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_BROWSE_TOOLTIP=Specify the description file by browsing the workspace
-
-RESID_FILEIMPORT_SOURCE_LABEL=From directory:
-RESID_FILEIMPORT_SOURCE_TOOLTIP=Source folder, qualified by its remote connection name
-
-RESID_FILEIMPEXP_BUTTON_SELECTALL_LABEL=Select All
-RESID_FILEIMPEXP_BUTTON_SELECTALL_TOOLTIP=Select all resources
-
-RESID_FILEIMPEXP_BUTTON_DESELECTALL_LABEL=Deselect All
-RESID_FILEIMPEXP_BUTTON_DESELECTALL_TOOLTIP=De-select all resources
-
-RESID_FILEIMPEXP_BUTTON_SELECTTYPES_LABEL=Select Types
-RESID_FILEIMPEXP_BUTTON_SELECTTYPES_TOOLTIP=Select resource types to subset the selection list by
-
-# synchronize operations
-RESID_SYNCHRONIZE_ACTIONS_PUT_LABEL=Put
-RESID_SYNCHRONIZE_ACTIONS_PUT_ALL_LABEL=Put All
-RESID_SYNCHRONIZE_ACTIONS_GET_LABEL=Get
-RESID_SYNCHRONIZE_ACTIONS_GET_ALL_LABEL=Get All
-RESID_SYNCHRONIZE_ACTIONS_MERGE_LABEL=Merge
-RESID_SYNCHRONIZE_ACTIONS_MERGE_ALL_LABEL=Merge All
-
-
-RESID_SYNCHRONIZE_DISCONNECT_WARNING=This operation will remove previous team provider settings that were set for project {0}. Are you sure you want to do this?
-
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Debug.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Debug.java
deleted file mode 100644
index 6f8af3f6d..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Debug.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-public class Debug {
- //execution time switches
- public static boolean debug = false;
-
- public static void out(String s) {
- if (debug) System.out.println(s);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemElement.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemElement.java
deleted file mode 100644
index 716be831b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemElement.java
+++ /dev/null
@@ -1,233 +0,0 @@
-package org.eclipse.rse.internal.importexport.files;
-
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- *******************************************************************************/
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.WorkbenchAdapter;
-
-// Similar to org.eclipse.ui.dialogs.FileSystemElement
-// Changes: added getName() method
-/**
- * Instances of this class represent files or file-like entities (eg.- zip
- * file entries) on the local file system. They do not represent resources
- * within the workbench. This distinction is made because the representation of
- * a file system resource is significantly different from that of a workbench
- * resource.
- *
- * If self represents a collection (eg.- file system directory, zip directory)
- * then its icon will be the folderIcon static field. Otherwise (ie.- self
- * represents a file system file) self's icon is stored in field "icon", and is
- * determined by the extension of the file that self represents.
- *
- * This class is adaptable, and implements one adapter itself, namely the
- * IWorkbenchAdapter adapter used for navigation and display in the workbench.
- */
-public class FileSystemElement implements IAdaptable {
- private String name;
- private Object fileSystemObject;
- /* Wait until a child is added to initialize the receiver's lists.
- * Doing so minimizes the amount of memory that is allocated when
- * a large directory structure is being processed.
- */
- private AdaptableList folders = null;
- private AdaptableList files = null;
- private boolean isDirectory = false;
- private FileSystemElement parent;
- private final static AdaptableList EMPTY_LIST = new AdaptableList(0);
- private WorkbenchAdapter workbenchAdapter = new WorkbenchAdapter() {
- /**
- * Answer the children property of this element
- */
- public Object[] getChildren(Object o) {
- return getFolders().getChildren(o);
- }
-
- /**
- * Returns the parent of this element
- */
- public Object getParent(Object o) {
- return parent;
- }
-
- /**
- * Returns an appropriate label for this file system element.
- */
- public String getLabel(Object o) {
- return name;
- }
-
- /**
- * Returns an image descriptor for this file system element
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- if (isDirectory()) {
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- } else {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(name);
- }
- }
- };
-
- /**
- * Creates a new <code>FileSystemElement</code> and initializes it
- * and its parent if applicable.
- *
- * @param name java.lang.String
- */
- public FileSystemElement(String name, FileSystemElement parent, boolean isDirectory) {
- this.name = name;
- this.parent = parent;
- this.isDirectory = isDirectory;
- if (parent != null) parent.addChild(this);
- }
-
- /**
- * Adds the passed child to this object's collection of children.
- *
- * @param child FileSystemElement
- */
- public void addChild(FileSystemElement child) {
- if (child.isDirectory()) {
- if (folders == null) folders = new AdaptableList(1);
- folders.add(child);
- } else {
- if (files == null) files = new AdaptableList(1);
- files.add(child);
- }
- }
-
- /**
- * Returns the adapter
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) {
- return workbenchAdapter;
- }
- //defer to the platform
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /**
- * Returns the extension of this element's filename. Returns
- * The empty string if there is no extension.
- */
- public String getFileNameExtension() {
- int lastDot = name.lastIndexOf('.');
- return lastDot < 0 ? "" : name.substring(lastDot + 1); //$NON-NLS-1$
- }
-
- /**
- * Answer the files property of this element. Answer an empty list if the
- * files property is null.
- * This method should not be used to add children
- * to the receiver. Use addChild(FileSystemElement) instead.
- */
- public AdaptableList getFiles() {
- if (files == null) return EMPTY_LIST;
- return files;
- }
-
- /**
- * Returns the file system object property of this element
- *
- * @return the file system object
- */
- public Object getFileSystemObject() {
- return fileSystemObject;
- }
-
- /**
- * Returns a list of the folders that are immediate children
- * of this folder. Answer an empty list if the folders property is null.
- * This method should not be used to add children
- * to the receiver. Use addChild(FileSystemElement) instead.
- */
- public AdaptableList getFolders() {
- if (folders == null) return EMPTY_LIST;
- return folders;
- }
-
- /**
- * Returns the name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Return the parent of this element.
- *
- * @return the parent file system element, or <code>null</code> if this is the root
- */
- public FileSystemElement getParent() {
- return this.parent;
- }
-
- /**
- * Returns true if this element represents a directory, and false
- * otherwise.
- */
- public boolean isDirectory() {
- return isDirectory;
- }
-
- /**
- * Removes a sub-folder from this file system element.
- */
- public void removeFolder(FileSystemElement child) {
- if (folders == null) return;
- folders.remove(child);
- child.setParent(null);
- }
-
- /**
- * Set the file system object property of this element
- *
- * @param value the file system object
- */
- public void setFileSystemObject(Object value) {
- fileSystemObject = value;
- }
-
- /**
- * Sets the parent of this file system element.
- */
- public void setParent(FileSystemElement element) {
- parent = element;
- }
-
- /**
- * For debugging purposes only.
- */
- public String toString() {
- StringBuffer buf = new StringBuffer();
- if (isDirectory()) {
- buf.append("Folder(");//$NON-NLS-1$
- } else {
- buf.append("File(");//$NON-NLS-1$
- }
- buf.append(name).append(")");//$NON-NLS-1$
- if (!isDirectory()) {
- return buf.toString();
- }
- buf.append(" folders: ");//$NON-NLS-1$
- buf.append(folders);
- buf.append(" files: ");//$NON-NLS-1$
- buf.append(files);
- return buf.toString();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemStructureProvider.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemStructureProvider.java
deleted file mode 100644
index e9c1b14e7..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/FileSystemStructureProvider.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.rse.internal.importexport.files;
-
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- *******************************************************************************/
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-// Similar to org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider
-// Changes marked with "IFS:" comments.
-/**
- * This class provides information regarding the structure and
- * content of specified file system File objects.
- */
-public class FileSystemStructureProvider implements IImportStructureProvider {
- /**
- * Holds a singleton instance of this class.
- */
- public final static FileSystemStructureProvider INSTANCE = new FileSystemStructureProvider();
-
- /**
- * Creates an instance of <code>FileSystemStructureProvider</code>.
- */
- public FileSystemStructureProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * Method declared on IImportStructureProvider
- */
- public List getChildren(Object element) {
- List result = new ArrayList(0);
- try {
- String[] children = ((File) element).list();
- int childrenLength = children == null ? 0 : children.length;
- result = new ArrayList(childrenLength);
- long start = System.currentTimeMillis();
- // String p=((UniFilePlus)element).getAbsolutePath()+"/"; //$NON-NLS-1$
- // IHost sysC=((UniFilePlus) element).remoteFile.getSystemConnection();
- IRemoteFile[] childIRemoteFiles = ((UniFilePlus) element).listIRemoteFiles();
- for (int i = 0; i < childrenLength; i++)
- result.add(new UniFilePlus(childIRemoteFiles[i]));
- Debug.out("Expanding [" + ((File) element).getPath() + "] took in (ms): " + (System.currentTimeMillis() - start)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (Exception e) {
- // Probably caused by IFS authority problem
- // ignore for now
- }
- return result;
- }
-
- /* (non-Javadoc)
- * Method declared on IImportStructureProvider
- */
- public InputStream getContents(Object element) {
- try {
- return new FileInputStream((File) element);
- } catch (FileNotFoundException e) {
- return null;
- }
- }
-
- /* (non-Javadoc)
- * Method declared on IImportStructureProvider
- */
- public String getFullPath(Object element) {
- return ((File) element).getPath();
- }
-
- /* (non-Javadoc)
- * Method declared on IImportStructureProvider
- */
- public String getLabel(Object element) {
- //Get the name - if it is empty then return the path as it is a file root
- File file = (File) element;
- String name = file.getName();
- if (name == null || name.length() == 0)
- return file.getPath();
- else
- return name;
- }
-
- /* (non-Javadoc)
- * Method declared on IImportStructureProvider
- */
- public boolean isFolder(Object element) {
- return ((File) element).isDirectory();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IImportStructureProvider.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IImportStructureProvider.java
deleted file mode 100644
index 0500efe61..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IImportStructureProvider.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.rse.internal.importexport.files;
-
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- *******************************************************************************/
-import java.io.InputStream;
-import java.util.List;
-
-// Similar to org.eclipse.ui.wizards.datatransfer.IImportStructureProvider
-// Basically unchanged.
-/**
- * Interface which can provide structure and content information
- * for an element (for example, a file system element).
- * Used by the import wizards to abstract the commonalities
- * between importing from the file system and importing from an archive.
- */
-public interface IImportStructureProvider {
- /**
- * Returns a collection with the children of the specified structured element.
- */
- List getChildren(Object element);
-
- /**
- * Returns the contents of the specified structured element, or
- * <code>null</code> if there is a problem determining the element's
- * contents.
- *
- * @param element a structured element
- * @return the contents of the structured element, or <code>null</code>
- */
- InputStream getContents(Object element);
-
- /**
- * Returns the full path of the specified structured element.
- *
- * @param element a structured element
- * @return the display label of the structured element
- */
- String getFullPath(Object element);
-
- /**
- * Returns the display label of the specified structured element.
- *
- * @param element a structured element
- * @return the display label of the structured element
- */
- String getLabel(Object element);
-
- /**
- * Returns a boolean indicating whether the passed structured element represents
- * a container element (as opposed to a leaf element).
- *
- * @return boolean
- * @param element java.lang.Object
- */
- boolean isFolder(Object element);
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionReader.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionReader.java
deleted file mode 100644
index 64fbc638f..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionReader.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An interface for remote file export description reader.
- */
-public interface IRemoteFileExportDescriptionReader {
- public void read(RemoteFileExportData exportData) throws CoreException;
-
- public void close() throws CoreException;
-
- public IStatus getStatus();
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionWriter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionWriter.java
deleted file mode 100644
index 8b5f57f45..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileExportDescriptionWriter.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An interface for remote file export description writer.
- */
-public interface IRemoteFileExportDescriptionWriter {
- public void write(RemoteFileExportData exportData) throws CoreException;
-
- public void close() throws CoreException;
-
- public IStatus getStatus();
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionReader.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionReader.java
deleted file mode 100644
index b377f3c6f..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionReader.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An interface for remote file import description reader.
- */
-public interface IRemoteFileImportDescriptionReader {
- public void read(RemoteFileImportData importData) throws CoreException;
-
- public void close() throws CoreException;
-
- public IStatus getStatus();
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionWriter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionWriter.java
deleted file mode 100644
index f6faac314..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/IRemoteFileImportDescriptionWriter.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An interface for remote file import description writer.
- */
-public interface IRemoteFileImportDescriptionWriter {
- public void write(RemoteFileImportData importData) throws CoreException;
-
- public void close() throws CoreException;
-
- public IStatus getStatus();
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/MinimizedFileSystemElement.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/MinimizedFileSystemElement.java
deleted file mode 100644
index 54b438993..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/MinimizedFileSystemElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.eclipse.rse.internal.importexport.files;
-
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * David McKnight (IBM) - [219792] use background query when doing import
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-import org.eclipse.ui.model.AdaptableList;
-
-// Similar to org.eclipse.ui.wizards.datatransfer.MinimizedFileSystemElement
-// Changes marked with "IFS:" comments.
-/**
- * The <code>MinimizedFileSystemElement</code> is a <code>FileSystemElement</code> that knows
- * if it has been populated or not.
- */
-// IFS: made class public
-public class MinimizedFileSystemElement extends FileSystemElement {
- private boolean populated = false;
-
- /**
- * Create a <code>MinimizedFileSystemElement</code> with the supplied name and parent.
- * @param name the name of the file element this represents
- * @param parent the containing parent
- * @param isDirectory indicated if this could have children or not
- */
- public MinimizedFileSystemElement(String name, FileSystemElement parent, boolean isDirectory) {
- super(name, parent, isDirectory);
- }
-
- /**
- * Returns a list of the files that are immediate children. Use the supplied provider
- * if it needs to be populated.
- * of this folder.
- */
- public AdaptableList getFiles(IImportStructureProvider provider) {
- return super.getFiles();
- }
-
- /**
- * Returns a list of the folders that are immediate children. Use the supplied provider
- * if it needs to be populated.
- * of this folder.
- */
- public AdaptableList getFolders(IImportStructureProvider provider) {
- return super.getFolders();
- }
-
- public void setPopulated(boolean populated) {
- this.populated = populated;
- }
-
- public boolean isPopulated() {
- return populated;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizard.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizard.java
deleted file mode 100644
index 239a5cd08..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizard.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [174945] split importexport icons from rse.ui
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * Standard workbench wizard for exporting resources from the workspace to the
- * local file system.
- * <p>
- * This class may be instantiated and used without further configuration.
- * </p>
- * <p>
- * Example:
- *
- * <pre>
- * IWizard wizard = new RemoteExportWizard();
- * wizard.init(workbench, selection);
- * WizardDialog dialog = new WizardDialog(shell, wizard);
- * dialog.open();
- * </pre>
- *
- * During the call to <code>open</code>, the wizard dialog is presented to
- * the user. When the user hits Finish, the user-selected workspace resources
- * are exported to the user-specified location in the local file system, the
- * dialog closes, and the call to <code>open</code> returns.
- * </p>
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RemoteExportWizard extends AbstractSystemWizard implements IExportWizard {
- private IStructuredSelection selection;
- private RemoteExportWizardPage1 mainPage;
- private RemoteFileExportData exportData;
- private boolean initializeFromExportData;
-
- /**
- * Creates a wizard for exporting workspace resources to the local file system.
- */
- public RemoteExportWizard() {
- IDialogSettings workbenchSettings = RemoteImportExportPlugin.getDefault().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("RemoteExportWizard"); //$NON-NLS-1$
- if (section == null) section = workbenchSettings.addNewSection("RemoteExportWizard"); //$NON-NLS-1$
- setDialogSettings(section);
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public void addPages() {
- mainPage = new RemoteExportWizardPage1(selection);
- addPage(mainPage);
- }
-
- /**
- * Returns the image descriptor with the given key.
- */
- private ImageDescriptor getImageDescriptor(String key) {
- return RemoteImportExportPlugin.getDefault().getImageDescriptor(key);
- }
-
- /* (non-Javadoc)
- * Method declared on IWorkbenchWizard.
- */
- public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
- // make it the current selection by default but look it up otherwise
- this.selection = currentSelection;
- if (currentSelection.isEmpty() && workbench.getActiveWorkbenchWindow() != null) {
- IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
- if (page != null) {
- IEditorPart currentEditor = page.getActiveEditor();
- if (currentEditor != null) {
- Object selectedResource = currentEditor.getEditorInput().getAdapter(IResource.class);
- if (selectedResource != null) selection = new StructuredSelection(selectedResource);
- }
- }
- }
- setInitializeFromExportData(false);
- setWindowTitle(SystemImportExportResources.RESID_FILEEXPORT_TITLE);
- setDefaultPageImageDescriptor(getImageDescriptor(RemoteImportExportPlugin.ICON_EXPORTWIZARD_ID));
- setNeedsProgressMonitor(true);
- }
-
- public void init(IWorkbench workbench, RemoteFileExportData exportData) {
- this.selection = new StructuredSelection(exportData.getElements().toArray());
- this.exportData = exportData;
- setInitializeFromExportData(true);
- setWindowTitle(SystemImportExportResources.RESID_FILEEXPORT_TITLE);
- setDefaultPageImageDescriptor(getImageDescriptor(RemoteImportExportPlugin.ICON_EXPORTWIZARD_ID));
- setNeedsProgressMonitor(true);
- }
-
- protected void setInitializeFromExportData(boolean init) {
- this.initializeFromExportData = init;
- }
-
- public boolean getInitializeFromExportData() {
- return initializeFromExportData;
- }
-
- public RemoteFileExportData getExportData() {
- return exportData;
- }
-
- /**
- * Method declared on IWizard.
- */
- public boolean performFinish() {
- return mainPage.finish();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java
deleted file mode 100644
index f665b41eb..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java
+++ /dev/null
@@ -1,985 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
-import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.SynchronizeData;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.Synchronizer;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.messages.SystemMessageLine;
-import org.eclipse.rse.ui.wizards.ISystemWizardPage;
-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.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.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.dialogs.SaveAsDialog;
-import org.eclipse.ui.dialogs.WizardExportResourcesPage;
-
-/**
- * Page 1 of the base resource export-to-file-system Wizard
- *
- * 040510 AR Fix "Create folder" question. Previous fix changed the way we were
- * asking user if they wanted target folder created, to use RSE
- * widgets. But introduced error.
- */
-class RemoteExportWizardPage1 extends WizardExportResourcesPage implements Listener, ISystemWizardPage {
- private Object destinationFolder = null;
- private String helpId;
- private Composite parentComposite;
- private SystemMessageLine msgLine;
- private SystemMessage pendingMessage, pendingErrorMessage;
- // widgets
- private Combo destinationNameField;
- private Button destinationBrowseButton;
- protected Button reviewSynchronizeCheckbox;
- protected Button overwriteExistingFilesCheckbox;
- protected Button createDirectoryStructureButton;
- protected Button createSelectionOnlyButton;
- protected Button saveSettingsButton;
- protected Label descFilePathLabel;
- protected Text descFilePathField;
- protected Button descFileBrowseButton;
- // input object
- protected Object inputObject = null;
- // constants
- private static final int MY_SIZING_TEXT_FIELD_WIDTH = 250;
- // dialog store id constants
- private static final String STORE_DESTINATION_NAMES_ID = "RemoteExportWizard.STORE_DESTINATION_NAMES_ID"; //$NON-NLS-1$
- private static final String STORE_REVIEW_SYNCHRONIZE_ID = "RemoteExportWizard.STORE_REVIEW_SYNCHRONIZE_ID"; //$NON-NLS-1$
- private static final String STORE_OVERWRITE_EXISTING_FILES_ID = "RemoteExportWizard.STORE_OVERWRITE_EXISTING_FILES_ID"; //$NON-NLS-1$
- private static final String STORE_CREATE_STRUCTURE_ID = "RemoteExportWizard.STORE_CREATE_STRUCTURE_ID"; //$NON-NLS-1$
- private static final String STORE_CREATE_DESCRIPTION_FILE_ID = "RemoteExportWizard.STORE_CREATE_DESCRIPTION_FILE_ID"; //$NON-NLS-1$
- private static final String STORE_DESCRIPTION_FILE_NAME_ID = "RemoteExportWizard.STORE_DESCRIPTION_FILE_NAME_ID"; //$NON-NLS-1$
- //messages
- private static final SystemMessage DESTINATION_EMPTY_MESSAGE = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_DESTINATION_EMPTY,
- IStatus.ERROR,
- RemoteImportExportResources.FILEMSG_DESTINATION_EMPTY,
- RemoteImportExportResources.FILEMSG_DESTINATION_EMPTY_DETAILS);
-
-
- /**
- * Create an instance of this class
- */
- protected RemoteExportWizardPage1(String name, IStructuredSelection selection) {
- super(name, selection);
- setInputObject(selection);
- }
-
- /**
- * Create an instance of this class
- */
- public RemoteExportWizardPage1(IStructuredSelection selection) {
- this("fileSystemExportPage1", selection); //$NON-NLS-1$
- setTitle(SystemImportExportResources.RESID_FILEEXPORT_PAGE1_TITLE);
- setDescription(SystemImportExportResources.RESID_FILEEXPORT_PAGE1_DESCRIPTION);
- }
-
- /**
- * Add the passed value to self's destination widget's history
- *
- * @param value java.lang.String
- */
- protected void addDestinationItem(String value) {
- destinationNameField.add(value);
- }
-
- /** (non-Javadoc)
- * Method declared on IDialogPage.
- */
- public void createControl(Composite parent) {
- parentComposite = new Composite(parent, SWT.NONE);
- parentComposite.setLayout(new GridLayout(1, false));
- parentComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
- super.createControl(parentComposite);
- msgLine = new SystemMessageLine(parentComposite);
- msgLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
- if (pendingMessage != null) setMessage(pendingMessage);
- if (pendingErrorMessage != null) setErrorMessage(pendingErrorMessage);
- giveFocusToDestination();
- SystemWidgetHelpers.setWizardPageMnemonics(parentComposite);
- if (helpId != null) {
- SystemWidgetHelpers.setHelp(parentComposite, helpId);
- } else {
- SystemWidgetHelpers.setHelp(parentComposite, RemoteImportExportPlugin.HELPPREFIX + "import_context"); //$NON-NLS-1$
- }
- setControl(parentComposite);
- // super.createControl(parent);
- // parentComposite = parent;
- // giveFocusToDestination();
- // SystemWidgetHelpers.setHelp(getControl(), RemoteImportExportPlugin.HELPPREFIX + "export_context");
- // Control c = getControl();
- // if (c instanceof Composite)
- // {
- // SystemWidgetHelpers.setWizardPageMnemonics((Composite)c);
- // parentComposite = (Composite)c;
- // if (helpId != null)
- // SystemWidgetHelpers.setHelp(parentComposite, helpId);
- // }
- // else if (c instanceof Button)
- // {
- // Mnemonics ms = new Mnemonics();
- // ms.setMnemonic((Button)c);
- // }
- // configureMessageLine();
- }
-
- /**
- * Create the export destination specification widgets
- *
- * @param parent org.eclipse.swt.widgets.Composite
- */
- protected void createDestinationGroup(Composite parent) {
- // destination specification group
- Composite destinationSelectionGroup = SystemWidgetHelpers.createComposite(parent, 3);
- ((GridData) destinationSelectionGroup.getLayoutData()).verticalAlignment = GridData.FILL;
- destinationNameField = SystemWidgetHelpers.createLabeledReadonlyCombo(destinationSelectionGroup, null, SystemImportExportResources.RESID_FILEEXPORT_DESTINATION_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_DESTINATION_TOOLTIP);
- ((GridData) destinationNameField.getLayoutData()).widthHint = MY_SIZING_TEXT_FIELD_WIDTH;
- ((GridData) destinationNameField.getLayoutData()).grabExcessHorizontalSpace = true;
- destinationNameField.addListener(SWT.Modify, this);
- destinationNameField.addListener(SWT.Selection, this);
- // destination browse button
- destinationBrowseButton = SystemWidgetHelpers.createPushButton(destinationSelectionGroup, null, SystemImportExportResources.RESID_FILEEXPORT_DESTINATION_BROWSE_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_DESTINATION_BROWSE_TOOLTIP);
- ((GridData) destinationBrowseButton.getLayoutData()).grabExcessHorizontalSpace = false;
- destinationBrowseButton.addListener(SWT.Selection, this);
- new Label(parent, SWT.NONE); // vertical spacer
- }
-
- /**
- * Create the export options specification widgets.
- * @param optionsGroup the group into which the option buttons will be placed
- */
- protected void createOptionsGroupButtons(Group optionsGroup) {
- reviewSynchronizeCheckbox = SystemWidgetHelpers.createCheckBox(optionsGroup, 1, null, SystemImportExportResources.RESID_FILEEXPORT_REVIEW_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_REVIEW_TOOLTIP);
- reviewSynchronizeCheckbox.addListener(SWT.Selection, this);
- overwriteExistingFilesCheckbox = SystemWidgetHelpers.createCheckBox(optionsGroup, 1, null, SystemImportExportResources.RESID_FILEEXPORT_OPTION_OVERWRITE_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_OPTION_OVERWRITE_TOOLTIP);
- createDirectoryStructureButton = SystemWidgetHelpers.createRadioButton(optionsGroup, null, SystemImportExportResources.RESID_FILEEXPORT_OPTION_CREATEALL_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_OPTION_CREATEALL_TOOLTIP);
- createSelectionOnlyButton = SystemWidgetHelpers.createRadioButton(optionsGroup, null, SystemImportExportResources.RESID_FILEEXPORT_OPTION_CREATESEL_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_OPTION_CREATESEL_TOOLTIP);
- createSelectionOnlyButton.setSelection(true);
- Composite comp = SystemWidgetHelpers.createComposite(optionsGroup, 3);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginWidth = 0;
- comp.setLayout(layout);
- comp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- saveSettingsButton = SystemWidgetHelpers.createCheckBox(comp, 3, null, SystemImportExportResources.RESID_FILEEXPORT_OPTION_SETTINGS_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_OPTION_SETTINGS_TOOLTIP);
- saveSettingsButton.addListener(SWT.Selection, this);
- descFilePathLabel = new Label(comp, SWT.NONE);
- descFilePathLabel.setText(SystemImportExportResources.RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_LABEL);
- GridData data = new GridData();
- descFilePathLabel.setLayoutData(data);
- descFilePathField = new Text(comp, SWT.SINGLE | SWT.BORDER);
- descFilePathField.setToolTipText(SystemImportExportResources.RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_PATH_TOOLTIP);
- data = new GridData();
- data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = convertWidthInCharsToPixels(80);
- descFilePathField.setLayoutData(data);
- descFilePathField.addListener(SWT.Modify, this);
- descFileBrowseButton = SystemWidgetHelpers.createPushButton(comp, null, SystemImportExportResources.RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_BROWSE_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_OPTION_SETTINGS_DESCFILE_BROWSE_TOOLTIP);
- descFileBrowseButton.addListener(SWT.Selection, this);
- }
-
- /**
- * @see org.eclipse.ui.dialogs.WizardExportResourcesPage#setupBasedOnInitialSelections()
- */
- protected void setupBasedOnInitialSelections() {
- Object input = getInputObject();
- boolean allResource = true;
- // ensure initial input, i.e. selection, comprises of IResources only
- if ((input != null) && (input instanceof IStructuredSelection)) {
- IStructuredSelection sel = (IStructuredSelection) input;
- if (sel.size() > 0) {
- Iterator z = sel.iterator();
- while (z.hasNext()) {
- Object obj = z.next();
- if (!(obj instanceof IResource)) {
- allResource = false;
- break;
- }
- }
- } else {
- allResource = false;
- }
- } else {
- allResource = false;
- }
- // if selections are all resources, call super method to setup
- if (allResource) {
- super.setupBasedOnInitialSelections();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.WizardDataTransferPage#updateWidgetEnablements()
- */
- protected void updateWidgetEnablements() {
- boolean isSaveSettings = isSaveSettings();
- descFilePathLabel.setEnabled(isSaveSettings);
- descFilePathField.setEnabled(isSaveSettings);
- descFileBrowseButton.setEnabled(isSaveSettings);
-
- // if review is selected, the other options are grayed out without save settings
- if (reviewSynchronizeCheckbox != null) { // event handling could come before the widgets are created
- boolean isReview = reviewSynchronizeCheckbox.getSelection();
- overwriteExistingFilesCheckbox.setEnabled(!isReview);
- createDirectoryStructureButton.setEnabled(!isReview);
- createSelectionOnlyButton.setEnabled(!isReview);
- }
- }
-
- /**
- * Attempts to ensure that the specified directory exists on the local file system.
- * Answers a boolean indicating success.
- *
- * @return boolean
- * @param directory java.io.File
- */
- protected boolean ensureDirectoryExists(File directory) {
- if (!directory.exists()) {
-
- String msgTxt = RemoteImportExportResources.FILEMSG_TARGET_EXISTS;
- String msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_TARGET_EXISTS_DETAILS, directory.getAbsolutePath());
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_TARGET_EXISTS,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
- if (!dlg.openQuestionNoException()) return false;
- if (!directory.mkdirs()) {
- msgTxt = RemoteImportExportResources.FILEMSG_CREATE_FOLDER_FAILED;
- msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_CREATE_FOLDER_FAILED_DETAILS, directory.getAbsolutePath());
-
- msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_CREATE_FOLDER_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
- msg.makeSubstitution(directory.getAbsolutePath());
- setErrorMessage(msg);
- giveFocusToDestination();
- return false;
- }
- }
- return true;
- }
-
- /**
- * If the target for export does not exist then attempt to create it.
- * Answer a boolean indicating whether the target exists (ie.- if it
- * either pre-existed or this method was able to create it)
- *
- * @return boolean
- */
- protected boolean ensureTargetIsValid(File targetDirectory) {
- if (targetDirectory.exists() && !targetDirectory.isDirectory()) {
- String msgTxt = RemoteImportExportResources.FILEMSG_SOURCE_IS_FILE;
- String msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_SOURCE_IS_FILE_DETAILS, targetDirectory.getAbsolutePath());
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_SOURCE_IS_FILE,
- IStatus.ERROR, msgTxt, msgDetails);
-
- setErrorMessage(msg);
- giveFocusToDestination();
- return false;
- }
- return ensureDirectoryExists(targetDirectory);
- }
-
- /**
- * Set up and execute the passed Operation. Answer a boolean indicating success.
- *
- * @return boolean
- */
- protected boolean executeExportOperation(RemoteFileExportOperation op) {
- try {
- getContainer().run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) { // Display error dialog if exception is NullPointer, assume this means
- // communication failure. See RemoteFileExportOperation.exportFile()
- if (!NullPointerException.class.isInstance(e.getTargetException())) {
- displayErrorDialog(e.getTargetException());
- return false;
- }
- } catch (Exception e) {
- displayErrorDialog(e.getMessage());
- return false;
- }
- IStatus status = op.getStatus();
- if (!status.isOK()) {
- String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_FAILED, status);
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_EXPORT_FAILED,
- IStatus.ERROR, msgTxt);
- SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
- dlg.openWithDetails();
- return false;
- }
- return true;
- }
-
- /**
- * The Finish button was pressed. Try to do the required work now and answer
- * a boolean indicating success. If false is returned then the wizard will
- * not close.
- *
- * @return boolean
- */
- public boolean finish() {
- clearMessage();
- clearErrorMessage();
- boolean ret = false;
- setDestinationValue(destinationNameField.getText().trim());
- if (Utilities.isConnectionValid(destinationNameField.getText().trim(), getShell()) && isDestinationFolder()) {
- if (!ensureTargetIsValid((File) destinationFolder)) return false;
- List resourcesToExport = getWhiteCheckedResources();
- //Save dirty editors if possible but do not stop if not all are saved
- saveDirtyEditors();
- // about to invoke the operation so save our state
- saveWidgetValues();
- if (resourcesToExport.size() > 0) {
- // export data
- RemoteFileExportData data = new RemoteFileExportData();
-
- data.setContainerPath( null);
- data.setElements(resourcesToExport);
- data.setReviewSynchronize(reviewSynchronizeCheckbox.getSelection());
- data.setCreateDirectoryStructure(createDirectoryStructureButton.getSelection());
- data.setCreateSelectionOnly(createSelectionOnlyButton.getSelection());
- data.setOverWriteExistingFiles(overwriteExistingFilesCheckbox.getSelection());
- data.setSaveSettings(saveSettingsButton.getSelection());
- data.setDescriptionFilePath(getDescriptionLocation());
- data.setDestination(getDestinationValue());
-
- if (!reviewSynchronizeCheckbox.getSelection()) {
- // execute export
- ret = executeExportOperation(new RemoteFileExportOperation(data, this));
- } else {
- // run synchronization
- SynchronizeData data2 = new SynchronizeData(data);
- if (reviewSynchronizeCheckbox.getSelection()) {
- data2.setSynchronizeType(ISynchronizeOperation.SYNC_MODE_UI_REVIEW_INITIAL);
- }
- try {
- ret = new Synchronizer(data2).run(new SynchronizeOperation());
- } catch (Exception e) {
- // TODO Auto-generated catch block
- ret = false;
- e.printStackTrace();
- }
-
- // save description after synchronize operation
- try {
- if (data.isSaveSettings()) {
- RSESyncUtils.saveDescription(data);
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return ret;
- }
-
- String msgTxt = RemoteImportExportResources.FILEMSG_EXPORT_NONE_SELECTED;
- String msgDetails = RemoteImportExportResources.FILEMSG_EXPORT_NONE_SELECTED_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_EXPORT_NONE_SELECTED,
- IStatus.ERROR, msgTxt, msgDetails);
- setErrorMessage(msg);
- return false;
- }
- return false;
- }
-
- /**
- * Gets the destination.
- * @return the desstionation.
- */
- protected String getDestinationValue() {
- return destinationNameField.getText().trim();
- }
-
- /**
- * Gets the description.
- * @return the description.
- */
- protected String getDescriptionLocation() {
- return descFilePathField.getText().trim();
- }
-
- /**
- * Returns whether the settings should be saved.
- * @return whether settings should be saved.
- */
- protected boolean isSaveSettings() {
- return saveSettingsButton.getSelection();
- }
-
- /**
- * Set the current input focus to self's destination entry field
- */
- protected void giveFocusToDestination() {
- destinationNameField.setFocus();
- }
-
- /**
- * Open an appropriate destination browser so that the user can specify a source
- * to import from
- */
- protected void handleDestinationBrowseButtonPressed() {
- SystemSelectRemoteFolderAction action = new SystemSelectRemoteFolderAction(this.getShell());
- action.setShowNewConnectionPrompt(true);
- action.setFoldersOnly(true);
- action.setShowPropertySheet(true, false);
- String destValue = getDestinationValue();
- if (destValue != null)
- {
- IHost host = Utilities.parseForSystemConnection(destValue);
- IRemoteFile path = Utilities.parseForIRemoteFile(destValue);
- action.setDefaultConnection(host);
- action.setPreSelection(path);
- }
-
- action.run();
- IRemoteFile folder = action.getSelectedFolder();
-
- if (folder != null) {
- destinationFolder = new UniFilePlus(folder);
- destValue = Utilities.getAsString((UniFilePlus)destinationFolder);
- setDestinationValue(destValue);
- }
- }
-
- /**
- * Open an appropriate destination browser so that the user can specify a source
- * to import from.
- */
- protected void handleDescriptionFileBrowseButtonPressed() {
- SaveAsDialog dialog = new SaveAsDialog(getContainer().getShell());
- dialog.create();
- dialog.getShell().setText(RemoteImportExportResources.IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_TITLE);
- dialog.setMessage(RemoteImportExportResources.IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_MESSAGE);
- dialog.setOriginalFile(createFileHandle(new Path(getDescriptionLocation())));
- if (dialog.open() == Window.OK) {
- IPath path = dialog.getResult();
- path = path.removeFileExtension().addFileExtension(Utilities.EXPORT_DESCRIPTION_EXTENSION);
- descFilePathField.setText(path.toString());
- }
- }
-
- /**
- * Creates a file resource handle for the file with the given workspace path.
- * This method does not create the file resource; this is the responsibility
- * of <code>createFile</code>.
- *
- * @param filePath the path of the file resource to create a handle for
- * @return the new file resource handle
- */
- protected IFile createFileHandle(IPath filePath) {
- if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2)
- return SystemBasePlugin.getWorkspace().getRoot().getFile(filePath);
- else
- return null;
- }
-
- /**
- * Handle all events and enablements for widgets in this page
- * @param e Event
- */
- public void handleEvent(Event e) {
- Widget source = e.widget;
- if (source == destinationBrowseButton) {
- handleDestinationBrowseButtonPressed();
- } else if (source == descFileBrowseButton) {
- handleDescriptionFileBrowseButtonPressed();
- }
- updateWidgetEnablements();
- updatePageCompletion();
- }
-
- /**
- * Hook method for saving widget values for restoration by the next instance
- * of this class.
- */
- protected void internalSaveWidgetValues() {
- // update directory names history
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] directoryNames = settings.getArray(STORE_DESTINATION_NAMES_ID);
- if (directoryNames == null) directoryNames = new String[0];
- directoryNames = addToHistory(directoryNames, getDestinationValue());
- settings.put(STORE_DESTINATION_NAMES_ID, directoryNames);
- // options
- settings.put(STORE_REVIEW_SYNCHRONIZE_ID, reviewSynchronizeCheckbox.getSelection());
- settings.put(STORE_OVERWRITE_EXISTING_FILES_ID, overwriteExistingFilesCheckbox.getSelection());
- settings.put(STORE_CREATE_STRUCTURE_ID, createDirectoryStructureButton.getSelection());
- settings.put(STORE_CREATE_DESCRIPTION_FILE_ID, isSaveSettings());
- settings.put(STORE_DESCRIPTION_FILE_NAME_ID, getDescriptionLocation());
- }
- }
-
- /**
- * Method will return boolean value, will issue error if destination is
- * null
- */
- protected boolean isDestinationFolder() {
- boolean ret = destinationFolder != null;
- if (!ret) {
- String msgTxt = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION;
- String msgDetails = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.show(getShell(), msg);
- }
- return ret;
- }
-
- /**
- * Hook method for restoring widget values to the values that they held
- * last time this wizard was used to completion.
- */
- protected void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // destination chosen on previous export
- String lastDestination = null;
- String[] directoryNames = settings.getArray(STORE_DESTINATION_NAMES_ID);
- if (directoryNames != null) {
- for (int i = 0; i < directoryNames.length; i++) {
- // because of the way we add destination items to history, the
- // destination for the previous export would be first
- if (i == 0) {
- lastDestination = directoryNames[i];
- }
- addDestinationItem(directoryNames[i]);
- }
- }
- RemoteExportWizard parentWizard = (RemoteExportWizard) getWizard();
- boolean isInitializingFromExportData = parentWizard.getInitializeFromExportData();
- // options
- // no export data to initialize from, so prefill from previous export
- if (!isInitializingFromExportData) {
- reviewSynchronizeCheckbox.setSelection(settings.getBoolean(STORE_REVIEW_SYNCHRONIZE_ID));
- overwriteExistingFilesCheckbox.setSelection(settings.getBoolean(STORE_OVERWRITE_EXISTING_FILES_ID));
- boolean createDirectories = settings.getBoolean(STORE_CREATE_STRUCTURE_ID);
- createDirectoryStructureButton.setSelection(createDirectories);
- createSelectionOnlyButton.setSelection(!createDirectories);
- boolean saveSettings = settings.getBoolean(STORE_CREATE_DESCRIPTION_FILE_ID);
- saveSettingsButton.setSelection(saveSettings);
- String descFilePathStr = settings.get(STORE_DESCRIPTION_FILE_NAME_ID);
- if (descFilePathStr == null) {
- descFilePathStr = ""; //$NON-NLS-1$
- }
- descFilePathField.setText(descFilePathStr);
- // select previous export destination
- if (lastDestination != null) {
- setDestinationValue(lastDestination);
- }
- }
- // initialize from export data
- else {
- RemoteFileExportData data = parentWizard.getExportData();
- reviewSynchronizeCheckbox.setSelection(data.isReviewSynchronize());
- overwriteExistingFilesCheckbox.setSelection(data.isOverWriteExistingFiles());
- createDirectoryStructureButton.setSelection(data.isCreateDirectoryStructure());
- createSelectionOnlyButton.setSelection(data.isCreateSelectionOnly());
- saveSettingsButton.setSelection(data.isSaveSettings());
- String descFilePathStr = data.getDescriptionFilePath();
- if (descFilePathStr == null) {
- descFilePathStr = ""; //$NON-NLS-1$
- }
- descFilePathField.setText(descFilePathStr);
- String destinationPath = data.getDestination();
- if (destinationPath != null) {
- setDestinationValue(destinationPath);
- }
- }
- }
- // check if there was an initial selection
- // if it is a remote directory, then set the absolute path in the source name field
- Object initSelection = getInputObject();
- if ((initSelection != null) && (initSelection instanceof IStructuredSelection)) {
- IStructuredSelection sel = (IStructuredSelection) initSelection;
- if (sel.size() == 1) {
- Object theSel = sel.getFirstElement();
- if (theSel instanceof IRemoteFile) {
- IRemoteFile file = (IRemoteFile) theSel;
- // set source name if the input is a folder
- if (file.isDirectory()) {
- destinationFolder = new UniFilePlus(file);
- setDestinationValue(Utilities.getAsString((UniFilePlus) destinationFolder));
- }
- }
- }
- }
- }
-
- /**
- * Set the contents of the receivers destination specification widget to
- * the passed value
- *
- */
- protected void setDestinationValue(String path) {
- if (path.length() > 0) {
- String[] currentItems = destinationNameField.getItems();
- int selectionIndex = -1;
- for (int i = 0; i < currentItems.length && selectionIndex < 0; i++) {
- if (currentItems[i].equals(path)) selectionIndex = i;
- }
- if (selectionIndex < 0) {
- // need to add a new one.
- int oldLength = currentItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength] = path;
- destinationNameField.setText(path);
- destinationNameField.setItems(newItems);
- selectionIndex = oldLength;
- } else {
- }
- destinationNameField.select(selectionIndex);
- }
- destinationFolder = null; // clear destination
- IHost conn = Utilities.parseForSystemConnection(path);
- if (conn != null) {
- IRemoteFile rf = Utilities.parseForIRemoteFile(path);
- if (rf != null) destinationFolder = new UniFilePlus(rf);
- }
- }
-
- /**
- * Answer a boolean indicating whether the receivers destination specification
- * widgets currently all contain valid values.
- */
- protected boolean validateDestinationGroup() {
- String destinationValue = getDestinationValue();
- if (destinationValue.length() == 0) {
- setMessage(DESTINATION_EMPTY_MESSAGE);
- return false;
- }
- String conflictingContainer = getConflictingContainerNameFor(destinationValue);
- if (conflictingContainer != null) {
- String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_DESTINATION_CONFLICTING, conflictingContainer);
- String msgDetails = RemoteImportExportResources.FILEMSG_DESTINATION_CONFLICTING_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_DESTINATION_CONFLICTING,
- IStatus.ERROR, msgTxt, msgDetails);
- setErrorMessage(msg);
- giveFocusToDestination();
- return false;
- }
- return true;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.WizardDataTransferPage#validateOptionsGroup()
- */
- protected boolean validateOptionsGroup() {
- if (isSaveSettings()) {
- IPath location = new Path(getDescriptionLocation());
- // if location is empty, no error message, but it's not valid
- if (location.toString().length() == 0) {
- setErrorMessage((String) null);
- return false;
- }
- // location must start with '/'
- if (!location.toString().startsWith("/")) { //$NON-NLS-1$
- setErrorMessage(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_ABSOLUTE);
- return false;
- }
- // find the resource, including a variant if any
- IResource resource = findResource(location);
- // if resource is not a file, it must be a container. So location is pointing to a container, which is an error
- if (resource != null && resource.getType() != IResource.FILE) {
- setErrorMessage(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_EXISTING_CONTAINER);
- return false;
- }
- // get the resource (or any variant of it) after removing the last segment
- // this gets the parent resource
- resource = findResource(location.removeLastSegments(1));
- // if parent resource does not exist, or if it is a file, then it is not valid
- if (resource == null || resource.getType() == IResource.FILE) {
- setErrorMessage(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_NO_CONTAINER);
- return false;
- }
- // get the file extension
- String fileExtension = location.getFileExtension();
- // ensure that file extension is valid
- if (fileExtension == null || !fileExtension.equals(Utilities.EXPORT_DESCRIPTION_EXTENSION)) {
- setErrorMessage(NLS.bind(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_INVALID_EXTENSION, Utilities.EXPORT_DESCRIPTION_EXTENSION ));
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns the resource for the specified path.
- *
- * @param path the path for which the resource should be returned
- * @return the resource specified by the path or <code>null</code>
- */
- protected IResource findResource(IPath path) {
- IWorkspace workspace = SystemBasePlugin.getWorkspace();
- // validate path
- IStatus result = workspace.validatePath(path.toString(), IResource.ROOT | IResource.PROJECT | IResource.FOLDER | IResource.FILE);
- // if path valid
- if (result.isOK()) {
- // get the workspace root
- IWorkspaceRoot root = workspace.getRoot();
- // see if path exists. If it does, return the resource at the path
- if (root.exists(path)) {
- return root.findMember(path);
- }
- // see if a variant of the path exists
- else {
- // look for variant
- IResource variant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(path);
- // if a variant does exist, return it
- if (variant != null) {
- return variant;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the name of a container with a location that encompasses targetDirectory.
- * Returns null if there is no conflict.
- *
- * @param targetDirectory the path of the directory to check.
- * @return the conflicting container name or <code>null</code>
- */
- protected String getConflictingContainerNameFor(String targetDirectory) {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath testPath = new Path(targetDirectory);
- if (root.getLocation().isPrefixOf(testPath)) return "workspace root"; //UniversalSystemPlugin.getString("IFSexport.rootName"); //$NON-NLS-1$
- IProject[] projects = root.getProjects();
- for (int i = 0; i < projects.length; i++) {
- IPath loc = projects[i].getLocation();
- if (loc != null && loc.isPrefixOf(testPath))
- return projects[i].getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#setInputObject(java.lang.Object)
- */
- public void setInputObject(Object inputObject) {
- this.inputObject = inputObject;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#getInputObject()
- */
- public Object getInputObject() {
- return inputObject;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#performFinish()
- */
- public boolean performFinish() {
- return finish();
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#setHelp(java.lang.String)
- */
- public void setHelp(String id) {
- if (parentComposite != null) SystemWidgetHelpers.setHelp(parentComposite, helpId);
- this.helpId = id;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#getHelpContextId()
- */
- public String getHelpContextId() {
- return helpId;
- }
-
- /**
- * 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();
- else
- super.setErrorMessage(null);
- }
-
- /**
- * ISystemMessageLine method. <br>
- * Clears the currently displayed message.
- */
- public void clearMessage() {
- if (msgLine != null)
- msgLine.clearMessage();
- else
- super.setMessage(null);
- }
-
- /**
- * 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;
- super.setErrorMessage(message.getLevelOneText());
- }
- }
-
- /**
- * 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 {
- String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR, msgTxt, exc);
-
- pendingErrorMessage = msg;
- super.setErrorMessage(msg.getLevelOneText());
- }
- }
-
- /**
- * 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;
- super.setMessage(message.getLevelOneText());
- }
- }
-
- /**
- * 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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java
deleted file mode 100644
index 64beabf11..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteExporter.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * David McKnight (IBM) - [191482] [importexport][efs] Export from Project on a remote EFS project Errors
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-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.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-// Similar to org.eclipse.ui.wizards.datatransfer.FileSystemExporter
-/**
- * Helper class for exporting resources to the file system.
- */
-class RemoteExporter {
- private IHost _host = null;
-
- /**
- * Create an instance of this class. Use this constructor if you wish to
- * use an host object */
- public RemoteExporter(IHost s) {
- super();
- _host = s;
- }
-
- /**
- * Create an instance of this class.
- */
- public RemoteExporter() {
- super();
- }
-
- /**
- * Creates the specified file system directory at <code>destinationPath</code>.
- * This creates a new file system directory.
- */
- public void createFolder(IPath destinationPath) {
- // IFS: use IFSJaveFile object if necessary
- if (_host != null)
- new UniFilePlus(Utilities.getIRemoteFile(_host, destinationPath.toString())).mkdir();
- else
- new File(destinationPath.toOSString()).mkdir();
- }
-
- /**
- * Writes the passed resource to the specified location recursively
- * @throws SystemMessageException TODO
- */
- public void write(IResource resource, IPath destinationPath) throws IOException, CoreException, SystemMessageException {
- if (resource.getType() == IResource.FILE)
- writeFile((IFile) resource, destinationPath);
- else
- writeChildren((IContainer) resource, destinationPath);
- }
-
- /**
- * Exports the passed container's children
- * @throws SystemMessageException TODO
- */
- protected void writeChildren(IContainer folder, IPath destinationPath) throws IOException, CoreException, SystemMessageException {
- if (folder.isAccessible()) {
- IResource[] children = folder.members();
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- writeResource(child, destinationPath.append(child.getName()));
- }
- }
- }
-
- /**
- * Writes the passed file resource to the specified destination on the remote
- * file system
- * @throws SystemMessageException TODO
- */
- protected void writeFile(IFile file, IPath destinationPath) throws IOException, CoreException, SystemMessageException {
- IRemoteFileSubSystem rfss = RemoteFileUtility.getFileSubSystem(_host);
- String dest = destinationPath.toString();
- char sep = rfss.getSeparatorChar();
- if (sep != '/')
- {
- // for windows
- dest = dest.replace('/', sep);
- }
- String localEncoding = file.getCharset();
- String hostEncoding = Utilities.getIRemoteFile(_host, dest).getEncoding();
- IPath location = file.getLocation();
- if (location != null){
- rfss.upload(location.makeAbsolute().toOSString(), localEncoding, dest, hostEncoding, new NullProgressMonitor()); //$NON-NLS-1$
- }
- else {
- // an EFS file
- int lastSep = dest.lastIndexOf(sep);
- String remoteParent = dest.substring(0, lastSep);
- String remoteFile = dest.substring(lastSep +1);
-
- OutputStream outstream = rfss.getOutputStream(remoteParent, remoteFile, IFileService.NONE, new NullProgressMonitor());
-
- InputStream instream = file.getContents();
- try {
- int length = 1000;
- byte[] buffer = new byte[length];
-
- int bytesRead = 0;
- boolean done = false;
- while (!done){
- bytesRead = instream.read(buffer, 0, length);
- if (bytesRead > 0){
- outstream.write(buffer, 0, bytesRead);
- }
- if (bytesRead == -1){
- done = true;
- }
- }
- }
- finally {
- instream.close();
- outstream.close();
- }
- }
- }
-
- /**
- * Writes the passed resource to the specified location recursively
- * @throws SystemMessageException TODO
- */
- protected void writeResource(IResource resource, IPath destinationPath) throws IOException, CoreException, SystemMessageException {
- if (resource.getType() == IResource.FILE)
- writeFile((IFile) resource, destinationPath);
- else {
- createFolder(destinationPath);
- writeChildren((IContainer) resource, destinationPath);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java
deleted file mode 100644
index f04d95353..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
- * David McKnight (IBM) - [287946] Export, save in rexpfd does not work any more
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportProblemDialog;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.internal.synchronize.SynchronizeData;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.Synchronizer;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class is a remote file export action.
- */
-public class RemoteFileExportActionDelegate extends RemoteFileImportExportActionDelegate {
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IFile[] descriptions = getDescriptionFiles(getSelection());
- MultiStatus mergedStatus;
- int length = descriptions.length;
- if (length < 1) {
- return;
- }
- // create read multi status
- String message;
- if (length > 1) {
- message = RemoteImportExportResources.IMPORT_EXPORT_ERROR_CREATE_FILES_FAILED;
- } else {
- message = RemoteImportExportResources.IMPORT_EXPORT_ERROR_CREATE_FILE_FAILED;
- }
- MultiStatus readStatus = new MultiStatus(RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, null);
- RemoteFileExportData[] exportDatas = readExportDatas(descriptions, readStatus);
- if (exportDatas.length > 0) {
- IStatus status = export(exportDatas);
- if (status == null) {
- return;
- }
- if (readStatus.getSeverity() == IStatus.ERROR) {
- message = readStatus.getMessage();
- } else {
- message = status.getMessage();
- }
- // create new status because we want another message - no API to set message
- mergedStatus = new MultiStatus(RemoteImportExportPlugin.getDefault().getSymbolicName(), status.getCode(), readStatus.getChildren(), message, null);
- mergedStatus.merge(status);
- } else {
- mergedStatus = readStatus;
- }
- if (!mergedStatus.isOK()) {
- RemoteImportExportProblemDialog.open(getShell(), RemoteImportExportResources.IMPORT_EXPORT_EXPORT_ACTION_DELEGATE_TITLE, null, mergedStatus);
- }
- }
-
- private RemoteFileExportData[] readExportDatas(IFile[] descriptions, MultiStatus readStatus) {
- List exportDataList = new ArrayList(descriptions.length);
- for (int i = 0; i < descriptions.length; i++) {
- RemoteFileExportData exportData = readExportData(descriptions[i], readStatus);
- if (exportData != null) {
- exportDataList.add(exportData);
- }
- }
- return (RemoteFileExportData[]) exportDataList.toArray(new RemoteFileExportData[exportDataList.size()]);
- }
-
- /**
- * Reads the file export data from a file.
- */
- protected RemoteFileExportData readExportData(IFile description, MultiStatus readStatus) {
- Assert.isLegal(description.isAccessible());
- Assert.isNotNull(description.getFileExtension());
- Assert.isLegal(description.getFileExtension().equals(Utilities.EXPORT_DESCRIPTION_EXTENSION));
- RemoteFileExportData exportData = new RemoteFileExportData();
- IRemoteFileExportDescriptionReader reader = null;
- try {
- reader = exportData.createExportDescriptionReader(description.getContents());
- // read export data
- reader.read(exportData);
- // do not save settings again
- exportData.setSaveSettings(false);
- } catch (CoreException ex) {
- String message = NLS.bind(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_READ, description.getFullPath(), ex.getStatus().getMessage());
- addToStatus(readStatus, message, ex);
- return null;
- } finally {
- if (reader != null) {
- readStatus.addAll(reader.getStatus());
- }
- try {
- if (reader != null) {
- reader.close();
- }
- } catch (CoreException ex) {
- String message = NLS.bind(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_CLOSE, description.getFullPath());
- addToStatus(readStatus, message, ex);
- }
- }
- return exportData;
- }
-
- private IStatus export(RemoteFileExportData[] exportDatas) {
- // Add re-running synchronize operation
- for (int i = 0; i < exportDatas.length; i++) {
- RemoteFileExportData exportData = exportDatas[i];
- if (exportData.isReviewSynchronize()){
-
- SynchronizeData data = new SynchronizeData(exportData);
- data.setSynchronizeType(ISynchronizeOperation.SYNC_MODE_UI_REVIEW);
- new Synchronizer(data).run(new SynchronizeOperation());
- }
- else {
- IStatus status = null;
- RemoteFileExportOperation op = new RemoteFileExportOperation(exportDatas[i], new RemoteFileOverwriteQuery());
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, op);
- status = op.getStatus();
- } catch (InvocationTargetException e) {
- SystemBasePlugin.logError("Error occured trying to export", e); //$NON-NLS-1$
- status = new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
- } catch (InterruptedException e) {
- SystemBasePlugin.logError("Error occured trying to export", e); //$NON-NLS-1$
- status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
- }
- if (!status.isOK()) {
- String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_FAILED, status);
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_EXPORT_FAILED,
- IStatus.ERROR, msgTxt);
-
- SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
- dlg.openWithDetails();
- return null;
- }
- }
- }
- return null;
- }
-
- protected void addToStatus(MultiStatus multiStatus, String defaultMessage, CoreException ex) {
- IStatus status = ex.getStatus();
- String message = ex.getLocalizedMessage();
- if (message == null || message.length() < 1) {
- status = new Status(status.getSeverity(), status.getPlugin(), status.getCode(), defaultMessage, ex);
- }
- multiStatus.add(status);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.java
deleted file mode 100644
index 520077cf0..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportData.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * Holds data of what to export.
- */
-public class RemoteFileExportData {
- private String destination;
-
- private IPath containerPath;
- private boolean reviewSynchronize;
- private boolean overWriteExistingFiles;
- private boolean createDirectoryStructure;
- private boolean createSelectionOnly;
- private boolean saveSettings;
- private String descriptionFilePath;
-
- // export elements
- private List elements;
-
- /**
- * Constructor.
- */
- public RemoteFileExportData() {
- setContainerPath(null);
- setDestination(null);
- setOverWriteExistingFiles(false);
- setCreateDirectoryStructure(false);
- setCreateSelectionOnly(true);
- setSaveSettings(false);
- setDescriptionFilePath(null);
- }
-
- /**
- * @return Returns the descriptionFilePath.
- */
- public String getDescriptionFilePath() {
- return descriptionFilePath;
- }
-
- /**
- * Gets the description file as a workspace resource.
- * @return a file representing the description file.
- */
- public IFile getDescriptionFile() {
- IPath path = new Path(getDescriptionFilePath());
- if (path.isValidPath(path.toString()) && path.segmentCount() >= 2) {
- return SystemBasePlugin.getWorkspace().getRoot().getFile(path);
- } else {
- return null;
- }
- }
-
- /**
- * @param descriptionFilePath The descriptionFilePath to set.
- */
- public void setDescriptionFilePath(String descriptionFilePath) {
- this.descriptionFilePath = descriptionFilePath;
- }
-
- public void setContainerPath(IPath location){
- this.containerPath = location;
- }
-
- public IPath getContainerPath(){
- return containerPath;
- }
-
- /**
- * @return Returns the destination.
- */
- public String getDestination() {
- return destination;
- }
-
- /**
- * @param destination The destination to set.
- */
- public void setDestination(String destination) {
- this.destination = destination;
- }
-
- /**
- * Returns the elements to be exported.
- * @return the elements.
- */
- public List getElements() {
- return elements;
- }
-
- /**
- * Sets the elements to export.
- * @param elements the elements.
- */
- public void setElements(List elements) {
- this.elements = elements;
- }
-
- /**
- * @return Returns the overWriteExistingFiles.
- */
- public boolean isOverWriteExistingFiles() {
- return overWriteExistingFiles;
- }
-
- /**
- * @param overWriteExistingFiles The overWriteExistingFiles to set.
- */
- public void setOverWriteExistingFiles(boolean overWriteExistingFiles) {
- this.overWriteExistingFiles = overWriteExistingFiles;
- }
-
-
- public boolean isReviewSynchronize(){
- return reviewSynchronize;
- }
-
- public void setReviewSynchronize(boolean reviewSynchronize){
- this.reviewSynchronize = reviewSynchronize;
- }
-
- /**
- * @return Returns the saveSettings.
- */
- public boolean isSaveSettings() {
- return saveSettings;
- }
-
- /**
- * @param saveSettings The saveSettings to set.
- */
- public void setSaveSettings(boolean saveSettings) {
- this.saveSettings = saveSettings;
- }
-
- /**
- * @return Returns the createDirectoryStructure.
- */
- public boolean isCreateDirectoryStructure() {
- return createDirectoryStructure;
- }
-
- /**
- * @param createDirectoryStructure The createDirectoryStructure to set.
- */
- public void setCreateDirectoryStructure(boolean createDirectoryStructure) {
- this.createDirectoryStructure = createDirectoryStructure;
- }
-
- /**
- * @return Returns the createSelectionOnly.
- */
- public boolean isCreateSelectionOnly() {
- return createSelectionOnly;
- }
-
- /**
- * @param createSelectionOnly The createSelectionOnly to set.
- */
- public void setCreateSelectionOnly(boolean createSelectionOnly) {
- this.createSelectionOnly = createSelectionOnly;
- }
-
- /**
- * Creates and returns an export description writer.
- */
- public IRemoteFileExportDescriptionWriter createExportDescriptionWriter(OutputStream outputStream) {
- return new RemoteFileExportDescriptionWriter(outputStream);
- }
-
- /**
- * Creates and returns an export description writer.
- */
- public IRemoteFileExportDescriptionReader createExportDescriptionReader(InputStream inputStream) {
- return new RemoteFileExportDescriptionReader(inputStream);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java
deleted file mode 100644
index 71d19e5be..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionReader.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Remote file export description reader.
- */
-public class RemoteFileExportDescriptionReader implements IRemoteFileExportDescriptionReader {
- protected InputStream fInputStream;
-
- /**
- * Constructor.
- */
- public RemoteFileExportDescriptionReader(InputStream inputStream) {
- Assert.isNotNull(inputStream);
- fInputStream = new BufferedInputStream(inputStream);
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionReader#read(org.eclipse.rse.internal.importexport.files.RemoteFileExportData)
- */
- public void read(RemoteFileExportData exportData) throws CoreException {
- try {
- readXML(exportData);
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- } catch (SAXException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
-
- public RemoteFileExportData readXML(RemoteFileExportData exportData) throws IOException, SAXException {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- DocumentBuilder parser = null;
- try {
- parser = factory.newDocumentBuilder();
- } catch (ParserConfigurationException ex) {
- throw new IOException(ex.getLocalizedMessage());
- }
- Element xmlFileDesc = parser.parse(new InputSource(fInputStream)).getDocumentElement();
- if (!xmlFileDesc.getNodeName().equals(Utilities.EXPORT_DESCRIPTION_EXTENSION)) {
- throw new IOException();
- }
- NodeList topLevelElements = xmlFileDesc.getChildNodes();
- for (int i = 0; i < topLevelElements.getLength(); i++) {
- Node node = topLevelElements.item(i);
- if (node.getNodeType() != Node.ELEMENT_NODE) continue;
- Element element = (Element) node;
- xmlReadDestinationLocation(exportData, element);
- xmlReadOptions(exportData, element);
- xmlReadSelectedElements(exportData, element);
- }
- return exportData;
- }
-
- private void xmlReadDestinationLocation(RemoteFileExportData exportData, Element element) {
- if (element.getNodeName().equals("destination")) { //$NON-NLS-1$
- exportData.setDestination(element.getAttribute("path")); //$NON-NLS-1$
- }
- }
-
- private void xmlReadOptions(RemoteFileExportData exportData, Element element) throws IOException {
- if (element.getNodeName().equals("options")) { //$NON-NLS-1$
- try {
- exportData.setReviewSynchronize(getBooleanAttribute(element, "reviewSynchronize")); //$NON-NLS-1$
- }
- catch (IOException e){
- // this is a new option so if we're reading an older config file, this attribute doesn't exist
- exportData.setReviewSynchronize(false);
- }
- exportData.setOverWriteExistingFiles(getBooleanAttribute(element, "overWriteExistingFiles")); //$NON-NLS-1$
- exportData.setCreateDirectoryStructure(getBooleanAttribute(element, "createDirectoryStructure")); //$NON-NLS-1$
- exportData.setCreateSelectionOnly(getBooleanAttribute(element, "createSelectedOnly")); //$NON-NLS-1$
- exportData.setSaveSettings(getBooleanAttribute(element, "saveSettings")); //$NON-NLS-1$
- exportData.setDescriptionFilePath(element.getAttribute("descriptionFilePath")); //$NON-NLS-1$
- }
- }
-
- private void xmlReadSelectedElements(RemoteFileExportData exportData, Element element) throws IOException {
- if (element.getNodeName().equals("selectedElements")) { //$NON-NLS-1$
- NodeList selectedElements = element.getChildNodes();
- List elementsToExport = new ArrayList(selectedElements.getLength());
- for (int j = 0; j < selectedElements.getLength(); j++) {
- Node selectedNode = selectedElements.item(j);
- if (selectedNode.getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
- Element selectedElement = (Element) selectedNode;
- if (selectedElement.getNodeName().equals("file")) { //$NON-NLS-1$
- addFile(elementsToExport, selectedElement);
- } else if (selectedElement.getNodeName().equals("folder")) { //$NON-NLS-1$
- addFolder(elementsToExport, selectedElement);
- } else if (selectedElement.getNodeName().equals("project")) { //$NON-NLS-1$
- addProject(elementsToExport, selectedElement);
- }
- }
- exportData.setElements(elementsToExport);
- }
- }
-
- private void addFile(List selectedElements, Element element) throws IOException {
- IPath path = getPath(element);
- if (path != null) {
- IFile file = SystemBasePlugin.getWorkspace().getRoot().getFile(path);
- if (file != null) {
- selectedElements.add(file);
- }
- }
- }
-
- private void addFolder(List selectedElements, Element element) throws IOException {
- IPath path = getPath(element);
- if (path != null) {
- IFolder folder = SystemBasePlugin.getWorkspace().getRoot().getFolder(path);
- if (folder != null) {
- selectedElements.add(folder);
- }
- }
- }
-
- private void addProject(List selectedElements, Element element) throws IOException {
- String name = element.getAttribute("name"); //$NON-NLS-1$
- if (name.equals("")) { //$NON-NLS-1$
- throw new IOException();
- }
- IProject project = SystemBasePlugin.getWorkspace().getRoot().getProject(name);
- if (project != null) {
- selectedElements.add(project);
- }
- }
-
- private IPath getPath(Element element) throws IOException {
- String pathString = element.getAttribute("path"); //$NON-NLS-1$
- if (pathString.equals("")) { //$NON-NLS-1$
- throw new IOException();
- }
- return new Path(element.getAttribute("path")); //$NON-NLS-1$
- }
-
- protected boolean getBooleanAttribute(Element element, String name) throws IOException {
- String value = element.getAttribute(name);
- if (value != null && value.equalsIgnoreCase("true")) { //$NON-NLS-1$
- return true;
- }
- if (value != null && value.equalsIgnoreCase("false")) { //$NON-NLS-1$
- return false;
- }
- throw new IOException();
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionReader#close()
- */
- public void close() throws CoreException {
- if (fInputStream != null) {
- try {
- fInputStream.close();
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionReader#getStatus()
- */
- public IStatus getStatus() {
- return new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, "", null); //$NON-NLS-1$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java
deleted file mode 100644
index 860958f5b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportDescriptionWriter.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Remote file export description writer.
- */
-public class RemoteFileExportDescriptionWriter implements IRemoteFileExportDescriptionWriter {
- protected OutputStream fOutputStream;
-
- /**
- * Constructor.
- */
- public RemoteFileExportDescriptionWriter(OutputStream outputStream) {
- Assert.isNotNull(outputStream);
- fOutputStream = new BufferedOutputStream(outputStream);
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionWriter#write(org.eclipse.rse.internal.importexport.files.RemoteFileExportData)
- */
- public void write(RemoteFileExportData exportData) throws CoreException {
- try {
- writeXML(exportData);
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
-
- /**
- * Writes a XML representation of file export data.
- * @exception IOException if writing to the underlying stream fails.
- */
- public void writeXML(RemoteFileExportData exportData) throws IOException {
- Assert.isNotNull(exportData);
- DocumentBuilder docBuilder = null;
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- try {
- docBuilder = factory.newDocumentBuilder();
- } catch (ParserConfigurationException ex) {
- throw new IOException(ex.getLocalizedMessage());
- }
- Document document = docBuilder.newDocument();
- // create the document
- Element xmlFileDesc = document.createElement(Utilities.EXPORT_DESCRIPTION_EXTENSION);
- document.appendChild(xmlFileDesc);
- xmlWriteDestinationLocation(exportData, document, xmlFileDesc);
- xmlWriteOptions(exportData, document, xmlFileDesc);
- xmlWriteSelectedElements(exportData, document, xmlFileDesc);
- try {
- // write the document to the stream
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- DOMSource source = new DOMSource(document);
- StreamResult result = new StreamResult(fOutputStream);
- transformer.transform(source, result);
- } catch (TransformerException e) {
- throw new IOException(e.getLocalizedMessage());
- }
- }
-
- private void xmlWriteDestinationLocation(RemoteFileExportData exportData, Document document, Element xmlFileDesc) throws DOMException {
- Element destination = document.createElement("destination"); //$NON-NLS-1$
- xmlFileDesc.appendChild(destination);
- destination.setAttribute("path", exportData.getDestination()); //$NON-NLS-1$
- }
-
- private void xmlWriteOptions(RemoteFileExportData exportData, Document document, Element xmlFileDesc) throws DOMException {
- Element options = document.createElement("options"); //$NON-NLS-1$
- xmlFileDesc.appendChild(options);
- options.setAttribute("reviewSynchronize", "" + exportData.isReviewSynchronize()); //$NON-NLS-1$//$NON-NLS-2$
- options.setAttribute("overWriteExistingFiles", "" + exportData.isOverWriteExistingFiles()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("createDirectoryStructure", "" + exportData.isCreateDirectoryStructure()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("createSelectedOnly", "" + exportData.isCreateSelectionOnly()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("saveSettings", "" + exportData.isSaveSettings()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("descriptionFilePath", "" + exportData.getDescriptionFilePath()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private void xmlWriteSelectedElements(RemoteFileExportData exportData, Document document, Element xmlFileDesc) throws DOMException {
- Element selectedElements = document.createElement("selectedElements"); //$NON-NLS-1$
- xmlFileDesc.appendChild(selectedElements);
- List elements = exportData.getElements();
- Iterator iter = elements.iterator();
- while (iter.hasNext()) {
- Object element = iter.next();
- if (element instanceof IResource) {
- add((IResource) element, selectedElements, document);
- }
- }
- }
-
- private void add(IResource resource, Element parent, Document document) {
- Element element = null;
- if (resource.getType() == IResource.PROJECT) {
- element = document.createElement("project"); //$NON-NLS-1$
- parent.appendChild(element);
- element.setAttribute("name", resource.getName()); //$NON-NLS-1$
- return;
- }
- if (resource.getType() == IResource.FILE) {
- element = document.createElement("file"); //$NON-NLS-1$
- } else if (resource.getType() == IResource.FOLDER) {
- element = document.createElement("folder"); //$NON-NLS-1$
- }
- if (element != null) {
- parent.appendChild(element);
- element.setAttribute("path", resource.getFullPath().toString()); //$NON-NLS-1$
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionWriter#close()
- */
- public void close() throws CoreException {
- if (fOutputStream != null) {
- try {
- fOutputStream.close();
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionWriter#getStatus()
- */
- public IStatus getStatus() {
- return new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, "", null); //$NON-NLS-1$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportFromProjectActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportFromProjectActionDelegate.java
deleted file mode 100644
index dae741cad..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportFromProjectActionDelegate.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * This class represents the action to bring up the remote file system export wizard
- * and export the contents of a project or projects to a remote folder.
- */
-public class RemoteFileExportFromProjectActionDelegate extends RemoteFileImportExportActionDelegate {
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- RemoteExportWizard wizard = new RemoteExportWizard();
- wizard.init(getWorkbench(), getSelection());
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.open();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java
deleted file mode 100644
index 062fd99b3..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java
+++ /dev/null
@@ -1,573 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [191479] refreshing destination directory after export
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-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.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-
-/**
- * Operation for exporting the contents of a resource to the local file system.
- */
-class RemoteFileExportOperation implements IRunnableWithProgress {
- private IHost conn;
- private IPath path;
- private IProgressMonitor monitor;
- private RemoteExporter exporter;
- private List resourcesToExport;
- private IOverwriteQuery overwriteCallback;
- private IResource resource;
- private List errorTable = new ArrayList(1);
- private RemoteFileExportData exportData;
- private boolean saveSettings;
- private String descriptionFilePath;
-
- private boolean reviewSynchronize = true;
-
- // the constants for the overwrite 3 state
- private static final int OVERWRITE_NOT_SET = 0;
- private static final int OVERWRITE_NONE = 1;
- private static final int OVERWRITE_ALL = 2;
- private int overwriteState = OVERWRITE_NOT_SET;
- private boolean createLeadupStructure = true;
- private boolean createContainerDirectories = true;
-
- /**
- * Create an instance of this class. Use this constructor if you wish to
- * export specific resources with a common parent resource (affects container
- * directory creation).
- */
- private RemoteFileExportOperation(IHost conn, IResource resource, List resources, String destinationPath, IOverwriteQuery overwriteImplementor) {
- this.conn = conn;
- this.resource = resource;
- this.resourcesToExport = resources;
- this.path = new Path(destinationPath);
- this.overwriteCallback = overwriteImplementor;
- this.exporter = new RemoteExporter(conn);
- }
-
- public RemoteFileExportOperation(RemoteFileExportData data, IOverwriteQuery overwriteImplementor) {
- this(Utilities.parseForSystemConnection(data.getDestination()), null, data.getElements(), Utilities.parseForPath(data.getDestination()), overwriteImplementor);
- this.exportData = data;
- this.saveSettings = data.isSaveSettings();
- this.descriptionFilePath = data.getDescriptionFilePath();
- setCreateLeadupStructure(data.isCreateDirectoryStructure());
- setReviewSynchronize(data.isReviewSynchronize());
- setOverwriteFiles(data.isOverWriteExistingFiles());
- }
-
- /**
- * Add a new entry to the error table with the passed information
- */
- protected void addError(String message, Throwable e) {
- errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, message, e));
- }
-
- /**
- * Answer the total number of file resources that exist at or below self in the
- * resources hierarchy.
- *
- * @return int
- * @param resource org.eclipse.core.resources.IResource
- */
- protected int countChildrenOf(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) return 1;
- int count = 0;
- if (resource.isAccessible()) {
- IResource[] children = ((IContainer) resource).members();
- for (int i = 0; i < children.length; i++)
- count += countChildrenOf(children[i]);
- }
- return count;
- }
-
- /**
- * Answer a boolean indicating the number of file resources that were
- * specified for export
- *
- * @return int
- */
- protected int countSelectedResources() throws CoreException {
- int result = 0;
- Iterator resources = resourcesToExport.iterator();
- while (resources.hasNext())
- result += countChildrenOf((IResource) resources.next());
- return result;
- }
-
- /**
- * Create the directories required for exporting the passed resource,
- * based upon its container hierarchy
- *
- * @param resource org.eclipse.core.resources.IResource
- */
- protected void createLeadupDirectoriesFor(IResource resource) {
- IPath resourcePath = resource.getFullPath().removeLastSegments(1);
- for (int i = 0; i < resourcePath.segmentCount(); i++) {
- path = path.append(resourcePath.segment(i));
- exporter.createFolder(path);
- }
- }
-
- /**
- * Recursively export the previously-specified resource
- */
- protected void exportAllResources() throws InterruptedException {
- if (resource.getType() == IResource.FILE)
- exportFile((IFile) resource, path);
- else {
- try {
- exportChildren(((IContainer) resource).members(), path);
- } catch (CoreException e) {
- // not safe to show a dialog
- // should never happen because the file system export wizard ensures that the
- // single resource chosen for export is both existent and accessible
- errorTable.add(e);
- }
- }
- }
-
- /**
- * Export all of the resources contained in the passed collection
- *
- * @param children java.util.Enumeration
- * @param currentPath IPath
- */
- protected void exportChildren(IResource[] children, IPath currentPath) throws InterruptedException {
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- if (!child.isAccessible()) continue;
- if (child.getType() == IResource.FILE)
- exportFile((IFile) child, currentPath);
- else {
- IPath destination = currentPath.append(child.getName());
- try {
- exporter.createFolder(destination);
- } catch (Exception e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, destination, e.getLocalizedMessage() == null ? e.toString() : e.getMessage());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- }
- try {
- exportChildren(((IContainer) child).members(), destination);
- } catch (CoreException e) {
- // not safe to show a dialog
- // should never happen because:
- // i. this method is called recursively iterating over the result of #members,
- // which only answers existing children
- // ii. there is an #isAccessible check done before #members is invoked
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, e.getMessage(), e));
- //errorTable.add(e.getStatus());
- }
- }
- }
- }
-
- /**
- * Export the passed file to the specified location
- *
- * @param file org.eclipse.core.resources.IFile
- * @param location org.eclipse.core.runtime.IPath
- */
- protected void exportFile(IFile file, IPath location) throws InterruptedException {
- IPath fullPath = location.append(file.getName());
- String destination = fullPath.toString();
- // flag to indicate whether export is required
- boolean exportRequired = false;
- monitor.subTask(file.getFullPath().toString());
- String properPathString = fullPath.toOSString();
- File targetFile = null;
- if (conn == null) {
- targetFile = new File(properPathString);
- } else {
- try {
- targetFile = new UniFilePlus(Utilities.getIRemoteFile(conn, fullPath.toString()));
- } catch (NullPointerException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION);
-
- // Assume that communication has failed.
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- throw e;
- }
- }
- if (targetFile.exists()) {
- exportRequired = isExportRequired(file, destination);
- // if export is not required, no need to do anything
- if (!exportRequired) {
- return;
- }
- if (!targetFile.canWrite()) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_NOT_WRITABLE, targetFile.getAbsolutePath());
- errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, null));
- monitor.worked(1);
- return;
- }
- if (overwriteState == OVERWRITE_NONE) {
- return;
- } else if (overwriteState != OVERWRITE_ALL) {
- String overwriteAnswer = overwriteCallback.queryOverwrite(properPathString);
- if (overwriteAnswer.equals(IOverwriteQuery.CANCEL)) {
- throw new InterruptedException();
- } else if (overwriteAnswer.equals(IOverwriteQuery.NO)) {
- monitor.worked(1);
- return;
- } else if (overwriteAnswer.equals(IOverwriteQuery.NO_ALL)) {
- monitor.worked(1);
- overwriteState = OVERWRITE_NONE;
- return;
- } else if (overwriteAnswer.equals(IOverwriteQuery.ALL)) {
- overwriteState = OVERWRITE_ALL;
- }
- }
- } else if (!targetFile.exists()) {
- // need to do an export if target file does not exist, even if the local
- // file has not changed. This is for the scenario where a file may have been
- // exported, and the server copy was later deleted. The next export should put
- // the local copy back on the server, even if the local file was not changed.
- exportRequired = true;
- }
- try {
- exporter.write(file, fullPath);
- // if there are no exceptions, we should be here and the export should have completed fine
- // so we update the modification time at the time of export
- SystemIFileProperties props = new SystemIFileProperties(file);
- long modTime = file.getModificationStamp();
- props.setModificationStampAtExport(conn.getHostName(), destination, modTime);
- } catch (IOException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, e.getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, e));
- } catch (CoreException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, e.getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, e));
- } catch (RemoteFileIOException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, e.getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- } catch (RemoteFileSecurityException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, e.getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- } catch (Exception e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, e.getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, e));
- }
- monitor.worked(1);
- ModalContext.checkCanceled(monitor);
- }
-
- protected boolean isExportRequired(IFile file, String destinationPath) {
- if (conn != null) {
- // get the host name of the connection
- String hostName = conn.getHostName();
- SystemIFileProperties props = new SystemIFileProperties(file);
- // check if we have a modification time stored for the hostname/destination path combination
- boolean hasModTime = props.hasModificationStampAtExport(hostName, destinationPath);
- // if not, that means we are exporting for the first time
- if (!hasModTime) {
- return true;
- }
- // otherwise, check if the modification time stored is different to the modification time
- // of the file
- else {
- long modTime = props.getModificationStampAtExport(hostName, destinationPath);
- long currentModTime = file.getModificationStamp();
- // if the modification timestamps are different, then the file has changed
- // since the last export to the destination, so we need export it again
- if (modTime != currentModTime) {
- return true;
- }
- // otherwise, do not export
- else {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * Export the resources contained in the previously-defined
- * resourcesToExport collection
- */
- protected void exportSpecifiedResources() throws InterruptedException {
- Iterator resources = resourcesToExport.iterator();
- IPath initPath = (IPath) path.clone();
- while (resources.hasNext()) {
- IResource currentResource = (IResource) resources.next();
- if (!currentResource.isAccessible()) continue;
- path = initPath;
- if (resource == null) {
- // No root resource specified and creation of containment directories
- // is required. Create containers from depth 2 onwards (ie.- project's
- // child inclusive) for each resource being exported.
- if (createLeadupStructure) createLeadupDirectoriesFor(currentResource);
- } else {
- // Root resource specified. Must create containment directories
- // from this point onwards for each resource being exported
- IPath containersToCreate = currentResource.getFullPath().removeFirstSegments(resource.getFullPath().segmentCount()).removeLastSegments(1);
- for (int i = 0; i < containersToCreate.segmentCount(); i++) {
- path = path.append(containersToCreate.segment(i));
- exporter.createFolder(path);
- }
- }
- if (currentResource.getType() == IResource.FILE)
- exportFile((IFile) currentResource, path);
- else {
- if (createContainerDirectories) {
- path = path.append(currentResource.getName());
- exporter.createFolder(path);
- }
- try {
- exportChildren(((IContainer) currentResource).members(), path);
- } catch (CoreException e) {
- // should never happen because #isAccessible is called before #members is invoked,
- // which implicitly does an existence check
- errorTable.add(e.getStatus());
- }
- }
- }
- }
-
- /**
- * Returns the status of the export operation.
- * If there were any errors, the result is a status object containing
- * individual status objects for each error.
- * If there were no errors, the result is a status object with error code <code>OK</code>.
- *
- * @return the status
- */
- public IStatus getStatus() {
- IStatus[] errors = new IStatus[errorTable.size()];
- errorTable.toArray(errors);
- String msg = RemoteImportExportResources.FILEMSG_EXPORT_PROBLEMS;
- return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, msg, null);
- }
-
- /**
- * Answer a boolean indicating whether the passed child is a descendent
- * of one or more members of the passed resources collection
- *
- * @return boolean
- * @param resources java.util.List
- * @param child org.eclipse.core.resources.IResource
- */
- protected boolean isDescendent(List resources, IResource child) {
- if (child.getType() == IResource.PROJECT) return false;
- IResource parent = child.getParent();
- if (resources.contains(parent)) return true;
- return isDescendent(resources, parent);
- }
-
- /**
- * Export the resources that were previously specified for export
- * (or if a single resource was specified then export it recursively)
- */
- public void run(IProgressMonitor monitor) throws InterruptedException {
- this.monitor = monitor;
- IPath parentPath = (IPath)path.clone();
- if (resource != null) {
- if (createLeadupStructure) createLeadupDirectoriesFor(resource);
- if (createContainerDirectories && resource.getType() != IResource.FILE) { // ensure it's a container
- path = path.append(resource.getName());
- exporter.createFolder(path);
- }
- }
- try {
- int totalWork = IProgressMonitor.UNKNOWN;
- try {
- if (resourcesToExport == null)
- totalWork = countChildrenOf(resource);
- else
- totalWork = countSelectedResources();
- } catch (CoreException e) {
- // Should not happen
- errorTable.add(e.getStatus());
- }
- String taskMsg = SystemImportExportResources.RESID_FILEEXPORT_EXPORTING;
- monitor.beginTask(taskMsg, totalWork);
- if (resourcesToExport == null) {
- exportAllResources();
- } else {
- exportSpecifiedResources();
- }
-
- // fire event to update RSE
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- IRemoteFile destination = getRemoteFile(conn, parentPath);
-
- sr.fireEvent(new SystemResourceChangeEvent(destination, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null));
-
- if (saveSettings) {
- try {
- saveDescription();
- } catch (CoreException e) {
- SystemBasePlugin.logError("Error occured trying to save description " + descriptionFilePath, e); //$NON-NLS-1$
- errorTable.add(e.getStatus());
- } catch (IOException e) {
- SystemBasePlugin.logError("Error occured trying to save description " + descriptionFilePath, e); //$NON-NLS-1$
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, e.getLocalizedMessage(), e));
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- private IRemoteFile getRemoteFile(IHost conn, IPath path)
- {
- return Utilities.getIRemoteFile(conn, path.toString());
- }
-
- /**
- * Saves a description file for the export.
- * @throws CoreException if an unexpected exception occurs.
- * @throws IOException if an I/O error occurs.
- */
- protected void saveDescription() throws CoreException, IOException {
- ByteArrayOutputStream objectStreamOutput = new ByteArrayOutputStream();
- IRemoteFileExportDescriptionWriter writer = exportData.createExportDescriptionWriter(objectStreamOutput);
- ByteArrayInputStream fileInput = null;
- try {
- writer.write(exportData);
- fileInput = new ByteArrayInputStream(objectStreamOutput.toByteArray());
- IFile descriptionFile = exportData.getDescriptionFile();
- // check if resource exists
- if (descriptionFile.isAccessible()) {
- descriptionFile.setContents(fileInput, true, true, null);
- }
- // if resource does not exist
- else {
- // now have to check if a variant of this file exists (i.e. whether a file exists
- // that has the same path with a different case. For case insensitive file systems
- // such as Windows, this is needed since we can't simply create a file with a different
- // case. Note that isAccessible() above does not check for file paths with different case,
- // so we have to check it explicitly).
- IResource variant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(descriptionFile.getFullPath());
- // if a variant was not found, create the new file
- if (variant == null) {
- // check if a variant of the parent exists
- // we need to do this because at this point we know that the file path does not
- // exist, and neither does its variant. However, it is possible that the parent path
- // has a variant, in which case calling create on the description file with
- // the path as it is given will fail. We need to get the variant path of the parent,
- // append the name of the file to the variant path, and create a file with that path.
- // get parent
- IResource parent = descriptionFile.getParent();
- if (parent != null) {
- // get parent path
- IResource parentVariant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(parent.getFullPath());
- // no parent variant (i.e. in a case sensitive file system)
- if (parentVariant == null) {
- descriptionFile.create(fileInput, true, null);
- }
- // parent variant found (might be same as original parent path)
- else {
- IPath newPath = parentVariant.getFullPath().append(descriptionFile.getName());
- IFile newDescriptionFile = SystemBasePlugin.getWorkspace().getRoot().getFile(newPath);
- newDescriptionFile.create(fileInput, true, null);
- }
- }
- }
- // otherwise, simply set the contents of the variant file
- else {
- if (variant instanceof IFile) {
- ((IFile) variant).setContents(fileInput, true, true, null);
- }
- }
- }
- } finally {
- if (fileInput != null) {
- fileInput.close();
- }
- if (writer != null) {
- writer.close();
- }
- }
- }
-
- /**
- * Set this boolean indicating whether a directory should be created for
- * Folder resources that are explicitly passed for export
- *
- * @param value boolean
- */
- public void setCreateContainerDirectories(boolean value) {
- createContainerDirectories = value;
- }
-
- /**
- * Set this boolean indicating whether each exported resource's complete path should
- * include containment hierarchies as dictated by its parents
- *
- * @param value boolean
- */
- public void setCreateLeadupStructure(boolean value) {
- createLeadupStructure = value;
- }
-
- /**
- * Set this boolean indicating whether exported resources should automatically
- * overwrite existing files when a conflict occurs
- *
- * @param value boolean
- */
- public void setOverwriteFiles(boolean value) {
- if (value) {
- overwriteState = OVERWRITE_ALL;
- }
- }
-
- /**
- * Set this boolean indicating whether exported resources should automatically
- * be reviewed/synchronized
- *
- * @param value boolean
- */
- public void setReviewSynchronize(boolean value) {
- reviewSynchronize = value;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java
deleted file mode 100644
index 1abb83c4b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportProblemDialog;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.internal.synchronize.SynchronizeData;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.Synchronizer;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * This class is a remote file import action.
- */
-public class RemoteFileImportActionDelegate extends RemoteFileImportExportActionDelegate {
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IFile[] descriptions = getDescriptionFiles(getSelection());
- MultiStatus mergedStatus;
- int length = descriptions.length;
- if (length < 1) {
- return;
- }
- // create read multi status
- String message;
- if (length > 1) {
- message = RemoteImportExportResources.IMPORT_EXPORT_ERROR_CREATE_FILES_FAILED;
- } else {
- message = RemoteImportExportResources.IMPORT_EXPORT_ERROR_CREATE_FILE_FAILED;
- }
- MultiStatus readStatus = new MultiStatus(RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, null);
- RemoteFileImportData[] importDatas = readImportDatas(descriptions, readStatus);
- if (importDatas.length > 0) {
- IStatus status = importFiles(importDatas);
- if (status == null) {
- return;
- }
- if (readStatus.getSeverity() == IStatus.ERROR) {
- message = readStatus.getMessage();
- } else {
- message = status.getMessage();
- }
- // create new status because we want another message - no API to set message
- mergedStatus = new MultiStatus(RemoteImportExportPlugin.getDefault().getSymbolicName(), status.getCode(), readStatus.getChildren(), message, null);
- mergedStatus.merge(status);
- } else {
- mergedStatus = readStatus;
- }
- if (!mergedStatus.isOK()) {
- RemoteImportExportProblemDialog.open(getShell(), RemoteImportExportResources.IMPORT_EXPORT_IMPORT_ACTION_DELEGATE_TITLE, null, mergedStatus);
- }
- }
-
- private RemoteFileImportData[] readImportDatas(IFile[] descriptions, MultiStatus readStatus) {
- List importDataList = new ArrayList(descriptions.length);
- for (int i = 0; i < descriptions.length; i++) {
- RemoteFileImportData importData = readImportData(descriptions[i], readStatus);
- if (importData != null) {
- importDataList.add(importData);
- }
- }
- return (RemoteFileImportData[]) importDataList.toArray(new RemoteFileImportData[importDataList.size()]);
- }
-
- /**
- * Reads the file import data from a file.
- */
- protected RemoteFileImportData readImportData(IFile description, MultiStatus readStatus) {
- Assert.isLegal(description.isAccessible());
- Assert.isNotNull(description.getFileExtension());
- Assert.isLegal(description.getFileExtension().equals(Utilities.IMPORT_DESCRIPTION_EXTENSION));
- RemoteFileImportData importData = new RemoteFileImportData();
- IRemoteFileImportDescriptionReader reader = null;
- try {
- reader = importData.createImportDescriptionReader(description.getContents());
- // read export data
- reader.read(importData);
- // do not save settings again
- importData.setSaveSettings(false);
- } catch (CoreException ex) {
- String message = NLS.bind(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_READ, description.getFullPath(), ex.getStatus().getMessage());
- addToStatus(readStatus, message, ex);
- return null;
- } finally {
- if (reader != null) {
- readStatus.addAll(reader.getStatus());
- }
- try {
- if (reader != null) {
- reader.close();
- }
- } catch (CoreException ex) {
- String message = NLS.bind(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_CLOSE, description.getFullPath());
- addToStatus(readStatus, message, ex);
- }
- }
- return importData;
- }
-
- private IStatus importFiles(RemoteFileImportData[] importDatas) {
-// IStatus status = null;
-// for (int i = 0; i < importDatas.length; i++) {
-// RemoteFileImportOperation op = new RemoteFileImportOperation(importDatas[i], FileSystemStructureProvider.INSTANCE, new RemoteFileOverwriteQuery());
-// try {
-// PlatformUI.getWorkbench().getProgressService().run(true, true, op);
-// status = op.getStatus();
-// } catch (InvocationTargetException e) {
-// SystemBasePlugin.logError("Error occured trying to import", e); //$NON-NLS-1$
-// status = new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
-// } catch (InterruptedException e) {
-// SystemBasePlugin.logError("Error occured trying to import", e); //$NON-NLS-1$
-// status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
-// }
-// if (!status.isOK()) {
-// String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_FAILED, status);
-// Throwable e = status.getException();
-// SystemMessage msg = null;
-// if (e != null){
-// msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
-// IRemoteImportExportConstants.FILEMSG_IMPORT_FAILED,
-// IStatus.ERROR, msgTxt, e);
-// } else {
-// msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
-// IRemoteImportExportConstants.FILEMSG_IMPORT_FAILED,
-// IStatus.ERROR, msgTxt);
-// }
-//
-// SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
-// dlg.openWithDetails();
-// return null;
-// }
-// }
-// return null;
-
- for (int i = 0; i < importDatas.length; i++) {
- try {
- SynchronizeData data = new SynchronizeData(importDatas[i]);
- data.setSynchronizeType(ISynchronizeOperation.SYNC_MODE_UI_REVIEW);
- new Synchronizer(data).run(new SynchronizeOperation());
- } catch (SystemMessageException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return null;
- }
-
- protected void addToStatus(MultiStatus multiStatus, String defaultMessage, CoreException ex) {
- IStatus status = ex.getStatus();
- String message = ex.getLocalizedMessage();
- if (message == null || message.length() < 1) {
- status = new Status(status.getSeverity(), status.getPlugin(), status.getCode(), defaultMessage, ex);
- }
- multiStatus.add(status);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java
deleted file mode 100644
index f5698fac1..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportData.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * Holds data of what to import.
- */
-public class RemoteFileImportData {
- private IPath containerPath;
- private Object source;
- private boolean overWriteExistingFiles;
- private boolean createDirectoryStructure;
- private boolean createSelectionOnly;
- private boolean saveSettings;
- private String descriptionFilePath;
- // import elements
- private HashMap map;
- private List elements;
-
- private boolean reviewSynchronize;
-
- /**
- * Constructor.
- */
- public RemoteFileImportData() {
- setContainerPath(null);
- setSource(null);
- setOverWriteExistingFiles(false);
- setCreateDirectoryStructure(false);
- setCreateSelectionOnly(true);
- setSaveSettings(false);
- setDescriptionFilePath(null);
- }
-
- /**
- * @return Returns the descriptionFilePath.
- */
- public String getDescriptionFilePath() {
- return descriptionFilePath;
- }
-
- /**
- * Gets the description file as a workspace resource.
- * @return a file representing the description file.
- */
- public IFile getDescriptionFile() {
- IPath path = new Path(getDescriptionFilePath());
- if (path.isValidPath(path.toString()) && path.segmentCount() >= 2) {
- return SystemBasePlugin.getWorkspace().getRoot().getFile(path);
- } else {
- return null;
- }
- }
-
- /**
- * @param descriptionFilePath The descriptionFilePath to set.
- */
- public void setDescriptionFilePath(String descriptionFilePath) {
- this.descriptionFilePath = descriptionFilePath;
- }
-
- /**
- * @return returns container path.
- */
- public IPath getContainerPath() {
- return containerPath;
- }
-
- /**
- * @param containerPath the container path.
- */
- public void setContainerPath(IPath containerPath) {
- this.containerPath = containerPath;
- }
-
- /**
- * Gets the source.
- * @return the source from which to import.
- */
- public Object getSource() {
- return source;
- }
-
- /**
- * Sets the source.
- * @param source the source from which to import.
- */
- public void setSource(Object source) {
- this.source = source;
- }
-
- /**
- * Returns the elements to be imported.
- * @return the elements.
- */
- public List getElements() {
- return elements;
- }
-
- /**
- * Sets the elements to imported.
- * @param elements the elements.
- */
- public void setElements(List elements) {
- this.elements = elements;
- }
-
- /**
- * Add to the list of files to import.
- * @param object the file object.
- */
- public void addToList(UniFilePlus object) {
- if (map == null) {
- map = new HashMap();
- }
- // add to map
- map.put(object.getAbsolutePath(), object);
- }
-
- /**
- * Does the file exist.
- * @param object the file object.
- * @return <code>true</code> of the
- */
- public boolean doesExist(UniFilePlus object) {
- if (map.get(object.getAbsolutePath()) == null) {
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * @return Returns the overWriteExistingFiles.
- */
- public boolean isOverWriteExistingFiles() {
- return overWriteExistingFiles;
- }
-
- /**
- * @param overWriteExistingFiles The overWriteExistingFiles to set.
- */
- public void setOverWriteExistingFiles(boolean overWriteExistingFiles) {
- this.overWriteExistingFiles = overWriteExistingFiles;
- }
-
- public boolean isReviewSynchronize(){
- return reviewSynchronize;
- }
-
- public void setReviewSynchronize(boolean reviewSynchronize){
- this.reviewSynchronize = reviewSynchronize;
- }
-
- /**
- * @return Returns the saveSettings.
- */
- public boolean isSaveSettings() {
- return saveSettings;
- }
-
- /**
- * @param saveSettings The saveSettings to set.
- */
- public void setSaveSettings(boolean saveSettings) {
- this.saveSettings = saveSettings;
- }
-
- /**
- * @return Returns the createDirectoryStructure.
- */
- public boolean isCreateDirectoryStructure() {
- return createDirectoryStructure;
- }
-
- /**
- * @param createDirectoryStructure The createDirectoryStructure to set.
- */
- public void setCreateDirectoryStructure(boolean createDirectoryStructure) {
- this.createDirectoryStructure = createDirectoryStructure;
- }
-
- /**
- * @return Returns the createSelectionOnly.
- */
- public boolean isCreateSelectionOnly() {
- return createSelectionOnly;
- }
-
- /**
- * @param createSelectionOnly The createSelectionOnly to set.
- */
- public void setCreateSelectionOnly(boolean createSelectionOnly) {
- this.createSelectionOnly = createSelectionOnly;
- }
-
- /**
- * Creates and returns an import description writer.
- */
- public IRemoteFileImportDescriptionWriter createImportDescriptionWriter(OutputStream outputStream) {
- return new RemoteFileImportDescriptionWriter(outputStream);
- }
-
- /**
- * Creates and returns an import description writer.
- */
- public IRemoteFileImportDescriptionReader createImportDescriptionReader(InputStream inputStream) {
- return new RemoteFileImportDescriptionReader(inputStream);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java
deleted file mode 100644
index 9a806aec3..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-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.rse.internal.importexport.RemoteImportExportPlugin;
-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.SystemBasePlugin;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Remote file import description reader.
- */
-public class RemoteFileImportDescriptionReader implements IRemoteFileImportDescriptionReader {
- protected InputStream fInputStream;
- protected IRemoteFileSubSystem subsystem;
-
- /**
- * Constructor.
- */
- public RemoteFileImportDescriptionReader(InputStream inputStream) {
- Assert.isNotNull(inputStream);
- fInputStream = new BufferedInputStream(inputStream);
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionReader#read(org.eclipse.rse.internal.importexport.files.RemoteFileImportData)
- */
- public void read(RemoteFileImportData importData) throws CoreException {
- try {
- readXML(importData);
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- } catch (SAXException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
-
- public RemoteFileImportData readXML(RemoteFileImportData importData) throws IOException, SAXException {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- DocumentBuilder parser = null;
- try {
- parser = factory.newDocumentBuilder();
- } catch (ParserConfigurationException ex) {
- throw new IOException(ex.getLocalizedMessage());
- }
- Element xmlFileDesc = parser.parse(new InputSource(fInputStream)).getDocumentElement();
- if (!xmlFileDesc.getNodeName().equals(Utilities.IMPORT_DESCRIPTION_EXTENSION)) {
- throw new IOException();
- }
- NodeList topLevelElements = xmlFileDesc.getChildNodes();
- for (int i = 0; i < topLevelElements.getLength(); i++) {
- Node node = topLevelElements.item(i);
- if (node.getNodeType() != Node.ELEMENT_NODE) continue;
- Element element = (Element) node;
- xmlReadDestinationLocation(importData, element);
- xmlReadOptions(importData, element);
- xmlReadSourceLocation(importData, element);
- xmlReadSelectedElements(importData, element);
- }
- return importData;
- }
-
- private void xmlReadDestinationLocation(RemoteFileImportData importData, Element element) {
- if (element.getNodeName().equals("destination")) { //$NON-NLS-1$
- String destinationPath = element.getAttribute("path"); //$NON-NLS-1$
- importData.setContainerPath(new Path(destinationPath));
- }
- }
-
- private void xmlReadOptions(RemoteFileImportData importData, Element element) throws IOException {
- if (element.getNodeName().equals("options")) { //$NON-NLS-1$
- try {
- importData.setReviewSynchronize(getBooleanAttribute(element, "reviewSynchronize")); //$NON-NLS-1$
- }
- catch (IOException e){
- // this is a new option so if we're reading an older config file, this attribute doesn't exist
- importData.setReviewSynchronize(false);
- }
- importData.setOverWriteExistingFiles(getBooleanAttribute(element, "overWriteExistingFiles")); //$NON-NLS-1$
- importData.setCreateDirectoryStructure(getBooleanAttribute(element, "createDirectoryStructure")); //$NON-NLS-1$
- importData.setCreateSelectionOnly(getBooleanAttribute(element, "createSelectedOnly")); //$NON-NLS-1$
- importData.setSaveSettings(getBooleanAttribute(element, "saveSettings")); //$NON-NLS-1$
- importData.setDescriptionFilePath(element.getAttribute("descriptionFilePath")); //$NON-NLS-1$
- }
- }
-
- private void xmlReadSourceLocation(RemoteFileImportData importData, Element element) {
- if (element.getNodeName().equals("source")) { //$NON-NLS-1$
- String sourceCanonicalPath = element.getAttribute("path"); //$NON-NLS-1$
- IRemoteFile remoteFile = Utilities.parseForIRemoteFile(sourceCanonicalPath);
- UniFilePlus file = new UniFilePlus(remoteFile);
- importData.setSource(file);
- subsystem = remoteFile.getParentRemoteFileSubSystem();
- }
- }
-
- private void xmlReadSelectedElements(RemoteFileImportData importData, Element element) throws IOException {
- if (element.getNodeName().equals("selectedElements")) { //$NON-NLS-1$
- NodeList selectedElements = element.getChildNodes();
- List elementsToImport = new ArrayList(selectedElements.getLength());
- for (int j = 0; j < selectedElements.getLength(); j++) {
- Node selectedNode = selectedElements.item(j);
- if (selectedNode.getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
- Element selectedElement = (Element) selectedNode;
- if (selectedElement.getNodeName().equals("file")) { //$NON-NLS-1$
- addResource(importData, elementsToImport, selectedElement);
- } else if (selectedElement.getNodeName().equals("folder")) { //$NON-NLS-1$
- addResource(importData, elementsToImport, selectedElement);
- }
- }
- importData.setElements(elementsToImport);
- }
- }
-
- private void addResource(RemoteFileImportData importData, List selectedElements, Element element) throws IOException {
- String path = element.getAttribute("path"); //$NON-NLS-1$
- if (path != null && subsystem != null) {
- IRemoteFile remoteFile = null;
- try {
- remoteFile = subsystem.getRemoteFileObject(path, new NullProgressMonitor());
- if (remoteFile != null && remoteFile.exists()) {
- UniFilePlus file = new UniFilePlus(remoteFile);
- selectedElements.add(file);
- // add to list of import data
- importData.addToList(file);
- }
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("Error occured trying to retrieve file " + path, e); //$NON-NLS-1$
- }
- }
- }
-
- protected boolean getBooleanAttribute(Element element, String name) throws IOException {
- String value = element.getAttribute(name);
- if (value != null && value.equalsIgnoreCase("true")) { //$NON-NLS-1$
- return true;
- }
- if (value != null && value.equalsIgnoreCase("false")) { //$NON-NLS-1$
- return false;
- }
- throw new IOException();
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionReader#close()
- */
- public void close() throws CoreException {
- if (fInputStream != null) {
- try {
- fInputStream.close();
- subsystem = null;
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionReader#getStatus()
- */
- public IStatus getStatus() {
- return new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, "", null); //$NON-NLS-1$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java
deleted file mode 100644
index f799c8eb3..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Remote file import description writer.
- */
-public class RemoteFileImportDescriptionWriter implements IRemoteFileImportDescriptionWriter {
- protected OutputStream fOutputStream;
-
- /**
- * Constructor.
- */
- public RemoteFileImportDescriptionWriter(OutputStream outputStream) {
- Assert.isNotNull(outputStream);
- fOutputStream = new BufferedOutputStream(outputStream);
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionWriter#write(org.eclipse.rse.internal.importexport.files.RemoteFileImportData)
- */
- public void write(RemoteFileImportData importData) throws CoreException {
- try {
- writeXML(importData);
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
-
- /**
- * Writes a XML representation of file import data.
- * @exception IOException if writing to the underlying stream fails.
- */
- public void writeXML(RemoteFileImportData importData) throws IOException {
- Assert.isNotNull(importData);
- DocumentBuilder docBuilder = null;
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- try {
- docBuilder = factory.newDocumentBuilder();
- } catch (ParserConfigurationException ex) {
- throw new IOException(ex.getLocalizedMessage());
- }
- Document document = docBuilder.newDocument();
- // create the document
- Element xmlFileDesc = document.createElement(Utilities.IMPORT_DESCRIPTION_EXTENSION);
- document.appendChild(xmlFileDesc);
- xmlWriteDestinationLocation(importData, document, xmlFileDesc);
- xmlWriteOptions(importData, document, xmlFileDesc);
- xmlWriteSourceLocation(importData, document, xmlFileDesc);
- xmlWriteSelectedElements(importData, document, xmlFileDesc);
- try {
- // write the document to the stream
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- DOMSource source = new DOMSource(document);
- StreamResult result = new StreamResult(fOutputStream);
- transformer.transform(source, result);
- } catch (TransformerException e) {
- throw new IOException(e.getLocalizedMessage());
- }
- }
-
- private void xmlWriteDestinationLocation(RemoteFileImportData importData, Document document, Element xmlFileDesc) throws DOMException {
- Element destination = document.createElement("destination"); //$NON-NLS-1$
- xmlFileDesc.appendChild(destination);
- destination.setAttribute("path", importData.getContainerPath().toString()); //$NON-NLS-1$
- }
-
- private void xmlWriteOptions(RemoteFileImportData importData, Document document, Element xmlFileDesc) throws DOMException {
- Element options = document.createElement("options"); //$NON-NLS-1$
- xmlFileDesc.appendChild(options);
- options.setAttribute("reviewSynchronize", "" + importData.isReviewSynchronize()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("overWriteExistingFiles", "" + importData.isOverWriteExistingFiles()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("createDirectoryStructure", "" + importData.isCreateDirectoryStructure()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("createSelectedOnly", "" + importData.isCreateSelectionOnly()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("saveSettings", "" + importData.isSaveSettings()); //$NON-NLS-1$ //$NON-NLS-2$
- options.setAttribute("descriptionFilePath", "" + importData.getDescriptionFilePath()); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private void xmlWriteSourceLocation(RemoteFileImportData importData, Document document, Element xmlFileDesc) throws DOMException {
- Element source = document.createElement("source"); //$NON-NLS-1$
- xmlFileDesc.appendChild(source);
- UniFilePlus sourceResource = (UniFilePlus) (importData.getSource());
- // save path along with profile and connection name
- source.setAttribute("path", sourceResource.getCanonicalPath()); //$NON-NLS-1$
- }
-
- private void xmlWriteSelectedElements(RemoteFileImportData exportData, Document document, Element xmlFileDesc) throws DOMException {
- Element selectedElements = document.createElement("selectedElements"); //$NON-NLS-1$
- xmlFileDesc.appendChild(selectedElements);
- List elements = exportData.getElements();
- Iterator iter = elements.iterator();
- while (iter.hasNext()) {
- Object element = iter.next();
- if (element instanceof UniFilePlus) {
- add((UniFilePlus) element, selectedElements, document);
- }
- }
- }
-
- private void add(UniFilePlus resource, Element parent, Document document) {
- Element element = null;
- if (resource.isFile()) {
- element = document.createElement("file"); //$NON-NLS-1$
- } else if (resource.isDirectory()) {
- element = document.createElement("folder"); //$NON-NLS-1$
- }
- if (element != null) {
- parent.appendChild(element);
- element.setAttribute("path", resource.getAbsolutePath()); //$NON-NLS-1$
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionWriter#close()
- */
- public void close() throws CoreException {
- if (fOutputStream != null) {
- try {
- fOutputStream.close();
- } catch (IOException ex) {
- String message = (ex.getLocalizedMessage() != null ? ex.getLocalizedMessage() : ""); //$NON-NLS-1$
- throw new CoreException(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, message, ex));
- }
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionWriter#getStatus()
- */
- public IStatus getStatus() {
- return new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, "", null); //$NON-NLS-1$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportExportActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportExportActionDelegate.java
deleted file mode 100644
index e9fe24e6a..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportExportActionDelegate.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-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.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;
-
-/**
- * This class is the super class of file import/export action delegate.
- */
-public abstract class RemoteFileImportExportActionDelegate implements IActionDelegate {
- protected IStructuredSelection fSelection;
-
- /**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java
deleted file mode 100644
index 89d87a43a..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java
+++ /dev/null
@@ -1,691 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- * David McKnight (IBM) - [276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-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.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-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.MultiStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.files.ui.FileResources;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.ContainerGenerator;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-// Similar to org.eclipse.ui.wizards.datatransfer.ImportOperation
-/**
- * An operation which does the actual work of copying objects from the local
- * file system into the workspace.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RemoteFileImportOperation extends WorkspaceModifyOperation {
- private static final int POLICY_DEFAULT = 0;
- private static final int POLICY_SKIP_CHILDREN = 1;
- private static final int POLICY_FORCE_OVERWRITE = 2;
- private Object source;
- private IPath destinationPath;
- private IContainer destinationContainer;
- private List selectedFiles;
- private IImportStructureProvider provider;
- private IProgressMonitor monitor;
- protected IOverwriteQuery overwriteCallback;
- private List errorTable = new ArrayList();
- private boolean createContainerStructure = true;
- private RemoteFileImportData importData;
- private boolean saveSettings;
- private String descriptionFilePath;
- //The constants for the overwrite 3 state
- private static final int OVERWRITE_NOT_SET = 0;
- private static final int OVERWRITE_NONE = 1;
- private static final int OVERWRITE_ALL = 2;
- private int overwriteState = OVERWRITE_NOT_SET;
-
- private boolean reviewSynchronize = true;
-
- /**
- * Creates a new operation that recursively imports the entire contents of the
- * specified root file system object.
- * <p>
- * The <code>source</code> parameter represents the root file system object to
- * import. All contents of this object are imported. Valid types for this parameter
- * are determined by the supplied <code>IImportStructureProvider</code>.
- * </p>
- * <p>
- * The <code>provider</code> parameter allows this operation to deal with the
- * source object in an abstract way. This operation calls methods on the provider
- * and the provider in turn calls specific methods on the source object.
- * </p>
- * <p>
- * The default import behavior is to recreate the complete container structure
- * for the contents of the root file system object in their destination.
- * If <code>setCreateContainerStructure</code> is set to false then the container
- * structure created is relative to the root file system object.
- * </p>
- *
- * @param containerPath the full path of the destination container within the
- * workspace
- * @param source the root file system object to import
- * @param provider the file system structure provider to use
- * @param overwriteImplementor the overwrite strategy to use
- */
- public RemoteFileImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor) {
- super();
- this.destinationPath = containerPath;
- this.source = source;
- this.provider = provider;
- overwriteCallback = overwriteImplementor;
- }
-
- /**
- * Creates a new operation that imports specific file system objects.
- * In this usage context, the specified source file system object is used by the
- * operation solely to determine the destination container structure of the file system
- * objects being imported.
- * <p>
- * The <code>source</code> parameter represents the root file system object to
- * import. Valid types for this parameter are determined by the supplied
- * <code>IImportStructureProvider</code>. The contents of the source which
- * are to be imported are specified in the <code>filesToImport</code>
- * parameter.
- * </p>
- * <p>
- * The <code>provider</code> parameter allows this operation to deal with the
- * source object in an abstract way. This operation calls methods on the provider
- * and the provider in turn calls specific methods on the source object.
- * </p>
- * <p>
- * The <code>filesToImport</code> parameter specifies what contents of the root
- * file system object are to be imported.
- * </p>
- * <p>
- * The default import behavior is to recreate the complete container structure
- * for the file system objects in their destination. If <code>setCreateContainerStructure</code>
- * is set to <code>false</code>, then the container structure created for each of
- * the file system objects is relative to the supplied root file system object.
- * </p>
- *
- * @param containerPath the full path of the destination container within the
- * workspace
- * @param source the root file system object to import from
- * @param provider the file system structure provider to use
- * @param overwriteImplementor the overwrite strategy to use
- * @param filesToImport the list of file system objects to be imported
- * (element type: <code>Object</code>)
- */
- public RemoteFileImportOperation(IPath containerPath, Object source, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport) {
- this(containerPath, source, provider, overwriteImplementor);
- setFilesToImport(filesToImport);
- }
-
- public RemoteFileImportOperation(RemoteFileImportData data, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor) {
- this(data.getContainerPath(), data.getSource(), provider, overwriteImplementor);
- setFilesToImport(data.getElements());
- setOverwriteResources(data.isOverWriteExistingFiles());
- setReviewSynchronize(data.isReviewSynchronize());
- setCreateContainerStructure(data.isCreateDirectoryStructure());
- this.importData = data;
- this.saveSettings = data.isSaveSettings();
- this.descriptionFilePath = data.getDescriptionFilePath();
- }
-
- /**
- * Creates a new operation that imports specific file system objects.
- * <p>
- * The <code>provider</code> parameter allows this operation to deal with the
- * source object in an abstract way. This operation calls methods on the provider
- * and the provider in turn calls specific methods on the source object.
- * </p>
- * <p>
- * The <code>filesToImport</code> parameter specifies what file system objects
- * are to be imported.
- * </p>
- * <p>
- * The default import behavior is to recreate the complete container structure
- * for the file system objects in their destination. If <code>setCreateContainerStructure</code>
- * is set to <code>false</code>, then no container structure is created for each of
- * the file system objects.
- * </p>
- *
- * @param containerPath the full path of the destination container within the
- * workspace
- * @param provider the file system structure provider to use
- * @param overwriteImplementor the overwrite strategy to use
- * @param filesToImport the list of file system objects to be imported
- * (element type: <code>Object</code>)
- */
- public RemoteFileImportOperation(IPath containerPath, IImportStructureProvider provider, IOverwriteQuery overwriteImplementor, List filesToImport) {
- this(containerPath, null, provider, overwriteImplementor);
- setFilesToImport(filesToImport);
- }
-
- /**
- * Creates the folders that appear in the specified resource path.
- * These folders are created relative to the destination container.
- *
- * @param path the relative path of the resource
- * @return the container resource coresponding to the given path
- * @exception CoreException if this method failed
- */
- IContainer createContainersFor(IPath path) throws CoreException {
- IContainer currentFolder = destinationContainer;
- int segmentCount = path.segmentCount();
- //No containers to create
- if (segmentCount == 0) return currentFolder;
- //Needs to be handles differently at the root
- if (currentFolder.getType() == IResource.ROOT) return createFromRoot(path);
- for (int i = 0; i < segmentCount; i++) {
- currentFolder = currentFolder.getFolder(new Path(path.segment(i)));
- if (!currentFolder.exists()) ((IFolder) currentFolder).create(false, true, null);
- }
- return currentFolder;
- }
-
- /**
- * Creates the folders that appear in the specified resource path
- * assuming that the destinationContainer begins at the root. Do not create projects.
- *
- * @param path the relative path of the resource
- * @return the container resource coresponding to the given path
- * @exception CoreException if this method failed
- */
- private IContainer createFromRoot(IPath path) throws CoreException {
- int segmentCount = path.segmentCount();
- //Assume the project exists
- IContainer currentFolder = ((IWorkspaceRoot) destinationContainer).getProject(path.segment(0));
- for (int i = 1; i < segmentCount; i++) {
- currentFolder = currentFolder.getFolder(new Path(path.segment(i)));
- if (!currentFolder.exists()) ((IFolder) currentFolder).create(false, true, null);
- }
- return currentFolder;
- }
-
- /**
- * Deletes the given resource. If the resource fails to be deleted, adds a
- * status object to the list to be returned by <code>getResult</code>.
- *
- * @param resource the resource
- */
- void deleteResource(IResource resource) {
- try {
- resource.delete(IResource.KEEP_HISTORY, null);
- } catch (CoreException e) {
- errorTable.add(e.getStatus());
- }
- }
-
- /**
- * Attempts to ensure that the given resource does not already exist in the
- * workspace. The resource will be deleted if required, perhaps after asking
- * the user's permission.
- *
- * @param targetResource the resource that should not exist
- * @param policy determines how the resource is imported
- * @return <code>true</code> if the resource does not exist, and
- * <code>false</code> if it does exist
- */
- boolean ensureTargetDoesNotExist(IResource targetResource, int policy) {
- if (targetResource.exists()) {
- //If force overwrite is on don't bother
- if (policy != POLICY_FORCE_OVERWRITE) {
- if (this.overwriteState == OVERWRITE_NOT_SET && !queryOverwrite(targetResource.getFullPath())) return false;
- if (this.overwriteState == OVERWRITE_NONE) return false;
- }
- deleteResource(targetResource);
- }
- return true;
- }
-
- /* (non-Javadoc)
- * Method declared on WorkbenchModifyOperation.
- * Imports the specified file system objects from the file system.
- */
- protected void execute(IProgressMonitor progressMonitor) {
- monitor = progressMonitor;
- try {
- if (selectedFiles == null) {
- //Set the amount to 1000 as we have no idea of how long this will take
- String taskMsg = SystemImportExportResources.RESID_FILEIMPORT_IMPORTING;
- monitor.beginTask(taskMsg, 1000);
- ContainerGenerator generator = new ContainerGenerator(destinationPath);
- monitor.worked(50);
- destinationContainer = generator.generateContainer(new SubProgressMonitor(monitor, 50));
- importRecursivelyFrom(source, POLICY_DEFAULT);
- //Be sure it finishes
- monitor.worked(90);
- } else {
- // Choose twice the selected files size to take folders into account
- int creationCount = selectedFiles.size();
- String taskMsg = SystemImportExportResources.RESID_FILEIMPORT_IMPORTING;
- monitor.beginTask(taskMsg, creationCount + 100);
- ContainerGenerator generator = new ContainerGenerator(destinationPath);
- monitor.worked(50);
- destinationContainer = generator.generateContainer(new SubProgressMonitor(monitor, 50));
- importFileSystemObjects(selectedFiles);
- }
- if (saveSettings) {
- try {
- saveDescription();
- } catch (CoreException e) {
- SystemBasePlugin.logError("Error occured trying to save description " + descriptionFilePath, e); //$NON-NLS-1$
- errorTable.add(e.getStatus());
- } catch (IOException e) {
- SystemBasePlugin.logError("Error occured trying to save description " + descriptionFilePath, e); //$NON-NLS-1$
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getSymbolicName(), 0, e.getLocalizedMessage(), e));
- }
- }
- } catch (CoreException e) {
- errorTable.add(e.getStatus());
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Saves a description file for the export.
- * @throws CoreException if an unexpected exception occurs.
- * @throws IOException if an I/O error occurs.
- */
- protected void saveDescription() throws CoreException, IOException {
- ByteArrayOutputStream objectStreamOutput = new ByteArrayOutputStream();
- IRemoteFileImportDescriptionWriter writer = importData.createImportDescriptionWriter(objectStreamOutput);
- ByteArrayInputStream fileInput = null;
- try {
- writer.write(importData);
- fileInput = new ByteArrayInputStream(objectStreamOutput.toByteArray());
- IFile descriptionFile = importData.getDescriptionFile();
- // check if resource exists
- if (descriptionFile.isAccessible()) {
- descriptionFile.setContents(fileInput, true, true, null);
- }
- // if resource does not exist
- else {
- // now have to check if a variant of this file exists (i.e. whether a file exists
- // that has the same path with a different case. For case insensitive file systems
- // such as Windows, this is needed since we can't simply create a file with a different
- // case. Note that isAccessible() above does not check for file paths with different case,
- // so we have to check it explicitly).
- IResource variant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(descriptionFile.getFullPath());
- // if a variant was not found, create the new file
- if (variant == null) {
- // check if a variant of the parent exists
- // we need to do this because at this point we know that the file path does not
- // exist, and neither does its variant. However, it is possible that the parent path
- // has a variant, in which case calling create on the description file with
- // the path as it is given will fail. We need to get the variant path of the parent,
- // append the name of the file to the variant path, and create a file with that path.
- // get parent
- IResource parent = descriptionFile.getParent();
- if (parent != null) {
- // get parent path
- IResource parentVariant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(parent.getFullPath());
- // no parent variant (i.e. in a case sensitive file system)
- if (parentVariant == null) {
- descriptionFile.create(fileInput, true, null);
- }
- // parent variant found (might be same as original parent path)
- else {
- IPath newPath = parentVariant.getFullPath().append(descriptionFile.getName());
- IFile newDescriptionFile = SystemBasePlugin.getWorkspace().getRoot().getFile(newPath);
- newDescriptionFile.create(fileInput, true, null);
- }
- }
- }
- // otherwise, simply set the contents of the variant file
- else {
- if (variant instanceof IFile) {
- ((IFile) variant).setContents(fileInput, true, true, null);
- }
- }
- }
- } finally {
- if (fileInput != null) {
- fileInput.close();
- }
- if (writer != null) {
- writer.close();
- }
- }
- }
-
- /**
- * Returns the container resource that the passed file system object should be
- * imported into.
- *
- * @param fileSystemObject the file system object being imported
- * @return the container resource that the passed file system object should be
- * imported into
- * @exception CoreException if this method failed
- */
- IContainer getDestinationContainerFor(Object fileSystemObject) throws CoreException {
- IPath pathname = new Path(provider.getFullPath(fileSystemObject));
- if (createContainerStructure)
- return createContainersFor(pathname.removeLastSegments(1));
- else {
- if (source == fileSystemObject) return null;
- IPath sourcePath = new Path(provider.getFullPath(source));
- IPath destContainerPath = pathname.removeLastSegments(1);
- IPath relativePath = destContainerPath.removeFirstSegments(sourcePath.segmentCount()).setDevice(null);
- return createContainersFor(relativePath);
- }
- }
-
- /**
- * Returns the status of the import operation.
- * If there were any errors, the result is a status object containing
- * individual status objects for each error.
- * If there were no errors, the result is a status object with error code <code>OK</code>.
- *
- * @return the status
- */
- public IStatus getStatus() {
- IStatus[] errors = new IStatus[errorTable.size()];
- errorTable.toArray(errors);
- // IFS:
- String msg = RemoteImportExportResources.FILEMSG_IMPORT_PROBLEMS;
- return new MultiStatus(RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, errors, msg, null);
- }
-
- private IFile existingFileInDifferentCase(IFile file) throws CoreException {
-
- boolean isWindows = System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$//$NON-NLS-2$
- if (!isWindows) // if the system is case sensitive then we're good
- return null;
-
- String newName = file.getName();
-
- //now look for a matching case variant in the tree
- IContainer parent = file.getParent();
- IResource[] members = parent.members();
- for (int i = 0; i < members.length; i++){
- IResource member = members[i];
- if (member instanceof IFile){
- String memberName = member.getName();
- if (newName.equalsIgnoreCase(memberName)){
- return (IFile)member;
- }
- }
- }
- return null;
- }
-
- /**
- * Imports the specified file system object into the workspace.
- * If the import fails, adds a status object to the list to be returned by
- * <code>getResult</code>.
- *
- * @param fileObject the file system object to be imported
- * @param policy determines how the file object is imported
- */
- void importFile(Object fileObject, int policy) {
- IContainer containerResource;
- try {
- containerResource = getDestinationContainerFor(fileObject);
- } catch (CoreException e) {
- IStatus coreStatus = e.getStatus();
- String newMessage = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_ERROR, fileObject, coreStatus.getMessage());
- IStatus status = new Status(coreStatus.getSeverity(), coreStatus.getPlugin(), coreStatus.getCode(), newMessage, null);
- errorTable.add(status);
- return;
- }
- String fileObjectPath = provider.getFullPath(fileObject);
- monitor.subTask(fileObjectPath);
- IFile targetResource = containerResource.getFile(new Path(provider.getLabel(fileObject)));
- monitor.worked(1);
- // ensure that the source and target are not the same
- IPath targetPath = targetResource.getLocation();
- // Use Files for comparison to avoid platform specific case issues
- if (targetPath != null && (targetPath.toFile().equals(new File(fileObjectPath)))) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_SELF, fileObjectPath);
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, null));
- return;
- }
- if (!ensureTargetDoesNotExist(targetResource, policy)) {
- // Do not add an error status because the user
- // has explicitely said no overwrite. Do not
- // update the monitor as it was done in queryOverwrite.
- return;
- }
- try {
- IRemoteFileSubSystem rfss = RemoteFileUtility.getFileSubSystem(((UniFilePlus) fileObject).remoteFile.getHost());
- // 030820: added the following kludge to circumvent problem in
- // artemis. (artemis 3 will fix this)
- // TODO remove for 6.0
- String encoding = ((UniFilePlus) fileObject).remoteFile.getEncoding();
- if (encoding.startsWith("CP")) //$NON-NLS-1$
- {
- encoding = "Cp" + encoding.substring(2); //$NON-NLS-1$
- }
-
- // check for existing resource
- IFile existingFile = existingFileInDifferentCase(targetResource);
- if (existingFile != null){
- String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS, existingFile.getFullPath());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(),msgDetails));
- return;
- }
-
-
- rfss.download(((UniFilePlus) fileObject).remoteFile, targetResource.getLocation().makeAbsolute().toOSString(), encoding, null);
- try {
- // refresh workspace with just added resource
- targetResource.refreshLocal(IResource.DEPTH_ZERO, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));
- } catch (CoreException e) {
- errorTable.add(e.getStatus());
- }
- } catch (RemoteFileIOException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_ERROR, fileObjectPath, e.getRemoteException().getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- return;
- } catch (RemoteFileSecurityException e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_ERROR, fileObjectPath, e.getRemoteException().getLocalizedMessage());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- return;
- } catch (Exception e) {
- String msg = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_ERROR, fileObjectPath, e.getMessage() == null ? e.toString() : e.getMessage());
- errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
- return;
- }
- }
-
- /**
- * Imports the specified file system objects into the workspace.
- * If the import fails, adds a status object to the list to be returned by
- * <code>getStatus</code>.
- *
- * @param filesToImport the list of file system objects to import
- * (element type: <code>Object</code>)
- * @exception OperationCanceledException if cancelled
- */
- void importFileSystemObjects(List filesToImport) {
- Iterator filesEnum = filesToImport.iterator();
- while (filesEnum.hasNext()) {
- Object fileSystemObject = filesEnum.next();
- if (source == null) {
- // We just import what we are given into the destination
- IPath sourcePath = new Path(provider.getFullPath(fileSystemObject)).removeLastSegments(1);
- if (provider.isFolder(fileSystemObject) && sourcePath.isEmpty()) {
- // If we don't have a parent then we have selected the
- // file systems root. Roots can't copied (at least not
- // under windows).
- String msg = RemoteImportExportResources.FILEMSG_COPY_ROOT;
- errorTable.add(new Status(IStatus.INFO, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, null));
- continue;
- }
- source = sourcePath.toFile();
- }
- importRecursivelyFrom(fileSystemObject, POLICY_DEFAULT);
- }
- }
-
- /**
- * Imports the specified file system container object into the workspace.
- * If the import fails, adds a status object to the list to be returned by
- * <code>getResult</code>.
- *
- * @param fileObject the file system container object to be imported
- * @param policy determines how the folder object and children are imported
- * @return the policy to use to import the folder's children
- */
- int importFolder(Object folderObject, int policy) {
- IContainer containerResource;
- try {
- containerResource = getDestinationContainerFor(folderObject);
- } catch (CoreException e) {
- errorTable.add(e.getStatus());
- return policy;
- }
- if (containerResource == null) return policy;
- monitor.subTask(provider.getFullPath(folderObject));
- IWorkspace workspace = destinationContainer.getWorkspace();
- IPath containerPath = containerResource.getFullPath();
- IPath resourcePath = containerPath.append(provider.getLabel(folderObject));
- // Do not attempt the import if the resource path is unchanged. This may happen
- // when importing from a zip file.
- if (resourcePath.equals(containerPath)) return policy;
- if (workspace.getRoot().exists(resourcePath)) {
- if (policy != POLICY_FORCE_OVERWRITE) {
- if (this.overwriteState == OVERWRITE_NONE || !queryOverwrite(resourcePath)) // Do not add an error status because the user
- // has explicitely said no overwrite. Do not
- // update the monitor as it was done in queryOverwrite.
- return POLICY_SKIP_CHILDREN;
- }
- return POLICY_FORCE_OVERWRITE;
- }
- try {
- workspace.getRoot().getFolder(resourcePath).create(false, true, null);
- } catch (CoreException e) {
- errorTable.add(e.getStatus());
- }
- return policy;
- }
-
- /**
- * Imports the specified file system object recursively into the workspace.
- * If the import fails, adds a status object to the list to be returned by
- * <code>getStatus</code>.
- *
- * @param fileSystemObject the file system object to be imported
- * @param policy determines how the file system object and children are imported
- * @exception OperationCanceledException if cancelled
- */
- void importRecursivelyFrom(Object fileSystemObject, int policy) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- if (!provider.isFolder(fileSystemObject)) {
- importFile(fileSystemObject, policy);
- return;
- }
- int childPolicy = importFolder(fileSystemObject, policy);
- if (childPolicy != POLICY_SKIP_CHILDREN) {
- Iterator children = provider.getChildren(fileSystemObject).iterator();
- while (children.hasNext())
- importRecursivelyFrom(children.next(), childPolicy);
- }
- }
-
- /**
- * Queries the user whether the resource with the specified path should be
- * overwritten by a file system object that is being imported.
- *
- * @param path the workspace path of the resource that needs to be overwritten
- * @return <code>true</code> to overwrite, <code>false</code> to not overwrite
- * @exception OperationCanceledException if cancelled
- */
- boolean queryOverwrite(IPath resourcePath) throws OperationCanceledException {
- String overwriteAnswer = overwriteCallback.queryOverwrite(resourcePath.makeRelative().toString());
- if (overwriteAnswer.equals(IOverwriteQuery.CANCEL)) //throw new OperationCanceledException(UniversalSystemPlugin.getString("customs.emptyString"));
- throw new OperationCanceledException(""); //$NON-NLS-1$
- if (overwriteAnswer.equals(IOverwriteQuery.NO)) {
- return false;
- }
- if (overwriteAnswer.equals(IOverwriteQuery.NO_ALL)) {
- this.overwriteState = OVERWRITE_NONE;
- return false;
- }
- if (overwriteAnswer.equals(IOverwriteQuery.ALL)) this.overwriteState = OVERWRITE_ALL;
- return true;
- }
-
- /**
- * Sets whether the containment structures that are implied from the full paths
- * of file system objects being imported should be duplicated in the workbench.
- *
- * @param value <code>true</code> if containers should be created, and
- * <code>false</code> otherwise
- */
- public void setCreateContainerStructure(boolean value) {
- createContainerStructure = value;
- }
-
- /**
- * Sets the file system objects to import.
- *
- * @param filesToImport the list of file system objects to be imported
- * (element type: <code>Object</code>)
- */
- public void setFilesToImport(List filesToImport) {
- this.selectedFiles = filesToImport;
- }
-
- /**
- * Sets whether imported file system objects should automatically overwrite
- * existing workbench resources when a conflict occurs.
- *
- * @param value <code>true</code> to automatically overwrite, and
- * <code>false</code> otherwise
- */
- public void setOverwriteResources(boolean value) {
- if (value) this.overwriteState = OVERWRITE_ALL;
- }
-
- /**
- * Set this boolean indicating whether exported resources should automatically
- * be reviewed/synchronized
- *
- * @param value boolean
- */
- public void setReviewSynchronize(boolean value) {
- reviewSynchronize = value;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportToProjectActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportToProjectActionDelegate.java
deleted file mode 100644
index a2a11c574..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportToProjectActionDelegate.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * This class represents the action to bring up the remote file system import wizard
- * and import the contents of a remote folder to a project.
- */
-public class RemoteFileImportToProjectActionDelegate extends RemoteFileImportExportActionDelegate {
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- RemoteImportWizard wizard = new RemoteImportWizard();
- wizard.init(getWorkbench(), getSelection());
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.open();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenExportWizardActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenExportWizardActionDelegate.java
deleted file mode 100644
index eab8a3e40..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenExportWizardActionDelegate.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.xml.sax.SAXException;
-
-/**
- * Opens the remote file system export wizard.
- */
-public class RemoteFileOpenExportWizardActionDelegate extends RemoteFileImportExportActionDelegate {
- /**
- * Opens the remote file system export wizard.
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- Shell parent = getShell();
- RemoteFileExportData exportData = null;
- IFile file = getDescriptionFile(getSelection());
- if (file == null) {
- SystemBasePlugin.logError("No description file found"); //$NON-NLS-1$
- return;
- }
- try {
- exportData = readRemoteFileExportData(file);
- } catch (CoreException e) {
- SystemBasePlugin.logError("Error occured trying to read description file" + file.getFullPath(), e); //$NON-NLS-1$
- return;
- } catch (IOException e) {
- SystemBasePlugin.logError("Error occured trying to read description file" + file.getFullPath(), e); //$NON-NLS-1$
- return;
- } catch (SAXException e) {
- SystemBasePlugin.logError("Error occured trying to read description file" + file.getFullPath(), e); //$NON-NLS-1$
- return;
- }
- if (exportData == null) {
- SystemBasePlugin.logError("No export data"); //$NON-NLS-1$
- return;
- }
- RemoteExportWizard wizard = new RemoteExportWizard();
- wizard.init(getWorkbench(), exportData);
- WizardDialog dialog = new WizardDialog(parent, wizard);
- dialog.create();
- dialog.open();
- }
-
- /**
- * Reads the remote file export data from a file.
- */
- private RemoteFileExportData readRemoteFileExportData(IFile description) throws CoreException, IOException, SAXException {
- Assert.isLegal(description.isAccessible());
- Assert.isNotNull(description.getFileExtension());
- Assert.isLegal(description.getFileExtension().equals(Utilities.EXPORT_DESCRIPTION_EXTENSION));
- RemoteFileExportData exportData = new RemoteFileExportData();
- IRemoteFileExportDescriptionReader reader = null;
- try {
- reader = exportData.createExportDescriptionReader(description.getContents());
- reader.read(exportData);
- } finally {
- if (reader != null) {
- reader.close();
- }
- }
- return exportData;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenImportWizardActionDelegate.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenImportWizardActionDelegate.java
deleted file mode 100644
index 0a9c4710b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOpenImportWizardActionDelegate.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.xml.sax.SAXException;
-
-/**
- * Opens the remote file system export wizard.
- */
-public class RemoteFileOpenImportWizardActionDelegate extends RemoteFileImportExportActionDelegate {
- /**
- * Opens the remote file system export wizard.
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- Shell parent = getShell();
- RemoteFileImportData importData = null;
- IFile file = getDescriptionFile(getSelection());
- if (file == null) {
- SystemBasePlugin.logError("No description file found"); //$NON-NLS-1$
- return;
- }
- try {
- importData = readRemoteFileImportData(file);
- } catch (CoreException e) {
- SystemBasePlugin.logError("Error occured trying to read description file" + file.getFullPath(), e); //$NON-NLS-1$
- return;
- } catch (IOException e) {
- SystemBasePlugin.logError("Error occured trying to read description file" + file.getFullPath(), e); //$NON-NLS-1$
- return;
- } catch (SAXException e) {
- SystemBasePlugin.logError("Error occured trying to read description file" + file.getFullPath(), e); //$NON-NLS-1$
- return;
- }
- if (importData == null) {
- SystemBasePlugin.logError("No export data"); //$NON-NLS-1$
- return;
- }
- RemoteImportWizard wizard = new RemoteImportWizard();
- wizard.init(getWorkbench(), importData);
- WizardDialog dialog = new WizardDialog(parent, wizard);
- dialog.create();
- dialog.open();
- }
-
- /**
- * Reads the remote file export data from a file.
- */
- private RemoteFileImportData readRemoteFileImportData(IFile description) throws CoreException, IOException, SAXException {
- Assert.isLegal(description.isAccessible());
- Assert.isNotNull(description.getFileExtension());
- Assert.isLegal(description.getFileExtension().equals(Utilities.IMPORT_DESCRIPTION_EXTENSION));
- RemoteFileImportData importData = new RemoteFileImportData();
- IRemoteFileImportDescriptionReader reader = null;
- try {
- reader = importData.createImportDescriptionReader(description.getContents());
- reader.read(importData);
- } finally {
- if (reader != null) {
- reader.close();
- }
- }
- return importData;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOverwriteQuery.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOverwriteQuery.java
deleted file mode 100644
index 6099ab94c..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileOverwriteQuery.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.IOverwriteQuery;
-
-/**
- * This class is used to query whether the user wants to overwrite a file, overwrite all files, not overwrite a file,
- * not overwrite any files, or cancel.
- */
-public class RemoteFileOverwriteQuery implements IOverwriteQuery {
- /**
- * This runnable shows the overwrite query dialog and stores the result.
- */
- private class RemoteFileOverwriteQueryRunnable implements Runnable {
- private String pathString;
- private String queryResponse;
-
- /**
- * Constructor.
- * @param pathString the path.
- */
- private RemoteFileOverwriteQueryRunnable(String pathString) {
- this.pathString = pathString;
- }
-
- /**
- * @see java.lang.Runnable#run()
- */
- public void run() {
- Path path = new Path(pathString);
- String messageString;
- //Break the message up if there is a file name and a directory
- //and there are at least 2 segments.
- if (path.getFileExtension() == null || path.segmentCount() < 2) {
- //TODO internal class used
- messageString = NLS.bind(RemoteImportExportResources.WizardDataTransfer_existsQuestion, pathString );
- } else {
- // TODO internal class used
- messageString = NLS.bind(RemoteImportExportResources.WizardDataTransfer_overwriteNameAndPathQuestion, path.lastSegment(),
- path.removeLastSegments(1).toOSString() );
- }
- Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
- // TODO internal class used
- MessageDialog dialog = new MessageDialog(shell, RemoteImportExportResources.Question, null, messageString, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.NO_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
- String[] response = new String[] { YES, ALL, NO, NO_ALL, CANCEL };
- // open the dialog
- dialog.open();
- if (dialog.getReturnCode() < 0) {
- queryResponse = IOverwriteQuery.CANCEL;
- } else {
- queryResponse = response[dialog.getReturnCode()];
- }
- }
-
- private String getQueryRresponse() {
- return queryResponse;
- }
- }
-
- /**
- * Constructor.
- */
- public RemoteFileOverwriteQuery() {
- super();
- }
-
- /**
- * @see org.eclipse.ui.dialogs.IOverwriteQuery#queryOverwrite(java.lang.String)
- */
- public String queryOverwrite(String pathString) {
- RemoteFileOverwriteQueryRunnable runnable = new RemoteFileOverwriteQueryRunnable(pathString);
- Display.getDefault().syncExec(runnable);
- return runnable.getQueryRresponse();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizard.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizard.java
deleted file mode 100644
index e493d17be..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizard.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [219792][importexport][ftp] RSE hangs on FTP import
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.ui.wizards.AbstractSystemWizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-// Similar to org.eclipse.ui.wizards.datatransfer.FileSystemImportWizard
-// Changes marked with "IFS:" comments. Also see use of RemoteImportExportPlugin
-/**
- * Standard workbench wizard for importing resources from the local file system
- * into the workspace.
- * <p>
- * This class may be instantiated and used without further configuration.
- * </p>
- * <p>
- * Example:
- *
- * <pre>
- * IWizard wizard = new RemoteImportWizard();
- * wizard.init(workbench, selection);
- * WizardDialog dialog = new WizardDialog(shell, wizard);
- * dialog.open();
- * </pre>
- *
- * During the call to <code>open</code>, the wizard dialog is presented to
- * the user. When the user hits Finish, the user-selected files are imported
- * into the workspace, the dialog closes, and the call to <code>open</code>
- * returns.
- * </p>
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RemoteImportWizard extends AbstractSystemWizard implements IImportWizard {
- private IWorkbench workbench;
- private IStructuredSelection selection;
- private RemoteImportWizardPage1 mainPage;
- private RemoteFileImportData importData;
- private boolean initializeFromExportData;
-
- /**
- * Creates a wizard for importing resources into the workspace from
- * the file system.
- */
- public RemoteImportWizard() {
- IDialogSettings workbenchSettings = RemoteImportExportPlugin.getDefault().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("RemoteImportWizard"); //$NON-NLS-1$
- if (section == null) section = workbenchSettings.addNewSection("RemoteImportWizard"); //$NON-NLS-1$
- setDialogSettings(section);
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public void addPages() {
- mainPage = new RemoteImportWizardPage1(workbench, selection);
- addPage(mainPage);
- }
-
- /**
- * Returns the image descriptor with the given key.
- */
- private ImageDescriptor getImageDescriptor(String key) {
- return RemoteImportExportPlugin.getDefault().getImageDescriptor(key);
- }
-
- /* (non-Javadoc)
- * Method declared on IWorkbenchWizard.
- */
- public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
- this.workbench = workbench;
- selection = currentSelection;
- setWindowTitle(SystemImportExportResources.RESID_FILEIMPORT_TITLE);
- setDefaultPageImageDescriptor(getImageDescriptor(RemoteImportExportPlugin.ICON_IMPORTWIZARD_ID));
- setNeedsProgressMonitor(true);
- }
-
- public void init(IWorkbench workbench, RemoteFileImportData importData) {
- this.workbench = workbench;
- this.selection = new StructuredSelection(importData.getElements().toArray());
- this.importData = importData;
- setInitializeFromImportData(true);
- setWindowTitle(SystemImportExportResources.RESID_FILEIMPORT_TITLE);
- setDefaultPageImageDescriptor(getImageDescriptor(RemoteImportExportPlugin.ICON_IMPORTWIZARD_ID));
- setNeedsProgressMonitor(true);
- }
-
- protected void setInitializeFromImportData(boolean init) {
- this.initializeFromExportData = init;
- }
-
- public boolean getInitializeFromImportData() {
- return initializeFromExportData;
- }
-
- public RemoteFileImportData getImportData() {
- return importData;
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public boolean performFinish() {
- return mainPage.finish();
- }
-
- public boolean performCancel() {
- mainPage.cancel();
- return super.performCancel();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java
deleted file mode 100644
index ea96f1166..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java
+++ /dev/null
@@ -1,1638 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [174945] split importexport icons from rse.ui
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David McKnight (IBM) - [219792] use background query when doing import
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [219792][importexport][ftp] RSE hangs on FTP import
- * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- * David McKnight (IBM) - [276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-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.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-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.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
-import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.SynchronizeData;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.Synchronizer;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.messages.SystemMessageLine;
-import org.eclipse.rse.ui.wizards.ISystemWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-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.Display;
-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.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.dialogs.SaveAsDialog;
-import org.eclipse.ui.dialogs.WizardResourceImportPage;
-import org.eclipse.ui.internal.ide.dialogs.IElementFilter;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-/**
- * Page 1 of the base resource import-from-file-system Wizard
- */
-class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listener, ISystemWizardPage {
-
- private class DummyProvider implements ISelectionProvider {
-
- public void addSelectionChangedListener(
- ISelectionChangedListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- public ISelection getSelection() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void removeSelectionChangedListener(
- ISelectionChangedListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- public void setSelection(ISelection selection) {
- // TODO Auto-generated method stub
-
- }
- }
-
- private class QueryAllJob extends Job
- {
- private Object _fileSystemObject;
- private IImportStructureProvider _provider;
- private MinimizedFileSystemElement _element;
- private volatile boolean _isActive = false;
-
- public QueryAllJob(Object fileSystemObject, IImportStructureProvider provider, MinimizedFileSystemElement element){
- super("Querying All"); //$NON-NLS-1$
- _fileSystemObject = fileSystemObject;
- _provider = provider;
- _element = element;
- }
-
-
- public IStatus run(IProgressMonitor monitor){
- _isActive = true;
- query(_fileSystemObject, _element, monitor);
- _isActive = false;
- Display.getDefault().asyncExec(new Runnable(){
- public void run(){
- updateWidgetEnablements();
- selectionGroup.setAllSelections(true);
- }
- });
- return Status.OK_STATUS;
- }
-
- public boolean isActive()
- {
- return _isActive;
- }
-
-
- private void query(Object parent, MinimizedFileSystemElement element, IProgressMonitor monitor){
-
- if (monitor.isCanceled()){
- return;
- }
-
- List children = _provider.getChildren(parent);
- if (children == null) children = new ArrayList(1);
-
- Iterator childrenEnum = children.iterator();
-
- List resultsToQuery = new ArrayList();
-
- while (childrenEnum.hasNext()) {
- Object child = childrenEnum.next();
- String elementLabel = _provider.getLabel(child);
- //Create one level below
- MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, element, _provider.isFolder(child));
- result.setFileSystemObject(child);
-
- if (child instanceof UniFilePlus){
- if (((UniFilePlus)child).isDirectory()){
- resultsToQuery.add(result);
- }
- }
- }
-
- // only with first level query do this to asynchronously update the table view
- if (element == _element){
- Display.getDefault().asyncExec(new Runnable(){
- public void run(){
- DummyProvider provider = new DummyProvider();
-
- ISelection sel1 = new StructuredSelection(_element.getParent());
- SelectionChangedEvent evt1 = new SelectionChangedEvent(provider, sel1);
- selectionGroup.selectionChanged(evt1);
-
- ISelection sel2 = new StructuredSelection(_element);
- SelectionChangedEvent evt2 = new SelectionChangedEvent(provider, sel2);
- selectionGroup.selectionChanged(evt2);
- }
- });
- }
-
- for (int i = 0; i < resultsToQuery.size(); i++) {
- MinimizedFileSystemElement celement = (MinimizedFileSystemElement)resultsToQuery.get(i);
- query(celement.getFileSystemObject(), celement, monitor);
- celement.setPopulated(true);
- }
-
- element.setPopulated(true);
- }
-
- }
-
-
-
- private Object sourceDirectory = null;
- private String helpId;
- private Composite parentComposite;
- private SystemMessageLine msgLine;
- private SystemMessage pendingMessage, pendingErrorMessage;
- private String pendingString, pendingErrorString;
- protected Composite sourceComposite;
- protected Combo sourceNameField;
- protected Button reviewSynchronizeCheckbox;
- protected Button overwriteExistingResourcesCheckbox;
- protected Button createContainerStructureButton;
- protected Button createOnlySelectedButton;
- protected Button saveSettingsButton;
- protected Label descFilePathLabel;
- protected Text descFilePathField;
- protected Button descFileBrowseButton;
- protected Button sourceBrowseButton;
- protected Button selectTypesButton;
- protected Button selectAllButton;
- protected Button deselectAllButton;
- // a boolean to indicate if the user has typed anything
- private boolean entryChanged = false;
-
- private QueryAllJob _queryAllJob;
- private MinimizedFileSystemElement _fileSystemTree;
-
- // input object
- protected Object inputObject = null;
- // flag to indicate whether initial selection was used to set source field
- protected boolean initSourceNameSet = false;
- // dialog store id constants
- private final static String STORE_SOURCE_NAMES_ID = "RemoteImportWizardPage1.STORE_SOURCE_NAMES_ID"; //$NON-NLS-1$
- private final static String STORE_REVIEW_SYNCHRONIZE_ID = "RemoteImportWizardPage1.STORE_REVIEW_SYNCHRONIZE_ID"; //$NON-NLS-1$
- private final static String STORE_OVERWRITE_EXISTING_RESOURCES_ID = "RemoteImportWizardPage1.STORE_OVERWRITE_EXISTING_RESOURCES_ID"; //$NON-NLS-1$
- private final static String STORE_CREATE_CONTAINER_STRUCTURE_ID = "RemoteImportWizardPage1.STORE_CREATE_CONTAINER_STRUCTURE_ID"; //$NON-NLS-1$
- private static final String STORE_CREATE_DESCRIPTION_FILE_ID = "RemoteImportWizardPage1.STORE_CREATE_DESCRIPTION_FILE_ID"; //$NON-NLS-1$
- private static final String STORE_DESCRIPTION_FILE_NAME_ID = "RemoteImportWizardPage1.STORE_DESCRIPTION_FILE_NAME_ID"; //$NON-NLS-1$
- // messages
- protected static final SystemMessage SOURCE_EMPTY_MESSAGE = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_SOURCE_EMPTY,
- IStatus.ERROR,
- RemoteImportExportResources.FILEMSG_SOURCE_EMPTY,
- RemoteImportExportResources.FILEMSG_SOURCE_EMPTY_DETAILS);
-
-
- /**
- * Creates an instance of this class
- */
- protected RemoteImportWizardPage1(String name, IWorkbench aWorkbench, IStructuredSelection selection) {
- super(name, selection);
- setInputObject(selection);
- }
-
- /**
- * Creates an instance of this class
- *
- * @param aWorkbench IWorkbench
- * @param selection IStructuredSelection
- */
- public RemoteImportWizardPage1(IWorkbench aWorkbench, IStructuredSelection selection) {
- this("fileSystemImportPage1", aWorkbench, selection); //$NON-NLS-1$
- setTitle(SystemImportExportResources.RESID_FILEIMPORT_PAGE1_TITLE);
- setDescription(SystemImportExportResources.RESID_FILEIMPORT_PAGE1_DESCRIPTION);
- }
-
- /**
- * Creates a new button with the given id.
- * <p>
- * The <code>Dialog</code> implementation of this framework method
- * creates a standard push button, registers for selection events
- * including button presses and registers
- * default buttons with its shell.
- * The button id is stored as the buttons client data.
- * Note that the parent's layout is assumed to be a GridLayout and
- * the number of columns in this layout is incremented.
- * Subclasses may override.
- * </p>
- *
- * @param parent the parent composite
- * @param id the id of the button (see
- * <code>IDialogConstants.*_ID</code> constants
- * for standard dialog button ids)
- * @param label the label from the button
- * @param defaultButton <code>true</code> if the button is to be the
- * default button, and <code>false</code> otherwise
- */
- protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
- // increment the number of columns in the button bar
- ((GridLayout) parent.getLayout()).numColumns++;
- Button button = new Button(parent, SWT.PUSH);
- GridData buttonData = new GridData(GridData.FILL_HORIZONTAL);
- button.setLayoutData(buttonData);
- button.setData(new Integer(id));
- button.setText(label);
- if (defaultButton) {
- Shell shell = parent.getShell();
- if (shell != null) {
- shell.setDefaultButton(button);
- }
- button.setFocus();
- }
- return button;
- }
-
- /**
- * Creates the buttons for selecting specific types or selecting all or none of the
- * elements.
- *
- * @param parent the parent control
- */
- protected final void createButtonsGroup(Composite parent) {
- Composite buttonComposite = SystemWidgetHelpers.createComposite(parent, 3);
- ((GridLayout) buttonComposite.getLayout()).makeColumnsEqualWidth = true;
- selectTypesButton = SystemWidgetHelpers.createPushButton(buttonComposite, null, SystemImportExportResources.RESID_FILEIMPEXP_BUTTON_SELECTTYPES_LABEL,
- SystemImportExportResources.RESID_FILEIMPEXP_BUTTON_SELECTTYPES_TOOLTIP);
- selectAllButton = SystemWidgetHelpers.createPushButton(buttonComposite, null, SystemImportExportResources.RESID_FILEIMPEXP_BUTTON_SELECTALL_LABEL,
- SystemImportExportResources.RESID_FILEIMPEXP_BUTTON_SELECTALL_TOOLTIP);
- deselectAllButton = SystemWidgetHelpers.createPushButton(buttonComposite, null, SystemImportExportResources.RESID_FILEIMPEXP_BUTTON_DESELECTALL_LABEL,
- SystemImportExportResources.RESID_FILEIMPEXP_BUTTON_DESELECTALL_TOOLTIP);
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleTypesEditButtonPressed();
- }
- };
- selectTypesButton.addSelectionListener(listener);
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setAllSelections(true);
- }
- };
- selectAllButton.addSelectionListener(listener);
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setAllSelections(false);
- }
- };
- deselectAllButton.addSelectionListener(listener);
- }
-
- /** (non-Javadoc)
- * Method declared on IDialogPage.
- */
- public void createControl(Composite parent) {
- parentComposite = new Composite(parent, SWT.NONE);
- parentComposite.setLayout(new GridLayout(1, false));
- parentComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
- super.createControl(parentComposite);
- msgLine = new SystemMessageLine(parentComposite);
- msgLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
- if (pendingMessage != null) {
- setMessage(pendingMessage);
- }
- if (pendingErrorMessage != null) {
- setErrorMessage(pendingErrorMessage);
- }
- if (pendingString != null) {
- setMessage(pendingString);
- }
- if (pendingErrorString != null) {
- setErrorMessage(pendingErrorString);
- }
- validateSourceGroup();
- // if source not set from remote file selection, set focus to source name field
- if (!initSourceNameSet) {
- sourceNameField.setFocus();
- }
- // otherwise, set focus to selection group
- else {
- selectionGroup.setFocus();
- }
- SystemWidgetHelpers.setWizardPageMnemonics(parentComposite);
- if (helpId != null) {
- SystemWidgetHelpers.setHelp(parentComposite, helpId);
- } else {
- SystemWidgetHelpers.setHelp(parentComposite, RemoteImportExportPlugin.HELPPREFIX + "import_context"); //$NON-NLS-1$
- }
- setControl(parentComposite);
- // SystemWidgetHelpers.setHelp(getControl(), RemoteImportExportPlugin.HELPPREFIX + "import_context");
- // Control c = getControl();
- // if (c instanceof Composite)
- // {
- // SystemWidgetHelpers.setWizardPageMnemonics((Composite)c);
- // parentComposite = (Composite)c;
- // if (helpId != null)
- // SystemWidgetHelpers.setHelp(parentComposite, helpId);
- // }
- // else if (c instanceof Button)
- // {
- // Mnemonics ms = new Mnemonics();
- // ms.setMnemonic((Button)c);
- // }
- // configureMessageLine();
- }
-
- /**
- * Create the import options specification widgets.
- */
- protected void createOptionsGroupButtons(Group optionsGroup) {
- reviewSynchronizeCheckbox = SystemWidgetHelpers.createCheckBox(optionsGroup, 1, null, SystemImportExportResources.RESID_FILEIMPORT_REVIEW_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_REVIEW_TOOLTIP);
- reviewSynchronizeCheckbox.addListener(SWT.Selection, this);
- overwriteExistingResourcesCheckbox = SystemWidgetHelpers.createCheckBox(optionsGroup, 1, null, SystemImportExportResources.RESID_FILEIMPORT_OPTION_OVERWRITE_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_OPTION_OVERWRITE_TOOLTIP);
- createContainerStructureButton = SystemWidgetHelpers.createRadioButton(optionsGroup, null, SystemImportExportResources.RESID_FILEIMPORT_OPTION_CREATEALL_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_OPTION_CREATEALL_TOOLTIP);
- createOnlySelectedButton = SystemWidgetHelpers.createRadioButton(optionsGroup, null, SystemImportExportResources.RESID_FILEIMPORT_OPTION_CREATESEL_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_OPTION_CREATESEL_TOOLTIP);
- createOnlySelectedButton.setSelection(true);
- Composite comp = SystemWidgetHelpers.createComposite(optionsGroup, 3);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginWidth = 0;
- comp.setLayout(layout);
- comp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- saveSettingsButton = SystemWidgetHelpers.createCheckBox(comp, 3, null, SystemImportExportResources.RESID_FILEIMPORT_OPTION_SETTINGS_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_OPTION_SETTINGS_TOOLTIP);
- saveSettingsButton.addListener(SWT.Selection, this);
- descFilePathLabel = new Label(comp, SWT.NONE);
- descFilePathLabel.setText(SystemImportExportResources.RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_LABEL);
- GridData data = new GridData();
- descFilePathLabel.setLayoutData(data);
- descFilePathField = new Text(comp, SWT.SINGLE | SWT.BORDER);
- descFilePathField.setToolTipText(SystemImportExportResources.RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_PATH_TOOLTIP);
- data = new GridData();
- data.horizontalAlignment = GridData.HORIZONTAL_ALIGN_FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = convertWidthInCharsToPixels(60);
- descFilePathField.setLayoutData(data);
- descFilePathField.addListener(SWT.Modify, this);
- descFileBrowseButton = SystemWidgetHelpers.createPushButton(comp, null, SystemImportExportResources.RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_BROWSE_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_OPTION_SETTINGS_DESCFILE_BROWSE_TOOLTIP);
- descFileBrowseButton.addListener(SWT.Selection, this);
- }
-
- /**
- * Create the group for creating the root directory
- */
- protected void createRootDirectoryGroup(Composite parent) {
- Composite sourceContainerGroup = SystemWidgetHelpers.createComposite(parent, 3);
- ((GridData) sourceContainerGroup.getLayoutData()).grabExcessHorizontalSpace = true;
- sourceNameField = SystemWidgetHelpers.createLabeledReadonlyCombo(sourceContainerGroup, null, SystemImportExportResources.RESID_FILEIMPORT_SOURCE_LABEL,
- SystemImportExportResources.RESID_FILEIMPORT_SOURCE_TOOLTIP);
- ((GridData) sourceNameField.getLayoutData()).widthHint = SIZING_TEXT_FIELD_WIDTH;
- ((GridData) sourceNameField.getLayoutData()).grabExcessHorizontalSpace = true;
- sourceNameField.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateFromSourceField();
- }
- });
- sourceNameField.addKeyListener(new KeyListener() {
- /*
- * @see KeyListener.keyPressed
- */
- public void keyPressed(KeyEvent e) {
- //If there has been a key pressed then mark as dirty
- entryChanged = true;
- }
-
- /*
- * @see KeyListener.keyReleased
- */
- public void keyReleased(KeyEvent e) {
- }
- });
- sourceNameField.addFocusListener(new FocusListener() {
- /*
- * @see FocusListener.focusGained(FocusEvent)
- */
- public void focusGained(FocusEvent e) {
- //Do nothing when getting focus
- }
-
- /*
- * @see FocusListener.focusLost(FocusEvent)
- */
- public void focusLost(FocusEvent e) {
- //Clear the flag to prevent constant update
- if (entryChanged) {
- entryChanged = false;
- updateFromSourceField();
- }
- }
- });
- // source browse button
- sourceBrowseButton = SystemWidgetHelpers.createPushButton(sourceContainerGroup, null, SystemImportExportResources.RESID_FILEEXPORT_DESTINATION_BROWSE_LABEL,
- SystemImportExportResources.RESID_FILEEXPORT_DESTINATION_BROWSE_TOOLTIP);
- ((GridData) sourceBrowseButton.getLayoutData()).grabExcessHorizontalSpace = false;
- sourceBrowseButton.addListener(SWT.Selection, this);
- }
-
- /**
- * Update the receiver from the source name field.
- */
- private void updateFromSourceField() {
- setSourceName(sourceNameField.getText());
- //Update enablements when this is selected
- updateWidgetEnablements();
- }
-
- /**
- * Creates and returns a <code>FileSystemElement</code> if the specified
- * file system object merits one. The criteria for this are:
- * Also create the children.
- */
- protected MinimizedFileSystemElement createRootElement(Object fileSystemObject, IImportStructureProvider provider) {
- boolean isContainer = provider.isFolder(fileSystemObject);
- String elementLabel = provider.getLabel(fileSystemObject);
-
- // Use an empty label so that display of the element's full name
- // doesn't include a confusing label
- MinimizedFileSystemElement dummyParent = new MinimizedFileSystemElement("", null, true); //$NON-NLS-1$
- MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer);
- result.setFileSystemObject(fileSystemObject);
-
- if (_queryAllJob == null){
- _queryAllJob = new QueryAllJob(fileSystemObject, provider, result);
- _queryAllJob.schedule();
- }
-
- ////Get the files for the element so as to build the first level
- //result.getFiles(provider);
-
- return dummyParent;
- }
-
-
- /**
- * Create the import source specification widgets
- */
- protected void createSourceGroup(Composite parent) {
- sourceComposite = parent;
- createRootDirectoryGroup(parent);
- createFileSelectionGroup(parent);
- createButtonsGroup(parent);
- }
-
- /**
- * Enable or disable the button group.
- */
- protected void enableButtonGroup(boolean enable) {
- selectTypesButton.setEnabled(enable);
- selectAllButton.setEnabled(enable);
- deselectAllButton.setEnabled(enable);
- }
-
- /**
- * Answer a boolean indicating whether the specified source currently exists
- * and is valid
- */
- protected boolean ensureSourceIsValid() {
- if (((File) sourceDirectory).isDirectory()) return true;
- String msgTxt = RemoteImportExportResources.FILEMSG_FOLDER_IS_FILE;
- String msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_FOLDER_IS_FILE_DETAILS, ((File)sourceDirectory).getAbsolutePath());
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_FOLDER_IS_FILE,
- IStatus.ERROR, msgTxt, msgDetails);
- setErrorMessage(msg);
- sourceNameField.setFocus();
- return false;
- }
-
- /**
- * Execute the passed import operation. Answer a boolean indicating success.
- */
- protected boolean executeImportOperation(RemoteFileImportOperation op) {
- try {
- getContainer().run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- displayErrorDialog(e.getTargetException());
- return false;
- }
- IStatus status = op.getStatus();
- if (!status.isOK()) {
- if (status.isMultiStatus()){
- if (((MultiStatus)status).getChildren().length > 0){
- status = ((MultiStatus)status).getChildren()[0];
- }
- }
- String msgTxt = NLS.bind(RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, status.getMessage());
-
- SystemMessage msg = null;
- if (status.getException() != null){
- msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_IMPORT_FAILED,
- IStatus.ERROR, msgTxt, status.getException());
- } else {
- msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_IMPORT_FAILED,
- IStatus.ERROR, msgTxt);
- }
-
- SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
- dlg.openWithDetails();
- return false;
- }
- return true;
- }
-
- /**
- * The Finish button was pressed. Try to do the required work now and answer
- * a boolean indicating success. If false is returned then the wizard will
- * not close.
- *
- * @return boolean
- */
- public boolean finish() {
- clearMessage();
- clearErrorMessage();
- Object file;
- IHost conn;
- String temp;
- if (!ensureSourceIsValid()) return false;
- saveWidgetValues();
- Iterator resourcesEnum = getSelectedResources().iterator();
- List fileSystemObjects = new ArrayList();
- conn = Utilities.parseForSystemConnection(sourceNameField.getText());
- while (resourcesEnum.hasNext()) {
- Object fo = ((FileSystemElement) resourcesEnum.next()).getFileSystemObject();
- temp = ((File) fo).getAbsolutePath();
- if (UniFilePlus.class.isInstance(fo))
- file = fo;
- else
- file = new UniFilePlus(Utilities.getIRemoteFile(conn, temp));
- fileSystemObjects.add(file);
- }
- if (fileSystemObjects.size() > 0) {
- RemoteFileImportData data = new RemoteFileImportData();
- data.setContainerPath(getContainerFullPath());
- data.setSource(getSourceDirectory());
- data.setElements(fileSystemObjects);
- data.setOverWriteExistingFiles(overwriteExistingResourcesCheckbox.getSelection());
- data.setCreateDirectoryStructure(createContainerStructureButton.getSelection());
- data.setCreateSelectionOnly(createOnlySelectedButton.getSelection());
- data.setSaveSettings(saveSettingsButton.getSelection());
- data.setDescriptionFilePath(getDescriptionLocation());
-
- if (!reviewSynchronizeCheckbox.getSelection()) {
- boolean ret = executeImportOperation(new RemoteFileImportOperation(data, FileSystemStructureProvider.INSTANCE, this));
- return ret;
- } else {
- // run synchronization
- SynchronizeData data2 = null;
- try {
- data2 = new SynchronizeData(data);
- } catch (SystemMessageException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (reviewSynchronizeCheckbox.getSelection()) {
- data2.setSynchronizeType(ISynchronizeOperation.SYNC_MODE_UI_REVIEW_INITIAL);
- }
-
- boolean ret = false;
-
- try {
- ret = new Synchronizer(data2).run(new SynchronizeOperation());
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // save description after synchronize operation
- try {
- if (data.isSaveSettings()) {
- RSESyncUtils.saveDescription(data);
- }
- } catch (CoreException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (IOException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- return ret;
- }
- }
- String msgTxt = RemoteImportExportResources.FILEMSG_IMPORT_NONE_SELECTED;
- String msgDetails = RemoteImportExportResources.FILEMSG_IMPORT_NONE_SELECTED_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.FILEMSG_IMPORT_NONE_SELECTED,
- IStatus.ERROR, msgTxt, msgDetails);
- setErrorMessage(msg);
- return false;
- }
-
-
-
-
- /**
- * Returns a content provider for <code>FileSystemElement</code>s that returns
- * only files as children.
- */
- protected ITreeContentProvider getFileProvider() {
- //IFS: add BusyIndicator
- return new WorkbenchContentProvider() {
- boolean busy = false;
-
- public Object[] getChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement && !busy) {
- final MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- final Object[] oa = new Object[1];
- busy = true;
- BusyIndicator.showWhile(sourceComposite.getDisplay(), new Runnable() {
- public void run() {
- oa[0] = element.getFiles(FileSystemStructureProvider.INSTANCE).getChildren(element);
- }
- });
- busy = false;
- return (Object[]) oa[0];
- }
- return new Object[0];
- }
- };
- }
-
- /**
- * Answer the root FileSystemElement that represents the contents of
- * the currently-specified source. If this FileSystemElement is not
- * currently defined then create and return it.
- */
- protected MinimizedFileSystemElement getFileSystemTree() {
- File sourceDirectory = getSourceDirectory();
- if (sourceDirectory == null) return null;
-
- if (_fileSystemTree == null){
- _fileSystemTree = selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE);
- }
- return _fileSystemTree;
- }
-
- /**
- * Returns a content provider for <code>FileSystemElement</code>s that returns
- * only folders as children.
- */
- protected ITreeContentProvider getFolderProvider() {
- //IFS: add BusyIndicator
- return new WorkbenchContentProvider() {
- boolean busy = false;
-
- public Object[] getChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement && !busy) {
- final MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- final Object[] oa = new Object[1];
- busy = true;
- BusyIndicator.showWhile(sourceComposite.getDisplay(), new Runnable() {
- public void run() {
- oa[0] = element.getFolders(FileSystemStructureProvider.INSTANCE).getChildren(element);
- }
- });
- busy = false;
- return (Object[]) oa[0];
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (!element.isPopulated()){
- return true;
- } else {
- return getChildren(element).length > 0;
- }
- }
- return false;
- }
- };
- }
-
- /**
- * Returns this page's collection of currently-specified resources to be
- * imported. This is the primary resource selection facility accessor for
- * subclasses.
- *
- * Added here to allow access for inner classes.
- *
- * @return a collection of resources currently selected
- * for export (element type: <code>IResource</code>)
- */
- protected List getSelectedResources() {
- return super.getSelectedResources();
- }
-
- /**
- * Returns a File object representing the currently-named source directory iff
- * it exists as a valid directory, or <code>null</code> otherwise.
- */
- protected File getSourceDirectory() {
- return getSourceDirectory(this.sourceNameField.getText());
- }
-
- /**
- * Returns a File object representing the currently-named source directory iff
- * it exists as a valid directory, or <code>null</code> otherwise.
- *
- * @param path a String not yet formatted for java.io.File compatability
- */
- private File getSourceDirectory(String path) {
- return (File) sourceDirectory;
- }
-
- /**
- * Answer the directory name specified as being the import source.
- * Note that if it ends with a separator then the separator is first
- * removed so that java treats it as a proper directory
- */
- private String getSourceDirectoryName() {
- return getSourceDirectoryName(this.sourceNameField.getText());
- }
-
- /**
- * Answer the directory name specified as being the import source.
- * Note that if it ends with a separator then the separator is first
- * removed so that java treats it as a proper directory
- */
- private String getSourceDirectoryName(String sourceName) {
- IPath result = new Path(sourceName.trim());
- if (result.getDevice() != null && result.segmentCount() == 0) // something like "c:"
- result = result.addTrailingSeparator();
- else
- result = result.removeTrailingSeparator();
- //return result.toOSString();
- return result.toString();
- }
-
- /**
- * Gets the description.
- * @return the description.
- */
- protected String getDescriptionLocation() {
- return descFilePathField.getText().trim();
- }
-
- /**
- * Returns whether the settings should be saved.
- * @return whether settings should be saved.
- */
- protected boolean isSaveSettings() {
- // need this check
- if (saveSettingsButton != null) {
- return saveSettingsButton.getSelection();
- } else {
- return false;
- }
- }
-
- /**
- * Handle all events and enablements for widgets in this dialog
- *
- * @param event Event
- */
- public void handleEvent(Event event) {
- if (event.widget == sourceBrowseButton) {
- handleSourceBrowseButtonPressed();
- } else if (event.widget == descFileBrowseButton) {
- handleDescriptionFileBrowseButtonPressed();
- }
- super.handleEvent(event);
- }
-
- /**
- * Open an appropriate source browser so that the user can specify a source
- * to import from
- */
- protected void handleSourceBrowseButtonPressed() {
- SystemSelectRemoteFolderAction action = new SystemSelectRemoteFolderAction(this.getShell());
- action.setShowNewConnectionPrompt(true);
- action.setShowPropertySheet(true, false);
- action.setFoldersOnly(true);
- action.run();
- IRemoteFile folder = action.getSelectedFolder();
- if (folder != null) {
- clearErrorMessage();
- setSourceName(Utilities.getAsString(folder));
- selectionGroup.setFocus();
- }
- }
-
- /**
- * Open an appropriate destination browser so that the user can specify a source
- * to import from.
- */
- protected void handleDescriptionFileBrowseButtonPressed() {
- SaveAsDialog dialog = new SaveAsDialog(getContainer().getShell());
- dialog.create();
- dialog.getShell().setText(RemoteImportExportResources.IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_TITLE);
- dialog.setMessage(RemoteImportExportResources.IMPORT_EXPORT_DESCRIPTION_FILE_DIALOG_MESSAGE);
- dialog.setOriginalFile(createFileHandle(new Path(getDescriptionLocation())));
- if (dialog.open() == Window.OK) {
- IPath path = dialog.getResult();
- path = path.removeFileExtension().addFileExtension(Utilities.IMPORT_DESCRIPTION_EXTENSION);
- descFilePathField.setText(path.toString());
- }
- }
-
- /**
- * Creates a file resource handle for the file with the given workspace path.
- * This method does not create the file resource; this is the responsibility
- * of <code>createFile</code>.
- *
- * @param filePath the path of the file resource to create a handle for
- * @return the new file resource handle
- */
- protected IFile createFileHandle(IPath filePath) {
- if (filePath.isValidPath(filePath.toString()) && filePath.segmentCount() >= 2)
- return SystemBasePlugin.getWorkspace().getRoot().getFile(filePath);
- else
- return null;
- }
-
- /**
- * Open a registered type selection dialog and note the selections
- * in the receivers types-to-export field.,
- * Added here so that inner classes can have access
- */
- protected void handleTypesEditButtonPressed() {
- super.handleTypesEditButtonPressed();
- }
-
- /**
- * Returns whether the extension provided is an extension that
- * has been specified for import by the user.
- * @param extension the resource extension.
- * @return <code>true</code> if the resource name is suitable for import based upon its extension.
- */
- protected boolean isImportableExtension(String extension) {
- // i.e. - all extensions are acceptable
- if (selectedTypes == null) {
- return true;
- }
- Iterator z = selectedTypes.iterator();
- while (z.hasNext()) {
- if (extension.equalsIgnoreCase((String) (z.next()))) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Is the element included in import data.
- * @param element the file element.
- * @return <code>true</code> if the element is included in the import data, <code>false</code> if not.
- */
- protected boolean isIncludedInImportData(MinimizedFileSystemElement element) {
- UniFilePlus file = (UniFilePlus) (element.getFileSystemObject());
- RemoteImportWizard parentWizard = (RemoteImportWizard) getWizard();
- RemoteFileImportData importData = parentWizard.getImportData();
- return importData.doesExist(file);
- }
-
- /**
- * Repopulate the view based on the currently entered directory.
- */
- protected void resetSelection() {
- MinimizedFileSystemElement currentRoot = getFileSystemTree();
- this.selectionGroup.setRoot(currentRoot);
- }
-
- /**
- * Use the dialog store to restore widget values to the values that they held
- * last time this wizard was used to completion
- */
- protected void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID);
- if (sourceNames != null) {
- // set filenames history
- for (int i = 0; i < sourceNames.length; i++) {
- sourceNameField.add(sourceNames[i]);
- }
- }
- RemoteImportWizard parentWizard = (RemoteImportWizard) getWizard();
- boolean isInitializingFromImportData = parentWizard.getInitializeFromImportData();
- if (!isInitializingFromImportData) {
- // radio buttons and checkboxes
- reviewSynchronizeCheckbox.setSelection(settings.getBoolean(STORE_REVIEW_SYNCHRONIZE_ID));
- overwriteExistingResourcesCheckbox.setSelection(settings.getBoolean(STORE_OVERWRITE_EXISTING_RESOURCES_ID));
- boolean createStructure = settings.getBoolean(STORE_CREATE_CONTAINER_STRUCTURE_ID);
- createContainerStructureButton.setSelection(createStructure);
- createOnlySelectedButton.setSelection(!createStructure);
- boolean saveSettings = settings.getBoolean(STORE_CREATE_DESCRIPTION_FILE_ID);
- saveSettingsButton.setSelection(saveSettings);
- String descFilePathStr = settings.get(STORE_DESCRIPTION_FILE_NAME_ID);
- if (descFilePathStr == null) {
- descFilePathStr = ""; //$NON-NLS-1$
- }
- descFilePathField.setText(descFilePathStr);
- } else {
- RemoteFileImportData importData = parentWizard.getImportData();
- // container path
- String containerPath = importData.getContainerPath().toString();
- if (containerPath != null) {
- setContainerFieldValue(containerPath);
- }
- // radio buttons and checkboxes
- reviewSynchronizeCheckbox.setSelection(importData.isReviewSynchronize());
- overwriteExistingResourcesCheckbox.setSelection(importData.isOverWriteExistingFiles());
- createContainerStructureButton.setSelection(importData.isCreateDirectoryStructure());
- createOnlySelectedButton.setSelection(importData.isCreateSelectionOnly());
- saveSettingsButton.setSelection(importData.isSaveSettings());
- String descFilePathStr = importData.getDescriptionFilePath();
- if (descFilePathStr == null) {
- descFilePathStr = ""; //$NON-NLS-1$
- }
- descFilePathField.setText(descFilePathStr);
- UniFilePlus source = (UniFilePlus) (importData.getSource());
- if (source != null) {
- setSourceName(source.getCanonicalPath());
- }
- }
- }
- // check if there was an initial selection
- // if it is a remote directory, then set the absolute path in the source name field
- Object initSelection = getInputObject();
- if ((initSelection != null) && (initSelection instanceof IStructuredSelection)) {
- IStructuredSelection sel = (IStructuredSelection) initSelection;
- if (sel.size() == 1) {
- Object theSel = sel.getFirstElement();
- if (theSel instanceof IRemoteFile) {
- IRemoteFile file = (IRemoteFile) theSel;
- // set source name if the input is a folder
- if (file.isDirectory()) {
- setSourceName(Utilities.getAsString(file));
- // indicate source name set initially from remote folder selection
- initSourceNameSet = true;
- }
- }
- }
- }
- }
-
- /**
- * Since Finish was pressed, write widget values to the dialog store so that they
- * will persist into the next invocation of this wizard page
- */
- protected void saveWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID);
- if (sourceNames == null) sourceNames = new String[0];
- sourceNames = addToHistory(sourceNames, getSourceDirectoryName());
- settings.put(STORE_SOURCE_NAMES_ID, sourceNames);
- // radio buttons and checkboxes
- settings.put(STORE_REVIEW_SYNCHRONIZE_ID, reviewSynchronizeCheckbox.getSelection());
- settings.put(STORE_OVERWRITE_EXISTING_RESOURCES_ID, overwriteExistingResourcesCheckbox.getSelection());
- settings.put(STORE_CREATE_CONTAINER_STRUCTURE_ID, createContainerStructureButton.getSelection());
- settings.put(STORE_CREATE_DESCRIPTION_FILE_ID, isSaveSettings());
- settings.put(STORE_DESCRIPTION_FILE_NAME_ID, getDescriptionLocation());
- }
- }
-
- /**
- * Invokes a file selection operation using the specified file system and
- * structure provider. If the user specifies files to be imported then
- * this selection is cached for later retrieval and is returned.
- */
- protected MinimizedFileSystemElement selectFiles(final Object rootFileSystemObject, final IImportStructureProvider structureProvider) {
- final MinimizedFileSystemElement[] results = new MinimizedFileSystemElement[1];
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- //Create the root element from the supplied file system object
- results[0] = createRootElement(rootFileSystemObject, structureProvider);
- }
- });
- return results[0];
- }
-
- /**
- * Set all of the selections in the selection group to value. Implemented here
- * to provide access for inner classes.
- * @param value boolean
- */
- protected void setAllSelections(boolean value) {
- super.setAllSelections(value);
- }
-
- /**
- * Sets the source name of the import to be the supplied path.
- * Adds the name of the path to the list of items in the
- * source combo and selects it.
- *
- * @param path the path to be added
- */
- protected void setSourceName(String path) {
- if (path.length() > 0) {
- // Clear selection in case this method is Excepted.
- sourceDirectory = null;
- sourceNameField.setText(""); //$NON-NLS-1$
- resetSelection();
- String[] currentItems = this.sourceNameField.getItems();
- int selectionIndex = -1;
- for (int i = 0; i < currentItems.length && selectionIndex < 0; i++) {
- if (currentItems[i].equals(path)) selectionIndex = i;
- }
- if (selectionIndex < 0) { // New one from Browse
- int oldLength = currentItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength] = path;
- this.sourceNameField.setItems(newItems);
- selectionIndex = oldLength;
- }
- if (Utilities.isConnectionValid(path, getShell()))
- // At time of writing no exceptions were expected from this code!
- // if one is received, issue it.
- try {
- sourceDirectory = null;
- IHost as400Conn = Utilities.parseForSystemConnection(path);
- if (as400Conn != null) {
- IRemoteFile rf = Utilities.parseForIRemoteFile(path);
- if (rf != null && rf.exists()) sourceDirectory = new UniFilePlus(rf);
- sourceNameField.select(selectionIndex);
- }
- resetSelection();
- } catch (Exception e) {
- Utilities.error(e);
- }
- }
- }
-
- /**
- * Update the tree to only select those elements that match the selected types
- */
- protected void setupSelectionsBasedOnSelectedTypes() {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getContainer().getShell());
- final Map selectionMap = new Hashtable();
- final IElementFilter filter = new IElementFilter() {
- public void filterElements(Collection files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- Iterator filesList = files.iterator();
- while (filesList.hasNext()) {
- if (monitor.isCanceled()) throw new InterruptedException();
- checkFile(filesList.next());
- }
- }
-
- public void filterElements(Object[] files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- for (int i = 0; i < files.length; i++) {
- if (monitor.isCanceled()) throw new InterruptedException();
- checkFile(files[i]);
- }
- }
-
- private void checkFile(Object fileElement) {
- MinimizedFileSystemElement file = (MinimizedFileSystemElement) fileElement;
- if (isImportableExtension(file.getFileNameExtension())) {
- List elements = new ArrayList();
- FileSystemElement parent = file.getParent();
- if (selectionMap.containsKey(parent)) elements = (List) selectionMap.get(parent);
- elements.add(file);
- selectionMap.put(parent, elements);
- }
- }
- };
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(final IProgressMonitor monitor) throws InterruptedException {
-
- String msg = RemoteImportExportResources.FILEMSG_IMPORT_FILTERING;
- monitor.beginTask(msg, IProgressMonitor.UNKNOWN);
- getSelectedResources(filter, monitor);
- }
- };
- try {
- // have to set fork to false to avoid InvocationTargetException !!
- dialog.run(false, true, runnable);
- } catch (InvocationTargetException exception) {
- //Couldn't start. Do nothing.
- return;
- } catch (InterruptedException exception) {
- //Got interrupted. Do nothing.
- return;
- }
- // make sure that all paint operations caused by closing the progress
- // dialog get flushed, otherwise extra pixels will remain on the screen until
- // updateSelections is completed
- getShell().update();
- // The updateSelections method accesses SWT widgets so cannot be executed
- // as part of the above progress dialog operation since the operation forks
- // a new process.
- updateSelections(selectionMap);
- }
-
- /**
- * Update the tree to only select those elements that are in the import data.
- */
- protected void setupSelectionsBasedOnImportData() {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getContainer().getShell());
- final Map selectionMap = new Hashtable();
- final IElementFilter filter = new IElementFilter() {
- public void filterElements(Collection files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- Iterator filesList = files.iterator();
- while (filesList.hasNext()) {
- if (monitor.isCanceled()) {
- throw new InterruptedException();
- }
- checkFile(filesList.next());
- }
- }
-
- public void filterElements(Object[] files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- for (int i = 0; i < files.length; i++) {
- if (monitor.isCanceled()) {
- throw new InterruptedException();
- }
- checkFile(files[i]);
- }
- }
-
- private void checkFile(Object fileElement) {
- MinimizedFileSystemElement file = (MinimizedFileSystemElement) fileElement;
- if (isIncludedInImportData(file)) {
- List elements = new ArrayList();
- FileSystemElement parent = file.getParent();
- if (selectionMap.containsKey(parent)) {
- elements = (List) (selectionMap.get(parent));
- }
- elements.add(file);
- selectionMap.put(parent, elements);
- }
- }
- };
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(final IProgressMonitor monitor) throws InterruptedException {
- String msg = RemoteImportExportResources.FILEMSG_IMPORT_FILTERING;
- monitor.beginTask(msg, IProgressMonitor.UNKNOWN);
- getSelectedResources(filter, monitor);
- }
- };
- try {
- // have to set fork to false to avoid InvocationTargetException !!
- dialog.run(false, true, runnable);
- } catch (InvocationTargetException exception) {
- //Couldn't start. Do nothing.
- return;
- } catch (InterruptedException exception) {
- //Got interrupted. Do nothing.
- return;
- }
- // make sure that all paint operations caused by closing the progress
- // dialog get flushed, otherwise extra pixels will remain on the screen until
- // updateSelections is completed
- getShell().update();
- // The updateSelections method accesses SWT widgets so cannot be executed
- // as part of the above progress dialog operation since the operation forks
- // a new process.
- updateSelections(selectionMap);
- }
-
- /* (non-Javadoc)
- * Method declared on IDialogPage. Set the selection up when it becomes visible.
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- resetSelection();
- // importing from remote folder selection
- if (initSourceNameSet) {
- setAllSelections(true);
- selectionGroup.setFocus();
- }
- RemoteImportWizard parentWizard = (RemoteImportWizard) getWizard();
- boolean isInitializingFromImportData = parentWizard.getInitializeFromImportData();
- // initializing from import data
- if (isInitializingFromImportData) {
- setAllSelections(true);
- setupSelectionsBasedOnImportData();
- }
- }
-
- /**
- * Update the selections with those in map . Implemented here to give inner class
- * visibility
- * @param map Map - key tree elements, values Lists of list elements
- */
- protected void updateSelections(Map map) {
- super.updateSelections(map);
- }
-
- /**
- * Check if widgets are enabled or disabled by a change in the dialog.
- * Provided here to give access to inner classes.
- */
- protected void updateWidgetEnablements() {
- // need this check because handleEvent(), which calls this, is called when restoring container
- if (saveSettingsButton != null && descFilePathLabel != null && descFilePathField != null && descFileBrowseButton != null) {
- boolean isSaveSettings = isSaveSettings();
- descFilePathLabel.setEnabled(isSaveSettings);
- descFilePathField.setEnabled(isSaveSettings);
- descFileBrowseButton.setEnabled(isSaveSettings);
- }
-
- // if review is selected, the other options are grayed out without save settings
- if (reviewSynchronizeCheckbox != null){ // event handling could come before the widgets are created
- boolean isReview = reviewSynchronizeCheckbox.getSelection();
- overwriteExistingResourcesCheckbox.setEnabled(!isReview);
- createContainerStructureButton.setEnabled(!isReview);
- createOnlySelectedButton.setEnabled(!isReview);
- }
-
-
- // this calls to determine whether page can be completed
- super.updateWidgetEnablements();
- }
-
- /**
- * Answer a boolean indicating whether self's source specification
- * widgets currently all contain valid values.
- */
- protected boolean validateSourceGroup() {
- File sourceDirectory = getSourceDirectory();
- if (sourceDirectory == null) {
- setMessage(SOURCE_EMPTY_MESSAGE);
- enableButtonGroup(false);
- return false;
- }
- if (sourceConflictsWithDestination(new Path(sourceDirectory.getPath()))) {
- setErrorMessage(getSourceConflictMessage());
- enableButtonGroup(false);
- return false;
- }
- enableButtonGroup(true);
- return true;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.WizardDataTransferPage#validateOptionsGroup()
- */
- protected boolean validateOptionsGroup() {
- if (isSaveSettings()) {
- IPath location = new Path(getDescriptionLocation());
- // if location is empty, no error message, but it's not valid
- if (location.toString().length() == 0) {
- setErrorMessage((String) null);
- return false;
- }
- // location must start with '/'
- if (!location.toString().startsWith("/")) { //$NON-NLS-1$
- setErrorMessage(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_ABSOLUTE);
- return false;
- }
- // find the resource, including a variant if any
- IResource resource = findResource(location);
- // if resource is not a file, it must be a container. So location is pointing to a container, which is an error
- if (resource != null && resource.getType() != IResource.FILE) {
- setErrorMessage(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_EXISTING_CONTAINER);
- return false;
- }
- // get the resource (or any variant of it) after removing the last segment
- // this gets the parent resource
- resource = findResource(location.removeLastSegments(1));
- // if parent resource does not exist, or if it is a file, then it is not valid
- if (resource == null || resource.getType() == IResource.FILE) {
- setErrorMessage(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_NO_CONTAINER);
- return false;
- }
- // get the file extension
- String fileExtension = location.getFileExtension();
- // ensure that file extension is valid
- if (fileExtension == null || !fileExtension.equals(Utilities.IMPORT_DESCRIPTION_EXTENSION)) {
- setErrorMessage(NLS.bind(RemoteImportExportResources.IMPORT_EXPORT_ERROR_DESCRIPTION_INVALID_EXTENSION, Utilities.IMPORT_DESCRIPTION_EXTENSION));
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns the resource for the specified path.
- *
- * @param path the path for which the resource should be returned
- * @return the resource specified by the path or <code>null</code>
- */
- protected IResource findResource(IPath path) {
- IWorkspace workspace = SystemBasePlugin.getWorkspace();
- // validate path
- IStatus result = workspace.validatePath(path.toString(), IResource.ROOT | IResource.PROJECT | IResource.FOLDER | IResource.FILE);
- // if path valid
- if (result.isOK()) {
- // get the workspace root
- IWorkspaceRoot root = workspace.getRoot();
- // see if path exists. If it does, return the resource at the path
- if (root.exists(path)) {
- return root.findMember(path);
- }
- // see if a variant of the path exists
- else {
- // look for variant
- IResource variant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(path);
- // if a variant does exist, return it
- if (variant != null) {
- return variant;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns whether the source location conflicts
- * with the destination resource. This will occur if
- * the source is already under the destination.
- *
- * @param sourcePath the path to check
- * @return <code>true</code> if there is a conflict, <code>false</code> if not
- */
- protected boolean sourceConflictsWithDestination(IPath sourcePath) {
- IContainer container = getSpecifiedContainer();
- if (container == null)
- return false;
- else
- return getSpecifiedContainer().getLocation().isPrefixOf(sourcePath);
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#setInputObject(java.lang.Object)
- */
- public void setInputObject(Object inputObject) {
- this.inputObject = inputObject;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#getInputObject()
- */
- public Object getInputObject() {
- return inputObject;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#performFinish()
- */
- public boolean performFinish() {
- return finish();
- }
-
- public void cancel() {
- if (_queryAllJob != null && _queryAllJob.isActive()){
- _queryAllJob.cancel();
- }
- }
-
-
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#setHelp(java.lang.String)
- */
- public void setHelp(String id) {
- if (parentComposite != null) SystemWidgetHelpers.setHelp(parentComposite, helpId);
- this.helpId = id;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.systems.core.ui.wizards.ISystemWizardPage#getHelpContextId()
- */
- public String getHelpContextId() {
- return helpId;
- }
-
- // ----------------
- // 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);
- // }
- // }
- // -----------------------------
- // 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 = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED, 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) {
- if (message != null) {
- msgLine.setErrorMessage(message);
- } else {
- msgLine.clearErrorMessage();
- }
- } else { // not configured yet
- pendingErrorString = 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);
- } else { // not configured yet
- pendingString = message;
- }
- }
-
- public boolean determinePageCompletion(){
- if (_queryAllJob != null && _queryAllJob.isActive()){
- return false;
- }
- return super.determinePageCompletion();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeExpandDropListener.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeExpandDropListener.java
deleted file mode 100644
index 3d4e26186..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeExpandDropListener.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * TreeExpandDropListener provides automatic expansion for Trees during drag and drop
- * operations.
- * <p>
- * If the pointer hovers for a time over an item in the Tree that has not yet been
- * expanded, the item is expanded automatically. This behaviour is consistent with
- * that of popular GUI systems.
- * </p><p>
- * To use it send addDropListener(new TreeExpandDropListener(tree)) to the DropTarget
- * object attached to the Tree.
- * </p>
- */
-public class TreeExpandDropListener extends DropTargetAdapter {
- public static final long DEFAULT_EXPAND_DELAY = 1000; // millis
- private long hoverThreshhold = DEFAULT_EXPAND_DELAY;
- private long hoverBegin = 0;
- private TreeItem hoverItem = null;
- private Tree tree;
-
- /**
- * Constructs a Tree expanding Drop Listener
- *
- * @param tree the Tree that the DropTarget is attached to
- */
- public TreeExpandDropListener(final Tree tree) {
- this.tree = tree;
- }
-
- /**
- * Handles dragEnter events.
- * This is an implementation detail.
- */
- public void dragEnter(DropTargetEvent event) {
- hoverItem = null;
- }
-
- /**
- * Handles dragOver events.
- * This is an implementation detail.
- */
- public void dragOver(DropTargetEvent event) {
- Point point = tree.toControl(new Point(event.x, event.y));
- // Get the item directly under the point
- TreeItem item = tree.getItem(point);
- if (item != hoverItem) {
- // We just started hovering, remember this item
- if ((item != null) && (!item.getExpanded())) {
- hoverBegin = System.currentTimeMillis();
- hoverItem = item;
- } else {
- hoverItem = null;
- }
- } else if (hoverItem != null) {
- // We've been hovering for a while, expand if our timer elapsed
- long hoverCurrent = System.currentTimeMillis();
- if (hoverCurrent - hoverBegin >= hoverThreshhold) {
- // Fake as if the user expanded the item manually
- Event hoverEvent = new Event();
- hoverEvent.x = event.x;
- hoverEvent.y = event.y;
- hoverEvent.item = hoverItem;
- hoverEvent.time = (int) hoverCurrent;
- hoverItem.setExpanded(true);
- hoverItem = null;
- tree.notifyListeners(SWT.Expand, hoverEvent);
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeScrollDropListener.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeScrollDropListener.java
deleted file mode 100644
index e99e1ec7e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/TreeScrollDropListener.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.importexport.files;
-
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * TreeScrollDropListener provides automatic scrolling for Trees during drag and drop
- * operations.
- * <p>
- * If the pointer drags over an item in the Tree near its upper or
- * lower edges, the Tree will scroll so as to make previous or successive items visible
- * onscreen. This behaviour is consistent with that of popular GUI systems.
- * </p><p>
- * To use it send addDropListener(new TreeScrollDropListener(tree)) to the DropTarget
- * object attached to the Tree.
- * </p>
- */
-public class TreeScrollDropListener extends DropTargetAdapter {
- private Tree tree;
-
- /**
- * Constructs a Tree scrolling Drop Listener
- *
- * @param tree the Tree that the DropTarget is attached to
- */
- public TreeScrollDropListener(final Tree tree) {
- this.tree = tree;
- }
-
- /**
- * Handles dragOver events.
- * This is an implementation detail.
- */
- public void dragOver(DropTargetEvent event) {
- Point point = tree.toControl(new Point(event.x, event.y));
- // Get the item directly under the point
- TreeItem item = tree.getItem(point);
- if (item == null) return;
- // Determine scroll direction according to whether we're nearer the top, middle, or bottom
- Rectangle clientArea = tree.getClientArea();
- int scrollRegionSize = Math.min(clientArea.height / 3, 24); // cut region into 3 parts
- if (scrollRegionSize < 8) return; // don't scroll if the control is too small to make sense
- TreeItem showItem = item;
- for (;;) {
- if (point.y < clientArea.y + scrollRegionSize) {
- // in upper region
- showItem = getPreviousVisibleItem(tree, showItem);
- } else if (point.y > clientArea.height + clientArea.y - scrollRegionSize) {
- // in lower region
- showItem = getNextVisibleItem(tree, showItem, false);
- } else {
- // in middle region
- break;
- }
- // Show the item (causes a scroll if it is outside of the visible region)
- if (showItem == null) break;
- tree.showItem(showItem);
- // Test that we actually scrolled, if we didn't try again with the next item
- if (item != tree.getItem(point)) break;
- }
- }
-
- /**
- * Given a TreeItem, locates its last (lowest) visible item
- * <p>
- * Note that the item may not be actually rendered onscreen though it would be
- * visible were the control scrolled appropriately.
- * </p>
- *
- * @param item the TreeItem whose last visible child is to be found
- * @return the last visible child, or <code>item</code> if no visible children.
- */
- private TreeItem getLastVisibleChild(TreeItem item) {
- if (!item.getExpanded()) return item;
- TreeItem[] items = item.getItems();
- if (items == null || items.length == 0) return item;
- return getLastVisibleChild(items[items.length - 1]);
- }
-
- /**
- * Given a TreeItem, locates the following (below the specified item) visible TreeItem in a tree.
- * <p>
- * Note that the item may not be actually rendered onscreen though it would be
- * visible were the control scrolled appropriately.
- * </p>
- *
- * @param tree the Tree containing the items
- * @param item the TreeItem whose next visible neighbour is to be found
- * @return the next visible item, or null if none.
- */
- private TreeItem getNextVisibleItem(Tree tree, TreeItem item, boolean ignoreChildren) {
- TreeItem parent = item.getParentItem();
- TreeItem[] items = (parent != null) ? parent.getItems() : tree.getItems();
- if (items != null) {
- for (int i = 0; i < items.length; ++i) {
- if (items[i] == item) {
- if (!ignoreChildren && items[i].getExpanded()) {
- TreeItem[] children = items[i].getItems();
- if (children != null && children.length > 0) return children[0];
- }
- if (i + 1 < items.length) return items[i + 1];
- break;
- }
- }
- if (parent != null) return getNextVisibleItem(tree, parent, true);
- }
- return null;
- }
-
- /**
- * Given a TreeItem, locates the previous (above the specified item) visible TreeItem in a tree.
- * <p>
- * Note that the item may not be actually rendered onscreen though it would be
- * visible were the control scrolled appropriately.
- * </p>
- *
- * @param tree the Tree containing the items
- * @param item the TreeItem whose previous visible neighbour is to be found
- * @return the previous visible item, or null if none.
- */
- private TreeItem getPreviousVisibleItem(Tree tree, TreeItem item) {
- TreeItem parent = item.getParentItem();
- TreeItem[] items = (parent != null) ? parent.getItems() : tree.getItems();
- if (items != null) {
- for (int i = items.length - 1; i > 0; --i) {
- if (items[i] == item) return getLastVisibleChild(items[i - 1]);
- }
- }
- return parent;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java
deleted file mode 100644
index 1b8f497b8..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/UniFilePlus.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-public class UniFilePlus extends File {
- /**
- *
- */
- private static final long serialVersionUID = -1717648997950319457L;
- public IRemoteFile remoteFile = null;
-
- /**
- * Constructor. There is only one way to construct this object,
- * and that is by giving an IRemoteFile object. All java.io.File
- * methods are intercepted and delegated to this contained object.
- */
- public UniFilePlus(IRemoteFile remoteFile) {
- super(remoteFile.getAbsolutePath());
- this.remoteFile = remoteFile;
- }
-
- public boolean canRead() {
- return remoteFile.canRead();
- }
-
- public boolean canWrite() {
- return remoteFile.canWrite();
- }
-
- public int compareTo(File pathname) {
- if (pathname instanceof UniFilePlus) return remoteFile.compareTo(pathname);
- return super.compareTo(pathname);
- }
-
- /*
- public int compareTo(Object o)
- {
- return remoteFile.compareTo(o);
- }
- */
- public boolean createNewFile() throws IOException {
- IRemoteFile newFile = null;
- try {
- newFile = remoteFile.getParentRemoteFileSubSystem().createFile(remoteFile, new NullProgressMonitor());
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if (e != null) {
- if (e instanceof SecurityException)
- throw (SecurityException) e;
- else if (e instanceof IOException) throw (IOException) e;
- }
- if (exc instanceof RemoteFileSecurityException)
- throw new SecurityException(exc.getMessage());
- else
- throw new IOException(exc.getMessage());
- } catch (SystemMessageException e) {
- throw new IOException(e.getMessage());
- }
- if (newFile != null) {
- remoteFile = newFile;
- return true;
- } else
- return false;
- }
-
- public boolean delete() {
- boolean ok = true;
- try {
- remoteFile.getParentRemoteFileSubSystem().delete(remoteFile, new NullProgressMonitor());
- //hmm, should we set remoteFile to null?
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
- throw new SecurityException(exc.getMessage());
- } catch (SystemMessageException e) {
- //TODO should there be more user feedback?
- SystemBasePlugin.logMessage(e.getSystemMessage());
- ok = false;
- }
- return ok;
- }
-
- /**
- * NOT SUPPORTED!
- */
- public void deleteOnExit() {
- }
-
- public boolean equals(Object obj) {
- return remoteFile.equals(obj);
- }
-
- public boolean exists() {
- return remoteFile.exists();
- }
-
- public File getAbsoluteFile() {
- return this; // Remote File objects are always absolute!
- }
-
- public String getAbsolutePath() {
- return remoteFile.getAbsolutePath();
- }
-
- public File getCanonicalFile() {
- // hmm, maybe we should equal getAbsolutePathPlusConnection as canonical!
- return this;
- }
-
- public String getCanonicalPath() {
- return remoteFile.getAbsolutePathPlusConnection();
- }
-
- public String getName() {
- return remoteFile.getName();
- }
-
- public String getParent() {
- return remoteFile.getParentPath();
- }
-
- public UniFilePlus getParentFile() {
- IRemoteFile parentFolder = this.remoteFile.getParentRemoteFileSubSystem().getParentFolder(this.remoteFile, null);
-
- if (parentFolder != null) {
- return new UniFilePlus(parentFolder);
- } else
- return null;
- }
-
- public String getPath() {
- return remoteFile.getAbsolutePath();
- }
-
- public int hashCode() {
- return remoteFile.getAbsolutePathPlusConnection().hashCode();
- }
-
- public boolean isAbsolute() {
- return true;
- }
-
- public boolean isDirectory() {
- return remoteFile.isDirectory();
- }
-
- public boolean isFile() {
- return remoteFile.isFile();
- }
-
- public boolean isHidden() {
- return remoteFile.isHidden();
- }
-
- public long lastModified() {
- return remoteFile.getLastModified();
- }
-
- public long length() {
- return remoteFile.getLength();
- }
-
- /**
- * Returns an array of remote files that are children of this folder.
- * This will be an null if there is an error or if the target object
- * is not a folder.
- * @return the array of IRemoteFiles.
- */
- public IRemoteFile[] listIRemoteFiles() {
- IRemoteFile[] result = null;
- try {
- result = remoteFile.getParentRemoteFileSubSystem().list(remoteFile, getNullMonitor());
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("unexpected exception", e); //$NON-NLS-1$
- }
- return result;
- }
-
- public String[] list() {
- IRemoteFile[] files = null;
- try {
- files = remoteFile.getParentRemoteFileSubSystem().list(remoteFile, getNullMonitor());
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("unexpected exception", e); //$NON-NLS-1$
- }
- if (files != null) {
- String[] fileNames = new String[files.length];
- for (int idx = 0; idx < files.length; idx++)
- fileNames[idx] = files[idx].getName();
- return fileNames;
- } else
- return null;
- }
-
- public File[] listFiles() {
- IRemoteFile[] files = null;
-
- try {
- files = remoteFile.getParentRemoteFileSubSystem().list(this.remoteFile, null);
- } catch (SystemMessageException e) {
- e.printStackTrace();
- SystemBasePlugin.logError("unexpected exception", e); //$NON-NLS-1$
- }
- if (files != null) {
- Vector<UniFilePlus> children = new Vector<UniFilePlus>();
- for (int i = 0; i < files.length; i++) {
- // fileName = files[idx].getName();
- UniFilePlus fileObj = new UniFilePlus(files[i]);
- children.addElement(fileObj);
- }
- UniFilePlus[] fileObjs = new UniFilePlus[children.size()];
- // for (int i = 0; i < children.size(); i++)
- // fileObjs[i] = (UniFilePlus) children.elementAt(i);
- // return fileObjs;
- return children.toArray(fileObjs);
- } else
- return null;
- }
-
- public String[] list(FilenameFilter filter) {
- IRemoteFile[] files = null;
- try {
- files = remoteFile.getParentRemoteFileSubSystem().list(remoteFile, getNullMonitor());
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("unexpected exception", e); //$NON-NLS-1$
- }
- if (files != null) {
- Vector v = new Vector();
- String fileName = null;
- for (int idx = 0; idx < files.length; idx++) {
- fileName = files[idx].getName();
- if ((fileName != null) && (filter.accept(this, fileName))) v.addElement(fileName);
- }
- String[] fileNames = new String[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- fileNames[idx] = (String) v.elementAt(idx);
- return fileNames;
- } else
- return null;
- }
-
- public File[] listFiles(FileFilter filter) {
- IRemoteFile[] files = null;
- try {
- files = remoteFile.getParentRemoteFileSubSystem().list(remoteFile, getNullMonitor());
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("unexpected exception", e); //$NON-NLS-1$
- }
- if (files != null) {
- Vector v = new Vector();
- for (int idx = 0; idx < files.length; idx++) {
- //fileName = files[idx].getName();
- File fileObj = new File(files[idx].getAbsolutePath());
- if (filter.accept(fileObj)) v.addElement(fileObj);
- }
- File[] fileObjs = new File[v.size()];
- for (int idx = 0; idx < v.size(); idx++)
- fileObjs[idx] = (File) v.elementAt(idx);
- return fileObjs;
- } else
- return null;
- }
-
- public File[] listFiles(FilenameFilter filter) {
- IRemoteFile[] files = null;
- try {
- files = remoteFile.getParentRemoteFileSubSystem().list(remoteFile, getNullMonitor());
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("unexpected exception", e); //$NON-NLS-1$
- }
- if (files != null) {
- Vector v = new Vector();
- String fileName = null;
- for (int idx = 0; idx < files.length; idx++) {
- fileName = files[idx].getName();
- if ((fileName != null) && (filter.accept(this, fileName))) v.addElement(files[idx]);
- }
- File[] fileObjs = new File[v.size()];
- for (int idx = 0; idx < v.size(); idx++) {
- fileObjs[idx] = new File(((IRemoteFile) v.elementAt(idx)).getAbsolutePath());
- }
- return fileObjs;
- } else
- return null;
- }
-
- public boolean mkdir() {
- IRemoteFile dir = null;
- try {
- if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolder(remoteFile, new NullProgressMonitor());
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
- throw new SecurityException(exc.getMessage());
- } catch (SystemMessageException e) {
- //TODO should there be more user feedback?
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
- if (dir != null) remoteFile = dir;
- return (dir != null);
- }
-
- public boolean mkdirs() {
- IRemoteFile dir = null;
- try {
- if (!remoteFile.exists()) dir = remoteFile.getParentRemoteFileSubSystem().createFolders(remoteFile, new NullProgressMonitor());
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
- throw new SecurityException(exc.getMessage());
- } catch (SystemMessageException e) {
- //TODO should there be more user feedback?
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
- if (dir != null) remoteFile = dir;
- return (dir != null);
- }
-
- public boolean renameTo(File dest) {
- boolean ok = false;
- try {
- remoteFile.getParentRemoteFileSubSystem().rename(remoteFile, dest.getName(), new NullProgressMonitor());
- ok = true;
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
- throw new SecurityException(exc.getMessage());
- } catch (SystemMessageException e) {
- //TODO should there be more user feedback?
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
- return ok;
- }
-
- public boolean setLastModified(long time) {
- boolean ok = false;
- if (time < 0) throw new IllegalArgumentException();
- try {
- IProgressMonitor monitor = new NullProgressMonitor();
- remoteFile.getParentRemoteFileSubSystem().setLastModified(remoteFile, time, monitor);
- ok = true;
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
- throw new SecurityException(exc.getMessage());
- } catch (SystemMessageException e) {
- //TODO should there be more user feedback?
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
- return ok;
- }
-
- public boolean setReadOnly() {
- boolean ok = false;
- try {
- remoteFile.getParentRemoteFileSubSystem().setReadOnly(remoteFile, true, new NullProgressMonitor());
- ok = true;
- } catch (RemoteFileException exc) {
- Exception e = exc.getRemoteException();
- if ((e != null) && (e instanceof SecurityException)) throw (SecurityException) e;
- throw new SecurityException(exc.getMessage());
- } catch (SystemMessageException e) {
- //TODO should there be more user feedback?
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
- return ok;
- }
-
- public String toString() {
- return getPath();
- }
-
- public URL toURL() throws MalformedURLException {
- String urlName = "file://" + remoteFile.getAbsolutePathPlusConnection().replace('\\', '/'); //$NON-NLS-1$
- if (remoteFile.isDirectory() && !urlName.endsWith("/")) //$NON-NLS-1$
- urlName = urlName + '/';
- return new URL(urlName);
- }
-
- private IProgressMonitor getNullMonitor() {
- IProgressMonitor result = new NullProgressMonitor();
- return result;
- }
-
- public IRemoteFile getRemoteFile() {
- return remoteFile;
- }
-
- public InputStream getInputStream() throws SystemMessageException {
- return this.remoteFile.getParentRemoteFileSubSystem().getInputStream(this.remoteFile.getParentPath(), this.remoteFile.getName(), this.remoteFile.isBinary(), null);
- }
-
- public void synchRemoteFile() {
- // get the latest version of the remote file
- remoteFile.markStale(true);
- try {
- remoteFile = remoteFile.getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
- }
- catch (Exception e){}
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java
deleted file mode 100644
index 30ffcd94d..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/Utilities.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [180562][api] dont implement IRemoteImportExportConstants
- * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-package org.eclipse.rse.internal.importexport.files;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Contains several helper methods.
- * A lot of these should really be provided by comm. layer, but for
- * many reasons they were not. oh well ....
- */
-public class Utilities {
- public static final String IMPORT_DESCRIPTION_EXTENSION = IRemoteImportExportConstants.REMOTE_FILE_IMPORT_DESCRIPTION_FILE_EXTENSION;
- public static final String EXPORT_DESCRIPTION_EXTENSION = IRemoteImportExportConstants.REMOTE_FILE_EXPORT_DESCRIPTION_FILE_EXTENSION;
-
- /**
- * Use this method to get IRemoteFile object from SystemConnection, and path
- *
- */
- public static IRemoteFile getIRemoteFile(IHost c, String path) {
- IRemoteFile ret = null;
- if (c != null) {
- try {
- IRemoteFileSubSystem ss = RemoteFileUtility.getFileSubSystem(c);
-
- char sep = ss.getSeparatorChar();
- if (sep != '/')
- {
- // on windows we need win path
- path = path.replace('/', sep);
- }
-
- ret = ss.getRemoteFileObject(path, new NullProgressMonitor());
- } catch (SystemMessageException e) {
- // get RemoteFileObject has been changed to raise
- // SystemMessageException.
- error(e);
- }
- }
- return ret;
- }
-
- /**
- * Use this method to get selected string from an
- * IRemoteFile object.
- */
- public static String getAsString(IRemoteFile selectedDirectory) {
- return selectedDirectory.getHost().getSystemProfileName() + '.' + selectedDirectory.getHost().getAliasName() + ":" + selectedDirectory.getAbsolutePath(); //$NON-NLS-1$
- }
-
- /**
- * Use this method to get selected string from an
- * UniFilePlus object.
- */
- public static String getAsString(UniFilePlus selectedDirectory) {
- return selectedDirectory.remoteFile.getHost().getSystemProfileName() + '.' + selectedDirectory.remoteFile.getHost().getAliasName() + ":" + selectedDirectory.getPath(); //$NON-NLS-1$
- }
-
- /**
- * Validate remote connection, and issue error if required.
- *
- */
- public static boolean isConnectionValid(String name, Shell s) {
- boolean ret = true;
- IHost sc = parseForSystemConnection(name);
- if (sc == null) {
- // invalid connection
- ret = false;
-
- String msgTxt = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION;
- String msgDetails = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.show(s, msg);
- //displayMessage(s, ISystemMessages.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION, true);
- }
- return ret;
- }
-
- /**
- * Use this method to retrieve an IRemoteFile object from a
- * selection string.
- */
- public static IRemoteFile parseForIRemoteFile(String sel) {
- IHost c = parseForSystemConnection(sel);
- if (c != null) {
- String path = parseForPath(sel);
- return getIRemoteFile(c, path);
- } else
- return null;
- }
-
- /**
- * Use this method to retrieve the file path from a
- * selection string.
- */
- public static String parseForPath(String sel) {
- return sel.indexOf(":") >= 0 ? sel.substring(sel.indexOf(":") + 1) : sel; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Use this method to retrieve a SystemConnection from profile and a
- * connectionName string.
- */
- public static IHost getConnection(String profileName, String connectionName) {
- IHost[] connections = RSECorePlugin.getTheSystemRegistry().getHosts();
- if (profileName != null) {
- // given both profile and connection name...
- for (int loop = 0; loop < connections.length; loop++) {
- if (connections[loop].getAliasName().equalsIgnoreCase(connectionName) && connections[loop].getSystemProfileName().equalsIgnoreCase(profileName)) return connections[loop];
- }
- } else
- // given only connection name...
- for (int loop = 0; loop < connections.length; loop++) {
- if (connections[loop].getAliasName().equalsIgnoreCase(connectionName)) return connections[loop]; // return 1st match
- }
- return null;
- }
-
- /**
- * Use this method to retrieve a SystemConnection from a
- * selection string. Should really be a part of RSE. If
- * multiple separators ('.') are encountered will try
- * profile names with 0,1,2,...n separators in order until a
- * valid connection is found, or we run out of options.
- *
- * Not perfect, for example will never return connection C for
- * profile one.two.three, if connection three.C for profile one.two
- * exists. But this scheme should work fine for most practical
- * cases.
- *
- * Wish RSE had chosen a separator that could not be part of
- * valid connection name.
- */
- public static IHost parseForSystemConnection(String sel) {
- try {
- // Assumption: following will return null if connection has
- // been deleted or renamed!
- String connectionName = sel.substring(0, sel.indexOf(":")); //$NON-NLS-1$
- if (connectionName.indexOf('.') < 0)
- return getConnection(null, connectionName);
- else {
- // iterate through all possible combinations until we find a match, or
- // run out of options
- int dots = 0, temp = 0;
- IHost sc = null;
- while (connectionName.indexOf('.', temp) >= 0) {
- dots++;
- temp = connectionName.indexOf('.', temp) + 1;
- sc = getConnection(connectionName.substring(0, temp - 1), connectionName.substring(temp));
- if (sc != null) return sc;
- }
- // did not find any, last hope try no profile, and '.' in name
- return getConnection(null, connectionName);
- }
- } catch (Exception e) {
- // Received exception while validating string.
- // Ignore exception, just return null on fall-thru
- }
- // Connection with specified name was not found
- return null;
- }
-
- // generic classes:
- public static void error(Exception e) {
- Object[] o = null;
- // While developing launch configuration work we noticed that
- // we could enter here with no access to a Shell object. Changed
- // this method to simply log the exception in such cases.
- Shell s = getShell();
- try {
- s = SystemBasePlugin.getActiveWorkbenchWindow().getShell();
- } catch (Exception e1) {
- s = null;
- }
- if (SystemMessageException.class.isInstance(e)) {
- String mID = ((SystemMessageException) e).getSystemMessage().getFullMessageID().substring(0, 8);
- Debug.out("About to issue SystemMessageException for " + mID); //$NON-NLS-1$
- if (mID.compareToIgnoreCase("EVFC9104") != 0 && mID.compareToIgnoreCase("EVFC9112") != 0) { //$NON-NLS-1$ //$NON-NLS-2$
- // As per DY, do not issue 9104, or 9112 messages; they must have already been issued!
- if (s != null) {
- SystemMessageDialog d = new SystemMessageDialog(s, ((SystemMessageException) e).getSystemMessage());
- d.open();
- }
- }
- } else {
- o = new Object[] { e.getLocalizedMessage() == null ? e.toString() : e.getLocalizedMessage() };
- logExceptionError(NLS.bind(RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, o), e);
- if (s != null) {
- String msgTxt = NLS.bind(RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, o[0]);
- String msgDetails = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
- IRemoteImportExportConstants.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION,
- IStatus.ERROR, msgTxt, msgDetails);
- SystemMessageDialog.show(s, msg);
- }
- }
- }
-
- public static Shell getShell() {
- Shell s = null;
- try {
- s = SystemBasePlugin.getActiveWorkbenchWindow().getShell();
- } catch (Exception e1) {
- s = null;
- }
- return s;
- }
-
- public static void logExceptionError(String msgTxt, Throwable exception) {
- SystemBasePlugin.logError(msgTxt, exception);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/ISynchronizeData.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/ISynchronizeData.java
deleted file mode 100644
index 1ec97e00a..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/ISynchronizeData.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Store synchronize information. This class is needed per each synchronize
- * operation.
- *
- */
-public interface ISynchronizeData {
- /**
- * Return the descriptionFile path that store synchronize information.
- *
- * @return
- */
- public IFile getDescriptionFile();
-
- /**
- * Return the remote path.
- *
- * @return
- */
- public String getRemoteLocation();
-
- /**
- * Set the remote path
- *
- * @param location
- */
- public void setRemoteLocation(String location);
-
- /**
- * Return the local path.
- *
- * @return
- */
- public IPath getLocalLocation();
-
- /**
- * Set the local path
- *
- * @param location
- */
- public void setLocalLocation(IPath location);
-
- /**
- * Return the synchronize type of this operation.
- *
- * @return
- */
- public int getSynchronizeType();
-
- public void setSynchronizeType(int synchronizeType);
-
- /**
- * Return the element list that are synchronized in this operation.
- *
- * @return
- */
- public List<IResource> getElements();
-
- public void setElements(List<IResource> elements);
-
- /**
- * Return if synchronize information is saved or not.
- *
- * @return
- */
- public boolean isSaveSettings();
-
- public void setSaveSettings(boolean saveSettings);
-
- /**
- * Return if overwrite existing files or not.
- *
- * @return
- */
- public boolean isOverWriteExistingFiles();
-
- public void setOverWriteExistingFiles(boolean overWriteExistingFiles);
-
- /**
- * Return if create directory structure or not.
- *
- * @return
- */
- public boolean isCreateDirectoryStructure();
-
- public void setCreateDirectoryStructure(boolean createDirectoryStructure);
-
- /**
- * Return the description file path.
- *
- * @return
- */
- public String getDescriptionFilePath();
-
- public void setDescriptionFilePath(String descriptionFilePath);
-
- /**
- * Return if create selection only or not.
- *
- * @return
- */
- public boolean isCreateSelectionOnly();
-
- public void setCreateSelectionOnly(boolean createSelectionOnly);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSEResourceVariantComparator.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSEResourceVariantComparator.java
deleted file mode 100644
index 66161185e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSEResourceVariantComparator.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemResourceVariant;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ThreeWayResourceComparator;
-import org.eclipse.team.core.variants.ThreeWaySynchronizer;
-import org.eclipse.team.internal.core.mapping.LocalResourceVariant;
-
-public class RSEResourceVariantComparator extends ThreeWayResourceComparator {
- private ThreeWaySynchronizer _synchronizer;
- public RSEResourceVariantComparator(ThreeWaySynchronizer synchronizer){
- super(synchronizer);
- _synchronizer = synchronizer;
- }
-
-
-
- public boolean compare(IResource local, IResourceVariant remote) {
- // return super.compare(local, remote) && equalSize(local, remote);
- if(local instanceof IContainer) {
- if(remote.isContainer()) {
- return true;
- }
- return false;
- }
- if(local instanceof IFile && remote instanceof FileSystemResourceVariant) {
- FileSystemResourceVariant myE2 = (FileSystemResourceVariant)remote;
- myE2.synchRemoteFile(); // make sure we've got the latest remote file
-
- SystemIFileProperties properties = new SystemIFileProperties(local);
-
- long remoteTimeStamp = myE2.lastModified();
-
- if (remoteTimeStamp == 0){
- // file no longer exists
- properties.setRemoteFileTimeStamp(0);
- properties.setDownloadFileTimeStamp(0);
- return false;
- }
-
- long storedTimeStamp = properties.getRemoteFileTimeStamp();
- long storedLocalTimeStamp = properties.getDownloadFileTimeStamp();
- long localTimeStamp = local.getLocalTimeStamp();
-
- if (storedTimeStamp == 0){
- // never been stored before
- // assuming up-to-date file and now marking this timestamp
- properties.setRemoteFileTimeStamp(remoteTimeStamp);
- properties.setDownloadFileTimeStamp(local.getLocalTimeStamp());
-
- storedTimeStamp = remoteTimeStamp;
- storedLocalTimeStamp = localTimeStamp;
- }
-
- boolean result = storedTimeStamp == remoteTimeStamp && storedLocalTimeStamp == localTimeStamp;
- return result;
- }
- else if (local instanceof IFile && remote instanceof LocalResourceVariant){
- return true; // local resource variant is for local
- }
- return false;
- }
-
-
- /*
- public boolean compare(IResource local, IResourceVariant remote) {
- // First, ensure the resources are the same gender
- if ((local.getType() == IResource.FILE) == remote.isContainer()) {
- return false;
- }
- try {
- // If the file is locally modified, it cannot be in sync
- if (local.getType() == IResource.FILE && _synchronizer.isLocallyModified(local)) {
- // return false;
- }
-
- // If there is no base, the local cannot match the remote
- if (_synchronizer.getBaseBytes(local) == null) return false;
-
- // Otherwise, assume they are the same if the remote equals the base
- return equals(_synchronizer.getBaseBytes(local), getBytes(remote));
- } catch (TeamException e) {
- TeamPlugin.log(e);
- return false;
- }
- }
- */
-
- public boolean compare(IResourceVariant e1, IResourceVariant e2) {
- if(e1.isContainer()) {
- if(e2.isContainer()) {
- return true;
- }
- return false;
- }
- if(e1 instanceof FileSystemResourceVariant && e2 instanceof FileSystemResourceVariant) {
- FileSystemResourceVariant myE1 = (FileSystemResourceVariant)e1;
- FileSystemResourceVariant myE2 = (FileSystemResourceVariant)e2;
- return myE1.lastModified() == myE2.lastModified();
- }
- return false;
- }
-
- private byte[] getBytes(IResourceVariant remote) {
- return remote.asBytes();
- }
-
- private boolean equals(byte[] syncBytes, byte[] oldBytes) {
- if (syncBytes == null || oldBytes == null){
- return false;
- }
-
- if (syncBytes.length != oldBytes.length) return false;
- for (int i = 0; i < oldBytes.length; i++) {
- if (oldBytes[i] != syncBytes[i]) return false;
- }
- return true;
- }
-
-
- /**
- * Return if the size of local and remote file are the same.
- * @param local
- * @param remote
- * @return
- */
- private boolean equalSize(IResource local, IResourceVariant remote){
- long localSize = local.getLocation().toFile().length();
- long remoteSize = 0;
- if(remote instanceof FileSystemResourceVariant){
- remoteSize = ((FileSystemResourceVariant)remote).getFile().length();
- }
- return localSize == remoteSize;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSESyncUtils.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSESyncUtils.java
deleted file mode 100644
index 51e359b5e..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/RSESyncUtils.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.internal.synchronize;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-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.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
-import org.eclipse.rse.internal.importexport.files.IRemoteFileExportDescriptionWriter;
-import org.eclipse.rse.internal.importexport.files.IRemoteFileImportDescriptionWriter;
-import org.eclipse.rse.internal.importexport.files.RemoteFileExportData;
-import org.eclipse.rse.internal.importexport.files.RemoteFileImportData;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeFilter;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public class RSESyncUtils {
-
- /**
- * Convenience method to get the currently active workbench page. Note that
- * the active page may not be the one that the user perceives as active in
- * some situations so this method of obtaining the active page should only
- * be used if no other method is available.
- *
- * @return the active workbench page
- */
- public static IWorkbenchPage getActivePage() {
- IWorkbenchWindow window = RemoteImportExportPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- return window.getActivePage();
- }
-
- /**
- * Helper method for export operation.
- * Calculate the synchronized elements in local side by using ISynchornizeFilter.
- * The filter contains paths of synchronized elements in local side.
- * The calculated resources are added in the resources.
- *
- * @param local root handle in local side.
- * @param filter
- * @param resources calculated resources
- * @throws CoreException
- */
- public static void getSynchronizeResources(IResource local, ISynchronizeFilter filter, List<IResource> resources) throws CoreException{
- if(!filter.isExcluded(local.getFullPath())){
- resources.add(local);
- }
- if(local.getType() != IResource.FILE){
- for (IResource resource : ((IContainer)local).members()) {
- getSynchronizeResources(resource, filter, resources);
- }
- }
- }
-
- /**
- * Helper method for import operation.
- * Calculate the synchronize elements in local side by using ISynchronizeFilter.
- * The filter contains paths of synchronized elements in remote side.
- * The calculated resources are added in the resources.
- *
- * @param localRoot root handle in local side
- * @param remote current element in remote side
- * @param remoteRoot root handle in remote side
- * @param filter
- * @param resources calculated resources
- * @throws SystemMessageException
- * @throws CoreException
- */
- public static void getSynchronizeResources(IResource localRoot, IRemoteFile remote, IRemoteFile remoteRoot, ISynchronizeFilter filter, List<IResource> resources) throws SystemMessageException, CoreException{
-
- if(!filter.isExcluded(new Path(remote.getAbsolutePathPlusConnection()))){
- String relativePath = remote.getAbsolutePath().replace(remoteRoot.getAbsolutePath(), "");
- if(remote.isFile()){
-// IFile file = ((IProject)localRoot).getFile(relativePath);
-// IPath filePath = file.getProjectRelativePath();
- resources.add(((IProject)localRoot).getFile(relativePath));
- }else{
-// IFolder folder = ((IProject)localRoot).getFolder(relativePath);
-// IPath folderPath = folder.getProjectRelativePath();
- resources.add(((IProject)localRoot).getFolder(relativePath));
- }
-
- }
- if(!remote.isFile()){
- for (IRemoteFile remoteFile : remote.getParentRemoteFileSubSystem().list(remote, null)) {
- getSynchronizeResources(localRoot, remoteFile, remoteRoot, filter, resources);
- }
- }
- }
-
- // <Copied from org.eclipse.rse.internal.importexport.files.RemoteFileExportOperation>
- /**
- * Saves a description file for the export.
- *
- * @throws CoreException
- * if an unexpected exception occurs.
- * @throws IOException
- * if an I/O error occurs.
- */
- public static void saveDescription(RemoteFileExportData exportData) throws CoreException, IOException {
- ByteArrayOutputStream objectStreamOutput = new ByteArrayOutputStream();
- IRemoteFileExportDescriptionWriter writer = exportData.createExportDescriptionWriter(objectStreamOutput);
- ByteArrayInputStream fileInput = null;
- try {
- writer.write(exportData);
- fileInput = new ByteArrayInputStream(objectStreamOutput.toByteArray());
- IFile descriptionFile = exportData.getDescriptionFile();
- // check if resource exists
- if (descriptionFile.isAccessible()) {
- descriptionFile.setContents(fileInput, true, true, null);
- }
- // if resource does not exist
- else {
- // now have to check if a variant of this file exists (i.e.
- // whether a file exists
- // that has the same path with a different case. For case
- // insensitive file systems
- // such as Windows, this is needed since we can't simply create
- // a file with a different
- // case. Note that isAccessible() above does not check for file
- // paths with different case,
- // so we have to check it explicitly).
- IResource variant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(descriptionFile.getFullPath());
- // if a variant was not found, create the new file
- if (variant == null) {
- // check if a variant of the parent exists
- // we need to do this because at this point we know that the
- // file path does not
- // exist, and neither does its variant. However, it is
- // possible that the parent path
- // has a variant, in which case calling create on the
- // description file with
- // the path as it is given will fail. We need to get the
- // variant path of the parent,
- // append the name of the file to the variant path, and
- // create a file with that path.
- // get parent
- IResource parent = descriptionFile.getParent();
- if (parent != null) {
- // get parent path
- IResource parentVariant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(parent.getFullPath());
- // no parent variant (i.e. in a case sensitive file
- // system)
- if (parentVariant == null) {
- descriptionFile.create(fileInput, true, null);
- }
- // parent variant found (might be same as original
- // parent path)
- else {
- IPath newPath = parentVariant.getFullPath().append(descriptionFile.getName());
- IFile newDescriptionFile = SystemBasePlugin.getWorkspace().getRoot().getFile(newPath);
- newDescriptionFile.create(fileInput, true, null);
- }
- }
- }
- // otherwise, simply set the contents of the variant file
- else {
- if (variant instanceof IFile) {
- ((IFile) variant).setContents(fileInput, true, true, null);
- }
- }
- }
- } finally {
- if (fileInput != null) {
- fileInput.close();
- }
- if (writer != null) {
- writer.close();
- }
- }
- }
- // </Copied from org.eclipse.rse.internal.importexport.files.RemoteFileExportOperation>
-
- // <Copied from org.eclipse.rse.internal.importexport.files.RemoteFileExportOperation>
- /**
- * Saves a description file for the export.
- *
- * @throws CoreException
- * if an unexpected exception occurs.
- * @throws IOException
- * if an I/O error occurs.
- */
- public static void saveDescription(RemoteFileImportData importData) throws CoreException, IOException {
- ByteArrayOutputStream objectStreamOutput = new ByteArrayOutputStream();
- IRemoteFileImportDescriptionWriter writer = importData.createImportDescriptionWriter(objectStreamOutput);
- ByteArrayInputStream fileInput = null;
- try {
- writer.write(importData);
- fileInput = new ByteArrayInputStream(objectStreamOutput.toByteArray());
- IFile descriptionFile = importData.getDescriptionFile();
- // check if resource exists
- if (descriptionFile.isAccessible()) {
- descriptionFile.setContents(fileInput, true, true, null);
- }
- // if resource does not exist
- else {
- // now have to check if a variant of this file exists (i.e.
- // whether a file exists
- // that has the same path with a different case. For case
- // insensitive file systems
- // such as Windows, this is needed since we can't simply create
- // a file with a different
- // case. Note that isAccessible() above does not check for file
- // paths with different case,
- // so we have to check it explicitly).
- IResource variant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(descriptionFile.getFullPath());
- // if a variant was not found, create the new file
- if (variant == null) {
- // check if a variant of the parent exists
- // we need to do this because at this point we know that the
- // file path does not
- // exist, and neither does its variant. However, it is
- // possible that the parent path
- // has a variant, in which case calling create on the
- // description file with
- // the path as it is given will fail. We need to get the
- // variant path of the parent,
- // append the name of the file to the variant path, and
- // create a file with that path.
- // get parent
- IResource parent = descriptionFile.getParent();
- if (parent != null) {
- // get parent path
- IResource parentVariant = RemoteImportExportUtil.getInstance().findExistingResourceVariant(parent.getFullPath());
- // no parent variant (i.e. in a case sensitive file
- // system)
- if (parentVariant == null) {
- descriptionFile.create(fileInput, true, null);
- }
- // parent variant found (might be same as original
- // parent path)
- else {
- IPath newPath = parentVariant.getFullPath().append(descriptionFile.getName());
- IFile newDescriptionFile = SystemBasePlugin.getWorkspace().getRoot().getFile(newPath);
- newDescriptionFile.create(fileInput, true, null);
- }
- }
- }
- // otherwise, simply set the contents of the variant file
- else {
- if (variant instanceof IFile) {
- ((IFile) variant).setContents(fileInput, true, true, null);
- }
- }
- }
- } finally {
- if (fileInput != null) {
- fileInput.close();
- }
- if (writer != null) {
- writer.close();
- }
- }
- }
- // </Copied from org.eclipse.rse.internal.importexport.files.RemoteFileExportOperation>
-
- public static final String PLUGIN_ID = "org.eclipse.rse.internal.synchronize"; //$NON-NLS-1$
- // Repository provider name
- public static final String PROVIDER_ID = FileSystemProvider.class.getName();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/SynchronizeData.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/SynchronizeData.java
deleted file mode 100644
index c03d7b98f..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/SynchronizeData.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize;
-
-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.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.internal.importexport.files.RemoteFileExportData;
-import org.eclipse.rse.internal.importexport.files.RemoteFileImportData;
-import org.eclipse.rse.internal.importexport.files.UniFilePlus;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeFilter;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-public class SynchronizeData implements ISynchronizeData {
- private String descriptionFilePath;
- private String remoteLocation;
- private IPath localLocation;
- private List<IResource> elements;
- private int synchronizeType;
- private boolean saveSettings;
- private boolean createSelectionOnly;
- private boolean createDirectoryStructure;
- private boolean overWriteExistingFiles;
- private boolean reviewSynchronzie;
-
- public SynchronizeData() {
- setDescriptionFilePath(null);
- setRemoteLocation(null);
- setLocalLocation(null);
- setElements(null);
- setSynchronizeType(0);
- setSaveSettings(false);
- setCreateDirectoryStructure(false);
- setCreateSelectionOnly(false);
- setOverWriteExistingFiles(false);
- }
-
- public SynchronizeData(RemoteFileExportData data) {
- setDescriptionFilePath(data.getDescriptionFilePath());
- setRemoteLocation(data.getDestination());
- setElements(data.getElements()); // for an export, the elements determine the source
- setLocalLocation(data.getContainerPath());
- setSynchronizeType(ISynchronizeOperation.SYNC_MODE_OVERRIDE_DEST);
- setSaveSettings(data.isSaveSettings());
- setCreateDirectoryStructure(data.isCreateDirectoryStructure());
- setCreateSelectionOnly(data.isCreateSelectionOnly());
- setReviewSynchronzie(data.isReviewSynchronize());
- setOverWriteExistingFiles(data.isOverWriteExistingFiles());
- }
-
- public SynchronizeData(RemoteFileImportData data) throws SystemMessageException, CoreException{
- IRemoteFile remoteRoot = ((UniFilePlus)data.getSource()).getRemoteFile();
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IContainer localRoot = (IContainer)workspace.getRoot().findMember(data.getContainerPath());
-
- ArrayList<IPath> paths = new ArrayList<IPath>();
- List<UniFilePlus> resources = data.getElements();
- for (UniFilePlus uniFilePlus : resources) {
- paths.add(new Path(uniFilePlus.getRemoteFile().getAbsolutePathPlusConnection()));
- }
- SynchronizeFilter filter = new SynchronizeFilter(paths);
- ArrayList<IResource> localResource = new ArrayList<IResource>();
-
- RSESyncUtils.getSynchronizeResources(localRoot, remoteRoot, remoteRoot, filter, localResource);
-
- setLocalLocation(data.getContainerPath());
- setDescriptionFilePath(data.getDescriptionFilePath());
- setRemoteLocation(((UniFilePlus)data.getSource()).getRemoteFile().getAbsolutePathPlusConnection());
- setElements(localResource);
- setSynchronizeType(ISynchronizeOperation.SYNC_MODE_OVERRIDE_SOURCE);
- setSaveSettings(data.isSaveSettings());
- setCreateDirectoryStructure(data.isCreateDirectoryStructure());
- setCreateSelectionOnly(data.isCreateSelectionOnly());
- setOverWriteExistingFiles(data.isOverWriteExistingFiles());
- }
-
- public IFile getDescriptionFile() {
- String pathString = getDescriptionFilePath();
- if (pathString == null) {
- return null;
- }
- IPath path = new Path(pathString);
- if (path.isValidPath(path.toString()) && path.segmentCount() >= 2) {
- return SystemBasePlugin.getWorkspace().getRoot().getFile(path);
- } else {
- return null;
- }
- }
-
- public String getDescriptionFilePath() {
- return descriptionFilePath;
- }
-
- public void setDescriptionFilePath(String descriptionFilePath) {
- this.descriptionFilePath = descriptionFilePath;
- }
-
- public String getRemoteLocation() {
- return remoteLocation;
- }
-
- public void setRemoteLocation(String location) {
- this.remoteLocation = location;
- }
-
- public IPath getLocalLocation() {
- return localLocation;
- }
-
- public void setLocalLocation(IPath location) {
- this.localLocation = location;
- }
-
-
- public List<IResource> getElements() {
- return elements;
- }
-
- public void setElements(List<IResource> elements) {
- this.elements = elements;
- }
-
- public int getSynchronizeType() {
- return synchronizeType;
- }
-
- public void setSynchronizeType(int synchronizeType) {
- this.synchronizeType = synchronizeType;
- }
-
- public boolean isSaveSettings() {
- return saveSettings;
- }
-
- public void setSaveSettings(boolean saveSettings) {
- this.saveSettings = saveSettings;
- }
-
- public boolean isCreateSelectionOnly() {
- return createSelectionOnly;
- }
-
- public void setCreateSelectionOnly(boolean createSelectionOnly) {
- this.createSelectionOnly = createSelectionOnly;
- }
-
- public boolean isOverWriteExistingFiles() {
- return overWriteExistingFiles;
- }
-
- public void setOverWriteExistingFiles(boolean overWriteExistingFiles) {
- this.overWriteExistingFiles = overWriteExistingFiles;
- }
-
- public boolean isCreateDirectoryStructure() {
- return createDirectoryStructure;
- }
-
- public void setCreateDirectoryStructure(boolean createDirectoryStructure) {
- this.createDirectoryStructure = createDirectoryStructure;
- }
-
- public boolean isReviewSynchronzie() {
- return reviewSynchronzie;
- }
-
- public void setReviewSynchronzie(boolean reviewSynchronzie) {
- this.reviewSynchronzie = reviewSynchronzie;
- }
-
- public RemoteFileExportData getExportData() {
- RemoteFileExportData data = new RemoteFileExportData();
- data.setElements(getElements());
- data.setCreateDirectoryStructure(isCreateDirectoryStructure());
- data.setCreateSelectionOnly(isCreateSelectionOnly());
- data.setOverWriteExistingFiles(isOverWriteExistingFiles());
- data.setSaveSettings(isSaveSettings());
- data.setDescriptionFilePath(getDescriptionFilePath());
- data.setDestination(getRemoteLocation());
-
- return data;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileModificationValidator.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileModificationValidator.java
deleted file mode 100644
index bbf95be9c..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileModificationValidator.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.rse.importexport / FileModificationValidator
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-
-/**
- * This class models a sentry that verifies whether resources are available for
- * editing or overwriting. This has been made a separate class for illustration
- * purposes. It may have been more appropriate to have FileSystemProvider
- * implement IFileModificationValidator itself since the interface only has two
- * methods and their implementation is straight forward.
- */
-public final class FileModificationValidator extends org.eclipse.core.resources.team.FileModificationValidator {
-
- private FileSystemOperations operations;
-
- /**
- * Constructor for FileModificationValidator.
- */
- public FileModificationValidator(RepositoryProvider provider) {
- operations = ((FileSystemProvider) provider).getOperations();
- }
-
- /**
- * This method will convert any exceptions thrown by the
- * SimpleAccessOperations.checkout() to a Status.
- *
- * @param resources
- * the resources that are to be checked out
- * @return IStatus a status indicator that reports whether the operation
- * went smoothly or not.
- */
- private IStatus checkout(IResource[] resources) {
- try {
- operations.checkout(resources, IResource.DEPTH_INFINITE, null);
- } catch (TeamException e) {
- // return new Status(IStatus.ERROR, FileSystemPlugin.ID, 0,
- // e.getLocalizedMessage(), e);
- return new Status(IStatus.ERROR, RSESyncUtils.PLUGIN_ID, 0, e.getLocalizedMessage(), e);
- }
- return Status.OK_STATUS;
- }
-
- /**
- * This method will be called by the workbench/editor before it tries to
- * edit one or more files. The idea is to prevent anyone from accidentally
- * working on a file that they won't be able to check in changes to.
- *
- * @see
- * org.eclipse.core.resources.IFileModificationValidator#validateEdit(IFile
- * [], Object)
- */
- @Override
- public IStatus validateEdit(IFile[] files, FileModificationValidationContext context) {
- Collection toBeCheckedOut = new ArrayList();
-
- // Make a list of all the files that need to be checked out:
- for (int i = 0; i < files.length; i++) {
- if (!operations.isCheckedOut(files[i])) {
- toBeCheckedOut.add(files[i]);
- }
- }
-
- return checkout((IResource[]) toBeCheckedOut.toArray(new IResource[toBeCheckedOut.size()]));
- }
-
- /**
- * This method will be called by the workbench before it tries to save a
- * file. It should not attempt to save any files that don't receive an OK
- * status here.
- *
- * @see
- * org.eclipse.core.resources.IFileModificationValidator#validateSave(IFile
- * )
- */
- @Override
- public IStatus validateSave(IFile file) {
- if (file.isReadOnly()) {
- return checkout(new IResource[] { file });
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemOperations.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemOperations.java
deleted file mode 100644
index 401ecddcf..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemOperations.java
+++ /dev/null
@@ -1,564 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Andreas Voss <av@tonbeller.com> - Bug 181141 [Examples] Team: filesystem provider example can not handle deletions
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemOperations
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-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.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.rse.internal.importexport.files.UniFilePlus;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemResourceVariant;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.core.variants.ThreeWaySynchronizer;
-import org.eclipse.ui.dialogs.ContainerGenerator;
-
-/**
- * The get and put operations for the file system provider.
- */
-public class FileSystemOperations {
- // A reference to the provider
- // private FileSystemProvider provider;
-
- FileSystemOperations(FileSystemProvider provider) {
- // this.provider = provider;
- }
-
- private FileSystemProvider getProvider(IResource resource) {
- return (FileSystemProvider) RepositoryProvider.getProvider(resource.getProject());
- }
-
- /**
- * Make the local state of the project match the remote state by getting any
- * out-of-sync resources. The overrideOutgoing flag is used to indicate
- * whether locally modified files should also be replaced or left alone.
- *
- * @param resources
- * the resources to get
- * @param depth
- * the depth of the operation
- * @param overrideOutgoing
- * whether locally modified resources should be replaced
- * @param progress
- * a progress monitor
- * @throws TeamException
- */
- public void get(IResource[] resources, int depth, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- try {
- // ensure the progress monitor is not null
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("GetAction.working"), 100); //$NON-NLS-1$
- // Refresh the subscriber so we have the latest remote state
- FileSystemSubscriber.getInstance().refresh(resources, depth, new SubProgressMonitor(progress, 30));
- internalGet(resources, depth, overrideOutgoing, new SubProgressMonitor(progress, 70));
- } finally {
- progress.done();
- }
- }
-
- /**
- * Make the local state of the traversals match the remote state by getting
- * any out-of-sync resources. The overrideOutgoing flag is used to indicate
- * whether locally modified files should also be replaced or left alone.
- *
- * @param traversals
- * the traversals that cover the resources to get
- * @param overrideOutgoing
- * whether locally modified resources should be replaced
- * @param progress
- * a progress monitor
- * @throws TeamException
- */
- public void get(ResourceTraversal[] traversals, boolean overrideOutgoing, IProgressMonitor monitor) throws TeamException {
- try {
- // ensure the progress monitor is not null
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100 * traversals.length);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- get(traversal.getResources(), traversal.getDepth(), overrideOutgoing, new SubProgressMonitor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Checkout the given resources to the given depth by setting any files to
- * writable (i.e set read-only to <code>false</code>.
- *
- * @param resources
- * the resources to be checked out
- * @param depth
- * the depth of the checkout
- * @param progress
- * a progress monitor
- * @throws TeamException
- */
- public void checkout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
- try {
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("FileSystemSimpleAccessOperations.1"), resources.length); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- Policy.checkCanceled(progress);
- resources[i].accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- // TODO: lock the file on the' server'.
- resource.getResourceAttributes().setReadOnly(false);
- }
- return true;
- }
- }, depth, false /* include phantoms */);
- progress.worked(1);
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } finally {
- progress.done();
- }
- }
-
- /**
- * Check-in the given resources to the given depth by replacing the remote
- * (i.e. file system) contents with the local workspace contents.
- *
- * @param resources
- * the resources
- * @param depth
- * the depth of the operation
- * @param overrideIncoming
- * indicate whether incoming remote changes should be replaced
- * @param progress
- * a progress monitor
- * @throws TeamException
- */
- public void checkin(IResource[] resources, int depth, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- try {
- // ensure the progress monitor is not null
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("PutAction.working"), 100); //$NON-NLS-1$
- // Refresh the subscriber so we have the latest remote state
- FileSystemSubscriber.getInstance().refresh(resources, depth, new SubProgressMonitor(progress, 30));
- internalPut(resources, depth, overrideIncoming, new SubProgressMonitor(progress, 70));
- } finally {
- progress.done();
- }
- }
-
- /**
- * Check-in the given resources to the given depth by replacing the remote
- * (i.e. file system) contents with the local workspace contents.
- *
- * @param traversals
- * the traversals that cover the resources to check in
- * @param overrideIncoming
- * indicate whether incoming remote changes should be replaced
- * @param progress
- * a progress monitor
- * @throws TeamException
- */
- public void checkin(ResourceTraversal[] traversals, boolean overrideIncoming, IProgressMonitor monitor) throws TeamException {
- try {
- // ensure the progress monitor is not null
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100 * traversals.length);
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- checkin(traversal.getResources(), traversal.getDepth(), overrideIncoming, new SubProgressMonitor(monitor, 100));
- // update to the latest state
- FileSystemSubscriber.getInstance().refresh(traversal.getResources(), traversal.getDepth(), null);
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return whether the local resource is checked out. A resource is checked
- * out if it is a file that is not read-only. Folders are always checked
- * out.
- *
- * @param resource
- * the resource
- * @return whether the resource is checked out and can be modified
- */
- public boolean isCheckedOut(IResource resource) {
- if (resource.getType() != IResource.FILE) {
- return true;
- }
- return !resource.getResourceAttributes().isReadOnly();
- // return !resource.isReadOnly();
- }
-
- /*
- * Get the resource variant for the given resource.
- */
- private FileSystemResourceVariant getExportResourceVariant(IResource resource) {
- // return
- // (FileSystemResourceVariant)provider.getResourceVariant(resource);
- return (FileSystemResourceVariant) getProvider(resource).getExportResourceVariant(resource);
- }
-
- private FileSystemResourceVariant getImportResourceVariant(IResource resource){
- return (FileSystemResourceVariant) getProvider(resource).getImportResourcevariant(resource);
- }
-
- private void internalGet(IResource[] resources, int depth, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- // Traverse the resources and get any that are out-of-sync
- // System.out.println("get operation");
- progress.beginTask(Policy.bind("GetAction.working"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- Policy.checkCanceled(progress);
- if (resources[i].getType() == IResource.FILE) {
- internalGet((IFile) resources[i], overrideOutgoing, progress);
- } else if (depth != IResource.DEPTH_ZERO) {
- internalGet((IContainer) resources[i], depth, overrideOutgoing, progress);
- }
- progress.worked(1);
- }
- }
-
- /*
- * Get the folder and its children to the depth specified.
- */
- private void internalGet(IContainer container, int depth, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- try {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- // Make the local folder state match the remote folder state
- List toDelete = new ArrayList();
- if (container.getType() == IResource.FOLDER) {
- IFolder folder = (IFolder) container;
-// FileSystemResourceVariant remote = getExportResourceVariant(container);
- FileSystemResourceVariant remote = getImportResourceVariant(container);
- if (!folder.exists() && remote != null) {
- // Create the local folder
-// folder.create(false, true, progress);
- folder.create(true, true, progress);
- folder.getResourceAttributes().setReadOnly(false);
- synchronizer.setBaseBytes(folder, remote.asBytes());
- } else if (folder.exists() && remote == null) {
- // Schedule the folder for removal but delay in
- // case the folder contains outgoing changes
- toDelete.add(folder);
- }
- }
-
- // Get the children
- IResource[] children = synchronizer.members(container);
- if (children.length > 0) {
- internalGet(children, depth == IResource.DEPTH_INFINITE ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO, overrideOutgoing, progress);
- }
-
- // Remove any empty folders
- for (Iterator iter = toDelete.iterator(); iter.hasNext();) {
- IFolder folder = (IFolder) iter.next();
- if (folder.members().length == 0) {
- folder.delete(false, true, progress);
- synchronizer.flush(folder, IResource.DEPTH_INFINITE);
- }
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /*
- * Get the file if it is out-of-sync.
- */
- private void internalGet(IFile localFile, boolean overrideOutgoing, IProgressMonitor progress) throws TeamException {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- IResourceVariantComparator comparator = FileSystemSubscriber.getInstance().getResourceComparator();
-// FileSystemResourceVariant remote = getExportResourceVariant(localFile);
- FileSystemResourceVariant remote = getImportResourceVariant(localFile);
- byte[] baseBytes = synchronizer.getBaseBytes(localFile);
- FileSystemProvider provider = getProvider(localFile);
- IResourceVariant base = provider.getResourceVariant(localFile, baseBytes);
-//
-// if (!synchronizer.hasSyncBytes(localFile) || (isLocallyModified(localFile) && !overrideOutgoing)) {
-// // Do not overwrite the local modification
-// return;
-// }
- if (base != null && remote == null) {
- // The remote no longer exists so remove the local
- try {
- localFile.delete(false, true, progress);
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- return;
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
- if (!synchronizer.isLocallyModified(localFile) && base != null && remote != null && comparator.compare(base, remote)) {
- // The base and remote are the same and there's no local changes
- // so nothing needs to be done
- return;
- }
- try {
-// UniFilePlus remoteFile = (UniFilePlus) provider.getExportFile(localFile);
- UniFilePlus remoteFile = (UniFilePlus) provider.getImportFile(localFile);
- if(!remoteFile.exists()){
- localFile.delete(true, null);
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- }else{
- if(localFile.exists()){
- localFile.delete(true, null);
- }
- try {
- // Copy from the remote file to the local file:
-
-// if(!localFile.getParent().exists()){
-// IPath parentPath = localFile.getFullPath().removeLastSegments(1);
-// ContainerGenerator generator = new ContainerGenerator(parentPath);
-// IContainer container = generator.generateContainer(null);
-// container.getResourceAttributes().setReadOnly(false);
-// }
- createParentFolderRecursively(localFile);
- remoteFile.getRemoteFile().getParentRemoteFileSubSystem().download(remoteFile.getRemoteFile(), localFile.getLocation().toOSString(), localFile.getCharset(), progress);
-// remoteFile.getRemoteFile().getParentRemoteFileSubSystem().download(remoteFile.getRemoteFile(), parent.getLocation().toOSString(), localFile.getCharset(), progress);
-
- // Mark as read-only to force a checkout before editing
- //System.out.println(localFile.getLocation() + " : accessible = " + localFile.isAccessible()+", existing = "+localFile.exists());
- if(localFile.isAccessible()){
- localFile.getResourceAttributes().setReadOnly(true);
- }
-
- localFile.getParent().refreshLocal(IResource.DEPTH_ONE, progress);
-
- // update sync status
- synchronizer.setBaseBytes(localFile, remote.asBytes());
-
- // update stored timestamp
- SystemIFileProperties properties = new SystemIFileProperties(localFile);
- properties.setRemoteFileTimeStamp(remoteFile.lastModified());
- properties.setDownloadFileTimeStamp(localFile.getLocalTimeStamp());
-
- } catch (SystemMessageException e) {
- e.printStackTrace();
- }
- }
- } catch (CoreException e) {
- throw FileSystemPlugin.wrapException(e);
- }
- }
-
- // actual put operation for files
- private void internalPut(IResource[] resources, int depth, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- try {
- // ensure the progress monitor is not null
- progress = Policy.monitorFor(progress);
- progress.beginTask(Policy.bind("PutAction.working"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- for (int i = 0; i < resources.length; i++) {
- Policy.checkCanceled(progress);
- if (resources[i].getType() == IResource.FILE) {
- internalPut((IFile) resources[i], overrideIncoming, progress);
- } else if (depth > 0) { // Assume that resources are either
- // files or containers.
- internalPut((IContainer) resources[i], depth, overrideIncoming, progress);
- }
- progress.worked(1);
- }
- progress.done();
- } catch (TeamException e) {
- throw e;
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Put the file if the sync state allows it.
- *
- * @param localFile
- * the local file
- * @param overrideIncoming
- * whether incoming changes should be overwritten
- * @param progress
- * a progress monitor
- * @return whether the put succeeded (i.e. the local matches the remote)
- * @throws TeamException
- */
- private boolean internalPut(IFile localFile, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- IResourceVariantComparator comparator = FileSystemSubscriber.getInstance().getResourceComparator();
- FileSystemResourceVariant remote = getExportResourceVariant(localFile);
- byte[] baseBytes = synchronizer.getBaseBytes(localFile);
- FileSystemProvider provider = getProvider(localFile);
- IResourceVariant base = provider.getResourceVariant(localFile, baseBytes);
-
- overrideIncoming = true; // DKM - test
- // Check whether we are overriding a remote change
- if (base == null && remote != null && !overrideIncoming) {
- // The remote is an incoming (or conflicting) addition.
- // Do not replace unless we are overriding
- return false;
- } else if (base != null && remote == null) {
- // The remote is an incoming deletion
- if (!localFile.exists()) {
- // Conflicting deletion. Clear the synchronizer.
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- } else if (!overrideIncoming) {
- // Do not override the incoming deletion
- return false;
- }
- } else if (base != null && remote != null) {
- boolean same = comparator.compare(base, remote);
- if (!isLocallyModified(localFile) && same) {
- // The base and remote are the same and there's no local changes
- // so nothing needs to be done
- return true;
- }
- if (!same && !overrideIncoming) {
- // The remote has changed. Only override if specified
- return false;
- }
- }
-
- // Handle an outgoing deletion
- UniFilePlus remoteFile = (UniFilePlus) provider.getExportFile(localFile);
- if (!localFile.exists()) {
- remoteFile.delete();
- synchronizer.flush(localFile, IResource.DEPTH_ZERO);
- } else {
- // Otherwise, upload the contents
- try {
- // Copy from the local file to the remote file:
- try {
- if (!remoteFile.getParentFile().exists()) {
- remoteFile.getParentFile().mkdirs();
- }
- remoteFile.getRemoteFile().getParentRemoteFileSubSystem().upload(localFile.getLocation().toOSString(), remoteFile.getRemoteFile(), localFile.getCharset(), progress);
- // Mark the file as read-only to require another checkout
- localFile.getResourceAttributes().setReadOnly(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- // Update the synchronizer base bytes
- remote = getExportResourceVariant(localFile);
- synchronizer.setBaseBytes(localFile, remote.asBytes());
-
- // update stored timestamp
- // make sure the remote file is up-to-date
- remoteFile.getRemoteFile().markStale(true);
- IRemoteFile updatedRemoteFile = remoteFile.getRemoteFile().getParentRemoteFileSubSystem().getRemoteFileObject(remoteFile.getRemoteFile().getAbsolutePath(), progress);
-
- SystemIFileProperties properties = new SystemIFileProperties(localFile);
- properties.setRemoteFileTimeStamp(updatedRemoteFile.getLastModified());
- properties.setDownloadFileTimeStamp(localFile.getLocalTimeStamp());
-
- } catch (CoreException e) {
- throw FileSystemPlugin.wrapException(e);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return true;
- }
-
- private boolean isLocallyModified(IFile localFile) throws TeamException {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- if (!localFile.exists()) {
- // Extra check for bug 141415
- return synchronizer.getBaseBytes(localFile) != null;
- }
- return synchronizer.isLocallyModified(localFile);
- }
-
- /*
- * Get the folder and its children to the depth specified.
- */
- private void internalPut(IContainer container, int depth, boolean overrideIncoming, IProgressMonitor progress) throws TeamException {
- try {
- ThreeWaySynchronizer synchronizer = FileSystemSubscriber.getInstance().getSynchronizer();
- FileSystemProvider provider = getProvider(container);
- // Make the local folder state match the remote folder state
- List toDelete = new ArrayList();
- if (container.getType() == IResource.FOLDER) {
- IFolder folder = (IFolder) container;
- UniFilePlus diskFile = (UniFilePlus) provider.getExportFile(container);
- FileSystemResourceVariant remote = getExportResourceVariant(container);
- if (!folder.exists() && remote != null) {
- // Schedule the folder for removal but delay in
- // case the folder contains incoming changes
- toDelete.add(diskFile);
- } else if (folder.exists() && remote == null) {
- // Create the remote directory and sync up the local
- diskFile.mkdirs();
-
- IResourceVariant variant = provider.getExportResourceVariant(folder);
- if (variant == null){
- // remote directory does not exist
- }
- else {
- synchronizer.setBaseBytes(folder, variant.asBytes());
- }
- }
- } else if (container.getType() == IResource.PROJECT) {
- IProject project = (IProject) container;
- UniFilePlus remoteProjectFolder = (UniFilePlus) provider.getExportFile(project);
- FileSystemResourceVariant remoteResourceVariant = getExportResourceVariant(container);
- if (project.exists() && remoteResourceVariant == null) {
- remoteProjectFolder.mkdir();
- synchronizer.setBaseBytes(project, provider.getExportResourceVariant(project).asBytes());
- }
- }
-
- // Get the children
- IResource[] children = synchronizer.members(container);
- if (children.length > 0) {
- internalPut(children, depth == IResource.DEPTH_INFINITE ? IResource.DEPTH_INFINITE : IResource.DEPTH_ZERO, overrideIncoming, progress);
- }
-
- // Remove any empty folders
- for (Iterator iter = toDelete.iterator(); iter.hasNext();) {
- File diskFile = (File) iter.next();
- if (diskFile.listFiles().length == 0) {
- diskFile.delete();
- synchronizer.flush(container, IResource.DEPTH_INFINITE);
- }
- }
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private void createParentFolderRecursively(IResource resource) throws CoreException{
- if(!resource.getParent().exists()){
- ContainerGenerator generator = new ContainerGenerator(resource.getParent().getFullPath());
- IContainer parent = generator.generateContainer(null);
- createParentFolderRecursively(parent);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemPlugin.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemPlugin.java
deleted file mode 100644
index 5b56262b9..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemPlugin.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemPlugin
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * This is the plugin class for the file system examples. It provides the
- * following:
- *
- * <ol>
- * <li>public fields for the plugin and provider IDs as defined in the
- * plugin.xml
- * <li>initialization on startup of Policy class that provides
- * internationalization of strings
- * <li>helper methods for outputing IStatus objects to the log
- * <li>helper methods for converting CoreExceptions and IOExceptions to
- * TeamExceptions
- * </ol>
- */
-public class FileSystemPlugin extends AbstractUIPlugin {
-
- /**
- * This is the ID of the plugin as defined in the plugin.xml
- */
- /**
- * This is the provider ID of the plugin as defined in the plugin.xml
- */
- // This static field will hold the singleton instance of the plugin class
- private static FileSystemPlugin plugin;
-
- /**
- * Override the standard plugin constructor.
- *
- * @param descriptor
- * the plugin descriptor
- */
- public FileSystemPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- // record this instance as the singleton
- plugin = this;
- }
-
- /**
- * Return the singlton instance of the plugin class to allow other classes
- * in the plugin access to plugin instance methods such as those for logging
- * errors, etc.
- */
- public static FileSystemPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Helper method to convert a CoreException into a TeamException. We do this
- * to maintain the core status and code. This type of mapping may not be
- * appropriate in more complicated exception handling situations.
- *
- * @param e
- * the CoreException
- */
- public static TeamException wrapException(CoreException e) {
- return new TeamException(e.getStatus());
- }
-
- /**
- * Helper method to convert an IOException into a TeamException. This type
- * of mapping may not be appropriate in more complicated exception handling
- * situations.
- *
- * @param e
- * the CoreException
- */
- public static TeamException wrapException(IOException e) {
- return new TeamException(new Status(IStatus.ERROR,
- RSESyncUtils.PLUGIN_ID, TeamException.IO_FAILED, e
- .getMessage(), e));
- }
-
- /**
- * Helper method to log an exception status.
- *
- * @param status
- * the status to be logged
- */
- public static void log(IStatus status) {
- plugin.getLog().log(status);
- }
-
- /**
- * Returns the standard display to be used. The method first checks, if the
- * thread calling this method has an associated display. If so, this display
- * is returned. Otherwise the method returns the default display.
- */
- public static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if (display == null) {
- display = Display.getDefault();
- }
- return display;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- public static void log(CoreException e) {
- log(new Status(e.getStatus().getSeverity(),
- RSESyncUtils.PLUGIN_ID, 0, e.getMessage(), e));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProvider.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProvider.java
deleted file mode 100644
index c637af194..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProvider.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemProvider
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.importexport.files.UniFilePlus;
-import org.eclipse.rse.internal.importexport.files.Utilities;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemResourceVariant;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.history.IFileHistoryProvider;
-import org.eclipse.team.core.variants.IResourceVariant;
-
-/**
- * This example illustrates how to create a concrete implementation of a
- * <code>RepositoryProvider</code> that uses the file system to act as the
- * repository. See the plugin.xml file for the xml required to register this
- * provider with the Team extension point
- * <code>org.eclipse.team.core.repository</code>. The plugin.xml file also
- * contains examples of how to filter menu items using a repository provider's
- * ID.
- *
- * <p>
- * This example provider illustrates the following:
- * <ol>
- * <li>simple working implementation of <code>RepositoyProvider</code>
- * <li>storage of a persistent property with the project (which provides the
- * target location for the provider)
- * <li>access to an instance of <code>SimpleAccessOperations</code> for
- * performing simple file operations
- * </ol>
- *
- * <p>
- * Additional functionality that will be illustrated in the future include:
- * <ol>
- * <li>Validate Save/Validate Edit
- * <li>Move/Delete Hook
- * <li>Project Sets
- * <li>Use of the workspace synchronizer (ISynchronizOperation)
- * <li>Use of decorators
- * <li>combining streams and progress monitors to get responsive UI
- * </ol>
- *
- */
-public class FileSystemProvider extends RepositoryProvider {
-
- /*
- * Create a custom rule factory to allow more optimistic concurrency
- */
- private static final ResourceRuleFactory RESOURCE_RULE_FACTORY = new ResourceRuleFactory() {
- // Just need a subclass to instantiate
- };
-
- // The location of the folder on file system where the repository is stored.
- private IPath remoteRootPath;
- private IPath localRootPath;
- private UniFilePlus remoteRoot;
-
- private Map _resourceMap;
-
- // The QualifiedName that is used to persist the location across workspace
- // as a persistent property on a resource
- private static QualifiedName FILESYSTEM_REPO_LOC = new QualifiedName(RSESyncUtils.PLUGIN_ID, "disk_location"); //$NON-NLS-1$
-
- /**
- * Create a new FileSystemProvider.
- */
- public FileSystemProvider() {
- super();
- _resourceMap = new HashMap();
- }
-
- public void reset()
- {
- _resourceMap.clear();
- }
-
- /**
- * This method is invoked when the provider is mapped to a project. Although
- * we have access to the project at this point (using
- * <code>getProject()</code>, we don't know the root location so there is
- * nothing we can do yet.
- *
- * @see org.eclipse.team.core.RepositoryProvider#configureProject()
- */
- @Override
- public void configureProject() throws CoreException {
- FileSystemSubscriber.getInstance().handleRootChanged(getProject(), true /* added */);
- }
-
- /**
- * This method is invoked when the provider is unmapped from its project.
- *
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- // Clear the persistant property containing the location
- getProject().setPersistentProperty(FILESYSTEM_REPO_LOC, null);
- FileSystemSubscriber.getInstance().handleRootChanged(getProject(), false /* removed */);
- }
-
- /**
- * Return the provider ID as specified in the plugin.xml
- *
- * @see RepositoryProvider#getID()
- */
- @Override
- public String getID() {
- return RSESyncUtils.PROVIDER_ID;
- }
-
- /**
- * Set the file system location for the provider. This mist be invoked after
- * the provider is mapped and configured but before the provider is used to
- * perform any operations.
- *
- * @param location
- * the path representing the location where the project contents will
- * be stored.
- * @throws TeamException
- */
- public void setRemoteLocation(String location) throws TeamException {
- // location = transformRSEtoNormal(location);
-
- // set the instance variable to the provided path
- remoteRootPath = new Path(location);
-
- // ensure that the location is a folder (if it exists)
- File file = new File(location);
- if (file.exists() && !file.isDirectory()) {
- throw new TeamException(Policy.bind("FileSystemProvider.mustBeFolder", location)); //$NON-NLS-1$
- }
-
- // record the location as a persistent property so it will be remembered
- // across platform invocations
- try {
- getProject().setPersistentProperty(FILESYSTEM_REPO_LOC, location);
- } catch (CoreException e) {
- throw FileSystemPlugin.wrapException(e);
- }
- }
-
- public void setLocalLocation(IPath location){
- localRootPath = location;
- }
-
- /**
- * Returns the folder in the file system to which the provider is connected.
- * Return <code>null</code> if there is no location or there was a problem
- * determining it.
- *
- * @return IPath The path to the root of the repository.
- */
- public IPath getRemoteRoot() {
- if (remoteRootPath == null) {
- try {
- String location = getProject().getPersistentProperty(FILESYSTEM_REPO_LOC);
- if (location == null) {
- return null;
- }
- remoteRootPath = new Path(location);
- } catch (CoreException e) {
- // log the problem and carry on
- FileSystemPlugin.log(e);
- return null;
- }
- }
- // System.out.println(root);
- return remoteRootPath;
- }
-
- /**
- * Return an object that provides the operations for transferring data to
- * and from the provider's location.
- */
- public FileSystemOperations getOperations() {
- return new FileSystemOperations(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.RepositoryProvider#getFileModificationValidator()
- */
- @Override
- public IFileModificationValidator getFileModificationValidator() {
- return getFileModificationValidator2();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.RepositoryProvider#getFileModificationValidator2()
- */
- @Override
- public FileModificationValidator getFileModificationValidator2() {
- return new org.eclipse.rse.internal.synchronize.filesystem.FileModificationValidator(this);
- }
-
- /**
- * Return the resource variant for the local resource using the bytes to
- * identify the variant.
- *
- * @param resource
- * the resource
- * @param bytes
- * the bytes that identify the resource variant
- * @return the resource variant handle
- */
- public IResourceVariant getResourceVariant(IResource resource, byte[] bytes) {
- // Takuya: it's important if resource exist or not.
- if (bytes == null)
- return null;
- UniFilePlus file = (UniFilePlus) getExportFile(resource);
- if (file == null)
- return null;
- return new FileSystemResourceVariant(file, bytes);
- }
-
- /**
- * Return the resource variant for the local resource.
- *
- * @param resource
- * the resource
- * @return the resource variant
- */
- public IResourceVariant getExportResourceVariant(IResource resource) {
- // Takuya: it's important if resource exist or not.
- UniFilePlus file = (UniFilePlus) getExportFile(resource);
- if (file == null || !file.exists())
- return null;
- return new FileSystemResourceVariant(file);
- }
-
- public IResourceVariant getImportResourcevariant(IResource resource){
- UniFilePlus file = (UniFilePlus) getImportFile(resource);
- if (file == null || !file.exists())
- return null;
- return new FileSystemResourceVariant(file);
- }
-
- /**
- * Return the <code>java.io.File</code> that the given resource maps to.
- * Return <code>null</code> if the resource is not a child of this
- * provider's project.
- * The path of return file is targetRootPath/project/relativePath.
- *
- * @param resource
- * the resource
- * @return the file that the resource maps to.
- */
- public File getExportFile(IResource resource) {
- UniFilePlus file = (UniFilePlus)_resourceMap.get(resource);
- //if (file == null)
- {
- try {
- if (resource.getProject().equals(getProject())) {
- UniFilePlus root = getRemoteRootFolder();
-
- String relativePath = transformInDependency(root.getRemoteFile().getHost(), resource.getFullPath().toString());
-
-
- // MOB BUGBUG//IRemoteFile remoteFile =
- // root.getRemoteFile().getParentRemoteFileSubSystem
- // ().getRemoteFileObject(root.getRemoteFile(),relativePath,
- // null);
-
- String path = root.getRemoteFile().getAbsolutePath() + relativePath;
- IRemoteFile remoteFile = root.getRemoteFile().getParentRemoteFileSubSystem().getRemoteFileObject(path,null);
- //String remotePath = root.getAbsolutePath() + root.getRemoteFile().getParentRemoteFileSubSystem().getSeparatorChar() + resource.getName();
- //IRemoteFile remoteFile = root.getRemoteFile().getParentRemoteFileSubSystem().getRemoteFileObject(remotePath, null);
- file = new UniFilePlus(remoteFile);
- _resourceMap.put(resource, file);
-
- }
- } catch (SystemMessageException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return file;
- }
-
- public File getImportFile(IResource resource){
- UniFilePlus file = (UniFilePlus)_resourceMap.get(resource);
- //if (file == null){
- {
- try {
- if (resource.getProject().equals(getProject())) {
- UniFilePlus root = getRemoteRootFolder();
- String relativePath = transformInDependency(root.getRemoteFile().getHost(), resource.getFullPath().toString());
- //String relativePath = transformInDependency(root.getRemoteFile().getHost(), IPath.SEPARATOR + resource.getProjectRelativePath().toString());
-
- String path = root.getRemoteFile().getAbsolutePath() + relativePath;
- IRemoteFile remoteFile = root.getRemoteFile().getParentRemoteFileSubSystem().getRemoteFileObject(path, null);
- file = new UniFilePlus(remoteFile);
- _resourceMap.put(resource, file);
- }
- } catch (SystemMessageException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return file;
- }
-
-
- /**
- * return whether the resource is file or not
- *
- * @param resource
- * @return
- */
- private boolean isFile(IResource resource) {
- return new File(this.transformRSEtoNormal(resource.getLocation().toString())).isFile();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.RepositoryProvider#getRuleFactory()
- */
- @Override
- public IResourceRuleFactory getRuleFactory() {
- return RESOURCE_RULE_FACTORY;
- }
-
- @Override
- public IFileHistoryProvider getFileHistoryProvider() {
- return null;
- }
-
- private String transformRSEtoNormal(String original) {
- if (original.indexOf(":") == -1) {
- return original;
- }
-
- String transformed = "";
- String[] str = original.split(":");
-
- // Windows
- if (str.length > 2) {
- transformed += str[1] + ":" + str[2];
- }
- // Linux
- else {
- transformed += str[1];
- }
-
- return transformed;
-
- }
-
- /**
- * get the handle fo remote root directory which is specified by IHost and
- * absolute path as the member value of this class.
- *
- * @return
- */
- public UniFilePlus getRemoteRootFolder() {
- if (remoteRoot == null) {
- IPath remoteRootDir = getRemoteRoot();
- String remoteRootDirString = transformRSEtoNormal(remoteRootDir.toString());
- IHost conn = Utilities.parseForSystemConnection(remoteRootDir.toString());
- String absolutePath = transformInDependency(conn, remoteRootDirString);
- return /* remoteRoot = */new UniFilePlus(Utilities.getIRemoteFile(conn, absolutePath));
- }
-
- return remoteRoot;
- }
-
- private String transformInDependency(IHost host, String original) {
- String ret = "";
- IRSESystemType type = host.getSystemType();
- if (host.getSystemType().isWindows()) {
- ret = original.replace("/", "\\");
- } else {
- ret = original.replace("\\", "/");
- }
-
-
- // make sure the mapping corresponds to the correct local location
- if (localRootPath != null){
- String[] lsegs = localRootPath.segments();
- String[] rsegs = ret.substring(1).split("/");
-
- // relative path should not start with the localRoot path
- StringBuffer newPath = new StringBuffer();
- for (int i = 0; i < rsegs.length; i++){
- if (lsegs.length > i){
- if (!lsegs[i].equals(rsegs[i])){
- newPath.append("/");
- newPath.append(rsegs[i]);
- }
- }
- else {
- newPath.append("/");
- newPath.append(rsegs[i]);
- }
- }
- ret = newPath.toString();
- }
- return ret;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProviderType.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProviderType.java
deleted file mode 100644
index d36133999..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/FileSystemProviderType.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemProviderType
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem;
-
-import org.eclipse.team.core.ProjectSetCapability;
-import org.eclipse.team.core.RepositoryProviderType;
-
-/**
- * The file system repository provider types
- */
-public class FileSystemProviderType extends RepositoryProviderType {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.RepositoryProviderType#getProjectSetCapability()
- */
- @Override
- public ProjectSetCapability getProjectSetCapability() {
- // Create an empty project set capability to test backwards
- // compatibility
- return new ProjectSetCapability() {
- };
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/Policy.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/Policy.java
deleted file mode 100644
index a4c31e982..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/Policy.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / Policy
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem;
-
-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;
-
-/**
- * This class is a clone of the Policy classes many Eclipse plugin use to
- * provide NLSing of strings and aid in proper progress monitoring.
- */
-public class Policy {
-
- private static ResourceBundle bundle = null;
- //private static final String bundleName = "org.eclipse.rse.internal.synchronize.filesystem.messages"; //$NON-NLS-1$
- private static final String bundleName = Policy.class.getPackage().getName() + ".messages";
-
- /*
- * Returns a resource bundle, creating one if it none is available.
- */
- private static ResourceBundle getResourceBundle() {
- // thread safety
- ResourceBundle tmpBundle = bundle;
- if (tmpBundle != null)
- return tmpBundle;
- // always create a new classloader to be passed in
- // in order to prevent ResourceBundle caching
- return bundle = ResourceBundle.getBundle(bundleName);
- // return bundle = ResourceBundle.getBundle("");
- }
-
- /**
- * 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 getResourceBundle().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())
- throw new OperationCanceledException();
- }
-
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/messages.properties b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/messages.properties
deleted file mode 100644
index ba5eb2541..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/messages.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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
-# Takuya Miyamoto - Adapted from org.eclipse.rse.team.example / messages.properties
-# David McKnight (IBM) - [272720] CheckPII error in import_export plugin
-###############################################################################
-# NLS_MESSAGEFORMAT_ALL
-# NLS_ENCODING=UTF-8
-
-fileSystem.propertyLocation=Location:
-
-FileSystemMainPage.location=Location:
-FileSystemMainPage.browseDir=&Browse...
-FileSystemMainPage.notValidLocation=Location must be an existing directory
-
-fsMainPage.name=Select a file system location
-fsMainPage.description=This location will be used to share resources with a team
-
-ConfigurationWizard.errorTitle=Error configuring the provider.
-ConfigurationWizard.error=File System provider could not be created
-
-ConfigurationWizard.name=File System Repository
-ConfigurationWizard.description=File System Repository Properties
-
-DisconnectAction.errorTitle=Error Disconnecting
-
-PutAction.working=Putting resources...
-PutAction.problemMessage=A problem occured putting the resources.
-
-GetAction.working=Getting resources...
-GetAction.problemMessage=A problem occured getting the resources.
-
-ReplaceAction.working=Replacing resources...
-ReplaceAction.problemMessage=A problem occured replacing the resources.
-
-FileSystemProvider.mustBeFolder=Target location ''{0}'' is a file and must be a folder.
-RemoteResource.mustBeFolder=Resource ''{0}'' is a file so it cannot have entries
-FileSystemRemoteResource.0=This resource is a container so it cannot have data.
-FileSystemSimpleAccessOperations.1=Checking resources out...
-FileSystemSimpleAccessOperations.3=Re-locking resources...
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemMergeContext.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemMergeContext.java
deleted file mode 100644
index 74ec42055..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemMergeContext.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemMergeContext
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.subscriber;
-
-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.jobs.ISchedulingRule;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
-import org.eclipse.team.core.subscribers.SubscriberMergeContext;
-
-/**
- * A merge context for merging file system changes.
- */
-public class FileSystemMergeContext extends SubscriberMergeContext {
-
- /**
- * Create the file system merge context for the given scope manager.
- *
- * @param manager
- * the scope manager
- */
- public FileSystemMergeContext(ISynchronizationScopeManager manager) {
- super(FileSystemSubscriber.getInstance(), manager);
- initialize();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.mapping.provider.MergeContext#makeInSync(org.eclipse
- * .team.core.diff.IDiff, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- protected void makeInSync(IDiff diff, IProgressMonitor monitor) throws CoreException {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- FileSystemSubscriber.getInstance().makeInSync(resource);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.mapping.IMergeContext#markAsMerged(org.eclipse.
- * team.core.diff.IDiff, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void markAsMerged(IDiff diff, boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
- // TODO if inSyncHint is true, we should test to see if the contents
- // match
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- FileSystemSubscriber.getInstance().markAsMerged(resource, monitor);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.mapping.IMergeContext#reject(org.eclipse.team.core
- * .diff.IDiff, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void reject(IDiff diff, IProgressMonitor monitor) throws CoreException {
- markAsMerged(diff, false, monitor);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.mapping.provider.MergeContext#getMergeRule(org.
- * eclipse.team.core.diff.IDiff)
- */
- @Override
- public ISchedulingRule getMergeRule(IDiff node) {
- return ResourceDiffTree.getResourceFor(node).getProject();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.mapping.provider.MergeContext#merge(org.eclipse
- * .team.core.diff.IDiff, boolean,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public IStatus merge(IDiff diff, boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
- // Only attempt the merge for non-conflicts. The reason we do this
- // is because the file system provider doesn't really have the proper
- // base
- // so merging conflicts doesn't work properly
- /*
- if (!ignoreLocalChanges) {
- IResource resource = ResourceDiffTree.getResourceFor(diff);
- if (diff instanceof IThreeWayDiff && resource instanceof IFile) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- // return new MergeStatus(FileSystemPlugin.ID,
- // "Cannot merge conflicting files", new IFile[] {
- // (IFile)resource });
- return new MergeStatus(RSESyncUtils.PLUGIN_ID, "Cannot merge conflicting files", new IFile[] { (IFile) resource });
- }
- }
- }
- */
- return super.merge(diff, ignoreLocalChanges, monitor);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemRemoteTree.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemRemoteTree.java
deleted file mode 100644
index 2d53f1448..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemRemoteTree.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemRemoteTree
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ThreeWayRemoteTree;
-
-/**
- * The file system three-way remote resource variant tree that provides the
- * ability to traverse the file system for the creation of resource variants.
- */
-public class FileSystemRemoteTree extends ThreeWayRemoteTree {
-
- /**
- * Create the file system remote resource variant tree
- *
- * @param subscriber
- * the file system subscriber
- */
- public FileSystemRemoteTree(FileSystemSubscriber subscriber) {
- super(subscriber);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.AbstractResourceVariantTree#fetchMembers
- * (org.eclipse.team.core.variants.IResourceVariant,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- protected IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) throws TeamException {
- return ((FileSystemResourceVariant) variant).members();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.AbstractResourceVariantTree#fetchVariant
- * (org.eclipse.core.resources.IResource, int,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
- try {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), RSESyncUtils.PROVIDER_ID);
- if (provider != null) {
- return ((FileSystemProvider) provider).getExportResourceVariant(resource);
- }
- } catch (RuntimeException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemResourceVariant.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemResourceVariant.java
deleted file mode 100644
index b4189f3e8..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemResourceVariant.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemResourceVariant
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-
-package org.eclipse.rse.internal.synchronize.filesystem.subscriber;
-
-import java.io.InputStream;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.internal.importexport.files.UniFilePlus;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.CachedResourceVariant;
-
-public class FileSystemResourceVariant extends CachedResourceVariant {
-
- private UniFilePlus ioFile;
- private byte[] bytes;
-
- /**
- * Create a resource variant for the given file. The bytes will be
- * calculated when they are accessed.
- *
- * @param file
- * the file
- */
- public FileSystemResourceVariant(UniFilePlus file) {
- this.ioFile = file;
- }
-
- /**
- * Create a resource variant for the given file and sync bytes.
- *
- * @param file
- * the file
- * @param bytes
- * the timestamp bytes
- */
- public FileSystemResourceVariant(UniFilePlus file, byte[] bytes) {
- this.ioFile = file;
- this.bytes = bytes;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.CachedResourceVariant#fetchContents(org
- * .eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- protected void fetchContents(IProgressMonitor monitor) throws TeamException {
- setContents(getContents(), monitor);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.variants.CachedResourceVariant#getCachePath()
- */
- @Override
- protected String getCachePath() {
- // append the timestamp to the file path to give each variant a unique
- // path
- return getFilePath() + " " + ioFile.lastModified(); //$NON-NLS-1$
- }
-
- private String getFilePath() {
- return ioFile.getCanonicalPath();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.variants.CachedResourceVariant#getCacheId()
- */
- @Override
- protected String getCacheId() {
- // return FileSystemPlugin.ID;
- return RSESyncUtils.PLUGIN_ID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.variants.IResourceVariant#getName()
- */
- public String getName() {
- return ioFile.getName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.variants.IResourceVariant#isContainer()
- */
- public boolean isContainer() {
- return ioFile.isDirectory();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.IResourceVariant#getContentIdentifier()
- */
- public String getContentIdentifier() {
- // Use the modification timestamp as the content identifier
- return new Date(ioFile.lastModified()).toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.variants.IResourceVariant#asBytes()
- */
- // TODO By using byte[] which this method return, ResourceComparator run
- // comparison.
- // so, this method provide how to compare with which value.
- public byte[] asBytes() {
- if (bytes == null) {
- // For simplicity, convert the timestamp to it's string
- // representation.
- // A more optimal storage format would be the 8 bytes that make up
- // the long.
- bytes = Long.toString(ioFile.lastModified()).getBytes();
- }
- return bytes;
- }
-
- /**
- * Return the files contained by the file of this resource variant.
- *
- * @return the files contained by the file of this resource variant.
- */
- public FileSystemResourceVariant[] members() {
- if (isContainer()) {
- UniFilePlus[] members = (UniFilePlus[]) ioFile.listFiles();
- FileSystemResourceVariant[] result = new FileSystemResourceVariant[members.length];
- for (int i = 0; i < members.length; i++) {
- result[i] = new FileSystemResourceVariant(members[i]);
- }
- return result;
- }
- return new FileSystemResourceVariant[0];
- }
-
- /**
- * @return
- */
- public InputStream getContents() throws TeamException {
- // Takuya: modified for managing remote resource
- try {
- return ioFile.getInputStream();
- } catch (SystemMessageException e) {
- throw new TeamException("Failed to fetch contents for " + getFilePath(), e); //$NON-NLS-1$
- }
- }
-
- public UniFilePlus getFile() {
- return ioFile;
- }
-
- public long lastModified(){
- return ioFile.lastModified();
- }
-
- public String toString(){
- return ioFile.getAbsolutePath();
- }
-
- public void synchRemoteFile() {
- ioFile.synchRemoteFile();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSubscriber.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSubscriber.java
deleted file mode 100644
index 954c40456..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSubscriber.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemSubscriber
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.subscriber;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.IProgressMonitor;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.rse.internal.synchronize.RSEResourceVariantComparator;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ThreeWayRemoteTree;
-import org.eclipse.team.core.variants.ThreeWaySubscriber;
-import org.eclipse.team.core.variants.ThreeWaySynchronizer;
-import org.eclipse.team.internal.core.mapping.LocalResourceVariant;
-
-/**
- * This is an example file system subscriber that overrides ThreeWaySubscriber.
- * It uses a repository provider (<code>FileSystemProvider</code>) to determine
- * and manage the roots and to create resource variants. It also makes use of a
- * file system specific remote tree (<code>FileSystemRemoteTree</code>) for
- * provided the remote tree access and refresh.
- *
- * @see ThreeWaySubscriber
- * @see ThreeWaySynchronizer
- * @see FileSystemProvider
- * @see FileSystemRemoteTree
- */
-public class FileSystemSubscriber extends ThreeWaySubscriber {
-
- private static FileSystemSubscriber instance;
-
- /**
- * Return the file system subscriber singleton.
- *
- * @return the file system subscriber singleton.
- */
- public static synchronized FileSystemSubscriber getInstance() {
- if (instance == null) {
- instance = new FileSystemSubscriber();
- }
- return instance;
- }
-
- /**
- * Create the file system subscriber.
- */
- private FileSystemSubscriber() {
- super(new ThreeWaySynchronizer(new QualifiedName(RSESyncUtils.PLUGIN_ID, "workpsace-sync"))); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.ThreeWaySubscriber#getResourceVariant(
- * org.eclipse.core.resources.IResource, byte[])
- */
- @Override
- public IResourceVariant getResourceVariant(IResource resource, byte[] bytes) throws TeamException {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), RSESyncUtils.PROVIDER_ID);
- if (provider != null) {
- return ((FileSystemProvider) provider).getResourceVariant(resource, bytes);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.variants.ThreeWaySubscriber#createRemoteTree()
- */
- @Override
- protected ThreeWayRemoteTree createRemoteTree() {
- return new FileSystemRemoteTree(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.subscribers.Subscriber#getName()
- */
- @Override
- public String getName() {
- return "Synchronize"; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.subscribers.Subscriber#roots()
- */
- @Override
- public IResource[] roots() {
- List result = new ArrayList();
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if (project.isAccessible()) {
- RepositoryProvider provider = RepositoryProvider.getProvider(project, RSESyncUtils.PROVIDER_ID);
- if (provider != null) {
- result.add(project);
- }
- }
- }
- return (IProject[]) result.toArray(new IProject[result.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.ThreeWaySubscriber#handleRootChanged(org
- * .eclipse.core.resources.IResource, boolean)
- */
- @Override
- public void handleRootChanged(IResource resource, boolean added) {
- // Override to allow FileSystemProvider to signal the addition and
- // removal of roots
- super.handleRootChanged(resource, added);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.variants.ResourceVariantTreeSubscriber#getSyncInfo
- * (org.eclipse.core.resources.IResource,
- * org.eclipse.team.core.variants.IResourceVariant,
- * org.eclipse.team.core.variants.IResourceVariant)
- */
- @Override
- protected SyncInfo getSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote) throws TeamException {
-
- FileSystemResourceVariant rv = null;
-
- if (remote instanceof FileSystemResourceVariant){
- rv = (FileSystemResourceVariant)remote;
- rv.synchRemoteFile();
- }
-
- if (base == null && local.exists()){
- base = remote;
- }
- if (base != null) {
- boolean exists = rv.getFile().remoteFile.exists();
- if (!exists){
- base = null;
- }
- else {
-
- if (rv != null){
- long remoteModificationTime = rv.lastModified();
- SystemIFileProperties properties = new SystemIFileProperties(local);
- long storedModificationTime = properties.getRemoteFileTimeStamp();
-
- if (remoteModificationTime > storedModificationTime){
- // what if it's changed locally too?
- long localDownloadTimeStamp = properties.getDownloadFileTimeStamp();
- long localTimeStamp = local.getLocalTimeStamp();
- //if (localTimeStamp > localDownloadTimeStamp){
- // base = null; // conflict for both
- //}
- //else {
- // leaving the local base, since 1 base is better than none
- // if there is no base, then we can't accurately show the diffs
- // need to provide something better
- base = new LocalResourceVariant(local);
- //}
- }
- }
- }
- }
-
- FileSystemSyncInfo info = new FileSystemSyncInfo(local, base, remote, new RSEResourceVariantComparator(getSynchronizer()));
- info.init();
- return info;
- }
-
- /**
- * Make the resource in-sync.
- *
- * @param resource
- * the resource
- * @throws TeamException
- */
- public void makeInSync(IResource resource) throws TeamException {
- ThreeWaySynchronizer synchronizer = getSynchronizer();
- byte[] remoteBytes = synchronizer.getRemoteBytes(resource);
- if (remoteBytes == null) {
- if (!resource.exists())
- synchronizer.flush(resource, IResource.DEPTH_ZERO);
- } else {
- synchronizer.setBaseBytes(resource, remoteBytes);
- }
- }
-
- /**
- * Make the change an outgoing change
- *
- * @param resource
- * @throws TeamException
- */
- public void markAsMerged(IResource resource, IProgressMonitor monitor) throws TeamException {
- makeInSync(resource);
- try {
- resource.touch(monitor);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSyncInfo.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSyncInfo.java
deleted file mode 100644
index dd2d74afc..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/subscriber/FileSystemSyncInfo.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemSyncInfo
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.subscriber;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-
-/**
- * Provide a custom sync info that will report files that exist both locally and
- * remotely as in-sync and will return a null base if there is an incoming
- * change.
- */
-public class FileSystemSyncInfo extends SyncInfo {
-
- public FileSystemSyncInfo(IResource local, IResourceVariant base, IResourceVariant remote, IResourceVariantComparator comparator) {
- super(local, base, remote, comparator);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.core.subscribers.SyncInfo#calculateKind(org.eclipse.
- * core.runtime.IProgressMonitor)
- */
- @Override
- protected int calculateKind() throws TeamException {
- if (getLocal().getType() != IResource.FILE) {
- if (getLocal().exists() && getRemote() != null) {
- return IN_SYNC;
- }
- }
- int kind = super.calculateKind();
- if ((kind & SyncInfo.PSEUDO_CONFLICT) != 0){
- kind = IN_SYNC;
- }
-
-
- return kind;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.core.synchronize.SyncInfo#getBase()
- */
- @Override
- public IResourceVariant getBase() {
- // If the kind has been set and there is an incoming change
- // return null as the base since the server does not keep the
- // base contents
- // if ((getKind() & INCOMING) > 0) {
- // return null;
- // }
- return super.getBase();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/CompoundResourceTraversal.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/CompoundResourceTraversal.java
deleted file mode 100644
index 2204cf81a..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/CompoundResourceTraversal.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / CompoundResourceTraversal
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Helper class that accumulates several traversals in order to generate a final
- * set of traversals and to perform certain queries on a set of traversals.
- *
- * TODO: This class was copied from the Team Core plugin since it was an
- * internal class. It should probably be made API at some point.
- */
-public class CompoundResourceTraversal {
-
- private Set deepFolders = new HashSet();
- private Set shallowFolders = new HashSet();
- private Set zeroFolders = new HashSet();
- private Set files = new HashSet();
-
- public void addTraversals(ResourceTraversal[] traversals) {
- for (int i = 0; i < traversals.length; i++) {
- ResourceTraversal traversal = traversals[i];
- addTraversal(traversal);
- }
- }
-
- public void addTraversal(ResourceTraversal traversal) {
- IResource[] resources = traversal.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- addResource(resource, traversal.getDepth());
- }
- }
-
- public void addResource(IResource resource, int depth) {
- if (resource.getType() == IResource.FILE) {
- if (!isCovered(resource, IResource.DEPTH_ZERO))
- files.add(resource);
- }
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- addDeepFolder(resource);
- break;
- case IResource.DEPTH_ONE:
- addShallowFolder(resource);
- break;
- case IResource.DEPTH_ZERO:
- addZeroFolder(resource);
- break;
- }
- }
-
- private void addShallowFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- shallowFolders.add(resource);
- removeDescendants(resource, IResource.DEPTH_ONE);
- }
- }
-
- public boolean isCovered(IResource resource, int depth) {
- IPath fullPath = resource.getFullPath();
- // Regardless of the depth, look for a deep folder that covers the
- // resource
- for (Iterator iter = deepFolders.iterator(); iter.hasNext();) {
- IResource deepFolder = (IResource) iter.next();
- if (deepFolder.getFullPath().isPrefixOf(fullPath)) {
- return true;
- }
- }
- // For files, look in the shallow folders and files
- if (resource.getType() == IResource.FILE) {
- return (shallowFolders.contains(resource.getParent()) || files.contains(resource));
- }
- // For folders, look in appropriate sets
- switch (depth) {
- case IResource.DEPTH_ONE:
- return (shallowFolders.contains(resource));
- case IResource.DEPTH_ZERO:
- return (shallowFolders.contains(resource.getParent()) || zeroFolders.contains(resource));
- }
- return false;
- }
-
- private void addZeroFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_ZERO))
- zeroFolders.add(resource);
- }
-
- private void addDeepFolder(IResource resource) {
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- deepFolders.add(resource);
- removeDescendants(resource, IResource.DEPTH_INFINITE);
- }
- }
-
- private void removeDescendants(IResource resource, int depth) {
- IPath fullPath = resource.getFullPath();
- // First, remove any files that are now covered
- for (Iterator iter = files.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- break;
- case IResource.DEPTH_ONE:
- if (fullPath.equals(child.getFullPath().removeLastSegments(1))) {
- iter.remove();
- }
- break;
- }
- }
- // Now, remove any shallow folders
- if (depth == IResource.DEPTH_INFINITE) {
- for (Iterator iter = shallowFolders.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- }
- }
- // Finally, remove any zero folders
- for (Iterator iter = zeroFolders.iterator(); iter.hasNext();) {
- IResource child = (IResource) iter.next();
- switch (depth) {
- case IResource.DEPTH_INFINITE:
- if (fullPath.isPrefixOf(child.getFullPath())) {
- iter.remove();
- }
- break;
- case IResource.DEPTH_ONE:
- // TODO: Is a zero folder covered by a shallow folder?
- if (fullPath.equals(child.getFullPath().removeLastSegments(1))) {
- iter.remove();
- }
- break;
- }
- }
- }
-
- public void add(CompoundResourceTraversal compoundTraversal) {
- addResources((IResource[]) compoundTraversal.deepFolders.toArray(new IResource[compoundTraversal.deepFolders.size()]), IResource.DEPTH_INFINITE);
- addResources((IResource[]) compoundTraversal.shallowFolders.toArray(new IResource[compoundTraversal.shallowFolders.size()]), IResource.DEPTH_ONE);
- addResources((IResource[]) compoundTraversal.zeroFolders.toArray(new IResource[compoundTraversal.zeroFolders.size()]), IResource.DEPTH_ZERO);
- addResources((IResource[]) compoundTraversal.files.toArray(new IResource[compoundTraversal.files.size()]), IResource.DEPTH_ZERO);
- }
-
- public void addResources(IResource[] resources, int depth) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- addResource(resource, depth);
- }
-
- }
-
- /**
- * Return the resources contained in the given traversals that are not
- * covered by this traversal
- *
- * @param traversals
- * the traversals being testes
- * @return the resources contained in the given traversals that are not
- * covered by this traversal
- */
- public IResource[] getUncoveredResources(ResourceTraversal[] traversals) {
- CompoundResourceTraversal newTraversals = new CompoundResourceTraversal();
- newTraversals.addTraversals(traversals);
- return getUncoveredResources(newTraversals);
- }
-
- /*
- * Return any resources in the other traversal that are not covered by this
- * traversal
- */
- private IResource[] getUncoveredResources(CompoundResourceTraversal otherTraversal) {
- Set result = new HashSet();
- for (Iterator iter = otherTraversal.files.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.zeroFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.shallowFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- result.add(resource);
- }
- }
- for (Iterator iter = otherTraversal.deepFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- result.add(resource);
- }
- }
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ResourceTraversal[] asTraversals() {
- List result = new ArrayList();
- if (!files.isEmpty() || !zeroFolders.isEmpty()) {
- Set combined = new HashSet();
- combined.addAll(files);
- combined.addAll(zeroFolders);
- result.add(new ResourceTraversal((IResource[]) combined.toArray(new IResource[combined.size()]), IResource.DEPTH_ZERO, IResource.NONE));
- }
- if (!shallowFolders.isEmpty()) {
- result.add(new ResourceTraversal((IResource[]) shallowFolders.toArray(new IResource[shallowFolders.size()]), IResource.DEPTH_ONE, IResource.NONE));
- }
- if (!deepFolders.isEmpty()) {
- result.add(new ResourceTraversal((IResource[]) deepFolders.toArray(new IResource[deepFolders.size()]), IResource.DEPTH_INFINITE, IResource.NONE));
- }
- return (ResourceTraversal[]) result.toArray(new ResourceTraversal[result.size()]);
- }
-
- public IResource[] getRoots() {
- List result = new ArrayList();
- result.addAll(files);
- result.addAll(zeroFolders);
- result.addAll(shallowFolders);
- result.addAll(deepFolders);
- return (IResource[]) result.toArray(new IResource[result.size()]);
- }
-
- public ResourceTraversal[] getUncoveredTraversals(ResourceTraversal[] traversals) {
- CompoundResourceTraversal other = new CompoundResourceTraversal();
- other.addTraversals(traversals);
- return getUncoveredTraversals(other);
- }
-
- public ResourceTraversal[] getUncoveredTraversals(CompoundResourceTraversal otherTraversal) {
- CompoundResourceTraversal uncovered = new CompoundResourceTraversal();
- for (Iterator iter = otherTraversal.files.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- uncovered.addResource(resource, IResource.DEPTH_ZERO);
- }
- }
- for (Iterator iter = otherTraversal.zeroFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ZERO)) {
- uncovered.addResource(resource, IResource.DEPTH_ZERO);
- }
- }
- for (Iterator iter = otherTraversal.shallowFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_ONE)) {
- uncovered.addResource(resource, IResource.DEPTH_ONE);
- }
- }
- for (Iterator iter = otherTraversal.deepFolders.iterator(); iter.hasNext();) {
- IResource resource = (IResource) iter.next();
- if (!isCovered(resource, IResource.DEPTH_INFINITE)) {
- uncovered.addResource(resource, IResource.DEPTH_INFINITE);
- }
- }
- return uncovered.asTraversals();
- }
-
- public void clear() {
- deepFolders.clear();
- shallowFolders.clear();
- zeroFolders.clear();
- files.clear();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemOperation.java
deleted file mode 100644
index 41c427a49..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemOperation.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemOperation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.mapping.ISynchronizationScope;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.ui.synchronize.ModelOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-public abstract class FileSystemOperation extends ModelOperation {
-
- /**
- * Create a scope manager for the file system example.
- *
- * @param name
- * the name of the manager
- * @param inputMappings
- * the input mappings
- * @return a scope manager
- */
- public static SubscriberScopeManager createScopeManager(String name, ResourceMapping[] inputMappings) {
- return new SubscriberScopeManager(name, inputMappings, FileSystemSubscriber.getInstance(), true);
- }
-
- /**
- * Create a file system operation.
- *
- * @param part
- * the part from which the operation was launched
- * @param manager
- * the scope manager that provides the input to the operation
- */
- protected FileSystemOperation(IWorkbenchPart part, SubscriberScopeManager manager) {
- super(part, manager);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.ui.synchronize.ModelOperation#execute(org.eclipse.core
- * .runtime.IProgressMonitor)
- */
- @Override
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- Map providerToTraversals = getProviderToTraversalsMap();
- monitor.beginTask(getTaskName(), providerToTraversals.size() * 100);
- monitor.setTaskName(getTaskName());
- for (Iterator iter = providerToTraversals.keySet().iterator(); iter.hasNext();) {
- FileSystemProvider provider = (FileSystemProvider) iter.next();
- ResourceTraversal[] traversals = getTraversals(providerToTraversals, provider);
- execute(provider, traversals, new SubProgressMonitor(monitor, 100));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Return a map of FileSystemProvider to ResourceTraversals.
- *
- * @return a map of FileSystemProvider to ResourceTraversals
- */
- private Map getProviderToTraversalsMap() {
- HashMap result = new HashMap();
- ISynchronizationScope scope = getScope();
- ResourceMapping[] mappings = scope.getMappings();
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping mapping = mappings[i];
- ResourceTraversal[] traversals = scope.getTraversals(mapping);
- for (int j = 0; j < traversals.length; j++) {
- ResourceTraversal traversal = traversals[j];
- IResource[] resources = traversal.getResources();
- for (int k = 0; k < resources.length; k++) {
- IResource resource = resources[k];
- recordResourceAndDepth(result, resource, traversal.getDepth());
- }
- }
- }
- return result;
- }
-
- /**
- * Return the file system provider associated with the given project or
- * <code>null</code> if the project is not mapped to the file system
- * provider.
- *
- * @param project
- * the project
- * @return the file system provider associated with the given project
- */
- protected FileSystemProvider getProviderFor(IProject project) {
- return (FileSystemProvider) RepositoryProvider.getProvider(project, RSESyncUtils.PROVIDER_ID);
- }
-
- private void recordResourceAndDepth(HashMap providerToTraversals, IResource resource, int depth) {
- FileSystemProvider provider = getProviderFor(resource.getProject());
- if (provider != null) {
- CompoundResourceTraversal traversal = (CompoundResourceTraversal) providerToTraversals.get(provider);
- if (traversal == null) {
- traversal = new CompoundResourceTraversal();
- providerToTraversals.put(provider, traversal);
- }
- traversal.addResource(resource, depth);
- }
- }
-
- /**
- * Return the traversals that were accumulated for the given provider by the
- * {@link #getProviderToTraversalsMap()} method.
- *
- * @param providerToTraversals
- * the provider to traversals map
- * @param provider
- * the provider
- * @return the traversals for the given provider
- */
- private ResourceTraversal[] getTraversals(Map providerToTraversals, FileSystemProvider provider) {
- CompoundResourceTraversal traversal = (CompoundResourceTraversal) providerToTraversals.get(provider);
- return traversal.asTraversals();
- }
-
- /**
- * Execute the operation for the given provider and traversals.
- *
- * @param provider
- * the provider
- * @param traversals
- * the traversals to be operated on
- * @param monitor
- * a progress monitor
- * @throws CoreException
- */
- protected abstract void execute(FileSystemProvider provider, ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the task name for this operation.
- *
- * @return the task name for this operation
- */
- protected abstract String getTaskName();
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
- */
- @Override
- protected boolean canRunAsJob() {
- return true;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemSynchronizeParticipant.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemSynchronizeParticipant.java
deleted file mode 100644
index e36ee2811..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/FileSystemSynchronizeParticipant.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / FileSystemSynchronizeParticipant
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemPlugin;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
-import org.eclipse.team.core.mapping.provider.MergeContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipantActionGroup;
-
-/**
- * This is an example synchronize participant for the file system provider. It
- * will allow showing synchronization state for local resources mapped to a
- * remote file system location.
- *
- * @since 3.0
- */
-public class FileSystemSynchronizeParticipant extends ModelSynchronizeParticipant {
-
- /**
- * The participant id for the org.eclipse.team.ui.synchronizeParticipant
- * extension point.
- */
- public static final String ID = "org.eclipse.rse.internal.synchronize.filesystem.participant"; //$NON-NLS-1$
-
- /**
- * The viewer id for the org.eclipse.ui.navigator.viewer extension point.
- */
- public static final String VIEWER_ID = "org.eclipse.rse.internal.synchronize.filesystem.syncViewer"; //$NON-NLS-1$
-
- /**
- * Custom menu groups included in the viewer definition in the plugin.xml.
- */
- public static final String CONTEXT_MENU_MERGE_GROUP_1 = "merge"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_PUT_GROUP_1 = "put"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_GET_GROUP_1 = "get"; //$NON-NLS-1$
- public static final String CONTEXT_MENU_OVERWRITE_GROUP_1 = "overwrite"; //$NON-NLS-1$
-
- /**
- * A custom label decorator that will show the remote mapped path for each
- * file.
- */
- public class FileSystemParticipantLabelDecorator extends LabelProvider implements ILabelDecorator {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse
- * .swt.graphics.Image, java.lang.Object)
- */
- public Image decorateImage(Image image, Object element) {
- return image;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.
- * String, java.lang.Object)
- */
- public String decorateText(String text, Object element) {
- try {
- if (element instanceof ISynchronizeModelElement) {
- IResource resource = ((ISynchronizeModelElement) element).getResource();
- if (resource != null && resource.getType() == IResource.FILE) {
- SyncInfo info = FileSystemSubscriber.getInstance().getSyncInfo(resource);
- IResourceVariant variant = info.getRemote();
- if (variant != null) {
- return text + " (" + variant.getContentIdentifier() + ")";
- }
- }
- }
- } catch (TeamException e) {
- FileSystemPlugin.log(e);
- }
- return null;
- }
- }
-
- /**
- * Action group that contributes the get an put menus to the context menu in
- * the synchronize view
- */
- public class FileSystemParticipantActionGroup extends ModelSynchronizeParticipantActionGroup {
- private ModelPutAction putAction;
- private ModelGetAction getAction;
- private ModelMergeAction mergeAction;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#initialize
- * (org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- @Override
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- putAction = new ModelPutAction("", configuration);
- getAction = new ModelGetAction("", configuration);
- mergeAction = new ModelMergeAction("", configuration);
- }
-
-
-
- @Override
- public void fillContextMenu(IMenuManager menu) {
- //menu.remove(CONTEXT_MENU_GET_GROUP_1);
- //menu.remove(CONTEXT_MENU_PUT_GROUP_1);
-
- try {
- //super.fillContextMenu(menu);
- TreeSelection selection = (TreeSelection)getConfiguration().getSite().getSelectionProvider().getSelection();
- boolean hasOutgoingChange = false;
- boolean hasIncomingChange = false;
- boolean hasConflictingChange = false;
- boolean hasSingleResource = selection.size() == 1?true:false;
-
- List<IResource> resources = new ArrayList<IResource>();
- for (Iterator iterator = selection.iterator(); iterator.hasNext();) {
- resources.add(Utils.getResource(iterator.next()));
- }
-
- for (Iterator<IResource> iterator = resources.iterator(); iterator.hasNext();) {
-
- IResource resource = (IResource) iterator.next();
- SyncInfo info = FileSystemSubscriber.getInstance().getSyncInfo(resource);
-
- int kind = info.getKind();
-
- if(SyncInfo.getDirection(kind) == SyncInfo.OUTGOING){
- hasOutgoingChange = true;
- } else if (SyncInfo.getDirection(kind) == SyncInfo.INCOMING){
- hasIncomingChange = true;
- }
- else if (SyncInfo.getDirection(kind) == SyncInfo.CONFLICTING){
- hasConflictingChange = true;
- }
- }
-
- if (hasConflictingChange){
- if(hasSingleResource){
- mergeAction.setText(SystemImportExportResources.RESID_SYNCHRONIZE_ACTIONS_MERGE_LABEL);
- }else{
- mergeAction.setText(SystemImportExportResources.RESID_SYNCHRONIZE_ACTIONS_MERGE_ALL_LABEL);
- }
- appendToGroup(ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_MERGE_GROUP_1, putAction);
- menu.appendToGroup(CONTEXT_MENU_MERGE_GROUP_1, mergeAction);
- }
-
- if(hasOutgoingChange){
- if(hasSingleResource){
- putAction.setText(SystemImportExportResources.RESID_SYNCHRONIZE_ACTIONS_PUT_LABEL);
- }else{
- putAction.setText(SystemImportExportResources.RESID_SYNCHRONIZE_ACTIONS_PUT_ALL_LABEL);
- }
- appendToGroup(ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_PUT_GROUP_1, putAction);
- menu.appendToGroup(CONTEXT_MENU_PUT_GROUP_1, putAction);
- }
-
- if(hasIncomingChange){
- if(hasSingleResource){
- getAction.setText(SystemImportExportResources.RESID_SYNCHRONIZE_ACTIONS_GET_LABEL);
- }else{
- getAction.setText(SystemImportExportResources.RESID_SYNCHRONIZE_ACTIONS_GET_ALL_LABEL);
- }
- appendToGroup(ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_GET_GROUP_1, getAction);
- menu.appendToGroup(CONTEXT_MENU_GET_GROUP_1, getAction);
- }
-
-
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
- }
- /**
- * Create a file system participant. This method is invoked by the
- * Synchronize view when a persisted participant is being restored.
- * Participants that are persisted must override the {@link
- * #restoreContext(ISynchronizationScopeManager)} method to recreate the
- * context and may also need to override the {@link
- * #createScopeManager(ResourceMapping[])} method if they require a custom
- * scope manager.
- */
- public FileSystemSynchronizeParticipant() {
- super();
- }
-
- /**
- * Create the participant for the given context. This method is used by the
- * file system plugin to create a participant and then add it to the sync
- * view (or show it is some other container).
- *
- * @param context
- * the synchronization context
- */
- public FileSystemSynchronizeParticipant(SynchronizationContext context) {
- super(context);
- try {
- setInitializationData(TeamUI.getSynchronizeManager().getParticipantDescriptor(ID));
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#
- * initializeConfiguration
- * (org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- @Override
- protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
- super.initializeConfiguration(configuration);
- configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID);
-
- // Add the label decorator
- configuration.addLabelDecorator(new FileSystemParticipantLabelDecorator());
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.team.ui.synchronize.ModelSynchronizeParticipant#
- * createMergeActionGroup()
- */
- @Override
- protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
- return new FileSystemParticipantActionGroup();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant#restoreContext
- * (org.eclipse.team.core.mapping.ISynchronizationScopeManager)
- */
- @Override
- protected MergeContext restoreContext(ISynchronizationScopeManager manager) {
- return new FileSystemMergeContext(manager);
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.team.ui.synchronize.ModelSynchronizeParticipant#
- * createScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[])
- */
- @Override
- protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
- return FileSystemOperation.createScopeManager(getName(), mappings);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/GetOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/GetOperation.java
deleted file mode 100644
index ec68a6edf..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/GetOperation.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / GetOperation
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.internal.synchronize.filesystem.Policy;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IDiffVisitor;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation for getting the contents of the selected resources
- */
-public class GetOperation extends FileSystemOperation {
-
- private boolean overwriteOutgoing;
-
- public GetOperation(IWorkbenchPart part, SubscriberScopeManager manager) {
- super(part, manager);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.rse.internal.synchronize.provisional.filesystem.ui.FileSystemOperation#execute
- * (org.eclipse.rse.internal.synchronize.provisional.filesystem.FileSystemProvider,
- * org.eclipse.core.resources.mapping.ResourceTraversal[],
- * org.eclipse.core.runtime.SubProgressMonitor)
- */
- @Override
- protected void execute(FileSystemProvider provider, ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException {
- try {
- provider.getOperations().get(traversals, isOverwriteOutgoing(), monitor);
- if (!isOverwriteOutgoing() && hasIncomingChanges(traversals)) {
- throw new TeamException("Could not get all changes due to conflicts.");
- }
-
- provider.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
-
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- private boolean hasIncomingChanges(ResourceTraversal[] traversals) throws CoreException {
- final RuntimeException found = new RuntimeException();
- try {
- FileSystemSubscriber.getInstance().accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.INCOMING || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- throw found;
- }
- }
- return false;
- }
- });
- } catch (RuntimeException e) {
- if (e == found)
- return true;
- throw e;
- }
- return false;
- }
-
- /**
- * Indicate whether the operation should overwrite outgoing changes. By
- * default, the get operation does not override local modifications.
- *
- * @return whether the operation should overwrite outgoing changes.
- */
- protected boolean isOverwriteOutgoing() {
- return overwriteOutgoing;
- }
-
- /**
- * Set whether the operation should overwrite outgoing changes.
- *
- * @param overwriteOutgoing
- * whether the operation should overwrite outgoing changes
- */
- public void setOverwriteOutgoing(boolean overwriteOutgoing) {
- this.overwriteOutgoing = overwriteOutgoing;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.rse.internal.synchronize.provisional.filesystem.ui.FileSystemOperation#getTaskName
- * ()
- */
- @Override
- protected String getTaskName() {
- return Policy.bind("GetAction.working"); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/MergeOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/MergeOperation.java
deleted file mode 100644
index 1459393af..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/MergeOperation.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.core.mapping.provider.SynchronizationContext;
-import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.ui.mapping.SynchronizationOperation;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelMergeOperation;
-
-public class MergeOperation extends SynchronizationOperation {
-
- private IMergeContext context;
-
- protected MergeOperation(ISynchronizePageConfiguration configuration, Object[] elements, IMergeContext context) {
- super(configuration, elements);
-
- this.context= context;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void execute(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- new ModelMergeOperation(getPart(), ((SynchronizationContext)context).getScopeManager()) {
- public boolean isPreviewRequested() {
- return false;
- }
- protected void initializeContext(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 10);
- monitor.done();
- }
- protected ISynchronizationContext getContext() {
- return context;
- }
- protected void executeMerge(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask(null, 100);
- if (!hasChangesOfInterest()) {
- handleNoChanges();
- } else if (isPreviewRequested()) {
- handlePreviewRequest();
- } else {
- IStatus status = ModelMergeOperation.validateMerge(getMergeContext(), monitor);
- if (!status.isOK()) {
- if (!promptToContinue(status))
- return;
- }
- status = performMerge(monitor);
- if (!status.isOK()) {
- handleMergeFailure(status);
- }
- }
- monitor.done();
- }
- private IMergeContext getMergeContext() {
- return (IMergeContext)getContext();
- }
- private boolean promptToContinue(final IStatus status) {
- final boolean[] result = new boolean[] { false };
- Runnable runnable = new Runnable() {
- public void run() {
- ErrorDialog dialog = new ErrorDialog(getShell(), TeamUIMessages.ModelMergeOperation_0, TeamUIMessages.ModelMergeOperation_1, status, IStatus.ERROR | IStatus.WARNING | IStatus.INFO) {
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL,
- false);
- createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL,
- true);
- createDetailsButton(parent);
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.ErrorDialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.YES_ID)
- super.buttonPressed(IDialogConstants.OK_ID);
- else if (id == IDialogConstants.NO_ID)
- super.buttonPressed(IDialogConstants.CANCEL_ID);
- super.buttonPressed(id);
- }
- };
- int code = dialog.open();
- result[0] = code == 0;
- }
- };
- getShell().getDisplay().syncExec(runnable);
- return (result[0]);
- }
- }.run(monitor);
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelGetAction.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelGetAction.java
deleted file mode 100644
index ee84fbb80..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelGetAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / ModelPutAction
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelParticipantAction;
-
-public class ModelGetAction extends ModelParticipantAction{
- public static final String GET_ACTION_ID = "org.eclipse.rse.internal.synchronize.getAction";
-
- public ModelGetAction(String text, ISynchronizePageConfiguration configuration){
- super(text, configuration);
- setId(GET_ACTION_ID);
- }
-
- @Override
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // Only enable the put in outgoing or both modes
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE || mode == ISynchronizePageConfiguration.BOTH_MODE) {
- return getResourceMappings(selection).length > 0;
- }
- return false;
- }
-
- private ResourceMapping[] getResourceMappings(IStructuredSelection selection) {
- List mappings = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null)
- mappings.add(mapping);
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- ResourceMapping[] resourceMappings = getResourceMappings(getStructuredSelection());
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager("Get", resourceMappings);
- try {
- new GetOperation(getConfiguration().getSite().getPart(), manager).run();
- } catch (InvocationTargetException e) {
- IStatus status = getStatus(e);
- ErrorDialog.openError(getConfiguration().getSite().getShell(), null, null, status);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private IStatus getStatus(Throwable throwable) {
- if (throwable instanceof InvocationTargetException) {
- return getStatus(((InvocationTargetException) throwable).getCause());
- }
- return new Status(IStatus.ERROR, RSESyncUtils.PLUGIN_ID, 0, "An error occurred during the put.", throwable);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelMergeAction.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelMergeAction.java
deleted file mode 100644
index 5369d98e6..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelMergeAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.team.core.mapping.IMergeContext;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelParticipantAction;
-
-public class ModelMergeAction extends ModelParticipantAction {
-
- public ModelMergeAction(String text,
- ISynchronizePageConfiguration configuration) {
- super(text, configuration);
- // TODO Auto-generated constructor stub
- }
-
- @Override
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // Only enable the put in outgoing or both modes
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE || mode == ISynchronizePageConfiguration.BOTH_MODE) {
- return getResourceMappings(selection).length > 0;
- }
- return false;
- }
-
- private ResourceMapping[] getResourceMappings(IStructuredSelection selection) {
- List mappings = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null)
- mappings.add(mapping);
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- private IMergeContext getContext(ResourceMapping[] mappings) {
- //SubscriberScopeManager manager = FileSystemOperation.createScopeManager(FileSystemSubscriber.getInstance().getName(), mappings);
- //return new FileSystemMergeContext(manager);
-
- return ((IMergeContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT));
- }
-
- public void run() {
- ResourceMapping[] resourceMappings = getResourceMappings(getStructuredSelection());
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager("Merge", resourceMappings);
- try {
- new MergeOperation(getConfiguration(), resourceMappings, getContext(resourceMappings)).run();
- } catch (InvocationTargetException e) {
- IStatus status = getStatus(e);
- ErrorDialog.openError(getConfiguration().getSite().getShell(), null, null, status);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private IStatus getStatus(Throwable throwable) {
- if (throwable instanceof InvocationTargetException) {
- return getStatus(((InvocationTargetException) throwable).getCause());
- }
- return new Status(IStatus.ERROR, RSESyncUtils.PLUGIN_ID, 0, "An error occurred during the put.", throwable);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelPutAction.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelPutAction.java
deleted file mode 100644
index eef791279..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/ModelPutAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / ModelPutAction
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ModelParticipantAction;
-
-/**
- * A put action for use in the file system synchronize participant.
- */
-public class ModelPutAction extends ModelParticipantAction {
- public static final String PUT_ACTION_ID = "org.eclipse.rse.internal.synchronize.putAction";
-
- public ModelPutAction(String text, ISynchronizePageConfiguration configuration) {
- super(text, configuration);
- setId(PUT_ACTION_ID);
- }
-
- @Override
- protected boolean isEnabledForSelection(IStructuredSelection selection) {
- // Only enable the put in outgoing or both modes
- int mode = getConfiguration().getMode();
- if (mode == ISynchronizePageConfiguration.OUTGOING_MODE || mode == ISynchronizePageConfiguration.BOTH_MODE) {
- return getResourceMappings(selection).length > 0;
- }
- return false;
- }
-
- private ResourceMapping[] getResourceMappings(IStructuredSelection selection) {
- List mappings = new ArrayList();
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- ResourceMapping mapping = Utils.getResourceMapping(element);
- if (mapping != null)
- mappings.add(mapping);
- }
- return (ResourceMapping[]) mappings.toArray(new ResourceMapping[mappings.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- ResourceMapping[] resourceMappings = getResourceMappings(getStructuredSelection());
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager("Put", resourceMappings);
- try {
- new PutOperation(getConfiguration().getSite().getPart(), manager).run();
- } catch (InvocationTargetException e) {
- IStatus status = getStatus(e);
- ErrorDialog.openError(getConfiguration().getSite().getShell(), null, null, status);
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private IStatus getStatus(Throwable throwable) {
- if (throwable instanceof InvocationTargetException) {
- return getStatus(((InvocationTargetException) throwable).getCause());
- }
- return new Status(IStatus.ERROR, RSESyncUtils.PLUGIN_ID, 0, "An error occurred during the put.", throwable);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/PutOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/PutOperation.java
deleted file mode 100644
index 80c4c3032..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/filesystem/ui/PutOperation.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Takuya Miyamoto - Adapted from org.eclipse.team.examples.filesystem / PutOperation
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.filesystem.ui;
-
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.internal.synchronize.filesystem.Policy;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.team.core.diff.IDiff;
-import org.eclipse.team.core.diff.IDiffVisitor;
-import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Operation for copying the selected resources to the file system location
- */
-public class PutOperation extends FileSystemOperation {
-
- private boolean overwriteIncoming;
-
- /**
- * Create the put operation
- *
- * @param part
- * the originating part
- * @param manager
- * the scope manager
- */
- protected PutOperation(IWorkbenchPart part, SubscriberScopeManager manager) {
- super(part, manager);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.rse.internal.synchronize.provisional.filesystem.ui.FileSystemOperation#execute
- * (org.eclipse.rse.internal.synchronize.provisional.filesystem.FileSystemProvider,
- * org.eclipse.core.resources.mapping.ResourceTraversal[],
- * org.eclipse.core.runtime.SubProgressMonitor)
- */
- @Override
- protected void execute(FileSystemProvider provider, ResourceTraversal[] traversals, IProgressMonitor monitor) throws CoreException {
- provider.getOperations().checkin(traversals, isOverwriteIncoming(), monitor);
-
- // refresh RSE
- IRemoteFile rootFolder = provider.getRemoteRootFolder().getRemoteFile();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- try {
- rootFolder = rootFolder.getParentRemoteFileSubSystem().getRemoteFileObject(rootFolder.getAbsolutePath(), monitor);
- rootFolder.markStale(true);
- sr.fireEvent(new SystemResourceChangeEvent(rootFolder, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, rootFolder.getAbsolutePath()));
- }
- catch (Exception e){}
-
- // if (!isOverwriteIncoming() && hasOutgoingChanges(traversals)) {
- // throw new
- // TeamException("Could not put all changes due to conflicts.");
- // }
-
- }
-
- private boolean hasOutgoingChanges(ResourceTraversal[] traversals) throws CoreException {
- final RuntimeException found = new RuntimeException();
- try {
- FileSystemSubscriber.getInstance().accept(traversals, new IDiffVisitor() {
- public boolean visit(IDiff diff) {
- if (diff instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) diff;
- if (twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
- throw found;
- }
- }
- return false;
- }
- });
- } catch (RuntimeException e) {
- e.printStackTrace();
- if (e == found)
- return true;
- throw e;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.rse.internal.synchronize.provisional.filesystem.ui.FileSystemOperation#getTaskName
- * ()
- */
- @Override
- protected String getTaskName() {
- return Policy.bind("PutAction.working"); //$NON-NLS-1$
- }
-
- /**
- * Return whether incoming changes should be overwritten.
- *
- * @return whether incoming changes should be overwritten
- */
- public boolean isOverwriteIncoming() {
- return overwriteIncoming;
- }
-
- /**
- * Set whether incoming changes should be overwritten.
- *
- * @param overwriteIncoming
- * whether incoming changes should be overwritten
- */
- public void setOverwriteIncoming(boolean overwriteIncoming) {
- this.overwriteIncoming = overwriteIncoming;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeByteCalculator.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeByteCalculator.java
deleted file mode 100644
index 78ca55858..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeByteCalculator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * Helper class to calculate byte array for synchronization in some algorithm.
- * This interface is used in comparison of resource and resourceVariant. In the
- * comparison, it's necessary to calculate byte array associated with them.
- *
- */
-public interface ISynchronizeByteCalculator {
- /**
- * Timestamp: The last modification time is used for comparison
- */
- public static final int DIFF_TYPE_TIMESTAMP = 0;
- /**
- * MD5: The message digest 5 is used for comparison
- */
- public static final int DIFF_TYPE_MD5 = 1;
-
- /**
- * Return byte array for comparison used in synchronization. The criterion
- * is specified by option.
- *
- * @param local
- * @param option
- * @return
- */
- public byte[] cacByte(IResource local, int option);
-
- /**
- * Return byte array for comparison used in synchronization. The criterion
- * is specified by option.
- *
- * @param remote
- * @param option
- * @return
- */
- public byte[] calcByte(IRemoteFile remote, int option);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeConnectionManager.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeConnectionManager.java
deleted file mode 100644
index 909fcac79..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeConnectionManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.team.core.TeamException;
-
-public interface ISynchronizeConnectionManager {
- /**
- * Return if the project is already shared or not.
- *
- * @param project
- * @return
- */
- public boolean isConnected(IProject project);
-
- /**
- * Share the project. Sharing project is necessary for synchronization.
- *
- * @param project
- * @throws TeamException
- */
- public void connect(IProject project) throws TeamException;
-
- /**
- * Finish sharing the project. When sharing finished, re-synchronization no
- * longer runs.
- *
- * @param project
- * @throws TeamException
- */
- public void disconnect(IProject project) throws TeamException;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeFilter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeFilter.java
deleted file mode 100644
index 0c0ca181f..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeFilter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Captures the filter that a user sets up in the import/export wizard, in order
- * to exclude certain files or directories from synchronization. All file system
- * paths are relative to the synchronization root.
- */
-public interface ISynchronizeFilter {
- /**
- * Return if the resource specified by relativePath is excluded or not.
- *
- * @param relativePath
- * @return
- */
- public boolean isExcluded(IPath relativePath);
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeOperation.java
deleted file mode 100644
index 2445a0d87..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizeOperation.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import java.util.Calendar;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * Utility class to synchronize local and remote resources. IResource is used as
- * local resources. IRemoteFile is used as remote resources. There are some
- * kinds of synchronization, such as Import, Export, Synchronize, or Manual
- * Synchronize.
- */
-public interface ISynchronizeOperation {
- /**
- * the mode of synchronization is not defined
- */
- public static final int SYNC_MODE_NON = 0;
- /**
- * "Import": Always override source with destination
- */
- public static final int SYNC_MODE_OVERRIDE_SOURCE = 1;
- /**
- * "Export": Always override destination with source.
- */
- public static final int SYNC_MODE_OVERRIDE_DEST = 2;
- /**
- * "Re-Synchronize": Always override older files with newer ones
- */
- public static final int SYNC_MODE_OVERRIDE_OLDER = 3;
- /**
- * "Manual Re-Synchronize":Review sync in UI
- */
- public static final int SYNC_MODE_UI_REVIEW = 4;
-
- /**
- * TODO This will be removed because initial synchronize will be import or
- * export. "Initial Manual Synchronize":Review sync in UI.
- */
- public static final int SYNC_MODE_UI_REVIEW_INITIAL = 5;
-
- /**
- * Synchronize local with remote, using the given filter. Both local and
- * remote are folder. If lastSyncDate != null, it is the timestamp of last
- * synchronization (for 3-way synchronization). The filter is always applied
- * to the all kinds of synchronize operation. In initial export operation,
- * filter is applied to the exported local resources. In initial import
- * operation, filter is applied to the imported remote resources. In
- * synchronization, filter is applied to the synchronized resources. throws
- * CoreException if any error occurs. When SYNC_MODE_UI_REVIEW is requested
- * option, the method returns as soon as the Synchronize View has been
- * filled with contents according to the request.
- *
- * @param local
- * @param remote
- * @param filter
- * @param lastSyncDate
- * @param options
- * @throws CoreException
- */
- // TODO currently lastSyncDate is unnecessary
- public void synchronize(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter, Calendar lastSyncDate, int options) throws CoreException;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizePerspectiveSelector.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizePerspectiveSelector.java
deleted file mode 100644
index 6937677b7..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizePerspectiveSelector.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- *
- * Switch to the team synchronization perspective
- *
- */
-public interface ISynchronizePerspectiveSelector {
-
- /**
- * Open synchronize perspective
- *
- * @param synchronizeElement
- */
- public void openSynchronizePerspective(List<IResource> synchronizeElement);
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizer.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizer.java
deleted file mode 100644
index 7f91c305b..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/ISynchronizer.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-/**
- *
- * This class manage the start point of actual synchronize operation. The class
- * that implement this interface must have necessary informations for
- * synchronization.
- *
- */
-public interface ISynchronizer {
-
- /**
- * Run the SynchronizeOperation. Preparing for the synchronization and
- * invoke ISyncronizeOperation#synchronize() as an actual synchronize
- * operation. Preparing is mapping the project to RepositoryProvider, and if
- * needed, unmap for new synchronization. This method is called directory
- * from GUI.
- *
- * @param operation
- * @return
- */
- public boolean run(ISynchronizeOperation operation);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeConnectionManager.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeConnectionManager.java
deleted file mode 100644
index 9c5a276f4..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeConnectionManager.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-
-public class SynchronizeConnectionManager implements ISynchronizeConnectionManager {
- public void connect(IProject project) throws TeamException {
- RepositoryProvider.map(project, RSESyncUtils.PROVIDER_ID);
- }
-
- public void disconnect(IProject project) throws TeamException {
- if (isConnected(project)) {
- RepositoryProvider.unmap(project);
- }
- }
-
- public boolean isConnected(IProject project) {
- return RepositoryProvider.isShared(project);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeFilter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeFilter.java
deleted file mode 100644
index 2217d0409..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeFilter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-
-public class SynchronizeFilter implements ISynchronizeFilter {
- /**
- * the paths of synchronize elements
- */
- private List<IPath> paths;
-
- public SynchronizeFilter(List<IPath> sycnhronizeRelativePaths) {
- super();
- this.paths = sycnhronizeRelativePaths;
- }
-
- public boolean isExcluded(IPath relativePath) {
- if(paths.contains(relativePath)){
- return false;
- }else{
- return true;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeOperation.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeOperation.java
deleted file mode 100644
index a460ebf76..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizeOperation.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import java.util.Calendar;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemOperations;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-
-public class SynchronizeOperation implements ISynchronizeOperation {
- private ISynchronizePerspectiveSelector switcher;
-
- public SynchronizeOperation() {
- this.switcher = new SynchronizePerspectiveSelector();
- }
-
- public void synchronize(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter, Calendar lastSyncDate, int options) throws CoreException {
-
- switch (options) {
- case SYNC_MODE_OVERRIDE_DEST:
- exportTo(local, remote, filter);
- break;
- case SYNC_MODE_OVERRIDE_SOURCE:
- importFrom(local, remote, filter);
- break;
- case SYNC_MODE_OVERRIDE_OLDER:
- synchronizeWith(local, remote, filter, lastSyncDate);
- break;
- case SYNC_MODE_UI_REVIEW:
- synchronizeManually(local, remote, filter, lastSyncDate);
- break;
- case SYNC_MODE_UI_REVIEW_INITIAL:
- initialSynchronizeManually(local, remote, filter, lastSyncDate);
- break;
- }
-
- }
-
- private void importFrom(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter) throws TeamException{
- for (IResource resource : local) {
- FileSystemProvider provider = (FileSystemProvider) RepositoryProvider.getProvider(resource.getProject());
- FileSystemOperations operations = provider.getOperations();
- operations.get(new IResource[] { resource }, IResource.DEPTH_INFINITE, true, null);
- }
- }
-
-
- private void exportTo(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter) throws TeamException {
- for (IResource resource : local) {
- FileSystemProvider provider = (FileSystemProvider) RepositoryProvider.getProvider(resource.getProject());
- FileSystemOperations operations = provider.getOperations();
- operations.checkin(new IResource[] { resource }, IResource.DEPTH_INFINITE, false, null);
- }
- }
-
- private void synchronizeWith(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter, Calendar lastSyncDate) {
-
- }
-
- private void synchronizeManually(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter, Calendar lastSyncDate) {
- switcher.openSynchronizePerspective(local);
- }
-
- private void initialSynchronizeManually(List<IResource> local, IRemoteFile remote, ISynchronizeFilter filter, Calendar lastSyncDate) {
- switcher.openSynchronizePerspective(local);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizePerspectiveSelector.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizePerspectiveSelector.java
deleted file mode 100644
index 57263f639..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/SynchronizePerspectiveSelector.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.internal.synchronize.RSESyncUtils;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemMergeContext;
-import org.eclipse.rse.internal.synchronize.filesystem.subscriber.FileSystemSubscriber;
-import org.eclipse.rse.internal.synchronize.filesystem.ui.FileSystemOperation;
-import org.eclipse.rse.internal.synchronize.filesystem.ui.FileSystemSynchronizeParticipant;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.subscribers.SubscriberScopeManager;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.IContributorResourceAdapter;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-
-public class SynchronizePerspectiveSelector implements ISynchronizePerspectiveSelector {
- private IWorkbenchPart targetPart;
-
- /**
- * Open Synchronize Perspective
- */
- // <Copied copied from
- // org.eclipse.team.examples.filesystem.ui.SynchronizeAction>
- public void openSynchronizePerspective(List<IResource> synchronizeElement) {
- // Get resource mapping which is prepared the previous step.
- ResourceMapping[] mappings = getSelectedResourceMappings(RSESyncUtils.PROVIDER_ID, synchronizeElement);
- if (mappings.length == 0) {
- return;
- }
- SubscriberScopeManager manager = FileSystemOperation.createScopeManager(FileSystemSubscriber.getInstance().getName(), mappings);
- FileSystemMergeContext context = new FileSystemMergeContext(manager);
- FileSystemSynchronizeParticipant participant = new FileSystemSynchronizeParticipant(context);
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] { participant });
- participant.run(getTargetPart());
- }
-
- // </Copied copied from
- // org.eclipse.team.examples.filesystem.ui.SynchronizeAction>
-
- // <Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
- /**
- * Return the selected resource mappins that contain resources in projects
- * that are associated with a repository of the given id.
- *
- * @param providerId
- * the repository provider id
- * @return the resource mappings that contain resources associated with the
- * given provider
- */
- protected ResourceMapping[] getSelectedResourceMappings(String providerId, List synchronizeResources) {
- Object[] elements = synchronizeResources.toArray();
- ArrayList providerMappings = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- Object adapted = getResourceMapping(object);
- if (adapted instanceof ResourceMapping) {
- ResourceMapping mapping = (ResourceMapping) adapted;
- if (providerId == null || isMappedToProvider(mapping, providerId)) {
- providerMappings.add(mapping);
- }
- }
- }
- return (ResourceMapping[]) providerMappings.toArray(new ResourceMapping[providerMappings.size()]);
- }
-
- // </Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
-
- /**
- * return if the element is mapped to providerId in the RepositoryProvider
- *
- * @param element
- * @param providerId
- * @return
- */
- // <Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
- private boolean isMappedToProvider(ResourceMapping element, String providerId) {
- IProject[] projects = element.getProjects();
- for (int k = 0; k < projects.length; k++) {
- IProject project = projects[k];
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider != null && provider.getID().equals(providerId)) {
- return true;
- }
- }
- return false;
- }
-
- // </Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
-
- /**
- *
- * @param object
- * @return
- */
- // <Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
- private Object getResourceMapping(Object object) {
- // if object is already ResourceMapping
- if (object instanceof ResourceMapping) {
- return object;
- }
-
- // <Copied copied from org.eclipse.team.internal.ui.Utils>
- if (object instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) object;
- Object adapted = adaptable.getAdapter(ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return adapted;
- }
- adapted = adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapted instanceof IContributorResourceAdapter2) {
- IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted;
- return cra.getAdaptedResourceMapping(adaptable);
- }
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(object, ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return adapted;
- }
- }
- return null;
- // </Copied copied from org.eclipse.team.internal.ui.Utils>
- }
-
- // </Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
-
- /**
- *
- * @return
- */
- // <Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
- protected IWorkbenchPart getTargetPart() {
- if (targetPart == null) {
- IWorkbenchPage page = RSESyncUtils.getActivePage();
- if (page != null) {
- targetPart = page.getActivePart();
- }
- }
- return targetPart;
-
- }
- // </Copied copied from org.eclipse.team.internal.ui.actions.TeamAction>
-}
diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/Synchronizer.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/Synchronizer.java
deleted file mode 100644
index 7be9974e9..000000000
--- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/synchronize/provisional/Synchronizer.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Takuya Miyamoto and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Takuya Miyamoto - initial API and implementation
- * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
- *******************************************************************************/
-package org.eclipse.rse.internal.synchronize.provisional;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-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.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
-import org.eclipse.rse.internal.importexport.SystemImportExportResources;
-import org.eclipse.rse.internal.importexport.files.UniFilePlus;
-import org.eclipse.rse.internal.synchronize.ISynchronizeData;
-import org.eclipse.rse.internal.synchronize.filesystem.FileSystemProvider;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-
-public class Synchronizer implements ISynchronizer {
- private ISynchronizeData data;
- private ISynchronizeConnectionManager connector;
-
- /**
- * TODO in the future, remoteRoot is probably needed for import or export
- */
- private UniFilePlus remoteRoot;
-
- public Synchronizer(ISynchronizeData data) {
- this.data = data;
- this.connector = new SynchronizeConnectionManager();
- }
-
- public boolean run(ISynchronizeOperation operation) {
- IProject[] projects = null;
- List<IResource> elements = data.getElements();
- Set<IProject> projectSet = new HashSet<IProject>();
-
- for (IResource resource : elements) {
- projectSet.add(resource.getProject());
- if (!resource.exists()){
- IContainer parent = resource.getParent();
- if (!parent.exists()){
- createEmptyFolders(parent);
- }
- }
- }
-
- // get resources to synchronize in the type of Array.
- projects = projectSet.toArray(new IProject[projectSet.size()]);
-
- try {
- // if user request new synchronization, previous mapping are
- // removed.
- if (data.getSynchronizeType() == ISynchronizeOperation.SYNC_MODE_OVERRIDE_DEST ||
- data.getSynchronizeType() == ISynchronizeOperation.SYNC_MODE_OVERRIDE_SOURCE ||
- data.getSynchronizeType() == ISynchronizeOperation.SYNC_MODE_UI_REVIEW_INITIAL) {
- for (int i = 0; i < projects.length; i++) {
-
- IProject project = projects[i];
- // user should be prompted before disconnect or he/she will lose team synch info
- if (connector.isConnected(project)){
-
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (!(provider instanceof FileSystemProvider)){
- String msg = NLS.bind(SystemImportExportResources.RESID_SYNCHRONIZE_DISCONNECT_WARNING, project.getName());
- SystemMessage msgObj = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.WARNING, msg);
-
- SystemMessageDialog dlg = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), msgObj);
- if (!dlg.openQuestionNoException(true)){
- return false;
- }
- }
-
- connector.disconnect(project);
- }
- }
-
- }
-
- // create new connection for each project
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- connector.connect(project);
- FileSystemProvider provider = (FileSystemProvider) RepositoryProvider.getProvider(project);
- provider.reset();
- String remoteLocation = data.getRemoteLocation();
- IPath localLocation = data.getLocalLocation();
- provider.setRemoteLocation(remoteLocation);
- provider.setLocalLocation(localLocation);
- this.remoteRoot = provider.getRemoteRootFolder();
- }
-
-
-
- // run actual synchronize operation.
- // TODO currently, not support last synchronization date.
- operation.synchronize(data.getElements(), remoteRoot.remoteFile, null, null, data.getSynchronizeType());
- } catch (TeamException e1) {
- e1.printStackTrace();
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return true;
- }
-
- private void createEmptyFolders(IContainer container){
- List emptyParent = new ArrayList();
- boolean go = true;
-
- IContainer empty = container;
-
- //check to see which parent folders need to be created
- while(go) {
- if(!empty.exists() && empty instanceof IFolder){
- emptyParent.add(empty);
- }
- else {
- go=false;
- }
- empty = empty.getParent();
- }
-
- IFolder emptyFolder = null;
-
- // create empty parent folders
- for(int j=emptyParent.size()-1;j>=0;j--){
- emptyFolder = (IFolder) emptyParent.get(j);
- if(!emptyFolder.exists()){
- try {
- emptyFolder.create(true, true, new NullProgressMonitor());
- }
- catch (CoreException e){}
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.logging/.project b/rse/plugins/org.eclipse.rse.logging/.project
deleted file mode 100644
index 0f5768078..000000000
--- a/rse/plugins/org.eclipse.rse.logging/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.logging</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.logging/decommissioned.txt b/rse/plugins/org.eclipse.rse.logging/decommissioned.txt
deleted file mode 100644
index 9e50a4dba..000000000
--- a/rse/plugins/org.eclipse.rse.logging/decommissioned.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This plugin has been decommissioned on 30-Mar-2007.
-
-Its contents has been merged into org.eclipse.rse.core
-and org.eclipse.rse.ui plugins, respectively.
- \ No newline at end of file
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 b7464f3ca..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.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.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 a2a9b25ba..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 700763244..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: 3.0.101.qualifier
-Bundle-Activator: org.eclipse.rse.internal.processes.ui.ProcessesPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.debug.core,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.jface,
- org.eclipse.jface.text,
- org.eclipse.search,
- org.eclipse.compare,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.rse.internal.processes.ui;x-internal:=true,
- org.eclipse.rse.internal.processes.ui.actions;x-internal:=true,
- org.eclipse.rse.internal.processes.ui.dialogs;x-internal:=true,
- org.eclipse.rse.internal.processes.ui.propertypages;x-internal:=true,
- org.eclipse.rse.internal.processes.ui.view;x-internal:=true,
- org.eclipse.rse.processes.ui
-Bundle-ActivationPolicy: lazy
-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 d4cc693f9..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 5, 2007</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 c19694cac..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 32d8fad4f..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Processes UI
-providerName = Eclipse.org - DSDP
-
-#Factory.LocalProcesses = Local Processes
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-PropertyPage.Service = Service
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 e19fc5b48..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/plugin.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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) - [180519] declaratively register adapter factories
-Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
-Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-<!-- ============================================ -->
-<!-- Register Adapter Factories -->
-<!-- ============================================ -->
-
- <extension point="org.eclipse.core.runtime.adapters">
- <!-- IRemoteProcess -->
- <factory
- class="org.eclipse.rse.internal.processes.ui.view.SystemViewProcessAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- -->
- </factory>
- <!-- IRemoteProcessSubSystemConfiguration -->
- <factory
- class="org.eclipse.rse.internal.processes.ui.view.RemoteProcessSubSystemConfigurationAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration">
- <adapter type="org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter"/>
- </factory>
- </extension>
-
-<!-- ============================================== -->
-<!-- Define subsystem configurations for processes... -->
-<!-- ============================================== -->
-<!-- let's wait until this is supported on windows
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <factory
- systemTypeIds="org.eclipse.rse.systemtype.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
- name="%PropertyPage.ServerLauncherSettings"
- class="org.eclipse.rse.internal.ui.propertypages.ServerLauncherPropertyPage"
- id="org.eclipse.rse.ui.propertypages.serverLauncherPropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.Service"
- class="org.eclipse.rse.internal.processes.ui.propertypages.ProcessServicesPropertyPage"
- id="org.eclipse.rse.processes.ui.propertypages.ProcessServicesPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem"/>
- </enabledWhen>
- </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/internal/processes/ui/ProcessesPlugin.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java
deleted file mode 100644
index 2df91d989..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [180519][api] declaratively register rse.processes.ui adapter factories
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 {
-
- public static final String PLUGIN_ID = "org.eclipse.rse.processes.ui"; //$NON-NLS-1$
-
- //The shared instance.
- private static ProcessesPlugin plugin;
-
- private static SystemMessageFile messageFile = null;
- private static SystemMessageFile defaultMessageFile = null;
-
- public static final String HELPPREFIX = "org.eclipse.rse.processes.ui."; //$NON-NLS-1$
-
-
- /**
- * 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"); //$NON-NLS-1$
- defaultMessageFile = getDefaultMessageFile("processmessages.xml"); //$NON-NLS-1$
- }
-
- /**
- * 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 ProcessesPlugin getDefault() {
- return plugin;
- }
-
- /**
- * 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); //$NON-NLS-1$
- }
-
- /**
- * 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);
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.java
deleted file mode 100644
index a4c0b43ae..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SystemProcessesResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.processes.ui.SystemProcessesResources"; //$NON-NLS-1$
-
- // -------------------------
- // 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_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;
-
-
-
- public static String MSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE;
-
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemProcessesResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.properties b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.properties
deleted file mode 100644
index 1d6f6a70f..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.properties
+++ /dev/null
@@ -1,87 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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:
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# 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_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
-
-
-MSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= Filter string ''{0}'' already exists in this filter
-
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java
deleted file mode 100644
index 563f51bd4..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.IStatus;
-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.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.internal.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.internal.processes.ui.dialogs.SystemKillDialog;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.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"), //$NON-NLS-1$
- shell);
- allowOnMultipleSelection(true);
- setProcessAllSelections(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(ProcessesPlugin.HELPPREFIX+"actn0001"); //$NON-NLS-1$
- setDialogHelp(ProcessesPlugin.HELPPREFIX+"dkrp0000"); //$NON-NLS-1$
- }
-
- /**
- * 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()
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().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(currentProcess, signalType, monitor);
- 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 process the process to send the signal to
- * @param signal the signal to be sent to the remote process
- * @param monitor Usually not needed
- */
- protected boolean doKill(IRemoteProcess process, String signal, IProgressMonitor monitor)
- throws Exception
- {
-
- IRemoteProcessSubSystem ss;
- boolean ok = false;
- ss = process.getParentRemoteProcessSubSystem();
-
- ok = ss.kill(process, signal);
- if (!ok)
- {
- SystemMessage msg = ProcessesPlugin.getPluginMessage("RSEPG1300"); //$NON-NLS-1$
- 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
- ISystemRegistry registry = RSECorePlugin.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 = RSECorePlugin.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"); //$NON-NLS-1$
- }
- /**
- * Get the specific "kill" message
- */
- protected SystemMessage getKillingMessage(String signal, String processName)
- {
- SystemMessage msg = null;
- msg = ProcessesPlugin.getPluginMessage("RSEPG1004"); //$NON-NLS-1$
- 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();
- SystemMessage smsg = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_FAILED,
- IStatus.ERROR,
- NLS.bind(CommonMessages.MSG_OPERATION_FAILED, msg));
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, smsg);
- 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)
- {
- SystemMessage msg = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL,
- CommonMessages.MSG_OPERATION_CANCELLED);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.open();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java
deleted file mode 100644
index 424bed7f0..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemNewProcessFilterAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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:
- * David McKnight (IBM) - [281371] Check box Only create filter in this connection doesn't work
- *******************************************************************************/
-
-package org.eclipse.rse.internal.processes.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.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.processes.ui.SystemProcessFilterStringEditPane;
-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
-{
- private SubSystem _selectedSubSystem;
- /**
- * Constructor
- */
- public SystemNewProcessFilterAction(Shell shell, ISystemFilterPool parentPool)
-
- {
- super(shell, parentPool, SystemProcessesResources.ACTION_NEWPROCESSFILTER_LABEL,
- SystemProcessesResources.ACTION_NEWPROCESSFILTER_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTER_ID));
- 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;
- }
- /**
- * 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(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID));
- wizard.setPage1Description(SystemProcessesResources.RESID_NEWPROCESSFILTER_PAGE1_DESCRIPTION);
- wizard.setFilterStringEditPane(new SystemProcessFilterStringEditPane(wizard.getShell()));
- }
-
- public void run()
- {
- if (_selectedSubSystem != null){
- setAllowFilterPoolSelection(_selectedSubSystem.getFilterPoolReferenceManager().getReferencedSystemFilterPools());
- }
- else {
- // disallow filter pool select (because this is from a filter pool)
- setAllowFilterPoolSelection((ISystemFilterPool[])null);
- setAllowFilterPoolSelection((ISystemFilterPoolWrapperInformation)null);
-
- callbackConfigurator = null;
- callbackConfiguratorCalled = false;
- }
- 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)
- {
- _selectedSubSystem = null;
- Iterator e = selection.iterator();
- Object selected = e.next();
-
- if (selected != null && selected instanceof SubSystem)
- {
- _selectedSubSystem = (SubSystem) selected;
- }
-
- return super.updateSelection(selection);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemProcessUpdateFilterAction.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemProcessUpdateFilterAction.java
deleted file mode 100644
index 5bbdae2d0..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/actions/SystemProcessUpdateFilterAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.internal.processes.ui.actions;
-
-import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.processes.ui.SystemProcessFilterStringEditPane;
-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));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java
deleted file mode 100644
index 93df1b25a..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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"); //$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);
- 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) //$NON-NLS-1$
- _executableFilter += "*"; //$NON-NLS-1$
- 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();
- }
- }
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillDialog.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillDialog.java
deleted file mode 100644
index 31ce758c3..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillDialog.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [186640] Add IRSESystemType.testProperty()
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * Radoslav Gerganov (ProSyst) - [240646] Default signal type appears twice in SystemKillDialog's combo if the remote system doesn't support signal types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.internal.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.SystemBasePlugin;
-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.rse.ui.view.SystemAdapterHelpers;
-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[] = {
- "", //$NON-NLS-1$
- 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"); //$NON-NLS-1$
- }
-
- /**
- * 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 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); //$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);
- }
- }
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.widthHint = 350;
- data.grabExcessVerticalSpace = true;
- warningLabel.setLayoutData(data);
-
- // filler line
- SystemWidgetHelpers.createLabel(composite, "", nbrColumns); //$NON-NLS-1$
- }
-
- // 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();
- }
- }
- );
- String[] signalTypes = getSignalTypes();
- if (signalTypes != null) {
- cmbSignal.setItems(signalTypes);
- }
- 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 or <code>null</code> if the remote system doesn't support any
- * signal types
- */
- private String[] getSignalTypes()
- {
- Object selObj = getInputObject();
- String[] types = null;
- if (selObj instanceof IStructuredSelection)
- {
- IStructuredSelection selection = (IStructuredSelection) selObj;
- IRemoteProcess process = (IRemoteProcess) selection.getFirstElement();
- try
- {
- types = process.getParentRemoteProcessSubSystem().getSignalTypes();
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logMessage(e.getSystemMessage(), e);
- return null;
- }
- }
- return types;
- }
-
- 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(o);
- }
-
- public String getSignal()
- {
- if (cmbSignal == null) return ""; //$NON-NLS-1$
- if (cmbSignal.isDisposed()) return signalType;
- String signal = cmbSignal.getText();
- if (signal == null) return ""; //$NON-NLS-1$
- return signal;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableProvider.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableProvider.java
deleted file mode 100644
index 38081b252..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableProvider.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- *******************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.dialogs;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.rse.internal.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 = ""; //$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;
- }
-
- private SystemKillTableRow getTableRow(Object element)
- {
- return (SystemKillTableRow)element;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableRow.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableRow.java
deleted file mode 100644
index 8d696f32a..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/SystemKillTableRow.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- ********************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.dialogs;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.ui.dialogs.SystemDeleteTableRow;
-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.SystemSimpleContentElement;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-
-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 = getViewAdapter(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(); //$NON-NLS-1$
- 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 getViewAdapter()
- {
- 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java
deleted file mode 100644
index c719d585d..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.ISystemRegistry;
-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.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 = getProcessServiceSubSystemConfigurations(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[] getProcessServiceSubSystemConfigurations(IRSESystemType systemType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, false);
-
- 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 ISubSystemConfiguration getCurrentSubSystemConfiguration()
- {
- 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/internal/processes/ui/view/ISystemProcessPropertyConstants.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/ISystemProcessPropertyConstants.java
deleted file mode 100644
index f0e2c9692..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/ISystemProcessPropertyConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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"; //$NON-NLS-1$
- public static String P_PROCESS_NAME = P_PREFIX+"process.name"; //$NON-NLS-1$
- public static String P_PROCESS_UID = P_PREFIX+"process.uid"; //$NON-NLS-1$
- public static String P_PROCESS_USERNAME = P_PREFIX+"process.username"; //$NON-NLS-1$
- public static String P_PROCESS_PPID = P_PREFIX+"process.ppid"; //$NON-NLS-1$
- public static String P_PROCESS_GID = P_PREFIX+"process.gid"; //$NON-NLS-1$
- public static String P_PROCESS_STATE = P_PREFIX+"process.state"; //$NON-NLS-1$
- public static String P_PROCESS_TGID = P_PREFIX+"process.tgid"; //$NON-NLS-1$
- public static String P_PROCESS_TRACERPID = P_PREFIX+"process.tracerpid"; //$NON-NLS-1$
- public static String P_PROCESS_VMSIZE = P_PREFIX+"process.vmsize"; //$NON-NLS-1$
- public static String P_PROCESS_VMRSS = P_PREFIX+"process.vmrss"; //$NON-NLS-1$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java
deleted file mode 100644
index 342310cd1..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.processes.ui.actions.SystemNewProcessFilterAction;
-import org.eclipse.rse.internal.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;
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 76f88896f..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/RemoteProcessSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-
-public class RemoteProcessSubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new RemoteProcessSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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/internal/processes/ui/view/SystemProcessStatesContentProvider.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessStatesContentProvider.java
deleted file mode 100644
index cb9b71ad2..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessStatesContentProvider.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.internal.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 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 < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
- {
- strIndices.put(ISystemProcessRemoteConstants.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 ""; //$NON-NLS-1$
- String[] resources = getStates();
- if (index.intValue() >= resources.length) return ""; //$NON-NLS-1$
- 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)
- {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.java
deleted file mode 100644
index a2a4c3da0..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.view;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemProcessesViewResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.processes.ui.view.SystemProcessesViewResources"; //$NON-NLS-1$
-
- // 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_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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.properties b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.properties
deleted file mode 100644
index 079afdaf0..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemProcessesViewResources.properties
+++ /dev/null
@@ -1,87 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-# Martin Oberhuber (Wind River) - [226784] [nls] Standardize on Cancelled in PII
-###############################################################################
-
-# 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_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=Cancelled (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
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewProcessAdapterFactory.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewProcessAdapterFactory.java
deleted file mode 100644
index 32b82b767..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewProcessAdapterFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2007 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) - [180519][api] declaratively register adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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();
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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()); //$NON-NLS-1$
- }
- return adapter;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java
deleted file mode 100644
index 0d776830a..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.processes.ui.view;
-
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.SystemRemoteResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.internal.processes.ui.actions.SystemKillProcessAction;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.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 ISystemRemoteElementAdapter
-{
- 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.getTheSystemRegistryUI().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"); //$NON-NLS-1$
- }
-
- public String getText(Object element)
- {
- String text = ((IRemoteProcess) element).getLabel();
- return (text == null) ? "" : text; //$NON-NLS-1$
- }
-
- /**
- * Used for stuff like clipboard text copy
- */
- public String getAlternateText(Object element)
- {
- IRemoteProcess process = (IRemoteProcess)element;
- String allProperties = process.getAllProperties();
- return allProperties.replace('|', '\t');
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object object)
- {
- IRemoteProcess process = (IRemoteProcess) object;
- return "" + process.getPid(); //$NON-NLS-1$
- }
-
- 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(IAdaptable element)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- 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];
- SystemMessage msg = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_EXPAND_FAILED,
- IStatus.ERROR,
- CommonMessages.MSG_EXPAND_FAILED);
- children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element);
- SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
- }
- 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(ISystemProcessPropertyConstants.P_PROCESS_PID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PID_TOOLTIP);
-
- // name
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_NAME, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_NAME_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_NAME_TOOLTIP);
-
- // state
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_STATE, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_STATE_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_STATE_TOOLTIP);
-
- // uid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_UID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_UID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_UID_TOOLTIP);
-
- // username
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_USERNAME, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_USERNAME_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_USERNAME_TOOLTIP);
-
- // ppid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_PPID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PPID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_PPID_TOOLTIP);
-
- // gid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_GID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_GID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_GID_TOOLTIP);
-
- // tgid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_TGID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TGID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TGID_TOOLTIP);
-
- // tracerpid
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_TRACERPID, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TRACERPID_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_TRACERPID_TOOLTIP);
-
- // virtual memory size
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.P_PROCESS_VMSIZE, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMSIZE_LABEL, SystemProcessesViewResources.RESID_PROPERTY_PROCESS_VMSIZE_TOOLTIP);
-
- // virtual memory rss
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemProcessPropertyConstants.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(); //$NON-NLS-1$
- }
- 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(); //$NON-NLS-1$
- }
- else
- {
- return new Long(process.getPid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_PPID))
- {
- if (formatted)
- {
- return "" + process.getPPid(); //$NON-NLS-1$
- }
- 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(); //$NON-NLS-1$
- }
- else
- {
- return new Long(process.getTgid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_TRACERPID))
- {
- if (formatted)
- {
- return "" + process.getTracerPid(); //$NON-NLS-1$
- }
- else
- {
- return new Long(process.getTracerPid());
- }
- }
- if (name.equals(ISystemProcessPropertyConstants.P_PROCESS_UID))
- {
- if (formatted)
- {
- return "" + process.getUid(); //$NON-NLS-1$
- }
- 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 ""; //$NON-NLS-1$
- state = state.trim();
- String longState = ""; //$NON-NLS-1$
- String[] allStates = state.split(","); //$NON-NLS-1$
- 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]); //$NON-NLS-1$
- if (i < allStates.length - 1)
- longState = longState + ", "; //$NON-NLS-1$
- }
- 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"; //$NON-NLS-1$
- }
-
- /**
- * 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) throws Exception
- {
- String[] pids = EMPTY_STRING_LIST;
-
- IRemoteProcess process = (IRemoteProcess) element;
- String parentName = "" + process.getPPid(); //$NON-NLS-1$
- if (parentName.equals("-1")) // given a root? //$NON-NLS-1$
- 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(); //$NON-NLS-1$
-
- 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;
- }
-
- /*
- * Return whether deferred queries are supported.
- */
- public boolean supportsDeferredQueries(ISubSystem subSys)
- {
- return true;
- }
-}
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 184145b26..000000000
--- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java
+++ /dev/null
@@ -1,760 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.processes.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
-import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
-import org.eclipse.rse.internal.processes.ui.view.SystemProcessStatesContentProvider;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemTestFilterStringAction;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-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
-{
- // 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); //$NON-NLS-1$
-
- // 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;
-
-
- // 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...
- // ------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.filters.SystemFilterStringEditPane#setEditable(boolean)
- */
- public void setEditable(boolean editable) {
- super.setEditable(editable);
- enable(lblStatus, editable);
- enable(lblExeName, editable);
- enable(lblUserName, editable);
- enable(lblGid, editable);
- enable(txtExeName, editable);
- enable(txtUserName, editable);
- enable(txtGid, editable);
- enable(lblMinVM, editable);
- enable(lblMaxVM, editable);
- enable(txtMinVM, editable);
- enable(txtMaxVM, editable);
- enable(chkBoxUnlimitedVM, editable);
- }
-
- /**
- * 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"); //$NON-NLS-1$
- updateGridData(txtExeName, gridColumns-1);
- txtExeName.setText("*"); //$NON-NLS-1$
-
- // 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"); //$NON-NLS-1$
- updateGridData(txtUserName, gridColumns-1);
- txtUserName.setText("*"); //$NON-NLS-1$
-
- // 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"); //$NON-NLS-1$
- updateGridData(txtGid, gridColumns-1);
- txtGid.setText("*"); //$NON-NLS-1$
-
- // 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"); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(sub_prompts1, " "); //$NON-NLS-1$
- 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"); //$NON-NLS-1$
- txtMinVM.setText("0"); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(subsub, " "); //$NON-NLS-1$
-
- 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"); //$NON-NLS-1$
- 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"); //$NON-NLS-1$
-
- 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("")) //$NON-NLS-1$
- {
- SystemMessage message = validateMinLessThanMax();
- fireChangeEvent(message);
- }
- }
- }
- }
- );
- txtMaxVM.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (validateMaxVMInput() == null)
- {
- if (!txtMinVM.getText().trim().equals("")) //$NON-NLS-1$
- {
- SystemMessage message = validateMinLessThanMax();
- fireChangeEvent(message);
- }
- }
- }
- }
- );
-
- chkBoxUnlimitedVM.addSelectionListener(this);
-
- setEditable(editable);
- 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); //$NON-NLS-1$
- String defaultUserName = rffs.getUsername();
- txtUserName.setText((defaultUserName==null) ? "" : defaultUserName); //$NON-NLS-1$
-
- String defaultGid = rffs.getGid();
- txtGid.setText((defaultGid==null) ? "" : defaultGid); //$NON-NLS-1$
- String defaultMinVM = rffs.getMinVM();
- txtMinVM.setText((defaultMinVM==null) ? "" : defaultMinVM); //$NON-NLS-1$
- String defaultMaxVM = rffs.getMaxVM();
- if (defaultMaxVM.equals("-1")) //$NON-NLS-1$
- {
- txtMaxVM.setText(""); //$NON-NLS-1$
- 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 < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
- {
- chkStatus.setChecked(stateTypes[i], rffs.getSpecificState(ISystemProcessRemoteConstants.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("*"); //$NON-NLS-1$
- txtUserName.setText("*"); //$NON-NLS-1$
- txtGid.setText(""); //$NON-NLS-1$
- txtMinVM.setText("0"); //$NON-NLS-1$
- txtMaxVM.setText(""); //$NON-NLS-1$
- 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 = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID,
- "RSEF1007", //$NON-NLS-1$
- IStatus.ERROR,
- NLS.bind(SystemProcessesResources.MSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, currFilterString));
- }
- controlInError = txtExeName;
- }
-
- if (errorMessage != null)
- {
- if (!dontStealFocus && controlInError != null)
- 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"); //$NON-NLS-1$
- }
- 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); //$NON-NLS-1$
-
- String userName = txtUserName.getText().trim();
- if (!userName.equals("")) rpfs.setUsername(userName); //$NON-NLS-1$
-
- String gid = txtGid.getText().trim();
- if (!gid.equals("")) rpfs.setGid(gid); //$NON-NLS-1$
-
- String minVM = txtMinVM.getText().trim();
- if (!minVM.equals("")) rpfs.setMinVM(minVM); //$NON-NLS-1$
-
- if (chkBoxUnlimitedVM.getSelection())
- {
- rpfs.setMaxVM("-1"); //$NON-NLS-1$
- }
- else
- {
- String maxVM = txtMaxVM.getText().trim();
- if (!maxVM.equals("")) rpfs.setMaxVM(maxVM); //$NON-NLS-1$
- }
-
- String[] stateStrings = SystemProcessStatesContentProvider.getStates();
- for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
- {
- if (chkStatus.getChecked(stateStrings[i])) rpfs.setSpecificState(ISystemProcessRemoteConstants.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("")) //$NON-NLS-1$
- {
- 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"); //$NON-NLS-1$
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.sdk/.classpath b/rse/plugins/org.eclipse.rse.sdk/.classpath
deleted file mode 100644
index dd66efeb1..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.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.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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 769b2151e..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: 3.2.0.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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 db820ffa4..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/about.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-################################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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 Extender SDK\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 adf45cf08..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- dsdp32.png,\
- plugin.properties
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.sdk/dsdp32.png b/rse/plugins/org.eclipse.rse.sdk/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/dsdp32.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 ff8b2ebb3..000000000
--- a/rse/plugins/org.eclipse.rse.sdk/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = Remote System Explorer Extender SDK
-providerName = Eclipse.org - DSDP \ 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 21eef6af2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/dstore/**"/>
- <accessrule kind="discouraged" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <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 9081898c4..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/.settings/.api_filters b/rse/plugins/org.eclipse.rse.services.dstore/.settings/.api_filters
deleted file mode 100644
index 189fbc5a0..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.settings/.api_filters
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.services.dstore" version="2">
- <resource path="src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java" type="org.eclipse.rse.internal.services.dstore.shells.DStoreShellService">
- <filter id="574619656">
- <message_arguments>
- <message_argument value="IShellService"/>
- <message_argument value="DStoreShellService"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java" type="org.eclipse.rse.internal.services.dstore.files.DStoreFileService">
- <filter id="574619656">
- <message_arguments>
- <message_argument value="IFileService"/>
- <message_argument value="DStoreFileService"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java" type="org.eclipse.rse.internal.services.dstore.search.DStoreSearchService">
- <filter id="574619656">
- <message_arguments>
- <message_argument value="ISearchService"/>
- <message_argument value="DStoreSearchService"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 2b3c0d858..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: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.services.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.extra;bundle-version="[2.1.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.dstore.universal.miners,
- org.eclipse.rse.internal.dstore.universal.miners.command;x-internal:=true,
- org.eclipse.rse.internal.dstore.universal.miners.command.patterns;x-internal:=true,
- org.eclipse.rse.internal.dstore.universal.miners.filesystem;x-internal:=true,
- org.eclipse.rse.internal.dstore.universal.miners.processes;x-internal:=true,
- org.eclipse.rse.internal.services.dstore;x-internal:=true,
- org.eclipse.rse.internal.services.dstore.files;x-friends:="org.eclipse.rse.subsystems.files.dstore",
- org.eclipse.rse.internal.services.dstore.processes;x-friends:="org.eclipse.rse.subsystems.processes.dstore",
- org.eclipse.rse.internal.services.dstore.rmtservice;x-internal:=true,
- org.eclipse.rse.internal.services.dstore.search;x-friends:="org.eclipse.rse.subsystems.files.dstore",
- org.eclipse.rse.internal.services.dstore.shells;x-friends:="org.eclipse.rse.subsystems.shells.dstore",
- org.eclipse.rse.services.dstore,
- 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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 5af114e35..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-###############################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE DStore Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 242bf02d8..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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,\
- dsdp32.png
-source.. = src/,miners/
-output.. = bin/
-jars.compile.order = dstore_miners.jar,.
-source.dstore_miners.jar = miners/
-output.dstore_miners.jar = miners.bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/dsdp32.png b/rse/plugins/org.eclipse.rse.services.dstore/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/dsdp32.png
+++ /dev/null
Binary files differ
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/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/CommandMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java
deleted file mode 100644
index fadabd276..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [191599] use specified encoding for shell
- * David McKnight (IBM) - [202822] cancelled output should be created before thread cleanup
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Noriaki Takatsu (IBM) - [230399] [multithread] changes to stop CommandMiner threads when clients disconnect
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.dstore.core.miners.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.internal.dstore.universal.miners.command.CommandMinerThread;
-import org.eclipse.rse.internal.dstore.universal.miners.command.QueryPathThread;
-import org.eclipse.rse.internal.dstore.universal.miners.command.patterns.Patterns;
-
-
-
-/**
- * The CommandMiner provides the ability to run remote interactive shell
- * commands via the DataStore.
- *
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class CommandMiner extends Miner
-{
-
- 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;
-
-
- private Patterns getPatterns()
- {
- if (_patterns == null)
- {
- _patterns = new Patterns(_dataStore);
- }
- return _patterns;
- }
-
- protected ArrayList getDependencies()
- {
- ArrayList dependencies = new ArrayList();
- dependencies.add(IUniversalDataStoreConstants.UNIVERSAL_ENVIRONMENT_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$
- DataElement encodingArg = getCommandArgument(theElement, 1);
- if (encodingArg.getType().equals("shell.encoding")) //$NON-NLS-1$
- {
- // fix for 191599
- System.setProperty("dstore.stdin.encoding",encodingArg.getValue()); //$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));
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
- 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)
- {
- _dataStore.createObject(status, "stdout", "Command Cancelled by User Request"); //$NON-NLS-1$ //$NON-NLS-2$
-
- theThread.stopThread();
- theThread.sendExit();
-
- boolean done = false;
- long stopIn = System.currentTimeMillis() + 3000;
- while (!done)
- if ((!theThread.isAlive()) || (stopIn < System.currentTimeMillis()))
- done = true;
- }
- }
-
- public void finish()
- {
- Iterator pools = _threads.entrySet().iterator();
- while (pools.hasNext())
- {
- Map.Entry entry = (Map.Entry)pools.next();
- CommandMinerThread process = (CommandMinerThread) entry.getValue();
- process.sendExit();;
- }
-
- _threads.clear();
- super.finish();
- }
-
- public String getVersion()
- {
- return "8.0.0"; //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/EnvironmentMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/EnvironmentMiner.java
deleted file mode 100644
index 5e786d0db..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/EnvironmentMiner.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * Noriaki Takatsu (IBM) - [226237] [dstore] Move the place where the ServerLogger instance is made
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-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;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-
-/**
- * The environment miner provides access to the environment variables
- * on a remote system and allows the store environment variables to be altered
- * for use in other miners that launch shells.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class EnvironmentMiner extends Miner
-{
- 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$
-
- if (_dataStore.getClient() != null){
- _dataStore.createObject(systemInfo, "system.property", "user.home", _dataStore.getClient().getProperty("user.home")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _dataStore.createObject(systemInfo, "system.property", "temp.dir", _dataStore.getClient().getProperty("java.io.tmpdir")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- }
- else {
- _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$
- }
-
-}
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 658d9b603..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalDataStoreConstants.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [183165] Do not implement constant interfaces
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * David McKnight (IBM) - [225507] Removed used commands
- *******************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-public interface IUniversalDataStoreConstants
-{
- /*
- * Miner names, used for logging
- */
- public static final String UNIVERSAL_FILESYSTEM_MINER = "UniversalFileSystemMiner"; //$NON-NLS-1$
-
-
- /*
- * Miner IDs
- */
- /**
- * Universal Filesystem miner ID. Value =
- * "org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner".
- *
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static final String UNIVERSAL_FILESYSTEM_MINER_ID = "org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner"; //$NON-NLS-1$
- /**
- * Universal Command miner ID. Value =
- * "org.eclipse.rse.dstore.universal.miners.CommandMiner".
- *
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static final String UNIVERSAL_COMMAND_MINER_ID = "org.eclipse.rse.dstore.universal.miners.CommandMiner"; //$NON-NLS-1$
- /**
- * Universal Environment miner ID. Value =
- * "org.eclipse.rse.dstore.universal.miners.EnvironmentMiner".
- *
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static final String UNIVERSAL_ENVIRONMENT_MINER_ID = "org.eclipse.rse.dstore.universal.miners.EnvironmentMiner"; //$NON-NLS-1$
- /**
- * Universal Process miner ID. Value =
- * "org.eclipse.rse.dstore.universal.miners.UniversalProcessMiner".
- *
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static final String UNIVERSAL_PROCESS_MINER_ID = "org.eclipse.rse.dstore.universal.miners.UniversalProcessMiner"; //$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$
-
- public static final String C_SEARCH = "C_SEARCH"; //$NON-NLS-1$
- public static final String C_CANCEL = "C_CANCEL"; //$NON-NLS-1$
-
- public static final String C_SET_READONLY = "C_SET_READONLY";//$NON-NLS-1$
- public static final String C_SET_LASTMODIFIED = "C_SET_LASTMODIFIED";//$NON-NLS-1$
- public static final String C_QUERY_BASIC_PROPERTY = "C_QUERY_BASIC_PROPERTY";//$NON-NLS-1$
- public static final String C_QUERY_CAN_WRITE_PROPERTY = "C_QUERY_CAN_WRITE_PROPERTY";//$NON-NLS-1$
- public static final String C_QUERY_ADVANCE_PROPERTY = "C_QUERY_ADVANCE_PROPERTY";//$NON-NLS-1$
- public static final String C_QUERY_EXISTS = "C_QUERY_EXISTS";//$NON-NLS-1$
- public static final String C_GET_OSTYPE = "C_GET_OSTYPE";//$NON-NLS-1$
- public static final String C_QUERY_CLASSNAME = "C_QUERY_CLASSNAME"; //$NON-NLS-1$
- public static final String C_CREATE_TEMP = "C_CREATE_TEMP"; //$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$
-
- // permissions commands
- /** @since org.eclipse.rse.services.dstore 3.0 */
- public static final String C_QUERY_FILE_PERMISSIONS = "C_QUERY_FILE_PERMISSIONS"; //$NON-NLS-1$
- /** @since org.eclipse.rse.services.dstore 3.0 */
- public static final String C_SET_FILE_PERMISSIONS = "C_SET_FILE_PERMISSIONS"; //$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;
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalProcessDataStoreConstants.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalProcessDataStoreConstants.java
deleted file mode 100644
index 7e3011e33..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/IUniversalProcessDataStoreConstants.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.dstore.universal.miners;
-
-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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalByteStreamHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalByteStreamHandler.java
deleted file mode 100644
index 1ac9b591c..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalByteStreamHandler.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-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();
-
- try
- {
- VirtualChild child = mgr.getVirtualObject(virtualFileName);
- ISystemArchiveHandler handler = child.getHandler();
- 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));
- }
- if (handler != null)
- handler.add(newFile, child.path, child.name, null);
- 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;
- try
- {
- ArchiveHandlerManager mgr = ArchiveHandlerManager.getInstance();
- VirtualChild child = mgr.getVirtualObject(virtualFileName);
- if (!child.exists()) {
- // System.out.println(virtualFileName + " does not exist.");
- return;
- }
- ISystemArchiveHandler handler = child.getHandler();
- 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));
- }
- if (handler != null) {
- handler.add(newFile, child.path, child.name, null);
- }
-
- }
- 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));
- }
- if (handler != null) {
- handler.add(newFile, child.path, child.name, null);
- }
- }
-
- if (status == null)
- return;
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- _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());
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java
deleted file mode 100644
index 8db5cb6e7..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java
+++ /dev/null
@@ -1,2119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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
- * Xuan Chen (IBM) - Fix 160768 - [refresh][dstore] Refresh on renamed node within a zip does not work;
- * Xuan Chen (IBM) - Fix 189487 - copy and paste a folder did not work - workbench hang
- * Xuan Chen (IBM) - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root
- * Xuan Chen (IBM) - [191280] [dstore] Expand fails for folder "/folk" with 3361 children
- * Kevin Doyle (IBM) - [195709] Windows Copying doesn't work when path contains space
- * Kevin Doyle (IBM) - [196211] DStore Move tries rename if that fails copy/delete
- * Xuan Chen (IBM) - [198046] [dstore] Cannot copy a folder into an archive file
- * Xuan Chen (IBM) - [191367] with supertransfer on, Drag & Drop Folder from DStore to DStore doesn't work
- * Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
- * Kevin Doyle (IBM) - [191548] Deleting Read-Only directory removes it from view and displays no error
- * Xuan Chen (IBM) - [202949] [archives] copy a folder from one connection to an archive file in a different connection does not work
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Xuan Chen (IBM) - [194481] [dstore][Archive] Save Conflict After Renaming a File that is Open
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Johnson Ma (Wind River) - [195402] Add tar.gz archive support
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) [225507] [api][breaking] RSE dstore API leaks non-API types
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- * David McKnight (IBM) - [244277] [dstore] NPE on file save from old client
- * David McKnight (IBM) - [246234] Change of file permissions changes the file owner
- * David McKnight (IBM) - [250168] handleCommand should not blindly set the status to "done"
- * David McKnight (IBM) - [251729][dstore] problems querying symbolic link folder
- * David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
- * David McKnight (IBM) - [283617] [dstore] UniversalFileSystemMiner.handleQueryGetRemoteObject does not return correct result when the queried file does not exist.
- *******************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.ServerSocket;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.dstore.core.miners.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.rse.internal.dstore.universal.miners.filesystem.ArchiveQueryThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.ClassFileParser;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.CopyBatchThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.CopySingleThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.CreateFileThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.CreateFolderThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.DeleteThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.FileClassifier;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.FileDescriptors;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.FileQueryThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.RenameThread;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.UniversalDownloadHandler;
-import org.eclipse.rse.internal.dstore.universal.miners.filesystem.UniversalSearchHandler;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-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.SystemTgzHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.SystemZipHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.java.ClassFileUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * This miner allows for remote file browsing and management.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class UniversalFileSystemMiner extends Miner {
-
- private DataElement deUFSnode;
-
- private DataElement deUFSuploadlog;
-
- 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 static final int PERMISSION_OWNER = 0;
- private static final int PERMISSION_GROUP = 1;
- private static final int PERMISSION_BITS = 2;
- private static final int PERMISSION_ALL = 3;
-
- 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.gz", SystemTgzHandler.class); //$NON-NLS-1$
- _archiveHandlerManager.setRegisteredHandler("tgz", SystemTgzHandler.class); //$NON-NLS-1$
- _archiveHandlerManager.setRegisteredHandler("tar", SystemTarHandler.class); //$NON-NLS-1$
- }
-
- /**
- * @see Miner#handleCommand(DataElement)
- */
- public DataElement handleCommand(DataElement theElement) throws SystemMessageException {
- String name = getCommandName(theElement);
-
-
- DataElement status = getCommandStatus(theElement);
- DataElement subject = getCommandArgument(theElement, 0);
-
- UniversalServerUtilities.logInfo(getName(), name + ":" + subject, _dataStore); //$NON-NLS-1$
-
- String queryType = (String) subject.getElementProperty(DE.P_TYPE);
- boolean caseSensitive = !_isWindows;
- // TODO: test on WINDOWS!
-
- if (IUniversalDataStoreConstants.C_QUERY_VIEW_ALL.equals(name)) {
- 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 (IUniversalDataStoreConstants.C_QUERY_VIEW_FILES.equals(name)) {
- 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 (IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS.equals(name)) {
- 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 (IUniversalDataStoreConstants.C_QUERY_ROOTS.equals(name)) {
- return handleQueryRoots(subject, status);
- } else if (IUniversalDataStoreConstants.C_SEARCH.equals(name)) {
- return handleSearch(theElement, status, queryType,
- caseSensitive);
- } else if (IUniversalDataStoreConstants.C_CANCEL.equals(name)) {
- subject.getName();
- return handleCancel(subject, status);
- } else if (IUniversalDataStoreConstants.C_RENAME.equals(name)) {
- return handleRename(subject, status);
- } else if (IUniversalDataStoreConstants.C_DELETE.equals(name)) {
- return handleDelete(subject, status, true);
- } else if (IUniversalDataStoreConstants.C_DELETE_BATCH.equals(name)) {
- return handleDeleteBatch(theElement, status);
- } else if (IUniversalDataStoreConstants.C_COPY.equals(name)) {
- return handleCopy(subject, getCommandArgument(theElement, 1),
- getCommandArgument(theElement, 2), status);
- } else if (IUniversalDataStoreConstants.C_COPY_BATCH.equals(name)) {
- return handleCopyBatch(subject, theElement, status);
- } else if (IUniversalDataStoreConstants.C_CREATE_FILE.equals(name)) {
- return handleCreateFile(subject, status, queryType);
- } else if (IUniversalDataStoreConstants.C_CREATE_FOLDER.equals(name)) {
- return handleCreateFolder(subject, status, queryType);
- } else if (IUniversalDataStoreConstants.C_SET_READONLY.equals(name)) {
- return handleSetReadOnly(subject, status);
- } else if (IUniversalDataStoreConstants.C_SET_LASTMODIFIED.equals(name)) {
- return handleSetLastModified(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_BASIC_PROPERTY.equals(name)) {
- return handleQueryBasicProperty(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_CAN_WRITE_PROPERTY.equals(name)) {
- return handleQuerycanWriteProperty(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_ADVANCE_PROPERTY.equals(name)) {
- return handleQueryAdvanceProperty(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_EXISTS.equals(name)) {
- return handleQueryExists(subject, status, queryType);
- } else if (IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT.equals(name)) {
- return handleQueryGetRemoteObject(subject, status, queryType);
- } else if (IUniversalDataStoreConstants.C_GET_OSTYPE.equals(name)) {
- return handleGetOSType(subject, status);
- } else if (IUniversalDataStoreConstants.C_DOWNLOAD_FILE.equals(name)) {
- return handleDownload(theElement, status);
- } else if (IUniversalDataStoreConstants.C_SYSTEM_ENCODING.equals(name)) {
- return handleQueryEncoding(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_UNUSED_PORT.equals(name)) {
- return handleQueryUnusedPort(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_CLASSNAME.equals(name)) {
- return handleQueryClassName(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_QUALIFIED_CLASSNAME.equals(name)) {
- return handleQueryQualifiedClassName(subject, status);
- } else if (IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS.equals(name)) {
- return handleQueryFilePermissions(subject, status);
- } else if (IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS.equals(name)) {
- DataElement newPermissions = getCommandArgument(theElement, 1);
- return handleSetFilePermissions(subject, newPermissions, status);
- } else {
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query to handlecommand", null, _dataStore); //$NON-NLS-1$
- }
- //return statusDone(status);
- return status; // can't assume operation is done since it could be done via a thread
- }
-
- private DataElement handleCopyBatch(DataElement targetFolder, DataElement theElement, DataElement status)
- {
-
- CopyBatchThread copyBatchThread = new CopyBatchThread(targetFolder, theElement, this, _isWindows, status);
- copyBatchThread.start();
-
- updateCancellableThreads(status.getParent(), copyBatchThread);
-
- return status;
- }
-
-
-
-
-
- /**
- * Method to do a search.
- */
- public DataElement handleSearch(DataElement theElement, DataElement status,
- String queryType, boolean systemFileNamesCaseSensitive) {
- 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(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.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, _dataStore); //$NON-NLS-1$
- return statusDone(status);
- }
- //If the subject is a virtual folder, we could not just use check file.exists() to determine if we need
- //to continue process this request or not.
- boolean continueSearch = true;
- if (!queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR) && !fileobj.exists())
- {
- continueSearch = false;
- }
- if (continueSearch) {
- DataElement arg1 = getCommandArgument(theElement, 1);
- DataElement arg2 = getCommandArgument(theElement, 2);
- DataElement arg3 = getCommandArgument(theElement, 3);
- DataElement arg4 = getCommandArgument(theElement, 4);
-
- 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();
-
- boolean isFileNamesCaseSensitive = true;
- if (arg4 != null && arg4.getType().equals("file.name.case.sensitive")){ //$NON-NLS-1$
- isFileNamesCaseSensitive = Boolean.valueOf(arg4.getName()).booleanValue();
- }
-
- SystemSearchString searchString = new SystemSearchString(
- textString, isCaseSensitive, isTextRegex, fileNamesString, isFileNamesCaseSensitive,
- isFileNamesRegex, isIncludeArchives, isIncludeSubfolders, classification);
-
- UniversalSearchHandler searchThread = new UniversalSearchHandler(
- _dataStore, this, searchString, !_isWindows, fileobj,
- status);
-
- searchThread.start();
-
- updateCancellableThreads(status.getParent(), searchThread);
- //return status;
- }
-
- return status; // search is in the thread, so it's not done yet
- }
-
- 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)
- throws SystemMessageException
- {
- boolean isArchive = false;
- String fullName = subject.getValue();
-
- if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- //check if it is a archive file
- if (ArchiveHandlerManager.getInstance().isArchive(new File(fullName)))
- {
- isArchive = true;
- }
- else
- {
- isArchive = ArchiveHandlerManager.isVirtual(fullName);
- }
- }
- else if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- isArchive = true;
- }
- if (isArchive)
- {
- 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(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- fileobj = new File(subject.getName());
- else if (queryType.equals(IUniversalDataStoreConstants.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, _dataStore); //$NON-NLS-1$
- }
-
- if (fileobj != null)
- {
- if (!fileobj.exists())
- {
- subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
-
- if (subject.getNestedSize() > 0)
- {
- List children = subject.getNestedData();
- for (int i = children.size() - 1; i >= 0; i--)
- {
- _dataStore.deleteObject(subject, (DataElement)children.get(i));
- }
- }
- _dataStore.refresh(subject);
- }
- else
- {
- // query all files and folders for the filter
- internalQueryAll(subject, fileobj, queryType, filter,
- caseSensitive, IClientServerConstants.INCLUDE_ALL, status);
- return status; // query done in a thread so don't mark done
- }
- }
-
- return statusDone(status);
- }
-
- protected void internalQueryAll(DataElement subject, File fileobj,
- String queryType, String filter, boolean caseSensitive,
- int inclusion, DataElement status) {
-
- // do query on a thread
- FileQueryThread queryThread = new FileQueryThread(subject, fileobj, queryType, filter, caseSensitive, inclusion, showHidden, _isWindows, status);
- queryThread.start();
-
- updateCancellableThreads(status.getParent(), queryThread);
- }
-
- private void updateCancellableThreads(DataElement command, ICancellableHandler thread)
- {
- //First Check to make sure that there are no "zombie" threads
- Iterator iter = _cancellableThreads.keySet().iterator();
- try
- {
- while (iter.hasNext())
- {
- DataElement threadElement = (DataElement) iter.next();
- ICancellableHandler theThread = (ICancellableHandler) _cancellableThreads.get(threadElement);
- if ((theThread == null) ||
- theThread.isDone() || theThread.isCancelled())
- {
- _cancellableThreads.remove(threadElement);
- }
- }
- }
- catch (Exception e)
- {
- _dataStore.trace(e);
- }
- // save find thread in hashmap for retrieval during cancel
- _cancellableThreads.put(command, thread);
- }
-
-
- /**
- * Method to list the files for a given filter.
- */
- public DataElement handleQueryFiles(DataElement subject, DataElement attributes,
- DataElement status, String queryType, boolean caseSensitive)
- throws SystemMessageException {
-
- 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(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- fileobj = new File(subject.getName());
- else if (queryType.equals(IUniversalDataStoreConstants.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, _dataStore); //$NON-NLS-1$
-
-
- if (!fileobj.exists())
- {
- subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
- if (subject.getNestedSize() > 0)
- {
- List children = subject.getNestedData();
- for (int i = children.size() - 1; i >= 0; i--)
- {
- _dataStore.deleteObject(subject, (DataElement)children.get(i));
- }
- }
- }
- else
- {
- internalQueryAll(subject, fileobj, queryType, filter, caseSensitive, IClientServerConstants.INCLUDE_FILES_ONLY, status);
- return status; // query done in a thread so not marking done here
- }
- 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)
- throws SystemMessageException {
- if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.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(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- fileobj = new File(subject.getName());
- else if (queryType.equals(IUniversalDataStoreConstants.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, _dataStore); //$NON-NLS-1$
-
- if (!fileobj.exists())
- {
- subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
- if (subject.getNestedSize() > 0)
- {
- List children = subject.getNestedData();
- for (int i = children.size() - 1; i >= 0; i--)
- {
- _dataStore.deleteObject(subject, (DataElement)children.get(i));
- }
- }
- }
- else
- {
- internalQueryAll(subject, fileobj, queryType, filter, caseSensitive, IClientServerConstants.INCLUDE_FOLDERS_ONLY, status);
- return status; // query done in a thread so not marking done here
- }
-
- return statusDone(status);
- }
-
- /**
- * Method to list the roots.
- */
- public DataElement handleQueryRoots(DataElement subject, DataElement status) throws SystemMessageException {
-// 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,
- IUniversalDataStoreConstants.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,
- IUniversalDataStoreConstants.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) {
- DeleteThread deleteThread = new DeleteThread(subject, this, _dataStore, false, status);
- deleteThread.start();
-
- updateCancellableThreads(status.getParent(), deleteThread);
-
- return status;
- }
-
- private DataElement handleDeleteBatch(DataElement theElement, DataElement status)
- {
- DeleteThread deleteThread = new DeleteThread(theElement, this, _dataStore, true, status);
- deleteThread.start();
-
- updateCancellableThreads(status.getParent(), deleteThread);
-
- return status;
- }
-
- /**
- * Method to Rename a file or folder.
- */
- public DataElement handleRename(DataElement subject, DataElement status) {
-
- RenameThread renameThread = new RenameThread(subject, this, _dataStore, status);
- renameThread.start();
-
- updateCancellableThreads(status.getParent(), renameThread);
-
- return status;
- }
-
- /**
- * Method to create a new file.
- */
- public DataElement handleCreateFile(DataElement subject,
- DataElement status, String queryType) {
-
- CreateFileThread createFileThread = new CreateFileThread(subject, queryType, this, _dataStore, status);
- createFileThread.start();
-
- updateCancellableThreads(status.getParent(), createFileThread);
-
- return status;
- }
-
- /**
- * Method to create a new folder.
- */
- public DataElement handleCreateFolder(DataElement subject,
- DataElement status, String queryType) {
- CreateFolderThread createFolderThread = new CreateFolderThread(subject, queryType, this, _dataStore, status);
- createFolderThread.start();
-
- updateCancellableThreads(status.getParent(), createFolderThread);
-
- return 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), subject.getAttribute(DE.A_NAME));
-
- if (!filename.exists())
- {
- filename = new File(subject.getAttribute(DE.A_VALUE));
- }
- if (!filename.exists())
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
- else {
- try {
- String str = subject.getAttribute(DE.A_SOURCE);
- boolean readOnly = "true".equals(str); //$NON-NLS-1$
- boolean done = false;
- if (readOnly != filename.canWrite())
- {
- done = true;
- }
- else if (readOnly)
- {
- done = filename.setReadOnly();
- }
- else
- {
- // doesn't handle non-unix
- if (!_isWindows)
- {
- // make this read-write
- String[] cmd = new String[3];
- cmd[0] = "chmod"; //$NON-NLS-1$
- cmd[1] = "u+w"; //$NON-NLS-1$
- cmd[2] = filename.getAbsolutePath();
- Process p = Runtime.getRuntime().exec(cmd);
- int exitValue = p.waitFor();
- done = (exitValue == 0);
- }
- else
- {
- // windows version
- String[] cmd = new String[3];
- cmd[0] = "attrib"; //$NON-NLS-1$
- cmd[1] = "-R"; //$NON-NLS-1$
- cmd[2] = filename.getAbsolutePath();
- Process p = Runtime.getRuntime().exec(cmd);
- int exitValue = p.waitFor();
- done = (exitValue == 0);
- }
- }
- if (done)
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- }
- else
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
-
- // update filename?
- filename = new File(filename.getAbsolutePath());
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- _dataStore.refresh(subject);
-
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleSetreadOnly", e, _dataStore); //$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), subject.getAttribute(DE.A_NAME));
-
- if (!filename.exists())
- {
- filename = new File(subject.getAttribute(DE.A_VALUE));
- }
- if (!filename.exists())
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
- else {
- try {
- String str = subject.getAttribute(DE.A_SOURCE);
-
- long date = Long.parseLong(str);
- boolean done = filename.setLastModified(date);
-
- if (done) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- }
- else
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
-
- filename = new File(filename.getAbsolutePath());
- subject.setAttribute(DE.A_SOURCE, setProperties(filename));
- _dataStore.refresh(subject);
-
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleSetLastModified", e, _dataStore); //$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) throws SystemMessageException {
- 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 = IServiceConstants.VERSION_1;
- StringBuffer buffer = new StringBuffer(50);
- boolean canWrite = fileObj.canWrite();
-
- buffer.append(version).append(IServiceConstants.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);
- }
-
- /**
- * Method to query existence of the file or folder.
- */
- protected DataElement handleQueryExists(DataElement subject,
- DataElement status, String queryType) throws SystemMessageException {
-
- File fileobj = null;
- if (queryType.equals(IUniversalDataStoreConstants.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(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- else if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR))
- fileobj = new File(subject.getAttribute(DE.A_VALUE));
- else if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || queryType.equals(IUniversalDataStoreConstants.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(), null);
- 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) throws SystemMessageException {
-
- File fileobj = null;
- boolean isVirtual = false;
- boolean isFilter = false;
- String fullName = subject.getValue();
- if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- isFilter = true;
- isVirtual = ArchiveHandlerManager.isVirtual(fullName);
- String filterValue = subject.getValue();
- // . translates to home dir
- if (filterValue.equals(".")) //$NON-NLS-1$
- {
- if (_dataStore.getClient() != null){
- filterValue = _dataStore.getClient().getProperty("user.home"); //$NON-NLS-1$
- }
- else {
- filterValue = System.getProperty("user.home"); //$NON-NLS-1$
- }
- try {
- // "." needs canonical file
- fileobj = new File(filterValue).getCanonicalFile();
- }
- catch (Exception e){
- fileobj = new File(filterValue);
- }
-
- subject.setAttribute(DE.A_VALUE, filterValue);
- }
- else if (!isVirtual){
- fileobj = new File(filterValue);
- }
- }
- else if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
- {
- String name = subject.getName();
- String path = subject.getValue();
- fileobj = new File(path, name);
- }
- else if (queryType.equals(IUniversalDataStoreConstants.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 if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- isVirtual = true;
- }
- else {
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleQueryGetRemoteObject", null, _dataStore); //$NON-NLS-1$
- return statusDone(status);
- }
-
- if (!isVirtual && fileobj != null && fileobj.exists()) {
-
- String oldProperties = subject.getAttribute(DE.A_SOURCE);
- boolean isSymlink = oldProperties != null && (oldProperties.indexOf("symbolic link") > 0);//$NON-NLS-1$
- fullName = fileobj.getAbsolutePath();
-
- /* should not need canonical path here. It causes bug 251729
- {
- // 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,IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- } else {
- subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR);
- }
- }
- else { // directory
- subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR);
- }
-
- String name = fullName
- .substring(
- fullName.lastIndexOf(File.separatorChar) + 1,
- fullName.length());
- int lastFileSeparatorIndex = fullName.lastIndexOf(File.separatorChar);
- String path = ""; //$NON-NLS-1$
- if (-1 != lastFileSeparatorIndex)
- {
- if (0 == lastFileSeparatorIndex)
- {
- //Need to handle the case like "/backup". Its parent is "/", not ""
- path = Character.toString(File.separatorChar);
- }
- else
- {
- path = fullName.substring(0, fullName.lastIndexOf(File.separatorChar));
- }
- }
- subject.setAttribute(DE.A_NAME, name);
- subject.setAttribute(DE.A_VALUE, path);
-
- String properties = setProperties(fileobj);
-
- // if this is a symbolic link or a file, reclassify
- if (fileobj.isFile() || isSymlink){ //$NON-NLS-1$
- // classify the file too
- FileClassifier classifier = new FileClassifier(subject);
- subject.setAttribute(DE.A_SOURCE, properties + "|" + classifier.classifyFile(fileobj)); //$NON-NLS-1$
- }
- else {
- subject.setAttribute(DE.A_SOURCE, properties + "|" + "directory"); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
-
- } else if (isVirtual) {
- try {
- String goodFullPath = ArchiveHandlerManager
- .cleanUpVirtualPath(fullName);
- String goodFullName = null;
- if (isFilter)
- {
- goodFullName = goodFullPath;
- }
- else
- {
- goodFullName = goodFullPath + "/" + subject.getName(); //$NON-NLS-1$
- }
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(goodFullName);
- VirtualChild child = _archiveHandlerManager
- .getVirtualObject(goodFullName);
- if (child.exists()) {
-
- if (child.isDirectory) {
- subject.setAttribute(DE.A_TYPE,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
- subject.setAttribute(DE.A_NAME, child.name);
-
- subject.setAttribute(DE.A_VALUE, avp
- .getContainingArchiveString()
- + ArchiveHandlerManager.VIRTUAL_SEPARATOR
- + child.path);
-
-
- } else {
- subject.setAttribute(DE.A_TYPE,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- String name = child.name;
- String path = avp.getContainingArchiveString();
-
- 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, IServiceConstants.SUCCESS);
- } else {
- UniversalServerUtilities.logWarning(CLASSNAME,
- "object does not exist", _dataStore); //$NON-NLS-1$
- subject.setAttribute(DE.A_SOURCE, setProperties(child));
- status
- .setAttribute(DE.A_SOURCE,
- IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- // change the file type
- subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
-
- if (!subject.getName().equals(subject.getValue())){
- // need to change this back into full path format
- subject.setAttribute(DE.A_NAME, fileobj.getAbsolutePath());
- subject.setAttribute(DE.A_VALUE, subject.getAttribute(DE.A_NAME));
- }
-
- status.setAttribute(DE.A_SOURCE, IServiceConstants.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(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)) {
- return child;
- }
- }
- }
-
- return null;
- }
-
-
-
- /**
- * Method to obtain the classification string of file or folder.
- */
- protected String getClassificationString(String s) {
-
- String[] str = s.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- if (tokens < 10)
- return null;
-
- return (str[10]);
- }
- /**
- * Method to obtain the filter string of file or folder.
- */
- protected String getFilterString(String s) {
-
- //StringTokenizer tokenizer = new StringTokenizer(s, IServiceConstants.TOKEN_SEPARATOR);
- String[] str = s.split("\\"+IServiceConstants.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, IServiceConstants.TOKEN_SEPARATOR);
- String[] str = s.split("\\"+IServiceConstants.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("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- /*
- StringTokenizer tokenizer = new StringTokenizer(s, IServiceConstants.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();
-
- updateCancellableThreads(status.getParent(), downloadThread);
- return 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, _dataStore); //$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, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.node"); //$NON-NLS-1$
-// deUFStemp = _dataStore.createObject(deUFSnode, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.temp");
- _dataStore.createObject(deUFSnode, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.temp"); //$NON-NLS-1$
-// deUFSfilters = _dataStore.createObject(deUFSnode, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.filters");
- _dataStore.createObject(deUFSnode, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.filters"); //$NON-NLS-1$
- deUFSuploadlog = _dataStore.createObject(deUFSnode, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.uploadlog"); //$NON-NLS-1$
-
- UniversalByteStreamHandler universalHandler = new UniversalByteStreamHandler(_dataStore, deUFSuploadlog);
-
- _dataStore.registerByteStreamHandler(universalHandler);
-
- _dataStore.refresh(_minerData);
- _dataStore.refresh(deUFSuploadlog);
-
-
- // for bug 244277
- // need backward compatibility with RSE 7.1.*
- // 1) create a miner element
- DataElement minerRoot = _dataStore.getMinerRoot();
- String oldName = "com.ibm.etools.systems.universal.miners.UniversalFileSystemMiner"; //$NON-NLS-1$
- DataElement oldMinerElement = _dataStore.createObject(minerRoot, DataStoreResources.model_miner, oldName, oldName);
- oldMinerElement.setAttribute(DE.A_VALUE, "UniveralFileSystemMiner"); //$NON-NLS-1$
- oldMinerElement.setAttribute(DE.A_SOURCE, "7.1.0"); //$NON-NLS-1$
-
- DataElement oldMinerData = _dataStore.createObject(oldMinerElement, DataStoreResources.model_data, DataStoreResources.model_Data, oldName);
-
- // 2) create a miner data
- DataElement oldDeUFSnode = _dataStore.createObject(oldMinerData, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.node"); //$NON-NLS-1$
-
- DataElement oldDeUFSuploadlog = _dataStore.createObject(oldDeUFSnode, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.uploadlog"); //$NON-NLS-1$
-
- class OldUniversalByteStreamHandler extends UniversalByteStreamHandler
- {
- public OldUniversalByteStreamHandler(DataStore dataStore, DataElement log){
- super(dataStore, log);
- }
- public String getId(){
- return "com.ibm.etools.systems.universal.miners.UniversalByteStreamHandler"; //$NON-NLS-1$
- }
- }
-
- OldUniversalByteStreamHandler olduniversalHandler = new OldUniversalByteStreamHandler(_dataStore, oldDeUFSuploadlog);
-
- _dataStore.registerByteStreamHandler(olduniversalHandler);
-
- _dataStore.refresh(minerRoot);
- _dataStore.refresh(oldMinerData);
-
- }
-
- 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, IUniversalDataStoreConstants.TYPE_QUALIFIED_CLASSNAME, className);
- } else {
- _dataStore.createObject(status, IUniversalDataStoreConstants.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);
-
- _dataStore.createObject(status, IUniversalDataStoreConstants.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, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR);
- createObjectDescriptor(schemaRoot, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR);
-
- DataElement tempnode = createObjectDescriptor(schemaRoot,
- IUniversalDataStoreConstants.UNIVERSAL_TEMP_DESCRIPTOR);
-
- // Define filesystem descriptors
- DataElement UniversalFilter = createObjectDescriptor(schemaRoot,
- IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- FileDescriptors._deUniversalFileObject = createObjectDescriptor(schemaRoot,
- IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR);
- FileDescriptors._deUniversalFolderObject = createObjectDescriptor(schemaRoot,
- IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR);
- FileDescriptors._deUniversalArchiveFileObject = createObjectDescriptor(
- schemaRoot, IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- FileDescriptors._deUniversalVirtualFileObject = createObjectDescriptor(
- schemaRoot, IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- FileDescriptors._deUniversalVirtualFolderObject = createObjectDescriptor(
- schemaRoot, IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
-
- _dataStore.refresh(schemaRoot);
-
- // the cancellable object descriptor
- DataElement cancellable = _dataStore.find(schemaRoot, DE.A_NAME, DataStoreResources.model_Cancellable, 1);
-
- // Define command descriptors
- DataElement queryAllFilterDescriptor = createCommandDescriptor(UniversalFilter, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_ALL); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryAllFilterDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- DataElement queryFilesFilterDescriptor = createCommandDescriptor(UniversalFilter, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_FILES); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryFilesFilterDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- DataElement queryFolderFilterDescriptor = createCommandDescriptor(UniversalFilter, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryFolderFilterDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- createCommandDescriptor(UniversalFilter, "Filter", IUniversalDataStoreConstants.C_QUERY_ROOTS); //$NON-NLS-1$
-
-
- DataElement queryAllDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_ALL); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryAllDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- DataElement queryFilesDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_FILES); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryFilesDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- DataElement queryFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
-
- DataElement queryAllArchiveDescriptor = createCommandDescriptor(FileDescriptors._deUniversalArchiveFileObject, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_ALL); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryAllArchiveDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- DataElement queryFilesArchiveDescriptor = createCommandDescriptor(FileDescriptors._deUniversalArchiveFileObject, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_FILES); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryFilesArchiveDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- DataElement queryFolderArchiveDescriptor = createCommandDescriptor(FileDescriptors._deUniversalArchiveFileObject, "Filter", IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS); //$NON-NLS-1$
- _dataStore.createReference(cancellable, queryFolderArchiveDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- createCommandDescriptor(UniversalFilter, "GetOSType", IUniversalDataStoreConstants.C_GET_OSTYPE); //$NON-NLS-1$
- createCommandDescriptor(UniversalFilter, "Exists", IUniversalDataStoreConstants.C_QUERY_EXISTS); //$NON-NLS-1$
- createCommandDescriptor(UniversalFilter, "GetRemoteObject", IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); //$NON-NLS-1$
- DataElement createNewFileFromFilterDescriptor = createCommandDescriptor(UniversalFilter, "CreateNewFile", IUniversalDataStoreConstants.C_CREATE_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, createNewFileFromFilterDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- DataElement createNewFolderFromFilterDescriptor = createCommandDescriptor(UniversalFilter, "CreateNewFolder", IUniversalDataStoreConstants.C_CREATE_FOLDER); //$NON-NLS-1$
- _dataStore.createReference(cancellable, createNewFolderFromFilterDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- createCommandDescriptor(UniversalFilter, "SetLastModified", IUniversalDataStoreConstants.C_SET_LASTMODIFIED); //$NON-NLS-1$
-
-
- _dataStore.createReference(FileDescriptors._deUniversalFileObject,
- FileDescriptors._deUniversalArchiveFileObject, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- _dataStore.createReference(FileDescriptors._deUniversalFolderObject,
- FileDescriptors._deUniversalArchiveFileObject, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- _dataStore.createReference(FileDescriptors._deUniversalFileObject,
- FileDescriptors._deUniversalVirtualFileObject, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- _dataStore.createReference(FileDescriptors._deUniversalFolderObject,
- FileDescriptors._deUniversalVirtualFolderObject, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
- // create the search descriptor and make it cancelable
- DataElement searchDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Search", IUniversalDataStoreConstants.C_SEARCH); //$NON-NLS-1$
- _dataStore.createReference(cancellable, searchDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
-
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "GetAdvanceProperty", IUniversalDataStoreConstants.C_QUERY_ADVANCE_PROPERTY); //$NON-NLS-1$
- createCommandDescriptor(tempnode, "Filter", IUniversalDataStoreConstants.C_CREATE_TEMP); //$NON-NLS-1$
- //create deleteDescriptor and make it cancelable
- DataElement deleteFileDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFileObject, "Delete", IUniversalDataStoreConstants.C_DELETE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, deleteFileDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create deleteBatchDescriptor and make it cancelable
- DataElement deleteBatchFileDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFileObject, "DeleteBatch", IUniversalDataStoreConstants.C_DELETE_BATCH); //$NON-NLS-1$
- _dataStore.createReference(cancellable, deleteBatchFileDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create createNewFileDescriptor and make it cancelable
- DataElement createNewFileDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFileObject, "CreateNewFile", IUniversalDataStoreConstants.C_CREATE_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, createNewFileDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create createNewFolderDescriptor and make it cancelable
- DataElement createNewFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFileObject, "CreateNewFolder", IUniversalDataStoreConstants.C_CREATE_FOLDER); //$NON-NLS-1$
- _dataStore.createReference(cancellable, createNewFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create renameDescriptor and make it cancelable
- DataElement renameFileDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFileObject, "Rename", IUniversalDataStoreConstants.C_RENAME); //$NON-NLS-1$
- _dataStore.createReference(cancellable, renameFileDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "SetReadOnly", IUniversalDataStoreConstants.C_SET_READONLY); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "SetLastModified", IUniversalDataStoreConstants.C_SET_LASTMODIFIED); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetAdvanceProperty", IUniversalDataStoreConstants.C_QUERY_ADVANCE_PROPERTY); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetBasicProperty", IUniversalDataStoreConstants.C_QUERY_BASIC_PROPERTY); //$NON-NLS-1$
-
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetcanWriteProperty", IUniversalDataStoreConstants.C_QUERY_CAN_WRITE_PROPERTY); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "Exists", IUniversalDataStoreConstants.C_QUERY_EXISTS); //$NON-NLS-1$
-
- //create deleteDescriptor and make it cancelable
- DataElement deleteFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Delete", IUniversalDataStoreConstants.C_DELETE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, deleteFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create deleteBatchDescriptor and make it cancelable
- DataElement deleteBatchFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "DeleteBatch", IUniversalDataStoreConstants.C_DELETE_BATCH); //$NON-NLS-1$
- _dataStore.createReference(cancellable, deleteBatchFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create renameDescriptor and make it cancelable
- DataElement renameFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Rename", IUniversalDataStoreConstants.C_RENAME); //$NON-NLS-1$
- _dataStore.createReference(cancellable, renameFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create copyDescriptor and make it cancelable
- DataElement copyFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Copy", IUniversalDataStoreConstants.C_COPY); //$NON-NLS-1$
- _dataStore.createReference(cancellable, copyFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create copyFolderBatchDescriptor and make it cancelable
- DataElement copyBatchFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "CopyBatch", IUniversalDataStoreConstants.C_COPY_BATCH); //$NON-NLS-1$
- _dataStore.createReference(cancellable, copyBatchFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "SetReadOnly", IUniversalDataStoreConstants.C_SET_READONLY); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "SetLastModified", IUniversalDataStoreConstants.C_SET_LASTMODIFIED); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "GetBasicProperty", IUniversalDataStoreConstants.C_QUERY_BASIC_PROPERTY); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "GetcanWriteProperty", IUniversalDataStoreConstants.C_QUERY_CAN_WRITE_PROPERTY); //$NON-NLS-1$
-
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "Exists", IUniversalDataStoreConstants.C_QUERY_EXISTS); //$NON-NLS-1$
- //create createFolderDescriptor and make it cancelable
- DataElement createNewFileInFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "CreateNewFile", IUniversalDataStoreConstants.C_CREATE_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, createNewFileInFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- //create createFolderDescriptor and make it cancelable
- DataElement createNewFolderInFolderDescriptor = createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "CreateNewFolder", IUniversalDataStoreConstants.C_CREATE_FOLDER); //$NON-NLS-1$
- _dataStore.createReference(cancellable, createNewFolderInFolderDescriptor, DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "GetOSType", IUniversalDataStoreConstants.C_GET_OSTYPE); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetOSType", IUniversalDataStoreConstants.C_GET_OSTYPE); //$NON-NLS-1$
- //make sure C_QUERY_GET_REMOTE_OBJECT command also available for file and folder objects
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "GetRemoteObject", IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetRemoteObject", IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalArchiveFileObject, "GetRemoteObject", IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalVirtualFileObject, "GetRemoteObject", IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalVirtualFolderObject, "GetRemoteObject", IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT); //$NON-NLS-1$
-
- // create a download command descriptor and make it cancelable
- DataElement downloadDescriptor = createCommandDescriptor(
- FileDescriptors._deUniversalFileObject, "DownloadFile", IUniversalDataStoreConstants.C_DOWNLOAD_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, downloadDescriptor,
- DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
-
- DataElement adownloadDescriptor = createCommandDescriptor(
- FileDescriptors._deUniversalArchiveFileObject, "DownloadFile", IUniversalDataStoreConstants.C_DOWNLOAD_FILE); //$NON-NLS-1$
- _dataStore.createReference(cancellable, adownloadDescriptor,
- DataStoreResources.model_abstracts, DataStoreResources.model_abstracted_by);
-
-
- createCommandDescriptor(tempnode, "SystemEncoding", IUniversalDataStoreConstants.C_SYSTEM_ENCODING); //$NON-NLS-1$
-
- createCommandDescriptor(tempnode, "UnusedPort", IUniversalDataStoreConstants.C_QUERY_UNUSED_PORT); //$NON-NLS-1$
-
- // command descriptor to retrieve package name for a class file
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetQualifiedClassName", IUniversalDataStoreConstants.C_QUERY_CLASSNAME); //$NON-NLS-1$
-
- // command descriptor to retrieve qualified class name for class file
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetFullClassName", //$NON-NLS-1$
- IUniversalDataStoreConstants.C_QUERY_QUALIFIED_CLASSNAME);
-
-
- // permissions and ownership not supported on windows
- if (!_isWindows) {
- // descriptors for permissions
- createCommandDescriptor(UniversalFilter, "GetPermissions", IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "GetPermissions", IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "GetPermissions", IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalArchiveFileObject, "GetPermissions",IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS); //$NON-NLS-1$
-
- createCommandDescriptor(UniversalFilter, "SetPermissions", IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFolderObject, "SetPermissions", IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalFileObject, "SetPermissions", IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS); //$NON-NLS-1$
- createCommandDescriptor(FileDescriptors._deUniversalArchiveFileObject, "SetPermissions",IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS); //$NON-NLS-1$
- }
- }
-
-
- /**
- * @since 3.0 made private method public
- */
- public 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 handleQueryAllArchive(DataElement subject, DataElement attributes,
- DataElement status, boolean caseSensitive, boolean foldersOnly)
- {
- // do query on a thread
- ArchiveQueryThread queryThread = new ArchiveQueryThread(subject, attributes, caseSensitive, foldersOnly, showHidden, _isWindows, status);
- queryThread.start();
-
- updateCancellableThreads(status.getParent(), queryThread);
- return status; // query is in thread so not updating status here
- }
-
-
-
- public ISystemArchiveHandler getArchiveHandlerFor(String archivePath) throws SystemMessageException {
- File file = new File(archivePath);
- return _archiveHandlerManager.getRegisteredHandler(file);
- }
-
-
- public DataElement handleCopy(DataElement targetFolder, DataElement sourceFile, DataElement nameObj, DataElement status) {
-
- CopySingleThread copySingleThread = new CopySingleThread(targetFolder, sourceFile, nameObj, this, _isWindows, status);
- copySingleThread.start();
-
- updateCancellableThreads(status.getParent(), copySingleThread);
-
- return status;
- }
-
- /**
- * Method to obtain the properties of file or folder.
- */
- public String setProperties(File fileObj, boolean doArchiveProperties) throws SystemMessageException {
- String version = IServiceConstants.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(IServiceConstants.TOKEN_SEPARATOR).append(date).append(
- IServiceConstants.TOKEN_SEPARATOR).append(size).append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(hidden).append(IServiceConstants.TOKEN_SEPARATOR).append(canWrite).append(
- IServiceConstants.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(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(comment).append(IServiceConstants.TOKEN_SEPARATOR).append(compressedSize)
- .append(IServiceConstants.TOKEN_SEPARATOR).append(compressionMethod).append(
- IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(IServiceConstants.TOKEN_SEPARATOR).append(
- expandedSize);
-
-
- String buf = buffer.toString();
- return buf;
- }
-
- public String setProperties(VirtualChild fileObj) {
- String version = IServiceConstants.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(IServiceConstants.TOKEN_SEPARATOR).append(date).append(
- IServiceConstants.TOKEN_SEPARATOR).append(size).append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(hidden).append(IServiceConstants.TOKEN_SEPARATOR).append(canWrite).append(
- IServiceConstants.TOKEN_SEPARATOR).append(canRead);
-
- buffer.append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(comment).append(IServiceConstants.TOKEN_SEPARATOR).append(compressedSize)
- .append(IServiceConstants.TOKEN_SEPARATOR).append(compressionMethod).append(
- IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(IServiceConstants.TOKEN_SEPARATOR).append(
- expandedSize);
-
- return buffer.toString();
- }
-
- public String setProperties(File fileObj) throws SystemMessageException {
- return setProperties(fileObj, false);
- }
-
-
- public String getVersion()
- {
- return "7.0.0"; //$NON-NLS-1$
- }
-
- private File getFileFor(DataElement subject)
- {
- File fileobj = null;
- boolean isVirtual = false;
- String fullName = subject.getValue();
- String queryType = subject.getType();
- if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- isVirtual = ArchiveHandlerManager.isVirtual(fullName);
- String filterValue = subject.getValue();
- // . translates to home dir
- if (filterValue.equals(".")) //$NON-NLS-1$
- {
- if (_dataStore.getClient() != null){
- filterValue = _dataStore.getClient().getProperty("user.home"); //$NON-NLS-1$
- }
- else {
- filterValue = System.getProperty("user.home"); //$NON-NLS-1$
- }
- subject.setAttribute(DE.A_VALUE, filterValue);
- }
- if (!isVirtual)
- fileobj = new File(filterValue);
- }
- else if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
- {
- String name = subject.getName();
- String path = subject.getValue();
- fileobj = new File(path, name);
- }
- else if (queryType.equals(IUniversalDataStoreConstants.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 if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- String name = subject.getName();
- String path = subject.getValue();
- if (name.length() == 0)
- {
- fileobj = new File(path);
- }
- else
- {
- fileobj = new File(path, name);
- }
- }
- else if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- isVirtual = true;
- }
- return fileobj;
- }
-
-
- /**
- * Convert permissions in rwxrwxrwx form to octal
- * @param userPermissions
- * @return
- */
- private String alphaPermissionsToOctal(String alphaPermissions)
- {
- StringBuffer buf = new StringBuffer();
- // permissions
- char[] chars = alphaPermissions.toCharArray();
-
- int offset = -1;
- for (int i = 0; i < 3; i++){
- int value = 0;
-
- if (chars[++offset] == 'r'){
- value = 4;
- }
- if (chars[++offset] == 'w'){
- value += 2;
- }
- if (chars[++offset] == 'x'){
- value += 1;
- }
- buf.append(value);
- }
-
- return buf.toString();
- }
-
-
- /**
- * Gets file permissions in the form <octal permissions>|<user>|<group>
- * @param subject
- * @param status
- * @return
- */
- private DataElement handleQueryFilePermissions(DataElement subject, DataElement status)
- {
- File file = getFileFor(subject);
- if (file == null){
- // subject may have been a filter pointing to a virtual
- return statusCancelled(status);
- }
-
-
- String result = getFilePermission(file, PERMISSION_ALL);
- status.setAttribute(DE.A_SOURCE, result);
-
-
- // for z/os, also need to update the classification if this is a symbolic link
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
- boolean isZ = theOS.toLowerCase().startsWith("z");//$NON-NLS-1$
- if (isZ){
- String path = file.getAbsolutePath();
- try {
- String canonical = file.getCanonicalPath();
- if (!path.equals(canonical)){
- // reset the properties
- String properties = setProperties(file, false);
-
- // fileType
- String fileType = file.isFile() ? "file" : "directory"; //$NON-NLS-1$//$NON-NLS-2$
-
- // classification
- StringBuffer type = new StringBuffer(FileClassifier.STR_SYMBOLIC_LINK);
- type.append('(');
- type.append(fileType);
- type.append(')');
- type.append(':');
- type.append(canonical);
-
- StringBuffer classifiedProperties = new StringBuffer(properties);
- classifiedProperties.append('|');
- classifiedProperties.append(type);
-
- subject.setAttribute(DE.A_SOURCE, classifiedProperties.toString());
- _dataStore.refresh(subject);
- }
- }
- catch (SystemMessageException e)
- {
- }
- catch (IOException e)
- {
- }
- }
-
- statusDone(status);
- return status;
- }
-
- private String getFilePermission(File file, int permission)
- {
- // permissions in form "drwxrwxrwx ..."
- String ldStr = simpleShellCommand("ls -ld", file); //$NON-NLS-1$
-
- StringTokenizer tokenizer = new StringTokenizer(ldStr, " \t"); //$NON-NLS-1$
-
- // permissions in form "rwxrwxrwx"
- String permString = tokenizer.nextToken().substring(1);
- String octalPermissions = alphaPermissionsToOctal(permString);
-
- // user and group
- tokenizer.nextToken(); // nothing important
- String user = tokenizer.nextToken(); // 3rd
- String group = tokenizer.nextToken(); // 4th
-
- String result = null;
- switch (permission){
- case PERMISSION_BITS:
- result = octalPermissions;
- break;
-
- case PERMISSION_OWNER:
- result = user;
- break;
-
- case PERMISSION_GROUP:
- result = group;
- break;
-
- case PERMISSION_ALL:
- default:
- result = octalPermissions + '|' + user + '|' + group;
- break;
- }
-
- return result;
- }
-
-
-
-
-
- /**
- * Set file permissions including user and group
- * @param subject
- * @param newPermissions permissions in the form <octal permissions>|<user>|<group>
- * @param status
- * @return
- */
- private DataElement handleSetFilePermissions(DataElement subject, DataElement newPermissions, DataElement status)
- {
- File file = getFileFor(subject);
-
- String permissionsStr = newPermissions.getName();
- String[] permAttributes = permissionsStr.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
-
- // set the permissions
- String result = simpleShellCommand("chmod " + permAttributes[0], file); //$NON-NLS-1$
-
- String previousGroup = getFilePermission(file, PERMISSION_GROUP);
- String previousUser = getFilePermission(file, PERMISSION_OWNER);
- if (!previousUser.equals(permAttributes[1]) || !previousGroup.equals(permAttributes[2])){
- // set the user and group at once
- simpleShellCommand("chown " + permAttributes[1] + ":" + permAttributes[2], file); //$NON-NLS-1$
- }
-
-
-
- status.setAttribute(DE.A_SOURCE, result);
- statusDone(status);
-
- return status;
- }
-
- /* - not used right now so commenting out
- private String simpleShellCommand(String cmd)
- {
- String result = null;
- String args[] = new String[3];
- args[0] = "sh"; //$NON-NLS-1$
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = cmd;
-
- BufferedReader childReader = null;
- try {
- Process childProcess = Runtime.getRuntime().exec(args);
-
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream()));
-
- result = childReader.readLine().trim();
- childReader.close();
- }
- catch (Exception e){
- try {
- childReader.close();
- }
- catch (IOException ex){}
- }
- return result;
-
- }
-
- */
-
- private String simpleShellCommand(String cmd, File file)
- {
- String result = null;
- String args[] = new String[3];
- args[0] = "sh"; //$NON-NLS-1$
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = cmd + " " + PathUtility.enQuoteUnix(file.getAbsolutePath()); //$NON-NLS-1$
-
- BufferedReader childReader = null;
- try {
- Process childProcess = Runtime.getRuntime().exec(args);
-
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream()));
-
- result = childReader.readLine().trim();
- childReader.close();
- }
- catch (Exception e){
- try {
- childReader.close();
- }
- catch (IOException ex){}
- }
- return result;
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalProcessMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalProcessMiner.java
deleted file mode 100644
index 87996b5f2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalProcessMiner.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
- *******************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-
-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;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.internal.dstore.universal.miners.processes.ProcessDEComparator;
-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
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class UniversalProcessMiner extends Miner
-{
- 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(IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_MINER, "Subject for UniversalProcessMiner command " + name + " is null", null, _dataStore); //$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(IUniversalProcessDataStoreConstants.C_PROCESS_QUERY_USERNAME))
- {
- return handleQueryUserName(subject, status);
- }
-
- if (subjectType.equals(IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_FILTER))
- {
- if (name.equals(IUniversalProcessDataStoreConstants.C_PROCESS_FILTER_QUERY_ALL))
- {
- status = handleQuery(subject, status);
- }
- else
- {
- UniversalServerUtilities.logError(IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_MINER,
- "Unknown filter command: " + name, null, _dataStore); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
- }
- else if (subjectType.equals(IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_DESCRIPTOR))
- {
- if (name.equals(IUniversalProcessDataStoreConstants.C_PROCESS_QUERY_ALL_PROPERTIES))
- {
- handleQueryJobAllProperties(subject, status);
- }
- else if (name.equals(IUniversalProcessDataStoreConstants.C_PROCESS_KILL))
- {
- status = handleKill(subject, status);
- }
- else
- {
- UniversalServerUtilities.logError(IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_MINER,
- "Unsupported process command: " + name, null, _dataStore); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
- }
- else
- {
- UniversalServerUtilities.logError(IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_MINER,
- "Unsupported subject for command: " + subject, null, _dataStore); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- }
-
- return status;
- }
-
- /**
- * Get the username
- */
- protected DataElement handleQueryUserName(DataElement subject, DataElement status) {
- if (_dataStore.getClient() != null){
- subject.setAttribute(DE.A_VALUE, _dataStore.getClient().getProperty("user.name")); //$NON-NLS-1$
- }
- else {
- subject.setAttribute(DE.A_VALUE, System.getProperty("user.name")); //$NON-NLS-1$
- }
-
- _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,
- IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_FILTER);
- deUniversalProcessObject = createObjectDescriptor(schemaRoot,
- IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_DESCRIPTOR);
- DataElement tempnode = createObjectDescriptor(schemaRoot, IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_TEMP);
-
- // define command descriptors
- createCommandDescriptor(deUniversalProcessFilter, "Filter", IUniversalProcessDataStoreConstants.C_PROCESS_FILTER_QUERY_ALL); //$NON-NLS-1$
- createCommandDescriptor(deUniversalProcessObject, "Kill", IUniversalProcessDataStoreConstants.C_PROCESS_KILL); //$NON-NLS-1$
- createCommandDescriptor(deUniversalProcessObject, "ProcessQueryAllProperties", IUniversalProcessDataStoreConstants.C_PROCESS_QUERY_ALL_PROPERTIES); //$NON-NLS-1$
- createCommandDescriptor(tempnode, "QueryUsername", IUniversalProcessDataStoreConstants.C_PROCESS_QUERY_USERNAME); //$NON-NLS-1$
-
- _dataStore.refresh(schemaRoot);
- }
-
- public void load()
- {
- deKillInfoNode = _dataStore.createObject(_minerData, IUniversalDataStoreConstants.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, _dataStore); //$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, ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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, _dataStore); //$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, ISystemProcessRemoteConstants.PROCESS_MINER_SUCCESS);
- return status;
- }
-
- public String getVersion()
- {
- return _minerVersion;
- }
-}
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 fb3a2fcf8..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
- * Noriaki Takatsu (IBM) - [239068] [multithread] "client.username" property must be set via dataStore Client
- ********************************************************************************/
-
-package org.eclipse.rse.dstore.universal.miners;
-
-import java.io.File;
-
-import org.eclipse.dstore.core.model.DataStore;
-
-/**
- * Utilities for dstore servers.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class UniversalServerUtilities {
-
-
- /**
- * getUserPreferencesDirectory() - returns directory on IFS where to store
- * user settings.
- *
- * The dataStore argument was added in version 3.0 in order to support
- * multiple clients in separate Threads each. Before that version, the
- * method did not have any argument.
- *
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static String getUserPreferencesDirectory(DataStore dataStore)
- {
- return dataStore.getUserPreferencesDirectory();
- }
-
-
- /**
- * logInfo
- *
- * @param minerName
- *
- * @param message Message text to be logged.
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static void logInfo(String minerName, String message, DataStore dataStore)
- {
- dataStore.getClient().getLogger().logInfo(minerName, message);
- }
-
- /**
- * logWarning
- *
- * @param minerName
- * @param message Message text to be logged.
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static void logWarning(String minerName, String message, DataStore dataStore)
- {
- dataStore.getClient().getLogger().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.
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static void logError(String minerName, String message, Throwable exception, DataStore dataStore)
- {
- dataStore.getClient().getLogger().logError(minerName, message, exception);
- }
-
- /**
- * logDebugMessage
- *
- * @param minerName
- * @param message Message text to be logged.
- * @since org.eclipse.rse.services.dstore 3.0
- */
- public static void logDebugMessage(String minerName, String message, DataStore dataStore)
- {
- dataStore.getClient().getLogger().logDebugMessage(minerName, message);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java
deleted file mode 100644
index 3c49a689c..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java
+++ /dev/null
@@ -1,1469 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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.
- * David McKnight (IBM) - [202822] updating cleanup
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) [224906] [dstore] changes for getting properties and doing exit due to single-process capability
- * David McKnight (IBM) [250203] [dstore][shells]%var% is substituted to null in Unix shell
- * David McKnight (IBM) [249715] [dstore][shells] Unix shell does not echo command
- * David McKnight (IBM) [153275] [dstore-shells] Ctrl+C does not break remote program
- * David McKnight (IBM) [284179] [dstore] commands have a hard coded line length limit of 100 characters
- * David McKnight (IBM) - [286671] Dstore shell service interprets &lt; and &gt; sequences
- * David McKnight (IBM) [290743] [dstore][shells] allow bash shells and custom shell invocation
- * David McKnight (IBM) [287305] [dstore] Need to set proper uid for commands when using SecuredThread and single server for multiple clients[
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.MinerThread;
-import org.eclipse.dstore.core.model.Client;
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStoreAttributes;
-import org.eclipse.rse.dstore.universal.miners.CommandMiner;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.dstore.universal.miners.command.patterns.ParsedOutput;
-import org.eclipse.rse.internal.dstore.universal.miners.command.patterns.Patterns;
-
-
-
-/**
- * CommandMinerThread is used for running and handling io for shell commands
- * in a thread.
- */
-public class CommandMinerThread extends MinerThread
-{
- private DataElement _status;
- private String _invocation;
-
- private DataInputStream _stdInput;
- private DataInputStream _stdError;
-
-
- private BufferedWriter _stdOutput;
-
- private Patterns _patterns;
-
- private Process _theProcess;
-
- 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 _didInitialCWDQuery = false;
-
- private int _maxLineLength = 4096;
-
-
- 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)
- {
- super(theElement.getDataStore());
- _isShell = false;
- _isDone = false;
- _status = status;
- _descriptors = descriptors;
- boolean isBash = false;
-
- _subject = theElement;
-
- String maxLineLengthStr = System.getProperty("DSTORE_SHELL_MAX_LINE"); //$NON-NLS-1$
- if (maxLineLengthStr != null)
- {
- try {
- _maxLineLength = Integer.parseInt(maxLineLengthStr);
- }
- catch (NumberFormatException e)
- {}
- }
-
- String theOS = System.getProperty("os.name"); //$NON-NLS-1$
-
- _invocation = invocation.trim();
- _patterns = thePatterns;
- _patterns.refresh(_invocation);
-
-
- boolean isZ = theOS.toLowerCase().startsWith("z");//$NON-NLS-1$
-
- if (isZ)
- {
- 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
- {
- String suCommand = null;
- String userHome = null;
- Client client = _dataStore.getClient();
-
- if (client != null){
- String clientActualUserId = client.getProperty("user.name");//$NON-NLS-1$
- String clientUserId = client.getUserid();
-
- userHome = client.getProperty("user.home");//$NON-NLS-1$
- if (clientUserId != null && !clientActualUserId.equals(clientUserId)){
- suCommand = "su " + clientUserId + " -c "; //$NON-NLS-1$
- }
- }
- else {
- userHome = System.getProperty("user.home");//$NON-NLS-1$
- }
-
- _cwdStr = theElement.getSource();
- if (_cwdStr == null || _cwdStr.length() == 0)
- {
- _cwdStr = userHome;
- }
-
- File theDirectory = new File(_cwdStr);
- if (!theDirectory.isDirectory())
- theDirectory = theDirectory.getParentFile();
- try
- {
- _cwdStr = theDirectory.getAbsolutePath();
- }
- catch (Exception e)
- {
- _cwdStr = userHome;
- }
- _status.setAttribute(DE.A_SOURCE, _cwdStr);
-
-
- boolean didLogin = false;
-
- 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);
-
- String property = "SHELL="; //$NON-NLS-1$
-
- String[] env = getEnvironment(_subject);
- boolean isBashonZ = false;
- boolean isSHonZ = false;
-
- 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$
- {
- if (isZ)
- {
- isBashonZ = true;
- }
- else
- {
- isBash = true;
- }
- }
- else if (theShell.endsWith("sh") && isZ)//$NON-NLS-1$
- {
- isSHonZ = true;
- }
- }
- // In a single-process server, both user.home and HOME don't represent
- // each client home directory.
- if (_dataStore.getClient() != null)
- {
- if (var.startsWith("HOME")) //$NON-NLS-1$
- {
- env[i] = "HOME=" + _dataStore.getClient().getProperty("user.home"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- // check for custom shell invocation
- String customShellInvocation = System.getProperty("DSTORE_SHELL_INVOCATION"); //$NON-NLS-1$
- if (customShellInvocation != null && customShellInvocation.length() > 0){
- theShell = customShellInvocation;
- }
-
- if (theShell == null)
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = "sh"; //$NON-NLS-1$
-
- _isShell = true;
- if (isZ)
- isSHonZ = true;
- }
-
-
- if (_isTTY)
- {
- if (isSHonZ)
- {
- String args[] = new String[3];
- args[0] = PSEUDO_TERMINAL;
- args[1] = "sh"; //$NON-NLS-1$
- args[2] = "-L"; //$NON-NLS-1$
-
- try {
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- catch (Exception e) {
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- didLogin = true;
- }
- else
- {
- List argsList = new ArrayList();
-
- if (suCommand != null){
- String[] suSplit = suCommand.split(" "); //$NON-NLS-1$
- for (int i = 0; i < suSplit.length; i++){ // su before terminal
- argsList.add(suSplit[i]);
- }
- }
- argsList.add(PSEUDO_TERMINAL);
- argsList.add(invocation);
-
-
- String args[] = (String[])argsList.toArray(new String[argsList.size()]);
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- }
- else
- {
- //VRB: for Linux on System z we end up here
- if (suCommand!=null)
- _invocation = suCommand + _invocation;
-
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- }
- else
- {
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
-
-
- _isShell = true;
-
- if (_isTTY)
- {
- List argsList = new ArrayList();
-
- if (!isBashonZ && !isSHonZ && suCommand != null){
- // su before starting rseterm
- String[] suArgs = suCommand.split(" "); //$NON-NLS-1$
- for (int i = 0; i < suArgs.length; i++){
- argsList.add(suArgs[i]);
- }
- }
- argsList.add(PSEUDO_TERMINAL);
-
- if (!isBashonZ && !isSHonZ && suCommand != null){
- // need sh -c before invocation
- argsList.add("sh"); //$NON-NLS-1$
- argsList.add("-c"); //$NON-NLS-1$
- }
- else {
-
- argsList.add("-w"); //$NON-NLS-1$
- argsList.add(""+_maxLineLength); //$NON-NLS-1$
- }
-
- argsList.add(_invocation);
-
- if (isBashonZ){
- argsList.add("--login"); //$NON-NLS-1$
- didLogin = true;
- }
- else if (isBash){
- argsList.add("-l"); //$NON-NLS-1$
- didLogin = true;
- }
- else if (isSHonZ){
- argsList.add("-L"); //$NON-NLS-1$
- didLogin = true;
- }
-
- String args[] = (String[])argsList.toArray(new String[argsList.size()]);
-
- try {
- _theProcess = Runtime.getRuntime().exec(args, env, theDirectory);
- }
- catch (Exception e) {
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
-
- }
- else
- {
- if (!isBashonZ && !isSHonZ && suCommand != null){
- _invocation = suCommand + _invocation;
- }
-
- if (customShellInvocation != null && customShellInvocation.length() > 0){
- // all handled in the custom shell invocation
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- else {
- if (isBashonZ)
- {
- _theProcess = Runtime.getRuntime().exec(_invocation + " --login", env, theDirectory); //$NON-NLS-1$
- didLogin = true;
- }
- else if (isBash)
- {
- _theProcess = Runtime.getRuntime().exec(_invocation + " -l", env, theDirectory); //$NON-NLS-1$
- didLogin = true;
- }
- else if (isSHonZ)
- {
- _theProcess = Runtime.getRuntime().exec(_invocation + " -L", env, theDirectory); //$NON-NLS-1$
- didLogin = true;
- }
- else
- {
- _theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
- }
- }
- }
- }
- else
- {
- if (suCommand != null){
- theShell = suCommand + theShell;
- }
-
- List argsList = new ArrayList();
-
- String[] shellArray = theShell.split(" "); //$NON-NLS-1$
- for (int i = 0; i < shellArray.length; i++){
- argsList.add(shellArray[i]);
- }
- argsList.add("-c"); //$NON-NLS-1$
- argsList.add(_invocation);
-
- String args[] = (String[])argsList.toArray(new String[argsList.size()]);
- _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));
- }
-
- createObject("command", _invocation); //$NON-NLS-1$
- createObject("stdout", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- 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(100);
- _stdOutputHandler.setDataStore(_dataStore);
- _stdOutputHandler.start();
-
- _stdErrorHandler = new OutputHandler(_stdError, null, _isWindows || _isTTY, true, _isShell, this);
- _stdErrorHandler.setWaitTime(100);
- _stdOutputHandler.setDataStore(_dataStore);
- _stdErrorHandler.start();
-
- // initialization
- if (didLogin || _isTTY)
- {
- String initCmd = ""; //$NON-NLS-1$
- if (_isTTY){
- initCmd = "export PS1='$PWD>';" ; //$NON-NLS-1$
- }
- if (didLogin && !userHome.equals(_cwdStr)){
- initCmd += "cd " + _cwdStr; //$NON-NLS-1$
- }
-
- // need to CD to the correct directory
- final String finitCmd = initCmd;
- Thread cdThread = new Thread(
- new Runnable()
- {
- public void run()
- {
- // wait a second so the profile can complete startup
- try
- {
- sleep(1000);
- }
- catch (Exception e)
- {
-
- }
- sendInput(finitCmd);
- }
- });
- cdThread.start();
-
- }
- else if (_isShell && !_isWindows && !_isTTY)
- {
- createPrompt(_cwdStr +">", _cwdStr); //$NON-NLS-1$
- refreshStatus();
- }
-
- }
- catch (IOException e)
- {
- _theProcess = null;
- _dataStore.trace(e);
- createObject("command", e.getMessage()); //$NON-NLS-1$
- status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- return;
- }
-
- }
-
-
-// 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 String convertSpecialCharacters(String input){
- // needed to ensure xml characters aren't converted in xml layer
- String converted = input.replaceAll("&#38;", "&") //$NON-NLS-1$ //$NON-NLS-2$
- .replaceAll("&#59;", ";"); //$NON-NLS-1$//$NON-NLS-2$
- return converted;
- }
-
- public void sendInput(String input)
- {
- if (!_isDone)
- {
- String origInput = input;
- input = convertSpecialCharacters(input);
- input.getBytes();
-
- try
- {
- BufferedWriter writer = _stdOutput;
- // pty executable handles the break now
- if (input.equals("#break") && !_isTTY) //$NON-NLS-1$
- {
- // if no pty, then do it explicitly
- _theProcess.destroy();
-
- return;
- }
- else if (input.equals("#enter")) //$NON-NLS-1$
- {
- 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", origInput); //$NON-NLS-1$
- }
-
- writer.write(input);
- writer.newLine();
- writer.flush();
-
- if (!_isWindows && (input.startsWith("cd ") || input.equals("cd"))) //$NON-NLS-1$ //$NON-NLS-2$
- {
- if (!_isTTY)
- queryCWD();
- }
- else if (!_didInitialCWDQuery)
- {
- if (!_isTTY)
- queryCWD();
- }
- if (!_isWindows && !_isTTY)
- {
- // always prompt after the command
- writer.write("echo $PWD'>'"); //$NON-NLS-1$
- writer.newLine();
- writer.flush();
- }
- }
- catch (IOException e)
- {
- cleanupThread();
- }
- }
- }
- private String[] getEnvironment(DataElement theSubject)
- {
- //Grab the system environment:
- DataElement envMiner = _dataStore.findMinerInformation(IUniversalDataStoreConstants.UNIVERSAL_ENVIRONMENT_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$
-
- //if (_maxLineLength )
-
- varTable.put("COLUMNS","" + _maxLineLength); //$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 == '%' && _isWindows)
- {
- 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)
- {
- _dataStore.trace(e);
- }
- 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$
-
- // in case exit doesn't end it
- try
- {
- Thread.sleep(1000);
- }
- catch (Exception e)
- {
-
- }
- if (_stdOutputHandler.isAlive())
- {
- _theProcess.destroy();
- }
- }
- }
-
-
-
- public void cleanupThread()
- {
-
- _isDone = true;
- try
- {
-
-
-
- /*
- if (_isShell)
- {
- sendInput("#exit");
- }*/
-
- 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)
- {
- exitcode = -1;
- _theProcess.destroy();
- }
- _theProcess = null;
- }
-
-
- _stdOutputHandler.finish();
- _stdErrorHandler.finish();
- _stdInput.close();
- _stdError.close();
-
- _status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(_status);
-
- // disconnecting all
-
- _dataStore.disconnectObjects(_status);
-
-
- // clean up the associated environment
- List projectEnvReference = _subject.getAssociated("inhabits"); //$NON-NLS-1$
-
- if (projectEnvReference != null)
- {
- DataElement env = (DataElement)projectEnvReference.get(0);
- DataElement envParent = env.getParent();
- _dataStore.deleteObject(envParent, env);
- _dataStore.refresh(envParent);
- }
- _dataStore.disconnectObject(_subject); //bug 70420
- }
- catch (IOException e)
- {
- _dataStore.trace(e);
- }
- }
-
-
- public void interpretLine(String line, boolean stdError)
- {
- // Line wrapping here is due to the fix for an internal IBM bug:
- // https://cs.opensource.ibm.com/tracker/index.php?func=detail&aid=65874&group_id=1196&atid=1622
- //
- // Here is the description written by Song Wu:
- //
- // In the command shell, the message displayed might be too long to be displayed on one line. It's truncated currently.
- // Hover over doesn't help. The message needs to be wrapped.
- // --------------------------------------------------------
- //
- // The problem was resolved by forcing lines to be wrapped (in this case using 100 as the max line length):
- // int maxLine = 100;
- //
- // I think this was really just a workaround for the real problem - where the Windows table column imposes a
- // limit on the number of chars displayed.
- //
- // The problem with the forced line wrapping fix is that it introduces bug 284179. I think bug 284179 is a
- // worse problem and therefore I'm in favour of increasing the max line to 4096 as suggested by Chris Recoskie.
- //
- // A new property, DSTORE_SHELL_MAX_LINE allows for the customization of this value now. The default
- // is 4096.
- //
- int num = line.length();
- String[] lines = new String[num/_maxLineLength+1];
- if(lines.length>1)
- {
- int beg=0;
- int end=_maxLineLength;
- for(int i=0;i<lines.length;i++)
- {
- //try/catch put in for testing purposes
- //try
- //{
- if(end>line.length())
- {
- lines[i]=line.substring(beg);
- }
- else
- {
- lines[i]=line.substring(beg,end);
- }
- beg=end;
- end=end+_maxLineLength;
- //}
- //catch(Exception e)
- //{
- // createObject(_descriptors._stdout, "<<EXCEPTION>> line:= " + num + " beg : " + beg + " end = " + end);
- // return;
- //}
- }
- }
- else
- {
- lines[0]=line;
- }
-
- for(int i=0;i<lines.length;i++)
- {
- line=lines[i];
-
- // for prompting
- if (line.startsWith("<PWD")) //$NON-NLS-1$
- {
- // special processing
- String statement = line.substring(1);
- String pair[] = statement.split("="); //$NON-NLS-1$
- String value = pair[1];
- _status.setAttribute(DE.A_SOURCE, value);
-
- return;
- }
- if (line.indexOf("echo '<'PWD=$PWD") > 0) //$NON-NLS-1$
- {
- // ignore this line
- }
- else if (line.indexOf("PS1='$PWD>';") > 0){ //$NON-NLS-1$
- // ignore this line too
- }
- else
- {
- ParsedOutput parsedMsg = null;
-
- try
- {
- parsedMsg = _patterns.matchLine(removeWhitespace(line));
- }
- catch (Throwable e)
- {
- _dataStore.trace(e);
- }
- if (parsedMsg == null)
- {
- if (stdError)
- {
- createObject(_descriptors._stderr, line);
- }
- else
- {
- createObject(_descriptors._stdout, line);
- }
- }
- else
- {
- try
- {
- String fileName = parsedMsg.file;
- if (parsedMsg.type.equals("prompt")) //$NON-NLS-1$
- {
- int tildaIndex = fileName.indexOf("~"); //$NON-NLS-1$
- if (tildaIndex == 0)
- {
- String userHome = null;
-
- if (_dataStore.getClient() != null){
- userHome = _dataStore.getClient().getProperty("user.home"); //$NON-NLS-1$
- }
- else {
- userHome = System.getProperty("user.home"); //$NON-NLS-1$
- }
-
- fileName = userHome + fileName.substring(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$
- {
- createObject(parsedMsg.type, line, fileName, null);
- }
- else
- {
- createObject(parsedMsg.type, line, fileName, new Integer(parsedMsg.line));
- }
- }
- catch (NumberFormatException e)
- {
- _dataStore.trace(e);
- }
- }
- }
- }
-
- // moving this to do refresh after serious of lines interpretted
- //refreshStatus();
- }
-
- public void refreshStatus()
- {
- _dataStore.refresh(_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();
- _status.setAttribute(DE.A_SOURCE, fileName);
- }
- }
- }
-
- 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());
- }
-
- return obj;
- }
- else
- {
-
- return createObject(type, text);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java
deleted file mode 100644
index 069d0ab03..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/OutputHandler.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [243699] [dstore] Loop in OutputHandler
- * David McKnight (IBM) [249715] [dstore][shells] Unix shell does not echo command
- * David McKnight (IBM) - [282919] [dstore] server shutdown results in exception in shell io reading
- * David McKnight (IBM) - [286671] Dstore shell service interprets &lt; and &gt; sequences
- * David McKnight (IBM) [287305] [dstore] Need to set proper uid for commands when using SecuredThread and single server for multiple clients[
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.
- */
-/**
- * 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 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 = convertSpecialCharacters(lines[i]);
- _commandThread.interpretLine(line, _isStdError);
- }
-
- if (!_isTerminal){
- doPrompt();
- }
-
- _commandThread.refreshStatus();
- } else {
- finish();
- }
- }
-
- private String convertSpecialCharacters(String input){
- // needed to ensure xml characters aren't converted in xml layer
-
- StringBuffer output = new StringBuffer();
-
- for (int idx = 0; idx < input.length(); idx++)
- {
- char currChar = input.charAt(idx);
- switch (currChar)
- {
- case '&' :
- output.append("&#38;");
- break;
- case ';' :
- output.append("&#59;");
- break;
- default :
- output.append(currChar);
- break;
- }
- }
- return output.toString();
- }
-
- private void doPrompt() {
- try {
- if ((_reader.available() == 0) && !_isStdError && _isShell) {
- if (!_isTerminal) {
- try {
- Thread.sleep(200);
- if (_reader.available() == 0) {
- // create fake prompt
- String cwd = _commandThread.getCWD();
- _commandThread.createPrompt(cwd + '>', cwd);
- }
- } catch (Exception e) {
- }
- }
- }
- } catch (IOException e) {
- _commandThread._dataStore.trace(e);
- }
- }
-
-
- private int checkAvailable() {
- try
- {
- int available = _reader.available();
-
- // if there's none, wait a bit and return true to continue
- if (available <= 0) {
- sleep(100);
- available = _reader.available();
- }
- return available;
- }
- catch (Exception e)
- {
- }
- return 0;
- }
-
- private String[] readLines() {
- if (_endOfStream) {
- return null;
- }
- String[] output = null;
-
- try {
-
- // find out how many bytes are available to be read
- int available = checkAvailable();
-
- int lookahead = 0;
-
- // re-determine available if none available now
- if (available == 0) {
- try {
- lookahead = _reader.read();
- }
- catch (IOException e){
- // pipe closed
- return null;
- }
-
- 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
- if (fullOutput != null) {
- // 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();
- if (numTokens == 0){
- output = new String[1];
- output[0] = fullOutput;
- return output;
- }
-
- output = new String[numTokens];
- int index = 0;
- while (tokenizer.hasMoreTokens()) {
- output[index] = tokenizer.nextToken();
- index++;
- }
-
- String lastLine = output[index - 1];
-
-
- if (!_endOfStream && (!fullOutput.endsWith("\n") && !fullOutput.endsWith("\r"))) //$NON-NLS-1$ //$NON-NLS-2$
- {
- // our last line may be cut off
- byte[] lastBytes = new byte[MAX_OFFSET];
-
- int lastIndex = 0;
-
- available = _reader.available();
- if (available > 0)
- {
- while (!_endOfStream && lastIndex < MAX_OFFSET)
- {
- available = _reader.available();
- if (available == 0)
- {
- String suffix = new String(lastBytes, 0, lastIndex, encoding);
- output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 2);
- return output;
- }
- int c = _reader.read();
- if (c == -1)
- {
- _endOfStream = true;
- String suffix = new String(lastBytes, 0, lastIndex, encoding);
- output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 2);
- return output;
- }
- else
- {
- lastBytes[lastIndex] = (byte)c;
-
- // check for end of line
- String suffix = new String(lastBytes, 0, lastIndex + 1, encoding);
- int rBreak = suffix.indexOf("\r"); //$NON-NLS-1$
- int nBreak = suffix.indexOf("\n"); //$NON-NLS-1$
- if (nBreak != -1 || rBreak != -1)
- {
- // we've hit the end of line;
- output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 1);
- return output;
- }
-
- lastIndex++;
- }
-
- }
- }
-
- }
-
- return output;
- }
- } catch (Exception e) {
- _commandThread._dataStore.trace(e);
- }
- }
- } catch (Exception e) {
- _commandThread._dataStore.trace(e);
- }
- return output;
- }
-
- 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/internal/dstore/universal/miners/command/QueryPathThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/QueryPathThread.java
deleted file mode 100644
index 89d99567d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/QueryPathThread.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.server.SecuredThread;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-
-/**
- * QueryPathThread is used to determine available command completions
- */
-public class QueryPathThread extends SecuredThread
-{
-
- private DataElement _status;
-
- public QueryPathThread(DataElement status)
- {
- super(status.getDataStore());
- _status = status;
- }
-
- public void run()
- {
- super.run();
-
- getPossibleCommands(_status);
-
- }
-
- public List getPathEnvironment()
- {
- DataElement envMinerData = _dataStore.findMinerInformation(IUniversalDataStoreConstants.UNIVERSAL_ENVIRONMENT_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());
- }
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/CommandPattern.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/CommandPattern.java
deleted file mode 100644
index 9840e444c..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/CommandPattern.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/OutputPattern.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/OutputPattern.java
deleted file mode 100644
index f806c5097..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/OutputPattern.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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.internal.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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/ParsedOutput.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/ParsedOutput.java
deleted file mode 100644
index 52b550374..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/ParsedOutput.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/Patterns.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/Patterns.java
deleted file mode 100644
index 018089208..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/patterns/Patterns.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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());
- try
- {
- Pattern thePattern = Pattern.compile(patternString.trim());
-
- if (curCommand != null)
- curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
-
- 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
- {
- try
- {
- matchedOutput = curCommand.matchLine(theLine);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- if (matchedOutput != null)
- {
- return matchedOutput;
- }
- }
-
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java
deleted file mode 100644
index e073f4080..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ArchiveQueryThread.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * Kevin Doyle (IBM) - [191548] Deleting Read-Only directory removes it from view and displays no error
- * Xuan Chen (IBM) - [200417] [regression][dstore] Rename an expanded folder in an Archive displays no children
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- ********************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-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.core.model.DataStoreResources;
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-
-public class ArchiveQueryThread extends QueryThread {
-
- private boolean _foldersOnly;
-
-
- public ArchiveQueryThread(DataElement subject, DataElement attributes,
- boolean caseSensitive, boolean foldersOnly, boolean showHidden,
- boolean isWindows, DataElement status) {
- super(subject, status);
- _foldersOnly = foldersOnly;
- }
-
- public void run() {
- super.run();
-
- doQueryAll();
-
- if (!isCancelled()) {
-
- _isDone = true;
- // refresh data store
- _dataStore.refresh(_subject);
-
- // refresh status
- statusDone(_status);
-
- }
- }
-
- protected void doQueryAll() {
- {
- File fileobj = null;
- String queryType = _subject.getType();
- boolean isTypeFilter = queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- boolean isArchiveFile = false;
- String pathValue = _subject.getValue();
- String path = pathValue;
- if (isTypeFilter)
- {
- if (ArchiveHandlerManager.getInstance().isArchive(new File(pathValue.toString())))
- {
- isArchiveFile = true;
- }
- }
- else
- {
- if (queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- isArchiveFile = true;
- }
- }
-
- try {
- ArchiveHandlerManager mgr = ArchiveHandlerManager.getInstance();
-
- String rootPath = path;
- String virtualPath = ""; //$NON-NLS-1$
-
- VirtualChild[] children = null;
-
- if (isArchiveFile) {
- // it's an archive file (i.e. file.zip)
- if (!isTypeFilter)
- {
- char separatorChar = File.separatorChar;
- path = pathValue + separatorChar + _subject.getName();
- rootPath = path;
- }
- 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$
- }
- if (isCancelled())
- return;
-
- }
- else //This method could only be called because the subject is a filter (which can be interpreted as archive file or virtual folder,
- //a virtual file/folder object.
- {
- if (!isTypeFilter)
- {
- //if it is not a filter, then must be a virtual file or folder.
- char separatorChar = File.separatorChar;
- if (ArchiveHandlerManager.isVirtual(_subject
- .getAttribute(DE.A_VALUE))) {
- separatorChar = '/';
- }
-
- path = pathValue + separatorChar
- + _subject.getName();
- }
-
- // 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() && mgr.getVirtualObject(path).exists()) {
-
- if (_foldersOnly) {
- children = mgr.getFolderContents(fileobj,
- virtualPath);
- } else {
- children = mgr.getContents(fileobj, virtualPath);
- }
-
- _subject.setAttribute(DE.A_SOURCE, setProperties(mgr
- .getVirtualObject(path)));
- if (children == null || children.length == 0) {
- _dataStore
- .trace("problem with virtual:" + virtualPath); //$NON-NLS-1$
- }
- if (isCancelled())
- return;
- } else {
- // Update the properties so the file's exists() will return false
- _subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- _subject.setAttribute(DE.A_SOURCE, setProperties(fileobj));
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
-
- // Update all the children showing that they are deleted.
- if (_subject.getNestedSize() > 0)
- {
- List nestedChildren = _subject.getNestedData();
- for (int i = nestedChildren.size() - 1; i >= 0; i--)
- {
- _dataStore.deleteObject(_subject, (DataElement) nestedChildren.get(i));
- }
- }
- _dataStore.trace("problem with File:" + rootPath); //$NON-NLS-1$
- }
- }
- createDataElement(_dataStore, _subject, children,
- "*", rootPath, virtualPath); //$NON-NLS-1$
-
- if (!isCancelled())
- {
- _dataStore.refresh(_subject);
-
- FileClassifier clsfy = getFileClassifier(_subject);
- clsfy.start();
- }
- return;
- } catch (Exception e) {
- if (!(fileobj == null)) {
- try {
- (new FileReader(fileobj)).read();
- } catch (IOException ex) {
- _status.setAttribute(DE.A_VALUE,
- IClientServerConstants.FILEMSG_NO_PERMISSION);
- _status.setAttribute(DE.A_SOURCE,
- IServiceConstants.FAILED);
- _dataStore.refresh(_subject);
- statusDone(_status);
- }
- }
- _status.setAttribute(DE.A_VALUE,
- IClientServerConstants.FILEMSG_ARCHIVE_CORRUPTED);
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- statusDone(_status);
- }
- }
- }
-
- protected FileClassifier getFileClassifier(DataElement subject) {
- return new FileClassifier(subject);
- }
-
- /**
- * Complete status.
- */
- public DataElement statusDone(DataElement status) {
- status.setAttribute(DE.A_NAME, DataStoreResources.model_done);
- _dataStore.refresh(status);
- return status;
- }
-
- public void cancel() {
- _isCancelled = true;
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- /**
- * 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) {
-
- HashMap filteredChildren = new HashMap();
- List children = subject.getNestedData();
- if (children != null) {
- for (int f = 0; f < children.size(); f++) {
- if (isCancelled())
- return;
-
- DataElement child = (DataElement) children.get(f);
- String type = child.getType();
- if (type
- .equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || type
- .equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- if (StringCompare.compare(filter, child.getName(), false)) {
- filteredChildren.put(child.getName(), child);
- }
- } else {
- filteredChildren.put(child.getName(), child);
- }
- }
- }
-
- // Check if the current Objects in the DataStore are valid... exist
- // on the remote host
- try {
- if (list != null) {
- boolean found = false;
- for (int j = 0; j < list.length; ++j) {
- if (isCancelled())
- return;
-
- found = false;
- DataElement previousElement = (DataElement) filteredChildren
- .get(list[j].name);
- if (previousElement != null && !previousElement.isDeleted()) {
- // Type have to be equal as well
- String type = previousElement.getType();
- boolean isfile = !list[j].isDirectory;
- if (type
- .equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || (type
- .equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR) && !isfile)) {
- filteredChildren.remove(list[j].name);
- found = true;
- }
- }
- DataElement deObj = null;
- VirtualChild child = list[j];
-
- if (found) {
- deObj = previousElement;
- }
- if (deObj == null) {
- if (child.isDirectory) {
- deObj = _dataStore
- .createObject(
- subject,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR,
- child.name);
- } else // file
- {
- deObj = _dataStore
- .createObject(
- subject,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR,
- child.name);
- }
-
- }
- String oldValue = deObj.getAttribute(DE.A_VALUE);
- String newValue = rootPath
- + ArchiveHandlerManager.VIRTUAL_SEPARATOR + virtualPath;
- if (!oldValue.equals(newValue)) {
- deObj.setAttribute(DE.A_VALUE, newValue);
- }
- String oldSource = deObj.getAttribute(DE.A_SOURCE);
- String newSource = setProperties(child);
- if (!oldSource.startsWith(newSource)) {
- deObj.setAttribute(DE.A_SOURCE, newSource);
- }
-
- } // end for j
- }
- // Object left over in the filteredChildren is no longer in the
- // system any more. Need to remove.
- Iterator myIterator = filteredChildren.keySet().iterator();
- while (myIterator.hasNext()) {
- ds.deleteObject(subject, (DataElement) (filteredChildren
- .get(myIterator.next())));
- }
- } catch (Exception e) {
- e.printStackTrace();
- UniversalServerUtilities.logError(
- UniversalFileSystemMiner.CLASSNAME,
- "createDataElement failed with exception - isFile ", e, _dataStore); //$NON-NLS-1$
- }
- } // end currentObj not 0
-
-
-
- public String setProperties(VirtualChild fileObj) {
- String version = IServiceConstants.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(IServiceConstants.TOKEN_SEPARATOR)
- .append(date).append(IServiceConstants.TOKEN_SEPARATOR).append(
- size).append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(hidden).append(IServiceConstants.TOKEN_SEPARATOR).append(
- canWrite).append(IServiceConstants.TOKEN_SEPARATOR).append(
- canRead);
-
- buffer.append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(comment).append(IServiceConstants.TOKEN_SEPARATOR)
- .append(compressedSize).append(
- IServiceConstants.TOKEN_SEPARATOR).append(
- compressionMethod).append(
- IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(
- IServiceConstants.TOKEN_SEPARATOR).append(expandedSize);
-
- return buffer.toString();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ClassFileParser.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ClassFileParser.java
deleted file mode 100644
index bb62a1240..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/ClassFileParser.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyBatchThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyBatchThread.java
deleted file mode 100644
index 9fede0e47..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyBatchThread.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import java.io.File;
-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.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
-import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-public class CopyBatchThread extends CopyThread {
-
-
- public CopyBatchThread(DataElement targetFolder, DataElement theElement, UniversalFileSystemMiner miner, boolean isWindows, DataElement status)
- {
- super(targetFolder, theElement, miner, isWindows, status);
- }
-
- public void run()
- {
- super.run();
- try {
- handleCopyBatch();
- } catch (SystemMessageException e) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- miner.statusDone(status);
- }
- _isDone = true;
- }
-
- private DataElement handleCopyBatch() throws SystemMessageException
- {
- String targetType = targetFolder.getType();
- File tgtFolder = getFileFor(targetFolder);
- int numOfSources = theElement.getNestedSize() - 2;
- systemOperationMonitor = new SystemOperationMonitor();
-
- if (targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- // if target is virtual or an archive, insert into an archive
- AbsoluteVirtualPath vpath = miner.getAbsoluteVirtualPath(targetFolder);
- ISystemArchiveHandler handler = miner.getArchiveHandlerFor(vpath.getContainingArchiveString());
- boolean result = true;
-
- List nonDirectoryArrayList = new ArrayList();
- List nonDirectoryNamesArrayList = new ArrayList();
-
- String virtualContainer = ""; //$NON-NLS-1$
-
- if (targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- virtualContainer = vpath.getVirtualPart();
- }
-
- for (int i = 0; i < numOfSources; i++)
- {
- if (isCancelled())
- {
- return miner.statusCancelled(status);
- }
- DataElement sourceFile = miner.getCommandArgument(theElement, i+1);
- String srcType = sourceFile.getType();
- String srcName = sourceFile.getName();
- File srcFile;
-
- if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
- || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR))
- {
- srcFile = getFileFor(sourceFile);
- }
- else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- AbsoluteVirtualPath svpath = miner.getAbsoluteVirtualPath(sourceFile);
- ISystemArchiveHandler shandler = miner.getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null)
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return miner.statusDone(status);
- }
-
- VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart(), systemOperationMonitor);
- srcFile = child.getExtractedFile();
- }
- else {
- //invalid source type
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return miner.statusDone(status);
- }
-
- //If this source file object is directory, we will call ISystemArchiveHandler#add(File ...) method to
- //it and all its descendants into the archive file.
- //If this source file object is not a directory, we will add it into a list, and then
- //call ISystemArchiveHandler#add(File[] ...) to add them in batch.
- if (srcFile.isDirectory())
- {
- try {
- handler.add(srcFile, virtualContainer, srcName, systemOperationMonitor);
- } catch (SystemMessageException e) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- if (isCancelled())
- {
- return miner.statusCancelled(status);
- }
- else
- {
- return miner.statusDone(status);
- }
-
- }
- }
- else
- {
- nonDirectoryArrayList.add(srcFile);
- nonDirectoryNamesArrayList.add(srcName);
- }
- }
-
- if (nonDirectoryArrayList.size() > 0)
- {
- File[] resultFiles = (File[])nonDirectoryArrayList.toArray(new File[nonDirectoryArrayList.size()]);
- String[] resultNames = (String[])nonDirectoryNamesArrayList.toArray(new String[nonDirectoryNamesArrayList.size()]);
- //we need to add those files into the archive file as well.
- try {
- handler.add(resultFiles, virtualContainer, resultNames, systemOperationMonitor);
- } catch (SystemMessageException e) {
- result = false;
- }
- }
-
- if (result)
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- }
- else
- {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
- if (isCancelled())
- {
- return miner.statusCancelled(status);
- }
- else
- {
- return miner.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++)
- {
- if (isCancelled())
- {
- return miner.statusCancelled(status);
- }
- DataElement sourceFile = miner.getCommandArgument(theElement, i+1);
- String srcType = sourceFile.getType();
-
- if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR))
- {
- // extract from an archive to folder
- try {
- AbsoluteVirtualPath svpath = miner.getAbsoluteVirtualPath(sourceFile);
- ISystemArchiveHandler shandler = miner.getArchiveHandlerFor(svpath.getContainingArchiveString());
- VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart(), systemOperationMonitor);
-
- File parentDir = getFileFor(targetFolder);
- File destination = new File(parentDir, sourceFile.getName());
-
- if (child.isDirectory) {
- shandler.extractVirtualDirectory(svpath.getVirtualPart(), parentDir, destination, systemOperationMonitor);
- } else {
- shandler.extractVirtualFile(svpath.getVirtualPart(), destination, systemOperationMonitor);
- }
-
- } catch (SystemMessageException e) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return miner.statusDone(status);
- }
- }
- 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);
-
- // handle window case separately, since xcopy command could not handler
- // multiple source names
- if (isWindows)
- {
- tgt = tgtFolder.getAbsolutePath() + File.separatorChar + srcFile.getName();
- // Both unix and windows need src quoted, so it's already done
- doCopyCommand(src, enQuote(tgt), folderCopy, status);
- if (status.getAttribute(DE.A_SOURCE) == IServiceConstants.FAILED)
- {
- break;
- }
- continue;
- }
- 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)
- if (isCancelled())
- {
- return miner.statusCancelled(status);
- }
- else
- {
- return miner.statusDone(status);
- }
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopySingleThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopySingleThread.java
deleted file mode 100644
index d253fd734..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopySingleThread.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-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.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-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.SystemMessageException;
-
-public class CopySingleThread extends CopyThread {
-
- private DataElement nameObj;
-
-
- public CopySingleThread(DataElement targetFolder, DataElement theElement, DataElement nameObj, UniversalFileSystemMiner miner, boolean isWindows, DataElement status)
- {
- super(targetFolder, theElement, miner, isWindows, status);
- this.nameObj = nameObj;
- }
-
- public void run()
- {
- super.run();
- try {
- handleCopy();
- } catch (SystemMessageException e) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- miner.statusDone(status);
- }
- _isDone = true;
- }
-
- private DataElement handleCopy() throws SystemMessageException
- {
- DataElement sourceFile = theElement;
- String newName = nameObj.getName();
- String targetType = targetFolder.getType();
- String srcType = sourceFile.getType();
- //In the case of super transfer, the source file is a virtual file/folder inside the temporary zip file, and its type information is set to
- //default UNIVERSAL_FILTER_DESCRIPTOR since its information never been cached before.
- //We need to find out its real type first before going to different if statement.
- File srcFile = null;
- VirtualChild child = null;
- systemOperationMonitor = new SystemOperationMonitor();
- if (IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR == srcType)
- {
- if (ArchiveHandlerManager.isVirtual(sourceFile.getValue()))
- {
- String goodFullName = ArchiveHandlerManager.cleanUpVirtualPath(sourceFile.getValue());
- child = ArchiveHandlerManager.getInstance().getVirtualObject(goodFullName);
- if (child.exists())
- {
- if (child.isDirectory)
- {
- srcType = IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR;
- } else
- {
- srcType = IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR;
- }
- }
- }
- }
-
- if (targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
-
- // insert into an archive
- AbsoluteVirtualPath vpath = miner.getAbsoluteVirtualPath(targetFolder);
- ISystemArchiveHandler handler = miner.getArchiveHandlerFor(vpath.getContainingArchiveString());
-
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return miner.statusDone(status);
- }
-
- if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
- || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) {
-
- srcFile = getFileFor(sourceFile);
- }
- else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- ISystemArchiveHandler shandler = null;
- if (null == child)
- {
- AbsoluteVirtualPath svpath = miner.getAbsoluteVirtualPath(sourceFile);
- shandler = miner.getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return miner.statusDone(status);
- }
- child = shandler.getVirtualFile(svpath.getVirtualPart(), systemOperationMonitor);
- }
- else
- {
- //If child is not null, it means the sourceFile is a type of UNIVERSAL_FILTER_DESCRIPTOR, and has already been handled
- shandler = child.getHandler();
- }
- srcFile = child.getExtractedFile();
- }
-
- String virtualContainer = ""; //$NON-NLS-1$
-
- if (targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- virtualContainer = vpath.getVirtualPart();
- }
-
- handler.add(srcFile, virtualContainer, newName, systemOperationMonitor);
- }
- else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- ISystemArchiveHandler shandler = null;
- AbsoluteVirtualPath svpath = null;
- if (null == child)
- {
- svpath = miner.getAbsoluteVirtualPath(sourceFile);
- shandler = miner.getArchiveHandlerFor(svpath.getContainingArchiveString());
-
- if (shandler == null) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return miner.statusDone(status);
- }
- child = shandler.getVirtualFile(svpath.getVirtualPart(), systemOperationMonitor);
- }
- else
- {
- //If child is not null, it means the sourceFile is a type of UNIVERSAL_FILTER_DESCRIPTOR, and has already been handled
- shandler = child.getHandler();
- svpath = miner.getAbsoluteVirtualPath(sourceFile.getValue());
- }
-
- File parentDir = getFileFor(targetFolder);
- File destination = new File(parentDir, newName);
-
- if (child.isDirectory) {
- shandler.extractVirtualDirectory(svpath.getVirtualPart(), parentDir, destination, systemOperationMonitor);
- }
- else {
- shandler.extractVirtualFile(svpath.getVirtualPart(), destination, systemOperationMonitor);
- }
- }
- else {
- File tgtFolder = getFileFor(targetFolder);
- 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())
- {
- //For Windows, we need to use xcopy command, which require the new directory
- //name be part of the target.
- if (newName.equals(srcFile.getName()) && !isWindows)
- {
- tgt = tgtFolder.getAbsolutePath();
- }
- }
-
- doCopyCommand(enQuote(src), enQuote(tgt), folderCopy, status);
- }
-
- return miner.statusDone(status);
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java
deleted file mode 100644
index d602cee46..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import java.io.File;
-import java.io.InputStream;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-import org.eclipse.dstore.core.server.SecuredThread;
-
-public class CopyThread extends SecuredThread implements ICancellableHandler {
-
- protected DataElement targetFolder;
- protected DataElement theElement;
- protected DataElement status;
- protected UniversalFileSystemMiner miner;
- protected boolean isWindows;
-
- protected boolean _isCancelled = false;
- protected boolean _isDone = false;
- protected SystemOperationMonitor systemOperationMonitor = null;
-
- public static final String CLASSNAME = "CopyThread"; //$NON-NLS-1$
-
-
- public CopyThread(DataElement targetFolder, DataElement theElement, UniversalFileSystemMiner miner, boolean isWindows, DataElement status)
- {
- super(theElement.getDataStore());
- this.targetFolder = targetFolder;
- this.theElement = theElement;
- this.miner = miner;
- this.status = status;
- this.isWindows = isWindows;
- }
-
- protected File getFileFor(DataElement element) {
- File result = null;
- String type = element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) {
- result = new File(element.getName());
- } else if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)
- || type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
- || type.equals(IUniversalDataStoreConstants.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;
- }
-
- /**
- * 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);
- }
- }
-
- 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 /Q /H /I /Y"; //$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, IServiceConstants.FAILED);
- status.setAttribute(DE.A_VALUE, e.getMessage());
- return;
- }
- }
- command = "xcopy " + source + " " + tgt + " /Y /K /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, IServiceConstants.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, IServiceConstants.FAILED);
- status.setAttribute(DE.A_VALUE, IServiceConstants.UNEXPECTED_ERROR);
- }
- }
- // otherwise if exit value is 0, process terminated normally
- else {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- }
- }
- // no process, so something is wrong
- else {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- status.setAttribute(DE.A_VALUE, IServiceConstants.UNEXPECTED_ERROR);
- }
- }
- catch (Exception e)
- {
- UniversalServerUtilities.logError(CLASSNAME, "Exception is handleCopy", e, _dataStore); //$NON-NLS-1$
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- status.setAttribute(DE.A_VALUE, e.getMessage());
- }
- }
-
-
- public void cancel() {
- _isCancelled = true;
- if (null != systemOperationMonitor)
- {
- systemOperationMonitor.setCancelled(true);
- }
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFileThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFileThread.java
deleted file mode 100644
index 3a98e4cac..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFileThread.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-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.server.SecuredThread;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-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.messages.SystemMessageException;
-
-public class CreateFileThread extends SecuredThread implements ICancellableHandler {
-
- protected DataElement _subject;
- protected DataElement _status;
- protected UniversalFileSystemMiner _miner;
- protected String _queryType;
-
- protected boolean _isCancelled = false;
- protected boolean _isDone = false;
- protected SystemOperationMonitor systemOperationMonitor = new SystemOperationMonitor();
-
- public static final String CLASSNAME = "CreateFileThread"; //$NON-NLS-1$
-
-
- public CreateFileThread(DataElement theElement, String queryType, UniversalFileSystemMiner miner, DataStore dataStore, DataElement status)
- {
- super(dataStore);
- this._subject = theElement;
- this._miner = miner;
- this._status = status;
- this._queryType = queryType;
- }
-
-
-
-
- public void cancel() {
- _isCancelled = true;
- if (null != systemOperationMonitor)
- {
- systemOperationMonitor.setCancelled(true);
- }
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- public void run()
- {
- super.run();
- try {
- handleCreateFile();
- } catch (SystemMessageException e) {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _miner.statusDone(_status);
- }
- _isDone = true;
- }
-
- private DataElement handleCreateFile() throws SystemMessageException
- {
- boolean wasFilter = _queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- if (_queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
- return handleCreateVirtualFile(_subject, _status, _queryType);
- }
-
- File filename = null;
- if (_queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) {
- if (_subject.getName().indexOf(
- ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0) {
- _subject.setAttribute(DE.A_TYPE,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- return handleCreateVirtualFile(_subject, _status, _queryType);
- } else {
- filename = new File(_subject.getValue());
- _subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR);
- _subject.setAttribute(DE.A_SOURCE, _miner.setProperties(filename));
- }
- } else if (_queryType.equals(IUniversalDataStoreConstants.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, _dataStore); //$NON-NLS-1$
-
- if (filename != null)
- {
- if (filename.exists())
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
- else {
- try {
- boolean done = filename.createNewFile();
- if (ArchiveHandlerManager.getInstance().isArchive(filename)) {
- ArchiveHandlerManager.getInstance()
- .createEmptyArchive(filename);
- _subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR);
- } else {
- if (done)
- {
- _subject.setAttribute(DE.A_TYPE,
- IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR);
- }
- }
- _subject.setAttribute(DE.A_SOURCE, _miner.setProperties(filename));
- if (done) {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.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, IServiceConstants.FAILED);
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleCreateFile failed", e, _dataStore); //$NON-NLS-1$
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
- }
- }
- _dataStore.refresh(_subject);
- return _miner.statusDone(_status);
- }
-
- public DataElement handleCreateVirtualFile(DataElement subject,
- DataElement status, String type) throws SystemMessageException {
-
- AbsoluteVirtualPath vpath = null;
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) {
- vpath = _miner.getAbsoluteVirtualPath(subject.getValue());
- } else {
- vpath = _miner.getAbsoluteVirtualPath(subject);
- }
- ISystemArchiveHandler handler = _miner.getArchiveHandlerFor(vpath
- .getContainingArchiveString());
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return _miner.statusDone(status);
- }
-// VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
- handler.getVirtualFile(vpath.getVirtualPart(), systemOperationMonitor);
- handler.createFile(vpath.getVirtualPart(), systemOperationMonitor);
-
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- if (type.equals(IUniversalDataStoreConstants.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, IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR);
- }
- _dataStore.refresh(subject);
- return _miner.statusDone(status);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFolderThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFolderThread.java
deleted file mode 100644
index ae357de71..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFolderThread.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-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.server.SecuredThread;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-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.messages.SystemMessageException;
-
-public class CreateFolderThread extends SecuredThread implements ICancellableHandler {
-
- protected DataElement _subject;
- protected DataElement _status;
- protected UniversalFileSystemMiner _miner;
- protected String _queryType;
-
- protected boolean _isCancelled = false;
- protected boolean _isDone = false;
- protected SystemOperationMonitor systemOperationMonitor = new SystemOperationMonitor();
-
- public static final String CLASSNAME = "CreateFileThread"; //$NON-NLS-1$
-
-
- public CreateFolderThread(DataElement theElement, String queryType, UniversalFileSystemMiner miner, DataStore dataStore, DataElement status)
- {
- super(dataStore);
- this._subject = theElement;
- this._miner = miner;
- this._status = status;
- this._queryType = queryType;
- }
-
-
-
-
- public void cancel() {
- _isCancelled = true;
- if (null != systemOperationMonitor)
- {
- systemOperationMonitor.setCancelled(true);
- }
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- public void run()
- {
- super.run();
- try {
- handleCreateFile();
- } catch (SystemMessageException e) {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _miner.statusDone(_status);
- }
- _isDone = true;
- }
-
- private DataElement handleCreateFile() throws SystemMessageException
- {
- if (_queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- return handleCreateVirtualFolder(_subject, _status, _queryType);
- }
-
- File filename = null;
- if (_queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- if (_subject.getName().indexOf(
- ArchiveHandlerManager.VIRTUAL_SEPARATOR) > 0)
- {
- _subject.setAttribute(DE.A_TYPE,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
- return handleCreateVirtualFolder(_subject, _status, _queryType);
- }
- else
- {
- filename = new File(_subject.getValue());
- _subject.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR);
- _subject.setAttribute(DE.A_SOURCE, _miner.setProperties(filename));
- }
- }
- else if (_queryType.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR))
- {
- filename = new File(_subject.getValue());
- }
- else
- UniversalServerUtilities.logError(CLASSNAME,
- "Invalid query type to handleCreateFolder", null, _dataStore); //$NON-NLS-1$
-
- if (filename != null)
- {
- if (filename.exists())
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
- else
- {
- try {
- boolean done = filename.mkdirs();
- if (done)
- {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- _subject.setAttribute(DE.A_SOURCE, _miner.setProperties(filename));
- _subject.setAttribute(DE.A_TYPE,IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR);
- _subject.setAttribute(DE.A_NAME, filename.getName());
- _subject.setAttribute(DE.A_VALUE, filename.getParentFile().getAbsolutePath());
- }
- else
- {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
-
- } catch (Exception e) {
- UniversalServerUtilities.logError(CLASSNAME,
- "handleCreateFolder failed", e, _dataStore); //$NON-NLS-1$
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
- }
- }
- _dataStore.refresh(_subject);
- return _miner.statusDone(_status);
- }
-
- public DataElement handleCreateVirtualFolder(DataElement subject,
- DataElement status, String type) throws SystemMessageException {
-
- AbsoluteVirtualPath vpath = null;
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) {
- vpath = _miner.getAbsoluteVirtualPath(subject.getValue());
- } else {
- vpath = _miner.getAbsoluteVirtualPath(subject);
- }
- ISystemArchiveHandler handler = _miner.getArchiveHandlerFor(vpath
- .getContainingArchiveString());
- if (handler == null) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- return _miner.statusDone(status);
- }
-// VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
- handler.getVirtualFile(vpath.getVirtualPart(), systemOperationMonitor);
- handler.createFolder(vpath.getVirtualPart(), systemOperationMonitor);
-
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- if (type.equals(IUniversalDataStoreConstants.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,
- IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR);
- }
- _dataStore.refresh(subject);
- return _miner.statusDone(status);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java
deleted file mode 100644
index bd59379c4..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * David McKnight (IBM) - [264607] Unable to delete a broken symlink
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-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.server.SecuredThread;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-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.messages.SystemMessageException;
-
-public class DeleteThread extends SecuredThread implements ICancellableHandler {
-
- protected DataElement _theElement;
- protected DataElement _status;
- protected UniversalFileSystemMiner _miner;
- protected boolean _batch;
-
- protected boolean _isCancelled = false;
- protected boolean _isDone = false;
- protected SystemOperationMonitor systemOperationMonitor = new SystemOperationMonitor();
-
- public static final String CLASSNAME = "DeleteThread"; //$NON-NLS-1$
-
-
- public DeleteThread(DataElement theElement, UniversalFileSystemMiner miner, DataStore dataStore, boolean batch, DataElement status)
- {
- super(dataStore);
- this._theElement = theElement;
- this._miner = miner;
- this._status = status;
- this._batch = batch;
- }
-
-
-
-
- public void cancel() {
- _isCancelled = true;
- if (null != systemOperationMonitor)
- {
- systemOperationMonitor.setCancelled(true);
- }
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- public void run()
- {
- super.run();
- try {
- if (_batch) {
- handleDeleteBatch();
- } else {
- handleDelete(_theElement, _status);
- }
- } catch (SystemMessageException e) {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _miner.statusDone(_status);
- }
- _isDone = true;
- }
-
- private DataElement handleDeleteBatch() throws SystemMessageException
- {
- 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++)
- {
- if (isCancelled())
- {
- return _miner.statusCancelled(_status);
- }
- DataElement subject = _miner.getCommandArgument(_theElement, i+1);
- handleDelete(subject, substatus);
- /*
- if (!substatus.getSource().startsWith(IServiceConstants.SUCCESS))
- {
- status.setAttribute(DE.A_SOURCE, substatus.getSource());
- return statusDone(status);
- }
- */
- }
- _status.setAttribute(DE.A_SOURCE, substatus.getSource());
- return _miner.statusDone(_status);
- }
- private DataElement handleDelete(DataElement subject, DataElement thisStatus) throws SystemMessageException
- {
-
- String type = subject.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)
- || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- return handleDeleteFromArchive(subject, thisStatus);
- }
-
- File deleteObj = new File(subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + subject.getName());
- DataElement deObj = null;
-
- boolean exists = deleteObj.exists();
- if (!exists){
- // special case for broken symbolic link
- String attributes = subject.getSource();
- String classification = "file"; //$NON-NLS-1$
- String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- if (str.length > 11){ // 11 is classification index
- classification = str[11];
- }
- if (classification.startsWith("broken symbolic link")){ //$NON-NLS-1$
- exists = true;
- }
- }
-
- if (!exists) {
- thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- UniversalServerUtilities.logError(CLASSNAME,
- "The object to delete does not exist", null, _dataStore); //$NON-NLS-1$
- } else {
- try {
- if (deleteObj.isFile()) {
- if (deleteObj.delete() == false) {
- thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.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);
- thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.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, thisStatus);
- if (deleteObj.delete() == false) {
- thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- UniversalServerUtilities.logError(CLASSNAME,
- "Deletion of dir fialed", null, _dataStore); //$NON-NLS-1$
- } else {
- _dataStore.deleteObjects(subject);
- DataElement parent = subject.getParent();
- _dataStore.deleteObject(parent, subject);
- _dataStore.refresh(parent);
- thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- }
- } else {
- UniversalServerUtilities
- .logError(
- CLASSNAME,
- "The object to delete is neither a File or Folder! in handleDelete", //$NON-NLS-1$
- null, _dataStore);
- }
- } catch (Exception e) {
- thisStatus.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXCEPTION + "|" + deleteObj.getAbsolutePath()); //$NON-NLS-1$
- thisStatus.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
- UniversalServerUtilities.logError(CLASSNAME,
- "Delete of the object failed", e, _dataStore); //$NON-NLS-1$
- }
- }
- _dataStore.refresh(subject);
- return _miner.statusDone(_status);
-
- }
-
- public DataElement handleDeleteFromArchive(DataElement subject,
- DataElement status) throws SystemMessageException {
- String type = subject.getType();
- DataElement deObj = null;
-
- AbsoluteVirtualPath vpath = _miner.getAbsoluteVirtualPath(subject);
- if (vpath != null) {
- ArchiveHandlerManager archiveHandlerManager = ArchiveHandlerManager.getInstance();
- ISystemArchiveHandler handler = archiveHandlerManager.getRegisteredHandler(new File(vpath.getContainingArchiveString()));
- if (handler == null || !handler.delete(vpath.getVirtualPart(), systemOperationMonitor)) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED + "|" + vpath.toString()); //$NON-NLS-1$
- _dataStore.refresh(subject);
- return _miner.statusDone(status);
- }
-
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) {
- deObj = _dataStore.find(subject, DE.A_NAME, subject.getName(),
- 1);
- _dataStore.deleteObject(subject, deObj);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- } else if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
- _dataStore.deleteObjects(subject);
- DataElement parent = subject.getParent();
- _dataStore.deleteObject(parent, subject);
- _dataStore.refresh(parent);
- status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- }
- }
-
- _dataStore.refresh(subject);
- return _miner.statusDone(status);
- }
-
- /**
- * 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, IServiceConstants.FAILED);
- UniversalServerUtilities.logWarning(CLASSNAME,
- "Deletion of dir failed", _dataStore); //$NON-NLS-1$
- }
- } else {
- deleteDir(list[i], status);
- if (!(list[i].delete())) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- UniversalServerUtilities.logWarning(CLASSNAME,
- "Deletion of dir failed", _dataStore); //$NON-NLS-1$
- }
- }
- }
- } catch (Exception e) {
- status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXCEPTION);
- status.setAttribute(DE.A_VALUE, e.getLocalizedMessage());
- UniversalServerUtilities.logError(CLASSNAME,
- "Deletion of dir failed", e, _dataStore); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileClassifier.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileClassifier.java
deleted file mode 100644
index f9582ce18..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileClassifier.java
+++ /dev/null
@@ -1,1056 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Martin Oberhuber (Wind River) - [186640] Fix case sensitive issue comparing z/OS
- * Xuan Chen (IBM) - [191280] [dstore] Expand fails for folder "/folk" with 3361 children
- * Xuan Chen (IBM) - [215863]] NPE when Expanding Empty Zip File
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * David McKnight (IBM) - [251729][dstore] problems querying symbolic link folder
- * Noriaki Takatsu (IBM) - [256724] thread-level security is not established
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.dstore.core.server.SecuredThread;
-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 determining file types
- */
-public class FileClassifier extends SecuredThread
-{
- 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)
- {
- super(subject.getDataStore());
- _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$
-
- }
-
- 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 != null && !child.isDeleted())
- {
- 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()
- {
- super.run();
- if (!_systemSupportsClassify)
- return;
- init();
-
- // 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 != null) && 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());
-
- }
- catch (Exception e)
- {
- }
- }
- }
- _dataStore.disconnectObject(_subject);
- _dataStore.refresh(_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.getAbsolutePath();
-
- // 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 parentPath 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);
-
- if (null == children)
- {
- return;
- }
- // 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 (Exception e)
- {
- // TODO: log error
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileDescriptors.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileDescriptors.java
deleted file mode 100644
index f6a6fa8b3..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileDescriptors.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import org.eclipse.dstore.core.model.DataElement;
-
-public class FileDescriptors
-{
- public static DataElement _deUniversalFileObject;
- public static DataElement _deUniversalFolderObject;
- public static DataElement _deUniversalVirtualFileObject;
- public static DataElement _deUniversalVirtualFolderObject;
- public static DataElement _deUniversalArchiveFileObject;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileQueryThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileQueryThread.java
deleted file mode 100644
index b4e6102f9..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/FileQueryThread.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * David McKnight (IBM) - [192884] Should not use filter to determine previous query results
- * David McKnight (IBM) - [209387] Should not delete elements for files that still exist (but are filtered out)
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * David McKnight (IBM) - [251650] [dstore] Multiple copies of symbolic link file show in Table view
- * David McKnight (IBM) - [251729][dstore] problems querying symbolic link folder
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-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.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-
-public class FileQueryThread extends QueryThread
-{
-
- private File _fileobj;
- private String _queryType;
- private String _filter;
- private boolean _caseSensitive;
- private int _inclusion;
- private boolean _showHidden;
- private boolean _isWindows;
-
-
- public FileQueryThread(
- DataElement subject, File fileobj,
- String queryType, String filter, boolean caseSensitive,
- int inclusion,
- boolean showHidden, boolean isWindows,
- DataElement status)
- {
- super(subject, status);
- _fileobj = fileobj;
- _queryType = queryType;
- _filter = filter;
- _caseSensitive = caseSensitive;
- _inclusion = inclusion;
- _showHidden = showHidden;
- _isWindows = isWindows;
- }
-
-
- public void run()
- {
- super.run();
-
- doQueryAll();
-
- if (!isCancelled())
- {
-
- _isDone = true;
- // refresh data store
- _dataStore.refresh(_subject);
-
- // refresh status
- statusDone(_status);
-
- }
- }
-
- protected void doQueryAll() {
- if (_fileobj.exists())
- {
- boolean filterFiles = (_inclusion == IClientServerConstants.INCLUDE_ALL) || (_inclusion == IClientServerConstants.INCLUDE_FILES_ONLY);
- boolean filterFolders = (_inclusion == IClientServerConstants.INCLUDE_ALL) || (_inclusion == IClientServerConstants.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 (!_isCancelled)
- {
- if (list != null)
- {
- createDataElement(_dataStore, _subject, list, _queryType, _filter,_inclusion);
-
- if (_subject.getSource() == null || _subject.getSource().equals("")){ //$NON-NLS-1$
- String folderProperties = setProperties(_fileobj);
- _subject.setAttribute(DE.A_SOURCE, folderProperties);
- }
-
- if (!_isCancelled)
- {
- FileClassifier clsfy = getFileClassifier(_subject);
- clsfy.start();
- }
- }
- }
- }
- else {
- }
-
- }
-
-
- protected FileClassifier getFileClassifier(DataElement subject)
- {
- return new FileClassifier(subject);
- }
-
- 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[])
- {
- HashMap filteredChildren = new HashMap();
- List children = subject.getNestedData();
- if (children != null)
- {
- //Use a HashMap instead of array list to improve performance
- for (int f = 0; f < children.size(); f++)
- {
- if (_isCancelled) {
- return;
- }
-
- DataElement child = (DataElement)children.get(f);
- if (!child.isDeleted())
- {
- filteredChildren.put(child.getName(), child);
- }
- }
- }
-
-
-
- boolean found = false;
-
- // Check if the current Objects in the DataStore are valid... exist
- // on the remote host
- try {
- for (int j = 0; j < list.length; ++j)
- {
- if (_isCancelled) {
- return;
- }
-
- found = false;
- File file = list[j];
- String fileName = file.getName();
- boolean isHidden = file.isHidden() || fileName.charAt(0) == '.';
-
- DataElement previousElement = (DataElement)filteredChildren.get(fileName);
- if (previousElement != null && !previousElement.isDeleted())
- {
- // Type have to be equal as well
- //String type = ((DataElement) currentObjList[i]).getType();
- String type = previousElement.getType();
- boolean isfile = !list[j].isDirectory();
- if (((type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || type.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) && isfile)
- ||
- (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR) && !isfile))
- {
- if (types !=null)
- {
- String attributes = previousElement.getAttribute(DE.A_SOURCE);
- String thisType = types[j];
- if (attributes.indexOf(thisType) != -1)
- {
- filteredChildren.remove(list[j].getName()); //remove it from the filterChildren list
- found = true;
- }
- }
- else
- {
- filteredChildren.remove(list[j].getName());
- found = true;
- }
- }
- }
-
- DataElement deObj = null;
- if (!isHidden || _showHidden)
- {
- if (found)
- {
- //this object already exists in the DStore
- deObj = previousElement;
- }
- else
- {
- //We need to create a new data element for this object.
- if (include == IClientServerConstants.INCLUDE_ALL)
- {
- if (file.isDirectory())
- {
- deObj = ds.createObject(subject,FileDescriptors._deUniversalFolderObject,fileName);
- }
- else
- // file
- {
- if (ArchiveHandlerManager.getInstance().isArchive(file))
- {
- deObj = ds
- .createObject(
- subject,
- FileDescriptors._deUniversalArchiveFileObject,
- fileName);
- }
- else
- {
- deObj = ds.createObject(subject,
- FileDescriptors._deUniversalFileObject,
- fileName);
- }
- }
- }
- else if (include == IClientServerConstants.INCLUDE_FOLDERS_ONLY)
- {
- if (ArchiveHandlerManager.getInstance().isArchive(file))
- {
- deObj = ds.createObject(subject,
- FileDescriptors._deUniversalArchiveFileObject,
- fileName);
- }
- else
- {
- deObj = ds.createObject(subject,
- FileDescriptors._deUniversalFolderObject,
- fileName);
- }
- }
- else if (include == IClientServerConstants.INCLUDE_FILES_ONLY)
- {
- if (ArchiveHandlerManager.getInstance().isArchive(file))
- {
- deObj = ds.createObject(subject,
- FileDescriptors._deUniversalArchiveFileObject,
- fileName);
- }
- else
- {
- deObj = ds
- .createObject(subject,
- FileDescriptors._deUniversalFileObject,
- fileName);
- }
- }
- if (deObj != null)
- {
- if (queryType.equals(IUniversalDataStoreConstants.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[j].getParentFile().getAbsolutePath();
- deObj.setAttribute(DE.A_VALUE, valueStr);
- }
- }
- }
- }
-
- String properties = setProperties(file);
- if (deObj != null)
- {
- if (types != null)
- {
- String oldSource = deObj.getAttribute(DE.A_SOURCE);
- String newSource = properties + "|" + types[j]; //$NON-NLS-1$
- if (!oldSource.startsWith(newSource))
-
- {
- deObj.setAttribute(DE.A_SOURCE, newSource);
- }
- }
- else
- {
- String oldSource = deObj.getAttribute(DE.A_SOURCE);
- String newSource = properties;
- if (!oldSource.startsWith(newSource))
- deObj.setAttribute(DE.A_SOURCE, properties);
- }
- }
- }
- } // end for j
-
- //Object left over in the filteredChildren is no longer in the system any more. Need to remove.
- if (!filteredChildren.isEmpty())
- {
- // get the complete list of files (because we're only working with filtered right now
- String[] completeList = _fileobj.list();
-
- Iterator myIterator = filteredChildren.keySet().iterator();
- while(myIterator.hasNext())
- {
- DataElement oldChild = (DataElement)filteredChildren.get(myIterator.next());
- String oldName = oldChild.getName();
- boolean foundOnSystem = false;
- for (int c = 0; c < completeList.length && !foundOnSystem; c++){
- if (completeList[c].equals(oldName)){
- foundOnSystem = true;
- }
- }
- if (!foundOnSystem){
- ds.deleteObject(subject, oldChild);
- }
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- UniversalServerUtilities.logError(UniversalFileSystemMiner.CLASSNAME,
- "createDataElement failed with exception - isFile ", e, _dataStore); //$NON-NLS-1$
- }
-
- }
-
-
-
-
-
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/QueryThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/QueryThread.java
deleted file mode 100644
index b13c709bd..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/QueryThread.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import java.io.File;
-
-import org.eclipse.dstore.core.model.DE;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStoreResources;
-import org.eclipse.dstore.core.server.SecuredThread;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-public class QueryThread extends SecuredThread implements ICancellableHandler {
-
- protected DataElement _subject;
- protected DataElement _status;
-
- protected boolean _isCancelled = false;
- protected boolean _isDone = false;
-
- public QueryThread(DataElement subject, DataElement status)
- {
- super(subject.getDataStore());
- _subject = subject;
- _status = status;
- }
-
- /**
- * Complete status.
- */
- public DataElement statusDone(DataElement status) {
- status.setAttribute(DE.A_NAME, DataStoreResources.model_done);
- _dataStore.refresh(status);
- return status;
- }
-
-
- public void cancel() {
- _isCancelled = true;
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
-
- 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 = IServiceConstants.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 performance...
- // 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)
- try {
- comment = ArchiveHandlerManager.getInstance().getComment(fileObj);
- } catch (SystemMessageException e) {
- comment = " "; //$NON-NLS-1$
- }
- else
- comment = " "; //$NON-NLS-1$
-
- long compressedSize = size;
- String compressionMethod = " "; //$NON-NLS-1$
- double compressionRatio = 0;
-
- long expandedSize;
- if (isArchive)
- try {
- expandedSize = ArchiveHandlerManager.getInstance().getExpandedSize(fileObj);
- } catch (SystemMessageException e) {
- expandedSize = 0;
- }
- else
- expandedSize = size;
-
- buffer.append(version).append(IServiceConstants.TOKEN_SEPARATOR).append(date).append(
- IServiceConstants.TOKEN_SEPARATOR).append(size).append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(hidden).append(IServiceConstants.TOKEN_SEPARATOR).append(canWrite).append(
- IServiceConstants.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(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(comment).append(IServiceConstants.TOKEN_SEPARATOR).append(compressedSize)
- .append(IServiceConstants.TOKEN_SEPARATOR).append(compressionMethod).append(
- IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(IServiceConstants.TOKEN_SEPARATOR).append(
- expandedSize);
-
-
- String buf = buffer.toString();
- return buf;
- }
-
- public String setProperties(VirtualChild fileObj) {
- String version = IServiceConstants.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(IServiceConstants.TOKEN_SEPARATOR).append(date).append(
- IServiceConstants.TOKEN_SEPARATOR).append(size).append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(hidden).append(IServiceConstants.TOKEN_SEPARATOR).append(canWrite).append(
- IServiceConstants.TOKEN_SEPARATOR).append(canRead);
-
- buffer.append(IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(comment).append(IServiceConstants.TOKEN_SEPARATOR).append(compressedSize)
- .append(IServiceConstants.TOKEN_SEPARATOR).append(compressionMethod).append(
- IServiceConstants.TOKEN_SEPARATOR);
- buffer.append(compressionRatio).append(IServiceConstants.TOKEN_SEPARATOR).append(
- expandedSize);
-
- return buffer.toString();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/RenameThread.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/RenameThread.java
deleted file mode 100644
index 0cd96f2fd..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/RenameThread.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-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.server.SecuredThread;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-import org.eclipse.rse.dstore.universal.miners.UniversalServerUtilities;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-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.messages.SystemMessageException;
-
-public class RenameThread extends SecuredThread implements ICancellableHandler {
-
- protected DataElement _subject;
- protected DataElement _status;
- protected UniversalFileSystemMiner _miner;
-
- protected boolean _isCancelled = false;
- protected boolean _isDone = false;
- protected SystemOperationMonitor systemOperationMonitor = new SystemOperationMonitor();
-
- public static final String CLASSNAME = "RenameThread"; //$NON-NLS-1$
-
-
- public RenameThread(DataElement theElement, UniversalFileSystemMiner miner, DataStore dataStore, DataElement status)
- {
- super(dataStore);
- this._subject = theElement;
- this._miner = miner;
- this._status = status;
- }
-
-
-
- public void cancel() {
- _isCancelled = true;
- if (null != systemOperationMonitor)
- {
- systemOperationMonitor.setCancelled(true);
- }
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- public void run()
- {
- super.run();
- try {
- handleRename();
- } catch (SystemMessageException e) {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- _miner.statusDone(_status);
- }
- _isDone = true;
- }
-
- private DataElement handleRename() throws SystemMessageException
- {
- File fileoldname = new File(_subject.getAttribute(DE.A_VALUE)
- + File.separatorChar + _subject.getName());
- File filerename = new File(_subject.getAttribute(DE.A_SOURCE));
-
- if (ArchiveHandlerManager.isVirtual(fileoldname.getAbsolutePath())) {
- AbsoluteVirtualPath oldAbsPath = new AbsoluteVirtualPath(
- fileoldname.getAbsolutePath());
- AbsoluteVirtualPath newAbsPath = new AbsoluteVirtualPath(filerename
- .getAbsolutePath());
- ArchiveHandlerManager archiveHandlerManager = ArchiveHandlerManager.getInstance();
- ISystemArchiveHandler handler = archiveHandlerManager
- .getRegisteredHandler(new File(oldAbsPath
- .getContainingArchiveString()));
- if (handler != null) {
- handler.fullRename(oldAbsPath.getVirtualPart(), newAbsPath.getVirtualPart(), systemOperationMonitor);
- _subject.setAttribute(DE.A_NAME, filerename.getName());
- _subject.setAttribute(DE.A_SOURCE, _miner.setProperties(handler
- .getVirtualFile(newAbsPath.getVirtualPart(), systemOperationMonitor)));
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
- _dataStore.update(_subject);
- }
- else if (systemOperationMonitor.isCancelled())
- {
- _subject.setAttribute(DE.A_SOURCE, _miner.setProperties(handler
- .getVirtualFile(oldAbsPath.getVirtualPart(), systemOperationMonitor)));
- }
- else {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- }
- _dataStore.refresh(_subject);
- return _miner.statusDone(_status);
- }
- if (filerename.exists())
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
- else {
- try {
- boolean done = fileoldname.renameTo(filerename);
- if (done) {
- _subject.setAttribute(DE.A_NAME, filerename.getName());
- _subject
- .setAttribute(DE.A_SOURCE,
- _miner.setProperties(filerename));
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
-
- if (filerename.isDirectory()) {
- // update children's properties
- updateChildProperties(_subject, filerename);
- }
- _dataStore.update(_subject);
- } else
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- } catch (Exception e) {
- _status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
- UniversalServerUtilities.logError(CLASSNAME,
- "handleRename failed", e, _dataStore); //$NON-NLS-1$
- }
- }
- _dataStore.refresh(_subject);
- return _miner.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);
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java
deleted file mode 100644
index d33bf47d9..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.UniversalFileSystemMiner;
-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;
-import org.eclipse.dstore.core.server.SecuredThread;
-
-
-public class UniversalDownloadHandler extends SecuredThread implements ICancellableHandler
-{
-
- private boolean _isDone = false;
- private UniversalFileSystemMiner _miner;
- private DataElement _status;
- private DataElement _cmdElement;
- private boolean _isCancelled= false;
-
- public UniversalDownloadHandler(DataStore dataStore, UniversalFileSystemMiner miner, DataElement cmdElement,
- DataElement status)
- {
- super(dataStore);
- _miner = miner;
- _status = status;
- _cmdElement = cmdElement;
- }
-
- public void run()
- {
- super.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(), null);
- 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, _dataStore); //$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, _dataStore); //$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, _dataStore); //$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, _dataStore); //$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, _dataStore); //$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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java
deleted file mode 100644
index 29124c25c..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalFileSystemFilter.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.dstore.universal.miners.filesystem;
-
-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 {
-
-
- protected String filter;
- protected boolean allowDirs;
- protected boolean allowFiles;
- protected boolean caseSensitive = true;
- protected IMatcher matcher = null;
- protected NamePatternMatcher folderNameMatcher = null;
- protected int includeFilesOrFolders;
-
- /**
- * @param fString the filter 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 name) {
-
- boolean match = true;
- java.io.File file = new java.io.File(dir, name);
- 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(IClientServerConstants.INCLUDE_ALL, filter);
- else if (allowDirs)
- setListValues(IClientServerConstants.INCLUDE_FOLDERS_ONLY, filter);
- else if (allowFiles)
- setListValues(IClientServerConstants.INCLUDE_FILES_ONLY, filter);
- else
- return false;
-
- if ((matcher == null) && (folderNameMatcher == null))
- return true;
- if (includeFilesOrFolders != IClientServerConstants.INCLUDE_ALL)
- match = matcher.matches(name);
- else {
- if (file.isFile()) {
- if (matcher!=null)
- match = matcher.matches(name);
- } else {
- if (folderNameMatcher!=null)
- match = folderNameMatcher.matches(name);
- }
- }
- 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 fileNameFilter 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);
- }
-
- }
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java
deleted file mode 100644
index d7cf30d5f..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java
+++ /dev/null
@@ -1,487 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - Bug 147791 - symbolic links can cause circular search.
- * David McKnight (IBM) - [190010] cancelling search
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [214378] canonical path not required - problem is in the client
- * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * David McKnight (IBM) - [250168] handle malformed binary and always resolve canonical paths
- * David McKnight (IBM) - [250168] update to just search file of canonical paths (not symbolic links)
- * David McKnight (IBM) - [255390] memory checking
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- * David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
- ********************************************************************************/
-
-package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-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.server.SecuredThread;
-import org.eclipse.dstore.core.server.SystemServiceManager;
-import org.eclipse.dstore.core.util.StringCompare;
-import org.eclipse.dstore.internal.core.util.MemoryManager;
-import org.eclipse.rse.dstore.universal.miners.ICancellableHandler;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner;
-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.messages.SystemMessageException;
-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 SecuredThread implements ICancellableHandler
-{
- protected HashSet _alreadySearched;
-
- private File _rootFile;
-
- protected boolean _isCancelled;
- protected boolean _isDone;
- protected int _depth = -1;
-
- 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;
- private MemoryManager _memoryManager;
-
- public UniversalSearchHandler(DataStore dataStore, UniversalFileSystemMiner miner, SystemSearchString searchString, boolean fsCaseSensitive, File theFile, DataElement status) {
- super(dataStore);
-
- _memoryManager = MemoryManager.getInstance(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();
-
- boolean fileNamesCaseSensitive = fsCaseSensitive;
- if (fileNamesCaseSensitive){ // even though it may be a case sensitive system we may want to search case-insensitive
- fileNamesCaseSensitive = searchString.isFileNamesCaseSensitive();
- }
- _fileNameMatcher = new SystemSearchFileNameMatcher(_searchString.getFileNamesString(), fileNamesCaseSensitive, _searchString.isFileNamesRegex());
-
- // classification of files to restrict the search to
- _classificationString = _searchString.getClassificationString();
- }
-
- public void run() {
- super.run();
- try {
- internalSearch(_rootFile, _depth);
- }
- catch (Exception e) {
- UniversalServerUtilities.logError(_miner.getName(), "Error occured when calling internal search", e, _dataStore); //$NON-NLS-1$
- }
-
- _isDone = true;
-
- if (_isCancelled) {
-
- _miner.statusCancelled(_status);
- }
- else {
- // previously, the status would be set to done immediately because search results were sent
- // back to the client as they arrived. Now, the search handler wait until the search has
- // completed before setting the status to done
- _status.setAttribute(DE.A_NAME, "done"); //$NON-NLS-1$
- _dataStore.refresh(_status); // true indicates refresh immediately
- }
-
- _alreadySearched.clear();
- _dataStore.disconnectObjects(_status);
- }
-
- public boolean isCancelled() {
- return _isCancelled;
- }
-
- public boolean isDone() {
- return _isDone;
- }
-
- public void cancel() {
- _isCancelled = true;
- }
-
-
- protected boolean hasSearched(File file)
- {
- boolean result = false;
- try {
- String canonicalPath = file.getCanonicalPath();
-
- // check whether it's already been searched
- result = _alreadySearched.contains(canonicalPath);
- }
- catch (Exception e){
- result = _alreadySearched.contains(file.getAbsolutePath());
- _dataStore.trace(e);
- }
-
- return result;
- }
-
- protected void internalSearch(File theFile, int depth) throws SystemMessageException {
-
- if (!hasSearched(theFile)) {
-
- try {
- _alreadySearched.add(theFile.getCanonicalPath());
- }
- catch (Exception e){
- _alreadySearched.add(theFile.getAbsolutePath());
- _dataStore.trace(e);
-
- }
-
- 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, null);
-
- // 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);
- _dataStore.disconnectObjects(_status);
- }
-
- // 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()))
- {
- 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 (Exception e) {
- UniversalServerUtilities.logError(_miner.getName(), "Error occured trying to get the canonical file", e, _dataStore); //$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++) {
-
- checkAndClearupMemory();
- 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 {
- long MAX_FILE = Runtime.getRuntime().freeMemory() / 4;
- long fileLength = theFile.length();
-
- inputStream = new FileInputStream(theFile);
- InputStreamReader reader = new InputStreamReader(inputStream);
- BufferedReader bufReader = new BufferedReader(reader);
-
- // test for unreadable binary
- if (isUnreadableBinary(bufReader) || fileLength > MAX_FILE){
- // search some other way?
- long size = theFile.length();
- if (simpleSearch(inputStream, size, _stringMatcher)){
- bufReader.close();
- reader.close();
- return true;
- }
-
- bufReader.close();
- reader.close();
- return false;
- }
- else
- {
- SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, _stringMatcher);
-
- SystemSearchLineMatch[] matches = locator.locateMatches();
- boolean foundMatches = ((matches != null) && (matches.length > 0));
-
- if (foundMatches) {
- if (matches.length * 500 < MAX_FILE){ // only creating match objects if we have enough memory
- convert(remoteFile, absPath, matches);
- }
- }
- return foundMatches;
- }
-
- }
- catch (OutOfMemoryError e){
- if (SystemServiceManager.getInstance().getSystemService() == null)
- System.exit(-1);
- return false;
- }
- catch (Exception e) {
- UniversalServerUtilities.logError(_miner.getName(), "Error occured when trying to locate matches", e, _dataStore); //$NON-NLS-1$
- remoteFile.setAttribute(DE.A_VALUE, e.getMessage());
- return false;
- }
- }
-
- private boolean simpleSearch(FileInputStream stream, long size, SystemSearchStringMatcher matcher)
- {
- byte[] bytes = new byte[(int)size];
- try {
- stream.read(bytes, 0, (int)size);
- }
- catch (Exception e){
- }
-
- String str = new String(bytes);
- return _stringMatcher.matches(str);
-
- }
-
- private boolean isUnreadableBinary(BufferedReader reader){
- try {
- reader.mark(1);
- reader.read();
- reader.reset();
- }
- catch (Exception e){
- return true;
- }
-
- 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());
-
- }
- _dataStore.disconnectObjects(deObj);
- }
-
- public void checkAndClearupMemory()
- {
- _memoryManager.checkAndClearupMemory();
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/processes/ProcessDEComparator.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/processes/ProcessDEComparator.java
deleted file mode 100644
index cb1ba4ebf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/processes/ProcessDEComparator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
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 fd466637d..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Services
-providerName = Eclipse.org - DSDP
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 76f514a07..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.CommandMiner
-org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner
-org.eclipse.rse.dstore.universal.miners.EnvironmentMiner
-org.eclipse.rse.dstore.universal.miners.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 114dcd363..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/data/patterns.dat
+++ /dev/null
@@ -1,287 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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 RSE services.local/patterns.dat
-# Martin Oberhuber (Wind River) - [181550] support Unicode characters in patterns
-################################################################################
-#
-# 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 =([\p{L}_\d!@$\-\+,./()\\]*):(\d*):.*
-
-command: grep -.*n.*
- grep file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*):.*
-
-command: grep .*
- grep file pattern =([\p{L}_\d!@$\-\+,./()\\]*):.*
-
-
-command: pwd
- directory file pattern=([\p{L}_\d!@$\-\+,./()\\,:]*)
-
-command: nmake.*
- error pattern=NMAKE : .*
- error file line pattern =([\p{L}_\d!@$\-\+,./()\\:]*)\((\d*):(\d*)\) : error EDC.*
- error file pattern =[\p{L}_\d!@$\-\+,./()\\:]*\(([\p{L}_\d!@$,./\\]*)\) : error LNK.*
- error file line pattern=([\p{L}_\d!@$\-\+,./()\\]*):(\d*):\d*\) : error .*
- warning file line pattern=([\p{L}_\d!@$\-\+,./()\\]*)\((\d*):\d*\) : warning .*
- informational file line pattern=([\p{L}_\d!@$\-\+,./()\\]*)\((\d*):\d*\) : informational .*
-
-command: make.*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\",, line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): warning: .*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):
- #iseries c compiler
- error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.*
- #makefile errors
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*): make:.*
- #xlc Options warnings
- warning pattern=\(W\) Option .*
- #c89 errors
- error file line pattern=ERROR CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: gmake.*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): warning: .*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):
- # ixlc compiler
- error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.*
- # icc compiler
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
- #generic
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
-
-command: gcc\s.*
- error file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*): warning: .*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): error: .*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: [\p{L}_\d!@$,./\\,\-,\+,(,)]*: .*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):
-
-command: cc\s.*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
-
-command: CC\s.*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
-
-command: c89.*
- error file line pattern=ERROR CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: icc.*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
-
-command: javac.*
- warning file line pattern=([\p{L}_\d!@$,./\\,\-,\+,(,),:]*):(\d*): warning.*
- error file line pattern=([\p{L}_\d!@$,./\\,\-,\+,(,),:]*):(\d*):.*
-
-command: .*bat\s.*
- error file line pattern=\[javac\]\s([\p{L}_\d!@$,./\\,:]*):(\d*):.*
- error file line pattern=file:([\p{L}_\d!@$,./\\,:]*):(\d*):.*
-
-command: dir.*
- directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*<DIR>\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).*
- directory file pattern=.*<DIR>\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).*
- file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).*
- directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*)
- file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*)
-
-command: ls -l.*
- file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=l[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]*
- file file pattern=-.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=-.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=l.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]*
- file file pattern=l.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]*
- directory file pattern=d.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- directory file pattern=d.*\d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
-
-command: ls -a.*
- file file pattern=-.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=-.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- directory file pattern=d.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- directory file pattern=d.*\d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
-
-command: ls
- file file pattern=([\p{L}_\d!@$\-\+,.()\s]+)
-
-command: ls\s.*
- file file pattern=([\p{L}_\d!@$\-\+,.()\s]+)
-
-command: .*
- prompt file pattern=[\w,\d,\-,\+]+@[\w,\d,\-,\+]+:([\w,.,/,,(,),\\,\-,\+,\d,:,\s,\~]*)>.*
- prompt file pattern=([\p{L}_\d!@$\-\+,./()\\,:,\s]*)>.*
- prompt file pattern=[\w,\d,\-,\+]+:([\w,.,/,(,),\\,\-,\+,\d,:,\s,~]*)>.*
- prompt file pattern=([\w,.,/,(,),\\,\-,\+,\d,:,\s,~]*)>.*
-
-
-command: find .*
- file file pattern=([\p{L}_\d!@$\-\+,./()\\]+)
-
-command: env
- envvar pattern=[\p{L}_\d!@$]+\=.*
-
-command: ps
- process pattern=[\s]*[\d]+\s.*
-
-command: ps .*
- process pattern=[\s]*[\d]+\s.*
-
-command: xl[C,c].*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\",, line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
-
-command: ixlc.*
- error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.*
- error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", 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: ([\p{L}_\d!@$,./\\]*): (\d*):.*
- warning file line pattern=([\p{L}_\d!@$,./\\]*):(\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 ([\p{L}_\d!@$,./\\]*), 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 32ba47260..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/auth.pl
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2009 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
-# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
-# David McKnight (IBM) - [262013] [dstore][unix] RSE Daemon fails to start server on HP-UX
-#*******************************************************************************
-
-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];
- $dir=$passwdStruct[7]; # get the user's home dir
- #$passwd = $pass;
-
- $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" || lc($os) eq "HP-UX")
- {
- $suOptions="-";
- }
-
- # check for the existence of a home directory
- $homeDir=$dir;
- if (!(-e $homeDir))
- {
- $homeDir="/tmp/" . $userIN;
- }
-
- system("su $suOptions $userIN -c '$javaExe -Duser.home=$homeDir -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 673b28f84..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/daemon.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2007 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 = "4075";
-$helpFlag = "-h";
-$dir = ".";
-
-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
-{
- $user=`whoami`; chomp($user);
- $match = $user cmp "root";
-
- if ($match != 0)
- {
- print("WARNING: To run the server daemon, you must have root authority\n");
- }
-
- $trace="false";
- if (defined($ENV{DSTORE_TRACING_ON}))
- {
- $trace = $ENV{DSTORE_TRACING_ON};
- }
-
- $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";
- if (defined ($oldClasspath))
- {
- $ENV{CLASSPATH}="$ENV{CLASSPATH}:$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 09b3a5915..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/linux/server.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl
-#*******************************************************************************
-# Copyright (c) 2005, 2008 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];
-$clientUserID = $ARGV[2];
-
-$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};
-
-
-$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 885f992ab..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, 2007 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 4075.
-# 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] || "4075";
-$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 9df8e6949..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/macosx/server.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2005, 2008 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)
-# Patrick Juhl - Fix for unix (Parameters for port selection)
-# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters
-#*******************************************************************************
-# 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
-
-
-port=0;
-timeout=60000;
-clientUserID=$USER;
-
-if [ $# -gt 2 ]; then
- clientUserID=$3
-fi
-if [ $# -gt 1 ]; then
- timeout=$2
-fi
-if [ $# -gt 0 ]; then
- port=$1
-fi
-
-case x$port in
- x-h*) echo "Usage: server.sh [port] [timeout] [clientUserId]"
- exit 0
- ;;
-esac
-
-java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout &
-
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 412c28ad5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/auth.pl
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2009 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
-# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
-# David McKnight (IBM) - [262013] [dstore][unix] RSE Daemon fails to start server on HP-UX
-# David McKnight (IBM) - [270015] rseserver fails to run on FreeBSD.
-#*******************************************************************************
-
-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];
- $dir=$passwdStruct[7]; # get the user's home dir
- #$passwd = $pass;
-
- $encryptedPWD = crypt($pwdIN, $passwd);
- $classpath=$ENV{CLASSPATH};
- $suOptions="-";
-
- if ($passwd eq $encryptedPWD)
- {
- print("success\n");
-
- $os = uname();
- chomp($os);
-
- if (lc($os) eq "linux")
- {
- $suOptions="-p";
- }
-
- # check for the existence of a home directory
- $homeDir=$dir;
- if (!(-e $homeDir))
- {
- $homeDir="/tmp/" . $userIN;
- }
-
- system("su $suOptions $userIN -c '$javaExe -Duser.home=$homeDir -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 e033d0390..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/daemon.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl -w
-#*******************************************************************************
-# Copyright (c) 2005, 2008 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 = "4075";
-$helpFlag = "-h";
-$dir = ".";
-
-if (defined($ARGV[0]))
-{
- $port = $ARGV[0];
-}
-
-
-$isHelp = $helpFlag cmp $port;
-if ($isHelp == 0)
-{
- print("command usage:\n");
- print("daemon.pl [<port> | <low port>-<high port>] [ <low server port>-<high server port>]\n");
- 0;
-}
-else
-{
- $user=`whoami`; chomp($user);
- $match = $user cmp "root";
-
- if ($match != 0)
- {
- print("WARNING: To run the server daemon, you must have root authority\n");
- }
-
- $trace="false";
- if (defined($ENV{DSTORE_TRACING_ON}))
- {
- $trace = $ENV{DSTORE_TRACING_ON};
- }
-
- $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";
- if (defined ($oldClasspath))
- {
- $ENV{CLASSPATH}="$ENV{CLASSPATH}:$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 9df8e6949..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/serverruntime/scripts/unix/server.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2005, 2008 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)
-# Patrick Juhl - Fix for unix (Parameters for port selection)
-# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters
-#*******************************************************************************
-# 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
-
-
-port=0;
-timeout=60000;
-clientUserID=$USER;
-
-if [ $# -gt 2 ]; then
- clientUserID=$3
-fi
-if [ $# -gt 1 ]; then
- timeout=$2
-fi
-if [ $# -gt 0 ]; then
- port=$1
-fi
-
-case x$port in
- x-h*) echo "Usage: server.sh [port] [timeout] [clientUserId]"
- exit 0
- ;;
-esac
-
-java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout &
-
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 18a5cca73..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, 2008 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 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=4075
-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
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 064582278..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 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 63dd00638..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/Activator.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/Activator.java
deleted file mode 100644
index ab2f5a642..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
- public static final String PLUGIN_ID = "org.eclipse.rse.services.dstore"; //$NON-NLS-1$
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/IDStoreMessageIds.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/IDStoreMessageIds.java
deleted file mode 100644
index 736540bbf..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/IDStoreMessageIds.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- ********************************************************************************/
-package org.eclipse.rse.internal.services.dstore;
-
-public interface IDStoreMessageIds {
-
- // 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$
-
- // --------------------------
- // 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_SOURCE = "RSEF1312"; //$NON-NLS-1$
- public static final String FILEMSG_DELETING = "RSEF1315"; //$NON-NLS-1$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.java
deleted file mode 100644
index 8c71b0ac5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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;
-
- // Remote File Exception Messages
- public static String FILEMSG_SECURITY_ERROR;
-
- public static String FILEMSG_SECURITY_ERROR_DETAILS;
-
- // --------------------------
- // UNIVERSAL FILE MESSAGES...
- // --------------------------
- public static String FILEMSG_DELETE_FILE_FAILED;
- public static String FILEMSG_RENAME_FILE_FAILED;
- public static String FILEMSG_CREATE_FILE_FAILED;
- public static String FILEMSG_CREATE_FILE_FAILED_EXIST;
- public static String FILEMSG_CREATE_FOLDER_FAILED_EXIST;
- public static String FILEMSG_COPY_FILE_FAILED;
-
- public static String FILEMSG_DELETE_FILE_FAILED_DETAILS;
- public static String FILEMSG_RENAME_FILE_FAILED_DETAILS;
- public static String FILEMSG_CREATE_FILE_FAILED_DETAILS;
- public static String FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS;
- public static String FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS;
- public static String FILEMSG_COPY_FILE_FAILED_DETAILS;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ServiceResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.properties b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.properties
deleted file mode 100644
index 8660f33b4..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/ServiceResources.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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:
-# David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# 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} KB of {1} KB complete ({2,number,percent})
-
-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.
-
-# REMOTE FILE SYSTEM EXCEPTION ERROR MESSAGES
-FILEMSG_SECURITY_ERROR=Operation failed. Security violation
-FILEMSG_SECURITY_ERROR_DETAILS=Message reported from file system: {0}
-
-
-# Universal File Messages
-FILEMSG_DELETE_FILE_FAILED=Deletion of the object {0} failed
-FILEMSG_DELETE_FILE_FAILED_DETAILS=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
-
-FILEMSG_RENAME_FILE_FAILED=Renaming of the object {0} failed
-FILEMSG_RENAME_FILE_FAILED_DETAILS=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
-
-FILEMSG_CREATE_FILE_FAILED=No authority or file name not valid
-FILEMSG_CREATE_FILE_FAILED_DETAILS=The file could not be created because of one of the following reasons:\n- the user does not have enough authority to create the file \n- the file name is not valid
-
-FILEMSG_CREATE_FILE_FAILED_EXIST=File already exists
-FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS=The new file {0} already exists
-
-FILEMSG_CREATE_FOLDER_FAILED_EXIST= Folder already exists
-FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS=The new folder {0} already exists
-
-FILEMSG_COPY_FILE_FAILED=Copy of the file or folder {0} failed
-FILEMSG_COPY_FILE_FAILED_DETAILS=The file system reported the copy operation failed. You may not have authority to the target folder, or it may be in use
-
-
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
deleted file mode 100644
index e0036e160..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
+++ /dev/null
@@ -1,2485 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kevin Doyle (IBM) - Fix 183870 - Display File Exists Error
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Xuan Chen (IBM) - [189681] [dstore][linux] Refresh Folder in My Home messes up Refresh in Root
- * Kushal Munir (IBM) - [189352] Replace with appropriate line end character on upload
- * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
- * David McKnight (IBM) - [196035] Wrapper SystemMessageExceptions for createFile and createFolder with RemoteFileSecurityException
- * Kevin Doyle (IBM) - [191548] Deleting Read-Only directory removes it from view and displays no error
- * Xuan Chen (IBM) - [202670] [Supertransfer] After doing a copy to a directory that contains folders some folders name's display "deleted"
- * Xuan Chen (IBM) - [190824] Incorrect result for DStore#getSeparator() function when parent is "/"
- * David McKnight (IBM) - [207095] check for null datastore
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * David McKnight (IBM) - [209423] Fix for null pointer - filter attributes need unique ids
- * David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * David McKnight (IBM) - [210812] for text transfer, need to honour the preference (instead of straight binary)
- * David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * David McKnight (IBM) - [209704] added supportsEncodingConversion()
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Radoslav Gerganov (ProSyst) - [216195] [dstore] Saving empty file fails
- * David McKnight (IBM) - [220379] [api] Provide a means for contributing custom BIDI encodings
- * David McKnight (IBM) - [225573] [dstore] client not falling back to single operation when missing batch descriptors (due to old server)
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * David McKnight (IBM) - [227406][api][dstore] need apis for getting buffer size in IDataStoreProvider
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * David McKnight (IBM) - [221211] [api][breaking][files] need batch operations to indicate which operations were successful
- * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
- * Martin Oberhuber (Wind River) - [235463][ftp][dstore] Incorrect case sensitivity reported on windows-remote
- * David McKnight (IBM) - [236039][dstore][efs] DStoreInputStream can report EOF too early - clean up how it waits for the local temp file to be created
- * David McKnight (IBM) - [240710] [dstore] DStoreFileService.getFile() fails with NPE for valid root files
- * David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
- * David McKnight (IBM) - [250168] some backward compatibility issues with old IBM dstore server
- * David McKnight (IBM) - [251429] Pasting local folder to remote does not work in some case
- * David McKnight (IBM) - [261375] [dstore] problem comparing virtual path when getting cached element
- * David McKnight (IBM) - [256609] [dstore] need to make sure element is resolved properly before finding it's command descriptors
- * David McKnight (IBM) - [270468] [dstore] FileServiceSubSystem.list() returns folders when only FILE_TYPE_FILES is requested
- * David McKnight (IBM) - [272335] [dstore] not handling case where upload fails
- * David McKnight (IBM) - [278411] [dstore] upload status needs to be created in standard form when using windows server
- * David McKnight (IBM) - [279014] [dstore][encoding] text file corruption can occur when downloading from UTF8 to cp1252
- * David McKnight (IBM) - [279695] [dstore] Connection file encoding is not refreshed from the host
- * David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
- * David McKnight (IBM) - [284056] Sychronize Cache causes the UI to hang with no way out
- * David McKnight (IBM) - [284420] nullprogressmonitor is needed
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-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.IDataStoreProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalByteStreamHandler;
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.internal.services.dstore.Activator;
-import org.eclipse.rse.internal.services.dstore.IDStoreMessageIds;
-import org.eclipse.rse.internal.services.dstore.ServiceResources;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.services.clientserver.IMatcher;
-import org.eclipse.rse.services.clientserver.IServiceConstants;
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-import org.eclipse.rse.services.dstore.util.DownloadListener;
-import org.eclipse.rse.services.dstore.util.FileSystemMessageUtil;
-import org.eclipse.rse.services.files.CodePageConverterManager;
-import org.eclipse.rse.services.files.HostFilePermissions;
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IFileServiceCodePageConverter;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.rse.services.files.PendingHostFilePermissions;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-
-public class DStoreFileService extends AbstractDStoreService implements IFileService, IFilePermissionsService
-{
-
- protected org.eclipse.dstore.core.model.DataElement _uploadLogElement = null;
- protected Map _fileElementMap;
- protected Map _dstoreFileMap;
-
- private int _bufferUploadSize = IUniversalDataStoreConstants.BUFFER_SIZE;
- private int _bufferDownloadSize = IUniversalDataStoreConstants.BUFFER_SIZE;
-
- protected ISystemFileTypes _fileTypeRegistry;
- private String remoteEncoding;
-
-
- protected boolean unixStyle = false;
-
- 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)
- {
- super(dataStoreProvider);
- _fileElementMap = new HashMap();
- _dstoreFileMap = new HashMap();
- _fileTypeRegistry = fileTypeRegistry;
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- _fileElementMap.clear();
- _dstoreFileMap.clear();
- _uploadLogElement = null;
- remoteEncoding = null;
- super.uninitService(monitor);
- }
-
- public String getName()
- {
- return ServiceResources.DStore_File_Service_Label;
- }
-
- public String getDescription()
- {
- return ServiceResources.DStore_File_Service_Description;
- }
-
- /**
- * Set the buffer upload size
- * @param size the new size
- */
- public void setBufferUploadSize(int size)
- {
- _bufferUploadSize = size;
- }
-
- /**
- * Set the buffer download size
- * @param size the new size
- */
- public void setBufferDownloadSize(int size)
- {
- _bufferDownloadSize = size;
- }
-
- protected int getBufferUploadSize()
- {
- return _bufferUploadSize;
- }
-
- protected int getBufferDownloadSize()
- {
- return _bufferDownloadSize;
- }
-
- protected String getMinerId()
- {
- return IUniversalDataStoreConstants.UNIVERSAL_FILESYSTEM_MINER_ID;
- }
-
- protected DataElement getMinerElement()
- {
- super.getMinerElement();
- if (_minerElement == null){
- // could be back-level version
- _minerElement = getMinerElement("com.ibm.etools.systems.universal.miners.UniversalFileSystemMiner"); //$NON-NLS-1$
- }
- return _minerElement;
- }
-
- private boolean isOldIBMMiner()
- {
- if (_minerElement != null){
- return _minerElement.getSource().equals("com.ibm.etools.systems.universal.miners.UniversalFileSystemMiner"); //$NON-NLS-1$
- }
- return false;
- }
-
- protected String getByteStreamHandlerId()
- {
- if (isOldIBMMiner())
- {
- // if so, use the old id
- return "com.ibm.etools.systems.universal.miners.UniversalByteStreamHandler"; //$NON-NLS-1$
- }
- return UniversalByteStreamHandler.class.getName();
- }
-
- protected String getDataStoreRoot()
- {
- DataStore ds = getDataStore();
- if (ds != null)
- return ds.getAttribute(DataStoreAttributes.A_LOCAL_PATH);
- return null;
- }
-
-
- 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)
- {
- DataStore ds = getDataStore();
- if (ds != null)
- ds.setAttribute(DataStoreAttributes.A_LOCAL_PATH, root);
- }
-
- protected DataElement findUploadLog()
- {
- DataElement minerInfo = getMinerElement();
- DataStore ds = getDataStore();
- if (_uploadLogElement == null || _uploadLogElement.getDataStore() != ds)
- {
- if (ds != null)
- {
- _uploadLogElement = ds.find(minerInfo, DE.A_NAME, "universal.uploadlog", 2); //$NON-NLS-1$
- }
- else
- {
- return null;
- }
- }
- return _uploadLogElement;
- }
-
-
-
- protected DataElement getAttributes(String fileNameFilter, boolean showHidden)
- {
- DataStore ds = getDataStore();
- if (ds != null)
- {
- String[] clonedAttributes = (String[])_filterAttributes.clone();
- clonedAttributes[DE.A_ID] = fileNameFilter;
-
- DataElement attributes = ds.createTransientObject(clonedAttributes);
- String version = IServiceConstants.VERSION_1;
- StringBuffer buffer = new StringBuffer();
- String filter = ((fileNameFilter == null) ? "*" : fileNameFilter); //$NON-NLS-1$
- buffer.append(version).append(IServiceConstants.TOKEN_SEPARATOR).append(filter).append(IServiceConstants.TOKEN_SEPARATOR).append(showHidden);
- attributes.setAttribute(DE.A_SOURCE, buffer.toString());
- return attributes;
- }
- else
- {
- return null;
- }
- }
-
-
-
- public void upload(InputStream inputStream, String remoteParent, String remoteFile, boolean isBinary,
- String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
- BufferedInputStream bufInputStream = null;
-
- boolean isCancelled = false;
-
- try
- {
- String byteStreamHandlerId = getByteStreamHandlerId();
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
-
- // create an empty file on the host and append data to it later
- // this handles the case of uploading empty files as well
- getDataStore().replaceFile(remotePath, new byte[] {}, 0, isBinary, byteStreamHandlerId);
-
-// 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);
-
- byte[] buffer = new byte[buffer_size];
- byte[] convBytes;
- int numToRead = 0;
-
- int available = bufInputStream.available();
-
-
- // line separator of local machine
- String localLineSep = System.getProperty("line.separator"); //$NON-NLS-1$
-
- // line separator of remote machine
- String targetLineSep = "\n"; //$NON-NLS-1$
-
- if (!unixStyle) {
- targetLineSep = "\r\n"; //$NON-NLS-1$
- }
-
- int localLineSepLength = localLineSep.length();
-
- 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;
-
- if (!isBinary && hostEncoding != null)
- {
- String tempStr = new String(buffer, 0, bytesRead);
-
- // if the line end characters of the local and remote machines are different, we need to replace them
- if (!localLineSep.equals(targetLineSep)) {
-
- int index = tempStr.indexOf(localLineSep);
-
- StringBuffer buf = new StringBuffer();
-
- boolean lineEndFound = false;
- int lastIndex = 0;
-
- while (index != -1) {
- buf = buf.append(tempStr.substring(lastIndex, index));
- buf = buf.append(targetLineSep);
-
- if (!lineEndFound) {
- lineEndFound = true;
- }
-
- lastIndex = index+localLineSepLength;
-
- index = tempStr.indexOf(localLineSep, lastIndex);
- }
-
- if (lineEndFound) {
- buf = buf.append(tempStr.substring(lastIndex));
- tempStr = buf.toString();
- }
- }
-
-
- convBytes = tempStr.getBytes(hostEncoding);
-
- // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, convBytes, convBytes.length, true, byteStreamHandlerId);
- }
- else // binary
- {
- // 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);
- }
- catch (UnsupportedEncodingException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
- catch (Exception e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
- finally
- {
-
- try
- {
-
- if (bufInputStream != null)
- bufInputStream.close();
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
-
-
- if (isCancelled)
- {
- throw new SystemOperationCancelledException();
- }
- }
- }
-
-
- public void upload(File file, String remoteParent, String remoteFile, boolean isBinary,
- String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
- FileInputStream inputStream = null;
- BufferedInputStream bufInputStream = null;
-
-
- boolean isCancelled = false;
- boolean transferSuccessful = false;
-
- long totalBytes = file.length();
-
- DataElement uploadLog = findUploadLog();
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
-
- DataStore ds = getDataStore();
-
- // use standard remote path
- String stdRemotePath = remotePath.replace('\\', '/');
- int numTransfers = 0;
- DataElement result = ds.find(uploadLog, DE.A_NAME, stdRemotePath,1);
- if (result == null)
- {
- result = ds.createObject(uploadLog, "uploadstatus", stdRemotePath); //$NON-NLS-1$
- result.setAttribute(DE.A_SOURCE, "running"); //$NON-NLS-1$
- result.setAttribute(DE.A_VALUE, ""); //$NON-NLS-1$
-
- DataElement cmd = getDataStore().findCommandDescriptor(DataStoreSchema.C_SET);
-
- ds.command(cmd, uploadLog, true);
- }
-
- try
- {
- String byteStreamHandlerId = getByteStreamHandlerId();
-
-
- // create an empty file and append data to it later
- // this handles the case of uploading empty files as well
- getDataStore().replaceFile(remotePath, new byte[] {}, 0, isBinary, byteStreamHandlerId);
-
- if (monitor != null)
- {
- monitor.setTaskName(file.getName());
- //subMonitor = new SubProgressMonitor(monitor, (int)totalBytes);
- }
-
-// 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);
-
- byte[] buffer = new byte[buffer_size];
- byte[] convBytes;
- int numToRead = 0;
-
- int available = bufInputStream.available();
-
- long totalSent = 0;
-
- // line separator of local machine
- String localLineSep = System.getProperty("line.separator"); //$NON-NLS-1$
-
- // line separator of remote machine
- String targetLineSep = "\n"; //$NON-NLS-1$
-
- if (!unixStyle) {
- targetLineSep = "\r\n"; //$NON-NLS-1$
- }
-
- int localLineSepLength = localLineSep.length();
-
- IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncoding, this);
-
-
- // upload bytes while available
- while (available > 0 && !isCancelled)
- {
- numTransfers++;
- numToRead = (available < buffer_size) ? available : buffer_size;
-
- int bytesRead = bufInputStream.read(buffer, 0, numToRead);
-
- if (bytesRead == -1)
- break;
-
- totalSent += bytesRead;
-
- if (!isBinary && srcEncoding != null && hostEncoding != null)
- {
- String tempStr = new String(buffer, 0, bytesRead, srcEncoding);
-
- // if the line end characters of the local and remote machines are different, we need to replace them
- if (!localLineSep.equals(targetLineSep)) {
-
- int index = tempStr.indexOf(localLineSep);
-
- StringBuffer buf = new StringBuffer();
-
- boolean lineEndFound = false;
- int lastIndex = 0;
-
- while (index != -1) {
- buf = buf.append(tempStr.substring(lastIndex, index));
- buf = buf.append(targetLineSep);
-
- if (!lineEndFound) {
- lineEndFound = true;
- }
-
- lastIndex = index+localLineSepLength;
-
- index = tempStr.indexOf(localLineSep, lastIndex);
- }
-
- if (lineEndFound) {
- buf = buf.append(tempStr.substring(lastIndex));
- tempStr = buf.toString();
- }
- }
-
-
- convBytes = codePageConverter.convertClientStringToRemoteBytes(remotePath, tempStr, hostEncoding, this);
-
- // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, convBytes, convBytes.length, true, byteStreamHandlerId);
- }
- else // binary
- {
- // append subsequent segments
- getDataStore().replaceAppendFile(remotePath, buffer, bytesRead, true, byteStreamHandlerId);
- }
-
-
- if (/*display != null &&*/ monitor != null)
- {
- double percent = (totalSent * 1.0) / totalBytes;
- monitor.worked(bytesRead);
- String str = MessageFormat.format(
- ServiceResources.DStore_Service_Percent_Complete_Message,
- new Object[] {
- new Long(totalSent / IUniversalDataStoreConstants.KB_IN_BYTES),
- new Long(totalBytes / IUniversalDataStoreConstants.KB_IN_BYTES),
- new Double(percent)
- });
- 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);
- }
- catch (UnsupportedEncodingException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
- catch (Exception e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
- finally
- {
-
- try
- {
-
- if (bufInputStream != null)
- bufInputStream.close();
-
-
- }
- catch (IOException e)
- {
-// UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e);
- throw new RemoteFileIOException(e);
- }
-
- if (isCancelled)
- {
- throw new SystemOperationCancelledException();
- }
-
- if (totalBytes > 0)
- {
- if (transferSuccessful)
- {
- if (numTransfers > 1){
- // forced sleep to make sure we get the latest status
- try {
- Thread.sleep(200);
- }
- catch (InterruptedException e){
- }
- }
-
- String resultStr = result.getSource();
- while (!resultStr.equals("success")) //$NON-NLS-1$
- {
- // sleep until the upload is complete
- try {
- Thread.sleep(200);
- }
- catch (InterruptedException e){
- }
-
- resultStr = result.getSource();
-
- if (resultStr.equals("failed") || (monitor != null && monitor.isCanceled())){ //$NON-NLS-1$
- String msgTxt = NLS.bind(ServiceResources.FILEMSG_COPY_FILE_FAILED, remotePath);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
- throw new SystemMessageException(msg);
- }
- }
-
-
- }
- }
- }
- }
-
-
- public void download(String remoteParent, String remoteFile, File localFile, boolean isBinary,
- String encoding, IProgressMonitor monitor) throws SystemMessageException
- {
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- //int mode = isBinary ? IUniversalDataStoreConstants.BINARY_MODE : IUniversalDataStoreConstants.TEXT_MODE;
- int mode = IUniversalDataStoreConstants.BINARY_MODE;
-
- makeSureLocalExists(localFile);
-
- 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(remoteParent, remoteFile, monitor);
- 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));
- 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,IUniversalDataStoreConstants.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));
-//long t1 = System.currentTimeMillis();
- 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(status, localFile, remotePath, fileLength, monitor);
- if (!dlistener.isDone())
- {
- try
- {
- dlistener.waitForUpdate();
- }
-
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- }
- }
-
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
-
- //long t2 = System.currentTimeMillis();
-// System.out.println("time="+(t2 - t1)/1000);
- // 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)
- {
- throw new RemoteFileIOException(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(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
- {
- if (!isBinary){ // do standard conversion if this is text!
- String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
-
- IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(encoding, this);
-
- try {
- codePageConverter.convertFileFromRemoteEncoding(remotePath, localFile, encoding, localEncoding, this);
- }
- catch (RuntimeException e){
- Throwable ex = e.getCause();
- StringBuffer msgTxtBuffer = new StringBuffer(RSEServicesMessages.FILEMSG_OPERATION_FAILED);
- msgTxtBuffer.append('\n');
- msgTxtBuffer.append('\n');
- msgTxtBuffer.append(remotePath);
- msgTxtBuffer.append('\n');
- msgTxtBuffer.append(encoding);
- msgTxtBuffer.append(" -> ");
- msgTxtBuffer.append(localEncoding);
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_IO_ERROR,
- IStatus.ERROR, msgTxtBuffer.toString(), ex);
- throw new SystemMessageException(msg);
- }
- }
- }
- else if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION))
- {
- localFile.delete();
-
- String msgTxt = ServiceResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_SECURITY_ERROR_DETAILS, IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
- else if (resultChild.getType().equals(IUniversalDataStoreConstants.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(IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION))
- {
- localFile.delete();
-
- String msgTxt = ServiceResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_SECURITY_ERROR_DETAILS, IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
-
- throw new SystemMessageException(msg);
- //IOException e = new IOException(resultChild.getName());
- //UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
- //throw new RemoteFileIOException(e);
- }
- }
-
- if (monitor != null)
- {
- //monitor.done();
- }
- }
-
- private void makeSureLocalExists(File localFile) throws SystemMessageException
- {
- if (!localFile.exists())
- {
- File parentDir = localFile.getParentFile();
- parentDir.mkdirs();
- }
-
- try
- {
- if (localFile.exists())
- localFile.delete();
- localFile.createNewFile();
- }
- catch (IOException e)
- {
- SimpleSystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage());
- throw new SystemMessageException(message);
- }
- }
-
- /**
- * Default implementation - just iterate through each file
- */
- public void downloadMultiple(String[] remoteParents, String[] remoteFiles,
- File[] localFiles, boolean[] isBinaries, String[] hostEncodings,
- IProgressMonitor monitor) throws SystemMessageException
- {
-
-
- List downloadListeners = new ArrayList();
- List remoteElements = new ArrayList();
-
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- // get the subjects
- String[] paths = getPathsFor(remoteParents, remoteFiles);
- DataElement[] des = getElementsFor(paths);
-
- DataElement queryCmd = null;
- DataElement bufferSizeElement = null;
-
- // if any elements are unresolved, do a query on them
- List unresolved = new ArrayList();
- for (int d = 0; d < des.length; d++)
- {
- DataElement de = des[d];
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- unresolved.add(de);
- }
- }
- // query the unresolved
- if (!unresolved.isEmpty())
- {
- String[] parents = new String[unresolved.size()];
- String[] names = new String[unresolved.size()];
- for (int u = 0; u < unresolved.size(); u++)
- {
- DataElement de = (DataElement)unresolved.get(u);
- parents[u] = de.getValue();
- names[u] = de.getName();
- }
-
- // I think the de should be reused since getElement should find it?
- getFileMultiple(parents, names, new ArrayList(10), monitor);
- }
-
-
- // kick off all downloads
- for (int i = 0; i < des.length; i++)
- {
- int mode = IUniversalDataStoreConstants.BINARY_MODE;
- DataElement de = des[i];
- String remotePath = paths[i];
-
- File localFile = localFiles[i];
- String hostEncoding = hostEncodings[i];
-
- makeSureLocalExists(localFile);
-
- 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));
- DataElement localElement = ds.createObject(universaltemp, de.getType(), localFile.getAbsolutePath(), hostEncoding);
-
- // only do this once
- if (bufferSizeElement == null)
- bufferSizeElement = ds.createObject(universaltemp, "buffer_size", "" + getBufferDownloadSize(), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- // only do this once
- if (queryCmd == null)
- queryCmd = getCommandDescriptor(de,IUniversalDataStoreConstants.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);
-
- DownloadListener dlistener = new DownloadListener(status, localFile, remotePath, fileLength, monitor);
- downloadListeners.add(dlistener);
- remoteElements.add(remoteElement);
- }
-
- // all downloads have been started
- // now wait for each to complete
- for (int j = 0; j < downloadListeners.size(); j++)
- {
- DownloadListener dlistener = (DownloadListener)downloadListeners.get(j);
- try
- {
- if (!dlistener.isDone())
- {
- try
- {
- dlistener.waitForUpdate();
- }
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- if (monitor.isCanceled()){
- return;
- }
- }
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
-
- // now wait till we have all the bytes local
- File localFile = localFiles[j];
- long localBytes = localFile.length();
- long lastLocalBytes = 0;
- long fileLength = dlistener.getTotalLength();
- while (localBytes < fileLength && (monitor == null || !monitor.isCanceled()) && lastLocalBytes != localBytes)
- {
- try
- {
- lastLocalBytes= localBytes;
- Thread.sleep(100);
- localBytes = localFile.length();
-
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
- }
-
- DataElement remoteElement = (DataElement)remoteElements.get(j);
- List resultList = remoteElement.getNestedData();
- DataElement resultChild = null;
-
- if (resultList != null)
- {
- for (int i = 0; i < resultList.size(); i++)
- {
-
- resultChild = (DataElement) resultList.get(i);
-
- if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
- {
- // do standard conversion if this is text!
- if (!isBinaries[i]){ // do standard conversion if this is text!
- String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
- IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncodings[i], this);
-
- try {
- codePageConverter.convertFileFromRemoteEncoding(remoteElement.getName(), localFile, hostEncodings[i], localEncoding, this);
- }
- catch (RuntimeException e){
- Throwable ex = e.getCause();
- StringBuffer msgTxtBuffer = new StringBuffer(RSEServicesMessages.FILEMSG_OPERATION_FAILED);
- msgTxtBuffer.append('\n');
- msgTxtBuffer.append('\n');
- msgTxtBuffer.append(remoteFiles[i]);
- msgTxtBuffer.append('\n');
- msgTxtBuffer.append(hostEncodings[i]);
- msgTxtBuffer.append(" -> ");
- msgTxtBuffer.append(localEncoding);
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_IO_ERROR,
- IStatus.ERROR, msgTxtBuffer.toString(), ex);
- throw new SystemMessageException(msg);
- }
- }
- }
- else if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION))
- {
- localFile.delete();
-
- String msgTxt = ServiceResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_SECURITY_ERROR_DETAILS, IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
- else if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION))
- {
- // TODO inspect this
- localFile.delete();
- String msgTxt = ServiceResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_SECURITY_ERROR_DETAILS, IUniversalDataStoreConstants.DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- //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(IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION))
- {
- localFile.delete();
- String msgTxt = ServiceResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_SECURITY_ERROR_DETAILS, IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- //IOException e = new IOException(resultChild.getName());
- //UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
- //throw new RemoteFileIOException(e);
- }
- else
- {
- // TODO inspect this
- localFile.delete();
- String msgTxt = ServiceResources.FILEMSG_SECURITY_ERROR;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_SECURITY_ERROR_DETAILS, IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_SECURITY_ERROR,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
- }
-
- if (monitor != null)
- {
- //monitor.done();
- }
- }
- }
- }
-
- /**
- * Default implementation - just iterate through each file
- */
- public void uploadMultiple(File[] localFiles, String[] remoteParents,
- String[] remoteFiles, boolean[] isBinaries, String[] srcEncodings,
- String[] hostEncodings, IProgressMonitor monitor)
- throws SystemMessageException
- {
- for (int i = 0; i < localFiles.length; i++)
- {
- File localFile = localFiles[i];
- String remoteParent = remoteParents[i];
- String remoteFile = remoteFiles[i];
-
- boolean isBinary = isBinaries[i];
- String srcEncoding = srcEncodings[i];
- String hostEncoding = hostEncodings[i];
- upload(localFile, remoteParent, remoteFile, isBinary, srcEncoding, hostEncoding, monitor);
- }
- }
-
- private DataElement getSubjectFor(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);
- String sep = getSeparator(remoteParent);
- if (sep.length()>0 && !remoteParent.endsWith(sep)) {
- buf.append(sep);
- }
- buf.append(name);
- de = getElementFor(buf.toString());
- }
- return de;
- }
-
- private DataElement[] getSubjectsFor(String[] remoteParents, String[] names)
- {
- List subjects = new ArrayList();
- for (int i = 0; i < remoteParents.length; i++)
- {
- DataElement de = getSubjectFor(remoteParents[i], names[i]);
- subjects.add(de);
- }
- return (DataElement[])subjects.toArray(new DataElement[subjects.size()]);
- }
-
- public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor)
- {
- DataElement de = null;
- if (remoteParent != null && remoteParent.length() > 0){
- // this is not a root
- de = getSubjectFor(remoteParent, name);
- }
- else {
- de = getElementFor(name);
- }
-
-
- // with 207095, it's possible to get here unconnected such that there is no element
- if (de != null) {
- if (isOldIBMMiner()){
- // only accepts filters for file queries
- if (!de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- StringBuffer buf = new StringBuffer(remoteParent);
- String sep = getSeparator(remoteParent);
- if (sep.length()>0 && !remoteParent.endsWith(sep)) {
- buf.append(sep);
- }
- buf.append(name);
- String fullPath = buf.toString();
- de.setAttribute(DE.A_NAME, fullPath);
- de.setAttribute(DE.A_VALUE, fullPath);
- de.setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- }
- }
-
- dsQueryCommand(de, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- //getFile call should also need to convert this DataElement into a HostFile using
- //convertToHostFile() call. This way, this DataElement will be put into _fileMap.
- return convertToHostFile(de);
- }
- else {
- return null;
- }
- }
-
- /**
- * Mass query of individual files
- */
- public void getFileMultiple(String remoteParents[], String names[], List hostFiles, IProgressMonitor monitor)
- throws SystemMessageException
- {
- DataElement[] subjects = getSubjectsFor(remoteParents, names);
-
- // construct default array of commands
- String[] queryStrings = new String[remoteParents.length];
- boolean oldMiner = isOldIBMMiner();
-
- for (int i = 0; i < queryStrings.length; i++)
- {
- queryStrings[i] = IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT;
- if (oldMiner){
- if (!subjects[i].getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- StringBuffer buf = new StringBuffer(remoteParents[i]);
- String sep = getSeparator(remoteParents[i]);
- if (sep.length()>0 && !remoteParents[i].endsWith(sep)) {
- buf.append(sep);
- }
- buf.append(names[i]);
- String fullPath = buf.toString();
- subjects[i].setAttribute(DE.A_NAME, fullPath);
- subjects[i].setAttribute(DE.A_VALUE, fullPath);
- subjects[i].setAttribute(DE.A_TYPE, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
- }
- }
- }
-
- dsQueryCommandMulti(subjects, null, queryStrings, monitor);
-
- IHostFile[] result = convertToHostFiles(subjects, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, "*"); //$NON-NLS-1$
- hostFiles.addAll(Arrays.asList(result));
- }
-
- /**
- * 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() < 1) return "/"; //$NON-NLS-1$
- if (parentPath.length() == 1)
- {
- //deal with the case where parentPath has only one character here
- //since the code below assumes parentPath has at least two characters.
- if (parentPath.charAt(0) == '/')
- {
- return ""; //$NON-NLS-1$
- }
- else
- {
- //If only one character, but not '/', just return "/" as default. But this should not happen.
- 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);
- _dstoreFileMap.put(path, file);
- return file;
- }
- protected IHostFile[] convertToHostFiles(DataElement[] elements, String queryType, String fileFilter)
- {
- 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);
- }
- ArrayList results = new ArrayList(elements.length);
- for (int i = 0; i < elements.length; i++)
- {
- DataElement element = elements[i];
- if (element != null && !element.isDeleted() && element.getType() != null)
- {
- String type = element.getType();
- // filter files
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
- {
- if (filematcher.matches(element.getName()))
- {
- if (!queryType.equals(IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS)){ // don't add file if folder query
- results.add(convertToHostFile(element));
- }
- }
- }
- else
- {
- if (!queryType.equals(IUniversalDataStoreConstants.C_QUERY_VIEW_FILES)){ // don't add folder if a file query
- results.add(convertToHostFile(element));
- }
- }
- }
- }
- return (IHostFile[]) results.toArray(new IHostFile[results.size()]);
- }
-
-
-
- public IHostFile getUserHome()
- {
- return getFile(".", ".",null); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
- DataElement de = getElementFor(remotePath);
-
-
- DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_CREATE_FILE, monitor);
-
- if (status == null) return null;
-
- if (null != monitor && monitor.isCanceled())
- {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_OPERATION_CANCELLED);
- //This operation has been cancelled by the user.
- throw new SystemMessageException(msg);
- }
-
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
- return new DStoreHostFile(de);
- else if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.FAILED_WITH_EXIST))
- {
- String msgTxt = ServiceResources.FILEMSG_CREATE_FILE_FAILED_EXIST;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS, remotePath);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_CREATE_FILE_FAILED_EXIST,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
- else
- {
- // for 196035 - throwing security exception instead of message exception
- String msgTxt = ServiceResources.FILEMSG_CREATE_FILE_FAILED;
- String msgDetails = ServiceResources.FILEMSG_CREATE_FILE_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_CREATE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
-
- Exception e= new SystemMessageException(msg);
- RemoteFileSecurityException messageException = new RemoteFileSecurityException(e);
- throw messageException;
- }
- }
-
- public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + folderName;
- DataElement de = getElementFor(remotePath);
-
- DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_CREATE_FOLDER, monitor);
-
- if (status == null) return null;
-
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL,
- CommonMessages.MSG_OPERATION_CANCELLED));
- }
-
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
- return new DStoreHostFile(de);
- else if(FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.FAILED_WITH_EXIST))
- {
- String msgTxt = ServiceResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS, remotePath);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_CREATE_FOLDER_FAILED_EXIST,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
- else
- {
- String msgTxt = ServiceResources.FILEMSG_CREATE_FILE_FAILED;
- String msgDetails = NLS.bind(ServiceResources.FILEMSG_CREATE_FILE_FAILED_DETAILS, remotePath);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_CREATE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
- // for 196035 - throwing security exception instead of message exception
- Exception e= new SystemMessageException(msg);
- RemoteFileSecurityException messageException = new RemoteFileSecurityException(e);
- throw messageException;
- //throw new SystemMessageException(getMessage("RSEF1304").makeSubstitution(remotePath)); //$NON-NLS-1$
- }
-
- }
-
- public void delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
- DataElement de = getElementFor(remotePath);
- // if we don't have a proper element, we won't have a command descriptor
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- // need to fetch
- dsQueryCommand(de, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
-
- DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_DELETE, monitor);
- if (status == null)
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED));
-
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL,
- CommonMessages.MSG_OPERATION_CANCELLED));
- }
- String sourceMsg = FileSystemMessageUtil.getSourceMessage(status);
- // When running a server older than 2.0.1 success is not set for directories, so we must
- // check if the source message is an empty string
- if (sourceMsg.equals(IServiceConstants.SUCCESS) || sourceMsg.equals("")) { //$NON-NLS-1$
- return;
- }
- String msgTxt = NLS.bind(ServiceResources.FILEMSG_DELETE_FILE_FAILED, FileSystemMessageUtil.getSourceLocation(status));
- String msgDetails = ServiceResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_DELETE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
- throw new SystemMessageException(msg);
- }
-
-
- public void deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
- {
- if (remoteParents.length == 1) {
- delete(remoteParents[0], fileNames[0], monitor);
- return;
- }
-
- 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 we don't have a proper element, we won't have a command descriptor
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- // need to fetch
- dsQueryCommand(de, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
-
- if (de != null)
- dataElements.add(de);
- }
-
- DataElement status = dsStatusCommand((DataElement) dataElements.get(0), dataElements, IUniversalDataStoreConstants.C_DELETE_BATCH, monitor);
- if (status != null)
- {
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_OPERATION_CANCELLED));
- }
- String sourceMsg = FileSystemMessageUtil.getSourceMessage(status);
- // When running a server older than 2.0.1 success is not set for directories, so we must
- // check if the source message is an empty string
- if (sourceMsg.equals(IServiceConstants.SUCCESS) || sourceMsg.equals("")) { //$NON-NLS-1$
- return;
- }
- String msgTxt = NLS.bind(ServiceResources.FILEMSG_DELETE_FILE_FAILED, FileSystemMessageUtil.getSourceLocation(status));
- String msgDetails = ServiceResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_DELETE_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
- throw new SystemMessageException(msg);
- }
- else {
- // no delete batch descriptor so need to fall back to single command approach
- for (int i = 0; i < remoteParents.length; i++){
- String parent = remoteParents[i];
- String name = fileNames[i];
- delete(parent, name, monitor);
- }
- }
- }
-
- public void rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException
- {
- String oldPath, newPath = null;
- // if remoteParent is null or empty then we are doing a move
- if (remoteParent == null || remoteParent == "") //$NON-NLS-1$
- {
- oldPath = oldName;
- newPath = newName;
- }
- else
- {
- oldPath = remoteParent + getSeparator(remoteParent) + oldName;
- newPath = remoteParent + getSeparator(remoteParent) + newName;
- }
-
- DataElement de = getElementFor(oldPath);
- // if we don't have a proper element, we won't have a command descriptor
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- // need to fetch
- dsQueryCommand(de, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
-
- // new servers use the full path
- de.setAttribute(DE.A_SOURCE, newPath);
-
-
- DataElement status = dsStatusCommand(de, IUniversalDataStoreConstants.C_RENAME, monitor);
-
- if (status != null && status.getAttribute(DE.A_SOURCE).equals("failed"))
- {
- // in the patch for bug 196211, a change was made to the UniversalFileSystemMiner that
- // had the rename expecting the full path in the A_SOURCE attribute itself
- // prior to that, we constructed the target file name from the value and the source
- // I must have missed that while reviewing
-
- // this is our attempt at recovering, but doing the operation with the old
- // format. Old servers only used the name for the source attribute on C_RENAME
- de.setAttribute(DE.A_SOURCE, newName);
-
- // trying again
- status = dsStatusCommand(de, IUniversalDataStoreConstants.C_RENAME, monitor);
- }
-
-
- if (status == null)
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED));
-
- if (null != monitor && monitor.isCanceled())
- {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_OPERATION_CANCELLED);
- //This operation has been cancelled by the user.
- throw new SystemMessageException(msg);
- }
- if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) {
- return;
- }
- String msgTxt = NLS.bind(ServiceResources.FILEMSG_RENAME_FILE_FAILED, FileSystemMessageUtil.getSourceLocation(status));
- String msgDetails = ServiceResources.FILEMSG_RENAME_FILE_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_RENAME_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
- throw new SystemMessageException(msg);
- }
-
- public void rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException
- {
- rename(remoteParent, oldName, newName, monitor);
- String newPath = remoteParent + getSeparator(remoteParent) + newName;
- oldFile.renameTo(newPath);
- }
-
- protected void moveByCopy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
- {
- copy(srcParent, srcName, tgtParent, tgtName, monitor);
- try
- {
- delete(srcParent, srcName, monitor);
- }
- catch (SystemMessageException exc)
- {
- if (null != monitor && monitor.isCanceled())
- {
- //This mean the copy operation is ok, but delete operation has been cancelled by user.
- //The delete() call will take care of recovered from the cancel operation.
- //So we need to make sure to remove the already copied file/folder.
- getFile(tgtParent, tgtName, null); //need to call getFile first to put this object into DataElement map first
- //otherwise it type will default to FilterObject, and could not be deleted properly for virtual object.
- delete(tgtParent, tgtName, null);
- }
- throw exc;
- }
- }
-
- public void move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
- {
- String src = srcParent + getSeparator(srcParent) + srcName;
- String tgt = tgtParent + getSeparator(tgtParent) + tgtName;
- boolean isVirtual = ArchiveHandlerManager.isVirtual(src) || ArchiveHandlerManager.isVirtual(tgt);
- boolean isArchive = ArchiveHandlerManager.getInstance().isRegisteredArchive(tgt);
- if (isVirtual || isArchive)
- {
- moveByCopy(srcParent, srcName, tgtParent, tgtName, monitor);
- return;
- }
- else
- {
- try
- {
- rename("", src, tgt, monitor); //$NON-NLS-1$
- return;
- }
- catch (SystemMessageException e)
- {
- moveByCopy(srcParent, srcName, tgtParent, tgtName, monitor);
- return;
- }
- }
-
-/*
- // 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 void copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) 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(tgtDE, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
-
- DataElement cpCmd = getCommandDescriptor(tgtDE, IUniversalDataStoreConstants.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(IServiceConstants.FAILED)) {
-
- String msgTxt = NLS.bind(ServiceResources.FILEMSG_COPY_FILE_FAILED, srcName);
- String msgDetails = ServiceResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_COPY_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
- throw new SystemMessageException(msg);
- }
- }
- catch (InterruptedException e)
- {
- if (monitor != null && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_OPERATION_CANCELLED));
- }
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
- }
- }
- else {
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED));
- }
- }
-
- public void copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException
- {
- DataStore ds = getDataStore();
-
- DataElement tgtDE = getElementFor(tgtParent);
- if (tgtDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- // get the property queried object
- dsQueryCommand(tgtDE, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
- DataElement cpCmd = getCommandDescriptor(tgtDE, IUniversalDataStoreConstants.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);
- // if we don't have a proper element, we won't have a command descriptor
- if (srcDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- // need to fetch
- dsQueryCommand(srcDE, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
- args.add(srcDE);
- }
- DataElement status = ds.command(cpCmd, args, tgtDE, true);
-
- try
- {
- getStatusMonitor(ds).waitForUpdate(status, monitor);
-
- if (status.getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED)) {
-
- String msgTxt = NLS.bind(ServiceResources.FILEMSG_COPY_FILE_FAILED, srcNames[0]);
- String msgDetails = ServiceResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IDStoreMessageIds.FILEMSG_COPY_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails);
-
- throw new SystemMessageException(msg);
- }
- }
- catch (InterruptedException e)
- {
- if (monitor != null && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_OPERATION_CANCELLED));
- }
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- }
- else {
- // no copy batch descriptor so need to fall back to single command approach
- for (int i = 0; i < srcParents.length; i++){
- String parent = srcParents[i];
- String name = srcNames[i];
- copy(parent, name, tgtParent, name, monitor);
- }
- }
- }
-
-
-
-
-
- public IHostFile[] getRoots(IProgressMonitor monitor)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- DataStore ds = getDataStore();
- DataElement universaltemp = getMinerElement();
-
- // create filter descriptor
- DataElement deObj = ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, "", "", "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- DataElement[] results = dsQueryCommand(deObj, IUniversalDataStoreConstants.C_QUERY_ROOTS, monitor);
-
- return convertToHostFiles(results, IUniversalDataStoreConstants.C_QUERY_ROOTS, "*"); //$NON-NLS-1$
- }
-
- private String getQueryString(int fileType)
- {
- String queryString = null;
- switch (fileType)
- {
- case IFileService.FILE_TYPE_FILES:
- queryString = IUniversalDataStoreConstants.C_QUERY_VIEW_FILES;
- break;
-
- case IFileService.FILE_TYPE_FOLDERS:
- queryString = IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS;
- break;
-
- case IFileService.FILE_TYPE_FILES_AND_FOLDERS:
- default:
- queryString = IUniversalDataStoreConstants.C_QUERY_VIEW_ALL;
- break;
- }
- return queryString;
- }
-
- private String[] getQueryStrings(int[] fileTypes)
- {
- String[] queryStrings = new String[fileTypes.length];
- for (int i = 0; i < fileTypes.length; i++)
- {
- switch (fileTypes[i])
- {
- case IFileService.FILE_TYPE_FILES:
- queryStrings[i] = IUniversalDataStoreConstants.C_QUERY_VIEW_FILES;
- break;
-
- case IFileService.FILE_TYPE_FOLDERS:
- queryStrings[i] = IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS;
- break;
-
- case IFileService.FILE_TYPE_FILES_AND_FOLDERS:
- default:
- queryStrings[i] = IUniversalDataStoreConstants.C_QUERY_VIEW_ALL;
- break;
- }
- }
- return queryStrings;
- }
-
- public IHostFile[] list(String remoteParent, String fileFilter, int fileType, IProgressMonitor monitor)
- {
- String queryString = getQueryString(fileType);
- return fetch(remoteParent, fileFilter, queryString, monitor);
- }
-
-
- public void listMultiple(String[] remoteParents,
- String[] fileFilters, int[] fileTypes, List hostFiles, IProgressMonitor monitor)
- throws SystemMessageException
- {
- String[] queryStrings = getQueryStrings(fileTypes);
-
- IHostFile[] result = fetchMulti(remoteParents, fileFilters, queryStrings, monitor);
- hostFiles.addAll(Arrays.asList(result));
- }
-
- public void listMultiple(String[] remoteParents,
- String[] fileFilters, int fileType, List hostFiles, IProgressMonitor monitor)
- throws SystemMessageException
- {
- String queryString = getQueryString(fileType);
-
- // create array of the same query string
- String[] queryStrings = new String[remoteParents.length];
- for (int i = 0; i < remoteParents.length; i++)
- {
- queryStrings[i] = queryString;
- }
-
- IHostFile[] result = fetchMulti(remoteParents, fileFilters, queryStrings, monitor);
- hostFiles.addAll(Arrays.asList(result));
- }
-
- protected String[] getPathsFor(String[] remoteParents, String[] remoteFiles)
- {
- String[] results = new String[remoteParents.length];
- String sep = null;
- for (int i = 0; i < remoteParents.length; i++)
- {
- String remoteParent = remoteParents[i];
- String remoteFile = remoteFiles[i];
- if (sep == null)
- {
- sep = getSeparator(remoteParent);
- }
-
- results[i] = remoteParent + sep + remoteFile;
- }
- return results;
- }
-
-
- protected DataElement[] getElementsFor(String[] paths)
- {
- DataElement[] results = new DataElement[paths.length];
- for (int i = 0; i < paths.length; i++)
- {
- results[i] = getElementFor(paths[i]);
- }
- return results;
- }
-
- protected DataElement getElementFor(String path)
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
-
- DataStore ds = getDataStore();
-
- // with 207095, it's possible to get here when disconnected and no dstore
- if (ds == null){
- return null;
- }
-
- String normalizedPath = PathUtility.normalizeUnknown(path);
- DataElement element = (DataElement)_fileElementMap.get(normalizedPath);
- if (element != null)
- {
- if (element.isDeleted()){
- _fileElementMap.remove(normalizedPath);
- element = null;
- }
- else {
- // make sure the mapping is still correct
- // the file could have been renamed before as in bug 251429
- String fparent = element.getValue();
- StringBuffer pathBuf = new StringBuffer(fparent);
- String sep = PathUtility.getSeparator(fparent);
- if (!fparent.endsWith(sep)){
- pathBuf.append(sep);
- }
- pathBuf.append(element.getName());
- if (!normalizedPath.equals(pathBuf.toString())){
- _fileElementMap.remove(normalizedPath);
- element = null;
- }
- }
- }
- if (element == null || element.isDeleted())
- {
- DataElement universaltemp = getMinerElement();
- element = ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, "", false); //$NON-NLS-1$
- }
- return element;
- }
-
-
- /**
- * Get a dstore IHostFile object for the given absolute path, provided
- * that the file object has been accessed before and is available in our
- * file map.
- * @param path absolute file path identifying the remote object
- * @return Requested file object or <code>null</code> if there isn't one mapped right now
- */
- public IHostFile getHostFile(String path)
- {
- return (IHostFile)_dstoreFileMap.get(path);
- }
-
- protected IHostFile[] fetch(String remoteParent, String fileFilter, String queryType, IProgressMonitor monitor)
- {
- DataStore ds = getDataStore();
- if (ds == null)
- {
- return new IHostFile[0];
- }
-
- // create filter descriptor
- DataElement deObj = getElementFor(remoteParent);
- if (deObj == null)
- {
- DataElement universaltemp = getMinerElement();
- ds.createObject(universaltemp, IUniversalDataStoreConstants.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(deObj, args, queryType, monitor);
- return convertToHostFiles(results, queryType, fileFilter);
- }
-
- /**
- * Fetch multiple results (for different parents an filters
- *
- * @param remoteParents the parents to query
- * @param fileFilters the filters for each parent to query
- * @param queryTypes the type of queries (for each parent) - files, folders, both, etc
- * @param monitor the progress monitor
- * @return the results
- */
- protected IHostFile[] fetchMulti(String[] remoteParents, String[] fileFilters, String[] queryTypes, IProgressMonitor monitor)
- {
- DataStore ds = getDataStore();
- if (ds == null)
- {
- return new IHostFile[0];
- }
-
- ArrayList[] argses = new ArrayList[remoteParents.length];
- DataElement subjects[] = new DataElement[remoteParents.length];
-
- for (int i = 0; i < remoteParents.length; i++)
- {
- // create filter descriptor
- DataElement deObj = getElementFor(remoteParents[i]);
- if (deObj == null)
- {
- DataElement universaltemp = getMinerElement();
- deObj = ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, remoteParents[i], remoteParents[i], "", false); //$NON-NLS-1$
- }
- subjects[i] = deObj;
-
- DataElement attributes = getAttributes(fileFilters[i], true);
- ArrayList args = new ArrayList(1);
- args.add(attributes);
- argses[i] = args;
- }
-
- List consolidatedResults = dsQueryCommandMulti(subjects, argses, queryTypes, monitor);
- List convertedResults = new ArrayList();
- for (int r = 0; r < consolidatedResults.size(); r++)
- {
- IHostFile[] results = convertToHostFiles((DataElement[])consolidatedResults.get(r), queryTypes[r],fileFilters[r]);
- for (int c = 0; c < results.length; c++)
- {
- convertedResults.add(results[c]);
- }
- }
-
- return (IHostFile[])convertedResults.toArray(new IHostFile[consolidatedResults.size()]);
- }
-
- public boolean isCaseSensitive()
- {
- return this.unixStyle;
- }
-
- public void setLastModified(String parent, String name,
- long timestamp, IProgressMonitor monitor) throws SystemMessageException
- {
- String remotePath = parent + getSeparator(parent) + name;
- DataElement de = getElementFor(remotePath);
- // if we don't have a proper element, we won't have a command descriptor
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- // need to fetch
- dsQueryCommand(de, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
-
- DataStore ds = de.getDataStore();
- if (ds != null)
- {
- DataElement setCmd = getCommandDescriptor(de, IUniversalDataStoreConstants.C_SET_LASTMODIFIED);
- if (setCmd != null)
- {
- // first modify the source attribute to temporarily be the date field
- de.setAttribute(DE.A_SOURCE, timestamp + ""); //$NON-NLS-1$
- ds.command(setCmd, de, true);
- return;
- }
- }
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED));
- }
-
- public void setReadOnly(String parent, String name,
- boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
- {
- String remotePath = parent + getSeparator(parent) + name;
- DataElement de = getElementFor(remotePath);
- // if we don't have a proper element, we won't have a command descriptor
- if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)){
- // need to fetch
- dsQueryCommand(de, null, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT, monitor);
- }
-
- DataStore ds = de.getDataStore();
- if (ds != null)
- {
- DataElement setCmd = getCommandDescriptor(de, IUniversalDataStoreConstants.C_SET_READONLY);
- if (setCmd != null)
- {
- String flag = readOnly ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
- de.setAttribute(DE.A_SOURCE, flag);
- DataElement status = ds.command(setCmd, de, true);
- try
- {
- getStatusMonitor(ds).waitForUpdate(status);
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(e);
- }
- return;
- }
- }
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED));
- }
-
- /**
- * Queries the remote system for the platform encoding.
- * @see org.eclipse.rse.services.files.IFileService#getEncoding(org.eclipse.core.runtime.IProgressMonitor)
- * @since 2.0
- */
- public String getEncoding(IProgressMonitor monitor) throws SystemMessageException {
-
- if (remoteEncoding == null) {
-
- DataStore ds = getDataStore();
- if (ds != null)
- {
- DataElement encodingElement = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_TEMP_DESCRIPTOR, ""); //$NON-NLS-1$
-
- DataElement queryCmd = ds.localDescriptorQuery(encodingElement.getDescriptor(),IUniversalDataStoreConstants.C_SYSTEM_ENCODING);
-
- DataElement status = ds.command(queryCmd, encodingElement, true);
-
- try {
- getStatusMonitor(ds).waitForUpdate(status);
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- remoteEncoding = encodingElement.getValue();
- }
- }
-
- return remoteEncoding;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getInputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException
- {
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
- int mode;
-
- if (isBinary)
- {
- mode = IUniversalDataStoreConstants.BINARY_MODE;
- }
- else
- {
- mode = IUniversalDataStoreConstants.TEXT_MODE;
- }
- DStoreInputStream inputStream = new DStoreInputStream(getDataStore(), remotePath, getMinerElement(), getEncoding(monitor), mode, getBufferDownloadSize());
- return inputStream;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getOutputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
- return getOutputStream(remoteParent, remoteFile, options, monitor);
- }
-
-
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
- int mode;
-
- if ((options & IFileService.TEXT_MODE) == 0)
- {
- mode = IUniversalDataStoreConstants.BINARY_MODE;
- }
- else
- {
- mode = IUniversalDataStoreConstants.TEXT_MODE;
- }
-
- DStoreOutputStream outputStream = new DStoreOutputStream(getDataStore(), remotePath, getEncoding(monitor), mode, unixStyle, options);
- return outputStream;
- }
-
- /**
- * Sets whether this is a Unix-style file system or a Windows-style file system. The
- * default is Windows if this is not called. The creator of this class should call this to set the type of the file system.
- * @param isUnixStyle <code>true<code> if this is a Unix-style file system, <code>false</code> otherwise.
- */
- public void setIsUnixStyle(boolean isUnixStyle) {
- this.unixStyle = isUnixStyle;
- }
-
- public boolean supportsEncodingConversion(){
- return true;
- }
-
-
- public IHostFilePermissions getFilePermissions(IHostFile rfile, IProgressMonitor monitor)
- throws SystemMessageException {
- DStoreHostFile file = (DStoreHostFile)rfile;
- IHostFilePermissions result = file.getPermissions();
- if (result == null || result instanceof PendingHostFilePermissions){
- /*
- * // for now, leaving this to the adapter since it needs to prevent duplicate jobs
- if (result == null) { // create a pending one
- result = new PendingHostFilePermissions();
- file.setPermissions(result);
- }
- */
-
- DataElement remoteFile = file.getDataElement();
-
- DataElement status = dsStatusCommand(remoteFile, IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS, monitor);
- if (status != null) {
- int permissionsInt = 0;
-
- // access string in the form <octal permissions>|<user>|<group>
- String permissionsStr = status.getSource();
-
- if (permissionsStr != null && permissionsStr.length() > 0) {
- String[] permAttributes = permissionsStr.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
-
- // permissions bits
- String accessString = permAttributes[0];
- try
- {
- int accessInt = Integer.parseInt(accessString, 8);
- permissionsInt = accessInt; // leave permissions in decimal
- }
- catch (Exception e){
- throw new RemoteFileIOException(e);
- }
-
- // user
- String user = permAttributes[1];
-
- // group
- String group = permAttributes[2];
-
- result = new HostFilePermissions(permissionsInt, user, group);
- file.setPermissions(result);
- }
- }
- }
-
- return result;
- }
-
- public void setFilePermissions(IHostFile file,
- IHostFilePermissions permissions, IProgressMonitor monitor)
- throws SystemMessageException {
- DataElement remoteFile = ((DStoreHostFile)file).getDataElement();
-
- ArrayList args = new ArrayList();
- int bits = permissions.getPermissionBits();
- String permissionsInOctal = Integer.toOctalString(bits); // from decimal to octal
- String user = permissions.getUserOwner();
- String group = permissions.getGroupOwner();
-
- String permissionsStr = permissionsInOctal + '|' + user + '|' + group;
- DataElement newPermissionsElement = getDataStore().createObject(null, "permissions", permissionsStr); //$NON-NLS-1$
- args.add(newPermissionsElement);
-
- DataElement status = dsStatusCommand(remoteFile, args, IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS, monitor);
- if (status != null)
- {
- // check status to make sure the file really changed
- if (file instanceof IHostFilePermissionsContainer){
- ((IHostFilePermissionsContainer)file).setPermissions(permissions); // set to use new permissions
- }
-
- }
- }
-
- public int getCapabilities(IHostFile file) {
- int capabilities = 0;
- // dstore supports setting and getting
- if (file == null){
- capabilities = IFilePermissionsService.FS_CAN_GET_ALL | IFilePermissionsService.FS_CAN_SET_ALL;
- }
- else if (file instanceof DStoreVirtualHostFile){
- // no virtual support right now
- return capabilities;
- }
- else {
-
- DataElement remoteFile = ((DStoreHostFile)file).getDataElement();
- DataElement getCmd = getCommandDescriptor(remoteFile, IUniversalDataStoreConstants.C_QUERY_FILE_PERMISSIONS);
- DataElement setCmd = getCommandDescriptor(remoteFile, IUniversalDataStoreConstants.C_SET_FILE_PERMISSIONS);
-
- if (getCmd != null){
- capabilities = capabilities | IFilePermissionsService.FS_CAN_GET_ALL;
- }
- if (setCmd != null){
- capabilities = capabilities | IFilePermissionsService.FS_CAN_SET_ALL;
- }
- }
- return capabilities;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java
deleted file mode 100644
index 5b8d862e6..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreHostFile.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Xuan Chen (IBM) - [189041] incorrect file name after rename a file inside a zip file - DStore Windows
- * Xuan Chen (IBM) - [187548] Editor shows incorrect file name after renaming file on Linux dstore
- * Kevin Doyle (IBM) - [191548] Various NPE fixes
- * David McKnight (IBM) - [235471] DStoreHostFile.getParentPath() breaks API contract for Root files
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-
-public class DStoreHostFile implements IHostFile, IHostFilePermissionsContainer
-{
- 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;
- protected String _absolutePath;
- protected IHostFilePermissions _permissions;
-
- public DStoreHostFile(DataElement element)
- {
- _element = element;
- init();
- _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()
- {
- if (_element.getName() == null) {
- // file was deleted on the host
- return null;
- }
- String type = _element.getType();
- if (type != null && 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()
- {
- if (_element.getName() == null) {
- // file was deleted on the host
- return null;
- }
- String type = _element.getType();
- if (type != null && type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- // filter doesn't separate path from name
- String path = _element.getName();
- return getParentPathFromPath(path);
- }
- else
- {
- if (isRoot()){ // IFileService.getParentPath() contract states a root must return null
- return null;
- }
-
- 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 "true".equals(str); //$NON-NLS-1$
- }
- }
- }
-
- public boolean isDirectory()
- {
- String type = _element.getType();
- if (type != null && (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 (name == null) {
- // file was deleted on the host
- return false;
- }
- if (parentPath == null ||
- parentPath.length() == 0 ||
- (name.length() == 0 && (parentPath.equals("/") || parentPath.endsWith(":\\")) || //$NON-NLS-1$ //$NON-NLS-2$
- (name.equals(parentPath) && parentPath.endsWith(":\\"))) //$NON-NLS-1$
- )
-
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public boolean isFile()
- {
- String type = _element.getType();
- if (type != null && (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()
- {
- return _absolutePath;
- }
-
- private void init()
- {
- // set the absolute path
- String name = _element.getName();
- String value = _element.getValue();
- if (name == null)
- {
- // this element is deleted
- _absolutePath = ""; //$NON-NLS-1$
- }
- else if (name.length() == 0)
- {
- _absolutePath = value;
- }
- else
- {
- String parentPath = getParentPath();
- String type = _element.getType();
- if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
- {
- _absolutePath = name;
- }
- else if (name.length() == 0)
- {
- _absolutePath = PathUtility.normalizeUnknown(parentPath);
- }
- else if (name == value)
- {
- _absolutePath = name;
- }
- else
- {
- _absolutePath = 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);
- if (str != null && str.length() > 0)
- {
- return Long.parseLong(str);
- }
- return 0;
- }
-
- protected static long getModifiedDate(String attributes)
- {
- String str = getAttribute(attributes, ATTRIBUTE_MODIFIED_DATE);
- if (str != null && str.length() > 0)
- {
- return Long.parseLong(str);
- }
- return 0;
- }
-
- protected static String getAttribute(String attributes, int index)
- {
- if (attributes != null)
- {
- String[] str = attributes.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- if (str.length > index){
- return str[index];
- }
- }
- return null;
- }
-
- public void renameTo(String newAbsolutePath)
- {
- String current = getName();
- String backupNewAbsolutePath = newAbsolutePath;
- newAbsolutePath = ArchiveHandlerManager.cleanUpVirtualPath(newAbsolutePath);
- int lastSep = newAbsolutePath.lastIndexOf('/');
- if (lastSep == -1)
- lastSep = newAbsolutePath.lastIndexOf('\\');
-
- String newName = null;
- if (lastSep != -1)
- {
- newName = newAbsolutePath.substring(lastSep + 1);
- }
- else
- {
- newName = newAbsolutePath;
- }
-
- if (newName.equals(current))
- {
- // data element already updated
- }
- else
- {
-
-
- _element.setAttribute(DE.A_NAME, newName);
- }
- _absolutePath = backupNewAbsolutePath;
-
- _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 "true".equals(str); //$NON-NLS-1$
- }
-
- public boolean canWrite() {
- String str = getAttribute(_element.getSource(), ATTRIBUTE_CAN_WRITE);
- return "true".equals(str); //$NON-NLS-1$
- }
-
- public void setPermissions(IHostFilePermissions permissions){
- _permissions = permissions;
- }
-
- public IHostFilePermissions getPermissions() {
- return _permissions;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreInputStream.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreInputStream.java
deleted file mode 100644
index fa43a67c2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreInputStream.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - [199561][efs][dstore] Eclipse hangs when manipulating empty file
- * David McKnight (IBM) - [234637] [dstore][efs] RSE EFS provider seems to truncate files
- * David McKnight (IBM) - [236039][dstore][efs] DStoreInputStream can report EOF too early - clean up how it waits for the local temp file to be created
- ********************************************************************************/
-package org.eclipse.rse.internal.services.dstore.files;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-
-public class DStoreInputStream extends InputStream
-{
- private DataStore _dataStore;
- private String _remotePath;
- private DataElement _minerElement;
- private String _encoding;
- private int _mode;
- private DataElement _cmdStatus; // leaving this, in case of need for error checking
- private File _localFile;
- private InputStream _localFileInputStream;
- private int _bufferSize;
- private long _bytesRead = 0;
-
- public DStoreInputStream(DataStore dataStore, String remotePath, DataElement minerElement, String encoding, int mode, int bufferSize)
- {
- _dataStore = dataStore;
- _remotePath = remotePath;
- _minerElement = minerElement;
- _encoding = encoding;
- _mode = mode;
- _bufferSize = bufferSize;
- initDownload();
- }
-
- protected void initDownload()
- {
- DataStore ds = _dataStore;
- DataElement universaltemp = _minerElement;
- DataElement de = _dataStore.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR, _remotePath, _remotePath, "", false); //$NON-NLS-1$
-
- try
- {
- _localFile = File.createTempFile("download", "rse"); //$NON-NLS-1$//$NON-NLS-2$
- DataElement remoteElement = ds.createObject(universaltemp, de.getType(), _remotePath, String.valueOf(_mode));
- DataElement localElement = ds.createObject(universaltemp, de.getType(), _localFile.getAbsolutePath(), _encoding);
-
- DataElement bufferSizeElement = ds.createObject(universaltemp, "buffer_size", "" + _bufferSize, ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- DataElement queryCmd = getCommandDescriptor(de, IUniversalDataStoreConstants.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));
-
- _cmdStatus = ds.command(queryCmd, argList, subject);
- waitForTempFile();
- _localFileInputStream = new FileInputStream(_localFile);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- protected DataStore getDataStore()
- {
- return _dataStore;
- }
-
- protected DataElement getCommandDescriptor(DataElement subject, String command)
- {
- DataElement cmd = _dataStore.localDescriptorQuery(subject.getDescriptor(), command);
- return cmd;
- }
-
- public void close() throws IOException
- {
- if (_localFileInputStream != null)
- {
- _localFileInputStream.close();
- }
- }
-
- /**
- * wait for the temp file to be created
- */
- protected void waitForTempFile()
- {
- if (_localFile != null)
- {
-
- // TODO cleanup how we wait for the temp file creation
- // keep waiting until temp file is populated and no new bytes appear to
- // be coming in
- while ((_localFile.length() == 0) &&
- !isTransferCommandDone())
- {
- try
- {
- Thread.sleep(100);
-
- }
- catch (Exception e)
- {
- }
- }
- }
- }
-
- private boolean isTransferCommandDone()
- {
- boolean done = _cmdStatus.getValue().equals("done"); //$NON-NLS-1$
- return done;
- }
-
- public int read() throws IOException
- {
- if (_localFileInputStream != null) {
- waitUntilAvailable(_bytesRead + 1);
- int result = _localFileInputStream.read();
- if (result > 0){
- _bytesRead++;
- }
-
- return result;
- }
- return 0;
- }
-
- public int read(byte[] b, int off, int len) throws IOException
- {
- if (_localFileInputStream != null)
- {
- waitUntilAvailable(_bytesRead + len);
- int result = _localFileInputStream.read(b, off, len);
- if (result > 0){
- _bytesRead += result;
- }
-
- return result;
- }
- return 0;
- }
-
- public int read(byte[] b) throws IOException
- {
- if (_localFileInputStream != null)
- {
- waitUntilAvailable(_bytesRead + b.length);
- int result = _localFileInputStream.read(b);
- if (result > 0){
- _bytesRead += result;
- }
-
- return result;
- }
- return 0;
- }
-
-
- private void waitUntilAvailable(long desiredAvailable)
- {
- // desiredAvailable will be the total bytes read so far + the desired extra amount
- while(_localFile.length() < desiredAvailable &&
- !isTransferCommandDone()) {
- try
- {
- Thread.sleep(100);
- }
- catch (Exception e)
- {
- }
- }
- }
-
- public int available() throws IOException
- {
- if (_localFileInputStream != null)
- {
- return _localFileInputStream.available();
- }
- return 0;
- }
-
- public long skip(long n) throws IOException
- {
- if (_localFileInputStream != null)
- {
- waitUntilAvailable(_bytesRead + n);
- long bytesSkipped = _localFileInputStream.skip(n);
- if (bytesSkipped > 0) {
- _bytesRead += bytesSkipped;
- }
- return bytesSkipped;
- }
- return 0;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreOutputStream.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreOutputStream.java
deleted file mode 100644
index cc9a6fdfb..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreOutputStream.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- ********************************************************************************/
-package org.eclipse.rse.internal.services.dstore.files;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.UniversalByteStreamHandler;
-import org.eclipse.rse.services.files.IFileService;
-
-public class DStoreOutputStream extends OutputStream
-{
- private DataStore _dataStore;
- private String _remotePath;
- private String _encoding;
- private int _mode;
- private boolean _firstWrite = true;
- private int _options;
- private String _byteStreamHandlerId;
- private String _localLineSep;
- private String _targetLineSep;
- private int _localLineSepLength;
-
- public DStoreOutputStream(DataStore dataStore, String remotePath, String encoding, int mode, boolean unixStyle, int options)
- {
- _dataStore = dataStore;
- _remotePath = remotePath;
- _encoding = encoding;
- _mode = mode;
- _byteStreamHandlerId = UniversalByteStreamHandler.class.getName();
-
- // line separator of local machine
- _localLineSep = System.getProperty("line.separator"); //$NON-NLS-1$
-
- // line separator of remote machine
- _targetLineSep = "\n"; //$NON-NLS-1$
-
- if (!unixStyle) {
- _targetLineSep = "\r\n"; //$NON-NLS-1$
- }
-
- _localLineSepLength = _localLineSep.length();
- _options = options;
- }
-
- public void close() throws IOException
- {
- super.close();
- }
-
-
-
- public void flush() throws IOException {
- super.flush();
- }
-
-
-
- public void write(byte[] b, int offset, int length) throws IOException
- {
- if (_mode == IUniversalDataStoreConstants.TEXT_MODE)
- {
- String tempStr = new String(b, 0, length);
-
- tempStr = convertLineSeparators(tempStr);
-
- b = tempStr.getBytes(_encoding);
- }
- if (_firstWrite && (_options & IFileService.APPEND) == 0)
- {
- _firstWrite = false;
-
- // send first set of bytes
- _dataStore.replaceFile(_remotePath, b, length, true, _byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- _dataStore.replaceAppendFile(_remotePath, b, length, true, _byteStreamHandlerId);
- }
- }
-
- private String convertLineSeparators(String tempStr)
- {
- // if the line end characters of the local and remote machines are different, we need to replace them
- if (!_localLineSep.equals(_targetLineSep)) {
-
- int index = tempStr.indexOf(_localLineSep);
-
- StringBuffer buf = new StringBuffer();
-
- boolean lineEndFound = false;
- int lastIndex = 0;
-
- while (index != -1) {
- buf = buf.append(tempStr.substring(lastIndex, index));
- buf = buf.append(_targetLineSep);
-
- if (!lineEndFound) {
- lineEndFound = true;
- }
-
- lastIndex = index+_localLineSepLength;
-
- index = tempStr.indexOf(_localLineSep, lastIndex);
- }
-
- if (lineEndFound) {
- buf = buf.append(tempStr.substring(lastIndex));
- tempStr = buf.toString();
- }
- }
- return tempStr;
- }
-
- public void write(byte[] b) throws IOException
- {
- if (_mode == IUniversalDataStoreConstants.TEXT_MODE)
- {
- String tempStr = new String(b, 0, b.length);
-
- tempStr = convertLineSeparators(tempStr);
-
- b = tempStr.getBytes(_encoding);
- }
- if (_firstWrite && (_options & IFileService.APPEND) == 0)
- {
- _firstWrite = false;
- // send first set of bytes
- _dataStore.replaceFile(_remotePath, b, b.length, true, _byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- _dataStore.replaceAppendFile(_remotePath, b, b.length, true, _byteStreamHandlerId);
- }
- }
-
-
-
- public void write(int c) throws IOException
- {
- byte[] b = {(byte)c};
- if (_mode == IUniversalDataStoreConstants.TEXT_MODE)
- {
- String tempStr = new String(b, 0, 1);
- b = tempStr.getBytes(_encoding);
- }
- if (_firstWrite && (_options & IFileService.APPEND) == 0)
- {
- _firstWrite = false;
- // send first set of bytes
- _dataStore.replaceFile(_remotePath, b, b.length, true, _byteStreamHandlerId);
- }
- else
- { // append subsequent segments
- _dataStore.replaceAppendFile(_remotePath, b, b.length, true, _byteStreamHandlerId);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreVirtualHostFile.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreVirtualHostFile.java
deleted file mode 100644
index ce5efd6c7..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreVirtualHostFile.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreHostProcess.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreHostProcess.java
deleted file mode 100644
index d2db6570a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreHostProcess.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.IServiceConstants;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-
-/**
- * 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, IAdaptable
-{
- 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("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- int tokens = str.length;
- if (tokens > 1)
- {
- try
- {
- setPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]);
-
- setName(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
-
- setTgid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]);
-
- setPPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]);
-
- if (_ppid == 0) _isRoot = true;
-
- setTracerPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
-
- setUid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]);
-
- setUsername(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME]);
-
- setGid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]);
-
- setLabel(str[ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.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("\\"+IServiceConstants.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("\\"+IServiceConstants.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] + IServiceConstants.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;
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java
deleted file mode 100644
index d186941f8..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/processes/DStoreProcessService.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
- * David McKnight (IBM) - [159092] For to use correct process miner id
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.IUniversalDataStoreConstants;
-import org.eclipse.rse.dstore.universal.miners.IUniversalProcessDataStoreConstants;
-import org.eclipse.rse.internal.services.dstore.ServiceResources;
-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.util.DStoreStatusMonitor;
-import org.eclipse.rse.services.processes.AbstractProcessService;
-
-public class DStoreProcessService extends AbstractProcessService
-{
- 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(IHostProcessFilter filter, IProgressMonitor monitor) 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, IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_ROOT, 1);
- if (deObj == null) deObj = ds.createObject(universaltemp, IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_FILTER, IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_ROOT, "", "", false); //$NON-NLS-1$ //$NON-NLS-2$
- deObj.setAttribute(DE.A_SOURCE, filter.toString());
-
- // query
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), IUniversalProcessDataStoreConstants.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(ISystemProcessRemoteConstants.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(IUniversalDataStoreConstants.UNIVERSAL_PROCESS_MINER_ID);
- }
- return _minerElement;
- }
-
- public DStoreStatusMonitor getStatusMonitor(DataStore dataStore)
- {
- if (_statusMonitor == null || _statusMonitor.getDataStore() != dataStore)
- {
- _statusMonitor = new DStoreStatusMonitor(dataStore);
- }
- return _statusMonitor;
- }
-
- public boolean kill(long PID, String signal, IProgressMonitor monitor) throws SystemMessageException
- {
- try
- {
- DataStore ds = getDataStore();
-
- // run kill command on host
- DStoreHostProcess process = (DStoreHostProcess) getProcess(PID, monitor);
-
- // if there is no process, simply return true
- if (process == null) {
- return true;
- }
-
- DataElement deObj = (DataElement) process.getObject();
- DataElement killCmd = ds.localDescriptorQuery(deObj.getDescriptor(), IUniversalProcessDataStoreConstants.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(ISystemProcessRemoteConstants.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) throws SystemMessageException
- {
- super.initService(monitor);
- initMiner(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- _minerElement = null;
- _procMinerStatus = null;
- _minerElement = null;
- _statusMonitor = null;
- super.uninitService(monitor);
- }
-
- 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)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- 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 == 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, IUniversalProcessDataStoreConstants.UNIVERSAL_PROCESS_TEMP, ""); //$NON-NLS-1$
-
- DataElement queryCmd = ds.localDescriptorQuery(encodingElement.getDescriptor(), IUniversalProcessDataStoreConstants.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 IUniversalDataStoreConstants.UNIVERSAL_PROCESS_MINER_ID;
- }
-
- public int getServerVersion()
- {
- return getDataStore().getServerVersion();
- }
-
- public int getServerMinor()
- {
- return getDataStore().getServerMinor();
- }
-
- protected String getProcessMinerId()
- {
- return IUniversalDataStoreConstants.UNIVERSAL_PROCESS_MINER_ID;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/rmtservice/DStoreRemoteServiceService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/rmtservice/DStoreRemoteServiceService.java
deleted file mode 100644
index 7080b36c5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/rmtservice/DStoreRemoteServiceService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.internal.services.dstore.rmtservice;
-
-import org.eclipse.dstore.core.java.IRemoteClassInstance;
-import org.eclipse.dstore.core.model.IDataStoreProvider;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-
-public class DStoreRemoteServiceService extends AbstractDStoreService
-{
-
- public DStoreRemoteServiceService(IDataStoreProvider dataStoreProvider)
- {
- super(dataStoreProvider);
- }
-
- protected String getMinerId()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void runRemoteService(IRemoteClassInstance serviceClass)
- {
- getDataStore().runRemoteClassInstance(serviceClass);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchResultConfiguration.java
deleted file mode 100644
index dc60e21f7..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchResultConfiguration.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * David McKnight (IBM) [190010] commented why we don't need status monitor
- * David McKnight (IBM) - [214378] [dstore] remote search doesn't display results sometimes
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore.search;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.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;
- // no need for a domain listner because we check the status via status monitor
- _status.getDataStore().getDomainNotifier().addDomainListener(this);
- }
-
- public DataElement getStatusObject()
- {
- return _status;
- }
-
- public boolean listeningTo(DomainEvent e)
- {
- return e.getParent() == _status;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java
deleted file mode 100644
index 47d2ba490..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/search/DStoreSearchService.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [186128] Move IProgressMonitor last in all API
- * Kevin Doyle (IBM) - [187640] Removed setting status to finish when search not finished
- * David McKnight [190010] Set the status to finish or cancelled depending on dstore status.
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * David McKnight (IBM) - [214378] don't mark as finished until we have the results - sleep instead of wait
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * David McKnight (IBM) - [255390] don't assume one update means the search is done
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- * David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.services.dstore.ServiceResources;
-import org.eclipse.rse.internal.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.dstore.AbstractDStoreService;
-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)
- {
- super(provider);
- }
-
- public String getName()
- {
- return ServiceResources.DStore_Search_Service_Label;
- }
- public String getDescription()
- {
- return ServiceResources.DStore_Search_Service_Description;
- }
-
- protected String getMinerId()
- {
- return IUniversalDataStoreConstants.UNIVERSAL_FILESYSTEM_MINER_ID;
- }
-
- public void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
- {
- 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 isFileNamesCaseSensitive = searchString.isFileNamesCaseSensitive();
- 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, isFileNamesCaseSensitive, isFileNamesRegex, includeArchives, includeSubfolders, classificationString, true);
-
- DataElement status = ds.command(queryCmd, argList, deObj);
- DStoreSearchResultConfiguration config = (DStoreSearchResultConfiguration) searchConfig;
- config.setStatusObject(status);
-
- try
- {
- boolean working = true;
- while (working){
- // give large wait time for a search
- int waitThres = -1;
- getStatusMonitor(ds).waitForUpdate(status, monitor, waitThres);
- String statusStr = status.getName();
- if (statusStr.equals("done")) //$NON-NLS-1$
- {
- if (status.getNestedSize() > 0){
- config.setStatus(IHostSearchConstants.FINISHED);
- }
- else { // need to wait until we have all results on client
- try
- {
- Thread.sleep(2000);
- }
- catch (Exception e)
- {
- }
- config.setStatus(IHostSearchConstants.FINISHED);
- }
- working = false;
- }
- else if (statusStr.equals("cancelled")) //$NON-NLS-1$
- {
- config.setStatus(IHostSearchConstants.CANCELLED);
- working = false;
- }
- else if (statusStr.equals("working")){ //$NON-NLS-1$
- // still searching
- if (monitor.isCanceled()){
- config.setStatus(IHostSearchConstants.CANCELLED);
- working = false;
- }
- }
- }
- }
- catch (Exception e)
- {
- config.setStatus(IHostSearchConstants.CANCELLED);
- }
- }
- }
-
- private ArrayList setSearchAttributes(
- String textString,
- boolean isCaseSensitive,
- boolean isTextRegex,
- String fileNamesString,
- boolean isFileNamesCaseSensitive,
- 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));
-
- // extra arg (for version 3.1)
- DataElement arg4 = ds.createObject(universaltemp, "file.name.case.sensitive", String.valueOf(isFileNamesCaseSensitive));
-
- // add the arguments to the argument list
- ArrayList argList = new ArrayList();
- argList.add(arg1);
- argList.add(arg2);
- argList.add(arg3);
- argList.add(arg4);
-
- return argList;
- }
-
- public void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor)
- {
- 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);
- }
- }
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostOutput.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostOutput.java
deleted file mode 100644
index e0ff0bc65..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostOutput.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 the initial implementation:
- * David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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/internal/services/dstore/shells/DStoreHostShell.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostShell.java
deleted file mode 100644
index 06763d3a5..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreHostShell.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) [251619] [dstore] shell output readers not cleaned up on disconnect
- * David McKnight (IBM) [244070] [dstore] DStoreHostShell#exit() does not terminate child processes
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore.shells;
-
-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.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 DataElement getStatus()
- {
- return _status;
- }
-
-
-
- public void exit()
- {
- // send cancel command
- 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);
- }
-
- _status.setAttribute(DE.A_VALUE, "done"); //$NON-NLS-1$
-
- _stdoutHandler.finish();
- _stderrHandler.finish();
-
-
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java
deleted file mode 100644
index 84c9bb9a7..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellOutputReader.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [286671] return null when status is null
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore.shells;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-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
- {
- if (_hostShell.isActive())
- {
- waitForResponse();
- return internalReadLine();
- }
- else
- {
- return null;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- if (_status == null){
- return null;
- }
- 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 notified
- */
- public synchronized void waitForResponse()
- {
- try
- {
- wait();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- }
-
- /**
- * Causes all threads waiting for this
- * 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());
- }
- }
- */
-
-}
-
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java
deleted file mode 100644
index f2d330d4b..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellService.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- * David McKnight (IBM) - [244898] [dstore] IRemoteCmdSubSystem.getHostEnvironmentVariables() call does not always work
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.services.dstore.ServiceResources;
-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.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)
- {
- super(dataStoreProvider);
- }
-
-
- public String getName()
- {
- return ServiceResources.DStore_Shell_Service_Label;
- }
-
- public String getDescription()
- {
- return ServiceResources.DStore_Shell_Service_Description;
- }
-
-
- public IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor) throws SystemMessageException
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return launchShell(initialWorkingDirectory, null, environment, monitor);
- }
-
- public IHostShell launchShell(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return new DStoreHostShell(getStatusMonitor(getDataStore()), getDataStore(), initialWorkingDirectory, ">", encoding, environment); //$NON-NLS-1$
- }
-
- public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment,
- IProgressMonitor monitor) throws SystemMessageException
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return runCommand(initialWorkingDirectory, command, null, environment, monitor);
- }
-
- public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding,
- String[] environment, IProgressMonitor monitor) throws SystemMessageException
- {
- if (!isInitialized())
- {
- waitForInitialize(null);
- }
- return new DStoreHostShell(getStatusMonitor(getDataStore()), getDataStore(), initialWorkingDirectory, command, encoding, environment);
- }
-
- public String[] getHostEnvironment() throws SystemMessageException
- {
- if (_envVars == null || _envVars.length == 0)
- {
- List envVars = new ArrayList();
- DataStore ds = getDataStore();
- DataElement envMinerData = ds.findMinerInformation(getEnvSystemMinerId());
- if (envMinerData == null){ // could be using an old server
- envMinerData = ds.findMinerInformation("com.ibm.etools.systems.dstore.miners.environment.EnvironmentMiner"); //$NON-NLS-1$
- }
- 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 IUniversalDataStoreConstants.UNIVERSAL_COMMAND_MINER_ID;
- }
-
- protected String getEnvSystemMinerId()
- {
- return IUniversalDataStoreConstants.UNIVERSAL_ENVIRONMENT_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)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- getMinerElement(getEnvSystemMinerId());
- }
- super.waitForInitialize(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- _envMinerElement = null;
- _envMinerStatus = null;
- _envVars = null;
- 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 == 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);
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java
deleted file mode 100644
index ca8b89722..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.
- * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
- * David McKnight (IBM) - [286671] Dstore shell service interprets &lt; and &gt; sequences
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.dstore.shells;
-
-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.IUniversalDataStoreConstants;
-
-
-
-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 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 IUniversalDataStoreConstants.UNIVERSAL_COMMAND_MINER_ID;
- }
-
-
- protected String getEnvSystemMinerId()
- {
- return IUniversalDataStoreConstants.UNIVERSAL_ENVIRONMENT_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)
- {
- cmd = convertSpecialCharacters(cmd);
- DataElement commandDescriptor = getSendInputDescriptor(commandElement);
- if (commandDescriptor != null)
- {
- DataElement in = dataStore.createObject(null, "input", cmd); //$NON-NLS-1$
- dataStore.command(commandDescriptor, in, commandElement);
- }
- }
- }
- }
- }
-
- private String convertSpecialCharacters(String input){
- // needed to ensure xml characters aren't converted in xml layer
-
- StringBuffer output = new StringBuffer();
-
- for (int idx = 0; idx < input.length(); idx++)
- {
- char currChar = input.charAt(idx);
- switch (currChar)
- {
- case '&' :
- output.append("&#38;");
- break;
- case ';' :
- output.append("&#59;");
- break;
- default :
- output.append(currChar);
- break;
- }
- }
- return output.toString();
- }
-}
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 399a81ed2..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/AbstractDStoreService.java
+++ /dev/null
@@ -1,470 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
- * David McKnight (IBM) - [207095] check for null datastore
- * David McKnight (IBM) - [209593] [api] check for existing query to avoid duplicates
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-
-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.internal.services.dstore.ServiceResources;
-import org.eclipse.rse.services.AbstractService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.dstore.util.DStoreStatusMonitor;
-
-public abstract class AbstractDStoreService extends AbstractService implements IDStoreService
-{
- protected IDataStoreProvider _dataStoreProvider;
- protected DataElement _minerElement;
- protected DStoreStatusMonitor _statusMonitor;
- protected Map _cmdDescriptorMap;
- protected DataElement _initializeStatus;
-
- /**
- * @since 3.0 got rid of ISystemMessageProvider argument
- * @param dataStoreProvider
- */
- public AbstractDStoreService(IDataStoreProvider dataStoreProvider)
- {
- _dataStoreProvider = dataStoreProvider;
- _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)
- {
- DataStore ds = getDataStore();
- if (ds != null)
- {
- return ds.findMinerInformation(id);
- }
- else
- {
- return null;
- }
- }
-
- protected DataElement[] dsQueryCommand(DataElement subject, String command, IProgressMonitor monitor)
- {
- return dsQueryCommand(subject, null, command, monitor);
- }
-
- /**
- * query the the remote system
- * @param subject the subject of the query
- * @param args the arguments for the query
- * @param command the query command
- * @param monitor
- * @return the array of results
- */
- protected DataElement[] dsQueryCommand(DataElement subject, ArrayList args, String command, IProgressMonitor monitor)
- {
- // query roots
- DataElement queryCmd = getCommandDescriptor(subject, command);
- DataStore ds = getDataStore();
- DStoreStatusMonitor smonitor = getStatusMonitor(ds);
-
- if (queryCmd != null && ds != null)
- {
- // check if there already is an active command for this query
- DataElement status = smonitor.getCommandStatus(queryCmd, subject);
- if (args != null)
- {
- status = ds.command(queryCmd, args, subject, true);
- }
- else
- {
- status = ds.command(queryCmd, subject, true);
- }
- try
- {
- smonitor.waitForUpdate(status, monitor);
-
- int resultSize = subject.getNestedSize();
-
- checkHostJVM();
- // get results
- List nested = subject.getNestedData();
- if (nested != null)
- {
- return (DataElement[])nested.toArray(new DataElement[resultSize]);
- }
- }
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- }
-
- return new DataElement[0];
- }
-
- /** @since 3.0 */
- protected List dsQueryCommandMulti(DataElement[] subjects, String[] commands, IProgressMonitor monitor)
- {
- return dsQueryCommandMulti(subjects, null, commands, monitor);
- }
-
- /**
- * Query multiple subjects in one shot
- *
- * @param subjects the subjects to query
- * @param commands the query commands
- * @param argses arguments for the command - may be null
- * @param monitor the progress monitor
- * @return a list of DataElement[]s containing the results of each query
- * @since 3.0
- */
- protected List dsQueryCommandMulti(DataElement[] subjects, ArrayList[] argses, String[] commands, IProgressMonitor monitor)
- {
- List statuses = new ArrayList();
- DataStore ds = getDataStore();
- DStoreStatusMonitor smonitor = getStatusMonitor(ds);
-
-
- for (int i = 0; i < subjects.length && !monitor.isCanceled(); i++)
- {
- DataElement subject = subjects[i];
-
- DataElement queryCmd = getCommandDescriptor(subject, commands[i]);
- if (queryCmd != null && ds != null)
- {
- // check if there already is an active command for this query
- DataElement status = smonitor.getCommandStatus(queryCmd, subject);
-
- if (status == null){
- if (argses != null){
- status = ds.command(queryCmd, argses[i], subject, true);
- }
- else{
- status = ds.command(queryCmd, subject, true);
- }
- }
- statuses.add(status);
- }
- }
-
- List consolidatedResults = new ArrayList();
-
- // wait for each command to complete
- for (int i = 0; i < statuses.size() && !monitor.isCanceled(); i++)
- {
- DataElement status = (DataElement)statuses.get(i);
- DataElement deObj = subjects[i];
-
- try
- {
- smonitor.waitForUpdate(status, monitor);
-
- if (!monitor.isCanceled() && smonitor.determineStatusDone(status))
- {
- List nested = deObj.getNestedData();
- if (nested != null)
- {
- consolidatedResults.add(nested.toArray(new DataElement[nested.size()]));
- }
- }
- }
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- }
-
- return consolidatedResults;
- }
-
-
-
-
-
-
- protected DataElement dsStatusCommand(DataElement subject, ArrayList args, String command, IProgressMonitor monitor)
- {
- DataStore ds = getDataStore();
- DStoreStatusMonitor smonitor = getStatusMonitor(ds);
-
- DataElement queryCmd = getCommandDescriptor(subject, command);
-
- if (queryCmd != null && ds != null)
- {
- // check if there already is an active command for this query
- DataElement status = smonitor.getCommandStatus(queryCmd, subject);
-
- if (status == null){
- status = ds.command(queryCmd, args, subject, true);
- }
- try
- {
- smonitor.waitForUpdate(status, monitor);
- }
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
- return status;
- }
- return null;
- }
-
-
- protected DataElement dsStatusCommand(DataElement subject, String command, IProgressMonitor monitor)
- {
- DataStore ds = getDataStore();
- DStoreStatusMonitor smonitor = getStatusMonitor(ds);
-
- DataElement queryCmd = getCommandDescriptor(subject, command);
-
- if (queryCmd != null && ds != null)
- {
- // check if there already is an active command for this query
- DataElement status = smonitor.getCommandStatus(queryCmd, subject);
-
- if (status == null){
- status = ds.command(queryCmd, subject, true);
- }
- try
- {
- smonitor.waitForUpdate(status, monitor);
- }
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
-
- }
- 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())
- {
- if (ds != null)
- {
- cmd = ds.localDescriptorQuery(subject.getDescriptor(), command);
- _cmdDescriptorMap.put(command, cmd);
- }
- }
- return cmd;
- }
-
- public int getServerVersion()
- {
- DataStore ds = getDataStore();
- if (ds != null)
- return ds.getServerVersion();
- return 0;
- }
-
- public int getServerMinor()
- {
- DataStore ds = getDataStore();
- if (ds != null)
- return ds.getServerMinor();
- return 0;
- }
-
- 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)
- {
- DataStore ds = getDataStore();
- if (ds != null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(ds);
- return smon.determineStatusDone(_initializeStatus);
- }
- }
- return false;
- }
-
- protected void waitForInitialize(IProgressMonitor monitor)
- {
- if (_initializeStatus != null)
- {
- DataStore ds = getDataStore();
- if (ds != null)
- {
- DStoreStatusMonitor smon = getStatusMonitor(getDataStore());
- try
- {
- smon.waitForUpdate(_initializeStatus, monitor, 100);
- }
- catch (InterruptedException e)
- {
- // cancel monitor if it's still not cancelled
- if (monitor != null && !monitor.isCanceled())
- {
- monitor.setCanceled(true);
- }
-
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
- }
-
- getMinerElement();
- }
- }
- }
-
- public void initService(IProgressMonitor monitor) throws SystemMessageException
- {
- super.initService(monitor);
- initMiner(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor)
- {
- _initializeStatus = null;
- _cmdDescriptorMap.clear();
- _minerElement = null;
- _statusMonitor = null;
- super.uninitService(monitor);
- }
-
- 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 == 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();
-
-}
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/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 e4fc92ce6..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DStoreStatusMonitor.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
- * David McKnight (IBM) - [190010] When status is "cancelled" the wait should complete
- * David McKnight (IBM) - [197480] eliminating UI dependencies
- * David McKnight (IBM) - [209593] [api] check for existing query to avoid duplicates
- * David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
- * David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- * David McKnight (IBM) - [283157] [dstore] Remote search didn't end when the dstore server crashed
- *******************************************************************************/
-
-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.core.model.DataStoreSchema;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.dstore.extra.IDomainNotifier;
-
-
-/*
- * 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 boolean _networkDown = false;
-
- protected List _workingStatuses;
- protected List _cancelledStatuses;
- protected List _doneStatuses;
-
- protected DataStore _dataStore;
-
-
-
- /**
- * 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") || //$NON-NLS-1$
- status.getAttribute(DE.A_NAME).equals("done") ||//$NON-NLS-1$
- status.getAttribute(DE.A_NAME).equals("cancelled"); //$NON-NLS-1$
- }
-
- /**
- * @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);
-
- // send a cancel command if possible
- 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);
- }
- }
- }
-
- public synchronized void setWorking(DataElement status)
- {
- _workingStatuses.add(status);
- }
-
-
- public boolean wasCancelled(DataElement status)
- {
- if (_cancelledStatuses.contains(status))
- {
- return true;
- }
- return false;
- }
-
-
-
-
-
- /**
- * 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, 1000);
- }
-
- public DataElement waitForUpdate(DataElement status, IProgressMonitor monitor) throws InterruptedException
- {
- return waitForUpdate(status, monitor, 1000);
- }
-
- 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);
-
-
- // Prevent infinite looping by introducing a threshold for wait
- int WaitThreshold = 50;
- if ( wait > 0 )
- WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
- else if ( wait == -1 ) // force a diagnostic
- WaitThreshold = -1;
-
- int initialWaitThreshold = WaitThreshold;
- int nudges = 0; // nudges used for waking up server with slow connections
- // nudge up to 12 times before giving up
-
- {
- // Current thread is not UI thread
- while (_workingStatuses.contains(status))
- {
- boolean statusDone = determineStatusDone(status);
- if (statusDone)
- {
- setDone(status);
- }
- else
- {
- if ((monitor != null && monitor.isCanceled()) ||
- !status.getDataStore().getStatus().getName().equals("okay")) // datastore not okay?
- {
- setCancelled(status);
- throw new InterruptedException();
- }
-
- waitForUpdate();
- //Thread.sleep(200);
- if (!status.getDataStore().isConnected()){
- // not connected anymore!
- _networkDown = true;
- }
-
- if (WaitThreshold > 0) // update timer count if
- // threshold not reached
- --WaitThreshold; // decrement the timer count
-
- if (WaitThreshold == 0)
- {
- wakeupServer(status);
-
- // no diagnostic factory but there is a timeout
- if (nudges >= 12)
- return status; // returning the undone status object
-
- nudges++;
- WaitThreshold = initialWaitThreshold;
- }
- else if (_networkDown)
- {
- dispose();
- throw new InterruptedException();
- }
- }
- }
- }
-
-
- return status;
- }
-
-
- /**
- * Returns the status of a running command for the specified cmd desciptor
- * and subject. If there is no such command running, then null is returned.
- *
- * @param cmdDescriptor
- * @param subject
- * @return the status of the command.
- * @since 3.0
- */
- public DataElement getCommandStatus(DataElement cmdDescriptor, DataElement subject)
- {
- synchronized (_workingStatuses){
- for (int i = 0; i < _workingStatuses.size(); i++){
- DataElement status = (DataElement)_workingStatuses.get(i);
- DataElement cmd = status.getParent();
- if (cmd.getDescriptor() == cmdDescriptor){
- DataElement cmdSubject = cmd.get(0).dereference();
- if (subject == cmdSubject){
- return status;
- }
- }
- }
- }
- return null;
- }
-
- private void wakeupServer(DataElement status)
- {
- if (status != null)
- {
- // token command to wake up update handler
- DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
- DataElement subject = status.getParent().get(0);
- if (cmdDescriptor != null)
- {
- _dataStore.command(cmdDescriptor, subject);
- }
- }
- }
-
- /**
- * Causes the current thread to wait until this class request has been
- * fulfilled.
- */
- public synchronized void waitForUpdate()
- {
- try
- {
- wait(200);
- }
- catch (InterruptedException e)
- {
- //InterruptedException is used to report user cancellation, so no need to log
- //This should be reviewed (use OperationCanceledException) with bug #190750
-
- return;
- }
- }
-
- /**
- * Causes all threads waiting for this class request to be filled
- * to wake up.
- */
- public synchronized void notifyUpdate()
- {
- notifyAll();
- }
-
-
-}
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 b7ad58f3a..000000000
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/services/dstore/util/DownloadListener.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * David McKnight (IBM) - [197480] eliminating UI dependencies
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * Martin Oberhuber (Wind River) - [219952] Use MessageFormat for download progress message
- * David McKnight (IBM) - [222448] [dstore] update DownloadListener to handle timeouts and nudge
- * David McKnight (IBM) - [225902] [dstore] use C_NOTIFICATION command to wake up the server
- * David McKnight (IBM) - [231126] [dstore] status monitor needs to reset WaitThreshold on nudge
- ********************************************************************************/
-
-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.core.model.DataStoreSchema;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.rse.internal.services.dstore.ServiceResources;
-
-public class DownloadListener implements IDomainListener
-{
-
- private DataElement _status;
- private IProgressMonitor _monitor;
- private DataStore _dataStore;
- private File _localFile;
-
- private boolean _networkDown = false;
- private boolean _isDone = false;
- private boolean _isCancelled = false;
- private long _totalBytesNotified = 0;
- private long _totalLength;
-
- public DownloadListener(DataElement status, File localFile, String remotePath, long totalLength, IProgressMonitor monitor)
- {
- _monitor = monitor;
- _status = status;
- _totalLength = totalLength;
-
- 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);
- }
- }
-
- /** @since 3.0 */
- public long getTotalLength()
- {
- return _totalLength;
- }
-
- public boolean isCancelled()
- {
- return _isCancelled;
- }
-
- /** @since 3.0 */
- public boolean isDone()
- {
- return _isDone;
- }
-
- 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
- {
- double percent = (currentLength * 1.0) / _totalLength;
- String str = MessageFormat.format(
- ServiceResources.DStore_Service_Percent_Complete_Message,
- new Object[] {
- new Long(currentLength/1024),
- new Long(_totalLength/1024),
- new Double(percent)
- });
-
- _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
- *
- * @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
- }
-
- /**
- * Wait for the the status DataElement to be refreshed
- *
- * @param 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(int wait) throws InterruptedException
- {
- // Prevent infinite looping by introducing a threshold for wait
-
- int WaitThreshold = 50;
-
- if (wait > 0)
- WaitThreshold = wait * 10; // 1 second means 10 sleep(100ms)
- else if (wait == -1) // force a diagnostic
- WaitThreshold = -1;
-
- int initialWaitTheshold = WaitThreshold;
- {
- // 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();
-
- if (WaitThreshold > 0) // update timer count if
- {
- // threshold not reached
- --WaitThreshold; // decrement the timer count
- }
- else if (WaitThreshold == 0)
- {
- // try to wake up the server
- wakeupServer(_status);
- WaitThreshold = initialWaitTheshold;
- }
- }
- }
- }
- return _status;
- }
-
-
- private void wakeupServer(DataElement status)
- {
- if (status != null)
- {
- // token command to wake up update handler
- DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
- DataElement subject = status.getParent().get(0);
- if (cmdDescriptor != null)
- {
- _dataStore.command(cmdDescriptor, subject);
- }
- }
- }
-
- 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.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 09eaf0332..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 21fdfc3a8..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/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.services.files.ftp;singleton:=true
-Bundle-Version: 3.0.101.qualifier
-Bundle-Activator: org.eclipse.rse.internal.services.files.ftp.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.apache.commons.net;bundle-version="[1.4.1,3.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.services.files.ftp;x-friends:="org.eclipse.rse.subsystems.files.ftp",
- org.eclipse.rse.internal.services.files.ftp.parser;x-friends:="org.eclipse.rse.subsystems.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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 6291eb83e..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/about.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-################################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE FTP Service\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Symbian Software Ltd. and others 2000, 2009. 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 545512035..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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) - Use eclipse32.png feature image
-# Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- .,\
- about.ini,\
- about.mappings,\
- dsdp32.png
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/dsdp32.png b/rse/plugins/org.eclipse.rse.services.files.ftp/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/dsdp32.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 daf44d88f..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE FTP Service
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/Activator.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/Activator.java
deleted file mode 100644
index 55b16a56e..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/Activator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [221211] Throw SystemLockTimeoutException in Sftp and FTP in case a lock can not be obtained
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
-
- public static final String PLUGIN_ID = "org.eclipse.rse.internal.services.files.ftp"; //$NON-NLS-1$
-
- /**
- * 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.
- * @return activator
- */
- 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/internal/services/files/ftp/FTPHostFile.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java
deleted file mode 100644
index fc08fe345..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPHostFile.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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 Orús (Symbian) - Migrate to apache 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
- * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
- * Javier Montalvo Orus (Symbian) - [197758] Unix symbolic links are not classified as file vs. folder
- * Javier Montalvo Orus (Symbian) - [198272] FTP should return classification for symbolic links so they show a link overlay
- * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
- * Javier Montalvo Orus (Symbian) - [198692] FTP should mark files starting with "." as hidden
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.files.ftp;
-
-
-import java.io.File;
-
-import org.apache.commons.net.ftp.FTPFile;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.HostFilePermissions;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-
-public class FTPHostFile implements IHostFile, IHostFilePermissionsContainer
-{
-
- private String _name;
- private String _parentPath;
- private boolean _isDirectory;
- private boolean _isLink;
- private boolean _isArchive;
- private long _lastModified;
- private long _size;
- private boolean _canRead = true;
- private boolean _canWrite = true;
- private boolean _isRoot;
- private boolean _exists;
- private IHostFilePermissions _permissions;
- private FTPFile _ftpFile;
-
- public FTPHostFile(String parentPath, String name, boolean isDirectory, boolean isRoot, long lastModified, long size, boolean exists)
- {
- _parentPath = parentPath;
- _name = name;
- if (name == null || name.length() == 0) {
- throw new IllegalArgumentException();
- }
- _isDirectory = isDirectory;
- _lastModified = lastModified;
- _size = size;
- _isArchive = internalIsArchive();
- _canRead = true;
- _canWrite = false;
- _isRoot = isRoot;
- _exists = exists;
- }
-
- public FTPHostFile(String parentPath, FTPFile ftpFile)
- {
- _parentPath = parentPath;
- _ftpFile = ftpFile;
-
- _name = ftpFile.getName();
-
- _isDirectory = ftpFile.isDirectory();
- _isLink = ftpFile.isSymbolicLink();
- _lastModified = ftpFile.getTimestamp().getTimeInMillis();
- _size = ftpFile.getSize();
- _isArchive = internalIsArchive();
-
- _canRead = ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION);
- _canWrite = ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION);
-
- _isRoot = false;
- _exists = true;
-
- initPermissions(ftpFile);
- }
-
-
-
-
- public long getSize()
- {
- return _size;
- }
-
- public boolean isDirectory()
- {
- return _isDirectory;
- }
-
- public boolean isFile()
- {
- return !(_isDirectory || _isRoot);
- }
-
- public boolean isLink()
- {
- return _isLink;
- }
-
- 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 {
- String parentPath = getParentPath();
- StringBuffer path = new StringBuffer(parentPath);
- if (!parentPath.endsWith("/") && !parentPath.endsWith("\\"))//$NON-NLS-1$ //$NON-NLS-2$
- {
- //TODO IFileService should have a method for this
- String sep = PathUtility.getSeparator(parentPath);
- if (!parentPath.endsWith(sep)) {
- path.append(sep);
- }
- }
- path.append(getName());
- return path.toString();
- }
- }
-
- public long getModifiedDate()
- {
- return _lastModified;
- }
-
- public String geParentPath() {
- return _parentPath;
- }
-
- public boolean isArchive() {
- return _isArchive;
- }
-
- public boolean isHidden() {
- String name = getName();
- return name.charAt(0) == '.';
- }
-
- 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) {
- //Rename inside the same parent folder.
- //FIXME is this really what was desired here? Or would we rename Roots?
- //Renaming Roots isn't possible, I'd think.
- _name = newAbsolutePath;
- }
- else if (i == 0) {
- // Renaming a root folder
- if (newAbsolutePath.length()==1) {
- //rename to root "/" -- should this work?
- _parentPath = null;
- _isRoot = true;
- _name = newAbsolutePath;
- } else {
- _parentPath = "/"; //$NON-NLS-1$
- _name = newAbsolutePath.substring(i + 1);
- }
- } else {
- _parentPath = newAbsolutePath.substring(0, i);
- _name = newAbsolutePath.substring(i+1);
- }
- _isArchive = internalIsArchive();
- }
-
- public int getUserPermissions()
- {
- int userRead = 0;
- int userWrite = 0;
- int userExec = 0;
-
- //user
- if(_ftpFile!=null)
- {
- userRead = _ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION) ? 1 : 0;
- userWrite = _ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION) ? 1 : 0;
- userExec = _ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.EXECUTE_PERMISSION) ? 1 : 0;
- }
- else
- {
- userRead = _canRead ? 1 : 0;
- userWrite = _canWrite ? 1 : 0;
- userExec = 0;
-
- }
-
- return userRead << 2 | userWrite << 1 | userExec;
- }
-
- public int getGroupPermissions()
- {
- int groupRead = 0;
- int groupWrite = 0;
- int groupExec = 0;
-
- //group
- if(_ftpFile!=null)
- {
- groupRead = _ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.READ_PERMISSION) ? 1 : 0;
- groupWrite = _ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.WRITE_PERMISSION) ? 1 : 0;
- groupExec = _ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.EXECUTE_PERMISSION) ? 1 : 0;
- }
-
- return groupRead << 2 | groupWrite << 1 | groupExec;
- }
-
- public int getOtherPermissions()
- {
- int otherRead = 0;
- int otherWrite = 0;
- int otherExec = 0;
-
- //other
- if(_ftpFile!=null)
- {
- otherRead = _ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.READ_PERMISSION) ? 1 : 0;
- otherWrite = _ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.WRITE_PERMISSION) ? 1 : 0;
- otherExec = _ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.EXECUTE_PERMISSION) ? 1 : 0;
- }
-
- return otherRead << 2 | otherWrite << 1 | otherExec;
- }
-
-
-
-
- protected boolean internalIsArchive()
- {
- return ArchiveHandlerManager.getInstance().isArchive(new File(getAbsolutePath()))
- && !ArchiveHandlerManager.isVirtual(getAbsolutePath());
- }
-
- public void setIsDirectory(boolean isDirectory)
- {
- _isDirectory = isDirectory;
- }
-
- public String getClassification() {
- String result;
- String linkTarget;
-
- if (isLink()) {
- result = "symbolic link"; //$NON-NLS-1$
- if ((linkTarget = _ftpFile.getLink()) !=null) {
- if(isDirectory()) {
- result += "(directory):" + linkTarget; //$NON-NLS-1$
- } else if((getUserPermissions() & 0x01) == 0x01) {
- result += "(executable):" + linkTarget; //$NON-NLS-1$
- } else {
- result += "(file):" + linkTarget; //$NON-NLS-1$
- }
- }
- } else if (isFile()) {
- if ((getUserPermissions() & 0x01) == 0x01) {
- 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;
- }
-
- private void initPermissions(FTPFile ftpFile){
- _permissions = new HostFilePermissions();
- _permissions.setPermission(IHostFilePermissions.PERM_USER_READ, ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_USER_WRITE, ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_USER_EXECUTE, ftpFile.hasPermission(FTPFile.USER_ACCESS, FTPFile.EXECUTE_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_GROUP_READ, ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.READ_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_GROUP_WRITE, ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.WRITE_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_GROUP_EXECUTE, ftpFile.hasPermission(FTPFile.GROUP_ACCESS, FTPFile.EXECUTE_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_OTHER_READ, ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.READ_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_OTHER_WRITE, ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.WRITE_PERMISSION));
- _permissions.setPermission(IHostFilePermissions.PERM_OTHER_EXECUTE, ftpFile.hasPermission(FTPFile.WORLD_ACCESS, FTPFile.EXECUTE_PERMISSION));
-
-
- _permissions.setUserOwner(ftpFile.getUser());
- _permissions.setGroupOwner(ftpFile.getGroup());
- }
-
- public IHostFilePermissions getPermissions() {
- return _permissions;
- }
-
- public void setPermissions(IHostFilePermissions permissions) {
- _permissions = permissions;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
deleted file mode 100644
index 7965e5031..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
+++ /dev/null
@@ -1,1805 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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 apache 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 cancelled
- * 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
- * Javier Montalvo Orus (Symbian) - Fixing 169680 - [ftp] FTP files subsystem and service should use passive mode
- * Javier Montalvo Orus (Symbian) - Fixing 174828 - [ftp] Folders are attempted to be removed as files
- * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP should provide API to allow clients register their own FTPListingParser
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Javier Montalvo Orus (Symbian) - improved autodetection of FTPListingParser
- * Javier Montalvo Orus (Symbian) - [187096] Drag&Drop + Copy&Paste shows error message on FTP connection
- * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
- * Javier Montalvo Orus (Symbian) - [187862] Incorrect Error Message when creating new file in read-only directory
- * Javier Montalvo Orus (Symbian) - [194204] Renaming Files/Folders moves them sometimes
- * Javier Montalvo Orus (Symbian) - [192724] New Filter with Show Files Only still shows folders
- * Martin Oberhuber (Wind River) - [192724] Fixed logic to filter folders if FILE_TYPE_FOLDERS
- * Javier Montalvo Orus (Symbian) - [191048] Remote files locally listed and being removed by other users should be reported as missing
- * Javier Montalvo Orus (Symbian) - [195677] Rename fails on WFTPD-2.03
- * Javier Montalvo Orus (Symbian) - [197105] Directory listing fails on Solaris when special devices are in a directory
- * Javier Montalvo Orus (Symbian) - [197758] Unix symbolic links are not classified as file vs. folder
- * Javier Montalvo Orus (Symbian) - [198182] FTP export problem: RSEF8057E: Error occurred while exporting FILENAME: Operation failed. File system input or output error
- * Javier Montalvo Orus (Symbian) - [192610] EFS operations on an FTP connection make Eclipse freeze
- * Javier Montalvo Orus (Symbian) - [195830] RSE performs unnecessary remote list commands
- * Martin Oberhuber (Wind River) - [198638] Fix invalid caching
- * Martin Oberhuber (Wind River) - [198645] Fix case sensitivity issues
- * Martin Oberhuber (Wind River) - [192610] Fix thread safety for delete(), upload(), setReadOnly() operations
- * Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
- * Javier Montalvo Orus (Symbian) - [199243] Renaming a file in an FTP-based EFS folder hangs all of Eclipse
- * Martin Oberhuber (Wind River) - [203306] Fix Deadlock comparing two files on FTP
- * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
- * Martin Oberhuber (Wind River) - [203490] Fix NPE in FTPService.getUserHome()
- * Martin Oberhuber (Wind River) - [203500] Support encodings for FTP paths
- * Javier Montalvo Orus (Symbian) - [196351] Delete a folder should do recursive Delete
- * Javier Montalvo Orus (Symbian) - [187096] Drag&Drop + Copy&Paste shows error message on FTP connection
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Javier Montalvo Orus (Symbian) - [208912] Cannot expand /C on a VxWorks SSH Server
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Javier Montalvo Orus (Symbian) - [212382] additional "initCommands" slot for ftpListingParsers extension point
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
- * Martin Oberhuber (Wind River) - [218040] FTP should support permission modification
- * Martin Oberhuber (Wind River) - [234045] FTP Permission Error Handling
- * Martin Oberhuber (Wind River) - [235463][ftp][dstore] Incorrect case sensitivity reported on windows-remote
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- * Martin Oberhuber (Wind River) - [240738][ftp] Incorrect behavior on getFile for non-existing folder
- * David McKnight (IBM) - [243921] FTP subsystem timeout causes error when expanding folders
- * Martin Oberhuber (Wind River) - [217472][ftp] Error copying files with very short filenames
- * Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
- * Martin Oberhuber (Wind River) - [285948] Avoid recursive deletion over symbolic links
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.files.ftp;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-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.io.PrintStream;
-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.apache.commons.net.ProtocolCommandEvent;
-import org.apache.commons.net.ProtocolCommandListener;
-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.FTPConnectionClosedException;
-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.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigFactory;
-import org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigProxy;
-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.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundException;
-import org.eclipse.rse.services.clientserver.messages.SystemLockTimeoutException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemNetworkIOException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
-import org.eclipse.rse.services.files.AbstractFileService;
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-
-public class FTPService extends AbstractFileService implements IFTPService, IFilePermissionsService
-{
- private FTPClient _ftpClient;
- private FTPFile[] _ftpFiles;
-
- private Mutex _commandMutex = new Mutex();
-
- private String _userHome;
- private boolean _caseSensitive = true;
- private transient String _hostName;
- private transient String _userId;
- private transient String _password;
- private transient int _portNumber;
- private transient String _controlEncoding; //Encoding to be used for file and path names
-
- private OutputStream _ftpLoggingOutputStream;
- private ProtocolCommandListener _ftpProtocolCommandListener;
- private IPropertySet _ftpPropertySet;
- private Exception _exception;
-
- private boolean _isBinaryFileType = true;
- private boolean _isPassiveDataConnectionMode = false;
- private IFTPClientConfigFactory _entryParserFactory;
- private IFTPClientConfigProxy _clientConfigProxy;
-
- //workaround to access FTPHostFile objects previously retrieved from the server
- //to avoid accessing the remote target when not necessary (bug 195830)
- //In the future, it would be better that the IHostFile object were passed from
- //the upper layer instead of the folder and file name.
- //See bug 162950.
- private String _fCachePreviousParent;
- private long _fCachePreviousTimestamp;
- private Map _fCachePreviousFiles = new HashMap();
- private static long FTP_STATCACHE_TIMEOUT = 200; //msec
-
- private static class FTPBufferedInputStream extends BufferedInputStream {
-
- private FTPClient client;
-
- /**
- * Creates a BufferedInputStream and saves its argument, the input stream, for later use. An internal buffer array is created.
- * @param in the underlying input stream.
- * @param client the FTP client.
- */
- public FTPBufferedInputStream(InputStream in, FTPClient client) {
- super(in);
- this.client = client;
- }
-
- /**
- * Creates a BufferedInputStream and saves its argument, the input stream, for later use. An internal buffer array of the given size is created.
- * @param in the underlying input stream.
- * @param size the buffer size.
- * @param client the FTP client.
- */
- public FTPBufferedInputStream(InputStream in, int size, FTPClient client) {
- super(in, size);
- this.client = client;
- }
-
- /**
- * Closes the underlying input stream and completes the FTP transaction.
- * @see java.io.BufferedInputStream#close()
- */
- public void close() throws IOException {
- super.close();
- client.completePendingCommand();
- client.logout();
- }
- }
-
- private class FTPBufferedOutputStream extends BufferedOutputStream {
-
- private FTPClient client;
-
- /**
- * Creates a new buffered output stream to write data to the specified underlying output stream with a default 512-byte buffer size.
- * @param out the underlying output stream.
- * @param client the FTP client.
- */
- public FTPBufferedOutputStream(OutputStream out, FTPClient client) {
- super(out);
- this.client = client;
- }
-
- /**
- * Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.
- * @param out the underlying output stream.
- * @param size the buffer size.
- * @param client the FTP client.
- */
- public FTPBufferedOutputStream(OutputStream out, int size, FTPClient client) {
- super(out, size);
- this.client = client;
- }
-
- /**
- * Closes the underlying output stream and completes the FTP transaction.
- * @see java.io.FilterOutputStream#close()
- */
- public void close() throws IOException {
- super.close();
- client.completePendingCommand();
- client.logout();
- }
- }
-
- /**
- * Set a IPropertySet containing pairs of keys and values with
- * the FTP Client preferences<br/>
- * Supported keys and values are:<br/>
- * <table border="1">
- * <tr><th>KEY</th><th>VALUE</th><th>Usage</th></tr>
- * <tr><th>"passive"</th><th>"true" | "false"</th><th>Enables FTP passive mode</th></tr>
- * </table>
- *
- * @see org.eclipse.rse.core.model.IPropertySet
- * @param ftpPropertySet FTP Client Preference Properties to set
- */
- public void setPropertySet(IPropertySet ftpPropertySet)
- {
- _ftpPropertySet = ftpPropertySet;
- }
-
- /*
- * (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 setFTPClientConfigFactory(IFTPClientConfigFactory entryParserFactory)
- {
- _entryParserFactory = entryParserFactory;
- }
-
- /**
- * Set the character encoding to be used on the FTP command channel.
- * The encoding must be compatible with ASCII since FTP commands will
- * be sent with the same encoding. Therefore, wide
- * (16-bit) encodings are not supported.
- * @param encoding Encoding to set
- */
- public void setControlEncoding(String encoding)
- {
- _controlEncoding = encoding;
- }
-
- /**
- * Check whether the given Unicode String can be properly represented with the
- * specified control encoding. Throw a SystemMessageException if it turns out
- * that information would be lost.
- * @param s String to check
- * @return the original String or a quoted or re-coded version if possible
- * @throws SystemMessageException if information is lost
- */
- protected String checkEncoding(String s) throws SystemMessageException {
- if (s == null || s.length() == 0)
- return s;
- String encoding = _controlEncoding!=null ? _controlEncoding : getFTPClient().getControlEncoding();
- try {
- byte[] bytes = s.getBytes(encoding);
- String decoded = new String(bytes, encoding);
- if (!s.equals(decoded)) {
- int i=0;
- int lmax = Math.min(s.length(), decoded.length());
- while( (i<lmax) && (s.charAt(i)==decoded.charAt(i))) {
- i++;
- }
- //String sbad=s.substring(Math.max(i-2,0), Math.min(i+2,lmax));
- char sbad = s.charAt(i);
- //FIXME Need to externalize this message in 3.0
- String msg = "Cannot express character \'"+sbad+"\'(0x"+Integer.toHexString(sbad) +") with " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + "encoding \""+encoding+"\". "; //$NON-NLS-1$ //$NON-NLS-2$
- msg += "Please specify a different encoding in host properties."; //$NON-NLS-1$
- throw new UnsupportedEncodingException(msg);
- }
- return s;
- } catch(UnsupportedEncodingException e) {
- SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- throw new SystemMessageException(msg);
-
- }
- }
-
- private SystemMessageException makeSystemMessageException(Exception e) {
- if (e instanceof SystemMessageException) {
- // dont wrap SystemMessageException again
- return (SystemMessageException) e;
- } else if (e instanceof IOException) {
- return new SystemNetworkIOException(e);
- }
- return new RemoteFileIOException(e);
- }
-
- public void connect() throws RemoteFileSecurityException,IOException
- {
-
- if (_ftpClient == null)
- {
- _ftpClient = new FTPClient();
- // Encoding of control connection
- if(_controlEncoding!=null) {
- _ftpClient.setControlEncoding(_controlEncoding);
- }
- }
-
- if(_ftpLoggingOutputStream!=null)
- {
- _ftpProtocolCommandListener = new ProtocolCommandListener() {
-
- private PrintStream os = new PrintStream(_ftpLoggingOutputStream);
-
- public void protocolCommandSent(ProtocolCommandEvent event) {
- os.print(event.getMessage());
- }
-
- public void protocolReplyReceived(ProtocolCommandEvent event) {
- os.println(event.getMessage());
- }
-
- };
- _ftpClient.addProtocolCommandListener(_ftpProtocolCommandListener);
- }
-
- 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
- int passReply;
- if (_ftpProtocolCommandListener != null)
- {
- _ftpClient.removeProtocolCommandListener(_ftpProtocolCommandListener);
- String newLine = System.getProperty("line.separator"); //$NON-NLS-1$
- _ftpLoggingOutputStream.write(("PASS ******" + newLine).getBytes()); //$NON-NLS-1$
- passReply = _ftpClient.pass(_password);
- _ftpLoggingOutputStream.write((_ftpClient.getReplyString() + newLine).getBytes());
- _ftpClient.addProtocolCommandListener(_ftpProtocolCommandListener);
- } else {
- passReply = _ftpClient.pass(_password);
- }
-
- if(!FTPReply.isPositiveCompletion(passReply))
- {
- String lastMessage = _ftpClient.getReplyString();
- disconnect();
- throw new RemoteFileSecurityException(new Exception(lastMessage));
- }
- }
- else if(!FTPReply.isPositiveCompletion(userReply))
- {
- String lastMessage = _ftpClient.getReplyString();
- disconnect();
- throw new RemoteFileSecurityException(new Exception(lastMessage));
- }
-
- //System parser
-
- String systemName = _ftpClient.getSystemName();
-
- _ftpClient.setParserFactory(_entryParserFactory);
- _clientConfigProxy = _entryParserFactory.getFTPClientConfig(_ftpPropertySet.getPropertyValue("parser"),systemName); //$NON-NLS-1$
-
- if(_clientConfigProxy!=null)
- {
- _ftpClient.configure(_clientConfigProxy.getFTPClientConfig());
- }
- else
- {
- //UNIX parsing by default if no suitable parser found
- _ftpClient.configure(new FTPClientConfig(FTPClientConfig.SYST_UNIX));
- }
-
- // Initial active/passive mode. This action will be refreshed later using setDataConnectionMode()
- if(_ftpPropertySet.getPropertyValue("passive").equalsIgnoreCase("true")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- _ftpClient.enterLocalPassiveMode();
- _isPassiveDataConnectionMode = true;
- }
- else
- {
- _ftpClient.enterLocalActiveMode();
- _isPassiveDataConnectionMode = false;
- }
-
- // Initial ASCII/Binary mode. This action will be refreshed later using setFileType()
- _ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
- _isBinaryFileType = true;
-
- //Initial commands
- String[] initialCommands = _clientConfigProxy.getInitialCommands();
-
- for (int i = 0; i < initialCommands.length; i++) {
- _ftpClient.sendCommand(initialCommands[i]);
- }
-
- _userHome = _ftpClient.printWorkingDirectory();
-
- //For VMS, normalize the home location
- if(_userHome.indexOf(':')!=-1 && _userHome.indexOf(']')!=-1)
- {
- _userHome = _userHome.replaceAll(":\\[", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- _userHome = '/'+_userHome.substring(0,_userHome.lastIndexOf(']'));
- }
-
- //Just to be safe
- clearCache(null);
- }
-
- public void disconnect()
- {
- clearCache(null);
- try
- {
- getFTPClient().logout();
- _ftpClient = null;
- }
- catch (IOException e)
- {
- }
- finally {
- _ftpClient = null;
- }
-
- }
-
- private void chdir(FTPClient ftpClient, String remoteFolder) throws SystemMessageException {
- // try to retrieve the file
- try {
- if (!ftpClient.changeWorkingDirectory(remoteFolder)) {
- String reply = ftpClient.getReplyString();
- if (reply != null && reply.startsWith("550")) { //$NON-NLS-1$
- if (!reply.trim().endsWith("Not a directory.")) { //$NON-NLS-1$
- // No such file or directory
- throw new SystemElementNotFoundException(remoteFolder, "chdir"); //$NON-NLS-1$
- }
- }
- throw new RemoteFileIOException(new Exception(reply + " (" + remoteFolder + ")")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch (IOException e) {
- throw new SystemNetworkIOException(e);
- }
- }
-
- /**
- * 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();
- // Encoding of control connection
- if(_controlEncoding!=null) {
- _ftpClient.setControlEncoding(_controlEncoding);
- }
- }
-
- if(_hostName!=null)
- {
- try{
- _ftpClient.sendNoOp();
- }catch (IOException e){
- try {
- connect();
- } catch (Exception e1) {}
- }
- }
-
- setDataConnectionMode();
-
- return _ftpClient;
- }
-
- /**
- * Clones the main FTP client connection, providing a separate client connected to the FTP server.
- *
- * @param isBinary true if the FTPClient has to be using binary mode for data transfer, otherwise ASCII mode will be used
- * @return A new commons.net FTPClient connected to the same server. After usage it has to be disconnected.
- * @throws IOException
- */
- private FTPClient cloneFTPClient(boolean isBinary) throws IOException
- {
- FTPClient ftpClient = new FTPClient();
- boolean ok=false;
- try {
- ftpClient.setControlEncoding(_ftpClient.getControlEncoding());
- ftpClient.connect(_ftpClient.getRemoteAddress());
- ftpClient.login(_userId,_password);
-
- if (_clientConfigProxy != null) {
- ftpClient.configure(_clientConfigProxy.getFTPClientConfig());
- } else {
- // UNIX parsing by default if no suitable parser found
- ftpClient.configure(new FTPClientConfig(FTPClientConfig.SYST_UNIX));
- }
-
- if (_isPassiveDataConnectionMode) {
- ftpClient.enterLocalPassiveMode();
- }
-
- if (isBinary) {
- ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
- } else {
- ftpClient.setFileType(FTP.ASCII_FILE_TYPE);
- }
- if (_ftpProtocolCommandListener != null) {
- ftpClient.addProtocolCommandListener(_ftpProtocolCommandListener);
- }
- ok=true;
- } finally {
- //disconnect the erroneous ftpClient, but forward the exception
- if (!ok) {
- try {
- ftpClient.disconnect();
- } catch(Throwable t) { /*ignore*/ }
- }
- }
- return ftpClient;
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getFile(String, String, IProgressMonitor)
- */
- public IHostFile getFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- return getFileInternal(remoteParent, fileName, monitor);
- }
-
-
- /**
- * Return FTPHostFile object for a given parent dir and file name.
- * This is different than {@link #getFile(String, String, IProgressMonitor)}
- * in order to ensure we always return proper FTPHostFile type.
- *
- * @see org.eclipse.rse.services.files.IFileService#getFile(String, String, IProgressMonitor)
- */
- protected FTPHostFile getFileInternal(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- boolean isRoot = (remoteParent == null || remoteParent.length() == 0);
- if (isRoot) {
- // FTP doesn't really support getting properties of Roots yet. For
- // now, return the root and claim it's existing.
- return new FTPHostFile(remoteParent, fileName, true, true, 0, 0, true);
- }
- remoteParent = checkEncoding(remoteParent);
- fileName = checkEncoding(fileName);
- if (monitor!=null){
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
-
- //Try the cache first, perhaps there is no need to acquire the Mutex
- //The cache is case sensitive only on purpose. For case insensitive matches
- //A fresh LIST is required.
- //
- //In the future, it would be better that the
- //IHostFile object were passed from the upper layer instead of the
- //folder and file name (Bug 162950)
- synchronized(_fCachePreviousFiles) {
- if (_fCachePreviousParent == null ? remoteParent==null : _fCachePreviousParent.equals(remoteParent)) {
- Object result = _fCachePreviousFiles.get(fileName);
- if (result!=null) {
- long diff = System.currentTimeMillis() - _fCachePreviousTimestamp;
- //System.out.println("FTPCache: "+diff+", "+remoteParent+", "+fileName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (diff < FTP_STATCACHE_TIMEOUT) {
- return (FTPHostFile)result;
- }
- }
- }
- }
-
- FTPHostFile file = null;
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try {
- //try to retrieve the file
- _ftpClient = getFTPClient();
- chdir(_ftpClient, remoteParent);
- if(!listFiles(monitor))
- {
- throw new SystemOperationCancelledException();
- }
-
- synchronized (_fCachePreviousFiles) {
- cacheFiles(remoteParent);
-
- // Bug 198645: try exact match first
- Object o = _fCachePreviousFiles.get(fileName);
- if (o!=null) return (FTPHostFile)o;
-
- // try case insensitive match (usually never executed)
- if (!isCaseSensitive()) {
- for (int i = 0; i < _ftpFiles.length; i++) {
- String tempName = _ftpFiles[i].getName();
- if (tempName.equalsIgnoreCase(fileName)) {
- file = (FTPHostFile) _fCachePreviousFiles.get(tempName);
- 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 (SystemElementNotFoundException senfe) {
- // Return non-existing file
- file = new FTPHostFile(remoteParent, fileName, false, false, 0, 0, false);
- } catch (Exception e) {
- throw makeSystemMessageException(e);
- } finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
-
- return file;
- }
-
- public boolean isConnected()
- {
- boolean isConnected = false;
-
- if(_ftpClient!=null) {
- isConnected = _ftpClient.isConnected();
- if (isConnected){ // make sure that there hasn't been a timeout
- try {
- _ftpClient.noop();
- }
- catch (FTPConnectionClosedException e){
- return false;
- }
- catch (IOException e2){
- return false;
- }
- }
- }
-
- 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(String parentPath, String fileFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- parentPath = checkEncoding(parentPath);
- if (monitor!=null){
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
-
- List results = new ArrayList();
-
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try
- {
- 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);
- }
-
- _ftpClient = getFTPClient();
- chdir(_ftpClient, parentPath);
- if(!listFiles(monitor))
- {
- throw new SystemOperationCancelledException();
- }
-
- synchronized (_fCachePreviousFiles) {
- cacheFiles(parentPath);
-
- for(int i=0; i<_ftpFiles.length; i++)
- {
- if(_ftpFiles[i]==null)
- {
- continue;
- }
-
- String rawListLine = _ftpFiles[i].getRawListing()+System.getProperty("line.separator"); //$NON-NLS-1$
- _ftpLoggingOutputStream.write(rawListLine.getBytes());
-
- String name = _ftpFiles[i].getName();
- FTPHostFile f = (FTPHostFile)_fCachePreviousFiles.get(name);
-
- if (isRightType(fileType,f)) {
-
- if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
- //Never return the default directory names
- continue;
- } else if (f.isDirectory() && fileType!=IFileService.FILE_TYPE_FOLDERS) {
- //get ALL directory names (unless looking for folders only)
- results.add(f);
- } else if (filematcher.matches(name)) {
- //filter all others by name.
- results.add(f);
- }
- }
- }
- }
- _ftpLoggingOutputStream.write(System.getProperty("line.separator").getBytes()); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- throw makeSystemMessageException(e);
- } finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
-
- return (IHostFile[])results.toArray(new IHostFile[results.size()]);
- }
-
-
- private char getSeparator()
- {
- return PathUtility.getSeparator(_userHome).charAt(0);
- }
-
- /*
- * (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 void upload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
- remoteParent = checkEncoding(remoteParent);
- remoteFile = checkEncoding(remoteFile);
-
- if (monitor!=null){
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
- else{
- monitor = new NullProgressMonitor();
- }
-
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
- progressMonitor.init(0, localFile.getName(), remoteFile, localFile.length());
-
- try {
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try
- {
- internalUpload(localFile, remoteParent, remoteFile, isBinary, srcEncoding, hostEncoding, progressMonitor);
- }
- finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- } catch (SystemMessageException e) {
- throw e;
- } catch(Exception e) {
- throw new RemoteFileIOException(e);
- } finally {
- progressMonitor.end();
- }
- }
-
- /*
- * (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 void upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
- remoteParent = checkEncoding(remoteParent);
- remoteFile = checkEncoding(remoteFile);
-
- 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()) {
- throw new SystemOperationCancelledException();
- }
- }
- }
- bos.close();
- upload(tempFile, remoteParent, remoteFile, isBinary, null, hostEncoding, monitor);
-
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- }
-
- private void internalUpload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, MyProgressMonitor progressMonitor) throws IOException, RemoteFileIOException, SystemMessageException
- {
-
- InputStream input = null;
- OutputStream output = null;
- FTPClient ftpClient = getFTPClient();
-
- try{
- clearCache(remoteParent);
- chdir(ftpClient, remoteParent);
- setFileType(isBinary);
-
- input = new FileInputStream(localFile);
- output = ftpClient.storeFileStream(remoteFile);
- if (output!=null) {
- 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 (progressMonitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
- output.flush();
- output.close();
- output = null;
- ftpClient.completePendingCommand();
- } else {
- throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()));
- }
- } catch (SystemOperationCancelledException e) {
- ftpClient.deleteFile(remoteFile);
- throw e;
- }finally{
- try {
- if (input!=null) input.close();
- } finally {
- if (output!=null) output.close();
- }
- }
- }
-
-
- /*
- * (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 void download(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
-
- if (monitor!=null){
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
-
- IHostFile remoteHostFile = getFile(remoteParent, remoteFile, monitor);
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
- progressMonitor.init(0, remoteFile, localFile.getName(), remoteHostFile.getSize());
-
- try {
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try
- {
- internalDownload(remoteParent, remoteFile, localFile, isBinary, hostEncoding, progressMonitor);
- }
- finally
- {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- } catch (FileNotFoundException e) {
- throw new RemoteFileIOException(e);
- } catch (IOException e) {
- throw new RemoteFileIOException(e);
- } finally {
- progressMonitor.end();
-
- }
- }
-
- private void internalDownload(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding, MyProgressMonitor progressMonitor) throws SystemMessageException, IOException
- {
- InputStream input = null;
- OutputStream output = null;
-
- try{
-
- FTPClient ftpClient = getFTPClient();
- chdir(ftpClient, remoteParent);
- setFileType(isBinary);
-
- input = ftpClient.retrieveFileStream(remoteFile);
-
- if(input != null)
- {
- if (!localFile.exists())
- {
- File localParentFile = localFile.getParentFile();
- if (!localParentFile.exists())
- {
- localParentFile.mkdirs();
- }
- localFile.createNewFile();
- }
-
- output = new FileOutputStream(localFile);
- byte[] buffer = new byte[4096];
- int readCount;
- while((readCount = input.read(buffer)) > 0)
- {
- output.write(buffer, 0, readCount);
- progressMonitor.count(readCount);
- if (progressMonitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
- output.flush();
- input.close();
- input = null;
- ftpClient.completePendingCommand();
-
- }
- else
- {
- throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()));
- }
-
- }finally{
- try {
- if (input!=null) input.close();
- } finally {
- if (output!=null) output.close();
- }
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#getUserHome()
- */
- public IHostFile getUserHome()
- {
- if (_userHome==null) {
- //As per bug 204710, this may be called before we are connected.
- //Returning null in this case is safest, see also SftpFileService.
- return null;
- }
- return new FTPHostFile(null, _userHome, true, true, 0, 0, true);
- }
-
- /*
- * (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 void delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException {
- remoteParent = checkEncoding(remoteParent);
- fileName = checkEncoding(fileName);
-
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
- progressMonitor.init(FTPServiceResources.FTP_File_Service_Deleting_Task + fileName, IProgressMonitor.UNKNOWN);
- try {
- IHostFile file = getFile(remoteParent, fileName, monitor);
-
- if (_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) {
- try {
- //Try to delete even if it looked like the file doesn't exist,
- //since existence might have been cached and be out-of-date
- FTPClient ftpClient = getFTPClient();
- internalDelete(ftpClient, remoteParent, fileName, file.isFile(), progressMonitor);
- }
- catch (IOException e)
- {
- if (!file.exists())
- throw new SystemElementNotFoundException(file.getAbsolutePath(), "delete"); //$NON-NLS-1$
- throw new RemoteFileIOException(e);
- }
- catch (SystemMessageException e) {
- if (!file.exists())
- throw new SystemElementNotFoundException(file.getAbsolutePath(), "delete"); //$NON-NLS-1$
- throw e;
- }
- finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- } finally {
- progressMonitor.end();
- }
- }
-
- private void internalDelete(FTPClient ftpClient, String parentPath, String fileName, boolean isFile, MyProgressMonitor monitor)
- throws SystemMessageException, IOException
- {
- if(monitor.isCanceled())
- {
- throw new SystemOperationCancelledException();
- }
-
- clearCache(parentPath);
- boolean hasSucceeded = FTPReply.isPositiveCompletion(ftpClient.cwd(parentPath));
- monitor.worked(1);
-
- if(hasSucceeded)
- {
- if(isFile)
- {
- hasSucceeded = ftpClient.deleteFile(fileName);
- monitor.worked(1);
- }
- else
- {
- hasSucceeded = ftpClient.removeDirectory(fileName);
- monitor.worked(1);
- }
- }
-
- if(!hasSucceeded){
- if(isFile)
- {
- throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()+" ("+concat(parentPath,fileName)+")")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else //folder recursively
- {
- String newParentPath = concat(parentPath,fileName);
-
- try {
- chdir(ftpClient, newParentPath);
- } catch (SystemElementNotFoundException e) {
- /* nothing to do since dir does not exist */
- }
- FTPFile[] fileNames = ftpClient.listFiles();
-
- for (int i = 0; i < fileNames.length; i++) {
- String curName = fileNames[i].getName();
- if (curName == null || curName.equals(".") || curName.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
- internalDelete(ftpClient, newParentPath, curName, fileNames[i].isFile() || fileNames[i].isSymbolicLink(), monitor);
- }
-
- //remove empty folder
- chdir(ftpClient, parentPath);
- hasSucceeded = ftpClient.removeDirectory(fileName);
- if (!hasSucceeded)
- {
- throw new RemoteFileIOException(new Exception(ftpClient.getReplyString() + " (" + concat(parentPath, fileName) + ")")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
-
-
- /* (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 void rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException {
- remoteParent = checkEncoding(remoteParent);
- oldName = checkEncoding(oldName);
- newName = checkEncoding(newName);
-
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try {
- FTPClient ftpClient = getFTPClient();
- clearCache(remoteParent);
- chdir(ftpClient, remoteParent);
- boolean success = ftpClient.rename(oldName, newName);
-
- if(!success)
- {
- throw new Exception(ftpClient.getReplyString());
- }
-
- } catch (Exception e) {
- throw makeSystemMessageException(e);
- }finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- /* (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 void rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) {
- oldFile.renameTo(newName);
- }
-
- /* (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 void move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException{
- srcParent = checkEncoding(srcParent);
- srcName = checkEncoding(srcName);
- tgtParent = checkEncoding(tgtParent);
- tgtName = checkEncoding(tgtName);
-
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try{
- FTPClient ftpClient = getFTPClient();
-
- String source = concat(srcParent,srcName);
- String target = concat(tgtParent,tgtName);
-
- clearCache(srcParent);
- clearCache(tgtParent);
- boolean success = ftpClient.rename(source, target);
-
- if(!success)
- {
- throw new Exception(ftpClient.getReplyString());
- }
-
- }catch (Exception e) {
- throw new RemoteFileIOException(e);
- }finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#createFolder(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
- */
- public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
- {
- remoteParent = checkEncoding(remoteParent);
- folderName = checkEncoding(folderName);
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
- {
- try
- {
- FTPClient ftpClient = getFTPClient();
- clearCache(remoteParent);
- chdir(ftpClient, remoteParent);
- if(!ftpClient.makeDirectory(folderName))
- {
- throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()+" ("+folderName+")")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
- catch (Exception e) {
- throw makeSystemMessageException(e);
- }finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
-
- return getFile(remoteParent, folderName, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#createFile(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String)
- */
- public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException{
- remoteParent = checkEncoding(remoteParent);
- fileName = checkEncoding(fileName);
- try {
- File tempFile = File.createTempFile("ftp", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
- tempFile.deleteOnExit();
- try {
- upload(tempFile, remoteParent, fileName, _isBinaryFileType, null, null, monitor);
- } catch (SystemMessageException e) {
- throw new RemoteFileIOException(new Exception(getFTPClient().getReplyString()));
- }
- }
- catch (Exception e) {
- throw new RemoteFileSecurityException(e);
- }
-
- return getFile(remoteParent, fileName, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#copy(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
- {
- srcParent = checkEncoding(srcParent);
- srcName = checkEncoding(srcName);
- tgtParent = checkEncoding(tgtParent);
- tgtName = checkEncoding(tgtName);
-
- if (monitor!=null){
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- }
-
- IHostFile remoteHostFile = getFile(srcParent, srcName, monitor);
- MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
- progressMonitor.init(0, concat(srcParent,srcName), concat(tgtParent,tgtName), remoteHostFile.getSize()*2);
-
-
- if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) {
- try {
-
- internalCopy(getFTPClient(), srcParent, srcName, tgtParent, tgtName, remoteHostFile.isDirectory(), progressMonitor);
- }
- catch(IOException e)
- {
- throw new RemoteFileIOException(new Exception(getFTPClient().getReplyString()));
- }
- finally {
- _commandMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- private void internalCopy(FTPClient ftpClient, String srcParent, String srcName, String tgtParent, String tgtName, boolean isDirectory, MyProgressMonitor monitor) throws SystemMessageException, IOException
- {
- if (monitor.isCanceled())
- {
- throw new SystemOperationCancelledException();
- }
-
- if(isDirectory)
- {
-
- //create folder
- // TODO what happens if the destination folder already exists?
- // Success=true or false?
- ftpClient.makeDirectory(concat(tgtParent,tgtName));
-
- //copy contents
- String newSrcParentPath = concat(srcParent,srcName);
- String newTgtParentPath = concat(tgtParent,tgtName);
-
- chdir(ftpClient, newSrcParentPath);
- FTPFile[] fileNames = ftpClient.listFiles();
-
- for (int i = 0; i < fileNames.length; i++) {
- String curName = fileNames[i].getName();
- if (curName == null || curName.equals(".") || curName.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
- // TODO should we bail out in case a single file fails?
- internalCopy(ftpClient, newSrcParentPath, curName, newTgtParentPath, curName, fileNames[i].isDirectory(), monitor);
- }
-
- }
- else
- {
- File tempFile = null;
-
- try {
- tempFile = File.createTempFile("ftpcp" + String.valueOf(srcParent.hashCode()), "temp"); //$NON-NLS-1$ //$NON-NLS-2$
- tempFile.deleteOnExit();
- } catch (IOException e) {
- throw new RemoteFileIOException(e);
- }
-
- //Use binary raw transfer since the file will be uploaded again
- try {
- internalDownload(srcParent, srcName, tempFile, true, null, monitor);
- internalUpload(tempFile, tgtParent, tgtName, true, null, null, monitor);
- } finally {
- tempFile.delete();
- }
- }
-
- }
-
- public void copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException
- {
- for(int i=0; i<srcNames.length; i++)
- {
- copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
- }
- }
-
- public void setIsCaseSensitive(boolean b) {
- _caseSensitive = b;
- }
-
- public boolean isCaseSensitive()
- {
- return _caseSensitive;
- }
-
- /**
- * Internal method to list files.
- * MUST ALWAYS be called from _commandMutex protected region.
- */
- private boolean listFiles(IProgressMonitor monitor) throws Exception
- {
- boolean result = true;
-
- _exception = null;
-
- Thread listThread = new Thread(new Runnable(){
-
- public void run() {
- try {
-
- _ftpFiles = null;
-
- if(_clientConfigProxy!=null)
- {
- _ftpFiles = _ftpClient.listFiles(_clientConfigProxy.getListCommandModifiers());
- }
- else
- {
- _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.start();
- listThread.join();
- if(_exception!=null)
- {
- throw new RemoteFileIOException(_exception);
- }
-
- }
-
- return result;
- }
-
- private void cacheFiles(String parentPath) {
- synchronized (_fCachePreviousFiles) {
- _fCachePreviousFiles.clear();
- _fCachePreviousTimestamp = System.currentTimeMillis();
- _fCachePreviousParent = parentPath;
-
- for(int i=0; i<_ftpFiles.length; i++) {
- if(_ftpFiles[i]==null) {
- continue;
- }
- FTPHostFile f = new FTPHostFile(parentPath, _ftpFiles[i]);
- String name = f.getName();
- if(f.isLink()) {
- if(name.indexOf('.') < 0) {
- //modify FTPHostFile to be shown as a folder
- f.setIsDirectory(true);
- }
- }
- _fCachePreviousFiles.put(name, f);
- }
- }
- }
-
- /** Clear the statCache.
- * @param parentPath path to clear. If <code>null, clear
- * all caches.
- */
- private void clearCache(String parentPath) {
- synchronized (_fCachePreviousFiles) {
- if (parentPath==null || parentPath.equals(_fCachePreviousParent)) {
- _fCachePreviousFiles.clear();
- }
- }
- }
-
- private class MyProgressMonitor
- {
- private IProgressMonitor fMonitor;
- private double fWorkPercentFactor;
- private Long fMaxWorkKB;
- private long fWorkToDate;
-
- public MyProgressMonitor(IProgressMonitor monitor) {
- if (monitor == null) {
- fMonitor = new NullProgressMonitor();
- } else {
- fMonitor = monitor;
- }
- }
-
- public boolean isCanceled() {
- // embedded null progress monitor is never canceled
- return fMonitor.isCanceled();
- }
-
- 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();
- }
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#setLastModified(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, long)
- */
- public void setLastModified(String parent, String name,
- long timestamp, IProgressMonitor monitor) throws SystemMessageException
- {
- throw new SystemUnsupportedOperationException(Activator.PLUGIN_ID, "setLastModified"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.IFileService#setReadOnly(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
- */
- public void setReadOnly(String parent, String name,
- boolean readOnly, IProgressMonitor monitor) throws SystemMessageException {
-
- FTPHostFile file = getFileInternal(parent,name, monitor);
-
- int userPermissions = file.getUserPermissions();
- int groupPermissions = file.getGroupPermissions();
- int otherPermissions = file.getOtherPermissions();
-
- int oldPermissions = userPermissions * 100 + groupPermissions * 10 + otherPermissions;
- if(readOnly) {
- userPermissions &= 5; // & 101b
- groupPermissions &= 5; // & 101b
- otherPermissions &= 5; // & 101b
- } else {
- userPermissions |= 2; // | 010b
- }
- int newPermissions = userPermissions * 100 + groupPermissions * 10 + otherPermissions;
-
- if (newPermissions == oldPermissions) {
- // do nothing
- } else if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) {
- try {
- clearCache(parent);
- if (!_ftpClient.sendSiteCommand("CHMOD " + newPermissions + " " + file.getAbsolutePath())) { //$NON-NLS-1$ //$NON-NLS-2$
- String lastMessage = _ftpClient.getReplyString();
- throw new RemoteFileSecurityException(new Exception(lastMessage));
- }
- } catch (IOException e) {
- String pluginId = Activator.getDefault().getBundle().getSymbolicName();
- String messageText = e.getLocalizedMessage();
- SystemMessage message = new SimpleSystemMessage(pluginId, IStatus.ERROR, messageText, e);
- throw new SystemMessageException(message);
- } finally {
- _commandMutex.release();
- }
- }
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
-
- if (monitor != null && monitor.isCanceled()){
- throw new SystemOperationCancelledException();
- }
-
- InputStream stream = null;
-
- try {
- FTPClient ftpClient = cloneFTPClient(isBinary);
- chdir(ftpClient, remoteParent);
- stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient);
- }
- catch (Exception e) {
- throw makeSystemMessageException(e);
- }
-
- return stream;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
- return getOutputStream(remoteParent, remoteFile, options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
- remoteParent = checkEncoding(remoteParent);
- remoteFile = checkEncoding(remoteFile);
-
- if (monitor != null && monitor.isCanceled()){
- throw new SystemOperationCancelledException();
- }
-
- OutputStream stream = null;
-
- try {
- boolean isBinary = (options & IFileService.TEXT_MODE) == 0 ? true : false;
- FTPClient ftpClient = cloneFTPClient(isBinary);
- clearCache(remoteParent);
- chdir(ftpClient, remoteParent);
- if ((options & IFileService.APPEND) == 0){
- stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient);
- } else {
- stream = new FTPBufferedOutputStream(ftpClient.appendFileStream(remoteFile), ftpClient);
- }
- }
- catch (Exception e) {
- throw makeSystemMessageException(e);
- }
-
- return stream;
- }
-
- private void setDataConnectionMode()
- {
- if(_ftpPropertySet != null)
- {
- if(_ftpPropertySet.getPropertyValue("passive").equalsIgnoreCase("true") && !_isPassiveDataConnectionMode) //$NON-NLS-1$ //$NON-NLS-2$
- {
- _ftpClient.enterLocalPassiveMode();
- _isPassiveDataConnectionMode = true;
- }
- else if(_ftpPropertySet.getPropertyValue("passive").equalsIgnoreCase("false") && _isPassiveDataConnectionMode) //$NON-NLS-1$ //$NON-NLS-2$
- {
- _ftpClient.enterLocalActiveMode();
- _isPassiveDataConnectionMode = false;
- }
- }
- }
-
- private void setFileType(boolean isBinaryFileType) throws IOException
- {
- if(!isBinaryFileType && _isBinaryFileType)
- {
- _ftpClient.setFileType(FTP.ASCII_FILE_TYPE);
- _isBinaryFileType = isBinaryFileType;
- } else if(isBinaryFileType && !_isBinaryFileType)
- {
- _ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
- _isBinaryFileType = isBinaryFileType;
- }
- }
-
- /**
- * Concatenate a parent directory with a file name to form a new proper path name.
- * @param parentDir path name of the parent directory.
- * @param fileName file name to concatenate.
- * @return path name concatenated from parent directory and file name.
- *
- */
- protected String concat(String parentDir, String fileName) {
- StringBuffer path = new StringBuffer(parentDir);
- if (!parentDir.endsWith(String.valueOf(getSeparator())))
- {
- path.append(getSeparator());
- }
- path.append(fileName);
- return path.toString();
- }
-
-
- public IHostFilePermissions getFilePermissions(IHostFile file,
- IProgressMonitor monitor) throws SystemMessageException {
- if (file instanceof IHostFilePermissionsContainer)
- {
- return ((IHostFilePermissionsContainer)file).getPermissions();
- }
- return null;
- }
-
- public void setFilePermissions(IHostFile inFile,
- IHostFilePermissions permissions, IProgressMonitor monitor)
- throws SystemMessageException {
- //see also #setReadOnly()
- String s = Integer.toOctalString(permissions.getPermissionBits());
- if (_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) {
- try {
- clearCache(inFile.getParentPath());
- if (!_ftpClient.sendSiteCommand("CHMOD " + s + " " + inFile.getAbsolutePath())) { //$NON-NLS-1$ //$NON-NLS-2$
- String lastMessage = _ftpClient.getReplyString();
- throw new RemoteFileSecurityException(new Exception(lastMessage));
- }
- } catch (IOException e) {
- String pluginId = Activator.getDefault().getBundle().getSymbolicName();
- String messageText = e.getLocalizedMessage();
- SystemMessage message = new SimpleSystemMessage(pluginId, IStatus.ERROR, messageText, e);
- throw new SystemMessageException(message);
- } finally {
- _commandMutex.release();
- }
- }
-
- }
-
- public int getCapabilities(IHostFile file) {
- return IFilePermissionsService.FS_CAN_GET_ALL | FS_CAN_SET_PERMISSIONS;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java
deleted file mode 100644
index 0df25e583..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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 Orus (Symbian) - Added Externalized Strings
- * Javier Montalvo Orus (Symbian) - NLS Cleanup
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.files.ftp;
-
-import org.eclipse.osgi.util.NLS;
-
-public class FTPServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.services.files.ftp.FTPServiceResources";//$NON-NLS-1$
- public static String FTP_File_Service_Deleting_Task;
- 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/internal/services/files/ftp/FTPServiceResources.properties b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties
deleted file mode 100644
index ae244e11c..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPServiceResources.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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 Orus (Symbian) - Added Externalized Strings
-# Javier Montalvo Orus (Symbian) - NLS Cleanup
-################################################################################
-
-# 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_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/internal/services/files/ftp/IFTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/IFTPService.java
deleted file mode 100644
index d2e1a3980..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/IFTPService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.files.ftp;
-
-public interface IFTPService
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigFactory.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigFactory.java
deleted file mode 100644
index 8f5b80a51..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 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
- * Javier Montalvo Orus (Symbian) - improved autodetection of FTPListingParser
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.files.ftp.parser;
-
-import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
-
-
-public interface IFTPClientConfigFactory extends FTPFileEntryParserFactory {
-
- /**
- *
- * @param parserId Parser id selected from the FTP Settings. This setting is "AUTO" by default, performing a parser discovery
- * @param systemName String returned by the host from the FTP SYST command, describing the host
- * @return IFTPClientConfigProxy instance created from the attributes passed in the extension point
- */
- public IFTPClientConfigProxy getFTPClientConfig(String parserId, String systemName);
-
- /**
- * Returns an array of strings containing the id
- * @return a String[] containing the name attribute of the extension points
- */
- public String[] getKeySet();
-}
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigProxy.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigProxy.java
deleted file mode 100644
index 4cab9e78d..000000000
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/parser/IFTPClientConfigProxy.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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
- * Javier Montalvo Orus (Symbian) - [212382] additional "initCommands" slot for ftpListingParsers extension point
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.files.ftp.parser;
-
-import org.apache.commons.net.ftp.FTPClientConfig;
-import org.osgi.framework.Bundle;
-
-public interface IFTPClientConfigProxy {
-
- public String getId();
- public String getLabel();
- public int getPriority();
- public String getSystemTypeRegex();
- public String getClassName();
- public Bundle getDeclaringBundle();
- public String getListCommandModifiers();
- public String getDefaultDateFormatStr();
- public String getRecentDateFormatStr();
- public String getServerLanguageCode();
- public String getShortMonthNames();
- public String getServerTimeZoneId();
- public String[] getInitialCommands();
-
- public FTPClientConfig getFTPClientConfig();
-
-}
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 628d253c8..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 a1dbeeb4e..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/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.services.local;singleton:=true
-Bundle-Version: 2.1.101.qualifier
-Bundle-Activator: org.eclipse.rse.internal.services.local.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.services.local;x-friends:="org.eclipse.rse.subsystems.files.local,org.eclipse.rse.subsystems.processes.local,org.eclipse.rse.subsystems.shells.local",
- org.eclipse.rse.internal.services.local.files;x-friends:="org.eclipse.rse.subsystems.files.local",
- org.eclipse.rse.internal.services.local.processes;x-friends:="org.eclipse.rse.subsystems.processes.local",
- org.eclipse.rse.internal.services.local.search;x-friends:="org.eclipse.rse.subsystems.files.local",
- org.eclipse.rse.internal.services.local.shells;x-friends:="org.eclipse.rse.subsystems.shells.local"
-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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 37ddca944..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-###############################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE Local Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 d1f0a79a8..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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) - Use eclipse32.png feature image
-# Martin Oberhuber (Wind River) - Bug 153273: make shell output parsing common
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- .,\
- about.ini,\
- about.mappings,\
- dsdp32.png
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.services.local/dsdp32.png b/rse/plugins/org.eclipse.rse.services.local/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/dsdp32.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 e8e073d42..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Local Services
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/Activator.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/Activator.java
deleted file mode 100644
index 2d54e29a7..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/Activator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
-
- public static final String PLUGIN_ID = "org.eclipse.rse.services.local"; //$NON-NLS-1$
-
- /**
- * 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); //$NON-NLS-1$
- log.log(status);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalMessageIds.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalMessageIds.java
deleted file mode 100644
index 1faf355aa..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalMessageIds.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- ********************************************************************************/
-package org.eclipse.rse.internal.services.local;
-
-public interface ILocalMessageIds {
- public static final String FILEMSG_FILE_NOT_SAVED = "RSEF5006"; //$NON-NLS-1$
-
- public static final String FILEMSG_ARCHIVE_CORRUPTED = "RSEG1122"; //$NON-NLS-1$
- public static final String MSG_FOLDER_INUSE = "RSEG1150"; //$NON-NLS-1$
- public static final String MSG_FILE_INUSE = "RSEG1151"; //$NON-NLS-1$
-
- public static final String FILEMSG_CREATE_VIRTUAL_FAILED = "RSEF1124"; //$NON-NLS-1$
- public static final String FILEMSG_DELETE_VIRTUAL_FAILED = "RSEF1125"; //$NON-NLS-1$
-
- public static final String FILEMSG_RENAME_FILE_FAILED = "RSEF1301"; //$NON-NLS-1$
- public static final String FILEMSG_COPY_FILE_FAILED = "RSEF1306"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalService.java
deleted file mode 100644
index bfbad91a6..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/ILocalService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.services.local;
-
-public interface ILocalService
-{
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.java
deleted file mode 100644
index 418d2caee..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.local;
-
-import org.eclipse.osgi.util.NLS;
-
-public class LocalServiceResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.services.local.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;
-
-
- public static String FILEMSG_FILE_NOT_SAVED;
- public static String FILEMSG_FILE_NOT_SAVED_DETAILS;
-
- public static String FILEMSG_ARCHIVE_CORRUPTED;
- public static String FILEMSG_ARCHIVE_CORRUPTED_DETAILS;
-
- public static String FILEMSG_CREATE_VIRTUAL_FAILED;
- public static String FILEMSG_CREATE_VIRTUAL_FAILED_DETAILS;
-
- public static String FILEMSG_DELETE_VIRTUAL_FAILED;
- public static String FILEMSG_DELETE_VIRTUAL_FAILED_DETAILS;
-
- public static String FILEMSG_RENAME_FILE_FAILED;
- public static String FILEMSG_RENAME_FILE_FAILED_DETAILS;
-
- public static String FILEMSG_COPY_FILE_FAILED;
- public static String FILEMSG_COPY_FILE_FAILED_DETAILS;
-
- public static String FILEMSG_DELETING;
- public static String FILEMSG_COPYING;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, LocalServiceResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.properties b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.properties
deleted file mode 100644
index 3dcaeb341..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/LocalServiceResources.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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:
-# David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-###############################################################################
-
-# 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.
-
-
-FILEMSG_FILE_NOT_SAVED= File {0} was not completely saved on {1}. The file was saved in the local file system.
-FILEMSG_FILE_NOT_SAVED_DETAILS=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.
-
-FILEMSG_ARCHIVE_CORRUPTED=The archive is corrupted or unreadable.
-FILEMSG_ARCHIVE_CORRUPTED_DETAILS=The archive cannot be opened because its format is unrecognized, or its contents are damaged in some way.
-
-FILEMSG_CREATE_VIRTUAL_FAILED = Creation of the virtual file or folder {0} failed.</LevelOne>
-FILEMSG_CREATE_VIRTUAL_FAILED_DETAILS = There was an error creating the virtual file or folder. The virtual file or folder was not created.
-
-FILEMSG_DELETE_VIRTUAL_FAILED = Deletion of the virtual file or folder {0} failed.
-FILEMSG_DELETE_VIRTUAL_FAILED_DETAILS=There was an error deleting the virtual file or folder. The virtual file or folder was not deleted.
-
-FILEMSG_RENAME_FILE_FAILED=Renaming of the object {0} failed
-FILEMSG_RENAME_FILE_FAILED_DETAILS=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
-
-FILEMSG_COPY_FILE_FAILED=Copy of the file or folder {0} failed
-FILEMSG_COPY_FILE_FAILED_DETAILS=The file system reported the copy operation failed. You may not have authority to the target folder, or it may be in use
-
-
-FILEMSG_DELETING =Deleting {0}...
-FILEMSG_COPYING =Copying {0}...
-
-
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
deleted file mode 100644
index b29d098ac..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
+++ /dev/null
@@ -1,1835 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Kevin Doyle (IBM) - [182221] Throwing Proper Exceptions on create file/folder
- * Xuan Chen (IBM) - Fix 189487 - copy and paste a folder did not work - workbench hang
- * David McKnight (IBM) - [192705] Exception needs to be thrown when rename fails
- * Kevin Doyle (IBM) - [196211] Move a folder to a directory that contains a folder by that name errors
- * Martin Oberhuber (Wind River) - [199394] Allow real files/folders containing String #virtual#
- * Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
- * Kevin Doyle (IBM) - [199871] LocalFileService needs to implement getMessage()
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Kevin Doyle (IBM) - [209355] Retrieving list of FILE_TYPE_FOLDERS should return Archive's
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Xuan Chen (IBM) - [210555] [regression] NPE when deleting a file on SSH
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Radoslav Gerganov (ProSyst) - [218173] [local] non-generic filters don't work
- * Martin Oberhuber (Wind River) - [188330] Problems Copying files with $ in name
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * David McKnight (IBM) - [220241] JJ: IRemoteFileSubSystem.list() on the Local file subsystem does not return correct results
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * David McKnight (IBM) - [231211] Local xml file not opened when workspace encoding is different from local system encoding
- * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
- * Martin Oberhuber (Wind River) - [233993] Improve EFS error reporting
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- * David McKnight (IBM) - [238367] [regression] Error when deleting Archive Files
- * David McKnight (IBM) - [280899] RSE can't open files in some directory, which give the RSEG1067 error me
- * Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
- * Martin Oberhuber (Wind River) - [286129][api] RemoteFileException(String) violates API contract
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.local.files;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-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.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.services.local.Activator;
-import org.eclipse.rse.internal.services.local.ILocalMessageIds;
-import org.eclipse.rse.internal.services.local.ILocalService;
-import org.eclipse.rse.internal.services.local.LocalServiceResources;
-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.ISystemOperationMonitor;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.SystemOperationMonitor;
-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.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.services.files.AbstractFileService;
-import org.eclipse.rse.services.files.HostFilePermissions;
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-
-public class LocalFileService extends AbstractFileService implements ILocalService, IFilePermissionsService
-{
- 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 == IFileService.FILE_TYPE_FILES_AND_FOLDERS || type == IFileService.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;
- }
-
- }
-
- private class CheckArchiveOperationStatusThread extends Thread {
-
- private ISystemOperationMonitor archiveOperationMonitor = null;
- private IProgressMonitor monitor = null;
-
- public CheckArchiveOperationStatusThread(ISystemOperationMonitor archiveOperationMonitor, IProgressMonitor monitor) {
- this.archiveOperationMonitor = archiveOperationMonitor;
- this.monitor = monitor;
- }
-
- public void run()
- {
- while(!monitor.isCanceled() && !archiveOperationMonitor.isDone())
- {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {}
- }
-
- //evaluate result
-
- if(monitor.isCanceled() && !archiveOperationMonitor.isDone())
- {
- archiveOperationMonitor.setCancelled(true);
- }
- }
- }
-
- public void upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) 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 {
- handler.add(stream, child.path, remoteFile, SystemEncodingUtil.ENCODING_UTF_8, hostEncoding, !isBinary, null);
- return;
- }
- }
- if (ArchiveHandlerManager.getInstance().isArchive(destinationFile))
- {
- ISystemArchiveHandler handler = ArchiveHandlerManager.getInstance().getRegisteredHandler(destinationFile);
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copyToArchive()"); //$NON-NLS-1$
- else {
- handler.add(stream, "", remoteFile, SystemEncodingUtil.ENCODING_UTF_8, hostEncoding, !isBinary, null); //$NON-NLS-1$
- return;
- }
- }
-
- 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 (SystemMessageException e)
- {
- throw e;
- }
- catch (Exception e)
- {
- throw new RemoteFileIOException(Activator.PLUGIN_ID, e);
- }
- finally
- {
-
- try
- {
- if (bufWriter != null)
- bufWriter.close();
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (bufOutputStream != null)
- bufOutputStream.close();
-
- if (isCancelled)
- {
- throw new SystemOperationCancelledException();
- }
- }
- catch (IOException e)
- {
- }
- }
- }
-
-
-
- public void download(String remoteParent, String remoteFile, File destinationFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) 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)
- {
- copyFromArchive(file, destinationFile.getParentFile(), destinationFile.getName(), monitor, hostEncoding, SystemEncodingUtil.ENCODING_UTF_8, !isBinary);
- return;
- }
- if (targetIsVirtual || targetIsArchive)
- {
- copyToArchive(file, destinationFile.getParentFile(), destinationFile.getName(), monitor, hostEncoding, SystemEncodingUtil.ENCODING_UTF_8, !isBinary);
- return;
- }
-
- try
- {
- if (!destinationFile.exists())
- {
- File parentDir = destinationFile.getParentFile();
- parentDir.mkdirs();
- }
- // encoding conversion required if it a text file but not an xml file
- String systemEncoding = SystemEncodingUtil.getInstance().getEnvironmentEncoding();
- boolean isEncodingConversionRequired = !isBinary && !systemEncoding.equals(hostEncoding); // should not convert if both encodings are the same
-
- 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 (Exception e)
- {
- throw new RemoteFileIOException(Activator.PLUGIN_ID, e);
- }
- finally
- {
-
- try
- {
- if (bufWriter != null)
- bufWriter.close();
-
- if (bufInputStream != null)
- bufInputStream.close();
-
- if (bufOutputStream != null)
- bufOutputStream.close();
-
- if (isCancelled)
- {
- throw new SystemOperationCancelledException();
-// return false;
- } else if (file.exists()) {
- destinationFile.setLastModified(file.lastModified());
-
- String systemEncoding = SystemEncodingUtil.getInstance().getEnvironmentEncoding();
- boolean sizeCheck = !isBinary && systemEncoding.equals(hostEncoding);
-
- if (sizeCheck && (destinationFile.length() != file.length())) {
- throw new SystemOperationCancelledException();
-// 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);
- }
- }
- }
-
- private boolean copyToArchive(File file, File destination, String newName, IProgressMonitor monitor, String sourceEncoding, String targetEncoding, boolean isText) throws SystemMessageException
- {
- ISystemArchiveHandler handler = null;
- String path = ""; //$NON-NLS-1$
- if (ArchiveHandlerManager.isVirtual(destination.getAbsolutePath()))
- {
- VirtualChild virtualChild = ArchiveHandlerManager.getInstance().getVirtualObject(destination.getAbsolutePath());
- handler = virtualChild.getHandler();
- path = virtualChild.fullName;
- if (!virtualChild.isDirectory)
- {
- path = virtualChild.path;
- }
- }
- else if (ArchiveHandlerManager.getInstance().isArchive(destination))
- {
- handler = ArchiveHandlerManager.getInstance().getRegisteredHandler(destination);
- }
-
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copyToArchive()"); //$NON-NLS-1$
-
- ISystemOperationMonitor archiveOperationMonitor = null;
- if (null != monitor)
- {
- archiveOperationMonitor = new SystemOperationMonitor();
- CheckArchiveOperationStatusThread checkArchiveOperationStatusThread = new CheckArchiveOperationStatusThread(archiveOperationMonitor, monitor);
- checkArchiveOperationStatusThread.start();
- }
-
- try {
- if (file.isDirectory()) {
- handler.add(file, path, newName, sourceEncoding, targetEncoding, _fileTypeRegistry, archiveOperationMonitor);
- } else {
- handler.add(file, path, newName, sourceEncoding, targetEncoding, isText, archiveOperationMonitor);
- }
- } catch (SystemMessageException e) {
- //e.printStackTrace();
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
- // SystemPlugin.logError("LocalFileSubSystemImpl.copyToArchive(): Handler's add() method returned false.");
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_FILE_NOT_SAVED, destination.getName(), "localhost"); //$NON-NLS-1$
- //String msgDetails = LocalServiceResources.FILEMSG_FILE_NOT_SAVED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_FILE_NOT_SAVED,
- IStatus.ERROR, msgTxt, e);
- throw new SystemMessageException(msg);
- }
- return true;
- }
-
- public void upload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) 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)
- {
- copyFromArchive(localFile, target, remoteFile, monitor, srcEncoding, hostEncoding, !isBinary);
- return;
- }
- if (targetIsVirtual)
- {
- copyToArchive(localFile, target, remoteFile, monitor, srcEncoding, hostEncoding, !isBinary);
- return;
- }
-
- 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 SystemOperationCancelledException();
-// return false;
- } else if (destinationFile!=null) {
- destinationFile.setLastModified(localFile.lastModified());
- //TODO check if we want to preserve permissions
- //if(!localFile.canWrite()) destinationFile.setReadOnly();
-
- // File lengths can be different if the encodings are different
-/* if (destinationFile.length() != localFile.length()) {
- // throw new SystemOperationCancelledException();
- System.err.println("local.upload: size mismach on "+destinationFile.getAbsolutePath()); //$NON-NLS-1$
- return false;
- }*/
- }
- }
- catch (IOException e)
- {
- }
- }
- }
-
- protected IHostFile[] internalFetch(String remoteParent, String fileFilter, int type, IProgressMonitor monitor) throws SystemMessageException {
- LocalFileNameFilter fFilter = new LocalFileNameFilter(fileFilter, type);
- File localParent = new File(remoteParent);
- boolean isArchive = false;
- boolean isVirtual = false;
- if (localParent.exists()) {
- if (localParent.isFile()) {
- isArchive = ArchiveHandlerManager.getInstance().isArchive(localParent);
- }
- // 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$
- }
- }
- }
- else {
- // does not exist: is it virtual?
- if (remoteParent.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR)) {
- remoteParent = remoteParent.substring(0, remoteParent.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
- isVirtual = ArchiveHandlerManager.isVirtual(remoteParent);
- }
- if (isVirtual || isArchive) {
- 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;
- } else {
- // allow cancel before doing the os query
- if (monitor != null && monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- /* bug 220241 - don't need this block of code
- * listFiles() with a filter will still return all folders (they don't have to match)
- if (!fFilter.isGeneric()) {
- File file = new File(localParent, fileFilter);
- return convertToHostFiles(new File[] { file }, type);
- }
- */
- if (localParent.exists()) {
- File[] files = localParent.listFiles(fFilter);
- if (files == null) {
- //throw new RemoteFileException("Error listing: " + localParent.getAbsolutePath());
- throw new RemoteFileIOException(new IOException("Error listing: " + localParent.getAbsolutePath()));
- }
- return convertToHostFiles(files, type);
- } else {
- throw new SystemElementNotFoundException(localParent.getAbsolutePath(), "list");
- }
- }
- }
-
- 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 == IFileService.FILE_TYPE_FILES_AND_FOLDERS ||
- type == IFileService.FILE_TYPE_FOLDERS)
- {
- results.add(new LocalHostFile(file));
- }
- }
- else if (file.isFile())
- {
- if (type == IFileService.FILE_TYPE_FILES_AND_FOLDERS ||
- type == IFileService.FILE_TYPE_FILES)
- {
- results.add(new LocalHostFile(file));
- } else if (type == IFileService.FILE_TYPE_FOLDERS &&
- ArchiveHandlerManager.getInstance().isArchive(file)) {
- // On Local Archive's should be considered Folders
- // as they are containers that can be opened.
- 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, (userHomeFile.getParent() == null));
- }
-
-
-
- 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(String remoteParent, String name, IProgressMonitor monitor) throws SystemMessageException
- {
- if (name.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
- {
- name = name.substring(0, name.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
-
- boolean isVirtualParent = false;
- boolean isArchiveParent = false;
- boolean isRoot = (remoteParent == null || remoteParent.length() == 0);
- if (!isRoot) {
- File remoteParentFile = new File(remoteParent);
- if (!remoteParentFile.exists()) {
- isVirtualParent = ArchiveHandlerManager.isVirtual(remoteParent);
- } else if (remoteParentFile.isFile()) {
- isArchiveParent = ArchiveHandlerManager.getInstance().isArchive(remoteParentFile);
- }
- }
- if (!isVirtualParent && !isArchiveParent)
- {
- File file = isRoot ? new File(name) : new File(remoteParent, name);
- return new LocalHostFile(file, isRoot);
- }
- 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(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- File parentFile = new File(remoteParent);
- File fileToCreate = new File(parentFile, fileName);
- if (!fileToCreate.exists())
- {
- if (ArchiveHandlerManager.isVirtual(fileToCreate.getAbsolutePath()))
- {
- return createFileInArchive(fileToCreate, monitor);
- }
- else if (!parentFile.exists())
- {
- parentFile.mkdirs();
- }
- else
- {
- try
- {
- fileToCreate.createNewFile();
- }
- catch (IOException e)
- {
- throw new RemoteFileSecurityException(e);
- }
- if (ArchiveHandlerManager.getInstance().isArchive(fileToCreate)) {
- try {
- ArchiveHandlerManager.getInstance().createEmptyArchive(fileToCreate);
- } catch (SystemMessageException e) {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ILocalMessageIds.FILEMSG_ARCHIVE_CORRUPTED, IStatus.ERROR,
- LocalServiceResources.FILEMSG_ARCHIVE_CORRUPTED, e);
- throw new SystemMessageException(msg);
- }
- }
- }
- }
- else
- {
- throw new RemoteFileIOException(new IOException());
- }
- return new LocalHostFile(fileToCreate);
- }
-
- protected LocalVirtualHostFile createFileInArchive(File newFile, IProgressMonitor monitor) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(newFile.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".createFileInArchive()"); //$NON-NLS-1$
- else
- {
- ISystemOperationMonitor archiveOperationMonitor = null;
- if (null != monitor)
- {
- archiveOperationMonitor = new SystemOperationMonitor();
- CheckArchiveOperationStatusThread checkArchiveOperationStatusThread = new CheckArchiveOperationStatusThread(archiveOperationMonitor, monitor);
- checkArchiveOperationStatusThread.start();
- }
- try {
- handler.createFile(child.fullName, archiveOperationMonitor);
- } catch (SystemMessageException e) {
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_CREATE_VIRTUAL_FAILED, newFile);
- //String msgDetails = LocalServiceResources.FILEMSG_CREATE_VIRTUAL_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_CREATE_VIRTUAL_FAILED,
- IStatus.ERROR, msgTxt, e);
- throw new SystemMessageException(msg);
- }
- }
- return new LocalVirtualHostFile(child);
- }
-
- private void throwCorruptArchiveException(String classAndMethod) throws SystemMessageException
- {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_ARCHIVE_CORRUPTED,
- IStatus.ERROR,
- LocalServiceResources.FILEMSG_ARCHIVE_CORRUPTED, LocalServiceResources.FILEMSG_ARCHIVE_CORRUPTED_DETAILS);
- throw new SystemMessageException(msg);
- }
-
- 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(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
- {
- File folderToCreate = new File(remoteParent, folderName);
- if (!folderToCreate.exists())
- {
- if (ArchiveHandlerManager.isVirtual(folderToCreate.getAbsolutePath()))
- {
- return createFolderInArchive(folderToCreate, monitor);
- }
- else
- {
- if(!folderToCreate.mkdirs())
- throw new RemoteFileSecurityException(new IOException());
- }
- }
- else
- {
- throw new RemoteFileIOException(new IOException());
- }
- return new LocalHostFile(folderToCreate);
- }
-
- protected LocalVirtualHostFile createFolderInArchive(File newFolder, IProgressMonitor monitor) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(newFolder.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".createFolderInArchive()"); //$NON-NLS-1$
- else
- {
- ISystemOperationMonitor archiveOperationMonitor = null;
- if (null != monitor)
- {
- archiveOperationMonitor = new SystemOperationMonitor();
- CheckArchiveOperationStatusThread checkArchiveOperationStatusThread = new CheckArchiveOperationStatusThread(archiveOperationMonitor, monitor);
- checkArchiveOperationStatusThread.start();
- }
- try {
- handler.createFolder(child.fullName, archiveOperationMonitor);
- } catch (SystemMessageException e) {
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
-
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_CREATE_VIRTUAL_FAILED, newFolder);
- //String msgDetails = LocalServiceResources.FILEMSG_CREATE_VIRTUAL_FAILED_DETAILS;
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_CREATE_VIRTUAL_FAILED,
- IStatus.ERROR, msgTxt, e);
- throw new SystemMessageException(msg);
-
- }
- }
- return new LocalVirtualHostFile(child);
- }
-
- public void delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- if (fileName.endsWith(ArchiveHandlerManager.VIRTUAL_SEPARATOR))
- {
- fileName = fileName.substring(0, fileName.length() - ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- }
- File remoteParentFile = new File(remoteParent);
- if (ArchiveHandlerManager.getInstance().isArchive(remoteParentFile))
- {
- remoteParent = remoteParent + ArchiveHandlerManager.VIRTUAL_SEPARATOR;
- }
- boolean result = true;
- File fileToDelete = new File(remoteParent, fileName);
- if (ArchiveHandlerManager.isVirtual(fileToDelete.getAbsolutePath()))
- {
- result = deleteFromArchive(fileToDelete, monitor);
- }
- else if (ArchiveHandlerManager.getInstance().isArchive(fileToDelete))
- {
- result = deleteArchive(fileToDelete);
- }
- if (fileToDelete.isDirectory())
- {
- result = deleteContents(fileToDelete, monitor);
- }
- else
- {
- if (fileToDelete.exists())
- result = fileToDelete.delete();
- }
- if (!result) {
- if (fileToDelete.exists()) {
- // Deletion failed without specification why... likely a Security
- // problem, or an open file in the files to be deleted.
- // TODO Externalize Message
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Failed to delete: " + fileToDelete.getAbsolutePath());
- } else {
- throw new SystemElementNotFoundException(fileToDelete.getAbsolutePath(), "delete");
- }
- }
- }
-
- public void deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
- {
- String deletingMessage = NLS.bind(LocalServiceResources.FILEMSG_DELETING, ""); //$NON-NLS-1$
- monitor.beginTask(deletingMessage, remoteParents.length);
- for (int i = 0; i < remoteParents.length; i++)
- {
- deletingMessage = NLS.bind(LocalServiceResources.FILEMSG_DELETING, fileNames[i]);
- monitor.subTask(deletingMessage);
- delete(remoteParents[i], fileNames[i], monitor);
- monitor.worked(1);
- }
- }
-
- private boolean deleteContents(File folder, IProgressMonitor monitor)
- {
- 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(file, monitor);
- }
- 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, IProgressMonitor monitor) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(destination.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".deleteFromArchive()"); //$NON-NLS-1$
- ISystemOperationMonitor archiveOperationMonitor = null;
- if (null != monitor)
- {
- archiveOperationMonitor = new SystemOperationMonitor();
- CheckArchiveOperationStatusThread checkArchiveOperationStatusThread = new CheckArchiveOperationStatusThread(archiveOperationMonitor, monitor);
- checkArchiveOperationStatusThread.start();
- }
- try {
- return handler.delete(child.fullName, archiveOperationMonitor);
- } catch (SystemMessageException e) {
- if (monitor != null && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
- // SystemPlugin.logError("LocalFileSubSystemImpl.deleteFromArchive(): Archive Handler's delete method returned false. Couldn't delete virtual object.");
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_DELETE_VIRTUAL_FAILED, destination);
- //String msgDetails = LocalServiceResources.FILEMSG_DELETE_VIRTUAL_FAILED_DETAILS;
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_DELETE_VIRTUAL_FAILED,
- IStatus.ERROR,
- msgTxt, e));
- }
- }
-
- protected boolean deleteArchive(File file)
- {
- ArchiveHandlerManager.getInstance().disposeOfRegisteredHandlerFor(file);
- return file.delete();
- }
-
- public void rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException
- {
- File fileToRename = new File(remoteParent, oldName);
- if (ArchiveHandlerManager.isVirtual(fileToRename.getAbsolutePath()))
- {
- renameVirtualFile(fileToRename, newName, monitor);
- return;
- }
- File newFile = new File(remoteParent, newName);
- boolean result = fileToRename.renameTo(newFile);
- if (!result)
- {
- // for 192705, we need to throw an exception when rename fails
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_RENAME_FILE_FAILED, newFile);
- String msgDetails = LocalServiceResources.FILEMSG_RENAME_FILE_FAILED_DETAILS;
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_RENAME_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails));
- }
- }
-
- public void rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException
- {
- rename(remoteParent, oldName, newName, monitor);
- File newFile = new File(remoteParent, newName);
- oldFile.renameTo(newFile.getAbsolutePath());
- }
-
- /**
- * 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, IProgressMonitor monitor) throws SystemMessageException
- {
- VirtualChild child = ArchiveHandlerManager.getInstance().getVirtualObject(destination.getAbsolutePath());
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- {
- throwCorruptArchiveException(this.getClass() + ".renameVirtualFile()"); //$NON-NLS-1$
- }
- else
- {
- ISystemOperationMonitor archiveOperationMonitor = null;
- if (null != monitor)
- {
- archiveOperationMonitor = new SystemOperationMonitor();
- CheckArchiveOperationStatusThread checkArchiveOperationStatusThread = new CheckArchiveOperationStatusThread(archiveOperationMonitor, monitor);
- checkArchiveOperationStatusThread.start();
- }
-
- try {
- handler.rename(child.fullName, newName, archiveOperationMonitor);
- } catch (SystemMessageException e) {
- if (null != monitor && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
-
- // for 192705, we need to throw an exception when rename fails
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_RENAME_FILE_FAILED, child.fullName);
- //String msgDetails = LocalServiceResources.FILEMSG_RENAME_FILE_FAILED_DETAILS;
- //e.printStackTrace();
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_RENAME_FILE_FAILED,
- IStatus.ERROR,
- msgTxt, e));
- }
- }
- return false;
- }
-
- public void move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException
- {
- File sourceFolderOrFile = new File(srcParent, srcName);
- File targetFolder = new File(tgtParent, tgtName);
- boolean movedOk = false;
- 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)
- *
- */
- {
- File fileToMove = new File(srcParent, srcName);
- File newFile = new File(tgtParent, tgtName);
- //Try plain Java Filesystem move first
- movedOk = fileToMove.renameTo(newFile);
- }
-
- if (!movedOk)
- {
- copy(srcParent, srcName, tgtParent, tgtName, monitor);
- try {
- delete(srcParent, srcName, monitor);
- } catch (SystemMessageException exc)
- {
- if (monitor.isCanceled())
- {
- //This mean the copy operation is ok, but delete operation has been cancelled by user.
- //The delete() call will take care of recovered from the cancel operation.
- //So we need to make sure to remove the already copied file/folder.
- delete(tgtParent, tgtName, null);
- }
- throw exc;
- }
- }
- }
-
- public void copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) 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)
- {
- copyFromArchive(srcFile, new File(tgtParent), tgtName, monitor, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
- return;
- }
- if (targetIsVirtual || targetIsArchive)
- {
- copyToArchive(srcFile, new File(tgtParent), tgtName, monitor, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
- return;
- }
-
-// handle special characters in source and target strings
- src = enQuote(src);
- target = enQuote(target);
- if (isWindows())
- {
- if (folderCopy)
- {
- command = "xcopy " + src + " " + target + " /S /E /K /Q /H /I /Y"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- else
- {
- // create target first so that not prompted
- if (!tgtFile.exists())
- {
- // create file so as to avoid ambiguity
- try
- {
- tgtFile.createNewFile();
- }
- catch (Exception e)
- {
- throw new RemoteFileException(e.getMessage(), e);
- }
- }
- command = _osCmdShell + "xcopy " + src + " " + target + " /Y /K /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$
- }
- }
- 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);
- p.waitFor();
-
- //rc = p.exitValue();
- }
- catch (Exception e)
- {
- throw new RemoteFileException(e.getMessage(), e);
- }
- }
-
- /**
- * 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);
- }
- }
-
- /**
- * 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 if 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());
- ISystemOperationMonitor archiveOperationMonitor = null;
- CheckArchiveOperationStatusThread checkArchiveOperationStatusThread = null;
- if (null != monitor)
- {
- archiveOperationMonitor = new SystemOperationMonitor();
- checkArchiveOperationStatusThread = new CheckArchiveOperationStatusThread(archiveOperationMonitor, monitor);
- }
- 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.
- if (null != monitor)
- {
- checkArchiveOperationStatusThread.start();
- }
- File destinationFile = new File(targetFolder, child.name);
- try {
- child.getExtractedFile(destinationFile, sourceEncoding, isText, archiveOperationMonitor);
- } catch (SystemMessageException e) {
- if (destinationFile.isDirectory())
- {
- deleteContents(destinationFile, monitor);
- }
- else
- {
- destinationFile.delete();
- }
-
- if (monitor != null && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
-
- // for 192705, we need to throw an exception when rename fails
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_RENAME_FILE_FAILED, child.fullName);
- //String msgDetails = LocalServiceResources.FILEMSG_RENAME_FILE_FAILED_DETAILS;
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_RENAME_FILE_FAILED,
- IStatus.ERROR,
- msgTxt, e));
- }
- return true;
- }
-
- if (null != monitor)
- {
- checkArchiveOperationStatusThread.start();
- }
-
- src = child.getExtractedFile(sourceEncoding, isText, archiveOperationMonitor).getAbsolutePath();
- if (monitor != null && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
- if (child.isDirectory)
- {
- File tempSource = null;
- try
- {
- tempSource = File.createTempFile(child.name, "virtual"); //$NON-NLS-1$
- tempSource.deleteOnExit();
- }
- catch (IOException e)
- {
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_COPY_FILE_FAILED, sourceFolderOrFile);
- String msgDetails = LocalServiceResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
-
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_COPY_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails));
- }
- tempSource.delete();
- if (!tempSource.mkdir())
- {
- String msgTxt = NLS.bind(LocalServiceResources.FILEMSG_COPY_FILE_FAILED, sourceFolderOrFile);
- String msgDetails = LocalServiceResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
-
- // SystemPlugin.logError("LocalFileSubSystemImpl.copy(): Couldn't create temp dir.");
- throw new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ILocalMessageIds.FILEMSG_COPY_FILE_FAILED,
- IStatus.ERROR, msgTxt, msgDetails));
- }
- ISystemArchiveHandler handler = child.getHandler();
- if (handler == null)
- throwCorruptArchiveException(this.getClass() + ".copy()"); //$NON-NLS-1$
- else
- handler.extractVirtualDirectory(child.fullName, tempSource, sourceEncoding, isText, archiveOperationMonitor);
- src = tempSource.getAbsolutePath() + File.separatorChar + child.name;
- }
- if (ArchiveHandlerManager.isVirtual(targetFolder.getAbsolutePath()) || ArchiveHandlerManager.getInstance().isArchive(targetFolder))
- {
- File source = new File(src);
- boolean returnValue = copyToArchive(source, targetFolder, newName, monitor, SystemEncodingUtil.ENCODING_UTF_8, targetEncoding, isText);
- if (!returnValue)
- {
- if (monitor != null && monitor.isCanceled())
- {
- //This operation has been cancelled by the user.
- throw getCancelledException();
- }
- }
- return returnValue;
- }
-
- //Don't think the code below here ever got executed, since it scenario has been covered by extract directly to the destination archive file.
- 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 /Y"; //$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 boolean isCaseSensitive()
- {
- return !isWindows();
- }
-
- public void copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException
- {
- String deletingMessage = NLS.bind(LocalServiceResources.FILEMSG_COPYING, ""); //$NON-NLS-1$
- monitor.beginTask(deletingMessage, srcParents.length);
- for (int i = 0; i < srcParents.length; i++)
- {
- deletingMessage = NLS.bind(LocalServiceResources.FILEMSG_COPYING, srcNames[i]);
- monitor.subTask(deletingMessage);
- copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
- monitor.worked(1);
- }
- }
-
- public void setLastModified(String parent, String name, long timestamp, IProgressMonitor monitor) throws SystemMessageException
- {
- File file = new File(parent, name);
- if (!file.setLastModified(timestamp)) {
- if (!file.exists()) {
- // TODO externalize message
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, file.getAbsolutePath(), "setLastModified");
- } else {
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, "setLastModified: " + file.getAbsolutePath());
- }
- }
- }
-
- public void setReadOnly(String parent, String name,
- boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
- {
- File file = new File(parent, name);
- if (!file.exists()) {
- //TODO Externalize message, and/or centralize e.g. RemoteFileNotFoundException
- //See org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Messages.java - fileNotFound
- String messageText = "File not found";
- //TODO throw new RemoteFileNotFoundException
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, file.getAbsolutePath(), "setReadOnly");
- }
- if (readOnly != file.canWrite()) {
- return;
- }
- if (readOnly)
- {
- if (!file.setReadOnly()) {
- //TODO Externalize message
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Failed to setReadOnly: " + file.getAbsolutePath());
- }
- return;
- }
- else
- {
- Exception remoteException = null;
- String remoteError = ""; //$NON-NLS-1$
- if (!_isWindows)
- {
- // make this read-write
- String[] cmd = new String[3];
- cmd[0] = "chmod"; //$NON-NLS-1$
- cmd[1] = "u+w"; //$NON-NLS-1$
- cmd[2] = file.getAbsolutePath();
- int exitValue = -1;
- try
- {
- Process p = Runtime.getRuntime().exec(cmd);
- exitValue = p.waitFor();
- if (p.getErrorStream().available() > 0) {
- remoteError = ": " + new BufferedReader(new InputStreamReader(p.getErrorStream())).readLine(); //$NON-NLS-1$
- } else if (p.getInputStream().available() > 0) {
- remoteError = ": " + new BufferedReader(new InputStreamReader(p.getInputStream())).readLine(); //$NON-NLS-1$
- }
- }
- catch (Exception e)
- {
- remoteException = e;
- }
- if (exitValue != 0) {
- //TODO Externalize message
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Failed to setWritable: " + remoteError, remoteException);
- }
- }
- // windows version
- else
- {
- String[] cmd = new String[3];
- cmd[0] = "attrib"; //$NON-NLS-1$
- cmd[1] = "-R"; //$NON-NLS-1$
- cmd[2] = file.getAbsolutePath();
- int exitValue = -1;
- try
- {
- Process p = Runtime.getRuntime().exec(cmd);
- exitValue = p.waitFor();
- if (p.getErrorStream().available() > 0) {
- remoteError = ": " + new BufferedReader(new InputStreamReader(p.getErrorStream())).readLine(); //$NON-NLS-1$
- } else if (p.getInputStream().available() > 0) {
- remoteError = ": " + new BufferedReader(new InputStreamReader(p.getInputStream())).readLine(); //$NON-NLS-1$
- }
- }
- catch (Exception e)
- {
- remoteException = e;
- }
- if (exitValue != 0) {
- //TODO Externalize String
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Failed to setWritable: " + remoteError, remoteException);
- }
- }
- //Verify that it actually worked
- if (!file.canWrite()) {
- if (remoteError.length() == 0) {
- // TODO Externalize String
- remoteError = "Failed to setWritable: " + file.getAbsolutePath();
- } else {
- remoteError = remoteError.substring(2);
- }
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, remoteError);
- }
- }
- }
-
- /**
- * Gets the input stream to access the contents of a remote file.
- * @since 2.0
- * @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(String, String, boolean, IProgressMonitor)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
-
- File file = new File(remoteParent, remoteFile);
- InputStream stream = null;
-
- try {
- stream = new FileInputStream(file);
- }
- catch (FileNotFoundException e) {
- if (!file.exists()) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, file.getAbsolutePath(), "getInputStream");
- } else {
- throw new RemoteFileIOException(e);
- }
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return stream;
- }
-
- /**
- * Gets the output stream to write to a remote file.
- * @since 2.0
- * @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(String, String, boolean, IProgressMonitor)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
- return getOutputStream(remoteParent, remoteFile, options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
- File file = new File(remoteParent, remoteFile);
- OutputStream stream = null;
-
- try {
- if ((options & IFileService.APPEND) == 0) {
- stream = new FileOutputStream(file);
- } else {
- stream = new FileOutputStream(file, true);
- }
- }
- catch (FileNotFoundException e) {
- if (!file.exists()) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, file.getAbsolutePath(), "getOutputStream");
- } else {
- throw new RemoteFileIOException(e);
- }
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return stream;
- }
-
-
- public int getCapabilities(IHostFile file) {
- int capabilities = 0;
- if (_isWindows){
- return capabilities; // no windows support
- }
- else if (file instanceof LocalVirtualHostFile) {
- return capabilities; // no virtual file support
- }
- else {
- return FS_CAN_GET_ALL | FS_CAN_SET_ALL;
- }
- }
-
- public IHostFilePermissions getFilePermissions(IHostFile rfile,
- IProgressMonitor monitor) throws SystemMessageException {
- if (!_isWindows){
-
- File file = new File(rfile.getParentPath(), rfile.getName());
-
- // permissions in form "drwxrwxrwx ..."
- String ldStr = simpleShellCommand("ls -ld", file); //$NON-NLS-1$
-
- StringTokenizer tokenizer = new StringTokenizer(ldStr, " \t"); //$NON-NLS-1$
-
- // permissions in form "rwxrwxrwx"
- String permString = tokenizer.nextToken().substring(1);
-
- // user and group
- tokenizer.nextToken(); // nothing important
- String user = tokenizer.nextToken(); // 3rd
- String group = tokenizer.nextToken(); // 4th
-
- IHostFilePermissions permissions = new HostFilePermissions(permString, user, group);
- if (rfile instanceof IHostFilePermissionsContainer)
- {
- ((IHostFilePermissionsContainer)rfile).setPermissions(permissions);
- }
- return permissions;
- }
- return null;
- }
-
- public void setFilePermissions(IHostFile rfile,
- IHostFilePermissions newPermissions, IProgressMonitor monitor)
- throws SystemMessageException {
- if (!_isWindows){
- File file = new File(rfile.getParentPath(), rfile.getName());
-
- int bits = newPermissions.getPermissionBits();
- String permissionsInOctal = Integer.toOctalString(bits); // from decimal to octal
- String user = newPermissions.getUserOwner();
- String group = newPermissions.getGroupOwner();
-
- // set the permissions
- simpleShellCommand("chmod " + permissionsInOctal, file); //$NON-NLS-1$
-
- // set the user
- simpleShellCommand("chown " + user, file); //$NON-NLS-1$
-
- // set the group
- simpleShellCommand("chown :" + group, file); //$NON-NLS-1$
- }
- }
-
-
- private String simpleShellCommand(String cmd, File file)
- {
- String result = null;
- String args[] = new String[3];
- args[0] = "sh"; //$NON-NLS-1$
- args[1] = "-c"; //$NON-NLS-1$
- args[2] = cmd + " " + PathUtility.enQuoteUnix(file.getAbsolutePath()); //$NON-NLS-1$
-
- BufferedReader childReader = null;
- try {
- Process childProcess = Runtime.getRuntime().exec(args);
-
- childReader = new BufferedReader(new InputStreamReader(childProcess.getInputStream()));
-
- result = childReader.readLine().trim();
- childReader.close();
- }
- catch (Exception e){
- try {
- childReader.close();
- }
- catch (IOException ex){}
- }
- return result;
-
- }
-
- private SystemMessageException getCancelledException()
- {
- //This operation has been cancelled by the user.
- return new SystemMessageException(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, CommonMessages.MSG_OPERATION_CANCELLED));
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalHostFile.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalHostFile.java
deleted file mode 100644
index 4a8e480ff..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalHostFile.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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()
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.local.files;
-
-import java.io.File;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-
-
-public class LocalHostFile implements IHostFile, IHostFilePermissionsContainer
-{
- private File _file;
- private boolean _isRoot = false;
- private boolean _isArchive = false;
- private IHostFilePermissions _permissions = null;
-
- 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();
- }
-
- public IHostFilePermissions getPermissions() {
- return _permissions;
- }
-
- public void setPermissions(IHostFilePermissions permissions) {
- _permissions = permissions;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalVirtualHostFile.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalVirtualHostFile.java
deleted file mode 100644
index 60713e5db..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalVirtualHostFile.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Kevin Doyle (IBM) - [189828] renameTo() now passes proper name to _child.renameTo()
- * Xuan Chen (IBM) - [214251] [archive] "Last Modified Time" changed for all virtual files/folders if rename/paste/delete of one virtual file.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.local.files;
-
-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.clientserver.messages.SystemMessageException;
-
-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()
- {
- try {
- return _child.exists();
- } catch (SystemMessageException e) {
- return false;
- }
- }
-
- 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.internal.services.local.files.LocalHostFile#renameTo(java.lang.String)
- */
- public void renameTo(String newAbsolutePath) {
- newAbsolutePath = ArchiveHandlerManager.cleanUpVirtualPath(newAbsolutePath);
- String newName = newAbsolutePath;
- int i = newAbsolutePath.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
- if (i != -1)
- newName = newAbsolutePath.substring(i + ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
- _child.renameTo(newName);
- }
-
- public long getModifiedDate()
- {
- if (null != _child)
- {
- return _child.getTimeStamp();
- }
- else
- {
- return super.getModifiedDate();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/processes/LocalProcessService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/processes/LocalProcessService.java
deleted file mode 100644
index 6a104569f..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/processes/LocalProcessService.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Kevin Doyle (IBM) - [199871] LocalProcessService needs to implement getMessage()
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.services.local.ILocalService;
-import org.eclipse.rse.internal.services.local.LocalServiceResources;
-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.processes.AbstractProcessService;
-
-public class LocalProcessService extends AbstractProcessService implements ILocalService
-{
- 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(IHostProcessFilter filter, IProgressMonitor monitor) 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")); //$NON-NLS-1$
- }
- return processes;
- }
-
- public boolean kill(long PID, String signal, IProgressMonitor monitor) throws SystemMessageException
- {
- IHostProcess process = null;
- try
- {
- process = getProcess(PID, monitor);
-
- // 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")); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- String name = ""; //$NON-NLS-1$
- if (process != null) name += process.getName();
- String pid = ""; //$NON-NLS-1$
- if (process != null) pid += process.getPid();
-
- SystemMessage msg = getMessage("RSEPG1300"); //$NON-NLS-1$
- msg.makeSubstitution(name + " (" + pid + ")", e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- 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"); //$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();
- if (output.equals("")) throw new Exception(); //$NON-NLS-1$
- String[] lines = output.trim().split("\\s+"); //$NON-NLS-1$
- if (lines == null) throw new Exception();
- return lines;
- }
- catch (Exception e)
- {
- //SystemPlugin.logError("LocalProcessSubSystemImpl.getSignalTypes() 'kill -l' command failed.", e);
- return null;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchHandler.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchHandler.java
deleted file mode 100644
index 6255af462..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchHandler.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - Bug 147791 - symbolic links can cause circular search.
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI threadj
- * Xuan Chen (IBM) - [194865] [local][Archives] Searching contents of a file in an Archive doesn't work
- * Xuan Chen (IBM) - [205448] [search]All the files are listed as in the Remote Search view even only found one match in a file
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.files.LocalHostFile;
-import org.eclipse.rse.internal.services.local.files.LocalVirtualHostFile;
-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.messages.SystemMessageException;
-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.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 searchConfig a search configuration.
- * @param fileService the file service to search.
- */
- 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
- try {
- internalSearch(_theFile, _depth, _theRmtFile);
- _isDone = true;
- if (!_isCancelled) {
- _searchConfig.setStatus(IHostSearchConstants.FINISHED);
- } else {
- _searchConfig.setStatus(IHostSearchConstants.CANCELLED);
- }
- } catch (SystemMessageException e) {
- _isDone = false;
- _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) throws SystemMessageException
- {
-
- 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 && vc != null)
- {
- matches = vc.getHandler().search(vc.fullName, _stringMatcher, null);
- 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);
- }
-
-
- //_searchConfig.addResult(file);
- }
- // 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);
- }
- }
-
- // 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;
-
- virtualchildren = ArchiveHandlerManager.getInstance().getContents(archive, virtualPath);
-
- 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);
- if (results != null && results.length > 0)
- {
- _searchConfig.addResults(remoteFile, results);
- // TODO - how to store results related to files
- //remoteFile.setContents(IHostSearchResultsContentsType.getInstance(), _searchString.toString(), results);
- return true;
- }
- return false;
- }
- 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("")) //$NON-NLS-1$
- {
- 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;
- }
-}
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/search/LocalSearchService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java
deleted file mode 100644
index 5d83eec0f..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/search/LocalSearchService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Kevin Doyle (IBM) - [187640] Added Search config and handler to searches Map in internalSearch
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
- {
- LocalSearchHandler handler = new LocalSearchHandler(searchConfig, fileService);
- searchConfig.setSearchHandler(handler);
- _searches.put(searchConfig, 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/internal/services/local/shells/LocalHostShell.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalHostShell.java
deleted file mode 100644
index 250a90463..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalHostShell.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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) - [161838] local shell reports isActive() wrong
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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()
- {
- if (_stdoutHandler.isFinished()) {
- if (_shellThread.isAlive()) {
- _shellThread.stopThread();
- }
- return false;
- }
- return true;
- }
-
- /* (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"); //$NON-NLS-1$
- }
-
-
-}
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 ab8ff5cdb..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellOutputReader.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.services.local.shells;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-
-import org.eclipse.rse.internal.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());
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellService.java
deleted file mode 100644
index 910d1b452..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellService.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.services.local.ILocalService;
-import org.eclipse.rse.internal.services.local.LocalServiceResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.shells.AbstractShellService;
-import org.eclipse.rse.services.shells.IHostShell;
-
-public class LocalShellService extends AbstractShellService implements 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(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException
- {
- LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,SHELL_INVOCATION, encoding, environment);
- hostShell.run(monitor);
- return hostShell;
- }
-
- public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException
- {
- LocalHostShell hostShell = new LocalHostShell(initialWorkingDirectory,command, encoding, environment);
- hostShell.run(monitor);
- return hostShell;
- }
-
- public String[] getHostEnvironment() throws SystemMessageException
- {
- 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;
- }
-
-} \ 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 0a33ad475..000000000
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/shells/LocalShellThread.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David McKnight (IBM) - [189387] Use specified encoding for shell output
- * Martin Oberhuber (Wind River) - [161838] local shell reports isActive() wrong
- * Anna Dushistova (MontaVsita) - [249354] Incorrect behaviour of local shells subsystem runCommand method
- *******************************************************************************/
-
-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.FileLocator;
-
-/**
- * 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;
-
- /**
- * constructor for local command shell monitor
- *
- * @param cwd initial working directory
- * @param invocation launch shell command
- * @param encoding encoding to use or <code>null</code> for default
- * @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$
- if (PSEUDO_TERMINAL != null) {
- try {
- PSEUDO_TERMINAL = FileLocator.resolve(new URL(PSEUDO_TERMINAL)).getPath();
- } catch (Exception e) {
- /* ignore, no pty available */
- }
- }
-
- _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);
-
- {
-
- 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
- {
- String args[];
- if (_invocation.equals(">")) //$NON-NLS-1$
- {
- _invocation = theShell;
- _isShell = true;
- args = new String[1];
- args[0] = _invocation;
- _theProcess = Runtime.getRuntime().exec(args[0], envVars, theDirectory);
- } else {
- 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(), _encoding));
-
- _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)
- {
- 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)
- {
- //MOB: Exception is expected when the process is already dead
- //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);
- _isCancelled = true;
- }
-
- //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)
- {
-
- try
- {
- if (_isCancelled)
- {
- _theProcess.destroy();
- }
- else
- {
- _theProcess.exitValue();
- }
- }
- catch (IllegalThreadStateException e)
- {
- //e.printStackTrace();
- _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;
- }
-
-
-}
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 14ab079cb..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 310ea232d..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Feb 15 10:47:06 EST 2007
-eclipse.preferences.version=1
-encoding//src/org/eclipse/rse/internal/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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 14c854871..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/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.services.ssh;singleton:=true
-Bundle-Version: 3.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.services.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- com.jcraft.jsch;bundle-version="[0.1.31,1.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.services.ssh;x-friends:="org.eclipse.rse.connectorservice.ssh,org.eclipse.rse.subsystems.files.ssh,org.eclipse.rse.subsystems.shells.ssh",
- org.eclipse.rse.internal.services.ssh.files;x-friends:="org.eclipse.rse.connectorservice.ssh,org.eclipse.rse.subsystems.files.ssh,org.eclipse.rse.subsystems.shells.ssh",
- org.eclipse.rse.internal.services.ssh.terminal;x-friends:="org.eclipse.rse.subsystems.shells.ssh"
-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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 251ffa8eb..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-###############################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE SSH Services\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2006, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
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 07db117aa..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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,\
- dsdp32.png
-src.includes = readme.txt,\
- about.html
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/dsdp32.png b/rse/plugins/org.eclipse.rse.services.ssh/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/dsdp32.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 fc9fee062..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE SSH Services
-providerName = Eclipse.org - DSDP
- \ 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 5048eba42..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/readme.txt
+++ /dev/null
@@ -1,67 +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 requires Eclipse 3.3 or later.
-
-__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/internal/services/ssh/Activator.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/Activator.java
deleted file mode 100644
index a01a5e6e5..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/Activator.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.internal.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;
-
- public static final String PLUGIN_ID = "org.eclipse.rse.services.ssh"; //$NON-NLS-1$
-
- /**
- * 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/internal/services/ssh/ISshService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshService.java
deleted file mode 100644
index ee5265ed4..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshService.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Martin Oberhuber (Wind River) - [170910] Adopt RSE ITerminalService API for SSH
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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 {
-
- /**
- * Get the Session Provider that cares for connect / disconnect of an SSH
- * Session, and can be used to instantiate new Channels.
- *
- * @return an SSH Session Provider.
- */
- public ISshSessionProvider getSessionProvider();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshSessionProvider.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshSessionProvider.java
deleted file mode 100644
index 71a66a8b0..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/ISshSessionProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [203500] Support encodings for SSH Sftp paths
- *******************************************************************************/
-package org.eclipse.rse.internal.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();
-
- /* Return the encoding to be used for file and directory names */
- public String getControlEncoding();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.java
deleted file mode 100644
index 93200bf27..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Yu-Fen Kuo (MontaVista) - [170910] Integrate the TM Terminal View with RSE
- * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshServiceResources extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.services.ssh.SshServiceResources"; //$NON-NLS-1$
-
- public static String SftpFileService_Name;
- public static String SftpFileService_Description;
- public static String SftpFileService_Error_JschSessionLost;
- public static String SftpFileService_Error_download_size;
- public static String SftpFileService_Error_upload_size;
- public static String SftpFileService_Error_no_sftp;
- public static String SftpFileService_Msg_Progress;
-
- public static String SshPlugin_Unexpected_Exception;
-
- public static String SshTerminalService_Name;
- public static String SshTerminalService_Description;
-
- 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/internal/services/ssh/SshServiceResources.properties b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.properties
deleted file mode 100644
index 2f7a35c16..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/SshServiceResources.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# Yu-Fen Kuo (MontaVista) - [170910] Integrate the TM Terminal View with RSE
-# Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
-# Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
-################################################################################
-
-# 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_Error_no_sftp=Failed to connect SFTP subsystem: Remote host may not have sftp-server installed
-SftpFileService_Msg_Progress={0,number,integer} KB of {1,number,integer} KB complete ({2,number,percent})
-
-SshTerminalService_Name=SSH Terminal Service
-SshTerminalService_Description=SSH Terminal Service Description
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
deleted file mode 100644
index 3ce77d995..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
+++ /dev/null
@@ -1,1344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * David Dykstal (IBM) - fixing bug 162510: correctly process filter strings
- * Kushal Munir (IBM) - for API bug
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [192724] Fixed logic to filter folders if FILE_TYPE_FOLDERS
- * Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
- * Benjamin Muskalla (b.muskalla@gmx.net) - [174690][ssh] cannot delete symbolic links on remote systems
- * Martin Oberhuber (Wind River) - [203490] Fix NPE in SftpService.getUserHome()
- * Martin Oberhuber (Wind River) - [203500] Support encodings for SSH Sftp paths
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Martin Oberhuber (Wind River) - [208912] Cannot expand /C on a VxWorks SSH Server
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * Kevin Doyle (IBM) - [211374] [ssh] New File on SSH has unnecessary space in its contents
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [216343] immediate link targets and canonical paths for Sftp
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [224799] Fix JSch encoding problems with Arabic filenames
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * Martin Oberhuber (Wind River) - [170910] Adopt RSE ITerminalService API for SSH
- * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
- * Martin Oberhuber (Wind River) - [190904] Changing read-only attribute throws exception
- * Martin Oberhuber (Wind River) - [218042] Support UNIX permission modification on ssh
- * Martin Oberhuber (Wind River) - [233651] Make ssh delete throw proper exceptions
- * Martin Oberhuber (Wind River) - [235477][ssh] SftpFileService.createFolder() fails for file named "a?*"
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- * David McKnight (IBM) - [235472] [ssh] RSE doesn't show correct properties of the file system root ("/")
- * Martin Oberhuber (Wind River) - [238703] getFile() needs to lstat for consistency with internalFetch()
- * Martin Oberhuber (Wind River) - [237616][ssh] Dont perform forced setLastModified during upload
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- * David McKnight (IBM) - [271244] [sftp files] "My Home" filter not working
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- * Martin Oberhuber (Wind River) - [274568] Dont use SftpMonitor for Streams transfer
- * Patrick Tassé (Ericsson) - [285226] Empty directory shown as an error message
- * Martin Oberhuber (Wind River) - [286129][api] RemoteFileException(String) violates API contract
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.io.UnsupportedEncodingException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-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.internal.services.ssh.Activator;
-import org.eclipse.rse.internal.services.ssh.ISshService;
-import org.eclipse.rse.internal.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.internal.services.ssh.SshServiceResources;
-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.SystemElementNotFoundException;
-import org.eclipse.rse.services.clientserver.messages.SystemLockTimeoutException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
-import org.eclipse.rse.services.files.AbstractFileService;
-import org.eclipse.rse.services.files.HostFilePermissions;
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.files.RemoteFileIOException;
-import org.eclipse.rse.services.files.RemoteFileSecurityException;
-public class SftpFileService extends AbstractFileService implements ISshService, IFilePermissionsService
-{
-
- private static class SftpBufferedInputStream extends BufferedInputStream {
-
- private ChannelSftp channel;
-
- /**
- * Creates a BufferedInputStream and saves its argument, the input stream, for later use. An internal buffer array is created.
- * @param in the underlying input stream.
- * @param channel the associated channel.
- */
- public SftpBufferedInputStream(InputStream in, ChannelSftp channel) {
- super(in);
- this.channel = channel;
- }
-
- /**
- * Creates a BufferedInputStream and saves its argument, the input stream, for later use. An internal buffer array of the given size is created.
- * @param in the underlying input stream.
- * @param size the buffer size.
- * @param channel the associated channel.
- */
- public SftpBufferedInputStream(InputStream in, int size, ChannelSftp channel) {
- super(in, size);
- this.channel = channel;
- }
-
- /**
- * Closes the underlying input stream and channel.
- * @see java.io.BufferedInputStream#close()
- */
- public void close() throws IOException {
- super.close();
- channel.disconnect();
- }
- }
-
- private static class SftpBufferedOutputStream extends BufferedOutputStream {
-
- private ChannelSftp channel;
-
- /**
- * Creates a new buffered output stream to write data to the specified underlying output stream with a default 512-byte buffer size.
- * @param out the underlying output stream.
- * @param channel the associated channel.
- */
- public SftpBufferedOutputStream(OutputStream out, ChannelSftp channel) {
- super(out);
- this.channel = channel;
- }
-
- /**
- * Creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size.
- * @param out the underlying output stream.
- * @param size the buffer size.
- * @param channel the associated channel.
- */
- public SftpBufferedOutputStream(OutputStream out, int size, ChannelSftp channel) {
- super(out, size);
- this.channel = channel;
- }
-
- /**
- * Closes the underlying output stream and the channel.
- * @see java.io.FilterOutputStream#close()
- */
- public void close() throws IOException {
- super.close();
- channel.disconnect();
- }
- }
-
- //private SshConnectorService fConnector;
- private final ISshSessionProvider fSessionProvider;
- private ChannelSftp fChannelSftp;
- private String fUserHome;
- private Mutex fDirChannelMutex = new Mutex();
- private long fDirChannelTimeout = 5000; //max.5 seconds to obtain dir channel
- /** Client-desired encoding for file and path names */
- private String fControlEncoding = null;
- /** Indicates the default string encoding on this platform */
- private static String defaultEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
- /** Indicates the encoding that our JSch channel uses */
- private String fJSchChannelEncoding = defaultEncoding;
- private long fLastConnectFailureTime = 0;
- private static long CONNECT_RETRY_MILLIS = 10000; //re-try unsuccessful sftp connect attempt after 10 seconds
-
- // public SftpFileService(SshConnectorService conn) {
- // fConnector = conn;
- // }
-
- public SftpFileService(ISshSessionProvider sessionProvider) {
- fSessionProvider = sessionProvider;
- }
-
- public ISshSessionProvider getSessionProvider() {
- return fSessionProvider;
- }
-
- public void setControlEncoding(String encoding) throws SystemMessageException {
- try {
- fChannelSftp.setFilenameEncoding(encoding);
- fJSchChannelEncoding = encoding;
- } catch (NoSuchMethodError e) {
- // Fallback for JSch < 0.1.34: use recode() for encoding conversion
- fControlEncoding = encoding;
- fJSchChannelEncoding = defaultEncoding;
- } catch (SftpException e) {
- try {
- fChannelSftp.setFilenameEncoding("UTF-8"); //$NON-NLS-1$
- fJSchChannelEncoding = "UTF-8"; //$NON-NLS-1$
- } catch (SftpException enest) {
- // should not happen, are we not connected?
- throw makeSystemMessageException(enest);
- }
- }
- fControlEncoding = encoding;
- }
-
- /**
- * Encode String with requested user encoding, in case it differs from Platform default encoding.
- * @param s String to encode
- * @return encoded String
- * @throws SystemMessageException with user message in case the requested encoding is not supported
- */
- protected String recode(String s) throws SystemMessageException {
- if (fControlEncoding==null) {
- return s;
- } else if (fControlEncoding.equals(fJSchChannelEncoding)) {
- return s;
- }
- try {
- byte[] bytes = s.getBytes(fControlEncoding); //what we want on the wire
- return new String(bytes, fJSchChannelEncoding); // what we need to
- // tell Jsch to get
- // this on the wire
- } catch(UnsupportedEncodingException e) {
- throw makeSystemMessageException(e);
- }
- }
-
- /**
- * Recode String, and check that no information is lost.
- * Throw an exception in case the desired Unicode String can not be expressed
- * by the current encodings. Also enquotes result characters '?' and '*' for
- * Jsch if necessary.
- * @param s String to recode
- * @return recoded String
- * @throws SystemMessageException if information is lost
- */
- protected String recodeSafe(String s) throws SystemMessageException {
- try {
- String recoded = recode(s);
- byte[] bytes = recoded.getBytes(fJSchChannelEncoding);
- String decoded = decode(new String(bytes, fJSchChannelEncoding));
- if (!s.equals(decoded)) {
- int i=0;
- int lmax = Math.min(s.length(), decoded.length());
- while( (i<lmax) && (s.charAt(i)==decoded.charAt(i))) {
- i++;
- }
- //String sbad=s.substring(Math.max(i-2,0), Math.min(i+2,lmax));
- char sbad = s.charAt(i);
- String msg = "Cannot express character \'"+sbad+"\'(0x"+Integer.toHexString(sbad) +") with "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (fControlEncoding == null || fControlEncoding.equals(fJSchChannelEncoding)) {
- msg += "default encoding \"" + fJSchChannelEncoding + "\". "; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- msg += "encoding \"" + fControlEncoding + "\" over local default encoding \"" + fJSchChannelEncoding + "\". "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- msg += "Please specify a different encoding in host properties."; //$NON-NLS-1$
- throw new UnsupportedEncodingException(msg);
- }
- return recoded;
- } catch(UnsupportedEncodingException e) {
-
- //SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),"Please specify a different encoding in host properties."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- //throw new RemoteFileIOException(new SystemMessageException(msg));
- throw new SystemMessageException(msg);
-
- }
- }
-
- protected String recodeSafeForJsch(String s) throws SystemMessageException {
- String recoded = recodeSafe(s);
- // Quote ? and * characters for Jsch
- // FIXME bug 204705: this does not work properly for commands like ls(),
- // due to a Jsch bug
- return quoteForJsch(recoded);
- }
-
- /**
- * Decode String (sftp result) with requested user encoding, in case it differs from Platform default encoding.
- * @param s String to decode
- * @return decoded String
- * @throws SystemMessageException with user message in case the requested encoding is not supported
- */
- protected String decode(String s) throws SystemMessageException {
- if (fControlEncoding==null) {
- return s;
- } else if (fControlEncoding.equals(fJSchChannelEncoding)) {
- return s;
- }
- try {
- byte[] bytes = s.getBytes(fJSchChannelEncoding); // original
- // bytes sent by
- // SSH
- return new String(bytes, fControlEncoding);
- } catch(UnsupportedEncodingException e) {
- throw makeSystemMessageException(e);
- }
- }
-
- /** Regular expression pattern to know when Jsch needs quoting. */
- private static Pattern quoteForJschPattern = Pattern.compile("[*?\\\\]"); //$NON-NLS-1$
-
- /**
- * Quote characters '?' and '*' for Jsch because it would otherwise
- * use them as patterns for globbing.
- * @param s String to enquote
- * @return String with '?' and '*' quoted.
- */
- protected String quoteForJsch(String s) {
- if(quoteForJschPattern.matcher(s).find()) {
- StringBuffer buf = new StringBuffer(s.length()+8);
- for(int i=0; i<s.length(); i++) {
- char c = s.charAt(i);
- if (c == '?' || c == '*' || c == '\\') {
- //if(c=='?' || c=='*') {
- buf.append('\\');
- }
- buf.append(c);
- }
- s = buf.toString();
- }
- return s;
- }
-
- public String getName() {
- return SshServiceResources.SftpFileService_Name;
- }
-
- public String getDescription() {
- return SshServiceResources.SftpFileService_Description;
- }
-
- public void connect() throws SystemMessageException {
- if (fLastConnectFailureTime > 0 && System.currentTimeMillis() - fLastConnectFailureTime < CONNECT_RETRY_MILLIS) {
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, SshServiceResources.SftpFileService_Error_no_sftp);
- }
- try {
- Activator.trace("SftpFileService.connecting..."); //$NON-NLS-1$
- Session session = fSessionProvider.getSession();
- Channel channel=session.openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- fChannelSftp=(ChannelSftp)channel;
- setControlEncoding(fSessionProvider.getControlEncoding());
- fUserHome = decode(fChannelSftp.pwd());
- Activator.trace("SftpFileService.connected"); //$NON-NLS-1$
- } catch(Exception e) {
- Activator.trace("SftpFileService.connecting failed: "+e.toString()); //$NON-NLS-1$
- fLastConnectFailureTime = System.currentTimeMillis();
- throw new SystemOperationFailedException(Activator.PLUGIN_ID, SshServiceResources.SftpFileService_Error_no_sftp, 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;
- }
-
- protected void progressTick(IProgressMonitor monitor, int ticks) throws SystemOperationCancelledException {
- if (monitor!=null) {
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- monitor.worked(ticks);
- }
- }
-
- 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 if (sftpe.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- //TODO better throw SENFE at the place where we know what element and operation is done
- messageException = new SystemElementNotFoundException("", ""); //$NON-NLS-1$ //$NON-NLS-2$
- } 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);
- }
-
- /**
- * Concatenate a parent directory with a file name to form a new proper path name.
- * @param parentDir path name of the parent directory.
- * @param fileName file name to concatenate.
- * @return path name concatenated from parent directory and file name.
- *
- */
- protected String concat(String parentDir, String fileName) {
- // See also {@link SftpHostFile#getAbsolutePath()}
- if (parentDir == null || parentDir.length() == 0) {
- // Looking at a Root
- return fileName;
- }
- StringBuffer path = new StringBuffer(parentDir);
- if (!parentDir.endsWith("/")) //$NON-NLS-1$
- {
- path.append('/');
- }
- path.append(fileName);
- return path.toString();
- }
-
- public IHostFile getFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- //getFile() must return a dummy even for non-existent files,
- //or the move() operation will fail. This is described in
- //the API docs.
- SftpHostFile node = null;
- SftpATTRS attrs = null;
- String fullPath = concat(remoteParent, fileName);
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- attrs = getChannel("SftpFileService.getFile: " + fullPath).lstat(recodeSafeForJsch(fullPath)); //$NON-NLS-1$
- Activator.trace("SftpFileService.getFile <--"); //$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();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- if (node==null) {
- boolean isRoot = (remoteParent == null || remoteParent.length() == 0);
- node = new SftpHostFile(isRoot ? null : remoteParent, fileName, false, isRoot, 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(String parentPath, String fileFilter, int fileType, IProgressMonitor monitor) 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)) {
- boolean haveSubMonitor = false;
- try {
- Vector vv = getChannel("SftpFileService.internalFetch: " + parentPath).ls(recodeSafeForJsch(parentPath)); //$NON-NLS-1$
- progressTick(monitor, 40);
- if (vv.size()>1 && monitor!=null) {
- monitor = new SubProgressMonitor(monitor, 40);
- monitor.beginTask(null, vv.size());
- }
- 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 = decode(lsEntry.getFilename());
- if (".".equals(fileName) || "..".equals(fileName)) { //$NON-NLS-1$ //$NON-NLS-2$
- //don't show the trivial names
- continue;
- }
- if (vv.size() == 1 && fileName.equals(parentPath.substring(parentPath.lastIndexOf('/') + 1))) {
- //If there is only one entry and it has the same name as the parent path, the parentPath could be a file.
- //Check if the parentPath is a directory.
- SftpATTRS attrs = getChannel("SftpFileService.internalFetch: " + parentPath).stat(parentPath); //$NON-NLS-1$
- if (!attrs.isDir()) {
- // parent was a file and not a folder
- //throw new RemoteFileException("Not a folder: " + parentPath); //$NON-NLS-1$
- throw new RemoteFileIOException(new IOException("Not a folder: " + parentPath)); //$NON-NLS-1$
- }
- }
- if (filematcher.matches(fileName) || (lsEntry.getAttrs().isDir() && fileType!=IFileService.FILE_TYPE_FOLDERS)) {
- //get ALL directory names (unless looking for folders only)
- SftpHostFile node = makeHostFile(parentPath, fileName, lsEntry.getAttrs());
- progressTick(monitor, 1);
- if (isRightType(fileType, node)) {
- results.add(node);
- }
- }
- }
- }
- Activator.trace("SftpFileService.internalFetch <--"); //$NON-NLS-1$
- } catch(Exception e) {
- if ( (e instanceof SftpException) && ((SftpException)e).id==ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- //We can get a "2: No such file" exception when the directory is empty.
- try {
- // Check if the parentPath exists and is a folder
- SftpATTRS attrs = getChannel("SftpFileService.internalFetch: " + parentPath).stat(parentPath); //$NON-NLS-1$
- if (attrs.isDir()) {
- // We MUST NOT throw an exception here. Just return
- // an empty IHostFile array.
- return new IHostFile[0];
- }
- // else, fall through to exception handling -- will send
- // SystemRemoteFileIOException
- } catch (Exception ee) {
- //Can't get the folder attributes so let the first exception be handled.
- }
- }
- //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();
- if (haveSubMonitor) monitor.done(); else progressTick(monitor, 40);
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- return (IHostFile[])results.toArray(new IHostFile[results.size()]);
- }
-
- private SftpHostFile makeHostFile(String parentPath, String fileName, SftpATTRS attrs) {
- SftpATTRS attrsTarget = attrs;
- String linkTarget=null;
- String canonicalPath = null;
- boolean isRoot = (parentPath == null || parentPath.length() == 0);
- if (attrs.isLink() && !isRoot) {
- //check if the link points to a directory. Roots cannot be Links.
- try {
- String fullPath = concat(parentPath, fileName);
- boolean readlinkDone = false;
- try {
- linkTarget = decode(getChannel("makeHostFile.readlink").readlink(recode(fullPath))); //$NON-NLS-1$
- readlinkDone = true;
- } catch(Throwable t) {
- //readlink() is only supported on sftpv3 and later servers, and jsch-0.1.29 or higher.
- //By catching the exception (UnsatisfiedLinkError) we remain backward compatible.
- //Disadvantages of the cd/pwd approach:
- // * _realpath() followed by _stat() might be one extra roundtrip compared to the readlink() approach
- // * Immediate link target is not available, only the fully resolved link target (might be an advantage too!)
- // * -- but clients can also resolve the path with the
- // * Immediate link target is not available for broken symbolic links
- getChannel("makeHostFile.chdir").cd(recode(fullPath)); //$NON-NLS-1$
- linkTarget=decode(getChannel("makeHostFile.pwd").pwd()); //$NON-NLS-1$
- canonicalPath=linkTarget;
- }
- if (linkTarget != null && !linkTarget.equals(fullPath)) {
- if (readlinkDone) {
- //linkTarget may be a relative path name that needs to be resolved for stat() to work properly
- String curdir=decode(getChannel("makeHostFile.pwd").pwd()); //$NON-NLS-1$
- if (!parentPath.equals(curdir)) {
- getChannel("makeHostFile.chdir").cd(recode(parentPath)); //$NON-NLS-1$
- }
- }
- attrsTarget = getChannel("SftpFileService.getFile").stat(recode(linkTarget)); //$NON-NLS-1$
- if (readlinkDone && attrsTarget.isDir()) {
- //TODO JSch should have realpath() API
- getChannel("makeHostFile.chdir").cd(recode(fullPath)); //$NON-NLS-1$
- canonicalPath=decode(getChannel("makeHostFile.pwd").pwd()); //$NON-NLS-1$
- }
- } else {
- linkTarget=null;
- }
- } catch(Exception e) {
- //dangling link?
- if (e instanceof SftpException && ((SftpException)e).id==ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- if (linkTarget==null) {
- linkTarget=":dangling link"; //$NON-NLS-1$
- } else {
- linkTarget=":dangling link:" + linkTarget; //$NON-NLS-1$
- }
- }
- }
- }
-
- SftpHostFile node = new SftpHostFile(isRoot ? null : parentPath, fileName, attrsTarget.isDir(), isRoot, attrs.isLink(), 1000L * attrs.getMTime(), attrs.getSize());
- if (linkTarget!=null) {
- node.setLinkTarget(linkTarget);
- }
- if (canonicalPath!=null) {
- node.setCanonicalPath(canonicalPath);
- }
- //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());
- }
-
- // permissions
- // TODO get the user and owner from the uid and gid
- HostFilePermissions permissions = new HostFilePermissions(perms, "" + attrs.getUId(), "" + attrs.getGId()); //$NON-NLS-1$ //$NON-NLS-2$
- node.setPermissions(permissions);
-
- return node;
- }
-
- public String getSeparator() {
- return "/"; //$NON-NLS-1$
- }
-
- public void upload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
- String dst = remoteParent;
- if( remoteFile!=null ) {
- dst = concat(dst, remoteFile);
- }
- //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;
- dst = recodeSafeForJsch(dst);
- 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()) {
- throw new SystemOperationCancelledException();
- } else {
- SftpATTRS attr = channel.stat(dst);
- ////[237616] Modtime will be set by calling setLastModified() from UniversalFileTransferUtility
- //attr.setACMODTIME(attr.getATime(), (int)(localFile.lastModified()/1000));
-
- ////TODO check if we want to maintain permissions
- //if (!localFile.canWrite()) {
- // attr.setPERMISSIONS( attr.getPermissions() & (~00400));
- //}
-
- ////[237616] Modtime will be set by calling setLastModified() from UniversalFileTransferUtility
- //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,remoteFile)));
- //return false;
- }
- }
- }
- catch (Exception e) {
- Activator.trace("SftpFileService.upload "+dst+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- //return false;
- }
- finally {
- if (channel!=null) channel.disconnect();
- }
- }
-
- 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;
- if (Activator.isTracingOn()) {
- Activator.trace("Sftp-monitor: "+max+", "+desc); //$NON-NLS-1$ //$NON-NLS-2$
- }
- //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
- });
-
- if (Activator.isTracingOn()) {
- System.out.print('#');
- }
- fMonitor.subTask(subDesc);
- fMonitor.worked((int)count);
- return !(fMonitor.isCanceled());
- }
- public void end(){
- if (Activator.isTracingOn()) {
- System.out.println();
- System.out.println("Sftp-monitor <--"); //$NON-NLS-1$
- System.out.flush();
- }
- fMonitor.done();
- }
- }
-
- public void upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) 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(tempFile, remoteParent, remoteFile, isBinary, "", hostEncoding, monitor); //$NON-NLS-1$
- }
- catch (Exception e) {
- throw makeSystemMessageException(e);
- //return false;
- }
- }
-
- public void download(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException
- {
- ChannelSftp channel = null;
- String remotePath = concat(remoteParent, remoteFile);
- try {
- if (!localFile.exists()) {
- File localParentFile = localFile.getParentFile();
- if (!localParentFile.exists()) {
- localParentFile.mkdirs();
- }
- //localFile.createNewFile();
- }
- //TODO Ascii/binary?
- String remotePathRecoded = recode(remotePath);
- 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(remotePathRecoded, localFile.getAbsolutePath(), sftpMonitor, mode);
- Activator.trace("SftpFileService.download "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-2$
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- } else {
- SftpATTRS attr = channel.stat(remotePathRecoded);
- 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,remoteFile)));
- //return false;
- }
- }
- }
- catch (Exception e) {
- //TODO improve message and handling when trying to download a symlink
- Activator.trace("SftpFileService.download "+remotePath+" 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();
- }
- }
- }
-
- public IHostFile getUserHome() {
- //As per bug 204710, this may be called before we are connected
- if (fUserHome!=null) {
- int lastSlash = fUserHome.lastIndexOf('/');
- String name = fUserHome.substring(lastSlash + 1);
- String parent = lastSlash > 0 ? fUserHome.substring(0, lastSlash) : lastSlash == 0 ? "/" : ""; //$NON-NLS-1$ //$NON-NLS-2$
- try {
- return getFile(parent, name, null);
- } catch(SystemMessageException e) {
- //Error getting user home -> return a handle
- //Returning the home path as a Root is the safest we can do, since it will
- //let users know what the home path is, and the "My Home" filter will be
- //set to correct target. See also bug 204710.
- return new SftpHostFile(null, fUserHome, true, true, false, 0, 0);
- }
- }
- //Bug 203490, bug 204710: Could not determine user home
- return null;
- }
-
- public IHostFile[] getRoots(IProgressMonitor monitor) {
- IHostFile root = null;
- try {
- root = getFile(null, "/", monitor); //$NON-NLS-1$
- }
- catch (SystemMessageException e){
- }
- if (root == null){
- root = new SftpHostFile(null, "/", true, true, false, 0, 0); //$NON-NLS-1$
- }
- return new IHostFile[] { root };
- }
-
- public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- IHostFile result = null;
- String fullPath = concat(remoteParent, fileName);
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPathRecoded = recodeSafeForJsch(concat(remoteParent, fileName));
- OutputStream os = getChannel("SftpFileService.createFile").put(fullPathRecoded); //$NON-NLS-1$
- os.close();
- // use lstat for consistency with other invocations of makeHostFile()
- SftpATTRS attrs = getChannel("SftpFileService.createFile.stat").lstat(fullPathRecoded); //$NON-NLS-1$
- result = makeHostFile(remoteParent, fileName, attrs);
- Activator.trace("SftpFileService.createFile ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.createFile "+fullPath+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- return result;
- }
-
- public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
- {
- IHostFile result = null;
- String fullPath = concat(remoteParent, folderName);
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPathRecoded = recodeSafe(fullPath);
- getChannel("SftpFileService.createFolder").mkdir(fullPathRecoded); //$NON-NLS-1$
- // use lstat for consistency with other invocations of makeHostFile()
- SftpATTRS attrs = getChannel("SftpFileService.createFolder.stat").lstat(quoteForJsch(fullPathRecoded)); //$NON-NLS-1$
- result = makeHostFile(remoteParent, folderName, attrs);
- Activator.trace("SftpFileService.createFolder ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.createFolder "+fullPath+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- return result;
- }
-
- public void delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- String fullPath = concat(remoteParent, fileName);
- Activator.trace("SftpFileService.delete.waitForLock"); //$NON-NLS-1$
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- String fullPathRecoded = recodeSafeForJsch(fullPath);
- SftpATTRS attrs = null;
- try {
- attrs = getChannel("SftpFileService.delete").lstat(fullPathRecoded); //$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
- try {
- getChannel("SftpFileService.delete.rm").rm(fullPathRecoded); //$NON-NLS-1$
- } catch (Exception e2) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, fullPath, "delete"); //$NON-NLS-1$
- }
- } else {
- //Security exception, or similar: will be wrapped in makeSystemMessageException()
- throw e;
- }
- }
- if (attrs==null) {
- //doesn't exist, throw SystemElementNotFoundException
- throw new SystemElementNotFoundException(fullPath, "delete"); //$NON-NLS-1$
- } else if (attrs.isDir()) {
- try {
- getChannel("SftpFileService.delete.rmdir").rmdir(fullPathRecoded); //$NON-NLS-1$
- } catch(SftpException e) {
- if(e.id==ChannelSftp.SSH_FX_FAILURE) {
- //Bug 153649: Recursive directory delete
- //throw new RemoteFolderNotEmptyException();
- String fullPathQuoted = PathUtility.enQuoteUnix(fullPathRecoded);
- int rv = runCommand("rm -rf "+fullPathQuoted, monitor); //$NON-NLS-1$
- if (rv != 0) {
- throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID);
- }
- } else {
- throw e;
- }
- }
- } else {
- getChannel("SftpFileService.delete.rm").rm(fullPathRecoded); //$NON-NLS-1$
- }
- Activator.trace("SftpFileService.delete ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.delete "+fullPath+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- public void rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException
- {
- String fullPathOld = concat(remoteParent, oldName);
- String fullPathNew = concat(remoteParent, newName);
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- getChannel("SftpFileService.rename").rename(recode(fullPathOld), recodeSafeForJsch(fullPathNew)); //$NON-NLS-1$
- Activator.trace("SftpFileService.rename ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.rename "+fullPathOld+" -> "+fullPathNew+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- public void rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException {
- // TODO dont know how to update
- rename(remoteParent, oldName, newName, monitor);
- }
-
- private boolean progressWorked(IProgressMonitor monitor, int work) {
- boolean cancelRequested = false;
- if (monitor!=null) {
- monitor.worked(work);
- cancelRequested = monitor.isCanceled();
- }
- return cancelRequested;
- }
-
- public int runCommand(String command, IProgressMonitor monitor) 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(command);
- 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 void move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) 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(recode(concat(srcParent, srcName)));
- String fullPathNew = PathUtility.enQuoteUnix(recodeSafe(concat(tgtParent, tgtName)));
- int rv = runCommand("mv " + fullPathOld + ' ' + fullPathNew, monitor); //$NON-NLS-1$
- if (rv != 0) {
- throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID);
- }
- }
-
- public void copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) 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(recode(concat(srcParent, srcName)));
- String fullPathNew = PathUtility.enQuoteUnix(recodeSafe(concat(tgtParent, tgtName)));
- int rv = runCommand("cp -Rp " + fullPathOld + ' ' + fullPathNew, monitor); //$NON-NLS-1$
- if (rv != 0) {
- throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID);
- }
- }
-
- public void copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException
- {
- Activator.trace("SftpFileService.copyBatch "+srcNames); //$NON-NLS-1$
- for (int i = 0; i < srcParents.length; i++)
- {
- //TODO check what should happen if one file throws an Exception
- //should the batch job continue?
- copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
- }
- }
-
- public void initService(IProgressMonitor monitor) throws SystemMessageException {
- Activator.trace("SftpFileService.initService"); //$NON-NLS-1$
- super.initService(monitor);
- connect();
- }
-
- public void uninitService(IProgressMonitor monitor) {
- Activator.trace("SftpFileService.uninitService"); //$NON-NLS-1$
- disconnect();
- super.uninitService(monitor);
- }
-
- public boolean isCaseSensitive() {
- //TODO find out whether remote is case sensitive or not
- return true;
- }
-
- public void setLastModified(String parent, String name,
- long timestamp, IProgressMonitor monitor) throws SystemMessageException
- {
- String path = concat(parent, name);
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- getChannel("SftpFileService.setLastModified").setMtime(recode(path), (int)(timestamp/1000)); //$NON-NLS-1$
- Activator.trace("SftpFileService.setLastModified ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.setLastModified "+path+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- public void setReadOnly(String parent, String name,
- boolean readOnly, IProgressMonitor monitor) throws SystemMessageException {
- String path = concat(parent, name);
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- SftpATTRS attr = getChannel("SftpFileService.setReadOnly").stat(recode(path)); //$NON-NLS-1$
- int permOld = attr.getPermissions();
- int permNew = permOld;
- if (readOnly) {
- permNew &= ~(128 | 16 | 2); //ugo-w
- } else {
- permNew |= 128; //u+w
- }
- if (permNew != permOld) {
- getChannel("SftpFileService.setReadOnly").chmod(permNew, recode(path)); //$NON-NLS-1$
- Activator.trace("SftpFileService.setReadOnly ok"); //$NON-NLS-1$
- } else {
- Activator.trace("SftpFileService.setReadOnly nothing-to-do"); //$NON-NLS-1$
- }
- } catch (Exception e) {
- Activator.trace("SftpFileService.setReadOnly "+path+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- if ((e instanceof SftpException) && ((SftpException) e).id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, path, "setReadOnly"); //$NON-NLS-1$
- }
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- /**
- * Gets the input stream to access the contents of a remote file.
- * @since 2.0
- * @see org.eclipse.rse.services.files.AbstractFileService#getInputStream(String, String, boolean, IProgressMonitor)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
-
- InputStream stream = null;
-
- String remotePath = concat(remoteParent, remoteFile);
- try {
- String remotePathRecoded = recode(remotePath);
- getChannel("SftpFileService.getInputStream " + remoteFile); //check the session is healthy //$NON-NLS-1$
- ChannelSftp channel = (ChannelSftp)fSessionProvider.getSession().openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- stream = new SftpBufferedInputStream(channel.get(remotePathRecoded), channel);
- Activator.trace("SftpFileService.getInputStream " + remoteFile + " ok"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (Exception e) {
- Activator.trace("SftpFileService.getInputStream " + remotePath + " failed: " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- }
-
- return stream;
- }
-
- /**
- * Gets the output stream to write to a remote file.
- * @since 2.0
- * @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(String, String, boolean, IProgressMonitor)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
- return getOutputStream(remoteParent, remoteFile, options, monitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
-
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
-
- OutputStream stream = null;
- String dst = remoteParent;
- if (remoteFile!=null) {
- dst = concat(remoteParent, remoteFile);
- }
-
- try {
- int mode;
- if ((options & IFileService.APPEND) == 0) {
- mode = ChannelSftp.OVERWRITE;
- } else {
- mode = ChannelSftp.APPEND;
- }
- getChannel("SftpFileService.getOutputStream " + remoteFile); //check the session is healthy //$NON-NLS-1$
- ChannelSftp channel = (ChannelSftp)fSessionProvider.getSession().openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- stream = new SftpBufferedOutputStream(channel.put(recodeSafeForJsch(dst), mode), channel);
- Activator.trace("SftpFileService.getOutputStream " + remoteFile + " ok"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (Exception e) {
- Activator.trace("SftpFileService.getOutputStream " + dst + " failed: " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- }
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- return stream;
- }
-
-
- /**
- * @see org.eclipse.rse.services.files.IFilePermissionsService#getFilePermissions(IHostFile, IProgressMonitor)
- */
- public IHostFilePermissions getFilePermissions(IHostFile file,
- IProgressMonitor monitor) throws SystemMessageException {
- if (file instanceof IHostFilePermissionsContainer){
- return ((IHostFilePermissionsContainer)file).getPermissions();
- }
- return null;
- }
-
-
- /**
- * @see org.eclipse.rse.services.files.IFilePermissionsService#setFilePermissions(IHostFile, IHostFilePermissions, IProgressMonitor)
- */
- public void setFilePermissions(IHostFile file,
- IHostFilePermissions permissions, IProgressMonitor monitor)
- throws SystemMessageException {
- //See setReadOnly()
- String path = file.getAbsolutePath();
- if (fDirChannelMutex.waitForLock(monitor, fDirChannelTimeout)) {
- try {
- getChannel("SftpFileService.setFilePermissions").chmod(permissions.getPermissionBits(), recode(path)); //$NON-NLS-1$
- Activator.trace("SftpFileService.setFilePermissions ok"); //$NON-NLS-1$
- } catch (Exception e) {
- Activator.trace("SftpFileService.setFilePermissions " + path + " failed: " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- if ((e instanceof SftpException) && ((SftpException) e).id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
- throw new SystemElementNotFoundException(Activator.PLUGIN_ID, path, "setFilePermissions"); //$NON-NLS-1$
- }
- throw makeSystemMessageException(e);
- } finally {
- fDirChannelMutex.release();
- }
- } else {
- throw new SystemLockTimeoutException(Activator.PLUGIN_ID);
- }
- }
-
- public int getCapabilities(IHostFile file) {
- return IFilePermissionsService.FS_CAN_GET_ALL | IFilePermissionsService.FS_CAN_SET_PERMISSIONS;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpHostFile.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpHostFile.java
deleted file mode 100644
index 4aac49849..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpHostFile.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- * Martin Oberhuber (Wind River) - [235472] [ssh] RSE doesn't show correct properties of the file system root ("/")
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.ssh.files;
-
-import java.io.File;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-
-public class SftpHostFile implements IHostFile, IHostFilePermissionsContainer {
-
- 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 fCanonicalPath;
- private String[] fExtended = null;
-
- private IHostFilePermissions _permissions = 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;
- if (name == null || name.length() == 0) {
- throw new IllegalArgumentException();
- } else if (parentPath == null || isRoot) {
- //Root files must be consistent
- if (parentPath !=null || !isRoot /* || !isDirectory */) {
- throw new IllegalArgumentException();
- }
- } else if (name.indexOf('/')>=0) {
- //Non-root files must not have a relative path as name, or it would break parent/child relationships
- throw new IllegalArgumentException();
- }
- 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) {
- //Rename inside the same parent folder.
- //FIXME is this really what was desired here? Or would we rename Roots?
- //Renaming Roots isn't possible, I'd think.
- fName = newAbsolutePath;
- }
- else if (i == 0) {
- // Renaming a root folder
- if (newAbsolutePath.length()==1) {
- //rename to root "/" -- should this work?
- fParentPath = null;
- fIsRoot = true;
- fName = newAbsolutePath;
- } else {
- fParentPath = "/"; //$NON-NLS-1$
- fName = newAbsolutePath.substring(i + 1);
- }
- fParentPath = "/"; //$NON-NLS-1$
- fName = newAbsolutePath.substring(i + 1);
- } 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;
- }
-
- public void setCanonicalPath(String canonicalPath) {
- fCanonicalPath = canonicalPath;
- }
-
- public String getCanonicalPath() {
- if (fCanonicalPath==null) {
- return getAbsolutePath();
- } else {
- return fCanonicalPath;
- }
- }
-
- /**
- * 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.startsWith(":dangling link")) { //$NON-NLS-1$
- String linkTarget = (fLinkTarget.length()<=15) ? "unknown" : fLinkTarget.substring(15); //$NON-NLS-1$
- result = "broken symbolic link to `" + linkTarget + "'"; //$NON-NLS-1$ //$NON-NLS-2$
- } 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;
- }
-
- public IHostFilePermissions getPermissions() {
- return _permissions;
- }
-
- public void setPermissions(IHostFilePermissions permissions) {
- _permissions = permissions;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalService.java
deleted file mode 100644
index faec2bceb..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalService.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.ssh.terminal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.internal.services.ssh.ISshService;
-import org.eclipse.rse.internal.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.internal.services.ssh.SshServiceResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.terminals.AbstractTerminalService;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-
-/**
- * A Terminal Service for ssh.
- */
-public class SshTerminalService extends AbstractTerminalService implements ISshService {
-
- private final ISshSessionProvider fSessionProvider;
-
- public SshTerminalService(ISshSessionProvider sessionProvider) {
- fSessionProvider = sessionProvider;
- }
-
- public ISshSessionProvider getSessionProvider() {
- return fSessionProvider;
- }
-
- public ITerminalShell launchTerminal(String ptyType, String encoding, String[] environment, String initialWorkingDirectory, String commandToRun,
- IProgressMonitor monitor) throws SystemMessageException {
- SshTerminalShell hostShell = new SshTerminalShell(getSessionProvider(), ptyType, encoding, environment, initialWorkingDirectory, commandToRun);
- return hostShell;
- }
-
- public String getName() {
- return SshServiceResources.SshTerminalService_Name;
- }
-
- public String getDescription() {
- return SshServiceResources.SshTerminalService_Description;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java
deleted file mode 100644
index 2239456fe..000000000
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE
- * Martin Oberhuber (Wind River) - [227320] Fix endless loop in SshTerminalShell
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.ssh.terminal;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.Hashtable;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.Session;
-
-import org.eclipse.rse.internal.services.ssh.ISshSessionProvider;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.terminals.AbstractTerminalShell;
-import org.eclipse.rse.services.terminals.ITerminalService;
-
-/**
- * A remote shell connection supporting Streams for I/O.
- */
-public class SshTerminalShell extends AbstractTerminalShell {
-
- private ISshSessionProvider fSessionProvider;
- private Channel fChannel;
- private String fEncoding;
- private InputStream fInputStream;
- private OutputStream fOutputStream;
- private Writer fOutputStreamWriter;
- private int fWidth = 0;
- private int fHeight = 0;
- private static String defaultEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
-
- /**
- * Construct a new Terminal connection.
- *
- * The SSH channel is immediately connected in the Constructor.
- *
- * @param sessionProvider SSH session provider
- * @param ptyType Terminal type to set, or <code>null</code> if not
- * relevant
- * @param encoding The default encoding to use for initial command.
- * @param environment Environment array to set, or <code>null</code> if
- * not relevant.
- * @param initialWorkingDirectory initial directory to open the Terminal in.
- * Use <code>null</code> or empty String ("") to start in a
- * default directory. Empty String will typically start in the
- * home directory.
- * @param commandToRun initial command to send.
- * @throws SystemMessageException in case anything goes wrong. Channels and
- * Streams are all cleaned up again in this case.
- * @see ITerminalService
- */
- public SshTerminalShell(ISshSessionProvider sessionProvider, String ptyType, String encoding, String[] environment, String initialWorkingDirectory,
- String commandToRun) throws SystemMessageException {
- try {
- fSessionProvider = sessionProvider;
- fEncoding = encoding;
- fChannel = fSessionProvider.getSession().openChannel("shell"); //$NON-NLS-1$
- if (ptyType != null && (fChannel instanceof ChannelShell)) {
- //By default, jsch always creates a vt100 connection sized
- //80x24 / 640x480 (dimensions can be changed).
- ((ChannelShell) fChannel).setPtyType(ptyType);
- }
-
- //Try to set the user environment. 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);
- if (fEncoding != null) {
- key = recode(key, fEncoding);
- value = recode(value, fEncoding);
- }
- envTable.put(key, value);
- }
- }
- ((ChannelShell) fChannel).setEnv(envTable);
- }
-
- fOutputStream = fChannel.getOutputStream();
- fInputStream = fChannel.getInputStream();
- fChannel.connect();
-
- if (fEncoding != null) {
- fOutputStreamWriter = new BufferedWriter(new OutputStreamWriter(fOutputStream, encoding));
- } else {
- // default encoding == System.getProperty("file.encoding")
- // TODO should try to determine remote encoding if possible
- fOutputStreamWriter = new BufferedWriter(new OutputStreamWriter(fOutputStream));
- }
-
- 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$
- }
- if (commandToRun != null && commandToRun.length() > 0) {
- writeToShell(commandToRun);
- }
- } catch(Exception e) {
- throw new RemoteFileException("Error creating Terminal", e); //$NON-NLS-1$
- } finally {
- isActive();
- }
- }
-
- public String getDefaultEncoding() {
- return fEncoding;
- }
-
- /**
- * Encode String with requested user encoding, in case it differs from
- * Platform default encoding.
- *
- * @param s String to encode
- * @param encoding Encoding to use
- * @return encoded String
- * @throws UnsupportedEncodingException in case the requested encoding is
- * not supported
- */
- protected String recode(String s, String encoding) throws UnsupportedEncodingException {
- if (encoding == null) {
- return s;
- } else if (encoding.equals(defaultEncoding)) {
- return s;
- }
- // what we want on the wire:
- byte[] bytes = s.getBytes(encoding);
- // what we need to tell Jsch to get this on the wire:
- return new String(bytes, defaultEncoding);
- }
-
- /*
- * (non-Javadoc)
- * @see ITerminalHostShell#getInputStream(Object)
- */
- public InputStream getInputStream() {
- return fInputStream;
- }
-
- /*
- * (non-Javadoc)
- * @see ITerminalHostShell#getOutputStream(Object)
- */
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
-
- /**
- * Write a command to the shell, honoring specified Encoding. Can only be
- * done before an outputStream is obtained, since these commands would
- * interfere with the outputStream.
- *
- * @param command Command String to send, or "#break" to send a Ctrl+C
- * command.
- */
- public void writeToShell(String command) throws IOException {
- if (isActive()) {
- if ("#break".equals(command)) { //$NON-NLS-1$
- command = "\u0003"; // Unicode 3 == Ctrl+C //$NON-NLS-1$
- } else {
- command += "\r\n"; //$NON-NLS-1$
- }
- fOutputStreamWriter.write(command);
- fOutputStreamWriter.flush();
- }
- }
-
- public void exit() {
- if (fChannel != null) {
- try {
- try {
- getInputStream().close();
- } catch (IOException ioe) {
- /* ignore */
- }
- try {
- getOutputStream().close();
- } catch (IOException ioe) {
- /* ignore */
- }
- fChannel.disconnect();
- } finally {
- fChannel = null;
- isActive();
- }
- }
- }
-
- 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;
- }
-
- public boolean isLocalEcho() {
- return false;
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- if (fChannel != null && fChannel instanceof ChannelShell && (newWidth != fWidth || newHeight != fHeight)) {
- // avoid excessive communications due to change size requests by
- // caching previous size
- ChannelShell channelShell = (ChannelShell) fChannel;
- channelShell.setPtySize(newWidth, newHeight, 8 * newWidth, 8 * newHeight);
- fWidth = newWidth;
- fHeight = newHeight;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/.classpath b/rse/plugins/org.eclipse.rse.services.telnet/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/.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.telnet/.cvsignore b/rse/plugins/org.eclipse.rse.services.telnet/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/.project b/rse/plugins/org.eclipse.rse.services.telnet/.project
deleted file mode 100644
index ae515cce4..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.services.telnet</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.services.telnet/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.services.telnet/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.services.telnet/META-INF/MANIFEST.MF
deleted file mode 100644
index e77028e22..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/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.telnet
-Bundle-Version: 2.0.0.qualifier
-Bundle-Activator: org.eclipse.rse.internal.services.telnet.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.apache.commons.net;bundle-version="[2.0.0,3.0.0)"
-Export-Package: org.eclipse.rse.internal.services.telnet;x-friends:="org.eclipse.rse.connectorservice.telnet,org.eclipse.rse.subsystems.shells.telnet",
- org.eclipse.rse.internal.services.telnet.terminal;x-friends:="org.eclipse.rse.subsystems.shells.telnet"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/about.html b/rse/plugins/org.eclipse.rse.services.telnet/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/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 5, 2007</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.telnet/about.ini b/rse/plugins/org.eclipse.rse.services.telnet/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/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=dsdp32.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.telnet/about.mappings b/rse/plugins/org.eclipse.rse.services.telnet/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/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.telnet/about.properties b/rse/plugins/org.eclipse.rse.services.telnet/about.properties
deleted file mode 100644
index 8a83c40c0..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/about.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-################################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE Telnet Service\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Celunite, Inc. and others 2000, 2009. 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.telnet/build.properties b/rse/plugins/org.eclipse.rse.services.telnet/build.properties
deleted file mode 100644
index 887472e87..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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,\
- about.ini,\
- about.mappings,\
- about.properties,\
- dsdp32.png
-source.. = src/
-output.. = bin/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/dsdp32.png b/rse/plugins/org.eclipse.rse.services.telnet/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/plugin.properties b/rse/plugins/org.eclipse.rse.services.telnet/plugin.properties
deleted file mode 100644
index 21ad1d20e..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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:
-# Sheldon D'souza (Celunite) - created
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Telnet Service
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/Activator.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/Activator.java
deleted file mode 100644
index 99172a2f7..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/Activator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Celunite, 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:
- * Sheldon D'souza (Celunite) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.services.telnet;
-
-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.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.services.telnet"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (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;
- }
-
- /*
- * (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;
- }
-
- /**
- * 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(TelnetServiceResources.TelnetPlugin_Unexpected_Exception, t.getClass().getName(), t.getLocalizedMessage());
- IStatus status = new Status(IStatus.ERROR, id, 0, message, t);
- log.log(status);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetService.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetService.java
deleted file mode 100644
index 7da052549..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Celunite, 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:
- * Sheldon D'souza (Celunite) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.services.telnet;
-
-/**
- * Markup Interface for services using the TelnetConnectorService.
- *
- * By implementing this interface, services can be recognized
- * as operating against an TelnetConnectorService. The interface
- * is used as the key in a table for looking up the connector
- * service when needed.
- */
-public interface ITelnetService {
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetSessionProvider.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetSessionProvider.java
deleted file mode 100644
index 05fdd4050..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/ITelnetSessionProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Sheldon D'souza (Celunite) - adapted from ISshSessionProvider
- * Sheldon D'souza (Celunite) - [187301] support multiple telnet shells
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- *******************************************************************************/
-package org.eclipse.rse.internal.services.telnet;
-
-import org.apache.commons.net.telnet.TelnetClient;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-public interface ITelnetSessionProvider {
-
- /**
- * Create a new Commons.Net TelnetClient, and authenticate it with the
- * remote.
- *
- * @param monitor progress monitor
- * @return a new Commons.Net TelnetClient for the given connection, already
- * authenticated
- * @throws Exception in case of any error
- */
- public TelnetClient makeNewTelnetClient(IProgressMonitor monitor) throws Exception ;
-
- /**
- * Authenticate an existing Commons.Net TelnetClient connection with the
- * remote, using the credentials known to RSE. Depending on configuration
- * options, this may answer the remote "login:" and "password:" prompts to
- * come up with an authenticated client.
- *
- * By passing in a pre-existing TelnetClient instance, this method allows
- * for fine-tuning the TelnetClient options such as ECHO handling through
- * the Commons.Net APIs before using RSE to authenticate the client.
- *
- * Example:
- *
- * <pre>
- * TelnetClient client = new TelnetClient(&quot;vt100&quot;);
- * client.addOptionHandler(new EchoOptionHandler(false, true, true, true));
- * client = fSessionProvider.loginTelnetClient(client, new NullProgressMonitor());
- * </pre>
- *
- * @param client telnet client already created
- * @param monitor progress monitor
- * @return authenticated client for the given connection, or
- * <code>null</code> in case the user cancelled the login through
- * the progress monitor. The passed-in client is disconnected in
- * this case.
- * @throws SystemMessageException in case of an error while authenticating
- * (such as timeout, communications error, or failure matching
- * expected prompt). The passed-in TelnetClient remains
- * connected in this case.
- * @since 2.0
- */
- public TelnetClient loginTelnetClient(TelnetClient client, IProgressMonitor monitor) throws SystemMessageException;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.java
deleted file mode 100644
index 8488cbc09..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Sheldon D'souza (Celunite) - adapted form SshServiceResources
- * Anna Dushistova (MontaVista) - [267226] Wrong name and description in TelnetTerminalService
- *******************************************************************************/
-package org.eclipse.rse.internal.services.telnet;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TelnetServiceResources extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.services.telnet.TelnetServiceResources"; //$NON-NLS-1$
-
- public static String TelnetPlugin_Unexpected_Exception;
-
- public static String TelnetTerminalService_Description;
-
- public static String TelnetTerminalService_Name;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, TelnetServiceResources.class);
- }
-
- private TelnetServiceResources(){
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.properties b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.properties
deleted file mode 100644
index c039d9ccb..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/TelnetServiceResources.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# Sheldon D'souza (Celunite) - adapted from SshServiceResources
-# Anna Dushistova (MontaVista) - [267226] Wrong name and description in TelnetTerminalService
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-TelnetPlugin_Unexpected_Exception=Unexpected {0}: {1}
-TelnetTerminalService_Name=Telnet Terminal Service
-TelnetTerminalService_Description=Telnet Terminal Service Description
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/EOFDetectingInputStreamWrapper.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/EOFDetectingInputStreamWrapper.java
deleted file mode 100644
index 8bd579c90..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/EOFDetectingInputStreamWrapper.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, 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:
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Martin Oberhuber (Wind River) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.telnet.terminal;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @since 2.0
- */
-public class EOFDetectingInputStreamWrapper extends FilterInputStream {
-
- private boolean fEOF = false;
-
- public EOFDetectingInputStreamWrapper(InputStream origStream) {
- super(origStream);
- }
-
- public synchronized boolean isEOF() {
- return fEOF;
- }
-
- public synchronized void setEOF(boolean eof) {
- fEOF = eof;
- }
-
- public int read() throws IOException {
- try {
- int result = in.read();
- if (result < 0) {
- setEOF(true);
- }
- return result;
- } catch (IOException e) {
- setEOF(true);
- throw (e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.io.InputStream#close()
- */
- public void close() throws IOException {
- try {
- in.close();
- } finally {
- setEOF(true);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.io.InputStream#read(byte[], int, int)
- */
- public int read(byte[] b, int off, int len) throws IOException {
- try {
- int result = in.read(b, off, len);
- if (result < 0)
- setEOF(true);
- return result;
- } catch (IOException e) {
- setEOF(true);
- throw (e);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalService.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalService.java
deleted file mode 100644
index 7087c0973..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Anna Dushistova (MontaVista) - adapted from SshTerminalService
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- * Anna Dushistova (MontaVista) - [267226] Wrong name and description in TelnetTerminalService
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.telnet.terminal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.internal.services.telnet.ITelnetService;
-import org.eclipse.rse.internal.services.telnet.ITelnetSessionProvider;
-import org.eclipse.rse.internal.services.telnet.TelnetServiceResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.terminals.AbstractTerminalService;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-
-/**
- * A Terminal Service for telnet.
- *
- * @since 2.0
- */
-public class TelnetTerminalService extends AbstractTerminalService implements ITelnetService {
-
- private final ITelnetSessionProvider fSessionProvider;
-
- public TelnetTerminalService(ITelnetSessionProvider sessionProvider) {
- fSessionProvider = sessionProvider;
- }
-
- public ITelnetSessionProvider getSessionProvider() {
- return fSessionProvider;
- }
-
- public ITerminalShell launchTerminal(String ptyType, String encoding, String[] environment, String initialWorkingDirectory, String commandToRun,
- IProgressMonitor monitor) throws SystemMessageException {
- TelnetTerminalShell hostShell = new TelnetTerminalShell(fSessionProvider, ptyType, encoding, environment, initialWorkingDirectory, commandToRun);
- return hostShell;
- }
-
- public String getName() {
- return TelnetServiceResources.TelnetTerminalService_Name;
- }
-
- public String getDescription() {
- return TelnetServiceResources.TelnetTerminalService_Description;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalShell.java b/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalShell.java
deleted file mode 100644
index 455b392fe..000000000
--- a/rse/plugins/org.eclipse.rse.services.telnet/src/org/eclipse/rse/internal/services/telnet/terminal/TelnetTerminalShell.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE
- * Martin Oberhuber (Wind River) - [227320] Fix endless loop in TelnetTerminalShell
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- * Martin Oberhuber (Wind River) - [267402] [telnet] "launch shell" takes forever
- * Anna Dushistova (MontaVista) - [267474] [rseterminal][telnet] Notify the remote when terminal window size changes
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.telnet.terminal;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.apache.commons.net.io.ToNetASCIIInputStream;
-import org.apache.commons.net.telnet.EchoOptionHandler;
-import org.apache.commons.net.telnet.InvalidTelnetOptionException;
-import org.apache.commons.net.telnet.WindowSizeOptionHandler;
-import org.apache.commons.net.telnet.SuppressGAOptionHandler;
-import org.apache.commons.net.telnet.TelnetClient;
-import org.apache.commons.net.telnet.TelnetOption;
-import org.apache.commons.net.telnet.TerminalTypeOptionHandler;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.internal.services.telnet.ITelnetSessionProvider;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.terminals.AbstractTerminalShell;
-import org.eclipse.rse.services.terminals.ITerminalService;
-
-/**
- * A remote shell connection supporting Streams for I/O.
- *
- * @since 2.0
- */
-public class TelnetTerminalShell extends AbstractTerminalShell {
-
- private ITelnetSessionProvider fSessionProvider;
- private TelnetClient fTelnetClient;
- private String fEncoding;
- private EOFDetectingInputStreamWrapper fInputStream;
- private OutputStream fOutputStream;
- private Writer fOutputStreamWriter;
- private int fWidth = 0;
- private int fHeight = 0;
- private static String defaultEncoding = new java.io.InputStreamReader(
- new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
-
- /**
- * Construct a new Terminal connection.
- *
- * The SSH channel is immediately connected in the Constructor.
- *
- * @param sessionProvider
- * SSH session provider
- * @param ptyType
- * Terminal type to set, or <code>null</code> if not relevant
- * @param encoding
- * The default encoding to use for initial command.
- * @param environment
- * Environment array to set, or <code>null</code> if not
- * relevant.
- * @param initialWorkingDirectory
- * initial directory to open the Terminal in. Use
- * <code>null</code> or empty String ("") to start in a default
- * directory. Empty String will typically start in the home
- * directory.
- * @param commandToRun
- * initial command to send.
- * @throws SystemMessageException
- * in case anything goes wrong. Channels and Streams are all
- * cleaned up again in this case.
- * @see ITerminalService
- */
- public TelnetTerminalShell(ITelnetSessionProvider sessionProvider,
- String ptyType, String encoding, String[] environment,
- String initialWorkingDirectory, String commandToRun)
- throws SystemMessageException {
- try {
- fSessionProvider = sessionProvider;
- boolean onUNIX = System.getProperty("os.name").toLowerCase()//$NON-NLS-1$
- .startsWith("unix")//$NON-NLS-1$
- || System.getProperty("os.name").toLowerCase().startsWith( //$NON-NLS-1$
- "linux");//$NON-NLS-1$
- fEncoding = encoding;
- if (ptyType == null) {
- fTelnetClient = new TelnetClient();
- } else {
- fTelnetClient = new TelnetClient(ptyType);
- fTelnetClient.addOptionHandler(new TerminalTypeOptionHandler(
- ptyType, true, true, true, true));
- }
- // request remote echo, but accept local if desired
- fTelnetClient.addOptionHandler(new EchoOptionHandler(false, true,
- true, true));
- fTelnetClient.addOptionHandler(new SuppressGAOptionHandler(true,
- true, true, true));
- fTelnetClient.addOptionHandler(new WindowSizeOptionHandler(fWidth,
- fHeight, true, true, true, true));
- fTelnetClient = fSessionProvider.loginTelnetClient(fTelnetClient,
- new NullProgressMonitor());
- fOutputStream = fTelnetClient.getOutputStream();
- if (onUNIX)
- fInputStream = new EOFDetectingInputStreamWrapper(
- new ToNetASCIIInputStream(fTelnetClient
- .getInputStream()));
- else
- fInputStream = new EOFDetectingInputStreamWrapper(fTelnetClient
- .getInputStream());
- if (fEncoding != null) {
- fOutputStreamWriter = new BufferedWriter(
- new OutputStreamWriter(fOutputStream, encoding));
- } else {
- // default encoding == System.getProperty("file.encoding")
- // TODO should try to determine remote encoding if possible
- fOutputStreamWriter = new BufferedWriter(
- new OutputStreamWriter(fOutputStream));
- }
-
- 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$
- }
- if (commandToRun != null && commandToRun.length() > 0) {
- writeToShell(commandToRun);
- }
- } catch (Exception e) {
- throw new RemoteFileException("Error creating Terminal", e); //$NON-NLS-1$
- } finally {
- isActive();
- }
- }
-
- public String getDefaultEncoding() {
- return fEncoding;
- }
-
- /**
- * Encode String with requested user encoding, in case it differs from
- * Platform default encoding.
- *
- * @param s
- * String to encode
- * @param encoding
- * Encoding to use
- * @return encoded String
- * @throws UnsupportedEncodingException
- * in case the requested encoding is not supported
- */
- protected String recode(String s, String encoding)
- throws UnsupportedEncodingException {
- if (encoding == null) {
- return s;
- } else if (encoding.equals(defaultEncoding)) {
- return s;
- }
- // what we want on the wire:
- byte[] bytes = s.getBytes(encoding);
- // what we need to tell Jsch to get this on the wire:
- return new String(bytes, defaultEncoding);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see ITerminalHostShell#getInputStream(Object)
- */
- public InputStream getInputStream() {
- return fInputStream;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see ITerminalHostShell#getOutputStream(Object)
- */
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
-
- /**
- * Write a command to the shell, honoring specified Encoding. Can only be
- * done before an outputStream is obtained, since these commands would
- * interfere with the outputStream.
- *
- * @param command
- * Command String to send, or "#break" to send a Ctrl+C command.
- */
- public void writeToShell(String command) throws IOException {
- if (isActive()) {
- if ("#break".equals(command)) { //$NON-NLS-1$
- command = "\u0003"; // Unicode 3 == Ctrl+C //$NON-NLS-1$
- } else {
- command += "\r\n"; //$NON-NLS-1$
- }
- fOutputStreamWriter.write(command);
- fOutputStreamWriter.flush();
- }
- }
-
- public void exit() {
- if (fTelnetClient != null) {
- try {
- try {
- getInputStream().close();
- } catch (IOException ioe) {
- /* ignore */
- }
- try {
- getOutputStream().close();
- } catch (IOException ioe) {
- /* ignore */
- ioe.printStackTrace();
- }
- try {
- // TODO disconnect should better be done via the
- // ConnectorService!!
- // Because like we do it here, the connector service is not
- // notified!
- synchronized (fTelnetClient) {
- if (fTelnetClient.isConnected())
- fTelnetClient.disconnect();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- } finally {
- fTelnetClient = null;
- isActive();
- }
- }
- }
-
- public boolean isActive() {
- if (fTelnetClient != null && fTelnetClient.isConnected()
- && !isDisconnected()) {
- return true;
- }
- // shell is not active: check for session lost
- exit();
-
- // //MOB: Telnet sessions are really independent of each other.
- // //So if one telnet session disconnects, it must not disconnect
- // //the other sessions.
- // if (fTelnetClient!=null && !fTelnetClient.isConnected()) {
- // fSessionProvider.handleSessionLost();
- // }
- return false;
- }
-
- private boolean isDisconnected() {
- return fInputStream.isEOF();
- }
-
- public boolean isLocalEcho() {
- return fTelnetClient.getLocalOptionState(TelnetOption.ECHO);
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- if (fTelnetClient != null
- && (newWidth != fWidth || newHeight != fHeight)) {
- // avoid excessive communications due to change size requests by
- // caching previous size
- synchronized (fTelnetClient) {
- try {
- fTelnetClient.deleteOptionHandler(TelnetOption.WINDOW_SIZE);
- fTelnetClient.addOptionHandler(new WindowSizeOptionHandler(
- newWidth, newHeight, true, true, true, true));
- } catch (InvalidTelnetOptionException e) {
- e.printStackTrace();
- }
- }
- fWidth = newWidth;
- fHeight = newHeight;
- }
- }
-
-}
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 a1aed60f3..000000000
--- a/rse/plugins/org.eclipse.rse.services/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.services/.settings/.api_filters b/rse/plugins/org.eclipse.rse.services/.settings/.api_filters
deleted file mode 100644
index 62a43f14b..000000000
--- a/rse/plugins/org.eclipse.rse.services/.settings/.api_filters
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.services" version="2">
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.AbstractTerminalService">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalService"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalService"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.AbstractTerminalShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.BaseShellDecorator">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.BaseShellDecorator"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.BaseShellDecorator"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.IBaseShell">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.IBaseShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.IBaseShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.ITerminalService">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalService"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalService"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.ITerminalShell">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ITerminalShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="META-INF/MANIFEST.MF" type="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator">
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- <filter id="305324134">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.TerminalShellDecorator"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java" type="org.eclipse.rse.internal.services.terminals.ProcessBaseShell">
- <filter id="305365105">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ProcessBaseShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.1"/>
- </message_arguments>
- </filter>
- <filter id="305365105">
- <message_arguments>
- <message_argument value="org.eclipse.rse.internal.services.terminals.ProcessBaseShell"/>
- <message_argument value="org.eclipse.rse.services_3.1.0"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.core.resources.prefs b/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 670884a4d..000000000
--- a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Apr 09 15:34:43 CEST 2008
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.services/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 52a5a0691..000000000
--- a/rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.services;singleton:=true
-Bundle-Version: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.services.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.services;x-internal:=true,
- org.eclipse.rse.internal.services.clientserver.archiveutils;x-internal:=true,
- org.eclipse.rse.internal.services.clientserver.java;x-internal:=true,
- org.eclipse.rse.internal.services.shells;x-internal:=true,
- org.eclipse.rse.internal.services.terminals;x-internal:=true,
- 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.files,
- org.eclipse.rse.services.processes,
- org.eclipse.rse.services.search,
- org.eclipse.rse.services.shells,
- org.eclipse.rse.services.terminals
-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 d4cc693f9..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 5, 2007</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 1e16724bc..000000000
--- a/rse/plugins/org.eclipse.rse.services/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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,\
- .,\
- plugin.xml
-jars.compile.order = clientserver.jar,.
-source.clientserver.jar = clientserver/
-output.clientserver.jar = clientserver.bin/
-source.. = src/,clientserver/
-output.. = bin/
-src.includes = about.html,\
- schema/
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java
deleted file mode 100644
index bf9a47490..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ISystemArchiveHandlerConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.services.clientserver.archiveutils;
-
-/**
- * Interface for general archive handler constants.
- */
-public interface ISystemArchiveHandlerConstants {
-
- /**
- * Zip archive extension, "zip".
- */
- public static final String ZIP_ARCHIVE_EXTENSION = "zip"; //$NON-NLS-1$
-
- /**
- * Jar archive extension, "jar".
- */
- public static final String JAR_ARCHIVE_EXTENSION = "jar"; //$NON-NLS-1$
-
- /**
- * Tar archive extension, "tar".
- */
- public static final String TAR_ARCHIVE_EXTENSION = "tar"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ITarConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ITarConstants.java
deleted file mode 100644
index 90a09e548..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/ITarConstants.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.services.clientserver.archiveutils;
-
-/**
- * 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';
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemArchiveUtil.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemArchiveUtil.java
deleted file mode 100644
index e6ac3367c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemArchiveUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemUniversalZipEntry.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemUniversalZipEntry.java
deleted file mode 100644
index 259993075..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/SystemUniversalZipEntry.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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("/"); //$NON-NLS-1$
- if (endOfPathPosition != -1)
- {
- _entryFullPath = _entryFullName.substring(0,endOfPathPosition);
- _entryName = _entryFullName.substring(endOfPathPosition+1);
- }
- else
- {
- _entryFullPath = ""; //$NON-NLS-1$
- _entryName = _entryFullName;
- }
- int i = _entryFullName.lastIndexOf("."); //$NON-NLS-1$
- if (i == -1)
- {
- _extension = ""; //$NON-NLS-1$
- } else _extension = _entryFullName.substring(i + 1);
- if (_entryFullName.indexOf("/") != -1) _nested = true; //$NON-NLS-1$
- }
-
- /**
- * 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/TgzFile.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/TgzFile.java
deleted file mode 100644
index 219333a4c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/archiveutils/TgzFile.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Johnson Ma (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.zip.GZIPInputStream;
-
-import org.eclipse.rse.services.clientserver.archiveutils.TarFile;
-
-/**
- * This class is used to read entries from tar.gz file
- * It read compressed data from GZIPInputStream
- */
-public class TgzFile extends TarFile {
-
- /**
- * Opens a tar.gz file for reading given the specified File object.
- * @param file the tar.gz file to be opened for reading.
- * @throws FileNotFoundException if the file does not exist.
- * @throws IOException if an I/O error occurs.
- */
- public TgzFile(File file) throws FileNotFoundException, IOException {
- super(file);
- }
-
- /**
- * Opens a tar.gz 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 TgzFile(String name) throws FileNotFoundException, IOException {
- super(name);
- }
-
- /**
- * Gets the input stream for the tar.gz file.
- * Get file input steam from superclass, wrap it using GZipInputSteam
- * @return the input stream for the tar file.
- * @throws FileNotFoundException if the file does not exist.
- */
- protected InputStream getInputStream() throws FileNotFoundException {
- InputStream fileInputStream = super.getInputStream();
- GZIPInputStream zipInputStream = null;
- try{
- zipInputStream = new GZIPInputStream(fileInputStream);
- } catch (IOException ioe) {
- //in that case, the file doesn't exists yet. return the file input stream from base class
- return fileInputStream;
- }
- return zipInputStream;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract4ByteNumericInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract4ByteNumericInfo.java
deleted file mode 100644
index d859955f3..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract4ByteNumericInfo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract8ByteNumericInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract8ByteNumericInfo.java
deleted file mode 100644
index 6e0704bd1..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/Abstract8ByteNumericInfo.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractAttributeInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractAttributeInfo.java
deleted file mode 100644
index 0d4099cdb..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractAttributeInfo.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCPInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCPInfo.java
deleted file mode 100644
index b7d240fb1..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCPInfo.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.services.clientserver.java;
-
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCommonInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCommonInfo.java
deleted file mode 100644
index 2b7a2fb61..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractCommonInfo.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractRefInfo.java
deleted file mode 100644
index be3d90bc7..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/AbstractRefInfo.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassFileUTF8Reader.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassFileUTF8Reader.java
deleted file mode 100644
index a0f9ed88a..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassFileUTF8Reader.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [221488] Fix lazy initialization in getInstance()
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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 = new ClassFileUTF8Reader();
-
- /**
- * Constructor.
- */
- private ClassFileUTF8Reader() {
- super();
- }
-
- /**
- * Returns the singleton instance of the reader.
- * @return the singleton instance.
- */
- public static final ClassFileUTF8Reader getInstance() {
- 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassInfo.java
deleted file mode 100644
index 36348744c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/ClassInfo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/DoubleInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/DoubleInfo.java
deleted file mode 100644
index 9455a0968..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/DoubleInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedClassLoader.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedClassLoader.java
deleted file mode 100644
index 780a21bca..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedClassLoader.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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"); //$NON-NLS-1$
-
- // 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(); //$NON-NLS-1$
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedDataInputStream.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedDataInputStream.java
deleted file mode 100644
index 3ad4636e5..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/EnhancedDataInputStream.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.InputStream#read()
- */
- 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));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldInfo.java
deleted file mode 100644
index 96d2be3b8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldRefInfo.java
deleted file mode 100644
index e2a02c037..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FieldRefInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FloatInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FloatInfo.java
deleted file mode 100644
index 0da93deff..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/FloatInfo.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IClassFileConstants.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IClassFileConstants.java
deleted file mode 100644
index ccdd91757..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IClassFileConstants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IntegerInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IntegerInfo.java
deleted file mode 100644
index 2c9b8aff6..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/IntegerInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/InterfaceMethodRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/InterfaceMethodRefInfo.java
deleted file mode 100644
index 46a57b06b..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/InterfaceMethodRefInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/LongInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/LongInfo.java
deleted file mode 100644
index 168e5ae8f..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/LongInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodInfo.java
deleted file mode 100644
index 525b09ebd..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodRefInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodRefInfo.java
deleted file mode 100644
index 1ae584e30..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/MethodRefInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/NameAndTypeInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/NameAndTypeInfo.java
deleted file mode 100644
index 927f239fa..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/NameAndTypeInfo.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/StringInfo.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/StringInfo.java
deleted file mode 100644
index 9d06854a4..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/StringInfo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/UTF8Info.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/UTF8Info.java
deleted file mode 100644
index 8adf0b35e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/internal/services/clientserver/java/UTF8Info.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
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 fc6ea3225..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClassifierConstants.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [247573][api] IClassifierConstants.TYPE_LINK == "link" is not in sync with actual usage of "symbolic link" in the code
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-/**
- * This interface defines some constants for classifiers.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IClassifierConstants {
-
- /**
- * Default type.
- */
- public static final String TYPE_DEFAULT = "file"; //$NON-NLS-1$
-
- /**
- * Link type, "link".
- *
- * @deprecated should use TYPE_SYMBOLIC_LINK
- */
- public static final String TYPE_LINK = "link"; //$NON-NLS-1$
-
- /**
- * Symbolic link type, "symbolic link"
- *
- * @since 3.1
- */
- public static final String TYPE_SYMBOLIC_LINK = "symbolic 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 5455cd016..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IClientServerConstants.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [releng] Get rid of invalid clientserver -> rse.services dependency
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-/**
- * Constants used by the Client and Server
- */
-
-public interface IClientServerConstants {
-
- /**
- * PLUGIN_ID to use in SimpleSystemMessage for clientserver.
- *
- * @since 3.0
- */
- public static final String PLUGIN_ID = "org.eclipse.rse.services"; //$NON-NLS-1$
-
-// 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 fe5d732e0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/IServiceConstants.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.clientserver;
-
-public interface IServiceConstants
-{
- public static final String TOKEN_SEPARATOR = "|"; //$NON-NLS-1$
-
- // Unexpected Error
- public static final String UNEXPECTED_ERROR = "unexpectedError"; //$NON-NLS-1$
-
- // Failure strings
- public static final String FAILED_WITH_EXIST = "failed with exist"; //$NON-NLS-1$
- public static final String FAILED_WITH_DOES_NOT_EXIST = "failed with does not exist"; //$NON-NLS-1$
- public static final String FAILED_WITH_EXCEPTION = "failed with exception"; //$NON-NLS-1$
- public static final String FAILED_WITH_SECURITY = "failed with security"; //$NON-NLS-1$
- public static final String FAILED_TO_DELETE_DIR = "failed to delete directory"; //$NON-NLS-1$
-
- // 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$
-}
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/ISystemOperationMonitor.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemOperationMonitor.java
deleted file mode 100644
index bb1ba3953..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/ISystemOperationMonitor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Xuan Chen (IBM) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * An interface to support cancellation of operations on remote systems, where
- * the Eclipse {@link IProgressMonitor} is not avaialble.
- *
- * @since org.eclipse.rse.services 3.0
- */
-public interface ISystemOperationMonitor
-{
- /**
- * Notifies that the work is done; that is, either the main task is completed
- * or the user cancelled it. This method may be called more than once
- * (implementations should be prepared to handle this case).
- */
- public boolean isDone();
-
- /**
- * Sets the done state to the given value.
- *
- * @param value <code>true</code> indicates that this operation has finished
- * <code>false</code> clears this flag
- * @see #isDone()
- */
- public void setDone(boolean value);
- /**
- * Returns whether cancelation of current operation has been requested.
- * Long-running operations should poll to see if cancelation
- * has been requested.
- *
- * @return <code>true</code> if cancellation has been requested,
- * and <code>false</code> otherwise
- * @see #setCancelled(boolean)
- */
- public boolean isCancelled();
-
-
- /**
- * Sets the cancel state to the given value.
- *
- * @param value <code>true</code> indicates that cancelation has
- * been requested (but not necessarily acknowledged);
- * <code>false</code> clears this flag
- * @see #isCancelled()
- */
- public void setCancelled(boolean value);
-
-} \ 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 478d83ed5..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/NamePatternMatcher.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.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;
- }
-}
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 549ed7112..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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
- * Martin Oberhuber (Wind River) - Fix 183991 - handle windows C:/ paths for FTP
- * Martin Oberhuber (Wind River) - [246710] Fix quoting backslashes in UNIX shells
- * Martin Oberhuber (Wind River) - [164110] Fix quoting single-quotes in UNIX shells
- * Martin Oberhuber (Wind River) - [285945] Fix quoting ! and " characters
- ********************************************************************************/
-
-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$
-
- /**
- * Normalize a path name that is supposed to be Windows style.
- * Replaces / characters by \ and remove duplicate \ characters.
- *
- * @param path a path to normalize
- * @return a normalized path.
- */
- public static String normalizeWindows(String path)
- {
- if (path == null || path.length() < 2) {
- return path;
- }
- //FIXME Windows UNC Paths should probably be considered.
- 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$
-
- /**
- * Normalize a path name that is supposed to be UNIX style.
- * Replaces \ characters by / and remove duplicate / characters.
- *
- * @deprecated this should not be used since \ is a valid part of
- * UNIX file names. Also, a better normalizer would also consider
- * swquences like a/../b and a/./b -- Try to work without this
- * method.
- * @param path a path to normalize
- * @return a normalized path.
- */
- 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;
- }
-
- /**
- * Given a path name, try to guess what separator is used.
- * Should only be used for absolute path names, but tries to compute
- * a good fallback in case of relative path names as well.
- * @param path a path to check
- * @return a separator String for the given path: either "/" or "\\"
- */
- public static String getSeparator(String path)
- {
- if (path!=null && path.length()>0) {
- //The most common case, first
- switch(path.charAt(0)) {
- case '/': return "/"; //UNIX absolute //$NON-NLS-1$
- case '\\': return "\\"; //UNC //$NON-NLS-1$
- }
- if (path.length()>2 && path.charAt(1)==':') {
- switch(path.charAt(2)) {
- case '\\': return "\\"; //Windows absolute //$NON-NLS-1$
- case '/': return "/"; //Windows absolute with / //$NON-NLS-1$
- }
- }
- //We have some relative path. Should never come here,
- //but try to guess anyways. Note that ':' and '\\' are
- //valid parts of UNIX filenames, so check for / first.
- //TODO check if it is a good idea to put an assert in here
- //or even throw an (unchecked) exception.
- if (path.indexOf('/')>0) {
- //Slash is a path illegal character on Windows -> must be UNIX
- return "/"; //$NON-NLS-1$
- } else if (path.indexOf('\\')>0) {
- //Not a single / but got \\ -> Likely Windows but not sure
- return "\\"; //$NON-NLS-1$
- } else if (path.length()==2 && path.charAt(1)==':') {
- //Windows drive letter only
- return "\\"; //$NON-NLS-1$
- }
- }
- // Path contains no /, no \\ and is not a drive only --> Fallback
- 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 '$':
- case '\\':
- case '\'':
- case '`':
- 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(c);
- buf.append('"');
- break;
- case '\n':
- case '!':
- //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 caac7a080..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemEncodingUtil.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) [215847]SystemEncodingUtil needs to convert to unsigned when checking xml file
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- *******************************************************************************/
-
-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$
-
- private DefaultEncodingProvider _defaultEncodingProvider = new DefaultEncodingProvider();
-
- /**
- * 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;
- }
-
-
-
- /**
- * Provider for the default encodings that RSE uses.
- * Clients may subclass this class, and override methods.
- * @since org.eclipse.rse.services 3.0
- */
- public static class DefaultEncodingProvider {
-
- /**
- * Return the default encoding for local workspace resources.
- * Clients may override.
- * @return String the local default encoding.
- */
- public String getLocalDefaultEncoding() {
- return System.getProperty("file.encoding"); //$NON-NLS-1$
- }
- }
-
- /**
- * Change the default encoding provider.
- *
- * This is a system-wide change, and clients will not be notified of changed
- * default encodings due to changing the provider. Therefore, changing the
- * provider should be done only once during early system startup.
- *
- * @param p the new encoding provider.
- * @since 3.0
- */
- public void setDefaultEncodingProvider(DefaultEncodingProvider p) {
- _defaultEncodingProvider = p;
- }
-
- /**
- * Returns the local default encoding as provided by the default encoding
- * provider. This method should be called after RSE startup is complete in
- * order to get the proper default workspace encoding.
- *
- * @return the local default encoding
- * @since 3.0
- */
- public String getLocalDefaultEncoding() {
- return _defaultEncodingProvider.getLocalDefaultEncoding();
- }
-
-
- /**
- * 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[] tempSigned = new byte[4];
-
- stream.read(tempSigned);
-
- stream.close();
-
-
- // convert to unsigned
- int[] temp = new int[4];
- for (int i = 0; i < 4; i++){
- temp[i] = 0xFF & tempSigned[i];
- }
-
-
- // 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)
- /* DKM - encodingGuess can only be null
- 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();
- }
-
- 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;
- }
- }
-}
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 1bf9c0702..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemFileClassifier.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * Martin Oberhuber (Wind River) - [141823] Local connection does not classify symbolic links
- ********************************************************************************/
-
-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;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-
-/**
- * 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 absolute 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
- try {
- return ArchiveHandlerManager.getInstance().getClassification(archiveFile, virtualPath);
- } catch (SystemMessageException e) {
- return "file"; //FIXME check fallback //$NON-NLS-1$
- }
- }
-
- /**
- * 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("symbolic 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 "symbolic link"
- else if (fulltype.startsWith("symbolic link to")) { //$NON-NLS-1$
- type = "symbolic 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/SystemOperationMonitor.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemOperationMonitor.java
deleted file mode 100644
index 03bfa2602..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemOperationMonitor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Xuan Chen (IBM) - initial API and implementation
- * Martin Oberhuber (Wind River) - [216252] canceled --> cancelled in comments and locals
- *******************************************************************************/
-
-
-package org.eclipse.rse.services.clientserver;
-
-/**
- * A monitor to support cancellation of operations in an environment
- * where Eclipse IProgressMonitor is not available.
- *
- * @since 3.0
- */
-public class SystemOperationMonitor implements ISystemOperationMonitor
-{
- private boolean cancelled = false;
- private boolean done = false;
-
-
- public boolean isDone()
- {
- return done;
- }
-
- public void setDone(boolean value)
- {
- done = value;
- }
-
- public boolean isCancelled()
- {
- return cancelled;
- }
-
-
-
- public void setCancelled(boolean value)
- {
- cancelled = value;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemReentrantMutex.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemReentrantMutex.java
deleted file mode 100644
index b3b60c8bb..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemReentrantMutex.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Xuan Chen (IBM) - [160775] Derive from org.eclipse.rse.services.Mutex
- * Xuan Chen (IBM) - [209825] add some info of printing the lock status
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * A reentrant Exclusion Lock for Threads that need to access a resource in a
- * serialized manner. If the request for the lock is running on the same thread
- * who is currently holding the lock, it will "borrow" the lock, and the call to
- * waitForLock() will go through. A SystemOperationMonitor is accepted in order
- * to support cancellation when waiting for the Mutex. This is a clone of
- * {@link org.eclipse.rse.services.Mutex} with some modification to make sure the
- * sequential calls to waitForLock() method in the same thread will not be
- * blocked.
- *
- * Usage Example: <code>
- * private SystemReentrantMutex fooMutex = new SystemReentrantMutex();
- * boolean doFooSerialized()(ISystemOperationMonitor monitor) {
- * int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- * mutexLockStatus = fooMutex.waitForLock(monitor, 1000);
- * if (mutexLockStatus != SystemReentrantMutex.LOCK_STATUS_NOLOCK) {
- * try {
- * return doFoo();
- * } finally {
- * //We only release the mutex if we acquire it, not borrowed it.
- * if (mutexLockStatus == SystemReentrantMutex.LOCK_STATUS_AQUIRED)
- * {
- * fooMutex.release();
- * }
- * }
- * }
- * return false;
- * }
- * </code>
- *
- * @since 3.0
- */
-public class SystemReentrantMutex {
-
- private boolean fLocked = false;
- private List fWaitQueue = new LinkedList();
- private Thread threadLockThisMutex = null;
- public static final int LOCK_STATUS_NOLOCK = 0; //No lock acquired or borrowed
- public static final int LOCK_STATUS_AQUIRED = 1; //Lock is acquired
- public static final int LOCK_STATUS_BORROWED = 2; //Lock is borrowed, since it is running
- //on the same thread as the one holding the lock
-
- /**
- * Creates an instance of <tt>SystemMutex</tt>.
- */
- public SystemReentrantMutex() {
- }
-
- /**
- * 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 SystemOperationMonitor. May be <code>null</code>.
- * @param timeout Maximum wait time given in milliseconds.
- * @return <code>LOCK_STATUS_AQUIRED</code> if the lock was acquired successfully.
- * <code>LOCK_STATUS_BORROWED</code> if the lock was borrowed.
- * <code>LOCK_STATUS_NOLOCK</code> if otherwise.
- */
- public int waitForLock(ISystemOperationMonitor monitor, long timeout) {
- if (Thread.interrupted()) {
- return LOCK_STATUS_NOLOCK;
- }
- if (monitor!=null && monitor.isCancelled()) {
- return LOCK_STATUS_NOLOCK;
- }
- final Thread myself = Thread.currentThread();
- synchronized(fWaitQueue) {
- if (!fLocked) {
- //acquire the lock immediately.
- fLocked = true;
- threadLockThisMutex = myself;
- return LOCK_STATUS_AQUIRED;
- } else {
- fWaitQueue.add(myself);
- }
- }
- //need to wait for the lock.
- int lockStatus = LOCK_STATUS_NOLOCK;
- try {
- long start = System.currentTimeMillis();
- long timeLeft = timeout;
- //It could be possible this function is called with null as monitor
- //And we don't want to wait forever here
- long pollTime = (timeLeft > 1000) ? 1000 : timeLeft;
- long nextProgressUpdate = start+500;
- boolean cancelled = false;
- while (timeLeft > 0 && !cancelled && lockStatus == LOCK_STATUS_NOLOCK) {
- //is it my turn yet? Check wait queue and wait
- synchronized(fWaitQueue) {
- if (!fLocked && fWaitQueue.get(0) == myself) {
- fWaitQueue.remove(0);
- fLocked = true;
- lockStatus = LOCK_STATUS_AQUIRED;
- threadLockThisMutex = myself;
- } else
- {
- if (threadLockThisMutex == myself && fWaitQueue.contains(myself))
- {
- fWaitQueue.remove(myself);
- fLocked = true;
- lockStatus = LOCK_STATUS_BORROWED;
- }
- else
- {
- long waitTime = timeLeft > pollTime ? pollTime : timeLeft;
- fWaitQueue.wait(waitTime);
- Object firstInQueue = fWaitQueue.get(0);
- boolean amIFirstInQueue = false;
- if (firstInQueue == null || firstInQueue == myself)
- {
- amIFirstInQueue = true;
- }
- if (!fLocked && amIFirstInQueue) {
- fWaitQueue.remove(0);
- fLocked = true;
- lockStatus = LOCK_STATUS_AQUIRED;
- threadLockThisMutex = myself;
- }
- }
- }
- }
- if (lockStatus == LOCK_STATUS_NOLOCK) {
- //Need to continue waiting
- long curTime = System.currentTimeMillis();
- timeLeft = start + timeout - curTime;
- if (monitor!=null) {
- cancelled = monitor.isCancelled();
- if (!cancelled && (curTime > nextProgressUpdate)) {
- nextProgressUpdate+=1000;
- }
- }
- }
- }
- } catch(InterruptedException e) {
- //cancelled waiting -> no lock acquired
- } finally {
- if (lockStatus == LOCK_STATUS_NOLOCK) {
- synchronized(fWaitQueue) {
- fWaitQueue.remove(myself);
- }
- }
- }
- return lockStatus;
- }
-
- /**
- * Release this mutex's lock.
- *
- * May only be called by the same thread that originally acquired
- * the SystemMutex.
- */
- public void release() {
- synchronized(fWaitQueue) {
- fLocked=false;
- if (!fWaitQueue.isEmpty()) {
- 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(ISystemOperationMonitor, 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();
- }
- }
- }
-
- /*
- * Method used to debug this mutex
- * uncomment it when needed
- *
- private void printLockMessage(int status, Thread myself)
- {
- if (status == LOCK_STATUS_AQUIRED)
- {
- System.out.println("Lock is AQUIRED by thread " + myself.getId());
- }
- else if (status == LOCK_STATUS_BORROWED)
- {
- System.out.println("Lock is BORROWED by thread " + myself.getId());
- }
- }
- */
-
-}
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 44385ed22..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/SystemSearchString.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [243495] [api] New: Allow file name search in Remote Search to not be case sensitive
- ********************************************************************************/
-
-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;
-
- /**
- * @since 3.1 for determining whether filename should be searched case-sensitive or not
- */
- protected boolean isFileNamesCaseSensitive;
- 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, true, isFileNamesRegex, includeArchives,
- includeSubfolders);
- }
-
- /**
- * 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 isFileNamesCaseSensitive <code>true</code> if the file name search should be case sensitive, <code>false</code> otherwise.
- * @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.
- * @since 3.1
- */
- public SystemSearchString(String textString, boolean isCaseSensitive, boolean isTextStringRegex,
- String fileNamesString, boolean isFileNamesCaseSensitive, boolean isFileNamesRegex, boolean includeArchives,
- boolean includeSubfolders) {
- this(textString, isCaseSensitive, isTextStringRegex, fileNamesString, isFileNamesCaseSensitive, 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, isCaseSensitive, isTextStringRegex, fileNamesString, true, isFileNamesRegex,
- includeArchives, includeSubfolders, classificationString);
- }
-
- /**
- * 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 isFileNamesCaseSensitive <code>true</code> if the file name search should be case sensitive, <code>false</code> otherwise.
- * @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.
- * @since 3.1
- */
- public SystemSearchString(String textString, boolean isCaseSensitive, boolean isTextStringRegex,
- String fileNamesString, boolean isFileNamesCaseSensitive, boolean isFileNamesRegex, boolean includeArchives,
- boolean includeSubfolders, String classificationString) {
- this.textString = textString;
- this.isCaseSensitive = isCaseSensitive;
- this.isTextStringRegex = isTextStringRegex;
- this.fileNamesString = fileNamesString;
- this.isFileNamesCaseSensitive = isFileNamesCaseSensitive;
- 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 search is case sensitive.
- * @return <code>true</code> if the file names search is case sensitive, <code>false</code> otherwise.
- * @since 3.1
- */
- public boolean isFileNamesCaseSensitive() {
- return isFileNamesCaseSensitive;
- }
-
- /**
- * 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 + " - " + isFileNamesCaseSensitive + " - " + 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 e368e3137..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/AbsoluteVirtualPath.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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 = ""; //$NON-NLS-1$
- _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 == "") //$NON-NLS-1$
- {
- 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); //$NON-NLS-1$
- }
-
- public String getPath()
- {
- String path = _absVirtualPath.substring(0, _absVirtualPath.lastIndexOf("/")); //$NON-NLS-1$
- return path;
- }
-
-}
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 226fdd7de..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ArchiveHandlerManager.java
+++ /dev/null
@@ -1,620 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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:
- * Xuan Chen (IBM) - [194293] [Local][Archives] Saving file second time in an Archive Errors
- * Xuan Chen (IBM) - [202949] [archives] copy a folder from one connection to an archive file in a different connection does not work
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [218491] ArchiveHandlerManager#cleanUpVirtualPath is messing up the file separators (with updated fix)
- * Johnson Ma (Wind River) - [195402] [api] add tar.gz archive support
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- *******************************************************************************/
-
-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;
-import java.util.Iterator;
-
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
-
-/**
- * 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#/"; //$NON-NLS-1$
- public static final String VIRTUAL_CANONICAL_SEPARATOR = "#virtual#"; //$NON-NLS-1$
- /**
- * Folder separator used in virtual paths inside the archive, i.e. after the
- * VIRTUAL_SEPARATOR.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final String VIRTUAL_FOLDER_SEPARATOR = "/"; //$NON-NLS-1$
- /**
- * Character used to separate file extension from file name. This is used in
- * order to recognize file patterns that should be treated as archives.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final String EXTENSION_SEPARATOR = "."; //$NON-NLS-1$
-
- // 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. Throws
- * SystemMessageException instead of IOException since RSE 3.0.
- *
- * @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 virtual children in the archive,
- * set virtual path to "" or null.
- * @return An array of VirtualChild objects representing the children of the
- * virtual object in <code>file</code> referred to by
- * <code>virtual path</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 SystemMessageException in case of an error, e.g. there was a
- * problem getting the registered handler for the file. This usually
- * means the archive is corrupted.
- * @since 3.0
- */
- public VirtualChild[] getContents(File file, String virtualpath) throws SystemMessageException
- {
- if (virtualpath == null) virtualpath = ""; //$NON-NLS-1$
- ISystemArchiveHandler handler = getRegisteredHandler(file);
- if (handler == null || !handler.exists()) {
- throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "No archive handler for " + file); //$NON-NLS-1$
- }
- return handler.getVirtualChildren(virtualpath, null);
- }
-
- /**
- * 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 virtual children in the archive,
- * set virtual path 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.
- * @throws SystemMessageException in case of an error
- * @since 3.0
- */
- public VirtualChild[] getFolderContents(File file, String virtualpath) throws SystemMessageException
- {
- if (virtualpath == null) virtualpath = ""; //$NON-NLS-1$
- ISystemArchiveHandler handler = getRegisteredHandler(file);
- if (handler == null) return null;
- return handler.getVirtualChildFolders(virtualpath, null);
- }
-
- /**
- * 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 (getRegisteredExtension(file)!=null)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- }
-
- /**
- * Tests whether a file is an known type of archive, based on the file name.
- * @param filename 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)
- {
- return getRegisteredExtension(filename) == null?false:true;
- }
-
- /**
- * Check if the file extension is registered archive type.
- * notice here, the getExtension method does't work for name like fool.tar.gz
- * @param file the file to check
- * @return registered extension or null
- * @since org.eclipse.rse.services 3.0
- */
- protected String getRegisteredExtension(File file)
- {
- String fileName = file.getName();
- return getRegisteredExtension(fileName);
- }
-
- /**
- * check if the file extension is registered archive type.
- * @param fileName the file name to check
- * @return registered extension or null
- * @since org.eclipse.rse.services 3.0
- */
- protected String getRegisteredExtension(String fileName)
- {
- fileName = fileName.toLowerCase();
- Iterator itor = _handlerTypes.keySet().iterator();
- while(itor.hasNext())
- {
- String ext = ((String)itor.next()).toLowerCase();
- if (fileName.endsWith(EXTENSION_SEPARATOR + ext))
- {
- return ext;
- }
-
- }
- return null;
- }
-
- /**
- * @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.
- * @deprecated Use {@link #getRegisteredExtension(File)} instead
- */
- protected String getExtension(File file)
- {
- String filename = file.getName();
- int i = filename.lastIndexOf("."); //$NON-NLS-1$
- if (i == -1) return ""; //$NON-NLS-1$
- 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.
- * * @deprecated Use {@link #getRegisteredExtension(String)} instead
- */
- protected String getExtension(String filename)
- {
- int i = filename.lastIndexOf("."); //$NON-NLS-1$
- if (i == -1) return ""; //$NON-NLS-1$
- 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.
- * @throws SystemMessageException in case of an error
- * @since 3.0
- */
- public VirtualChild getVirtualObject(String fullyQualifiedName) throws SystemMessageException
- {
- String cleanName = cleanUpVirtualPath(fullyQualifiedName);
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(cleanName);
- if (!avp.isVirtual()) return new VirtualChild("", new File(avp.getContainingArchiveString())); //$NON-NLS-1$
- 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(), null);
- 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.
- *
- * @throws SystemMessageException in case of an error instantiating the
- * handler
- * @since 3.0
- */
- public ISystemArchiveHandler getRegisteredHandler(File file) throws SystemMessageException
- {
- 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 = getRegisteredExtension(file);
- if (ext == null)
- {
- 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();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Failed to instantiate handler for " + file.getName(), e); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Failed to instantiate handler for " + file.getName(), e); //$NON-NLS-1$
- }
- _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); //$NON-NLS-1$
- System.out.println(handlerType + " does not contain a constructor whose signature is 'Constructor(File file)'"); //$NON-NLS-1$
- 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); //$NON-NLS-1$
- System.out.println("Neither " + handlerType + ", nor any of its superclasses implements ISystemArchiveHandler."); //$NON-NLS-1$ //$NON-NLS-2$
- 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 an absolute path string to check
- * @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 does not contains VIRTUAL_CANONICAL_SEPARATOR
- //fullVirtualName could be the virtual path only, instead of the full path.
- //So even fullVirtualName does not contains VIRTUAL_CANONICAL_SEPARATOR, we may still
- //need to process it.
- //But virtual path should neither start with "\", nor contains
- //":". So for those two cases, we could just return the fullVirtualName
- if (fullVirtualName.indexOf(":") != -1 || fullVirtualName.trim().startsWith("\\")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- return fullVirtualName;
- }
- }
- String realPart = ""; //$NON-NLS-1$
- String newPath = fullVirtualName;
- if (j != -1)
- {
- try
- {
- realPart = fullVirtualName.substring(0, j) + VIRTUAL_SEPARATOR;
- if (j + VIRTUAL_SEPARATOR.length() < fullVirtualName.length())
- {
- newPath = fullVirtualName.substring(j + VIRTUAL_SEPARATOR.length());
- }
- else
- {
- //This is the special case where fullVirtualName ends with VIRTUAL_SEPARATOR
- newPath = ""; //$NON-NLS-1$
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- // use only forward slash separator
- newPath = newPath.replace('\\', '/');
-
- //get rid of any double slashes
- int i = newPath.indexOf("//"); //$NON-NLS-1$
- while (i != -1)
- {
- newPath = newPath.substring(0,i) + newPath.substring(i+1);
- i = newPath.indexOf("//"); //$NON-NLS-1$
- }
-
- // get rid of any leading or trailing slashes
- if (j != -1 && newPath.startsWith("/")) newPath = newPath.substring(1); //$NON-NLS-1$
- if (newPath.endsWith("/")) newPath = newPath.substring(0, newPath.length() - 1); //$NON-NLS-1$
- return realPart + newPath;
- }
-
- /**
- * Disposes of all registered handlers.
- */
- public void dispose()
- {
- _handlers.clear();
- }
-
- /**
- * Create an empty archive
- *
- * @throws SystemMessageException in case of an error
- * @since 3.0 returns void but throws SystemMessageException
- */
- public void createEmptyArchive(File newFile) throws SystemMessageException
- {
- if (!isRegisteredArchive(newFile.getName()))
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive, because " //$NON-NLS-1$
- + newFile + " is not a registered type of archive."); //$NON-NLS-1$
- }
-
- if (newFile.exists())
- {
- if (!newFile.isFile())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$
- + newFile + " is not a file."); //$NON-NLS-1$
- }
- if (!newFile.delete())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$
- + newFile + " could not be deleted."); //$NON-NLS-1$
- }
- }
-
- try
- {
- if (!newFile.createNewFile())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$
- + newFile + " could not be created."); //$NON-NLS-1$
- }
- }
- catch (IOException e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive: " + newFile, e); //$NON-NLS-1$
- }
-
- ISystemArchiveHandler handler = getRegisteredHandler(newFile);
- 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;
- }
-
- /**
- * Get archive comment.
- *
- * @throws SystemMessageException in case of an error
- * @since 3.0
- */
- public String getComment(File archive) throws SystemMessageException
- {
- ISystemArchiveHandler handler = getRegisteredHandler(archive);
- if (handler == null || !handler.exists()) return ""; //$NON-NLS-1$
- return handler.getArchiveComment();
- }
-
- /**
- * Get total expanded size of an archive.
- *
- * @throws SystemMessageException in case of an error
- * @since 3.0
- */
- public long getExpandedSize(File archive) throws SystemMessageException
- {
- ISystemArchiveHandler handler = getRegisteredHandler(archive);
- if (handler == null || !handler.exists()) return 0;
- VirtualChild[] allEntries = handler.getVirtualChildrenList(null);
- 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.
- * @throws SystemMessageException in case of an error
- */
- public String getClassification(File file, String virtualPath) throws SystemMessageException {
-
- // 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);
- }
-}
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 ce4cf4f81..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/ISystemArchiveHandler.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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:
- * Xuan Chen (IBM) - [160775][api][breaking] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [cleanup] add API "since" tags to Archive Handler Javadoc
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-
-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.ISystemOperationMonitor;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-
-
-/**
- * An interface that allows implementing classes to create their own handlers
- * for various types of archive files, ie: zip, jar, tar, rpm.
- *
- * @author mjberger
- */
-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).
- *
- * @throws SystemMessageException in case of an error
- * @since org.eclipse.rse.services 3.0
- */
- public void create() throws SystemMessageException;
-
- /**
- * Return a flat list of entries in an archive.
- *
- * @param archiveOperationMonitor the operation progress monitor
- * @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.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- *
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild[] getVirtualChildrenList(ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Return a flat list of entries in an archive, whose full paths begin with
- * the given parent prefix.
- *
- * @param parent full path of the parent
- * @param archiveOperationMonitor the operation progress monitor
- * @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.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- *
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild[] getVirtualChildrenList(String parent, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Return the children of a specified node in an archive.
- *
- * @param fullVirtualName full virtual path of the parent
- * @param archiveOperationMonitor the operation progress monitor
- * @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.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- *
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild[] getVirtualChildren(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Return those children of a specified node in an archive, which are
- * folders.
- *
- * @param fullVirtualName full virtual path of the parent
- * @param archiveOperationMonitor the operation progress monitor
- * @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.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- *
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild[] getVirtualChildFolders(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Return an archive node specified by a given virtual path.
- *
- * @param fullVirtualName full virtual path of the object to retrieve
- * @param archiveOperationMonitor the operation progress monitor
- * @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.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- *
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild getVirtualFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Check whether a given virtual node exists in an archive.
- *
- * @param fullVirtualName full virtual path of the object
- * @param archiveOperationMonitor the operation progress monitor
- * @return Whether or not the virtual file or folder named
- * <code>fullVirtualName</code> exists in the archive (physically).
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- *
- * @since org.eclipse.rse.services 3.0
- */
- public boolean exists(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Check if the archive handler implementation associated with this class
- * exists.
- *
- * @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.
- *
- * @return the archive that this handler deals with
- */
- public File getArchive();
-
- /**
- * Return the timestamp for an archive node.
- *
- * @param fullVirtualName virtual path specifying the node to check
- * @return the current timestamp (last modified) for the archive entry named
- * <code>fullVirtualName</code>
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- */
- public long getTimeStampFor(String fullVirtualName) throws SystemMessageException;
-
- /**
- * Return the size for an archive node.
- *
- * @param fullVirtualName virtual path specifying the node to check
- * @return the current size (uncompressed) for the entry in the archive
- * named <code>fullVirtualName</code>
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- */
- public long getSizeFor(String fullVirtualName) throws SystemMessageException;
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, File destination, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException;
-
- /**
- * 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
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, File destination, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param file the file to be added to the archive
- * @param virtualPath the destination of the file
- * @param name the name of the result virtual file
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File file, String virtualPath, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param file the file to be added to the archive
- * @param virtualPath the destination of the file
- * @param name the name of the result virtual file
- * @param sourceEncoding the encoding of the source file
- * @param targetEncoding the encoding of the result file
- * @param isText is the file a text file
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param stream the InputStream to be added as an entry to the archive
- * @param virtualPath the destination of the stream
- * @param name the name of the result virtual file
- * @param sourceEncoding the encoding of the source stream
- * @param targetEncoding the encoding of the result file
- * @param isText is the file a text file
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param file the file to be added to the archive
- * @param virtualPath the destination of the file
- * @param name the name of the result virtual file
- * @param sourceEncoding the encoding of the source file
- * @param targetEncoding the encoding of the result file
- * @param typeRegistery file transfer mode (binary or text) of this file
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param files the list of files to be added to the archive
- * @param virtualPath the destination of the file
- * @param names the names of the result virtual files
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File[] files, String virtualPath, String[] names, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param files the list of files to be added to the archive
- * @param virtualPath the destination of the files
- * @param names the names of the result virtual files
- * @param sourceEncodings the encoding of the source files
- * @param targetEncodings the encoding of the result files
- * @param isText file transfer mode (binary or text) of the files
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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>.
- *
- * @param fullVirtualName the path of the file to be replaced
- * @param file the file to be added to the archive
- * @param name the name of the file
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void replace(String fullVirtualName, File file, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- *
- * @param fullVirtualName the path of the file to be replaced
- * @param stream the InputStream to be added as an entry to the archive
- * @param name the name of the result virtual file
- * @param sourceEncoding the encoding of the source stream
- * @param targetEncoding the encoding of the result file
- * @param isText is the file a text file
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Deletes the entry <code>fullVirtualName</code> from the archive, and
- * returns whether or not the deletion was successful.
- *
- * @param fullVirtualName the path of the file to be deleted
- * @param archiveOperationMonitor the operation progress monitor
- * @return <code>true</code> if the deletion is successful,
- * <code>false</code> if the file to delete was not found so this was a
- * successful no-op.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public boolean delete(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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 successful.
- *
- * @param fullVirtualName the path of the file to be renamed
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void rename(String fullVirtualName, String newName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Moves the entry <code>fullVirtualName</code> to the location specified by
- * <code>destinationVirtualPath</code>, while leaving the entry with the
- * same name as before.
- *
- * @param fullVirtualName the path of the file to be renamed
- * @param destinationVirtualPath the destination of the file to move to
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void move(String fullVirtualName, String destinationVirtualPath, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Replaces the full name and path of the entry <code>fullVirtualName</code>
- * with the new full name and path <code>newFullVirtualName</code>.
- *
- * @param fullVirtualName the path of the file to be renamed
- * @param newFullVirtualName the full path of the virtual file name
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void fullRename(String fullVirtualName, String newFullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Extracts and returns the specified list of virtual files from the
- * archive.
- *
- * @param fullNames The list of files to return
- * @param archiveOperationMonitor the operation progress monitor
- * @return An array of handles to the extracted files. If fullNames has
- * length 0 then this method returns an array of length 0.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public File[] getFiles(String[] fullNames, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void createFolder(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public void createFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException;
-
- /**
- * Get the archive-type specific standard name for the VirtualChild
- * <code>vc</code>. For example, for Zip archives, if vc is a directory,
- * then the standard name must end with a "/".
- *
- * @param vc the archive node to use
- * @return the standard name for the node
- */
- public String getStandardName(VirtualChild vc);
-
- /**
- * Search 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @return an array of match objects corresponding to lines where matches
- * were found. Returns an empty array if there are no results.
- * @throws SystemMessageException in case of an error,
- * or SystemOperationCancelledException in case of user cancellation
- * @since org.eclipse.rse.services 3.0
- */
- public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException;
-
- /**
- * Get 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
- * @throws SystemMessageException in case of an error
- */
- public String getCommentFor(String fullVirtualName) throws SystemMessageException;
-
- /**
- * Get 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).
- * @throws SystemMessageException in case of an error
- */
- public long getCompressedSizeFor(String fullVirtualName) throws SystemMessageException;
-
- /**
- * Get 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.
- * @throws SystemMessageException in case of an error
- */
- public String getCompressionMethodFor(String fullVirtualName) throws SystemMessageException;
-
- /**
- * Get the comment associated with an archive.
- *
- * @return The comment associated with this archive, or "" if there is none.
- * @throws SystemMessageException in case of an error
- */
- public String getArchiveComment() throws SystemMessageException;
-
- /**
- * Get the classification for the entry with the given path.
- *
- * @param fullVirtualName the virtual name.
- * @return the classification.
- * @throws SystemMessageException in case of an error
- */
- public String getClassification(String fullVirtualName) throws SystemMessageException;
-}
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 ac25cd360..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTarHandler.java
+++ /dev/null
@@ -1,2741 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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:
- * Xuan Chen (IBM) - [194293] [Local][Archives] Saving file second time in an Archive Errors
- * Xuan Chen (IBM) - [199132] [Archives-TAR][Local-Windows] Can't open files in tar archives
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
- * Xuan Chen (IBM) - [209825] Update SystemTarHandler so that archive operations could be cancelable.
- * Xuan Chen (IBM) - [211551] NPE when moving multiple folders from one tar file to another tar file
- * Xuan Chen (IBM) - [211653] Copy virtual directory with nested directory of tar file did not work
- * Xuan Chen (IBM) - [214251] [archive] "Last Modified Time" changed for all virtual files/folders if rename/paste/delete of one virtual file.
- * Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when cancelling copy
- * Xuan Chen (IBM) - [api] SystemTarHandler has inconsistent API
- * Johnson Ma (Wind River) - [195402][api] Add tar.gz archive support
- * Xuan Chen (IBM) - [224576] [api] Inconsistent boolean return values in SystemTarHandler API
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-
-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.FileNotFoundException;
-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.List;
-import java.util.Vector;
-
-import org.eclipse.rse.internal.services.clientserver.archiveutils.ITarConstants;
-import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemArchiveUtil;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.ISystemOperationMonitor;
-import org.eclipse.rse.services.clientserver.SystemReentrantMutex;
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-import org.eclipse.rse.services.clientserver.messages.SystemLockTimeoutException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatchLocator;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-
-
-/**
- * This class deals with tar files.
- */
-public class SystemTarHandler implements ISystemArchiveHandler {
-
- protected File file;
- protected long modTimeDuringCache;
- protected VirtualFileSystem vfs;
- /** @since 3.0 */
- protected SystemReentrantMutex _mutex;
-
- /**
- * 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("/"); //$NON-NLS-1$
- String name = path;
-
- String segPath = ""; //$NON-NLS-1$
-
- // 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 + "/"; //$NON-NLS-1$
-
- 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("/"); //$NON-NLS-1$
- }
-
- 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 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 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("")) { //$NON-NLS-1$
- 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 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();
- _mutex = new SystemReentrantMutex();
- }
-
- /**
- * Initializes the handler from the given file and does caching.
- * @param file the file to handle
- * @throws IOException in case of error during initialization
- * (can be thrown by overriding methods)
- */
- 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);
- }
- }
-
- /**
- * Update the virtual file system tree. If newOldName HashMap is input, use
- * the old name in the HashMap to do the search in virtual file system tree.
- *
- * @since 3.0
- */
- protected void updateTree(HashMap newOldNames)
- {
- TarFile tarFile = getTarFile();
- Enumeration entries = tarFile.entries();
- while (entries.hasMoreElements())
- {
- TarEntry entry = (TarEntry)entries.nextElement();
- String searchName = null;
- String entryName = entry.getName();
- VirtualChild child = null;
- if (newOldNames != null && newOldNames.containsKey(entryName))
- {
- searchName = (String)newOldNames.get(entryName); //use its old name
- }
- else
- {
- searchName = entryName;
- }
-
- child = vfs.getEntry(searchName);
-
- if (null == child)
- {
- child = getVirtualChild(entry);
- }
- else
- {
- vfs.removeEntry(searchName);
- child = updateVirtualChild(entry, child);
- }
-
- 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.
- * @since 3.0 TarFile moved to API
- */
- 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);
- updateTree(null);
- modTimeDuringCache = newFile.lastModified();
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildrenList(ISystemOperationMonitor archiveOperationMonitor) {
-
- // 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildrenList(String parent, ISystemOperationMonitor archiveOperationMonitor) {
- 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)
- String entryName = entry.getName();
- String parentNameEndWithSlash = parent + "/"; //$NON-NLS-1$
- if (entryName.startsWith(parentNameEndWithSlash) && !entryName.equals(parentNameEndWithSlash)) {
- VirtualChild child = new VirtualChild(this, entryName);
- 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildren(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return new VirtualChild[0];
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- return vfs.getChildren(fullVirtualName);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildFolders(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
-
- try {
- updateCache();
- }
- catch (IOException e) {
- // TODO: log error
- return new VirtualChild[0];
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- return vfs.getChildrenFolders(fullVirtualName);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild getVirtualFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- if (fullVirtualName == null || fullVirtualName.equals("")) { //$NON-NLS-1$
- 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public boolean exists(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) {
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- if (fullVirtualName == null || fullVirtualName.equals("")) { //$NON-NLS-1$
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @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();
- }
- }
-
- /*
- * (non-Javadoc)
- * @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;
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- TarEntry entry = null;
-
- InputStream inStream = null;
- OutputStream outStream = null;
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- entry = getTarFile().getEntry(fullVirtualName);
- updateCache();
-
- // 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;
- }
-
- inStream = getTarFile().getInputStream(entry);
-
- if (inStream == null) {
- destination.setLastModified(entry.getModificationTime());
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
- //Need to make sure destination file exists.
- if (!destination.exists())
- {
- File parentFile = destination.getParentFile();
- if (!parentFile.exists())
- parentFile.mkdirs();
- destination.createNewFile();
- }
-
- 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) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally {
-
- try {
-
- if (outStream != null) {
- outStream.close();
- }
-
- if (inStream != null) {
- inStream.close();
- }
-
-
- // finished creating and writing to the file, so now set the last modified time
- // to the entry's last modified time
- if (entry != null)
- {
- destination.setLastModified(entry.getModificationTime());
- }
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- releaseMutex(mutexLockStatus);
-
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String fullVirtualName, File destinationParent, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException {
- extractVirtualDirectory(fullVirtualName, destinationParent, (File) null, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String fullVirtualName, File destinationParent, File destination, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException {
-
- // if the destination directory doesn't exist, create it
- if (!destinationParent.exists()) {
-
- if (!destinationParent.mkdirs()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Create folder " + destinationParent); //$NON-NLS-1$
- }
- }
- // otherwise if the destination directory does exist, but is not a directory, then quit
- else if (!destinationParent.isDirectory()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "No folder: " + destinationParent); //$NON-NLS-1$
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
-
- updateCache();
-
- VirtualChild dir = vfs.getEntry(fullVirtualName);
-
- if (dir == null || !dir.isDirectory) {
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
-
- if (destination == null) {
-
- if (fullVirtualName.equals("")) { //$NON-NLS-1$
- 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()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Create folder " + topDir); //$NON-NLS-1$
- }
- else {
- extractVirtualFile(fullVirtualName, topDir, archiveOperationMonitor);
- }
-
- // 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;
- if (!tempChild.isDirectory)
- {
- 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, archiveOperationMonitor);
- }
- // otherwise if the child is a file, simply extract it
- else {
- extractVirtualFile(tempChild.fullName, childFile, archiveOperationMonitor);
- }
- }
- }
- }
- catch (IOException e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File file, String virtualPath, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- if (!file.isDirectory()) {
-
- // if it exists, call replace
- String fullVirtualName = getFullVirtualName(virtualPath, name);
- if (exists(fullVirtualName, archiveOperationMonitor)) {
- replace(fullVirtualName, file, name, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return;
- }
- else {
- File[] files = new File[1];
- files[0] = file;
- String[] names = new String[1];
- names[0] = name;
- add(files, virtualPath, names, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return;
- }
- }
- 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("/")) { //$NON-NLS-1$
- newNames[i] = newNames[i] + "/"; //$NON-NLS-1$
- }
- }
-
- sources[numOfChildren] = file;
- newNames[numOfChildren] = name;
-
- if (!newNames[numOfChildren].endsWith("/")) { //$NON-NLS-1$
- newNames[numOfChildren] = newNames[numOfChildren] + "/"; //$NON-NLS-1$
- }
-
- add(sources, virtualPath, newNames, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return;
- }
- }
- }
- catch (Exception e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
-
- /**
- * Helper method. Populates given List <code>found</code> with a collapsed
- * list of all nodes in the subtree of the file system rooted at
- * <code>parent</code>.
- *
- * @since 3.0 Vector changed into List
- */
- public void listAllFiles(File parent, List 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]);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File[] files, String virtualPath, String[] names, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- File outputTempFile = null;
- TarOutputStream outStream = null;
-
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
-
- updateCache();
-
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- int numFiles = files.length;
-
- for (int i = 0; i < numFiles; i++) {
-
- if (!files[i].exists() || !files[i].canRead()) {
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read: " + files[i]); //$NON-NLS-1$
- }
-
- // 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
- String fullVirtualName = getFullVirtualName(virtualPath, names[i]);
- if (exists(fullVirtualName, archiveOperationMonitor)) {
-
- replace(fullVirtualName, files[i], names[i], archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return;
- }
- }
-
- // open a new temp file which will be our destination for the new tar file
- outputTempFile = new File(file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- outStream = getTarOutputStream(outputTempFile);
-
- // get all the entries in the current tar
- VirtualChild[] children = getVirtualChildrenList(archiveOperationMonitor);
-
- // if it is an empty temp file, no need to recreate it
- if (children.length != 0) {
- boolean ok = createTar(children, outStream, (HashSet)null, archiveOperationMonitor);
- if (!ok)
- {
- //cancelled
- outStream.close();
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationCancelledException();
- }
- }
- VirtualChild[] newEntriesAdded = new VirtualChild[numFiles];
- // for each new file to add
- for (int i = 0; i < numFiles; i++) {
-
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- outStream.close();
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationCancelledException();
- }
- String childVirtualPath = virtualPath + "/" + names[i]; //$NON-NLS-1$
-
- 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);
- newEntriesAdded[i] = 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(outputTempFile, false);
-
- //Also need to add the new entries into VFS
- for (int i = 0; i < numFiles; i++)
- {
- vfs.addEntry(newEntriesAdded[i]);
- }
- }
-
- }
- catch (IOException e) {
- // close output stream
- if (outStream != null)
- {
- try
- {
- outStream.close();
- }
- catch (Exception exp)
- {
- exp.printStackTrace();
- }
- }
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @return <code>true</code> if the operation completes successfully, or
- * <code>false</code> if it has been cancelled.
- * @throws IOException if an I/O exception occurs.
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean createTar(VirtualChild[] children, TarOutputStream outStream, HashSet omitChildren, ISystemOperationMonitor archiveOperationMonitor) 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 true;
- }
-
- TarFile tarFile = getTarFile();
-
- // go through each child
- for (int i = 0; i < children.length; i++) {
-
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- return false;
- }
- // 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 + "/"); //$NON-NLS-1$
-
- // 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();
- }
- }
- return true;
- }
-
- /**
- * 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.
- * @since 3.0 TarEntry moved into API
- */
- 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 virtualPath the virtual path for the entry.
- * @return the tar entry representing the given file.
- * @since 3.0 TarEntry moved into API
- */
- protected TarEntry createTarEntry(File file, String virtualPath) {
-
- String fullName = virtualPath;
-
- // if directory, end with a '/'
- if (file.isDirectory()) {
-
- if (!fullName.endsWith("/")) { //$NON-NLS-1$
- fullName = fullName + "/"; //$NON-NLS-1$
- }
- }
-
- // strip out leading '/'
- // TODO (KM): Why?
- if (fullName.startsWith("/")) { //$NON-NLS-1$
- 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"); //$NON-NLS-1$
-
- 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
-
- // create a file permission to check execute
- FilePermission permission = new FilePermission(file.getAbsolutePath(), "execute"); //$NON-NLS-1$
-
- // this call will throw a SecurityException if permission does not exist
- sm.checkPermission(permission);
- canExecute = true;
-
- }
- 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.
- * @since 3.0 TarEntry moved into API
- */
- 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("/")) { //$NON-NLS-1$
- fullName = fullName + "/"; //$NON-NLS-1$
- }
- }
-
- // strip out leading '/'
- // TODO (KM): Why?
- if (fullName.startsWith("/")) { //$NON-NLS-1$
- 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.
- * @since 3.0 TarEntry moved into API
- */
- protected VirtualChild getVirtualChild(TarEntry entry) {
- VirtualChild child = new VirtualChild(this, entry.getName());
- child.isDirectory = entry.isDirectory();
- child.setComment(""); //$NON-NLS-1$
- child.setCompressedSize(entry.getSize());
- child.setCompressionMethod(""); //$NON-NLS-1$;
- child.setSize(entry.getSize());
- child.setTimeStamp(entry.getModificationTime());
- return child;
- }
-
- /**
- * update a virtual child given a tar entry.
- *
- * @param entry a tar entry.
- * @return the virtual child that represents the tar entry.
- * @since 3.0 TarEntry moved into API
- */
- protected VirtualChild updateVirtualChild(TarEntry entry, VirtualChild child) {
- child.renameTo(entry.getName());
- child.isDirectory = entry.isDirectory();
- child.setComment(""); //$NON-NLS-1$
- child.setCompressedSize(entry.getSize());
- child.setCompressionMethod(""); //$NON-NLS-1$;
- child.setSize(entry.getSize());
- child.setTimeStamp(entry.getModificationTime());
- 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"); //$NON-NLS-1$
-
- // 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();
- }
-
-
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void replace(String fullVirtualName, File file, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
-
- // update our cache before accessing cache
- try {
- updateCache();
- }
- catch (IOException e) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
-
- if (!file.exists() && !file.canRead()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read " + file); //$NON-NLS-1$
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // if the virtual file does not exist, we actually want to add
- if (!exists(fullVirtualName, archiveOperationMonitor)) {
- add(file, fullVirtualName, name, archiveOperationMonitor);
- return;
- }
-
- try {
-
- // open a new temp file which will be our destination for the new tar file
- File outputTempFile = new File(getArchive().getAbsolutePath() + "temp"); //$NON-NLS-1$
-
- TarOutputStream outStream = getTarOutputStream(outputTempFile);
-
- // get all the entries
- VirtualChild[] children = getVirtualChildrenList(archiveOperationMonitor);
-
- // create a set of omissions
- HashSet omissions = new HashSet();
-
- // add the virtual file to be replaced
- omissions.add(fullVirtualName);
-
- boolean ok = createTar(children, outStream, omissions, archiveOperationMonitor);
- if (!ok)
- {
- outStream.close();
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationCancelledException();
- }
-
- // now append the new file to the tar
- String parentVirtualPath = null;
-
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
-
- // if the virtual name has no '/', then we will replace it with the
- // new name
- if (i == -1) {
- parentVirtualPath = ""; //$NON-NLS-1$
- }
- // otherwise, we get the parent path to which the new name will be appended
- else {
- parentVirtualPath = fullVirtualName.substring(0, i);
- }
-
- String virtualPath = parentVirtualPath + "/" + name; //$NON-NLS-1$
-
- // 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 = updateVirtualChild(entry, vfs.getEntry(fullVirtualName));
- //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(outputTempFile, false);
- }
- catch (IOException e) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public boolean delete(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- boolean returnCode = doDelete(fullVirtualName, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return returnCode;
- }
-
-
- /**
- * Delete a virtual object.
- *
- * @param fullVirtualName virtual path identifying the object
- * @param archiveOperationMonitor the operation progress monitor
- * @return <code>true</code> if successful, <code>false</code> if the entry
- * to delete did not exist (so this was a successful no-op).
- * @throws SystemMessageException in case of an error
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean doDelete(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
-
- File outputTempFile = null;
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- updateCache();
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- VirtualChild child = getVirtualFile(fullVirtualName, archiveOperationMonitor);
- 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, archiveOperationMonitor);
- }
-
- // open a new temp file which will be our destination for the new tar file
- outputTempFile = new File(file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- TarOutputStream outStream = getTarOutputStream(outputTempFile);
-
- // get all the entries in the current tar
- VirtualChild[] children = getVirtualChildrenList(archiveOperationMonitor);
-
- // 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);
- }
-
- boolean ok = createTar(children, outStream, omissions, archiveOperationMonitor);
- if (!ok)
- {
- outStream.close();
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationCancelledException();
- }
-
- // 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(outputTempFile, false);
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException e) {
- if (!(outputTempFile == null)) outputTempFile.delete();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not delete " + fullVirtualName, e); //$NON-NLS-1$
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void rename(String fullVirtualName, String newName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
-
- // if the original does not have any separator, simply rename it.
- if (i == -1)
- {
- fullRename(fullVirtualName, newName, archiveOperationMonitor);
- }
- // otherwise, get the parent path and append the new name to it.
- else
- {
- String fullNewName = fullVirtualName.substring(0, i+1) + newName;
- fullRename(fullVirtualName, fullNewName, archiveOperationMonitor);
- }
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void move(String fullVirtualName, String destinationVirtualPath, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- destinationVirtualPath = ArchiveHandlerManager.cleanUpVirtualPath(destinationVirtualPath);
-
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
-
- // if the original does not have any separator, simply append it to the destination path.
- if (i == -1) {
- fullRename(fullVirtualName, destinationVirtualPath + "/" + fullVirtualName, archiveOperationMonitor); //$NON-NLS-1$
- }
- // otherwise, get the last segment (the name) and append that to the destination path.
- else {
- String name = fullVirtualName.substring(i);
- fullRename(fullVirtualName, destinationVirtualPath + name, archiveOperationMonitor);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void fullRename(String fullVirtualName, String newFullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- File outputTempFile = null;
- // update our cache before accessing cache
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- newFullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(newFullVirtualName);
- VirtualChild child = getVirtualFile(fullVirtualName, archiveOperationMonitor);
-
- // if the virtual file to be renamed does not exist, then quit
- if (!child.exists()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Not exists: " + child); //$NON-NLS-1$
- }
-
- // open a new temp file which will be our destination for the new tar file
- outputTempFile = new File(file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- TarOutputStream outStream = getTarOutputStream(outputTempFile);
-
- // get all the entries
- VirtualChild[] children = getVirtualChildrenList(archiveOperationMonitor);
-
- // the rename list
- // a hashmap containing old name, new name associations for each
- // child that has to be renamed
- HashMap oldNewNames = new HashMap();
- // a hashmap containing new name, old name associations for each
- // child that has to be renamed
- HashMap newOldNames = 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
- oldNewNames.put(fullVirtualName + "/", newFullVirtualName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
- newOldNames.put(newFullVirtualName + "/", fullVirtualName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // get all the children of the entry to be renamed
- VirtualChild[] childrenArray = getVirtualChildrenList(fullVirtualName, archiveOperationMonitor);
-
- // 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) {
- oldNewNames.put(childrenArray[i].fullName + "/", newName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
- newOldNames.put(newName + "/", childrenArray[i].fullName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- oldNewNames.put(childrenArray[i].fullName, newName);
- newOldNames.put(newName, childrenArray[i].fullName);
- }
- }
- }
- // otherwise entry is not a directory, so simply add it to the rename list
- else {
- oldNewNames.put(fullVirtualName, newFullVirtualName);
- newOldNames.put(newFullVirtualName, fullVirtualName);
- }
-
- // create tar with renamed entries
- boolean ok = createTar(children, outStream, oldNewNames, archiveOperationMonitor);
- if (!ok)
- {
- outStream.close();
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationCancelledException();
- }
-
-
- // 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(outputTempFile, true);
- updateTree(newOldNames);
- }
- else
- {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException e) {
- if (!(outputTempFile == null)) outputTempFile.delete();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not rename " + fullVirtualName, e); //$NON-NLS-1$
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- }
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @return <code>true</code> if the operation completes successfully, or
- * <code>false</code> if it is cancelled by the user.
- * @throws IOException if an I/O exception occurs.
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean createTar(VirtualChild[] children, TarOutputStream outStream, HashMap renameMap, ISystemOperationMonitor archiveOperationMonitor) throws IOException {
-
- TarFile tarFile = getTarFile();
-
- // go through each child
- for (int i = 0; i < children.length; i++) {
-
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- return false;
- }
-
- 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();
- }
- }
-
- return true;
- }
-
- /**
- * 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.
- * @since 3.0 TarEntry moved into API
- */
- protected TarEntry changeTarEntryName(TarEntry entry, String newName) {
-
- // change entry path
- entry.setName(newName);
-
- // calculate checksum
- entry.calculateChecksum();
-
- return entry;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public File[] getFiles(String[] fullNames, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
-
- 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("/"); //$NON-NLS-1$
-
- if (j == -1) {
- name = fullName;
- }
- else {
- name = fullName.substring(j+1);
- }
-
- try {
- files[i] = File.createTempFile(name, "virtual"); //$NON-NLS-1$
- files[i].deleteOnExit();
- extractVirtualFile(fullNames[i], files[i], archiveOperationMonitor);
- }
- catch (IOException e) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- }
-
- return files;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void createFolder(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- fullVirtualName = fullVirtualName + "/"; //$NON-NLS-1$
- try {
- createVirtualObject(fullVirtualName, archiveOperationMonitor);
- } finally {
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void createFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- try {
- createVirtualObject(fullVirtualName, archiveOperationMonitor);
- } finally {
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- }
-
- /**
- * 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.
- * @param archiveOperationMonitor the operation progress monitor
- * @return <code>true</code> if the object was created successfully,
- * <code>false</code> if the object already exists such that this is a
- * successful no-op, or if the operation is cancelled by the user.
- * @throws SystemMessageException in case of an error.
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean createVirtualObject(String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
-
- File outputTempFile = null;
- TarOutputStream outStream = null;
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- updateCache();
-
- // if the object already exists, return false
- if (exists(name, archiveOperationMonitor)) {
- return false;
- }
-
- // open a new temp file which will be our destination for the new tar file
- outputTempFile = new File(file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- outStream = getTarOutputStream(outputTempFile);
-
- // get all the entries
- VirtualChild[] children = getVirtualChildrenList(archiveOperationMonitor);
-
- // if it is an empty temp file, no need to recreate it
- if (children.length != 0) {
- boolean ok = createTar(children, outStream, (HashSet)null, archiveOperationMonitor);
- if (!ok)
- {
- outStream.close();
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationCancelledException();
- }
- }
-
- // 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(outputTempFile, false);
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException e) {
- // close output stream
- if (outStream != null)
- {
- try
- {
- outStream.close();
- }
- catch (Exception exp)
- {
- exp.printStackTrace();
- }
- }
- if (outputTempFile != null)
- {
- outputTempFile.delete();
- }
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- return true;
- }
-
- /**
- * 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.
- * @since 3.0 TarEntry moved into API
- */
- 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"); //$NON-NLS-1$
-
- 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
-
- // create a file permission to check execute
- FilePermission permission = new FilePermission(file.getAbsolutePath(), "execute"); //$NON-NLS-1$
-
- // this call will throw a SecurityException if permission does not exist
- sm.checkPermission(permission);
- canExecute = true;
-
- }
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @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 + "/"; //$NON-NLS-1$
- }
-
- return vc.fullName;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void create() throws SystemMessageException {
-
- try {
-
- // create output stream
- TarOutputStream outStream = getTarOutputStream(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) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException {
- // 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, archiveOperationMonitor);
-
- if (!vc.exists() || vc.isDirectory) {
- return new SystemSearchLineMatch[0];
- }
-
- TarFile tarFile = getTarFile();
- TarEntry entry = tarFile.getEntry(fullVirtualName);
- InputStream is = null;
-
- try {
- is = 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) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#exists()
- */
- 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-NLS-1$
- }
-
- /* (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-NLS-1$
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getArchiveComment()
- */
- public String getArchiveComment()
- {
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Compresses the file <code>file</code> and adds it to the archive, saving
- * it in the encoding specified by <code>encoding</code> if saving in text
- * mode. Places the file 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.
- *
- * @param file the file to be added to the archive
- * @param virtualPath the destination of the file
- * @param name the name of the result virtual file
- * @param encoding the file encoding to use
- * @param registry the file type to use (text or binary)
- * @param archiveOperationMonitor the operation progress monitor
- * @throws SystemMessageException in case of an error
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File file, String virtualPath, String name, String encoding, ISystemFileTypes registry, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException {
- add(file, virtualPath, name, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File file, String virtualPath, String name,
- String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- add(file, virtualPath, name, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File[] files, String virtualPath, String[] names,
- String[] sourceEncodings, String[] targetEncodings, boolean[] isTexts,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- add(files, virtualPath, names, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent,
- File destination, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- extractVirtualDirectory(dir, destinationParent, destination, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- extractVirtualDirectory(dir, destinationParent, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- extractVirtualFile(fullVirtualName, destination, archiveOperationMonitor);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getClassification(java.lang.String)
- */
- public String getClassification(String fullVirtualName) throws SystemMessageException {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- // if it's not a class file, we do not classify it
- if (!fullVirtualName.endsWith(".class")) { //$NON-NLS-1$
- 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 && parser != null) {
- 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "add"); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- add(file, virtualPath, name, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
- throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "replace"); //$NON-NLS-1$
- }
-
- /**
- * Construct the full virtual name of a virtual file from its virtual path and name.
- * @param virtualPath the virtual path of this virtual file
- * @param name the name of this virtual file
- * @return the full virtual name of this virtual file
- */
- private static String getFullVirtualName(String virtualPath, String name)
- {
- String fullVirtualName = null;
- if (virtualPath == null || virtualPath.length() == 0)
- {
- fullVirtualName = name;
- }
- else
- {
- fullVirtualName = virtualPath + "/" + name; //$NON-NLS-1$
- }
- return fullVirtualName;
- }
-
- private void releaseMutex(int mutexLockStatus)
- {
- //We only release the mutex if we aquired it, not borrowed it.
- if (SystemReentrantMutex.LOCK_STATUS_AQUIRED == mutexLockStatus)
- {
- _mutex.release();
- }
- }
-
- private void setArchiveOperationMonitorStatusDone(ISystemOperationMonitor archiveOperationMonitor)
- {
- //We only set the status of the archive operation montor to done if it is not been cancelled.
- if (null != archiveOperationMonitor && !archiveOperationMonitor.isCancelled())
- {
- archiveOperationMonitor.setDone(true);
- }
- }
-
- /**
- * Get the tar output stream for a given file. This method can be overridden
- * by subclass to return compressed output steam if needed.
- *
- * @param outputFile the output file to create stream
- * @return OutputStream the output stream to write
- * @throws FileNotFoundException when the output file doesn't exist
- * @since org.eclipse.rse.services 3.0
- */
- protected TarOutputStream getTarOutputStream(File outputFile) throws FileNotFoundException {
- TarOutputStream outStream = new TarOutputStream(new FileOutputStream(outputFile));
- return outStream;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTgzHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTgzHandler.java
deleted file mode 100644
index 6cce710c0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemTgzHandler.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Johnson Ma (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.zip.GZIPOutputStream;
-
-import org.eclipse.rse.internal.services.clientserver.archiveutils.TgzFile;
-
-/**
- * Handler class for .tar.gz and .tgz files.
- *
- * @since 3.0
- */
-public class SystemTgzHandler extends SystemTarHandler {
-
- /**
- * constructor for the tgz handler
- * @param file the .tar.gz or .tgz file
- */
- public SystemTgzHandler(File file) throws IOException {
- super(file);
- }
-
- /**
- * Gets a tar.gz 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 TgzFile(file);
- }
- catch (IOException e) {
- // TODO: log error
- }
-
- return tarFile;
- }
-
- protected TarOutputStream getTarOutputStream(File outputFile) throws FileNotFoundException {
- GZIPOutputStream zipOutputStream = null;
- try{
- zipOutputStream = new GZIPOutputStream(new FileOutputStream(outputFile));
- } catch (IOException ioe) {
- throw new FileNotFoundException(ioe.getMessage());
- }
- TarOutputStream outStream = new TarOutputStream(zipOutputStream);
- return outStream;
- }
-}
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 1adfcc8e9..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/SystemZipHandler.java
+++ /dev/null
@@ -1,2953 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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.
- * Xuan Chen (IBM) - [192741] [Archives] Move a folder from within an Archive doesn't work if > 1 level deep
- * Xuan Chen (IBM) - [194293] [Local][Archives] Saving file second time in an Archive Errors
- * Xuan Chen (IBM) - [181784] [Archives] zipped text files have unexpected contents
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
- * Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when canceling copy
- * Xuan Chen (IBM) - [214251] [archive] "Last Modified Time" changed for all virtual files/folders if rename/paste/delete of one virtual file.
- * Xuan Chen (IBM) - [214786] [regression][archive]rename a virtual directory does not work properly
- * Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when canceling copy
- * Martin Oberhuber (Wind River) - [cleanup] Add API "since" tags
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-
-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.internal.services.clientserver.archiveutils.SystemArchiveUtil;
-import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemUniversalZipEntry;
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.ISystemFileTypes;
-import org.eclipse.rse.services.clientserver.ISystemOperationMonitor;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.SystemReentrantMutex;
-import org.eclipse.rse.services.clientserver.java.BasicClassFileParser;
-import org.eclipse.rse.services.clientserver.messages.SystemLockTimeoutException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
-import org.eclipse.rse.services.clientserver.search.SystemSearchLineMatch;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatchLocator;
-import org.eclipse.rse.services.clientserver.search.SystemSearchStringMatcher;
-
-
-/**
- * Implements an ISystemArchiveHandler for ZIP files.
- * @author mjberger
- */
-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)
- /** @since org.eclipse.rse.services 3.0 */
- protected SystemReentrantMutex _mutex;
-
- /**
- * 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) throws IOException
- {
- _file = file;
- _vfsLastModified = _file.lastModified();
-
- //ignore error opening non-existing zipfile in constructor,
- //because we might want to be creating the zipfile
- boolean zipFileOpen = false;
- if (_file.exists()) {
- try {
- openZipFile();
- zipFileOpen = true;
- } catch (IOException e) {
- // ignore
- }
- }
- if (zipFileOpen)
- {
- buildTree();
- closeZipFile();
- _exists = true;
- }
- else
- {
- _exists = false;
- }
- _mutex = new SystemReentrantMutex();
- }
-
- /**
- * 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);
- }
- }
-
- /**
- * Update the virtual file system tree after rename operation.
- * @since org.eclipse.rse.services 3.0
- */
- protected void updateTreeAfterRename(HashMap newOldName, VirtualChild[] renameList)
- {
- Enumeration entries = _zipfile.entries();
- while (entries.hasMoreElements())
- {
- ZipEntry next = (ZipEntry) entries.nextElement();
- String oldName = null;
- if (newOldName.containsKey(next.getName()))
- {
- oldName = (String)newOldName.get(next.getName());
- }
- fillBranchAfterRename(next, oldName);
- }
-
- //also make sure all the directory affected by rename, we need to remove those hashmap from the
- //virtual file system.
- if (renameList == null)
- {
- return;
- }
- for (int i = 0; i < renameList.length; i++)
- {
- if (renameList[i].isDirectory)
- {
- String fullName = renameList[i].fullName;
- if (_virtualFS.containsKey(fullName))
- {
- _virtualFS.remove(fullName);
- }
- }
- }
-
- }
-
- /**
- * 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)
- {
- if (next.getName().equals("/")) return; // dummy entry //$NON-NLS-1$
- VirtualChild nextChild = null;
-
- //We need to search this entry in the virtual file system tree.
- //If oldName is passed in, we use the old name.
- //otherwise, we use the entry name.
- String pathNameToSearchInVFS = null;
- String nameToSearchInVFS = null;
-
- SystemUniversalZipEntry nextEntry = new SystemUniversalZipEntry(next);
-
-
- pathNameToSearchInVFS = nextEntry.getFullPath();
- nameToSearchInVFS = nextEntry.getName();
-
- //try to find the virtual child from the memory tree
- if (_virtualFS.containsKey(pathNameToSearchInVFS))
- {
- HashMap itsDirectory = (HashMap)_virtualFS.get(pathNameToSearchInVFS);
- if (itsDirectory.containsKey(nameToSearchInVFS))
- {
- nextChild = (VirtualChild)itsDirectory.get(nameToSearchInVFS);
- }
- }
-
- if (null == nextChild)
- {
- nextChild = new VirtualChild(this, nextEntry.getFullName());
- }
- else
- {
- //We found the virtual child, but its name could also been changed. So need to update it
- nextChild.renameTo(nextEntry.getFullName());
- }
-
- if (next.isDirectory())
- {
- nextChild.isDirectory = true;
-
- if (!_virtualFS.containsKey(nextChild.fullName))
- {
- _virtualFS.put(nextChild.fullName, new HashMap());
- }
- }
- //Now, update other properties
- nextChild.setComment(next.getComment());
- nextChild.setCompressedSize(next.getCompressedSize());
- Integer methodIntValue = new Integer(next.getMethod());
- nextChild.setCompressionMethod(methodIntValue.toString());
- nextChild.setSize(next.getSize());
- nextChild.setTimeStamp(next.getTime());
-
- // key has not been encountered before, create a new
- // element in the virtualFS.
- if (!_virtualFS.containsKey(nextChild.path))
- {
- //Do we really need to recursively create? yes for this case
- 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);
- }
- }
-
- /**
- * 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.
- * @since org.eclipse.rse.services 3.0
- */
- protected void fillBranchAfterRename(ZipEntry next, String oldName)
- {
- if (next.getName().equals("/")) return; // dummy entry //$NON-NLS-1$
- VirtualChild nextChild = null;
-
- //We need to search this entry in the virtual file system tree.
- //If oldName is passed in, we use the old name.
- //otherwise, we use the entry name.
- String pathNameToSearchInVFS = null;
- String nameToSearchInVFS = null;
- boolean replace = (oldName != null);
-
- SystemUniversalZipEntry nextEntry = new SystemUniversalZipEntry(next);
-
- if (null != oldName)
- {
- int endOfPathPosition = oldName.lastIndexOf("/"); //$NON-NLS-1$
- if (endOfPathPosition != -1)
- {
- if (endOfPathPosition == (oldName.length() - 1))
- {
- //It is a directory, then we need to use its parent fullname as the its path.
- String nameWithoutLastSlash = oldName.substring(0, endOfPathPosition);
- int endOfPathPosNameWithoutLastSlash = nameWithoutLastSlash.lastIndexOf("/"); //$NON-NLS-1$
- if (endOfPathPosNameWithoutLastSlash != -1)
- {
- //example for this case is:
- //fullpath folder1/folder12/
- //Int this case, pathNameToSearchInVFS should be "folder1", and nameToSearchInVFS should be "folder12"
- pathNameToSearchInVFS = oldName.substring(0, endOfPathPosNameWithoutLastSlash);
- nameToSearchInVFS = oldName.substring(endOfPathPosNameWithoutLastSlash + 1, endOfPathPosition);
- }
- else
- {
- //It is the case of something where its full path is "folder1/"
- //In this case, pathNameToSearchInVFS should be "", and nameToSearchInVFS should be "folder"
- pathNameToSearchInVFS = ""; //$NON-NLS-1$
- nameToSearchInVFS = oldName.substring(0, endOfPathPosition);
- }
- }
- else
- {
- pathNameToSearchInVFS = oldName.substring(0,endOfPathPosition);
- nameToSearchInVFS = oldName.substring(endOfPathPosition+1);
- }
- }
- else
- {
- pathNameToSearchInVFS = ""; //$NON-NLS-1$
- nameToSearchInVFS = oldName;
- }
- }
- else
- {
- pathNameToSearchInVFS = nextEntry.getFullPath();
- nameToSearchInVFS = nextEntry.getName();
- }
-
- //try to find the virtual child from the memory tree
- if (_virtualFS.containsKey(pathNameToSearchInVFS))
- {
- HashMap itsDirectory = (HashMap)_virtualFS.get(pathNameToSearchInVFS);
- if (itsDirectory.containsKey(nameToSearchInVFS))
- {
- nextChild = (VirtualChild)itsDirectory.get(nameToSearchInVFS);
- //We also need to remove this virtual child from VFS tree first, since we need to
- //put it back any way later.
- if (replace)
- {
- itsDirectory.remove(nameToSearchInVFS);
- }
- }
- /*
- if (nameToSearchInVFS.equals(""))
- {
- //It is the directory itself, remove the hashmap.
- _virtualFS.remove(pathNameToSearchInVFS);
- }
- */
- }
-
- if (null == nextChild)
- {
- nextChild = new VirtualChild(this, nextEntry.getFullName());
- }
- else
- {
- //We found the virtual child, but its name could also been changed. So need to update it
- nextChild.renameTo(nextEntry.getFullName());
- }
-
- if (next.isDirectory())
- {
- nextChild.isDirectory = true;
-
- if (!_virtualFS.containsKey(nextChild.fullName))
- {
- _virtualFS.put(nextChild.fullName, new HashMap());
- }
- }
- //Now, update other properties
- nextChild.setComment(next.getComment());
- nextChild.setCompressedSize(next.getCompressedSize());
- Integer methodIntValue = new Integer(next.getMethod());
- nextChild.setCompressionMethod(methodIntValue.toString());
- nextChild.setSize(next.getSize());
- nextChild.setTimeStamp(next.getTime());
-
- // key has not been encountered before, create a new
- // element in the virtualFS.
- if (!_virtualFS.containsKey(nextChild.path))
- {
- //Do we really need to recursively create? no in this case
- populate(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("")) //$NON-NLS-1$
- {
- return;
- }
- else
- {
- int i = key.lastIndexOf("/"); //$NON-NLS-1$
- if (i == -1) // recursive last step
- {
- VirtualChild nextValue = new VirtualChild(this, key);
- nextValue.isDirectory = true;
- recursivePopulate("", nextValue); //$NON-NLS-1$
- return;
- }
- else // recursive step
- {
- String newKey = key.substring(0, i);
- VirtualChild nextValue = new VirtualChild(this, key);
- nextValue.isDirectory = true;
- recursivePopulate(newKey, nextValue);
- return;
- }
-
- }
-
-
- }
-
- /**
- * @since org.eclipse.rse.services 3.0
- */
- protected void populate(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("")) //$NON-NLS-1$
- {
- return;
- }
- else
- {
- int i = key.lastIndexOf("/"); //$NON-NLS-1$
- if (i == -1) // recursive last step
- {
- VirtualChild nextValue = new VirtualChild(this, key);
- nextValue.isDirectory = true;
- recursivePopulate("", nextValue); //$NON-NLS-1$
- return;
- }
- else // recursive step
- {
- String newKey = key.substring(0, i);
- VirtualChild nextValue = new VirtualChild(this, key);
- nextValue.isDirectory = true;
- recursivePopulate(newKey, nextValue);
- return;
- }
-
- }
-
-
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildrenList(ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- return getVirtualChildrenList(true, archiveOperationMonitor);
- }
-
- /**
- * Same as getVirtualChildrenList(), but you can choose whether to leave the
- * zip file open or closed upon return.
- *
- * @throws SystemMessageException in case of an error
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild[] getVirtualChildrenList(boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists) return new VirtualChild[0];
- if (!updateVirtualFSIfNecessary(archiveOperationMonitor)) return new VirtualChild[0];
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- 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 {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (Exception e)
- {
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
-
- return new VirtualChild[0];
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildrenList(String parent, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- return getVirtualChildrenList(parent, true, archiveOperationMonitor);
- }
-
- /**
- * Same as getVirtualChildrenList(String parent) but you can choose whether
- * or not you want to leave the zipfile open after return.
- *
- * @throws SystemMessageException in case of an error
- * @since org.eclipse.rse.services 3.0
- */
- public VirtualChild[] getVirtualChildrenList(String parent, boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException
- {
- if (!_exists) return new VirtualChild[0];
- if (!updateVirtualFSIfNecessary(archiveOperationMonitor)) return new VirtualChild[0];
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- 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+"/")) //$NON-NLS-1$
- {
- 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];
- }
- else
- {
- return new VirtualChild[0];
- }
- }
- catch (Exception e)
- {
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
-
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildren(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor)
- {
- if (!_exists) return null;
- if (!updateVirtualFSIfNecessary(archiveOperationMonitor)) 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild[] getVirtualChildFolders(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor)
- {
- if (!_exists) return null;
- if (!updateVirtualFSIfNecessary(archiveOperationMonitor)) 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public VirtualChild getVirtualFile(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor)
- {
- if (!_exists) return new VirtualChild(this, fullVirtualName);
- if (!updateVirtualFSIfNecessary(archiveOperationMonitor)) return new VirtualChild(this, fullVirtualName);
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (fullVirtualName == "" || fullVirtualName == null) return new VirtualChild(this); //$NON-NLS-1$
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
- String path;
- String name;
- if (i == -1)
- {
- path = ""; //$NON-NLS-1$
- 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public boolean exists(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists) return false;
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (fullVirtualName == "" || fullVirtualName == null) return false; //$NON-NLS-1$
-
- if (_vfsLastModified == _file.lastModified())
- {
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
- String path;
- String name;
- if (i == -1)
- {
- path = ""; //$NON-NLS-1$
- 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;
- try {
- openZipFile();
- } catch (IOException ioe) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not open the ZipFile " + _file.toString(), ioe); //$NON-NLS-1$
- }
- try {
- safeGetEntry(fullVirtualName);
- retval = true;
- } catch (IOException e)
- {
- try
- {
- safeGetEntry(fullVirtualName + "/"); //$NON-NLS-1$
- retval = true;
- }
- catch (IOException f)
- {
- retval = false;
- }
- }
- buildTree();
- _vfsLastModified = _file.lastModified();
- if (!keepOpen)
- closeZipFile();
- return retval;
- }
- }
-
- /* (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) throws SystemMessageException
- {
- 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) throws SystemMessageException
- {
- if (!_exists) return 0;
- try
- {
- openZipFile();
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- entry = safeGetEntry(fullVirtualName);
- if (closeZipFile) closeZipFile();
- return entry.getTime();
- }
- catch (IOException e) {
- if (closeZipFile)
- closeZipFile();
- return _file.lastModified();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getSizeFor(java.lang.String)
- */
- public long getSizeFor(String fullVirtualName) throws SystemMessageException
- {
- return getSizeFor(fullVirtualName, true);
- }
-
- /**
- * Same as {@link #getSizeFor(String)} but allows to specify whether to
- * close the zip file or not.
- *
- * @param fullVirtualName absolute virtual path to the node to inspect
- * @param closeZipFile <code>true</code> if the zip file should be closed
- * @return the uncompressed size of the node requested.
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getSizeFor(java.lang.String)
- */
- public long getSizeFor(String fullVirtualName, boolean closeZipFile) throws SystemMessageException
- {
- if (!_exists) return 0;
- try
- {
- openZipFile();
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- ZipEntry entry = null;
- entry = safeGetEntry(fullVirtualName);
- if (closeZipFile) closeZipFile();
- return entry.getSize();
- }
- catch (IOException e) {
- if (closeZipFile)
- closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- extractVirtualFile(fullVirtualName, destination, true, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- extractVirtualFile(fullVirtualName, destination, true, sourceEncoding, isText, archiveOperationMonitor);
- }
-
- /**
- * Same as extractVirtualFile(String fullVirtualName, File destination) but you can choose whether
- * or not you want to leave the zipfile open after return.
- * @since org.eclipse.rse.services 3.0
- */
- public void extractVirtualFile(String fullVirtualName, File destination, boolean closeZipFile, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- int mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- ZipEntry entry = null;
- try
- {
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- entry = safeGetEntry(fullVirtualName);
- if (entry.isDirectory())
- {
- destination.delete();
- destination.mkdirs();
- destination.setLastModified(entry.getTime());
- if (closeZipFile) closeZipFile();
- return;
- }
- InputStream is = _zipfile.getInputStream(entry);
- if (is == null)
- {
- destination.setLastModified(entry.getTime());
- if (closeZipFile) closeZipFile();
- return;
- }
- 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, 0, numRead, 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();
- }
- destination.setLastModified(entry.getTime());
- if (closeZipFile) closeZipFile();
- return;
- }
- catch (IOException e)
- {
- if (_virtualFS.containsKey(fullVirtualName))
- {
- destination.delete();
- destination.mkdirs();
- destination.setLastModified(_file.lastModified());
- if (closeZipFile) closeZipFile();
- return;
- }
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
-
- }
- else
- {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- extractVirtualDirectory(dir, destinationParent, (File) null, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- extractVirtualDirectory(dir, destinationParent, (File) null, sourceEncoding, isText, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, File destination, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException
- {
- extractVirtualDirectory(dir, destinationParent, destination, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void extractVirtualDirectory(String dir, File destinationParent, File destination, String sourceEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
-
- if (!destinationParent.isDirectory())
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- dir = ArchiveHandlerManager.cleanUpVirtualPath(dir);
- if (!_virtualFS.containsKey(dir))
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
-
- String name;
- int charsToTrim;
- int j = dir.lastIndexOf("/"); //$NON-NLS-1$
- 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("")) //$NON-NLS-1$
- {
- destination = destinationParent;
- }
- else
- {
- destination = new File(destinationParent, name);
- }
- }
-
- if (!(destination == destinationParent))
- {
- if (destination.isFile() && destination.exists())
- {
- if (!SystemArchiveUtil.delete(destination))
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not overwrite directory " + destination); //$NON-NLS-1$
- }
- }
-
- if (!destination.exists())
- {
- if (!destination.mkdirs())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not overwrite directory " + destination); //$NON-NLS-1$
- }
- }
- }
-
- File topFile = destination;
- String topFilePath = topFile.getAbsolutePath().replace('\\', '/');
- //if (!dir.equals(topFile.getName()))
- String lastPortionOfDir = null;
- int lastSlashIndex = dir.lastIndexOf('/');
- if (-1 == lastSlashIndex)
- {
- lastPortionOfDir = dir;
- }
- else
- {
- lastPortionOfDir = dir.substring(lastSlashIndex + 1);
- }
- if (!topFilePath.endsWith(lastPortionOfDir))
- {
- rename(dir, topFile.getName(), archiveOperationMonitor);
- dir = topFile.getName();
- }
- VirtualChild[] newChildren = getVirtualChildrenList(dir, archiveOperationMonitor);
-
- if (newChildren.length == 0)
- {
- //it is a error situation, or the operation has been cancelled.
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
- extractVirtualFile(dir + '/', topFile, sourceEncoding, isText, archiveOperationMonitor);
-
- 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())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create folder " + nextFile.toString()); //$NON-NLS-1$
- }
- }
- else
- {
- createFile(nextFile);
- }
- if (newChildren[i].isDirectory)
- {
- extractVirtualFile(newChildren[i].fullName + '/', nextFile, sourceEncoding, isText, archiveOperationMonitor);
- }
- else
- {
- extractVirtualFile(newChildren[i].fullName, nextFile, sourceEncoding, isText, archiveOperationMonitor);
- }
- }
- }
- }
-
- /**
- * Create an empty file, also creating parent folders if necessary.
- *
- * @param file An abstract file handle to create physically.
- * @throws SystemMessageException in case of an error otherwise.
- * @since 3.0 throws SystemMessageException
- */
- protected void createFile(File file) throws SystemMessageException
- {
- try
- {
- if (!file.createNewFile())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "File already exists: " + file.toString()); //$NON-NLS-1$
- }
- else
- {
- return;
- }
- }
- catch (IOException e)
- {
- if (!file.getParentFile().exists() && file.getParentFile().mkdirs())
- {
- createFile(file);
- }
- else
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create " + file.toString()); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File file, String virtualPath, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- add(file, virtualPath, name, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- if (exists(virtualPath + "/" + name, archiveOperationMonitor)) //$NON-NLS-1$
- {
- // wrong method
- replace(virtualPath + "/" + name, stream, name, sourceEncoding, targetEncoding, isText, archiveOperationMonitor); //$NON-NLS-1$
- }
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- 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"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
-
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
-
- // if it is an empty zip file, no need to recreate it
- if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$
- {
- boolean isCancelled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor);
- if (isCancelled)
- {
- dest.close();
- if (!(outputTempFile == null)) outputTempFile.delete();
- closeZipFile();
- throw new SystemOperationCancelledException();
- }
- }
-
- // 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)
- {
- closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not add a file.", e); //$NON-NLS-1$
- }
- closeZipFile();
- }
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
-
- }
- catch(Exception e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File[] files, String virtualPath, String[] names, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- 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;
- }
- add(files, virtualPath, names, encodings, encodings, isTexts, true, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- add(files, virtualPath, names, sourceEncodings, targetEncodings, isText, true, archiveOperationMonitor);
- }
-
-
- /**
- * 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.
- * @since org.eclipse.rse.services 3.0
- */
- public void add(File[] files, String virtualPath, String[] names, String[] sourceEncodings, String[] targetEncodings, boolean[] isText,
- boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- if (openZipFile())
- {
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
- int numFiles = files.length;
- for (int i = 0; i < numFiles; i++)
- {
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- closeZipFile();
- throw new SystemOperationCancelledException();
- }
- if (!files[i].exists() || !files[i].canRead()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read: " + files[i]); //$NON-NLS-1$
- }
- String fullVirtualName = getFullVirtualName(virtualPath, names[i]);
- if (exists(fullVirtualName, archiveOperationMonitor))
- {
- // sorry, wrong method buddy
- replace(fullVirtualName, files[i], names[i], archiveOperationMonitor);
- }
- }
- File outputTempFile;
-
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
-
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
-
- // if it is an empty zip file, no need to recreate it
- if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$
- {
- boolean isCancelled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor);
- if (isCancelled)
- {
- dest.close();
- if (!(outputTempFile == null))
- {
- outputTempFile.delete();
- }
- if (closeZipFile) closeZipFile();
- throw new SystemOperationCancelledException();
- }
- }
-
- // Now for each new file to add
- // We need to remember the entries added, and if this operation is not cancelled, we
- // will add them into Virtual File system.
- ZipEntry[] newEntriesAdded = new ZipEntry[numFiles];
- for (int i = 0; i < numFiles; i++)
- {
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- dest.close();
- if (!(outputTempFile == null))
- {
- outputTempFile.delete();
- }
- closeZipFile();
- throw new SystemOperationCancelledException();
- }
- // 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 array first.
- newEntriesAdded[i] = newEntry;
- }
-
- dest.close();
-
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
- //Also need to add the new entries into VFS
- for (int i = 0; i < numFiles; i++)
- {
- fillBranch(newEntriesAdded[i]);
- }
-
- if (closeZipFile) closeZipFile();
- }
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException ioe) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, ioe);
- }
- finally
- {
- if (closeZipFile) closeZipFile();
- releaseMutex(mutexLockStatus);
- }
- }
-
- /**
- * 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>.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static boolean listAllFiles(File parent, HashSet found, ISystemOperationMonitor archiveOperationMonitor)
- {
- File[] children = parent.listFiles();
- if (children == null) // DKM - 56031, no authority on parent yields null
- {
- found.remove(parent);
- return false;
- }
- for (int i = 0; i < children.length; i++)
- {
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- return true;
- }
- 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, archiveOperationMonitor);
- }
- }
- }
- }
-
- return false;
- }
-
- /**
- * 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 omissions.
- * @throws IOException in case of a file I/O error
- * @return <code>true</code> if the operation is cancelled
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean recreateZipDeleteEntries(VirtualChild[] vcList, ZipOutputStream dest, HashSet omitChildren, ISystemOperationMonitor archiveOperationMonitor) 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("/"); //$NON-NLS-1$
- dest.putNextEntry(entry);
- dest.closeEntry();
- return false;
- }
- //else
- for (int i = 0; i < vcList.length; i++)
- {
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- return true;
- }
-
- // 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 + "/"); //$NON-NLS-1$
- 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();
- }
- return false;
- }
-
- /**
- * 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 names HashMap maps the full path of a virtual file to the entry in
- * the archive file
- * @return <code>true</code> if the operation has been cancelled
- * @throws IOException in case of an error.
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean recreateZipRenameEntries(VirtualChild[] vcList, ZipOutputStream dest, HashMap names, ISystemOperationMonitor archiveOperationMonitor) throws IOException
- {
- for (int i = 0; i < vcList.length; i++)
- {
- if (archiveOperationMonitor != null && archiveOperationMonitor.isCancelled())
- {
- //the operation has been cancelled
- return true;
- }
- // 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();
- }
- return false;
- }
-
- /**
- * 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 in case of an error.
- */
- 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; //$NON-NLS-1$
- if (!fullName.endsWith("/")) fullName = fullName + "/"; //$NON-NLS-1$ //$NON-NLS-2$
- newEntry = createSafeZipEntry(fullName);
- }
- else
- {
- newEntry = createSafeZipEntry(virtualPath + "/" + name); //$NON-NLS-1$
- }
- 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 in case of an error.
- */
- 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); //$NON-NLS-1$
- 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"); //$NON-NLS-1$
- if (!_file.renameTo(oldFile)) {
- throw new IOException("Failed to rename " + oldFile); //$NON-NLS-1$
- }
- if (!outputTempFile.renameTo(_file)) {
- throw new IOException("Failed to rename " + _file); //$NON-NLS-1$
- }
- _vfsLastModified = _file.lastModified();
- _zipfile = new ZipFile(_file);
- oldFile.delete();
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public boolean delete(String fullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- boolean returnCode = delete(fullVirtualName, true, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return returnCode;
- }
-
- /**
- * Same as delete(String fullVirtualName) but you can choose whether
- * or not you want to leave the zipfile open after return.
- * @since org.eclipse.rse.services 3.0
- */
- public boolean delete(String fullVirtualName, boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists) return false;
- File outputTempFile = null;
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- if (openZipFile())
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- VirtualChild vc = getVirtualFile(fullVirtualName, archiveOperationMonitor);
- 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, archiveOperationMonitor);
- }
-
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
-
- // get all the entries in the old zip
- vcList = getVirtualChildrenList(false, archiveOperationMonitor);
-
- 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
- boolean isCancelled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor);
- if (isCancelled)
- {
- dest.close();
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- throw new SystemOperationCancelledException();
- }
-
- 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);
- }
- if (closeZipFile) closeZipFile();
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return true;
- }
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException e)
- {
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not delete " + fullVirtualName, e); //$NON-NLS-1$
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void replace(String fullVirtualName, File file, String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- replace(fullVirtualName, file, name, true, archiveOperationMonitor);
- }
-
- /**
- * 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.
- * @since org.eclipse.rse.services 3.0
- */
- public void replace(String fullVirtualName, File file, String name, boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
-
- if (!file.exists() || !file.canRead()) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read: " + file); //$NON-NLS-1$
- }
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (!exists(fullVirtualName, archiveOperationMonitor))
- {
- // sorry, wrong method buddy
- add(file, fullVirtualName, name, archiveOperationMonitor);
- }
-
- File outputTempFile = null;
- try
- {
- openZipFile();
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
- HashSet omissions = new HashSet();
- omissions.add(fullVirtualName);
-
- boolean isCancelled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor);
- if (isCancelled)
- {
- dest.close();
- if (!(outputTempFile == null))
- outputTempFile.delete();
- if (closeZipFile)
- closeZipFile();
- throw new SystemOperationCancelledException();
- }
-
- // Now append the additional entry to the zip file.
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
- String virtualPath;
- if (i == -1) {
- virtualPath = ""; //$NON-NLS-1$
- } else {
- virtualPath = fullVirtualName.substring(0, i);
- }
-
-
- // append the additional entry to the zip file.
- ZipEntry newEntry = appendFile(file, dest, virtualPath, name, SystemEncodingUtil.ENCODING_UTF_8, SystemEncodingUtil.ENCODING_UTF_8, false);
-
- // 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) {
- if (!(outputTempFile == null))
- outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not replace " + file.getName(), e); //$NON-NLS-1$
- }
- if (closeZipFile)
- closeZipFile();
-
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- if (!exists(fullVirtualName, archiveOperationMonitor))
- {
- // wrong method
- add(stream, fullVirtualName, name, sourceEncoding, targetEncoding, isText, archiveOperationMonitor);
- }
-
- File outputTempFile = null;
- try
- {
- openZipFile();
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
- HashSet omissions = new HashSet();
- omissions.add(fullVirtualName);
- boolean isCancelled = recreateZipDeleteEntries(vcList, dest, omissions, archiveOperationMonitor);
- if (isCancelled)
- {
- dest.close();
- if (!(outputTempFile == null))
- outputTempFile.delete();
- closeZipFile();
- throw new SystemOperationCancelledException();
- }
-
- // Now append the additional entry to the zip file.
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
- String virtualPath;
- if (i == -1) {
- virtualPath = ""; //$NON-NLS-1$
- }
- else
- {
- virtualPath = fullVirtualName.substring(0, i);
- }
- 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) {
- if (!(outputTempFile == null))
- outputTempFile.delete();
- closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not replace " + fullVirtualName, e); //$NON-NLS-1$
- }
- closeZipFile();
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void fullRename(String fullVirtualName, String newFullVirtualName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- fullRename(fullVirtualName, newFullVirtualName, true, archiveOperationMonitor);
- }
-
- /**
- * Same as fullRename(String fullVirtualName, String newFullVirtualName) but
- * you can choose whether or not you want to leave the zipfile open after
- * return.
- *
- * @throws SystemMessageException in case of an error or user cancellation.
- * @since org.eclipse.rse.services 3.0
- */
- public void fullRename(String fullVirtualName, String newFullVirtualName, boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException
- {
- if (!_exists)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- newFullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(newFullVirtualName);
- VirtualChild vc = getVirtualFile(fullVirtualName, archiveOperationMonitor);
- if (!vc.exists())
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "The virtual file " + fullVirtualName + " does not exist."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- File outputTempFile = null;
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
- VirtualChild[] renameList = null;
- HashMap oldNewNames = new HashMap();
- HashMap newOldNames = 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, archiveOperationMonitor);
- 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 + "/"; //$NON-NLS-1$
- oldNewNames.put(renameList[i].fullName + "/", newName); //$NON-NLS-1$
- newOldNames.put(newName, renameList[i].fullName + "/"); //$NON-NLS-1$
- }
- else
- {
- oldNewNames.put(renameList[i].fullName, newName);
- newOldNames.put(newName, renameList[i].fullName);
- }
- }
- oldNewNames.put(fullVirtualName + "/", newFullVirtualName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
- newOldNames.put(newFullVirtualName + "/", fullVirtualName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
- /*
- try
- {
- safeGetEntry(fullVirtualName);
- names.put(fullVirtualName + "/", newFullVirtualName + "/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (IOException e) {}
- */
- }
- else
- {
- oldNewNames.put(fullVirtualName, newFullVirtualName);
- newOldNames.put(newFullVirtualName, fullVirtualName);
- }
- // find the entry to rename and rename it
- boolean isCancelled = recreateZipRenameEntries(vcList, dest, oldNewNames, archiveOperationMonitor);
-
- dest.close();
-
- if (isCancelled)
- {
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- throw new SystemOperationCancelledException();
- }
- // Now replace the old zip file with the new one
- replaceOldZip(outputTempFile);
-
- // Now rebuild the tree
- updateTreeAfterRename(newOldNames, renameList);
- if (closeZipFile) closeZipFile();
- }
- else
- {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException e)
- {
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not rename " + fullVirtualName, e); //$NON-NLS-1$
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void move(String fullVirtualName, String destinationVirtualPath, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- destinationVirtualPath = ArchiveHandlerManager.cleanUpVirtualPath(destinationVirtualPath);
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
- if (i == -1)
- {
- fullRename(fullVirtualName, destinationVirtualPath + "/" + fullVirtualName, archiveOperationMonitor); //$NON-NLS-1$
- }
- String name = fullVirtualName.substring(i);
- fullRename(fullVirtualName, destinationVirtualPath + name, archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void rename(String fullVirtualName, String newName, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- int i = fullVirtualName.lastIndexOf("/"); //$NON-NLS-1$
- if (i == -1)
- {
- fullRename(fullVirtualName, newName, archiveOperationMonitor);
- } else {
- String fullNewName = fullVirtualName.substring(0, i+1) + newName;
- fullRename(fullVirtualName, fullNewName, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public File[] getFiles(String[] fullNames, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- 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("/"); //$NON-NLS-1$
- if (j == -1)
- {
- name = fullName;
- }
- else
- {
- name = fullName.substring(j+1);
- }
- try
- {
- files[i] = File.createTempFile(name, "virtual"); //$NON-NLS-1$
- files[i].deleteOnExit();
- extractVirtualFile(fullNames[i], files[i], archiveOperationMonitor);
- }
- catch (IOException e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not extract virtual file: " + fullNames[i], e); //$NON-NLS-1$
- }
- }
- return files;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void createFolder(String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- name = ArchiveHandlerManager.cleanUpVirtualPath(name);
- name = name + "/"; //$NON-NLS-1$
- createVirtualObject(name, true, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void createFile(String name, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- name = ArchiveHandlerManager.cleanUpVirtualPath(name);
- createVirtualObject(name, true, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
-
- /**
- * 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 <code>true</code> if the object was created. <code>false</code>
- * if the creation was a no-op because the object already existed.
- * @throws SystemMessageException in case of an error or cancellation.
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean createVirtualObject(String name, boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- {
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
- if (exists(name, archiveOperationMonitor))
- {
- // The object already exists.
- return false;
- }
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- if (openZipFile())
- {
- File outputTempFile;
-
- // Open a new tempfile which will be our destination for the new zip
- outputTempFile = new File(_file.getAbsolutePath() + "temp"); //$NON-NLS-1$
- ZipOutputStream dest = new ZipOutputStream(
- new FileOutputStream(outputTempFile));
- dest.setMethod(ZipOutputStream.DEFLATED);
- // get all the entries in the old zip
- VirtualChild[] vcList = getVirtualChildrenList(false, archiveOperationMonitor);
-
- // if it is an empty zip file, no need to recreate it
- if (!(vcList.length == 1) || !vcList[0].fullName.equals("")) //$NON-NLS-1$
- {
- boolean isCancelled = recreateZipDeleteEntries(vcList, dest, null, archiveOperationMonitor);
- if (isCancelled)
- {
- dest.close();
- if (!(outputTempFile == null)) outputTempFile.delete();
- if (closeZipFile) closeZipFile();
- throw new SystemOperationCancelledException();
- }
- }
-
- // 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);
-
- if (closeZipFile) closeZipFile();
- return true;
- }
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (IOException e)
- {
- System.out.println();
- System.out.println(e.getMessage());
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not add a file.", e); //$NON-NLS-1$
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- 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("/"); //$NON-NLS-1$
- 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); //$NON-NLS-1$
- return new ZipEntry(name);
- }
-
- /*
- * (non-Javadoc)
- * @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 + "/"; //$NON-NLS-1$
- return vc.fullName;
- }
-
- /**
- * Opens the zipfile that this handler manages.
- *
- * @throws IOException in case of an error
- */
- protected boolean openZipFile() throws IOException
- {
- if (!(_zipfile == null)) closeZipFile();
- _zipfile = new ZipFile(_file);
- return true;
- }
-
- protected boolean closeZipFile()
- {
- try
- {
- _zipfile.close();
- }
- catch (IOException e)
- {
- System.out.println("Could not close zipfile: " + _file); //$NON-NLS-1$
- 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.
- * @since org.eclipse.rse.services 3.0
- */
- protected boolean updateVirtualFSIfNecessary(ISystemOperationMonitor archiveOperationMonitor)
- {
- if (_vfsLastModified != _file.lastModified())
- {
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- if (openZipFile())
- {
- buildTree();
- _vfsLastModified = _file.lastModified();
- closeZipFile();
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- closeZipFile();
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- }
- 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); //$NON-NLS-1$
- if (entry == null) throw new IOException("SystemZipHandler.safeGetEntry(): The ZipEntry " + name + " cannot be found in " + _file.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- return entry;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void create() throws SystemMessageException
- {
- 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, null);
- dest.close();
-
- openZipFile();
- buildTree();
- closeZipFile();
- }
- catch (IOException e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- _exists = true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public SystemSearchLineMatch[] search(String fullVirtualName, SystemSearchStringMatcher matcher, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException
- {
-
- // 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, archiveOperationMonitor);
-
- if (!vc.exists() || vc.isDirectory) {
- return new SystemSearchLineMatch[0];
- }
-
- ZipEntry entry = null;
- SystemSearchLineMatch[] matches = null;
-
- try {
- openZipFile();
- 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) {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
-
- closeZipFile();
-
- if (matches == null) {
- return new SystemSearchLineMatch[0];
- }
- else {
- return matches;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#exists()
- */
- public boolean exists()
- {
- return _exists;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getCommentFor(java.lang.String)
- */
- public String getCommentFor(String fullVirtualName) throws SystemMessageException
- {
- 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) throws SystemMessageException
- {
- if (!_exists) return ""; //$NON-NLS-1$
-
- ZipEntry entry = null;
- try
- {
- openZipFile();
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- entry = safeGetEntry(fullVirtualName);
- } catch (IOException e) {
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- if (closeZipFile)
- closeZipFile();
- String comment = entry.getComment();
- if (comment == null)
- return ""; //$NON-NLS-1$
- else
- return comment;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.archiveutils.ISystemArchiveHandler#getCompressedSizeFor(java.lang.String)
- */
- public long getCompressedSizeFor(String fullVirtualName) throws SystemMessageException
- {
- 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) throws SystemMessageException
- {
- if (!_exists) return 0;
-
- ZipEntry entry = null;
- try
- {
- openZipFile();
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- entry = safeGetEntry(fullVirtualName);
- }
- catch (IOException e)
- {
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- if (closeZipFile) closeZipFile();
- return entry.getCompressedSize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.archiveutils.ISystemArchiveHandler#getCompressionMethodFor(java.lang.String)
- */
- public String getCompressionMethodFor(String fullVirtualName) throws SystemMessageException
- {
- 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) throws SystemMessageException
- {
- if (!_exists) return ""; //$NON-NLS-1$
-
- ZipEntry entry = null;
- try
- {
- openZipFile();
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
- entry = safeGetEntry(fullVirtualName);
- } catch (IOException e) {
- if (closeZipFile) closeZipFile();
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
- }
- if (closeZipFile)
- closeZipFile();
- return (new Integer(entry.getMethod())).toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.archiveutils.ISystemArchiveHandler#getArchiveComment()
- */
- public String getArchiveComment()
- {
- return ""; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler#getClassification(java.lang.String)
- */
- public String getClassification(String fullVirtualName) throws SystemMessageException {
- 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#getClassification(java.lang.String)
- */
- public String getClassification(String fullVirtualName, boolean closeZipFile) throws SystemMessageException {
-
- // default type
- String type = "file"; //$NON-NLS-1$
-
- if (!_exists) {
- return type;
- }
-
- fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
-
- // if it's not a class file, we do not classify it
- if (!fullVirtualName.endsWith(".class")) { //$NON-NLS-1$
- return type;
- }
-
- // class file parser
- BasicClassFileParser parser = null;
-
- boolean isExecutable = false;
-
- // get the input stream for the entry
- InputStream stream = null;
-
- try {
- openZipFile();
- 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 && parser != null) {
- 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;
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes registry,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- {
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
-
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
- if (!file.isDirectory())
- {
- if (exists(virtualPath + "/" + name, archiveOperationMonitor)) //$NON-NLS-1$
- {
- // wrong method
- replace(virtualPath + "/" + name, file, name, archiveOperationMonitor); //$NON-NLS-1$
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- return;
- }
- 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);
- add(files, virtualPath, names, sourceEncodings, targetEncodings, isTexts, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- }
- else
- {
- //String sourceName = name;
- HashSet children = new HashSet();
- boolean isCancelled = listAllFiles(file, children, archiveOperationMonitor);
- if (isCancelled)
- {
- throw new SystemOperationCancelledException();
- }
- 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] + "/"; //$NON-NLS-1$ //$NON-NLS-2$
-
- // 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()] + "/"; //$NON-NLS-1$ //$NON-NLS-2$
-
- add(sources, virtualPath, newNames, sourceEncodings, targetEncodings, isTexts, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
- ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- if (!_exists)
- {
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- }
-
- virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
-
- int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
- try
- {
- mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
- if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
- {
- if (!file.isDirectory())
- {
- String fullVirtualName = getFullVirtualName(virtualPath, name);
- if (exists(fullVirtualName, archiveOperationMonitor))
- {
- replace(fullVirtualName, file, name, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- 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;
- add(files, virtualPath, names, sourceEncodings, targetEncodings, isTexts, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- }
- else
- {
- HashSet children = new HashSet();
- boolean isCancelled = listAllFiles(file, children, archiveOperationMonitor);
- if (isCancelled)
- {
- throw new SystemOperationCancelledException();
- }
- 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] + "/"; //$NON-NLS-1$ //$NON-NLS-2$
-
- // 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()] + "/"; //$NON-NLS-1$ //$NON-NLS-2$
- add(sources, virtualPath, newNames, sourceEncodings, targetEncodings, isTexts, archiveOperationMonitor);
- setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
- }
- } else {
- throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
- }
- }
- catch (Exception e)
- {
-
- }
- finally
- {
- releaseMutex(mutexLockStatus);
- }
- }
-
- /**
- * Construct the full virtual name of a virtual file from its virtual path and name.
- * @param virtualPath the virtual path of this virtual file
- * @param name the name of this virtual file
- * @return the full virtual name of this virtual file
- */
- private static String getFullVirtualName(String virtualPath, String name)
- {
- String fullVirtualName = null;
- if (virtualPath == null || virtualPath.length() == 0)
- {
- fullVirtualName = name;
- }
- else
- {
- fullVirtualName = virtualPath + "/" + name; //$NON-NLS-1$
- }
- return fullVirtualName;
- }
-
- private void releaseMutex(int mutexLockStatus)
- {
- //We only release the mutex if we acquired it, not borrowed it.
- if (SystemReentrantMutex.LOCK_STATUS_AQUIRED == mutexLockStatus)
- {
- _mutex.release();
- }
- }
-
- private void setArchiveOperationMonitorStatusDone(ISystemOperationMonitor archiveOperationMonitor)
- {
- //We only set the status of the archive operation monitor to done if it is not been cancelled.
- if (null != archiveOperationMonitor && !archiveOperationMonitor.isCancelled())
- {
- archiveOperationMonitor.setDone(true);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarEntry.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarEntry.java
deleted file mode 100644
index 3f03b6cc3..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarEntry.java
+++ /dev/null
@@ -1,555 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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) - [219975] Fix implementations of clone()
- * Xuan Chen (IBM) - [api] SystemTarHandler has inconsistent API
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.rse.internal.services.clientserver.archiveutils.ITarConstants;
-
-/**
- * This class represents a tar file entry.
- * @since 3.0
- */
-public class TarEntry implements 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[ITarConstants.NAME_LENGTH];
- public byte[] mode = new byte[ITarConstants.MODE_LENGTH];
- public byte[] uid = new byte[ITarConstants.UID_LENGTH];
- public byte[] gid = new byte[ITarConstants.GID_LENGTH];
- public byte[] size = new byte[ITarConstants.SIZE_LENGTH];
- public byte[] mtime = new byte[ITarConstants.MTIME_LENGTH];
- public byte[] chksum = new byte[ITarConstants.CHKSUM_LENGTH];
- public byte typeflag;
- public byte[] linkname = new byte[ITarConstants.LINKNAME_LENGTH];
- public byte[] magic = new byte[ITarConstants.MAGIC_LENGTH];
- public byte[] version = new byte[ITarConstants.VERSION_LENGTH];
- public byte[] uname = new byte[ITarConstants.UNAME_LENGTH];
- public byte[] gname = new byte[ITarConstants.GNAME_LENGTH];
- public byte[] devmajor = new byte[ITarConstants.DEVMAJOR_LENGTH];
- public byte[] devminor = new byte[ITarConstants.DEVMINOR_LENGTH];
- public byte[] prefix = new byte[ITarConstants.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 != ITarConstants.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("")) { //$NON-NLS-1$
- 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 = ITarConstants.NAME_LENGTH - fileName.length();
-
- // append null characters to the name
- for (int i = 0; i < length; i++) {
- fileName = fileName + "\0"; //$NON-NLS-1$
- }
-
- 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"; //$NON-NLS-1$ //$NON-NLS-2$
- modString = modString + "\0"; //$NON-NLS-1$
-
- 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 = ITarConstants.SIZE_LENGTH - length - 1;
-
- // prepend the string with 0s
- for (int i = 0; i < diff; i++) {
- sizeString = "0" + sizeString; //$NON-NLS-1$
- }
-
- // append a space at the end
- sizeString = sizeString + " "; //$NON-NLS-1$
-
- 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 = ITarConstants.MTIME_LENGTH - length - 1;
-
- // prepend the string with 0s
- for (int i = 0; i < diff; i++) {
- mtimeString = "0" + mtimeString; //$NON-NLS-1$
- }
-
- // append a space at the end
- mtimeString = mtimeString + " "; //$NON-NLS-1$
-
- 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 = ITarConstants.UNAME_LENGTH - userName.length();
-
- // append null characters to the user name
- for (int i = 0; i < length; i++) {
- userName = userName + "\0"; //$NON-NLS-1$
- }
-
- 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("/")) { //$NON-NLS-1$
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * Write the fields to the given output stream.
- * @param outStream 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 = ITarConstants.CHKSUM_LENGTH - length - 2;
-
- // prepend the string with 0s
- for (int i = 0; i < diff; i++) {
- sumString = "0" + sumString; //$NON-NLS-1$
- }
-
- // append a null character
- sumString = sumString + "\0"; //$NON-NLS-1$
-
- // append a space
- sumString = sumString + " "; //$NON-NLS-1$
-
- // set the checksum
- chksum = sumString.getBytes();
- }
-
- /**
- * @see java.lang.Object#clone()
- */
- public Object clone() throws CloneNotSupportedException {
- TarEntry newEntry = (TarEntry)super.clone();
- newEntry.mode = (byte[])this.mode.clone();
- newEntry.uid = (byte[])this.uid.clone();
- newEntry.gid = (byte[])this.gid.clone();
- newEntry.size = (byte[])this.size.clone();
- newEntry.mtime = (byte[])this.mtime.clone();
- newEntry.chksum = (byte[])this.chksum.clone();
- //newEntry.typeflag = this.typeflag;
- newEntry.linkname = (byte[])this.linkname.clone();
- newEntry.magic = (byte[])this.magic.clone();
- newEntry.version = (byte[])this.version.clone();
- newEntry.uname = (byte[])this.uname.clone();
- newEntry.gname = (byte[])this.gname.clone();
- newEntry.devmajor = (byte[])this.devmajor.clone();
- newEntry.devminor = (byte[])this.devminor.clone();
- newEntry.prefix = (byte[])this.prefix.clone();
- return newEntry;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarFile.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarFile.java
deleted file mode 100644
index b11035335..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarFile.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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:
- * Xuan Chen (IBM) - [api] SystemTarHandler has inconsistent API
- * Johnson Ma (Wind River) - [195402] Add tar.gz archive support
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-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;
-
-import org.eclipse.rse.internal.services.clientserver.archiveutils.ITarConstants;
-
-/**
- * This class is used to read entries from a tar file.
- * @since 3.0
- */
-public class TarFile {
-
- 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 / ITarConstants.BLOCK_SIZE);
- numFileBlocks += (fileSize % ITarConstants.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 * ITarConstants.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.
- * @since 3.0
- */
- protected 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[ITarConstants.BLOCK_SIZE];
-
- // read a block of data
- int byteRead = 0;
-
- for (int i = 0; i < ITarConstants.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("")) { //$NON-NLS-1$
- 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 + "/")) { //$NON-NLS-1$
- 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 / ITarConstants.BLOCK_SIZE);
- numFileBlocks += (fileSize % ITarConstants.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 * ITarConstants.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarOutputStream.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarOutputStream.java
deleted file mode 100644
index 6539f925b..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/TarOutputStream.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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:
- * Xuan Chen (IBM) - [api] SystemTarHandler has inconsistent API
- * Martin Oberhuber (Wind River) - [cleanup] Move from internal to fix API leakage
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.rse.internal.services.clientserver.archiveutils.ITarConstants;
-
-/**
- * This class implements an output stream filter for writing files in the tar
- * file format.
- * @since 3.0
- */
-public class TarOutputStream extends OutputStream {
-
- 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[ITarConstants.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"); //$NON-NLS-1$
- }
- }
-
- /**
- * @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 = ITarConstants.BLOCK_SIZE - ITarConstants.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 % ITarConstants.BLOCK_SIZE);
-
- // fill the rest of the block with dummy data if we have filled part of a block
- if (temp != 0) {
- int diff = ITarConstants.BLOCK_SIZE - temp;
- byte[] dummy = new byte[diff];
- out.write(dummy);
- }
-
- // indicate that entry has been closed
- entryOpen = false;
- }
-}
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 0907a9401..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/archiveutils/VirtualChild.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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.
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancellation of archive operations
- * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.archiveutils;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-import org.eclipse.rse.services.clientserver.ISystemOperationMonitor;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
-
-
-/**
- * A simple structure for passing information about virtual files and folders.
- *
- * @author mjberger
- */
-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;
-
- private String comment;
- private long compressedSize;
- private String compressionMethod;
- private long size;
- private long timeStamp;
-
- /**
- * 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 = ""; //$NON-NLS-1$
- name = ""; //$NON-NLS-1$
- path = ""; //$NON-NLS-1$
- isDirectory = false;
- _handler = handler;
- _extractedFile = null;
- _containingArchive = null;
-
- comment = ""; //$NON-NLS-1$
- compressedSize = -1;
- compressionMethod = ""; //$NON-NLS-1$
- size = -1;
- timeStamp = -1;
- }
-
- /**
- * 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 timeStamp;
- }
-
- /**
- * @param value the time stamp value
- * @since 3.0
- */
- public void setTimeStamp(long value)
- {
- timeStamp = value;
- }
-
- /**
- * @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 size;
- }
-
- /**
- * @param value the size value
- * @since 3.0
- */
- public void setSize(long value)
- {
- size = value;
- }
-
- /**
- * @return The comment associated with this VirtualChild.
- */
- public String getComment()
- {
- /*
- if (_handler == null) return ""; //$NON-NLS-1$
- return _handler.getCommentFor(fullName);
- */
- return comment;
- }
-
- /**
- * @param value the comment value
- * @since 3.0
- */
- public void setComment(String value)
- {
- if (null != value)
- {
- comment = value;
- }
- else
- {
- comment = ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @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 compressedSize;
- }
-
- /**
- * @param value the compressedSize value
- * @since 3.0
- */
- public void setCompressedSize(long value)
- {
- compressedSize = value;
- }
-
- /**
- * @return The method used to compress this VirtualChild.
- */
- public String getCompressionMethod()
- {
- /*
- if (_handler == null) return ""; //$NON-NLS-1$
- return _handler.getCompressionMethodFor(fullName);
- */
- return compressionMethod;
- }
-
- /**
- * @param value the compression method value
- * @since 3.0
- */
- public void setCompressionMethod(String value)
- {
- if (null != value)
- {
- compressionMethod = value;
- }
- else
- {
- compressionMethod = ""; //$NON-NLS-1$
- }
- }
-
- /**
- * @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();
- */
- if (size <= 0)
- {
- return 1;
- }
- if (compressedSize <= 0)
- {
- return 1;
- }
-
- return ((double)size - (double)compressedSize) / size;
- }
-
- /**
- * @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() throws SystemMessageException
- {
- return getExtractedFile(SystemEncodingUtil.ENCODING_UTF_8, false, null);
- }
-
- /**
- * @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
- * re-extracted from the archive.
- * @since 3.0 throws SystemMessageException
- */
- public File getExtractedFile(String sourceEncoding, boolean isText, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- File returnedFile = null;
- if (_extractedFile == null || _extractedFile.lastModified() != getTimeStamp())
- {
- try
- {
- int i = name.lastIndexOf("."); //$NON-NLS-1$
- String ext = ""; //$NON-NLS-1$
- if (i != -1) ext = name.substring(i+1);
- if (i < 3)
- {
- _extractedFile = File.createTempFile(name + "123", "virtual." + ext); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- {
- _extractedFile = File.createTempFile(name, "virtual." + ext); //$NON-NLS-1$
- }
- _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."); //$NON-NLS-1$
- //We only set the status of the archive operation montor to done if it is not been cancelled.
- if (null != archiveOperationMonitor && !archiveOperationMonitor.isCancelled())
- {
- archiveOperationMonitor.setDone(true);
- }
- return null;
- }
- }
- _handler.extractVirtualDirectory(fullName, _extractedFile, sourceEncoding, isText, archiveOperationMonitor);
- }
- else
- {
- _handler.extractVirtualFile(fullName, _extractedFile, sourceEncoding, isText, archiveOperationMonitor);
- }
- }
- catch (IOException e)
- {
- throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "VirtualChild.getExtractedFile()", e); //$NON-NLS-1$
- }
- }
-
- if (isDirectory)
- {
- returnedFile = new File(_extractedFile, name);
- }
- else
- {
- returnedFile = _extractedFile;
- }
-
- //We only set the status of the archive operation montor to done if it is not been cancelled.
- if (null != archiveOperationMonitor && !archiveOperationMonitor.isCancelled())
- {
- archiveOperationMonitor.setDone(true);
- }
-
- return returnedFile;
- }
-
- /**
- * 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 re-extracted from the archive. <code>destination</code> is
- * always overwritten with either what is cached, or what is in the archive.
- *
- * @throws SystemMessageException in case of an error
- * @since 3.0 throws SystemMessageException
- */
- public void getExtractedFile(File destination, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
- {
- getExtractedFile(destination, SystemEncodingUtil.ENCODING_UTF_8, false, archiveOperationMonitor);
- }
-
-
- /**
- * 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.
- *
- * @throws SystemMessageException in case of an error
- * @since 3.0 throws SystemMessageException
- */
- public void getExtractedFile(File destination, String sourceEncoding, boolean isText, ISystemOperationMonitor archiveOperationMonitor)
- throws SystemMessageException
- {
- if (_handler == null)
- throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
- if (_extractedFile == null ||
- _extractedFile.lastModified() != getTimeStamp() ||
- !destination.getAbsolutePath().equals(_extractedFile.getAbsolutePath())
- )
- {
- if (isDirectory)
- {
- _handler.extractVirtualDirectory(fullName, destination.getParentFile(), destination, sourceEncoding, isText, archiveOperationMonitor);
- }
- else
- {
- _handler.extractVirtualFile(fullName, destination, sourceEncoding, isText, archiveOperationMonitor);
- }
- _extractedFile = destination;
- }
- //We only set the status of the archive operation monitor to done if it is not been cancelled.
- if (null != archiveOperationMonitor && !archiveOperationMonitor.isCancelled())
- {
- archiveOperationMonitor.setDone(true);
- }
- }
-
- /**
- * @return Whether or not this VirtualChild exists in the archive.
- */
- public boolean exists() throws SystemMessageException
- {
- if (_handler == null) return false;
- return _handler.exists(fullName, null);
- }
-
- /**
- * 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("/"); //$NON-NLS-1$
- if (i == -1)
- {
- name = newName;
- path = ""; //$NON-NLS-1$
- }
- 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();
- }
-
-
-}
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 24b3b0495..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/BasicClassFileParser.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * Kushal Munir (IBM) - Update javadoc for class.
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.java;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.services.clientserver.java.AbstractAttributeInfo;
-import org.eclipse.rse.internal.services.clientserver.java.AbstractCPInfo;
-import org.eclipse.rse.internal.services.clientserver.java.ClassFileUTF8Reader;
-import org.eclipse.rse.internal.services.clientserver.java.ClassInfo;
-import org.eclipse.rse.internal.services.clientserver.java.DoubleInfo;
-import org.eclipse.rse.internal.services.clientserver.java.EnhancedDataInputStream;
-import org.eclipse.rse.internal.services.clientserver.java.FieldInfo;
-import org.eclipse.rse.internal.services.clientserver.java.FieldRefInfo;
-import org.eclipse.rse.internal.services.clientserver.java.FloatInfo;
-import org.eclipse.rse.internal.services.clientserver.java.IClassFileConstants;
-import org.eclipse.rse.internal.services.clientserver.java.IntegerInfo;
-import org.eclipse.rse.internal.services.clientserver.java.InterfaceMethodRefInfo;
-import org.eclipse.rse.internal.services.clientserver.java.LongInfo;
-import org.eclipse.rse.internal.services.clientserver.java.MethodInfo;
-import org.eclipse.rse.internal.services.clientserver.java.MethodRefInfo;
-import org.eclipse.rse.internal.services.clientserver.java.NameAndTypeInfo;
-import org.eclipse.rse.internal.services.clientserver.java.StringInfo;
-import org.eclipse.rse.internal.services.clientserver.java.UTF8Info;
-
-/**
- * This is a basic class file parser that returns a package name from a class
- * file.
- * <p>
- * @noextend This class is not intended to be subclassed by clients.
- */
-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;
-
- /**
- * Constructor.
- *
- * @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")) { //$NON-NLS-1$
-
- // 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")) { //$NON-NLS-1$
- 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;
- }
-}
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 70af359b0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/java/ClassFileUtil.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Kushal Munir (IBM) - Update javadoc for class.
- *******************************************************************************/
-
-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.
- * <p>
- * @noextend This class is not intended to be subclassed by clients.
- */
-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 stream the input stream representing a class.
- * @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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java
deleted file mode 100644
index f2d20178e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 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.
- *
- * Contributors:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- * Martin Oberhuber (Wind River) - [226374] [api] Need default SystemMessageException specialisations
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- ********************************************************************************/
-package org.eclipse.rse.services.clientserver.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized Strings for common messages that all clients can use.
- * @since 3.0
- */
-public class CommonMessages extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.services.clientserver.messages.CommonMessages";//$NON-NLS-1$
-
-
- public static String MSG_EXCEPTION_OCCURRED;
- public static String MSG_ERROR_UNEXPECTED;
- /**
- * General message format for concatenating a message with a cause
- *
- * @since 3.1
- */
- public static String MSG_FAILURE_WITH_CAUSE;
-
- public static String MSG_COMM_AUTH_FAILED;
- public static String MSG_COMM_AUTH_FAILED_DETAILS;
- public static String MSG_COMM_NETWORK_ERROR;
- public static String MSG_LOCK_TIMEOUT;
-
- public static String MSG_EXPAND_FAILED;
- public static String MSG_EXPAND_CANCELLED;
-
- // operation status
- public static String MSG_OPERATION_RUNNING;
- public static String MSG_OPERATION_FINISHED;
- public static String MSG_OPERTION_STOPPED;
- public static String MSG_OPERATION_DISCONNECTED;
-
- public static String MSG_CONNECT_CANCELLED;
- public static String MSG_CONNECT_PROGRESS;
- public static String MSG_CONNECTWITHPORT_PROGRESS;
- public static String MSG_CONNECT_FAILED;
- public static String MSG_CONNECT_UNKNOWNHOST;
-
- public static String MSG_DISCONNECT_PROGRESS;
- public static String MSG_DISCONNECTWITHPORT_PROGRESS;
- public static String MSG_DISCONNECT_FAILED;
- public static String MSG_DISCONNECT_CANCELLED;
-
- public static String MSG_OPERATION_FAILED;
- public static String MSG_OPERATION_CANCELLED;
- public static String MSG_OPERATION_UNSUPPORTED;
- public static String MSG_OPERATION_SECURITY_VIOLATION;
-
- public static String MSG_ELEMENT_NOT_FOUND;
-
- public static String MSG_RESOLVE_PROGRESS;
-
- public static String MSG_QUERY_PROGRESS;
- public static String MSG_QUERY_PROPERTIES_PROGRESS;
-
- public static String MSG_SET_PROGRESS;
- public static String MSG_SET_PROPERTIES_PROGRESS;
-
- public static String MSG_RUN_PROGRESS;
- public static String MSG_COPY_PROGRESS;
-
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, CommonMessages.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties
deleted file mode 100644
index bf63a500c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-#
-# Contributors:
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-# Xuan Chen (IBM) - [226784] [nls] Review Canceled vs. Cancelled in NLS Strings
-# Martin Oberhuber (Wind River) - [226374] [api] Need default SystemMessageException specialisations
-# Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-
-MSG_EXCEPTION_OCCURRED = An unexpected exception has occurred
-MSG_FAILURE_WITH_CAUSE = {0}: {1}
-
-MSG_COMM_AUTH_FAILED=Invalid password or user ID
-MSG_COMM_AUTH_FAILED_DETAILS=Authentication with {0} failed because the password or user ID is not correct.
-MSG_COMM_NETWORK_ERROR=Operation failed due to network I/O error ''{0}''
-
-MSG_ERROR_UNEXPECTED=An unexpected error occurred.
-MSG_LOCK_TIMEOUT=A timeout occurred while trying to acquire a shared resource.
-
-
-MSG_EXPAND_FAILED = Expand failed. Try again
-MSG_EXPAND_CANCELLED = Expand cancelled. Try again
-
-# operation status
-MSG_OPERATION_RUNNING = {0} - Running
-MSG_OPERATION_FINISHED = {0} - Finished
-MSG_OPERTION_STOPPED = {0} - Cancelled
-MSG_OPERATION_DISCONNECTED = {0} - Disconnected
-MSG_OPERATION_FAILED = Operation failed with exception ''{0}''
-MSG_OPERATION_CANCELLED = Operation cancelled.
-MSG_OPERATION_UNSUPPORTED = Operation not supported: ''{0}''
-MSG_OPERATION_SECURITY_VIOLATION=Operation failed. Security violation on ''{0}''
-
-MSG_ELEMENT_NOT_FOUND = Missing element for {0}: \''{1}\''
-
-# messages
-MSG_CONNECT_PROGRESS = Connecting to {0}
-MSG_CONNECTWITHPORT_PROGRESS = Connecting to {0} at port {1}
-MSG_CONNECT_FAILED = Connect to {0} failed with an unexpected exception
-MSG_CONNECT_UNKNOWNHOST = Connect failed. Host {0} not found or not responding
-MSG_CONNECT_CANCELLED = Connect to {0} was cancelled
-
-MSG_DISCONNECT_PROGRESS = Disconnecting from {0}
-MSG_DISCONNECTWITHPORT_PROGRESS = Disconnecting from {0} at port {1}
-MSG_DISCONNECT_FAILED = Disconnect from {0} failed with exception
-MSG_DISCONNECT_CANCELLED = Disconnect from {0} was cancelled
-
-MSG_RESOLVE_PROGRESS = Resolving {0}
-
-MSG_QUERY_PROGRESS = Querying {0}
-MSG_QUERY_PROPERTIES_PROGRESS = Querying properties
-
-MSG_SET_PROGRESS = Setting {0}
-MSG_SET_PROPERTIES_PROGRESS = Setting properties
-
-MSG_RUN_PROGRESS = Running {0}
-MSG_COPY_PROGRESS = Copying ''{0}'' to ''{1}''
-
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java
deleted file mode 100644
index 488ec5b91..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226374] [api] Need default SystemMessageException specialisations
- ********************************************************************************/
-package org.eclipse.rse.services.clientserver.messages;
-
-/**
- * Common Global Message IDs to be used with the RSE SystemMessages mechanism.
- *
- * Clients may use these IDs when creating message objects, or when calling
- * {@link org.eclipse.rse.ui.SystemBasePlugin#getPluginMessage(String)}. The
- * message IDs uniquely identify a particular situation each, and are used for
- * message translation and context help lookup.
- *
- * @since org.eclipse.rse.services 3.0
- */
-public interface ICommonMessageIds {
-
- public static final String MSG_DISCONNECT_PROGRESS = "RSEG1059"; //$NON-NLS-1$
- public static final String MSG_DISCONNECTWITHPORT_PROGRESS = "RSEG1060"; //$NON-NLS-1$
- public static final String MSG_DISCONNECT_FAILED = "RSEG1061"; //$NON-NLS-1$
- public static final String MSG_DISCONNECT_CANCELLED = "RSEG1062"; //$NON-NLS-1$
-
- public static final String MSG_CONNECT_PROGRESS = "RSEG1054"; //$NON-NLS-1$
- public static final String MSG_CONNECTWITHPORT_PROGRESS = "RSEG1055"; //$NON-NLS-1$
- public static final String MSG_CONNECT_FAILED = "RSEG1056"; //$NON-NLS-1$
- public static final String MSG_CONNECT_UNKNOWNHOST = "RSEG1057"; //$NON-NLS-1$
- public static final String MSG_CONNECT_CANCELLED = "RSEG1058"; //$NON-NLS-1$
-
- 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_OPERATION_UNSUPPORTED = "RSEG9999";//FIXME //$NON-NLS-1$
- public static final String MSG_OPERATION_SECURITY_VIOLATION = "RSEG9999";//FIXME //$NON-NLS-1$
-
- public static final String MSG_EXCEPTION_OCCURRED = "RSEG1003"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_DELETING = "RSEG1063"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_RENAMING = "RSEG1064"; //$NON-NLS-1$
- public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //$NON-NLS-1$
-
- public static final String MSG_ELEMENT_NOT_FOUND = "RSEG9999";//FIXME //$NON-NLS-1$
-
- public static final String MSG_ERROR_UNEXPECTED = "RSEG8002"; //$NON-NLS-1$
- public static final String MSG_LOCK_TIMEOUT = "RSEG9999";//FIXME //$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_NETWORK_ERROR = "RSEC9999"; //FIXME //$NON-NLS-1$
-
- public static final String MSG_EXPAND_FAILED = "RSEG1098"; //$NON-NLS-1$
- public static final String MSG_EXPAND_CANCELLED = "RSEG1067"; //$NON-NLS-1$
-
-
- public static final String MSG_RUN_PROGRESS = "RSEG1071"; //$NON-NLS-1$
-
- public static final String MSG_COPY_PROGRESS = "RSEG1072"; //$NON-NLS-1$
-
-}
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 34fb6d21a..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/IndicatorException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.clientserver.messages;
-
-/**
- * used to indicate that the indicator is not valid.
- * @deprecated This exception is no longer used and client code should not
- * try catching it unless it wants to be compatible with earlier RSE versions.
- */
-public class IndicatorException extends RuntimeException
-{
- /**
- *
- */
- private static final long serialVersionUID = 3884986031505435750L;
-
- public IndicatorException(String text)
- {
- super(text);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SimpleSystemMessage.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SimpleSystemMessage.java
deleted file mode 100644
index 0e309513e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SimpleSystemMessage.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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.
- *
- * Contributors:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [219975] Fix SystemMessage#clone()
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [226773] [apidoc] Specify allowed namespaces for SimpleSystemMessage ID in the Javadoc
- ********************************************************************************/
-package org.eclipse.rse.services.clientserver.messages;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An RSE SystemMessage that can be created from Strings (without XML parsing).
- *
- * @since 3.0
- */
-public class SimpleSystemMessage extends SystemMessage {
-
- private String _pluginId;
- private String _messageId;
-
- /**
- * Creates a String based System Message with severity and ID, but no
- * message details.
- *
- * See {@link #SimpleSystemMessage(String, String, int, String, String)} for
- * a detailed description.
- *
- * @param pluginId the id of the originating plugin
- * @param messageId the RSE-global unique ID or plugin-specific local ID of
- * the message
- * @param severity using IStatus severities
- * @param msg the message text
- */
- public SimpleSystemMessage(String pluginId, String messageId, int severity, String msg) {
- this(pluginId, messageId, severity, msg, (String)null);
- }
-
- /**
- * Creates a String based System Message with severity, ID and String
- * message details.
- *
- * This allows using the RSE Messaging Framework based on simple String
- * messages and IDs, rather than using XML Message files from
- * {@link SystemMessageFile} along with the
- * <code>org.eclipse.rse.ui.SystemBasePlugin#loadMessageFile()</code> and
- * <code>org.eclipse.rse.ui.SystemBasePlugin#getMessage()</code> methods.
- *
- * Clients can use either globally unique RSE message IDs or plugin-specific
- * local IDs. <b>RSE-global message IDs</b> are of the form:
- * RSE&lt;subcomponent&gt;&lt;number&gt;, where the subcomponent is a single
- * character:
- * <ul>
- * <li>"G" for General</li>
- * <li>"O" for Other</li>
- * <li>"F" for Files</li>
- * <li>"C" for Communications</li>
- * </ul>
- * and the number is a four digit number.
- *
- * Some RSE-global message IDs are predefined in {@link ICommonMessageIds}.
- * When used in a SimpleSystemMessage, these common message IDs must be used
- * along with the matching message Strings from {@link CommonMessages}, in
- * order to be consistent to the user. For example:
- *
- * <pre>
- * msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_COMM_AUTH_FAILED, IStatus.ERROR, CommonMessages.MSG_COMM_AUTH_FAILED, NLS.bind(
- * CommonMessages.MSG_COMM_AUTH_FAILED_DETAILS, getHost().getAliasName()));
- * </pre>
- *
- * <b>Plugin-specific local IDs</b> are totally free to be defined by the
- * plugin that creates a specific message, as long as they are not prefixed
- * by "RSE". It is recommended that plugins define unique IDs for various
- * message situations, because this helps problem determination with end
- * users; but it is not a requirement. Local ID's are specific to the plugin
- * ID: relative IDs are qualified by the specified plugin ID, so they live
- * in the plugin ID namespace.
- *
- * @param pluginId the id of the originating plugin
- * @param messageId the RSE-global unique ID or plugin-specific local ID of
- * the message
- * @param severity using IStatus severities
- * @param msg the message text to be logged or displayed to the user
- * @param msgDetails the message details with additional information to be
- * displayed on request only
- */
- public SimpleSystemMessage(String pluginId, String messageId, int severity, String msg, String msgDetails) {
- super("RSE", "G", "-", severityToIndicator(severity), msg, msgDetails); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
-
- _pluginId = pluginId;
- _messageId = messageId;
- }
-
- /**
- * Creates a String based System Message with severity and ID, and an
- * Exception that will be converted into message details.
- *
- * See {@link #SimpleSystemMessage(String, String, int, String, String)} for
- * a detailed description.
- *
- * @param pluginId the id of the originating plugin
- * @param messageId the RSE-global unique ID or plugin-specific local ID of
- * the message
- * @param severity using IStatus severities
- * @param msg the message text
- * @param e an exception to convert into details
- */
- public SimpleSystemMessage(String pluginId, String messageId, int severity, String msg, Throwable e) {
- super("RSE", "G", "-", severityToIndicator(severity), msg, throwableToDetails(e)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _pluginId = pluginId;
- _messageId = messageId;
- }
-
- /**
- * Creates a String based System Message with a severity and plug-in ID, but
- * no global or plug-in specific message ID or detail message.
- *
- * This constructor does not supply a message id. It is preferred that a
- * message id is used since it allows easier identification of a unique
- * message. See
- * {@link #SimpleSystemMessage(String, String, int, String, String)} for a
- * detailed description about messages and ID's.
- *
- * @param pluginId the id of the originating plugin
- * @param severity using IStatus severities
- * @param msg the message text
- */
- public SimpleSystemMessage(String pluginId, int severity, String msg) {
- this(pluginId, severity, msg, (String)null);
- }
-
- /**
- * Creates a String based System Message with a severity and plug-in ID as
- * well as message details, but no global or plug-in specific message ID.
- *
- * This constructor does not supply a message id. It is preferred that a
- * message id is used since it allows easier identification of a unique
- * message. See
- * {@link #SimpleSystemMessage(String, String, int, String, String)} for a
- * detailed description about messages and ID's.
- *
- * @param pluginId the id of the originating plugin
- * @param severity using IStatus severities
- * @param msg the message text
- * @param msgDetails the message details
- */
- public SimpleSystemMessage(String pluginId, int severity, String msg, String msgDetails) {
- super("RSE", "G", "-", severityToIndicator(severity), msg, msgDetails); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
- _pluginId = pluginId;
-
- }
-
- /**
- * Creates a String based System Message with a severity and plug-in ID, as
- * well as an exception to convert into message details, but no global or
- * plug-in specific message ID.
- *
- * This constructor does not supply a message id. It is preferred that a
- * message id is used since it allows easier identification of a unique
- * message. See
- * {@link #SimpleSystemMessage(String, String, int, String, String)} for a
- * detailed description about messages and ID's.
- *
- * @param pluginId the id of the originating plugin
- * @param severity using IStatus severities
- * @param msg the message text
- * @param e an exception to convert into details
- */
- public SimpleSystemMessage(String pluginId, int severity, String msg, Throwable e) {
- super("RSE", "G", "-", severityToIndicator(severity), msg, throwableToDetails(e)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- _pluginId = pluginId;
- }
-
- private static String throwableToDetails(Throwable e){
- // transform exception stack into a string
- StringWriter excWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(excWriter));
- String dmsg = e.toString();
- if ((dmsg == null) || (e instanceof ClassCastException)) dmsg = e.getClass().getName();
- String msgDetails = dmsg + "\n" + excWriter.toString(); //$NON-NLS-1$
- return msgDetails;
- }
-
- private static char severityToIndicator(int severity){
- char ind = COMPLETION;
- if ((severity & IStatus.CANCEL) != 0){
- ind = UNEXPECTED;
- }
- else if ((severity & IStatus.ERROR) != 0){
- ind = ERROR;
- }
- else if ((severity & IStatus.INFO) != 0){
- ind = INFORMATION;
- }
- else if ((severity & IStatus.OK) != 0){
- ind = COMPLETION;
- }
- else if ((severity & IStatus.WARNING) != 0){
- ind = WARNING;
- }
- return ind;
- }
-
- public String getFullMessageID() {
- if (_messageId != null){
- return _messageId;
- }
- else {
- return _pluginId + ":" + getIndicator(); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemElementNotFoundException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemElementNotFoundException.java
deleted file mode 100644
index 43dea579c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemElementNotFoundException.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [233993] Improve EFS error reporting
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-
-/**
- * Exception thrown when an operation was requested on a given remote element,
- * but that element did not exist. Like trying to delete a file that does not
- * exist. The framework may treat such an exception differently than other kinds
- * of exceptions.
- *
- * @since 3.0
- */
-public class SystemElementNotFoundException 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;
-
- /**
- * Constructor for subclasses to use custom messages.
- *
- * @param msg A SystemMessage.
- */
- public SystemElementNotFoundException(SystemMessage msg) {
- super(msg);
- }
-
- /**
- * Constructor.
- *
- * @param element an Absolute Path for the element that could not be found.
- * @param operation Operation about to be performed that failed
- */
- public SystemElementNotFoundException(String element, String operation) {
- super(getMyMessage(IClientServerConstants.PLUGIN_ID, element, operation));
- }
-
- /**
- * Constructor.
- *
- * @param pluginId ID of plugin in which the failure occurred
- * @param element an Absolute Path for the element that could not be found.
- * @param operation Operation about to be performed that failed
- */
- public SystemElementNotFoundException(String pluginId, String element, String operation) {
- super(getMyMessage(pluginId, element, operation));
- }
-
- private static SystemMessage getMyMessage(String pluginId, String element, String operation) {
- //TODO generate an internal backtrace and attach to the message?
- String msgText = NLS.bind(CommonMessages.MSG_ELEMENT_NOT_FOUND, operation, element);
- SystemMessage msg = new SimpleSystemMessage(pluginId,
- ICommonMessageIds.MSG_ELEMENT_NOT_FOUND, IStatus.ERROR, msgText);
- return msg;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java
deleted file mode 100644
index 14c7d2a1e..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Exception thrown when a remote operation requires an exclusive lock on some
- * resources, such as a shared Mutex for some channel, and a timeout occurs
- * acquiring that resource.
- *
- * @since 3.0
- */
-public class SystemLockTimeoutException 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;
-
- /**
- * . * Default Constructor
- *
- * @param pluginId ID of the plugin in which the problem occurred.
- */
- public SystemLockTimeoutException(String pluginId) {
- super(getMyMessage(pluginId, null));
- }
-
- /**
- * Constructor with a detail message.
- *
- * @param pluginId ID of the plugin in which the problem occurred.
- */
- public SystemLockTimeoutException(String pluginId, String detailMsg) {
- super(getMyMessage(pluginId, detailMsg));
- }
-
- private static SystemMessage getMyMessage(String pluginId, String detailMsg) {
- return new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_LOCK_TIMEOUT, IStatus.ERROR, CommonMessages.MSG_LOCK_TIMEOUT, detailMsg);
- }
-
-}
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 9cc191295..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [216252] SystemMessages using RSEStatus
- * Martin Oberhuber (Wind River) - [219975] Fix SystemMessage#clone()
- *******************************************************************************/
-
-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
- */
- public SystemMessage(String comp, String sub, String number, char ind, String l1, String l2) {
- component = comp.toUpperCase();
- subComponent = sub.toUpperCase();
- messageNumber = number.toUpperCase();
- try {
- setIndicator(ind);
- }
- catch (IndicatorException e)
- {
- indicator = UNEXPECTED;
- }
- if (l1 != null){
- level1NS = l1.trim();
- level1WS = l1.trim();
- }
- if (l2 != null){
- level2NS = l2.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.")); //$NON-NLS-1$
- 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;
- }
-
-
- /**
- * 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; //$NON-NLS-1$
- 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 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(); //$NON-NLS-1$
- }
-
- /**
- * 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 ""; //$NON-NLS-1$
-
- 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(); //$NON-NLS-1$
- }
-
- return sub.toString();
- }
-
-}
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 29609f9ee..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- *******************************************************************************/
-
-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;
- }
-
-
- /**
- * Set the SystemMessage being wrapped
- * @param msg the SystemMessage wrapped by this SystemMessageException
- */
- public void setSystemMessage(SystemMessage msg)
- {
- this.msg = msg;
- }
-
-}
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 a07b87a25..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java
+++ /dev/null
@@ -1,864 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup
- * Martin Oberhuber (Wind River) - [246406] Thread-safe support for Lazy Loading
- *******************************************************************************/
-
-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.net.URL;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.List;
-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
-{
-
- /**
- * List<MessageFileInfo> of loaded message files to avoid double loading.
- * Must be synchronized since queried from multiple Threads.
- */
- private static final List msgfList = Collections.synchronizedList(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"; //$NON-NLS-1$
- private static final String XML_TAG_SUBCOMPONENT = "Subcomponent"; //$NON-NLS-1$
- private static final String XML_TAG_MESSAGeList = "MessageList"; //$NON-NLS-1$
- private static final String XML_TAG_MESSAGE = "Message"; //$NON-NLS-1$
- private static final String XML_TAG_LEVELONE = "LevelOne"; //$NON-NLS-1$
- private static final String XML_TAG_LEVELTWO = "LevelTwo"; //$NON-NLS-1$
- private static final String XML_ATTR_ABBR = "Abbr"; //$NON-NLS-1$
- private static final String XML_ATTR_ID = "ID"; //$NON-NLS-1$
- private static final String XML_ATTR_INDICATOR = "Indicator"; //$NON-NLS-1$
- private static final String XML_ATTR_NAME = "Name"; //$NON-NLS-1$
-
- // when using lazy loading, this is the thread that loads the message file
- private final Thread fLoadThread;
-
- // indicates whether the lazy load thread is done
- private boolean fLoadThreadFinished = false;
-
- /**
- * File info node in msgfList to avoid duplicate loading.
- * Thread-safe since immutable.
- */
- private static class MessageFileInfo
- {
- private final String filename;
- private final String shortName;
- private final Document xmlDocument;
-
- 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;
- }
- }
-
- /**
- * Thread for loading a message file asynchronously.
- *
- * Opens Streams, creates an internal message file info object holding the
- * DTD, and closes Streams. In case of error, the message file info object
- * is not set (remains <code>null</code>).
- *
- * As a result,
- * <ul>
- * <li>The {@link #msgFile} variable is set to the loaded message file info
- * node if successful.</li>
- * <li>The {@link #fLoadThreadFinished} is guaranteed to be set
- * <code>true</code>.</li>
- * <li>All waiting Threads are notified.</li>
- * </ul>
- */
- private class LoadThread extends Thread {
- private URL _messageFileURL;
- private URL _dtdURL;
- private String _messageFileName;
-
- public LoadThread(String messageFileName, URL messageFileURL, URL dtdURL) {
- _messageFileName = messageFileName;
- _messageFileURL = messageFileURL;
- _dtdURL = dtdURL;
- }
-
- public void run() {
- InputStream messageFile = null;
- InputStream dtdFile = null;
- try {
- messageFile = _messageFileURL.openStream();
- dtdFile = _dtdURL.openStream();
- SystemMessageFile realFile = new SystemMessageFile(_messageFileName, messageFile, dtdFile);
- msgFile = realFile.msgFile;
- } catch (IOException e) {
- // problem loading message file -- msgFile is not set.
- } finally {
- // Notify that work is finished before closing Streams -
- // Avoid not getting this set due to a RuntimeError
- synchronized (this) {
- fLoadThreadFinished = true;
- notifyAll();
- }
- if (messageFile != null) {
- try {
- safeClose(messageFile);
- } finally {
- if (dtdFile != null)
- safeClose(dtdFile);
- }
- }
- }
- }
-
- private void safeClose(InputStream s) {
- try {
- s.close();
- } catch (IOException e) {
- /* ignore */
- }
- }
- }
-
-
-
- /**
- * Constructor to use for lazy loading of a system message file.
- *
- * The difference between the {@link #SystemMessageFile(String,InputStream,InputStream)}
- * constructor and this one is that the former loads the message file synchronously while
- * this one loads the message file in a thread. The message file and DTD URLs are passed
- * in here so that the opening of their input streams can be deferred until the time when
- * the worker thread is started and able to load the message file.
- *
- * @param messageFileName the name of the system message file
- * @param msgFileURL the URL to the message file
- * @param dtdURL the URL to the DTD for the message file
- *
- * @since 3.1
- */
- public SystemMessageFile(final String messageFileName, final URL msgFileURL, final URL dtdURL)
- {
- // have we already loaded this message file?
- msgFile = getFromCache(messageFileName);
- if (msgFile == null){
- // will set msgFile variable and fLoadThreadFinished when done
- fLoadThread = new LoadThread(messageFileName, msgFileURL, dtdURL);
- fLoadThread.start();
- }
- else { // there's already a cached message file for this
- // no need to load it, just use the msgFile
- fLoadThread = null;
- }
- }
-
-
- /**
- * 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
- }
- fLoadThread = null;
- }
-
- /**
- * If the named message file has already been loaded return its
- * MessageFileInfo
- * @param messageFileName name of the message file
- * @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;
- }
-
- /**
- * Waits until the message file is loaded or canceled due to error
- */
- private void waitUntilLoaded() {
- // fastpath: returns immediately if constructed synchronously
- if (fLoadThread != null) {
- // asynchronous load pending: wait until loaded or load canceled
- synchronized (fLoadThread) {
- while (!fLoadThreadFinished) {
- try {
- fLoadThread.wait();
- } catch (InterruptedException e) {
- // ignore since the Thread is guaranteed to finish
- }
- }
- }
- }
- }
-
- /**
- * Use this method to retrieve a message from the message file. If this
- * SystemMessageFile loaded from a thread, then the method will wait until
- * the loading is complete before returning 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.
- * @return SystemMessage the SysteMessage object that corresponds to the
- * message ID
- */
- public SystemMessage getMessage(String msgId)
- {
- waitUntilLoaded();
- boolean echoErrorsToStandardOut = true;
- // DY Defect 42605
- if (msgFile == null || 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(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=""; //$NON-NLS-1$
- String msgL2=""; //$NON-NLS-1$
-
- // 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;
- }
-
- msg = loadSystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2);
- messages.put(msgId, msg); // add to cache so we find it immediately next time!!
- return msg;
- }
- }
- 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
- * @see SystemMessage for message type indicator constants
- */
- protected SystemMessage loadSystemMessage(String componentAbbr, String subComponentAbbr, String msgNumber, char msgIndicator,
- String msgL1, String msgL2)
- {
- return new SystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2);
- }
-
- /**
- * Get the level one text
- */
- private String getNodeText(Node msgNode)
- {
- String nodeText = ""; //$NON-NLS-1$
- 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;
- waitUntilLoaded();
- if (msgFile == null || 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;
- waitUntilLoaded();
- if (msgFile == null || 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>"); //$NON-NLS-1$ //$NON-NLS-2$
- outFileStream.println("<style type=\"text/css\">"); //$NON-NLS-1$
- outFileStream.println("h2 { background-color: #CCCCFF }"); //$NON-NLS-1$
- outFileStream.println("</style>"); //$NON-NLS-1$
- outFileStream.println("</HEAD> <BODY>"); //$NON-NLS-1$
- outFileStream.println("<H1>"+componentElement.getAttribute(XML_ATTR_NAME)+" Messages</H1>"); //$NON-NLS-1$ //$NON-NLS-2$
- outFileStream.println("<br>"); //$NON-NLS-1$
- outFileStream.println("<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\" WIDTH=\"100%\">"); //$NON-NLS-1$
- outFileStream.println("<TR BGCOLOR=\"#CCCCFF\">"); //$NON-NLS-1$
- outFileStream.println("<TD COLSPAN=2><FONT SIZE=\"+2\">"); //$NON-NLS-1$
- outFileStream.println("<B>Sub-Component Summary</B></FONT></TD>"); //$NON-NLS-1$
- outFileStream.println("</TR>"); //$NON-NLS-1$
- }
- 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\">"); //$NON-NLS-1$
- outFileStream.println("<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\">"); //$NON-NLS-1$
- outFileStream.println("<A href=#"+scName+">"+scName+"</A></TD>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- outFileStream.println("<TD><b>Message prefix</b>="+msgPrefix+"</TD></TR>"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- outFileStream.println("</TABLE>"); //$NON-NLS-1$
-
- // 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>"); //$NON-NLS-1$
- String scName = subComponentElement.getAttribute(XML_ATTR_NAME);
- outFileStream.println("<A NAME=\""+scName+"\"><!-- --></A><H2>"+scName+" Messages</H2>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- 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"; //$NON-NLS-1$
- 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 = ""; //$NON-NLS-1$
- String msgL2 = ""; //$NON-NLS-1$
- // 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>"); //$NON-NLS-1$ //$NON-NLS-2$
- outFileStream.println("<b>Severity: </b>"+msgSeverity+"<br>"); //$NON-NLS-1$ //$NON-NLS-2$
- outFileStream.println("<b>LevelOne: </b>"+msgL1+"<br>"); //$NON-NLS-1$ //$NON-NLS-2$
- outFileStream.println("<b>LevelTwo: </b>"+msgL2+"<br>"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- outFileStream.println("<br>"); //$NON-NLS-1$
- }
- outFileStream.println("</BODY></HTML>"); //$NON-NLS-1$
- 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"); //$NON-NLS-1$
- 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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java
deleted file mode 100644
index 5ff5c5f49..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemNetworkIOException.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-
-/**
- * Exception thrown in case of errors due to network I/O Problems.
- *
- * @since 3.0
- */
-public class SystemNetworkIOException extends SystemRemoteMessageException {
- /**
- * 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;
-
- /**
- * Default Constructor.
- * Clients are encouraged to use the more specific constructor with pluginId instead of this one.
- *
- *
- * @param remoteException exception from communication layer.
- */
- public SystemNetworkIOException(Exception remoteException) {
- super(getMyMessage(IClientServerConstants.PLUGIN_ID, remoteException), remoteException);
- }
-
- /**
- * Constructor with a plugin ID and exception cause.
- *
- * @param pluginId Plugin ID that caused the error.
- * @param remoteException exception from communication layer.
- */
- public SystemNetworkIOException(String pluginId, Exception remoteException) {
- super(getMyMessage(pluginId, remoteException), remoteException);
- }
-
- private static SystemMessage getMyMessage(String pluginId, Exception remoteException) {
-
- String message = remoteException.getMessage();
- if (message == null) {
- message = remoteException.getClass().getName();
- } else {
- // TODO Most remote messages like IOException don't have a message
- // that's understandable without the class type. For full translated
- // messages, code like in the Eclipse Team/CVS provider would need
- // to translate into readable messages. See also
- // o.e.tm.terminal.ssh/SshMessages#getMessageFor(Throwable).
- message = remoteException.getClass().getName() + ": " + message; //$NON-NLS-1$
- }
- String msgTxt = NLS.bind(CommonMessages.MSG_COMM_NETWORK_ERROR, message);
-
- String secondLevel = null;
- Throwable cause = remoteException.getCause();
- if (cause != null) {
- secondLevel = cause.getMessage();
- if (secondLevel == null) {
- secondLevel = cause.getClass().getName();
- if (secondLevel.equals(message)) {
- secondLevel = null;
- }
- }
- }
- SystemMessage msg = new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_COMM_NETWORK_ERROR, IStatus.ERROR, msgTxt, secondLevel);
- return msg;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationCancelledException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationCancelledException.java
deleted file mode 100644
index 33d03cba2..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationCancelledException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226374] [api] Derived from RemoteFileCancelledException
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-
-/**
- * Exception thrown when attempting an operation and the user cancelled it
- * before it could be completed.
- *
- * @since 3.0
- */
-public class SystemOperationCancelledException 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 static SystemMessage myMessage = null;
-
- /**
- * Constructor.
- */
- public SystemOperationCancelledException() {
- super(getMyMessage());
- }
-
- private static SystemMessage getMyMessage() {
- if (myMessage == null) {
- myMessage = new SimpleSystemMessage(IClientServerConstants.PLUGIN_ID, ICommonMessageIds.MSG_OPERATION_CANCELLED, IStatus.ERROR,
- CommonMessages.MSG_OPERATION_CANCELLED);
- }
- return myMessage;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationFailedException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationFailedException.java
deleted file mode 100644
index c60585db5..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemOperationFailedException.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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) - [227135] Cryptic exception when sftp-server is missing
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.services.clientserver.IClientServerConstants;
-
-/**
- * Generic exception thrown when anything fails and a child exception is
- * available to provide exception details.
- * <p>
- * The original remote system's exception message is always embedded and
- * retrievable via getRemoteException().
- *
- * @since 3.0
- */
-public class SystemOperationFailedException extends SystemRemoteMessageException {
- /**
- * 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;
-
- /**
- * Default Constructor.
- * Clients are encouraged to use the more specific constructor with pluginId and operationPerformed instead of this one.
- *
- * @param remoteException the initial cause of this exception
- */
- public SystemOperationFailedException(Exception remoteException) {
- super(getMyMessage(IClientServerConstants.PLUGIN_ID, null, remoteException), remoteException);
- }
-
- /**
- * Constructor with plugin ID and plain text failure information. Clients
- * are encouraged to use the more specific constructor with pluginId and
- * remoteException instead of this one.
- *
- * @param msg message about failed operation
- */
- public SystemOperationFailedException(String pluginId, String msg) {
- super(getMyMessage(pluginId, msg, null), null);
- }
-
- /**
- * Constructor with plugin ID.
- * Clients are encouraged to use the more specific constructor with pluginId and operationPerformed instead of this one.
- *
- * @param remoteException the initial cause of this exception
- */
- public SystemOperationFailedException(String pluginId, Exception remoteException) {
- super(getMyMessage(pluginId, null, remoteException), remoteException);
- }
-
- /**
- * Constructor with plugin ID and user message.
- *
- * @param pluginId ID of the plugin issuing the message.
- * @param userMessage user-readable message detailing cause of the
- * exception, or <code>null</code>. If not specified, a generic
- * message will be used ("Operation failed with exception").
- * @param remoteException the initial cause of this exception. Will be added
- * to the user message.
- */
- public SystemOperationFailedException(String pluginId, String userMessage, Exception remoteException) {
- super(getMyMessage(pluginId, userMessage, remoteException), remoteException);
- }
-
- private static SystemMessage getMyMessage(String pluginId, String userMessage, Exception remoteException) {
-
- String exceptionMessage = null;
- String secondLevel = null;
- if (remoteException != null) {
- exceptionMessage = remoteException.getMessage();
- if (exceptionMessage == null) {
- exceptionMessage = remoteException.getClass().getName();
- }
- Throwable cause = remoteException.getCause();
- if (cause != null) {
- secondLevel = cause.getMessage();
- if (secondLevel == null) {
- secondLevel = cause.getClass().getName();
- if (secondLevel.equals(exceptionMessage)) {
- secondLevel = null;
- }
- }
- }
- }
- String msgTxt = userMessage;
- if (msgTxt == null) {
- // no user text -- use standard message with (non-localized)
- // exception message + second level
- msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, exceptionMessage);
- } else if (secondLevel == null) {
- // user text but no second level -- move exception text to 2nd level
- secondLevel = exceptionMessage;
- } else {
- // user text, exception and second level -- concatenate user text
- // and exception
- msgTxt = NLS.bind(CommonMessages.MSG_FAILURE_WITH_CAUSE, userMessage, exceptionMessage);
- }
-
- SystemMessage msg = new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_OPERATION_FAILED,
- IStatus.ERROR, msgTxt, secondLevel);
- return msg;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteMessageException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteMessageException.java
deleted file mode 100644
index fde810e4c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteMessageException.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [226374] [api] Derived from RemoteFileException
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.messages;
-
-
-/**
- * Base class for remote system exceptions.
- * <p>
- * All remote system 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 embedded exception that is the
- * original exception from the remote system.
- * <p>
- * Use {#link getRemoteException()} to retrieve that wrapped exception, if any.
- *
- * @since 3.0
- */
-public class SystemRemoteMessageException 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 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 SystemRemoteMessageException(SystemMessage msg, Exception remoteException) {
- super(msg);
- wrappedException = remoteException;
- }
-
- /**
- * Constructor with a plain text message, and a wrapped exception.
- *
- * @param msg The fully resolved message
- * @param remoteException The exception to contain within this exception
- */
- public SystemRemoteMessageException(String msg, Exception remoteException) {
- super(msg);
- wrappedException = remoteException;
- }
-
- /**
- * @return the original remote exception
- */
- public Exception getRemoteException() {
- return wrappedException;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteSecurityException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteSecurityException.java
deleted file mode 100644
index 9c627e7f8..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemRemoteSecurityException.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226374] Derived from RemoteFileSecurityException
- *******************************************************************************/
-
-package org.eclipse.rse.services.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * 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().
- *
- * @since 3.0
- */
-public class SystemRemoteSecurityException extends SystemRemoteMessageException {
- /**
- * 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;
-
- /**
- * Constructor with plugin ID and operation being performed.
- *
- * @param pluginId ID of the plugin which detected the security violation
- * @param operationPerformed element or operation which could not be
- * accessed due to security restriction
- * @param remoteException the initial cause of this exception
- */
- public SystemRemoteSecurityException(String pluginId, String operationPerformed, Exception remoteException) {
- super(getMyMessage(pluginId, operationPerformed, remoteException), remoteException);
- }
-
- private static SystemMessage getMyMessage(String pluginId, String operationPerformed, Exception remoteException) {
-
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, operationPerformed);
-
- String detailMessage = remoteException.getMessage();
- if (detailMessage == null) {
- detailMessage = remoteException.getClass().getName();
- }
- String secondLevel = null;
- Throwable cause = remoteException.getCause();
- if (cause != null) {
- secondLevel = cause.getMessage();
- if (secondLevel == null) {
- secondLevel = cause.getClass().getName();
- if (secondLevel.equals(detailMessage)) {
- secondLevel = null;
- }
- }
- }
- if (secondLevel != null) {
- // FIXME Use MessageFormat
- detailMessage = detailMessage + " : " + secondLevel; //$NON-NLS-1$
- }
- SystemMessage msg = new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_OPERATION_SECURITY_VIOLATION, IStatus.ERROR, msgTxt, secondLevel);
- return msg;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnexpectedErrorException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnexpectedErrorException.java
deleted file mode 100644
index f13a09019..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnexpectedErrorException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Exception thrown when the cause for a problem can not be determined.
- *
- * This class should be used rarely, because it's always better to tell users as
- * explicitly as possible what went wrong. It's usually used as a temporary
- * workaround while the time for finding a proper error message is not
- * available.
- *
- * @since 3.0
- */
-public class SystemUnexpectedErrorException 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;
-
- /**
- * Default Constructor.
- *
- * @param pluginId ID of the plugin in which the unexpected error was
- * cought.
- */
- public SystemUnexpectedErrorException(String pluginId) {
- super(getMyMessage(pluginId));
- }
-
- private static SystemMessage getMyMessage(String pluginId) {
- return new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_ERROR_UNEXPECTED, IStatus.ERROR, CommonMessages.MSG_ERROR_UNEXPECTED);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnsupportedOperationException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnsupportedOperationException.java
deleted file mode 100644
index 370ed3dd2..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemUnsupportedOperationException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.clientserver.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Exception thrown when an operation is requested from a Service that is not
- * supported by that service.
- *
- * @since 3.0
- */
-public class SystemUnsupportedOperationException 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;
-
- /**
- * Constructor.
- *
- * @param pluginId ID of the plugin not supporting requested operation.
- * @param operation The operation being requested
- */
- public SystemUnsupportedOperationException(String pluginId, String operation) {
- super(getMyMessage(pluginId, operation));
- }
-
- private static SystemMessage getMyMessage(String pluginId, String operation) {
-
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_UNSUPPORTED, operation);
- SystemMessage msg = new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_OPERATION_UNSUPPORTED, IStatus.ERROR, msgTxt);
- return msg;
- }
-
-}
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 6d1a05752..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/HostProcessFilterImpl.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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) - [219975] Fix implementations of clone()
- * Martin Oberhuber (Wind River) - [220041][api][breaking] Get rid of IHostProcessFilter#getStates()
- *******************************************************************************/
-
-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()}.
- * <p>
- * Clients may instantiate or subclass this class. When subclassing, clients need to
- * ensure that the subclass is always capable of performing a deep clone
- * operation with the {@link #clone()} method, so if they add fields of
- * complex type, these need to be dealt with by overriding {@link #clone()}.
- */
-public class HostProcessFilterImpl implements IHostProcessFilter, Cloneable
-{
-
- public static final String ALL = "*"; //$NON-NLS-1$
-
- 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 < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
- {
- states.put(ISystemProcessRemoteConstants.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 = ""; //$NON-NLS-1$
- }
-
- protected void initInput(String input)
- {
- anystatus = true;
- StringTokenizer tz = new StringTokenizer(input, "|"); //$NON-NLS-1$
- String strMinVM = "0"; //$NON-NLS-1$
- String strMaxVM = "-1"; //$NON-NLS-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("")) //$NON-NLS-1$
- {
- String[] allStates = status.split(","); //$NON-NLS-1$
- 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("")) //$NON-NLS-1$
- name = ALL;
-
- if (username == null || username.equals("")) //$NON-NLS-1$
- username = ALL;
-
- if (gid == null || gid.equals("")) //$NON-NLS-1$
- gid = ALL;
-
- if (ppid == null || ppid.equals("")) //$NON-NLS-1$
- ppid = ALL;
-
- if (pid == null || pid.equals("")) //$NON-NLS-1$
- 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;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getName()
- */
- public String getName()
- {
- return name;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getUsername()
- */
- public String getUsername()
- {
- if (_resolveVariables && username.equals("${user.id}")) //$NON-NLS-1$
- {
- return ALL;
- }
- else return username;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getGid()
- */
- public String getGid()
- {
- return gid;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getPpid()
- */
- public String getPpid()
- {
- return ppid;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getPid()
- */
- public String getPid()
- {
- return pid;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getAnyStatus()
- */
- public boolean getAnyStatus()
- {
- return anystatus;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getMinVM()
- */
- public String getMinVM()
- {
- return "" + minVM; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getMaxVM()
- */
- public String getMaxVM()
- {
- return "" + maxVM; //$NON-NLS-1$
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setName(java.lang.String)
- */
- public void setName(String obj)
- {
- name = obj;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setUsername(java.lang.String)
- */
- public void setUsername(String obj)
- {
- username = obj;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setGid(java.lang.String)
- */
- public void setGid(String obj)
- {
- gid = obj;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setPpid(java.lang.String)
- */
- public void setPpid(String obj)
- {
- ppid = obj;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setPid(java.lang.String)
- */
- public void setPid(String obj)
- {
- pid = obj;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setAnyStatus()
- */
- public void setAnyStatus()
- {
- anystatus = true;
- initStates();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setMinVM(java.lang.String)
- */
- public void setMinVM(String strMinVM)
- {
- try
- {
- minVM = Long.parseLong(strMinVM);
- }
- catch (Exception e)
- {
- minVM = 0;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setMaxVM(java.lang.String)
- */
- 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; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- }
-
- protected String toStateString()
- {
- String s = " "; //$NON-NLS-1$
-
- if (!anystatus)
- {
- for (int i = 0; i < ISystemProcessRemoteConstants.ALL_STATES_STR.length; i++)
- {
- Boolean currentState = (Boolean) states.get(ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
- if (currentState.booleanValue()) s = s + ISystemProcessRemoteConstants.ALL_STATES_STR[i];
- if (currentState.booleanValue()) s = s + ","; //$NON-NLS-1$
- }
- if (!s.trim().equals("")) s = s.trim(); //$NON-NLS-1$
- if (s.endsWith(",")) s = s.substring(0, s.length() - 1); //$NON-NLS-1$
- }
- return s;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#allows(java.lang.String)
- */
- public boolean allows(String status)
- {
- NamePatternMatcher matcher = null;
- String[] tokens = status.split("\\|"); //$NON-NLS-1$
- if (tokens.length < (ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT -1)) return false;
-
- matcher = new NamePatternMatcher(gid, true, false);
- if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID])) return false;
-
- matcher = new NamePatternMatcher(name, true, false);
- if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME])) return false;
-
- String state = tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS].trim();
- if (!satisfiesState(state)) return false;
-
- if (getUsername().equals("${user.id}")) //$NON-NLS-1$
- matcher = new NamePatternMatcher(ALL, true, false);
- else
- matcher = new NamePatternMatcher(getUsername(), true, false);
- if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME])) return false;
- matcher = new NamePatternMatcher(ppid, true, false);
- if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID])) return false;
- matcher = new NamePatternMatcher(pid, true, false);
- if (!matcher.matches(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID])) return false;
- long vmSize = 0;
- try
- {
- vmSize = Long.parseLong(tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
- }
- catch (Exception e)
- {
- if (tokens[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE].trim().equals("")) vmSize = 0; //$NON-NLS-1$
- else return false;
- }
- if (!(vmSize >= minVM)) return false;
- if (maxVM > -1 && !(vmSize <= maxVM)) return false;
-
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#getSpecificState(java.lang.String)
- */
- public boolean getSpecificState(String stateCode)
- {
- if (anystatus) return true;
- Boolean state = (Boolean) states.get(stateCode);
- if (state == null) return false;
- return state.booleanValue();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#setSpecificState(java.lang.String)
- */
- public void setSpecificState(String stateCode)
- {
- anystatus = false;
- initStates();
- states.put(stateCode, new Boolean(true));
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcessFilter#satisfiesState(java.lang.String)
- */
- public boolean satisfiesState(String stateString)
- {
- if (!anystatus)
- {
- String[] allStates = stateString.split(","); //$NON-NLS-1$
- 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;
- }
-
- /**
- * Return an identical (deep) copy of this filter.
- *
- * Subclasses must ensure that such a deep copy operation is always
- * possible, so their state must always be cloneable. Which should
- * always be possible to achieve, since this Object also needs to be
- * serializable.
- */
- public Object clone() {
- HostProcessFilterImpl clone = null;
- try {
- clone = (HostProcessFilterImpl)super.clone();
- } catch (CloneNotSupportedException e) {
- //assert false; //can never happen
- throw new RuntimeException(e);
- }
- if (states!=null) {
- clone.states = (HashMap)states.clone();
- }
- return clone;
- }
-}
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 db65d9ad1..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/IHostProcessFilter.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [220041][api][breaking] Get rid of IHostProcessFilter#getStates()
- ********************************************************************************/
-
-package org.eclipse.rse.services.clientserver.processes;
-
-
-public interface IHostProcessFilter
-{
- /**
- * 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 individual 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);
-
- /**
- * Check whether this filter requires that the given state is set.
- * @param stateCode state code to check. One of the String constants
- * in {@link ISystemProcessRemoteConstants#ALL_STATES_STR}.
- */
- public boolean getSpecificState(String stateCode);
-
- /**
- * Change this filter such that it requires the given state to be set.
- * @param stateCode state code to check. One of the String constants
- * in {@link ISystemProcessRemoteConstants#ALL_STATES_STR}.
- */
- public void setSpecificState(String stateCode);
-
- /**
- * Check whether a given process state String matches this filter.
- * @param stateString A state String, holding a list of state constants
- * from {@link ISystemProcessRemoteConstants#ALL_STATES_STR},
- * separated by comma (",").
- */
- public boolean satisfiesState(String stateString);
-} \ 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 5c67c5a38..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteConstants.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [cleanup] add API "since" tags
- *******************************************************************************/
-
-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", //$NON-NLS-1$
- "ISTATE_IDLE", //$NON-NLS-1$
- "OSTATE_NONEXISTENT", //$NON-NLS-1$
- "WSTATE_PAGING", //$NON-NLS-1$
- "RSTATE_RUNNING", //$NON-NLS-1$
- "SSTATE_SLEEPING", //$NON-NLS-1$
- "TSTATE_TRACED", //$NON-NLS-1$
- "DSTATE_WAITING", //$NON-NLS-1$
- "ZSTATE_ZOMBIE", //$NON-NLS-1$
- "1STATE_ZOS_SINGLE", //$NON-NLS-1$
- "ASTATE_ZOS_MSGQRECEIVEWAIT", //$NON-NLS-1$
- "BSTATE_ZOS_MSGQSENDWAIT", //$NON-NLS-1$
- "CSTATE_ZOS_COMSYSKERNELWAIT", //$NON-NLS-1$
- "DSTATE_ZOS_SEMAPHOREWAIT", //$NON-NLS-1$
- "ESTATE_ZOS_QUIESCEFROZEN", //$NON-NLS-1$
- "FSTATE_ZOS_FILESYSKERNELWAIT", //$NON-NLS-1$
- "GSTATE_ZOS_MVSPAUSEWAIT", //$NON-NLS-1$
- "HSTATE_ZOS_PTHREADCREATEDTASKS", //$NON-NLS-1$
- "ISTATE_ZOS_SWAPPEDOUT", //$NON-NLS-1$
- "JSTATE_ZOS_PTHREADCREATED", //$NON-NLS-1$
- "KSTATE_ZOS_OTHERKERNELWAIT", //$NON-NLS-1$
- "LSTATE_ZOS_CANCELLED", //$NON-NLS-1$
- "MSTATE_ZOS_MULTITHREAD", //$NON-NLS-1$
- "NSTATE_ZOS_MEDIUMWEIGHTTHREAD", //$NON-NLS-1$
- "OSTATE_ZOS_ASYNCHRONOUSTHREAD", //$NON-NLS-1$
- "PSTATE_ZOS_PTRACEKERNELWAIT", //$NON-NLS-1$
- "RSTATE_ZOS_RUNNING", //$NON-NLS-1$
- "SSTATE_ZOS_SLEEPING", //$NON-NLS-1$
- "TSTATE_ZOS_STOPPED", //$NON-NLS-1$
- "USTATE_ZOS_INITIALPROCESSTHREAD", //$NON-NLS-1$
- "VSTATE_ZOS_DETACHED", //$NON-NLS-1$
- "WSTATE_ZOS_WAITINGFORCHILD", //$NON-NLS-1$
- "XSTATE_ZOS_FORKING", //$NON-NLS-1$
- "YSTATE_ZOS_MVSWAIT", //$NON-NLS-1$
- "ZSTATE_ZOS_ZOMBIE" //$NON-NLS-1$
- };
-
- public static final String PROCESS_MINER_ERROR_NO_HANDLER = "No handler for this system type"; //$NON-NLS-1$
- public static final String PROCESS_MINER_SUCCESS = "SUCCESS"; //$NON-NLS-1$
-
- public static final String PROCESS_SIGNAL_TYPE_DEFAULT = "default"; //$NON-NLS-1$
-}
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 4fc8f7c2c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/ISystemProcessRemoteTypes.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.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"; //$NON-NLS-1$
-
- // -----------
- // TYPES...
- // -----------
-
- /**
- * A process object
- */
- public static final String TYPE_PROCESS = "process"; //$NON-NLS-1$
-
- /**
- * A root process object
- */
- public static final String TYPE_ROOT = "rootprocess"; //$NON-NLS-1$
-
-}
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 7a5a24fd6..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/ProcessHandlerManager.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [175293] [dstore] Processes do not work on Dstore-UNIX connection to Solaris
- *******************************************************************************/
-
-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(); //$NON-NLS-1$
-
- if (osName.startsWith("linux")) return new UniversalLinuxProcessHandler(); //$NON-NLS-1$
- else if (osName.startsWith("aix")) return new UniversalAIXProcessHandler(); //$NON-NLS-1$
- else if (osName.startsWith("z/os")) return new UniversalZOSProcessHandler(); //$NON-NLS-1$
- else if (osName.startsWith("mac os x")) return new UniversalMacOSXProcessHandler(); //$NON-NLS-1$
- else if (osName.startsWith("sun")) return new UniversalSolarisProcessHandler(); //$NON-NLS-1$
- return null;
-
- }
-}
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 57a6c78c2..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalAIXProcessHandler.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.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
-{
- private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","s","rss"}; //$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$
- private static final String firstColumnHeader = "PID"; //$NON-NLS-1$
- protected HashMap _usernamesByUid;
- protected HashMap _uidsByUserName;
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for AIX platforms.
- */
- public UniversalAIXProcessHandler()
- {
- stateMap = new HashMap();
- for (int i = ISystemProcessRemoteConstants.STATE_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.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 "; //$NON-NLS-1$
- for (int i = 0; i < processAttributes.length; i++)
- {
- cmdLine = cmdLine + processAttributes[i];
- if ((processAttributes.length - i > 1)) cmdLine = cmdLine + ","; //$NON-NLS-1$
- }
- // run the command and get output
- Process ps = Runtime.getRuntime().exec(cmdLine);
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
-
- BufferedReader reader = new BufferedReader(isr);
-
- String nextLine = reader.readLine();
- if (nextLine != null && nextLine.trim().startsWith(firstColumnHeader)) nextLine = reader.readLine();
- while (nextLine != null)
- {
- String statusLine = ""; //$NON-NLS-1$
- // 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"); //$NON-NLS-1$
- statusLine = pid + "|"; //$NON-NLS-1$
-
- // add the name to the status string
- String name = (String) psLineContents.get("comm"); //$NON-NLS-1$
- if (name == null) name = " "; //$NON-NLS-1$
- statusLine = statusLine + name + "|"; //$NON-NLS-1$
-
- // add the status letter to the status string
- String state = (String) psLineContents.get("s"); //$NON-NLS-1$
- if (state == null) state = " "; //$NON-NLS-1$
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|"; //$NON-NLS-1$
-
- // add the Tgid
- String tgid = (String) psLineContents.get("tgid"); //$NON-NLS-1$
- if (tgid == null) tgid = " "; //$NON-NLS-1$
- statusLine = statusLine + tgid + "|"; //$NON-NLS-1$
-
- // add the Ppid
- String pPid = (String) psLineContents.get("ppid"); //$NON-NLS-1$
- if (pPid == null) pPid = " "; //$NON-NLS-1$
- statusLine = statusLine + pPid + "|"; //$NON-NLS-1$
-
- // add the TracerPid
- String tracerpid = (String) psLineContents.get("tracerpid"); //$NON-NLS-1$
- if (tracerpid == null) tracerpid = " "; //$NON-NLS-1$
- statusLine = statusLine + tracerpid + "|"; //$NON-NLS-1$
-
- String uid = (String) psLineContents.get("uid"); //$NON-NLS-1$
- if (uid == null) uid = " "; //$NON-NLS-1$
- statusLine = statusLine + uid + "|"; // add the uid to the status string //$NON-NLS-1$
-
- String username = (String) psLineContents.get("user"); //$NON-NLS-1$
- if (username == null) username = " "; //$NON-NLS-1$
- statusLine = statusLine + username + "|"; // add the username to the status string //$NON-NLS-1$
-
- // add the gid to the status string
- String gid = (String) psLineContents.get("gid"); //$NON-NLS-1$
- if (gid == null) gid = " "; //$NON-NLS-1$
- statusLine = statusLine + gid + "|"; //$NON-NLS-1$
-
- // add the VmSize to the status string
- String vmsize = (String) psLineContents.get("vsz"); //$NON-NLS-1$
- if (vmsize == null) vmsize = " "; //$NON-NLS-1$
- statusLine = statusLine + vmsize + "|"; //$NON-NLS-1$
-
- // add the VmRSS to the status string
- String vmrss = (String) psLineContents.get("rss"); //$NON-NLS-1$
- if (vmrss == null) vmrss = " "; //$NON-NLS-1$
- 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+"); //$NON-NLS-1$
- 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(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT)) type = ""; //$NON-NLS-1$
- else type = "-" + type; //$NON-NLS-1$
- // formulate command to send kill signal
- String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
- 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()); //$NON-NLS-1$
- 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 = " "; //$NON-NLS-1$
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode; //$NON-NLS-1$
- 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 + ","; //$NON-NLS-1$
- }
- }
- if (stateCode.trim().equals("")) return " "; //$NON-NLS-1$ //$NON-NLS-2$
- else return stateCode.trim();
- }
-}
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 e34440853..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalLinuxProcessHandler.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.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
-{
-
- protected HashMap _usernamesByUid;
- protected HashMap _uidsByUserName;
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for Linux platforms.
- */
- public UniversalLinuxProcessHandler()
- {
- stateMap = new HashMap();
- for (int i = ISystemProcessRemoteConstants.STATE_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.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(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT)) type = ""; //$NON-NLS-1$
- else type = "-" + type; //$NON-NLS-1$
- // formulate command to send kill signal
- String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
- 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()); //$NON-NLS-1$
- 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"); //$NON-NLS-1$
-
- if (!procDir.exists())
- throw new Exception(IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
-
- if (!procDir.canRead())
- throw new Exception(IServiceConstants.FAILED_WITH_SECURITY);
-
- // list all subdirectories of /proc
- File[] processes;
- if (rpfs.getPid().indexOf("*") == -1) //$NON-NLS-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 = ""; //$NON-NLS-1$
- try
- {
- // open the file containing the human-readable status info for the process
- File statusFile = new File(processes[i], "status"); //$NON-NLS-1$
- if (!statusFile.exists() || !statusFile.canRead())
- continue;
-
- // read the status info from the stat file
- FileReader fr = new FileReader(statusFile);
- BufferedReader reader = new BufferedReader(fr);
-
- HashMap statusFileContents = getStatusFileContents(reader);
-
- statusLine = processes[i].getName() + "|"; // add the pid to the status string //$NON-NLS-1$
-
- // add the name to the status string
- String name = (String) statusFileContents.get("name"); //$NON-NLS-1$
- if (name == null) name = " "; //$NON-NLS-1$
- //if (!pexematcher.matches(name)) continue;
- statusLine = statusLine + name + "|"; //$NON-NLS-1$
-
- // add the status letter to the status string
- String state = (String) statusFileContents.get("state"); //$NON-NLS-1$
- if (state == null) state = " "; //$NON-NLS-1$
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|"; //$NON-NLS-1$
-
- // add the Tgid
- String tgid = (String) statusFileContents.get("tgid"); //$NON-NLS-1$
- if (tgid == null) tgid = " "; //$NON-NLS-1$
- statusLine = statusLine + tgid + "|"; //$NON-NLS-1$
-
- // add the Ppid
- String pPid = (String) statusFileContents.get("ppid"); //$NON-NLS-1$
- if (pPid == null) pPid = " "; //$NON-NLS-1$
- //if (!ppidmatcher.matches(pPid)) continue;
- statusLine = statusLine + pPid + "|"; //$NON-NLS-1$
-
- // add the TracerPid
- String tracerpid = (String) statusFileContents.get("tracerpid"); //$NON-NLS-1$
- if (tracerpid == null) tracerpid = " "; //$NON-NLS-1$
- statusLine = statusLine + tracerpid + "|"; //$NON-NLS-1$
-
- String uid = (String) statusFileContents.get("uid"); //$NON-NLS-1$
- if (uid == null) uid = " "; //$NON-NLS-1$
- statusLine = statusLine + uid + "|"; // add the uid to the status string //$NON-NLS-1$
-
- String username = getUsername(uid);
- if (username == null) username = " "; //$NON-NLS-1$
- statusLine = statusLine + username + "|"; // add the username to the status string //$NON-NLS-1$
-
- // add the gid to the status string
- String gid = (String) statusFileContents.get("gid"); //$NON-NLS-1$
- if (gid == null) gid = " "; //$NON-NLS-1$
- statusLine = statusLine + gid + "|"; //$NON-NLS-1$
-
- // add the VmSize to the status string
- String vmsize = (String) statusFileContents.get("vmsize"); //$NON-NLS-1$
- if (vmsize == null) vmsize = " "; //$NON-NLS-1$
- statusLine = statusLine + vmsize + "|"; //$NON-NLS-1$
-
- // add the VmRSS to the status string
- String vmrss = (String) statusFileContents.get("vmrss"); //$NON-NLS-1$
- if (vmrss == null) vmrss = " "; //$NON-NLS-1$
- 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)
- {
- String key = nextLine.substring(0, nextLine.indexOf(":")).trim().toLowerCase(); //$NON-NLS-1$
- 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(); //$NON-NLS-1$
- }
- else
- return line.substring(line.indexOf(":") + 1).trim().substring(0, length); //$NON-NLS-1$
- }
-
- /**
- * 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"); //$NON-NLS-1$
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
-
- BufferedReader reader = new BufferedReader(isr);
-
- String nextLine;
-
- while ((nextLine = reader.readLine()) != null)
- {
- String[] fields = nextLine.split(":"); //$NON-NLS-1$
- 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 = " "; //$NON-NLS-1$
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode; //$NON-NLS-1$
- 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 + ","; //$NON-NLS-1$
- }
- }
- if (stateCode.trim().equals("")) return " "; //$NON-NLS-1$ //$NON-NLS-2$
- else return stateCode.trim();
- }
-}
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 ffd5c0e2c..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalMacOSXProcessHandler.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.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]); //$NON-NLS-1$
- stateMap.put("R", strings[ISystemProcessRemoteConstants.STATE_RUNNING_INDEX]); //$NON-NLS-1$
- stateMap.put("S", strings[ISystemProcessRemoteConstants.STATE_SLEEPING_INDEX]); //$NON-NLS-1$
- stateMap.put("T", strings[ISystemProcessRemoteConstants.STATE_NONEXISTENT_INDEX]); //$NON-NLS-1$
- stateMap.put("U", strings[ISystemProcessRemoteConstants.STATE_WAITING_INDEX]); //$NON-NLS-1$
- stateMap.put("Z", strings[ISystemProcessRemoteConstants.STATE_ZOMBIE_INDEX]); //$NON-NLS-1$
- }
-
- /**
- * 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"; //$NON-NLS-1$
- 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+"); //$NON-NLS-1$
- 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(""); //$NON-NLS-1$
- usp.setTracerPid(""); //$NON-NLS-1$
- 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 = ""; //$NON-NLS-1$
- } else {
- type = "-" + type; //$NON-NLS-1$
- }
-
- // formulate command to send kill signal
- String cmdLine = "kill " + type + " " + process.getPid(); //$NON-NLS-1$ //$NON-NLS-2$
- 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()); //$NON-NLS-1$
- 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;
- }
-
-}
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 99272efd4..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalServerProcessImpl.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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
-{
- protected Object[] _properties = new Object[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT+1];
-
- /**
- * create a new UniversalServerProcessImpl with the default property set
- */
- public UniversalServerProcessImpl()
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = " "; //set the label //$NON-NLS-1$
- }
-
- /**
- * 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[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
- }
-
- public void setPPid(String ppid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
-
- }
-
- public void setName(String name)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IRemoteProcess#getLabel()
- */
- public String getLabel()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT];
- }
-
- public void setLabel(String label)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = label;
- }
-
- public void setState(String state)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
- }
-
- public void setTgid(String tgid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
- }
-
- public void setTracerPid(String tracerpid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
- }
-
- public void setUid(String uid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
- }
-
- public void setUsername(String username)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
- }
-
- public void setGid(String gid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
- }
-
- public void setVmSizeInKB(String size)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
- }
-
- public void setVmRSSInKB(String size)
- {
- _properties[ISystemProcessRemoteConstants.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("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- int numOfExpectedTokens = ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT;
- int tokens = str.length;
- if (tokens == numOfExpectedTokens)
- {
- try
- {
- setPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]);
-
- setName(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
-
- setTgid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]);
-
- setPPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]);
-
- setTracerPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
-
- setUid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]);
-
- setUsername(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME]);
-
- setGid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]);
-
- setVmSizeInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
-
- setVmRSSInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS]);
-
- setState(str[ISystemProcessRemoteConstants.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[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
- }
-
- public long getPPid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
- }
-
- public String getName()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME];
- }
-
- public String getState()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS];
- }
-
- public long getTgid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
- }
-
- public long getTracerPid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
- }
-
- public long getUid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
- }
-
- public String getUsername()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME];
- }
-
- public long getGid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
- }
-
- public boolean isRoot()
- {
- return (getPPid() == 0);
- }
-
- public long getVmSizeInKB()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
- }
-
- public long getVmRSSInKB()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.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 = ""; //$NON-NLS-1$
- for (int i = 0; i < ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT; i++)
- {
- properties = properties + _properties[i].toString();
- if (i != ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT - 1)
- properties = properties + IServiceConstants.TOKEN_SEPARATOR;
- }
- return properties;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java
deleted file mode 100644
index bd9cf2d87..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalSolarisProcessHandler.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [175293] [dstore] Processes do not work on Dstore-UNIX connection to Solaris
- ********************************************************************************/
-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.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-/**
- * ProcessHandler implementation for Solaris. This is part of internal
- * implementation, and should not be used by clients directly. Use
- * {@link ProcessHandlerManager#getNewProcessHandler()} on a Solaris system
- * instead.
- *
- * @since 3.1 (actually 3.1.1)
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class UniversalSolarisProcessHandler extends UniversalAIXProcessHandler {
-
- private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","s"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
- private static final String firstColumnHeader = "PID"; //$NON-NLS-1$
-
-
- public IHostProcess kill(IHostProcess process, String type)
- throws Exception {
- return super.kill(process, type);
- }
-
- /* (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 UNIX specific attributes
- String cmdLine = "/usr/bin/ps -A -o "; //$NON-NLS-1$
- for (int i = 0; i < processAttributes.length; i++)
- {
- cmdLine = cmdLine + processAttributes[i];
- if ((processAttributes.length - i > 1)) cmdLine = cmdLine + ","; //$NON-NLS-1$
- }
- // run the command and get output
- Process ps = Runtime.getRuntime().exec(cmdLine);
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
-
- BufferedReader reader = new BufferedReader(isr);
-
- String nextLine = reader.readLine();
- if (nextLine != null && nextLine.trim().startsWith(firstColumnHeader)) nextLine = reader.readLine();
- while (nextLine != null)
- {
- String statusLine = ""; //$NON-NLS-1$
- // 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"); //$NON-NLS-1$
- statusLine = pid + "|"; //$NON-NLS-1$
-
- // add the name to the status string
- String name = (String) psLineContents.get("comm"); //$NON-NLS-1$
- if (name == null) name = " "; //$NON-NLS-1$
- statusLine = statusLine + name + "|"; //$NON-NLS-1$
-
- // add the status letter to the status string
- String state = (String) psLineContents.get("s"); //$NON-NLS-1$
- if (state == null) state = " "; //$NON-NLS-1$
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|"; //$NON-NLS-1$
-
- // add the Tgid
- String tgid = (String) psLineContents.get("tgid"); //$NON-NLS-1$
- if (tgid == null) tgid = " "; //$NON-NLS-1$
- statusLine = statusLine + tgid + "|"; //$NON-NLS-1$
-
- // add the Ppid
- String pPid = (String) psLineContents.get("ppid"); //$NON-NLS-1$
- if (pPid == null) pPid = " "; //$NON-NLS-1$
- statusLine = statusLine + pPid + "|"; //$NON-NLS-1$
-
- // add the TracerPid
- String tracerpid = (String) psLineContents.get("tracerpid"); //$NON-NLS-1$
- if (tracerpid == null) tracerpid = " "; //$NON-NLS-1$
- statusLine = statusLine + tracerpid + "|"; //$NON-NLS-1$
-
- String uid = (String) psLineContents.get("uid"); //$NON-NLS-1$
- if (uid == null) uid = " "; //$NON-NLS-1$
- statusLine = statusLine + uid + "|"; // add the uid to the status string //$NON-NLS-1$
-
- String username = (String) psLineContents.get("user"); //$NON-NLS-1$
- if (username == null) username = " "; //$NON-NLS-1$
- statusLine = statusLine + username + "|"; // add the username to the status string //$NON-NLS-1$
-
- // add the gid to the status string
- String gid = (String) psLineContents.get("gid"); //$NON-NLS-1$
- if (gid == null) gid = " "; //$NON-NLS-1$
- statusLine = statusLine + gid + "|"; //$NON-NLS-1$
-
- // add the VmSize to the status string
- String vmsize = (String) psLineContents.get("vsz"); //$NON-NLS-1$
- if (vmsize == null) vmsize = " "; //$NON-NLS-1$
- statusLine = statusLine + vmsize +"|"; //$NON-NLS-1$
-
- // add a dummy vmrss to the status string
- // vmRss is not available on ZOS
- String vmrss = " "; //$NON-NLS-1$
- 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;
- }
-
-}
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 ee42b1088..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/processes/handlers/UniversalZOSProcessHandler.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.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.ISystemProcessRemoteConstants;
-
-
-public class UniversalZOSProcessHandler extends UniversalAIXProcessHandler
-{
- private static final String[] processAttributes = {"pid","ppid","comm","uid","user","gid","vsz","state"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
- private static final String firstColumnHeader = "PID"; //$NON-NLS-1$
- private HashMap stateMap;
-
- /**
- * Creates a new ProcessHandler for z/OS platforms.
- */
- public UniversalZOSProcessHandler()
- {
- super();
- stateMap = new HashMap();
- for (int i = ISystemProcessRemoteConstants.STATE_ZOS_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ZOS_ENDING_INDEX; i++)
- {
- stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.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 "; //$NON-NLS-1$
- for (int i = 0; i < processAttributes.length; i++)
- {
- cmdLine = cmdLine + processAttributes[i];
- if ((processAttributes.length - i > 1)) cmdLine = cmdLine + ","; //$NON-NLS-1$
- }
- // run the command and get output
- Process ps = Runtime.getRuntime().exec(cmdLine);
- InputStreamReader isr = new InputStreamReader(ps.getInputStream());
-
- BufferedReader reader = new BufferedReader(isr);
-
- String nextLine = reader.readLine();
- if (nextLine != null && nextLine.trim().startsWith(firstColumnHeader)) nextLine = reader.readLine();
- while (nextLine != null)
- {
- String statusLine = ""; //$NON-NLS-1$
- // 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"); //$NON-NLS-1$
- statusLine = pid + "|"; //$NON-NLS-1$
-
- // add the name to the status string
- String name = (String) psLineContents.get("comm"); //$NON-NLS-1$
- if (name == null) name = " "; //$NON-NLS-1$
- statusLine = statusLine + name + "|"; //$NON-NLS-1$
-
- // add the status letter to the status string
- String state = (String) psLineContents.get("state"); //$NON-NLS-1$
- if (state == null) state = " "; //$NON-NLS-1$
- String stateCode = convertToStateCode(state);
- statusLine = statusLine + stateCode + "|"; //$NON-NLS-1$
-
- // add the Tgid
- String tgid = (String) psLineContents.get("tgid"); //$NON-NLS-1$
- if (tgid == null) tgid = " "; //$NON-NLS-1$
- statusLine = statusLine + tgid + "|"; //$NON-NLS-1$
-
- // add the Ppid
- String pPid = (String) psLineContents.get("ppid"); //$NON-NLS-1$
- if (pPid == null) pPid = " "; //$NON-NLS-1$
- statusLine = statusLine + pPid + "|"; //$NON-NLS-1$
-
- // add the TracerPid
- String tracerpid = (String) psLineContents.get("tracerpid"); //$NON-NLS-1$
- if (tracerpid == null) tracerpid = " "; //$NON-NLS-1$
- statusLine = statusLine + tracerpid + "|"; //$NON-NLS-1$
-
- String uid = (String) psLineContents.get("uid"); //$NON-NLS-1$
- if (uid == null) uid = " "; //$NON-NLS-1$
- statusLine = statusLine + uid + "|"; // add the uid to the status string //$NON-NLS-1$
-
- String username = (String) psLineContents.get("user"); //$NON-NLS-1$
- if (username == null) username = " "; //$NON-NLS-1$
- statusLine = statusLine + username + "|"; // add the username to the status string //$NON-NLS-1$
-
- // add the gid to the status string
- String gid = (String) psLineContents.get("gid"); //$NON-NLS-1$
- if (gid == null) gid = " "; //$NON-NLS-1$
- statusLine = statusLine + gid + "|"; //$NON-NLS-1$
-
- // add the VmSize to the status string
- String vmsize = (String) psLineContents.get("vsz"); //$NON-NLS-1$
- if (vmsize == null) vmsize = " "; //$NON-NLS-1$
- statusLine = statusLine + vmsize +"|"; //$NON-NLS-1$
-
- // add a dummy vmrss to the status string
- // vmRss is not available on ZOS
- String vmrss = " "; //$NON-NLS-1$
- 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+"); //$NON-NLS-1$
- 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 = " "; //$NON-NLS-1$
- if (state == null) return stateCode;
- if (state.trim().equals("")) return stateCode; //$NON-NLS-1$
- 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 + ","; //$NON-NLS-1$
- }
- }
- if (stateCode.trim().equals("")) return " "; //$NON-NLS-1$ //$NON-NLS-2$
- else return stateCode.trim();
- }
-}
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 9df646ba0..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchFileNameMatcher.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.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("*"); //$NON-NLS-1$
- }
-
- /**
- * 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;
- }
- }
-}
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 689658e10..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatchLocator.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.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 {
-
- 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 == ISystemSearchConstants.LF_CHAR) {
- return 1;
- }
-
- // otherwise if we get a carriage return character, then we need to check the next character
- if (ch == ISystemSearchConstants.CR_CHAR) {
- ch = reader.read();
-
- // if the character is a line feed, then we have read a line (in Windows)
- if (ch == ISystemSearchConstants.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;
- }
-}
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 4ea69f87b..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchStringMatcher.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.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("*"); //$NON-NLS-1$
- }
-
- /**
- * 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;
- }
- }
-}
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 de0593206..000000000
--- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/search/SystemSearchUtil.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.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 = ","; //$NON-NLS-1$
-
- /**
- * 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("")) { //$NON-NLS-1$
- 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("")) { //$NON-NLS-1$
- 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(" "); //$NON-NLS-1$
- }
- // if first entry, don't do anything
- else {
- first = false;
- }
-
- result.append(iter.next());
- }
-
- return result.toString();
- }
-
-
-}
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 905c9cfc1..000000000
--- a/rse/plugins/org.eclipse.rse.services/patterns.dat
+++ /dev/null
@@ -1,283 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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 RSE services.local/patterns.dat
-# Martin Oberhuber (Wind River) - [181550] support Unicode characters in patterns
-################################################################################
-#
-# 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 =([\p{L}_\d!@$\-\+,./()\\]*):(\d*):.*
-
-command: grep -.*n.*
- grep file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*):.*
-
-command: grep .*
- grep file pattern =([\p{L}_\d!@$\-\+,./()\\]*):.*
-
-
-command: pwd
- directory file pattern=([\p{L}_\d!@$\-\+,./()\\,:]*)
-
-command: nmake.*
- error pattern=NMAKE : .*
- error file line pattern =([\p{L}_\d!@$\-\+,./()\\:]*)\((\d*):(\d*)\) : error EDC.*
- error file pattern =[\p{L}_\d!@$\-\+,./()\\:]*\(([\p{L}_\d!@$,./\\]*)\) : error LNK.*
- error file line pattern=([\p{L}_\d!@$\-\+,./()\\]*):(\d*):\d*\) : error .*
- warning file line pattern=([\p{L}_\d!@$\-\+,./()\\]*)\((\d*):\d*\) : warning .*
- informational file line pattern=([\p{L}_\d!@$\-\+,./()\\]*)\((\d*):\d*\) : informational .*
-
-command: make.*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\",, line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): warning: .*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):
- #iseries c compiler
- error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.*
- #makefile errors
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*): make:.*
- #xlc Options warnings
- warning pattern=\(W\) Option .*
- #c89 errors
- error file line pattern=ERROR CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: gmake.*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): warning: .*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):
- # ixlc compiler
- error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .*
- error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.*
- # icc compiler
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
- #generic
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
-
-command: gcc\s.*
- error file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(S\).*
- warning file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*): warning: .*
- warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .*
- error file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): error: .*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: [\p{L}_\d!@$,./\\,\-,\+,(,)]*: .*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
- informational file pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):.*
- informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):
-
-command: cc\s.*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
-
-command: CC\s.*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.*
-
-command: c89.*
- error file line pattern=ERROR CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- warning file line pattern=WARNING CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .*
- informational pattern=CBC\d*\(I\) .*
-
-command: icc.*
- error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.*
- error file line pattern =\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.*
-
-command: javac.*
- warning file line pattern=([\p{L}_\d!@$,./\\,\-,\+,(,),:]*):(\d*): warning.*
- error file line pattern=([\p{L}_\d!@$,./\\,\-,\+,(,),:]*):(\d*):.*
-
-command: .*bat\s.*
- error file line pattern=\[javac\]\s([\p{L}_\d!@$,./\\,:]*):(\d*):.*
- error file line pattern=file:([\p{L}_\d!@$,./\\,:]*):(\d*):.*
-
-command: dir.*
- directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*<DIR>\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).*
- directory file pattern=.*<DIR>\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).*
- file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).*
- directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*<DIR>\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*)
- file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*)
-
-command: ls -l.*
- file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=l[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]*
- file file pattern=-.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=-.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=l.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]*
- file file pattern=l.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]*
- directory file pattern=d.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- directory file pattern=d.*\d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
-
-command: ls -a.*
- file file pattern=-.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- file file pattern=-.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- directory file pattern=d.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)
- directory file pattern=d.*\d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)
-
-command: ls
- file file pattern=([\p{L}_\d!@$\-\+,.()\s]+)
-
-command: ls\s.*
- file file pattern=([\p{L}_\d!@$\-\+,.()\s]+)
-
-command: .*
- prompt file pattern=([\p{L}_\d!@$\-\+,./()\\,:,\s]*)>.*
-
-command: find .*
- file file pattern=([\p{L}_\d!@$\-\+,./()\\]+)
-
-command: env
- envvar pattern=[\p{L}_\d!@$]+\=.*
-
-command: ps
- process pattern=[\s]*[\d]+\s.*
-
-command: ps .*
- process pattern=[\s]*[\d]+\s.*
-
-command: xl[C,c].*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\",, line (\d*)\.\d*: \d*-\d* \(S\).*
- error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(E\).*
- warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).*
- informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).*
-
-command: ixlc.*
- error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.*
- error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", 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: ([\p{L}_\d!@$,./\\]*): (\d*):.*
- warning file line pattern=([\p{L}_\d!@$,./\\]*):(\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 ([\p{L}_\d!@$,./\\]*), 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 8d4f04cec..000000000
--- a/rse/plugins/org.eclipse.rse.services/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Services Framework
-providerName = Eclipse.org - DSDP
-
-extPoint.archivehandlers = Remote Archive Handlers
-extPoint.codePageConverters = Code Page Converters
diff --git a/rse/plugins/org.eclipse.rse.services/plugin.xml b/rse/plugins/org.eclipse.rse.services/plugin.xml
deleted file mode 100644
index c805200d6..000000000
--- a/rse/plugins/org.eclipse.rse.services/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2007,2008 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:
-Anna Dushistova (MontaVista)- initial API and implementation
--->
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="archivehandlers" name="%extPoint.archivehandlers" schema="schema/archivehandlers.exsd"/>
- <extension-point id="codePageConverters" name="%extPoint.codePageConverters" schema="schema/codePageConverters.exsd"/>
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.rse.services.terminals.ITerminalService"
- class="org.eclipse.rse.internal.services.shells.TerminalShellAdapterFactory">
- <adapter
- type="org.eclipse.rse.services.shells.IShellService">
- </adapter>
- </factory>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.services/schema/archivehandlers.exsd b/rse/plugins/org.eclipse.rse.services/schema/archivehandlers.exsd
deleted file mode 100644
index d7d2e48dd..000000000
--- a/rse/plugins/org.eclipse.rse.services/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.services">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.services" id="archivehandlers" name="Archive Handlers"/>
- </appInfo>
- <documentation>
- This extension point is used to plug in additional archive handlers. Archive handlers are used to provide seamless integration of archives within the RSE. For example, an archive can be expanded to show its contents in RSE if an archive handler is registered for that archive type and handles showing the contents of archives.
- </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.services.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 the org.eclipse.rse.files.ui plugin, 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, 2007 IBM Corporation. All Rights Reserved.
-This program and the accompanying materials are made available under the terms
-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.services/schema/codePageConverters.exsd b/rse/plugins/org.eclipse.rse.services/schema/codePageConverters.exsd
deleted file mode 100644
index 60f8a2c4b..000000000
--- a/rse/plugins/org.eclipse.rse.services/schema/codePageConverters.exsd
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.services">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.services" id="codePageConverters" name="File Service Code Page Converters"/>
- </appInfo>
- <documentation>
- This extension point allows the default codepage conversion for files transfered via the file services to be provided by the extension point.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="codePageConverter"/>
- </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="codePageConverter">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- RSE 3.0
- </documentation>
- </annotation>
-
- <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.services.codePageConverters&quot;&gt;
- &lt;codePageConverter
- id=&quot;org.eclipse.rse.services.files.defaultCodePageConverter&quot;
- name=&quot;Default Code Page Converter&quot;
- class=&quot;org.eclipse.rse.files.DefaultFileServiceCodePageConverter&quot;&gt;
- &lt;/codePageConverter&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.files.IFileServiceCodePageConverter&lt;/samp&gt; interface.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- Users of this extension point must implement the interface
- org.eclipse.rse.services.files.IFileServiceCodePageConverter
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2002, 2006, 2007 IBM Corporation. All Rights Reserved.
-This program and the accompanying materials are made available under the terms
-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.services/src/org/eclipse/rse/internal/services/Activator.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/Activator.java
deleted file mode 100644
index dc90a277a..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/Activator.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - Moved from org.eclipse.rse.services
- * David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-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.Bundle;
-import org.osgi.framework.BundleContext;
-
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.files.CodePageConverterManager;
-import org.eclipse.rse.services.files.IFileServiceCodePageConverter;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends Plugin {
-
- //The shared instance.
- private static Activator plugin;
- public static final String PLUGIN_ID="org.eclipse.rse.services"; //$NON-NLS-1$
-
- /**
- * 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);
- registerArchiveHandlers();
- registerCodePageConverters();
- }
-
- /*
- * (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;
- }
-
- /**
- * 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.services", "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().getNamespaceIdentifier();
-
- // 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)
- {
- logException(e);
- }
- }
- }
-
-
-
-
- private void registerCodePageConverters()
- {
- // retrieve all extension points
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint ep = registry.getExtensionPoint("org.eclipse.rse.services", "codePageConverters"); //$NON-NLS-1$ //$NON-NLS-2$
- if (ep != null){
- IExtension[] extensions = ep.getExtensions();
-
- for (int i = 0; i < extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] configElements = extension.getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- IConfigurationElement element = configElements[j];
- if (element.getName().equalsIgnoreCase("codePageConverter")) { //$NON-NLS-1$
- try {
- Object codePageConverter = element.createExecutableExtension("class"); //$NON-NLS-1$
- if (codePageConverter!=null && codePageConverter instanceof IFileServiceCodePageConverter){
- // only save extension point which implement the correct interface
- CodePageConverterManager.registerCodePageConverter((IFileServiceCodePageConverter)codePageConverter);
- }
- }
- catch (CoreException e) {
- //shouldn't get here....
- e.printStackTrace();
- }
- }
- }
- }
- }
- }
-
-
- /**
- * 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); //$NON-NLS-1$
- 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/src/org/eclipse/rse/internal/services/RSEServicesMessages.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/RSEServicesMessages.java
deleted file mode 100644
index 81ccb6025..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/RSEServicesMessages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
- * Anna Dushistova (MontaVista) - [259412] [api][rseterminal] Decide whether to extract any API from DelegatingTerminalService
- *******************************************************************************/
-package org.eclipse.rse.internal.services;
-
-import org.eclipse.osgi.util.NLS;
-
-public class RSEServicesMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.services.messages"; //$NON-NLS-1$
-
- private RSEServicesMessages() {
- }
-
- public static String AbstractDelegatingTerminalService_description;
- public static String AbstractDelegatingTerminalService_name;
- public static String Socket_timeout;
- public static String FILEMSG_OPERATION_FAILED;
- public static String FILEMSG_OPERATION_FAILED_DETAILS;
-
- public static String FILEMSG_SECURITY_VIOLATION;
- public static String FILEMSG_SECURITY_VIOLATION_DETAILS;
-
- public static String FILEMSG_FOLDER_NOT_EMPTY;
- public static String FILEMSG_FOLDER_NOT_EMPTY_DETAILS;
-
-
- public static String TerminalShellService_description;
- public static String TerminalShellService_name;
-
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, RSEServicesMessages.class);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/messages.properties b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/messages.properties
deleted file mode 100644
index 19a314aba..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/messages.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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) - copy Socket_timeout from team.cvs.core
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
-# Anna Dushistova (MontaVista) - [259412] [api][rseterminal] Decide whether to extract any API from DelegatingTerminalService
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-#From org.eclipse.team.internal.ccvs.core/messages.properties
-
-AbstractDelegatingTerminalService_name=Terminal Service
-AbstractDelegatingTerminalService_description=Generic Terminal Service
-Socket_timeout=A timeout occurred connecting to host {0}
-
-
-FILEMSG_OPERATION_FAILED=Operation failed. File system input or output error
-FILEMSG_OPERATION_FAILED_DETAILS=Message reported from file system: {0}
-
-FILEMSG_SECURITY_VIOLATION=Operation failed. Security violation
-FILEMSG_SECURITY_VIOLATION_DETAILS=Message reported from file system: {0}
-
-
-FILEMSG_FOLDER_NOT_EMPTY = Folder is not empty. Cannot delete
-FILEMSG_FOLDER_NOT_EMPTY_DETAILS = The operation failed. One possible reason is that the folder is not empty
-
-TerminalShellService_description=Generic shell service
-TerminalShellService_name=Generic shell service
-
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/CommandPattern.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/CommandPattern.java
deleted file mode 100644
index 5bb4c8705..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/CommandPattern.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2007 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:
- * Martin Oberhuber (Wind River) - Moved from org.eclipse.rse.services.shells
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.shells;
-
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-import org.eclipse.rse.services.shells.ParsedOutput;
-
-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/internal/services/shells/OutputPattern.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/OutputPattern.java
deleted file mode 100644
index b07c0727a..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/OutputPattern.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2001, 2007 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:
- * Martin Oberhuber (Wind River) - Moved from org.eclipse.rse.services.shells
- ********************************************************************************/
-
-package org.eclipse.rse.internal.services.shells;
-
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.rse.services.shells.ParsedOutput;
-
-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/internal/services/shells/TerminalServiceHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java
deleted file mode 100644
index b99845bf8..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * David McKnight (IBM) - [191599] Use the remote encoding specified in the host property page
- * David McKnight (IBM) - [196301] Check that the remote encoding isn't null before using it
- * Martin Oberhuber (Wind River) - [204744] Honor encoding in SSH command input field
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * Anna Dushistova (MontaVista) - adapted from SshHostShell
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- * Anna Dushistova (MontaVista) - [258720] SshHostShell fails to run command if initialWorkingDirectory supplied
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.shells;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.nio.charset.Charset;
-import java.util.regex.Pattern;
-
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.shells.AbstractHostShell;
-import org.eclipse.rse.services.shells.IHostShellOutputReader;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-
-/**
- * @since 3.1
- */
-public class TerminalServiceHostShell extends AbstractHostShell {
-
- public static final String SHELL_INVOCATION = ">"; //$NON-NLS-1$
-
- ITerminalShell fTerminalShell;
-
- private TerminalServiceShellOutputReader fStdoutHandler;
-
- private TerminalServiceShellOutputReader fStderrHandler;
-
- private TerminalServiceShellWriterThread fShellWriter;
-
- public TerminalServiceHostShell(ITerminalShell terminalShell,
- String initialWorkingDirectory, String commandToRun,
- String[] environment) {
- try {
- fTerminalShell = terminalShell;
- String encoding = fTerminalShell.getDefaultEncoding();
- if (encoding != null) {
- fStdoutHandler = new TerminalServiceShellOutputReader(this,
- new BufferedReader(new InputStreamReader(fTerminalShell
- .getInputStream(), encoding)), false);
- } else {
- fStdoutHandler = new TerminalServiceShellOutputReader(this,
- new BufferedReader(new InputStreamReader(fTerminalShell
- .getInputStream())), false);
- }
- fStderrHandler = new TerminalServiceShellOutputReader(this, null,
- true);
- OutputStream outputStream = fTerminalShell.getOutputStream();
- if (encoding != null) {
- // use specified encoding
- Charset cs = Charset.forName(encoding);
- PrintWriter outputWriter = new PrintWriter(
- new OutputStreamWriter(outputStream, cs));
- fShellWriter = new TerminalServiceShellWriterThread(
- outputWriter);
- } else {
- PrintWriter outputWriter = new PrintWriter(outputStream);
- fShellWriter = new TerminalServiceShellWriterThread(
- outputWriter);
- }
-
- 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$
- }
- if (SHELL_INVOCATION.equals(commandToRun)) {
- writeToShell(getPromptCommand());
- } else if (commandToRun != null && commandToRun.length() > 0) {
- writeToShell(commandToRun);
- }
-
- } catch (Exception e) {
- // TODO [209043] Forward exception to RSE properly
- e.printStackTrace();
- if (fShellWriter != null) {
- fShellWriter.stopThread();
- fShellWriter = null;
- }
- if (fStderrHandler != null) {
- fStderrHandler.interrupt();
- fStderrHandler = null;
- }
- if (fStdoutHandler != null) {
- fStdoutHandler.interrupt();
- fStdoutHandler = null;
- }
- }
-
- }
-
- public void exit() {
- if (fShellWriter != null) {
- fShellWriter.stopThread();
- }
- fTerminalShell.exit();
- }
-
- public IHostShellOutputReader getStandardErrorReader() {
- return fStderrHandler;
- }
-
- public IHostShellOutputReader getStandardOutputReader() {
- return fStdoutHandler;
- }
-
- public boolean isActive() {
- return fTerminalShell.isActive();
- }
-
- private static final Pattern cdCommands = Pattern
- .compile("\\A\\s*(cd|chdir|ls)\\b"); //$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 String getPromptCommand() {
- return "echo $PWD'>'"; //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellOutputReader.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellOutputReader.java
deleted file mode 100644
index db8ce647c..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellOutputReader.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Anna Dushistova (MontaVista) - adapted from SshShellOutputReader
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.shells;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-
-import org.eclipse.rse.internal.services.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.SimpleHostOutput;
-
-/**
- * @since 3.1
- */
-public class TerminalServiceShellOutputReader extends
- AbstractHostShellOutputReader {
- protected BufferedReader fReader;
- private String fPromptChars = ">$%#]"; //Characters we accept as the end of a prompt //$NON-NLS-1$;
-
- public TerminalServiceShellOutputReader(IHostShell hostShell,
- BufferedReader reader, boolean isErrorReader) {
- super(hostShell, isErrorReader);
- setName("Terminal Service ShellOutputReader" + getName()); //$NON-NLS-1$
- fReader = reader;
- }
-
- 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/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellWriterThread.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellWriterThread.java
deleted file mode 100644
index 12767ff5c..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceShellWriterThread.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Anna Dushistova (MontaVista) - adapted from SshShellWriterThread
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- *******************************************************************************/
-package org.eclipse.rse.internal.services.shells;
-
-import java.io.PrintWriter;
-
-/**
- * @since 3.1
- */
-public class TerminalServiceShellWriterThread extends Thread {
- private PrintWriter fOutputWriter;
- private String fNextCommand;
- private boolean fIsCancelled;
-
- /**
- * constructor for terminal service shell writer thread
- *
- * @param outputWriter
- * PrintWriter to write to in separate Thread
- */
- public TerminalServiceShellWriterThread(PrintWriter outputWriter) {
- super();
- fOutputWriter = outputWriter;
- setName("Terminal Service 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
- * queuing).
- *
- * @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;
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellAdapterFactory.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellAdapterFactory.java
deleted file mode 100644
index 90e75e3c2..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellAdapterFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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:
- * Anna Dushistova (MontaVista)- initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.services.shells;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-
-/**
- * @since 3.1
- */
-public class TerminalShellAdapterFactory implements IAdapterFactory {
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- Object result = null;
- if (adaptableObject instanceof ITerminalService) {
- if (adapterType == IShellService.class) {
- result = new TerminalShellService(
- (ITerminalService) adaptableObject);
- }
- }
- return result;
- }
-
- public Class[] getAdapterList() {
- return new Class[] { IShellService.class };
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellService.java
deleted file mode 100644
index 05a7fbde0..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalShellService.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- * Martin Oberhuber (Wind River) - [170910] Adopt RSE ITerminalService API for SSH
- * Anna Dushistova (MontaVista) - adapted from SshShellService
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
- * Martin Oberhuber (Wind River) - [267402] [telnet] "launch shell" takes forever
- *******************************************************************************/
-package org.eclipse.rse.internal.services.shells;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.shells.AbstractShellService;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-
-/**
- * @since 3.1
- */
-public class TerminalShellService extends AbstractShellService {
-
- ITerminalService fTerminalService;
-
- public TerminalShellService(ITerminalService terminalService) {
- super();
- fTerminalService = terminalService;
- }
-
- public IHostShell launchShell(String initialWorkingDirectory,
- String encoding, String[] environment, IProgressMonitor monitor)
- throws SystemMessageException {
- return runCommand(initialWorkingDirectory, TerminalServiceHostShell.SHELL_INVOCATION, encoding, environment, monitor);
- }
-
- public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor)
- throws SystemMessageException {
- // vt100 is the most common kind of terminal, and default for Telnet
- // and SSH: see Commons Net TelnetClient#TelnetClient() and JSch
- // ChannelSession#ttype.
- // We therefore pick vt100 here, and adapt to it by ignoring control
- // sequences in TerminalServiceShellOutputReader line 100. We could
- // also request a "dumb" type here, but testing showed that the
- // prompt is then not detected correctly.
- ITerminalShell terminalShell = fTerminalService.launchTerminal("vt100", //$NON-NLS-1$
- encoding, environment, initialWorkingDirectory, null, monitor);
- TerminalServiceHostShell hostShell = new TerminalServiceHostShell(
- terminalShell, initialWorkingDirectory, command, environment);
- return hostShell;
- }
-
- /**
- * Adapt this shell service to different (potentially contributed)
- * interfaces.
- *
- * Asks the adapter manager first whether it got any contributed adapter; if
- * none is found contributed externally, try to adapt to an
- * SshTerminalService. That way, clients can easily convert this
- * IShellService into an ITerminalService:
- *
- * <pre>
- * ITerminalService ts = (ITerminalService) myShellService.getAdapter(ITerminalService.class);
- * </pre>
- *
- * @see IAdaptable
- * @see PlatformObject#getAdapter(Class)
- */
- public Object getAdapter(Class adapter) {
- // TODO I'm not sure if this is the right way doing things. First of
- // all, we're holding on to the created terminal service forever if
- // we're asked for it, thus needing extra memory.
- // Second, by asking the adapter manager first, we might get no chance
- // returning what we think is right.
- Object o = super.getAdapter(adapter);
- if (o == null && adapter.isAssignableFrom(ITerminalService.class)) {
- return fTerminalService;
- }
- return o;
- }
-
- public String getName()
- {
- return RSEServicesMessages.TerminalShellService_name;
- }
-
- public String getDescription()
- {
- return RSEServicesMessages.TerminalShellService_description;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java
deleted file mode 100644
index 0cadc7754..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/terminals/ProcessBaseShell.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.internal.services.terminals;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.PlatformObject;
-
-import org.eclipse.rse.services.terminals.IBaseShell;
-
-/**
- * A wrapper for Java {@link Process} objects to give more convenient access to
- * them through the {@link IBaseShell} interface.
- *
- * @since org.eclipse.rse.services 3.0
- */
-public class ProcessBaseShell extends PlatformObject implements IBaseShell {
-
- /**
- * The underlying Process instance.
- */
- protected final Process fProcess;
-
- /**
- * Constructor.
- *
- * @param p the Process to wrap with this IBaseShell interface.
- */
- public ProcessBaseShell(Process p) {
- fProcess = p;
- }
-
- /**
- * Forcefully terminate the underlying Process through
- * {@link Process#destroy()}. Subclasses may want to override this behavior
- * by trying to terminate the underlying Process in a cleaner way.
- *
- * @see IBaseShell#exit()
- */
- public void exit() {
- fProcess.destroy();
- }
-
- public int exitValue() {
- return fProcess.exitValue();
- }
-
- public InputStream getErrorStream() {
- return fProcess.getErrorStream();
- }
-
- public InputStream getInputStream() {
- return fProcess.getInputStream();
- }
-
- public OutputStream getOutputStream() {
- return fProcess.getOutputStream();
- }
-
- /**
- * Check if the underlying Process is still active. Does not check whether
- * the Streams for the Process have been closed by the client, since this
- * does not influence the process active state anyways.
- *
- * @see IBaseShell#isActive()
- */
- public boolean isActive() {
- try {
- fProcess.exitValue();
- } catch (IllegalThreadStateException e) {
- return true;
- }
- return false;
- }
-
- /**
- * A Watchdog Thread, to interrupt other Threads after a given time unless a
- * specified condition is met.
- *
- * Sleeps for a given time, and upon wakeup checks if a condition is met. If
- * not, the specified Thread is interrupted.
- */
- private abstract static class Watchdog extends Thread {
- private final Thread fThreadToWatch;
- private long fTimeout;
-
- public Watchdog(Thread threadToWatch, long timeout) {
- fThreadToWatch = threadToWatch;
- fTimeout = timeout;
- }
-
- protected abstract boolean conditionDone();
-
- public void run() {
- try {
- sleep(fTimeout);
- } catch (InterruptedException e) {
- /* ignore */
- } finally {
- if (!conditionDone()) {
- fThreadToWatch.interrupt();
- }
- }
- }
- }
-
- public boolean waitFor(long timeout) throws InterruptedException {
- boolean active = isActive();
- if (active) {
- Thread watchdog = null;
- if (timeout > 0) {
- // TODO Check if using java.util.Timer would be more efficient
- // than our own Watchdog
- watchdog = new Watchdog(Thread.currentThread(), timeout) {
- protected boolean conditionDone() {
- return !isActive();
- }
- };
- watchdog.start();
- }
- try {
- fProcess.waitFor();
- } catch (InterruptedException e) {
- /* ignore */
- }
- if (watchdog != null) {
- watchdog.interrupt();
- }
- active = isActive();
- }
- return active;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/AbstractService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/AbstractService.java
deleted file mode 100644
index 61e62f341..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/AbstractService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-package org.eclipse.rse.services;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Abstract default implementation of an RSE Service. Clients are expected to
- * extend this class.
- *
- * @see IService
- * @since org.eclipse.rse.services 3.0
- */
-public abstract class AbstractService extends PlatformObject implements IService {
-
- public String getDescription() {
- return getName();
- }
-
- public String getName() {
- return this.getClass().getName();
- }
-
- /**
- * Default implementation of initService. Extenders who override this method
- * must call <code>super.initService(monitor)</code> as the first call in
- * their implementation.
- */
- public void initService(IProgressMonitor monitor) throws SystemMessageException {
- // Do nothing by default
- }
-
- /**
- * Default implementation of uninitService. Extenders who override this
- * method must call <code>super.uninitService(monitor)</code> as the last
- * call in their implementation.
- */
- public void uninitService(IProgressMonitor monitor) {
- // Do nothing by default
- }
-
-}
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 e2639b0cd..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/IService.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [226262] Make IService IAdaptable and add Javadoc
- * David McKnight (IBM) - [271244] [sftp files] "My Home" filter not working
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-
-package org.eclipse.rse.services;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * IService is the base interface for any non-UI service contributions to RSE.
- *
- * An actual Service is free to perform any operations at all - the only
- * commonality between services is that they have a name, can be initialized,
- * and are adaptable for future extension.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Service implementations must subclass
- * {@link AbstractService} rather than implementing this
- * interface directly.
- */
-public interface IService extends IAdaptable
-{
- /**
- * Get the name of this Service as a translated, UI-visible String.
- * Extenders are expected to override this method.
- *
- * @return the name of this Service.
- */
- public String getName();
-
- /**
- * Get the description of this Service as a translated, UI-visible String.
- * Extenders are expected to override this method.
- *
- * @return the description of this Service.
- */
- public String getDescription();
-
- /**
- * Initialize this Service to make it ready for operation. This method may
- * be long-running and normally gets called after a connection has
- * been established.
- *
- * Extenders are expected to override this method.
- *
- * @param monitor A progress monitor to provide progress of long-running
- * operation. There is no guarantee that cancellation is actually
- * supported by a Service since it would leave the service in a
- * potentially inconsistent, partially initialized state.
- *
- * @throws SystemMessageException if an error occurs during initialization.
- */
- public void initService(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Clean up this Service. This method is called by clients as part of a
- * disconnect operation and should clean up any local status that the
- * Service might have.
- *
- * Extenders are expected to override this method.
- *
- * @param monitor A progress monitor to provide progress of long-running
- * operation. There is no guarantee that cancellation is actually
- * supported by a Service since it would leave the service in a
- * potentially inconsistent, partially initialized state.
- */
- public void uninitService(IProgressMonitor monitor);
-}
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 e12c73e83..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/Mutex.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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;
-
-import org.eclipse.rse.internal.services.Activator;
-
-/**
- * A Mutual Exclusion Lock for Threads that need to access a resource
- * in a serialized manner. An Eclipse ProgressMonitor is accepted
- * in order to support cancellation when waiting for the Mutex.
- *
- * Usage Example:
- * <code>
- * private Mutex fooMutex = new Mutex();
- * boolean doFooSerialized()(IProgressMonitor monitor) {
- * if (fooMutex.waitForLock(monitor, 1000)) {
- * try {
- * return doFoo();
- * } finally {
- * fooMutex.release();
- * }
- * }
- * return false;
- * }
- * </code>
- *
- * The Mutex is not reentrant, so when a Thread has locked the
- * Mutex it must not try locking it again.
- */
-public class Mutex {
-
- private boolean fLocked = false;
- private List fWaitQueue = new LinkedList();
-
- /**
- * Creates an instance of <tt>Mutex</tt>.
- */
- public Mutex() {
- }
-
- /**
- * 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;
- }
- if (monitor!=null && monitor.isCanceled()) {
- 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 cancelled = false;
- while (timeLeft > 0 && !cancelled && !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) {
- cancelled = monitor.isCanceled();
- if (!cancelled && (curTime > nextProgressUpdate)) {
- monitor.worked(1);
- nextProgressUpdate+=1000;
- }
- }
- }
- }
- } catch(InterruptedException e) {
- //cancelled 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/RemoteUtil.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/RemoteUtil.java
deleted file mode 100644
index bc754c9ee..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/RemoteUtil.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - added createSocket() from team.cvs.core/Util
- *******************************************************************************/
-package org.eclipse.rse.services;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-
-/**
- * Static helper-methods for network access.
- */
-public class RemoteUtil {
-
- //----------------------------------------------------------------------
- // <copied
- // plugin: org.eclipse.team.cvs.core
- // class: org.eclipse.team.internal.ccvs.core.Policy
- // copyright: (c) 2000, 2006 IBM Corporation and others />
- //----------------------------------------------------------------------
-
- /**
- * Progress Monitor Helper: Checks the passed progress monitor
- * and throws an {@link OperationCanceledException} when it is
- * cancelled.
- *
- * @param monitor The ProgressMonitor to be checked
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
-
- //</copied>
-
- //----------------------------------------------------------------------
- // <copied
- // plugin: org.eclipse.team.cvs
- // class: org.eclipse.team.internal.ccvs.core.util.Util
- // copyright: (c) 2000, 2006 IBM Corporation and others />
- //----------------------------------------------------------------------
-
- /**
- * 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(RSEServicesMessages.Socket_timeout, new String[] { host }));
- }
- return socket[0];
- }
-
- //</copied>
-
-}
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 3f8b4e52d..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Martin Oberhuber (Wind River) - [210109] no need to declare IFileService constants in AbstractFileService
- * David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
- * Xuan Chen (IBM) - [210555] [regression] NPE when deleting a file on SSH
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * David McKnight (IBM) - [209704] added supportsEncodingConversion()
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- * David Dykstal (IBM) - [221211] fix IFileService API for batch operations
- * Martin Oberhuber (Wind River) - [221211] Fix progress monitor and cancellation for multi operations
- * Martin Oberhuber (Wind River) - [274568] Dont use SftpMonitor for Streams transfer
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-import org.eclipse.rse.services.AbstractService;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-
-
-public abstract class AbstractFileService extends AbstractService implements IFileService
-{
- /**
- * Perform a single progress tick for default multi-operations, provided
- * that a valid progress monitor is passed in:
- * <ul>
- * <li>Checks the monitor for cancellation and throws
- * SystemOperationCancelledException if it is
- * <li>Creates a SubMonitor for a single progress tick on the original
- * monitor
- * </ul>
- *
- * @param monitor Progress Monitor to use
- * @return A valid progress monitor usable for a single work item. Client is
- * responsible for calling done() on the subMonitor when done.
- * @throws SystemOperationCancelledException in case the user cancelled
- * @since 3.0
- */
- protected IProgressMonitor progressTick(IProgressMonitor monitor) throws SystemMessageException {
- if (monitor == null) {
- return new NullProgressMonitor();
- }
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- return new SubProgressMonitor(monitor, 1);
- }
-
- protected abstract IHostFile[] internalFetch(String parentPath, String fileFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public void getFileMultiple(String remoteParents[], String names[], List hostFiles, IProgressMonitor monitor)
- throws SystemMessageException
- {
- if (monitor != null)
- monitor.beginTask("", remoteParents.length); //$NON-NLS-1$
- for (int i = 0; i < remoteParents.length; i++)
- {
- IProgressMonitor subMonitor = progressTick(monitor);
- hostFiles.add(getFile(remoteParents[i], names[i], subMonitor));
- subMonitor.done();
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 using int fileTYpe
- */
- public IHostFile[] list(String remoteParent, String fileFilter,
- int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- return internalFetch(remoteParent, fileFilter, fileType, monitor);
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public void listMultiple(String[] remoteParents,
- String[] fileFilters, int fileTypes[], List hostFiles, IProgressMonitor monitor)
- throws SystemMessageException {
-
- if (monitor != null)
- monitor.beginTask("", remoteParents.length); //$NON-NLS-1$
- for (int i = 0; i < remoteParents.length; i++)
- {
- IProgressMonitor subMonitor = progressTick(monitor);
- IHostFile[] result = list(remoteParents[i], fileFilters[i], fileTypes[i], subMonitor);
- for (int j = 0; j < result.length; j++)
- {
- hostFiles.add(result[j]);
- }
- subMonitor.done();
- }
-
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public void listMultiple(String[] remoteParents,
- String[] fileFilters, int fileType, List hostFiles, IProgressMonitor monitor)
- throws SystemMessageException {
-
- if (monitor != null)
- monitor.beginTask("", remoteParents.length); //$NON-NLS-1$
- for (int i = 0; i < remoteParents.length; i++)
- {
- IProgressMonitor subMonitor = progressTick(monitor);
- IHostFile[] result = list(remoteParents[i], fileFilters[i], fileType, subMonitor);
- for (int j = 0; j < result.length; j++)
- {
- hostFiles.add(result[j]);
- }
- subMonitor.done();
- }
-
- }
-
- protected boolean isRightType(int fileType, IHostFile node)
- {
- switch (fileType)
- {
- case IFileService.FILE_TYPE_FILES_AND_FOLDERS:
- return true;
- case IFileService.FILE_TYPE_FILES:
- if (node.isFile())
- {
- return true;
- }
- else
- {
- return false;
- }
- case IFileService.FILE_TYPE_FOLDERS:
- if (node.isDirectory())
- {
- return true;
- }
- else
- {
- return false;
- }
- default:
- return true;
- }
- }
-
-
- /**
- * {@inheritDoc}
- * @since 3.0 returning void
- */
- public void deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException
- {
- if (monitor != null)
- monitor.beginTask("", remoteParents.length); //$NON-NLS-1$
- for (int i = 0; i < remoteParents.length; i++)
- {
- IProgressMonitor subMonitor = progressTick(monitor);
- delete(remoteParents[i], fileNames[i], subMonitor);
- subMonitor.done();
- }
- }
-
- /**
- * {@inheritDoc} Default implementation - just iterate through each file
- * @since 3.0 returning void
- */
- public void downloadMultiple(String[] remoteParents, String[] remoteFiles,
- File[] localFiles, boolean[] isBinaries, String[] hostEncodings,
- IProgressMonitor monitor) throws SystemMessageException
- {
- if (monitor != null)
- monitor.beginTask("", remoteParents.length); //$NON-NLS-1$
- for (int i = 0; i < remoteParents.length; i++)
- {
- IProgressMonitor subMonitor = progressTick(monitor);
- String remoteParent = remoteParents[i];
- String remoteFile = remoteFiles[i];
- File localFile = localFiles[i];
- boolean isBinary = isBinaries[i];
- String hostEncoding = hostEncodings[i];
- download(remoteParent, remoteFile, localFile, isBinary, hostEncoding, subMonitor);
- subMonitor.done();
- }
- }
-
- /**
- * {@inheritDoc} Default implementation - just iterate through each file
- * @since 3.0
- */
- public void uploadMultiple(File[] localFiles, String[] remoteParents,
- String[] remoteFiles, boolean[] isBinaries, String[] srcEncodings,
- String[] hostEncodings, IProgressMonitor monitor)
- throws SystemMessageException
- {
- if (monitor != null)
- monitor.beginTask("", remoteParents.length); //$NON-NLS-1$
- for (int i = 0; i < localFiles.length; i++)
- {
- IProgressMonitor subMonitor = progressTick(monitor);
- File localFile = localFiles[i];
- String remoteParent = remoteParents[i];
- String remoteFile = remoteFiles[i];
-
- boolean isBinary = isBinaries[i];
- String srcEncoding = srcEncodings[i];
- String hostEncoding = hostEncodings[i];
- upload(localFile, remoteParent, remoteFile, isBinary, srcEncoding, hostEncoding, subMonitor);
- monitor.done();
- }
- }
-
- /**
- * Returns the local platform encoding by default. Subclasses should override to return the actual remote encoding.
- * @see org.eclipse.rse.services.files.IFileService#getEncoding(org.eclipse.core.runtime.IProgressMonitor)
- * @since 2.0
- */
- public String getEncoding(IProgressMonitor monitor) throws SystemMessageException {
- return SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
- }
-
- /**
- * {@inheritDoc} The default implementation returns <code>null</code>.
- * Clients can override to return an input stream to the file.
- *
- * @see org.eclipse.rse.services.files.IFileService#getInputStream(String,
- * String, boolean, IProgressMonitor)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return null;
- }
-
- /**
- * {@inheritDoc} The default implementation returns <code>null</code>.
- * Clients can override to return an output stream to the file.
- *
- * @deprecated use
- * {@link #getOutputStream(String, String, int, IProgressMonitor)}
- * instead
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return null;
- }
-
- /**
- * {@inheritDoc} The default implementation returns <code>null</code>.
- * Clients can override to return an output stream to the file.
- *
- * @see org.eclipse.rse.services.files.IFileService#getOutputStream(String,
- * String, int, IProgressMonitor)
- * @since 3.0 using int options
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
- if ((options & IFileService.APPEND) == 0) {
- //forward to old deprecated implementation for backward compatibility with old services
- boolean isBinary = (options & IFileService.TEXT_MODE) == 0 ? true : false;
- return getOutputStream(remoteParent, remoteFile, isBinary, monitor);
- }
- return null;
- }
-
- /**
- * The default implementation returns false. Clients should override this
- * method if they make use of IFileServiceCodePageConverter to do conversion
- * during download and upload.
- * @since 3.0
- */
- public boolean supportsEncodingConversion(){
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/CodePageConverterManager.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/CodePageConverterManager.java
deleted file mode 100644
index 140f9b2aa..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/CodePageConverterManager.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- * David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
- * David McKnight (IBM) - [212229] using default code page converter that isn't null
- *******************************************************************************/
-package org.eclipse.rse.services.files;
-
-import java.util.Vector;
-
-/**
- * Utility class for getting a file service code page converter for a given
- * server encoding and file service
- *
- * @since 3.0
- */
-public class CodePageConverterManager {
-
-
- private static IFileServiceCodePageConverter _defaultCodePageConverter;
- protected static Vector _codePageConverters = new Vector();
-
- public static void registerCodePageConverter(IFileServiceCodePageConverter converter)
- {
- _codePageConverters.add(converter);
- }
-
- public static IFileServiceCodePageConverter getDefaultCodePageConverter()
- {
- if (_defaultCodePageConverter == null){
- _defaultCodePageConverter = new DefaultFileServiceCodePageConverter();
- }
- return _defaultCodePageConverter;
- }
-
- /**
- * Retrieves the first codepage converter provided via the codePageConverter extension point for the specified
- * encoding
- * @param serverEncoding The server encoding for which to retrieve a code page converter
- * @return A code page converter for the specified encoding, or null if no converter was found for that encoding.
- */
- public static IFileServiceCodePageConverter getCodePageConverter(String serverEncoding, IFileService fileService) {
-
- IFileServiceCodePageConverter matchingCodePageConverter = null;
- if (_codePageConverters != null)
- {
-
- //scan through the available converters and return the first valid one for the specified encoding for this
- // subsystem implementation
- for (int i=0; i<_codePageConverters.size(); i++) {
- IFileServiceCodePageConverter codePageConverter = (IFileServiceCodePageConverter)_codePageConverters.elementAt(i);
- if (codePageConverter.isServerEncodingSupported(serverEncoding, fileService))
- {
- if (matchingCodePageConverter != null){
- int matchingPriority = matchingCodePageConverter.getPriority(serverEncoding, fileService);
- int newPriority = codePageConverter.getPriority(serverEncoding, fileService);
- if (newPriority < matchingPriority){
- matchingCodePageConverter = codePageConverter;
- }
- }
- else {
- matchingCodePageConverter = codePageConverter;
- }
- }
- }
- }
-
- if (matchingCodePageConverter == null)
- {
- matchingCodePageConverter = getDefaultCodePageConverter();
- }
-
-
- return matchingCodePageConverter;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/DefaultFileServiceCodePageConverter.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/DefaultFileServiceCodePageConverter.java
deleted file mode 100644
index ef2462d0b..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/DefaultFileServiceCodePageConverter.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) -[209704] [api][dstore] Ability to override default encoding conversion needed.
- * David McKnight (IBM) -[220379] [api] Provide a means for contributing custom BIDI encodings
- * David McKnight (IBM) -[246857] Rename problem when a file is opened in the editor
- * David McKnight (IBM) -[279014] [dstore][encoding] text file corruption can occur when downloading from UTF8 to cp1252
- ********************************************************************************/
-package org.eclipse.rse.services.files;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CharsetEncoder;
-
-/**
- * @since 3.0
- */
-public class DefaultFileServiceCodePageConverter implements
- IFileServiceCodePageConverter {
-
- public byte[] convertClientStringToRemoteBytes(String remotePath, String clientString,
- String remoteEncoding, IFileService fs) {
- try
- {
- return clientString.getBytes(remoteEncoding);
- }
- catch (Exception e)
- {
- }
- return clientString.getBytes();
- }
-
- public void convertFileFromRemoteEncoding(String remotePath, File file, String remoteEncoding,
- String localEncoding, IFileService fs) {
- FileInputStream inputStream = null;
- FileOutputStream outStream = null;
- // read in the file
- try
- {
- int fileLength = (int)file.length();
- if (fileLength > 0){
- inputStream = new FileInputStream(file);
- BufferedInputStream bufInputStream = new BufferedInputStream(inputStream, fileLength);
- byte[] buffer = new byte[fileLength];
- bufInputStream.read(buffer, 0, fileLength);
- bufInputStream.close();
- ByteBuffer rmtBuf = ByteBuffer.wrap(buffer, 0, fileLength);
-
- // decoder to go from remote encoding to UTF8
- Charset rmtCharset = Charset.forName(remoteEncoding);
- CharsetDecoder rmtDecoder = rmtCharset.newDecoder();
-
- // convert from the remote encoding
- CharBuffer decodedBuf = null;
- decodedBuf = rmtDecoder.decode(rmtBuf);
- // for conversion to the local encoding
- Charset charset = Charset.forName(localEncoding);
- CharsetEncoder encoder = charset.newEncoder();
- byte[] localBuffer = null;
- // convert to the specified local encoding
- ByteBuffer lclBuf = encoder.encode(decodedBuf);
- localBuffer = lclBuf.array();
- outStream = new FileOutputStream(file);
- outStream.write(localBuffer, 0, localBuffer.length);
- }
- } catch (Exception e) {
- // outstream could not be written properly: report
- throw new RuntimeException(e);
- } finally {
- if (inputStream != null) {
- try {
- inputStream.close();
- } catch (IOException ioe) {
- }
- }
- if (outStream != null) {
- try {
- outStream.close();
- } catch (IOException ioe) {
- }
- }
- }
- }
-
- public boolean isServerEncodingSupported(String remoteEncoding,
- IFileService fs) {
- return true;
- }
-
- /**
- * to make another converter take precedence over this, supply a
- * code page converter returning a lower number (i.e. higher priority)
- */
- public int getPriority(String remoteEString, IFileService fs){
- return 1000;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/HostFilePermissions.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/HostFilePermissions.java
deleted file mode 100644
index f01dcf35f..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/HostFilePermissions.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- ********************************************************************************/
-package org.eclipse.rse.services.files;
-
-/**
- * Default implementation of "Universal" UNIX kind of IHostFilePermissions.
- * @since 3.0
- */
-public class HostFilePermissions implements
- IHostFilePermissions, Cloneable {
-
- private int _permissions = 0;
- private String _user;
- private String _group;
-
-
- /**
- * Constructor without any initial values. Users of this need to set fields
- * as appropriate
- */
- public HostFilePermissions(){
- }
-
- /**
- * Constructor that takes the initial permissions in rwxrwxrwx form
- * @param alphaPermissions the initial permissions in alpha form
- */
- public HostFilePermissions(String alphaPermissions, String user, String group){
- String accessString = alphaPermissionsToOctal(alphaPermissions);
- _permissions = Integer.parseInt(accessString, 8);
- _user = user;
- _group = group;
- }
-
- /**
- * Constructor that takes the initial permissions as a bitmask
- * @param initialPermissions the initial permissions bitmask
- */
- public HostFilePermissions(int initialPermissions, String user, String group){
- _permissions = initialPermissions;
- _user = user;
- _group = group;
- }
-
- /**
- * Convert permissions in rwxrwxrwx form to octal
- * @param userPermissions
- * @return
- */
- private String alphaPermissionsToOctal(String alphaPermissions)
- {
- if (alphaPermissions.length() == 10){ // directory bit?
- alphaPermissions = alphaPermissions.substring(1);
- }
- StringBuffer buf = new StringBuffer();
- // permissions
- char[] chars = alphaPermissions.toCharArray();
-
- int offset = -1;
- for (int i = 0; i < 3; i++){
- int value = 0;
-
- if (chars[++offset] == 'r'){
- value = 4;
- }
- if (chars[++offset] == 'w'){
- value += 2;
- }
- if (chars[++offset] == 'x'){
- value += 1;
- }
- buf.append(value);
- }
-
- return buf.toString();
- }
-
- public void setPermission(int permission, boolean value) {
- if (value)
- set(permission);
- else
- clear(permission);
- }
-
- public boolean getPermission(int permission) {
- return isSet(permission);
- }
-
- public int getPermissionBits() {
- return _permissions;
- }
-
- public void setPermissionBits(int bits) {
- _permissions = bits;
- }
-
- public String toString(){
- return "" + _permissions; //$NON-NLS-1$
- }
-
- private boolean isSet(long mask) {
- return (_permissions & mask) != 0;
- }
-
- private void set(int mask) {
- _permissions |= mask;
- }
-
- private void clear(int mask) {
- _permissions &= ~mask;
- }
-
- /**
- * return permissions in rwxrwxrwx form
- */
- public String toAlphaString(){
- StringBuffer buf = new StringBuffer();
-
- buf.append(getPermission(IHostFilePermissions.PERM_USER_READ) ? 'r' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_USER_WRITE) ? 'w' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_USER_EXECUTE) ? 'x' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_GROUP_READ) ? 'r' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_GROUP_WRITE) ? 'w' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_GROUP_EXECUTE) ? 'x' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_OTHER_READ) ? 'r' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_OTHER_WRITE) ? 'w' : '-');
- buf.append(getPermission(IHostFilePermissions.PERM_OTHER_EXECUTE) ? 'x' : '-');
- return buf.toString();
- }
-
- public String getGroupOwner() {
- return _group;
- }
-
- public String getUserOwner() {
- return _user;
- }
-
- public void setGroupOwner(String group) {
- _group = group;
- }
-
- public void setUserOwner(String user) {
- _user = user;
- }
-
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFilePermissionsService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFilePermissionsService.java
deleted file mode 100644
index 16ed0846c..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFilePermissionsService.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- ********************************************************************************/
-package org.eclipse.rse.services.files;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Service used to get and set the permissions of a file. The
- * {@link #getCapabilities(IHostFile)} method must be implemented to tell
- * clients what kinds of permission services are actually available on a
- * concrete implementation.
- *
- * @since 3.0
- */
-public interface IFilePermissionsService {
-
- public static int FS_CAN_GET_OWNER = 1 << 0;
- public static int FS_CAN_GET_GROUP = 1 << 1;
- public static int FS_CAN_GET_PERMISSIONS = 1 << 2;
- public static int FS_CAN_SET_OWNER = 1 << 3;
- public static int FS_CAN_SET_GROUP = 1 << 4;
- public static int FS_CAN_SET_PERMISSIONS = 1 << 5;
-
- public static final int FS_CAN_GET_ALL = FS_CAN_GET_OWNER | FS_CAN_GET_GROUP | FS_CAN_GET_PERMISSIONS;
- public static final int FS_CAN_SET_ALL = FS_CAN_SET_OWNER | FS_CAN_SET_GROUP | FS_CAN_SET_PERMISSIONS;
-
-
- /**
- * Gets the permissions for a file including the user and group owner
- *
- * @param file the remote file
- * @param monitor the monitor for this potentially long running operation
- * @return the host file permissions
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public IHostFilePermissions getFilePermissions(IHostFile file, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Sets the permissions for a file including the user and group owner as specified in the permissions
- *
- * @param file the remote file
- * @param permissions the new permissions for this file
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- */
- public void setFilePermissions(IHostFile file, IHostFilePermissions permissions, IProgressMonitor monitor) throws SystemMessageException;
-
-
- /**
- * Returns the capabilities of this file permissions service for the corresponding file. If
- * null is specified, this returns the general capabilities of this service.
- *
- * @param file the remote file
- * @return the capabilities of this service against this file
- */
- public int getCapabilities(IHostFile 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 cab7f5d7a..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary
- * Martin Oberhuber (Wind River) - [204710] Update Javadoc to mention that getUserHome() may return null
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Kevin Doyle (IBM) - [208778] new API getOutputSteam for getting an output stream in append mode
- * David McKnight (IBM) - [209704] added supportsEncodingConversion()
- * Martin Oberhuber (Wind River) - [cleanup] Fix API since tags
- * David Dykstal (IBM) - [221211] clarifying javadoc on batch operations
- * David Dykstal (IBM) - [221211] fix IFileService API for batch operations
- * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
- * Martin Oberhuber (Wind River) - [234026] Clarify IFileService#createFolder() Javadocs
- * Martin Oberhuber (Wind River) - [274568] Dont use SftpMonitor for Streams transfer
- * Martin Oberhuber (Wind River) - [285942][api] Throw exception if list() on a non-folder
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.List;
-
-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>
- * <p>
- * Implementers of this interface will have to either be instantiated,
- * initialized, or somehow derive a connection as part of its state.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- * File service implementations must subclass
- * {@link AbstractFileService} rather than implementing this
- * interface directly.
- */
-public interface IFileService extends IService
-{
- /**
- * Query constant (bit mask value 1) which indicates that a query should be
- * on files. The filter(s) passed into the list methods will produce a
- * subset of files matching the filter(s).
- *
- * This constant is passed into the IFileService list calls. Implementors of
- * IFileService make use of this to determine what to query and what to
- * return from the query.
- *
- * @see IFileService#list(String,String,int,IProgressMonitor)
- * @see IFileService#listMultiple(String[],String[],int,List,IProgressMonitor)
- * @see IFileService#listMultiple(String[],String[],int[],List,IProgressMonitor)
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final int FILE_TYPE_FILES = 0x1;
-
- /**
- * Query constant (bit mask value 2) which indicates that a query should be
- * on folders. The filter(s) passed into the list methods will produce a
- * subset of folders matching the filter(s).
- *
- * This constant is passed into the IFileService list calls. Implementors of
- * IFileService make use of this to determine what to query and what to
- * return from the query.
- *
- * @see IFileService#list(String,String,int,IProgressMonitor)
- * @see IFileService#listMultiple(String[],String[],int,List,IProgressMonitor)
- * @see IFileService#listMultiple(String[],String[],int[],List,IProgressMonitor)
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final int FILE_TYPE_FOLDERS = 0x2;
-
- /**
- * Query constant (bit mask value 0) which indicates that a query should
- * produce folders and files. The filter(s) passed into the list methods
- * will produce a subset of files matching the filter(s) and all the
- * folders. Note that only files are filtered and all folders are returned
- * when this is used.
- *
- * This constant is passed into the IFileService list calls. Implementors of
- * IFileService make use of this to determine what to query and what to
- * return from the query.
- *
- * @see IFileService#list(String,String,int,IProgressMonitor)
- * @see IFileService#listMultiple(String[],String[],int,List,IProgressMonitor)
- * @see IFileService#listMultiple(String[],String[],int[],List,IProgressMonitor)
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final int FILE_TYPE_FILES_AND_FOLDERS = 0x0;
-
- /**
- * Options constant (value 1 &lt;&lt;0) for specifying a stream that will
- * append data to a file.
- *
- * @see IFileService#getOutputStream(String, String, int, IProgressMonitor)
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final int APPEND = 1 << 0;
-
- /**
- * Options constant (value 2 &lt;&lt;0) for specifying that a file is Text
- * instead of the default Binary.
- *
- * In Text mode, encoding conversions and line end conversions can be
- * performed on the stream.
- *
- * @see IFileService#getOutputStream(String, String, int, IProgressMonitor)
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final int TEXT_MODE = 2 << 0;
-
- /**
- * Options constant (value 0) to indicate that no bit options are set.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public static final int NONE = 0;
-
- /**
- * 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 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)
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) 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 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)
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void upload(File localFile, String remoteParent, String remoteFile, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException;
-
-
- /**
- * Copy files to the remote file system. The remote target is denoted by
- * strings representing the parents and strings representing the files.
- * <p>
- * If an error occurs during the upload of a file, this operation stops on that file and a {@link SystemMessageException} is thrown.
- * Files uploaded before that file will remain uploaded. Files in the list after that file will not be uploaded.
- * The file on which the error occurs will not be uploaded.
- * @param localFiles - real files in the local file system.
- * @param remoteParents - strings designating the parent folders of the target for the files.
- * @param remoteFiles - strings designating the names of the files to be written on the remote system.
- * @param isBinary - indicates whether the files are text or binary
- * @param srcEncodings - the src encodings of the files (if text)
- * @param hostEncodings - the tgt encodings of the files (if text)
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void uploadMultiple(File[] localFiles, String[] remoteParents, String[] remoteFiles, boolean[] isBinary, String[] srcEncodings, String[] hostEncodings, IProgressMonitor monitor) throws SystemMessageException;
-
-
- /**
- * Copy a file from the remote file system to the local system.
- * @param remoteParent - a String designating the remote parent.
- * @param remoteFile - a String designating the remote file residing in the parents.
- * @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)
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void download(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Copy files from the remote file system to the local system.
- * <p>
- * If an error occurs during the download of a file, this operation stops on that file and a {@link SystemMessageException} is thrown.
- * Files downloaded before that file will remain downloaded. Files in the list after that file will not be downloaded.
- * The file on which the error occurs will not be downloaded.
- *
- * @param remoteParents - string designating the remote parents.
- * @param remoteFiles - Strings designating the remote files residing in the
- * parents.
- * @param localFiles - The files that are to be written. If the files exists
- * they are overwritten.
- * @param isBinary - indicates whether the files are text on binary
- * @param hostEncodings - the encodings on the host (if text)
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the {@link RemoteFileException} family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void downloadMultiple(String[] remoteParents, String[] remoteFiles, File[] localFiles, boolean[] isBinary, String[] hostEncodings, IProgressMonitor monitor) throws SystemMessageException;
-
-
-
- /**
- * Get an abstract remote file handle for a specified path.
- *
- * @param remoteParent the name of the parent directory on the remote file
- * system from which to retrieve the file.
- * @param name the name of the file to be retrieved.
- * @param monitor the monitor for this potentially long running operation
- * @return the host file given the parent path and file name. Must not
- * return <code>null</code>, non-existing files should be
- * reported with an IHostFile object where
- * {@link IHostFile#exists()} returns <code>false</code>.
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- */
- public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * List the contents of a remote folder.
- *
- * @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.
- * @param fileType - indicates whether to query files, folders, both or some
- * other type
- * @param monitor the monitor for this potentially long running operation
- * @return the list of host files.
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family. Exceptions
- * are particularly expected when the remoteParent does not
- * exist, or is not a folder.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public IHostFile[] list(String remoteParent, String fileFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Get multiple abstract remote file handles for an array of specified
- * paths.
- * <p>
- * If an error occurs during the retrieval an item, this operation stops on that item and a {@link SystemMessageException} is thrown.
- * Items retrieved before that item will be returned. Items to be retrieved after that item will not be retrieved.
- * The items on which the error occurs will not be retrieved.
- *
- * @param remoteParents - the list of remote parents
- * @param names - the list of file names
- * @param hostFiles a list to which the retrieved {@link IHostFile} objects will be appended
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void getFileMultiple(String remoteParents[], String names[], List hostFiles, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * List the contents of multiple remote folders.
- * <p>
- * If an error occurs during the retrieval of the contents of a folder, this
- * operation stops on that folder and a {@link SystemMessageException} is
- * thrown. Items retrieved before that folder will be returned. Items in
- * folders after that folder will not be retrieved. The items in the folder
- * on which the error occurs will not be returned.
- *
- * @param remoteParents - the names of the parent directories on the remote
- * file system from which to retrieve the collective child list.
- * @param fileFilters - a set of strings that can be used to filter the
- * children. Only those files matching the filter corresponding
- * to it's remoteParent make it into the list. The interface does
- * not dictate where the filtering occurs. For each remoteParent,
- * there must be a corresponding fileFilter.
- * @param fileTypes - indicates whether to query files, folders, both or
- * some other type. For each remoteParent, there must be a
- * corresponding fileType. For the default list of available file
- * types see <code>IFileServiceContants</code>
- * @param hostFiles a list to which the found {@link IHostFile} objects will
- * be appended
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family. Exceptions
- * are particularly expected when a remoteParent does not exist,
- * or is not a folder.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void listMultiple(String[] remoteParents, String[] fileFilters, int[] fileTypes, List hostFiles, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * List the contents of multiple remote folders.
- * <p>
- * If an error occurs during the retrieval of the contents of a folder, this
- * operation stops on that folder and a {@link SystemMessageException} is
- * thrown. Items retrieved before that folder will be returned. Items in
- * folders after that folder will not be retrieved. The items in the folder
- * on which the error occurs will not be returned.
- *
- * @param remoteParents - the names of the parent directories on the remote
- * file system from which to retrieve the collective child list.
- * @param fileFilters - a set of strings that can be used to filter the
- * children. Only those files matching the filter corresponding
- * to it's remoteParent make it into the list. The interface does
- * not dictate where the filtering occurs. For each remoteParent,
- * there must be a corresponding fileFilter.
- * @param fileType - indicates whether to query files, folders, both or some
- * other type. All results will be of the specified type. For the
- * default list of available file types see
- * <code>IFileServiceContants</code>
- * @param hostFiles a list to which the found {@link IHostFile} objects will
- * be appended
- * @param monitor the monitor for this potentially long running operation
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family. Exceptions
- * are particularly expected when a remoteParent does not exist,
- * or is not a folder.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void listMultiple(String[] remoteParents, String[] fileFilters, int fileType, List hostFiles, IProgressMonitor monitor) throws SystemMessageException;
-
-
- /**
- * Get abstract remote file handles for the known remote file system roots.
- *
- * @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 user's home directory on this connection.
- *
- * The resulting IHostFile object is just a handle, so there is no guarantee
- * that it refers to an existing file.
- *
- * This method may also return <code>null</code> if the home directory could
- * not be determined (for instance, because the connection is not yet connected).
- * In this case, clients are encouraged to query the home directory again once
- * the connection is connected.
- *
- * @return A handle to the current user's home directory, or <code>null</code>
- * if the home directory could not be determined.
- */
- public IHostFile getUserHome();
-
- /**
- * Create a file on the host.
- *
- * @param remoteParent the parent directory
- * @param fileName the name of the new file
- * @param monitor the monitor for this potentially long running operation
- * @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(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Create a folder on the host.
- *
- * Implementations are free to create missing parent folders or fail with a
- * SystemMessageException if the parent folder does not yet exist. In
- * general, creating missing parent folders is recommended if it doesn't
- * require additional client-server round trips. Therefore the "Local" and
- * "DStore" services do create missing parent folders.
- *
- * @param remoteParent the parent directory
- * @param folderName the name of the new folder
- * @param monitor the progress monitor
- * @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(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Delete a file or folder on the host.
- *
- * @param remoteParent the folder containing the file to delete
- * @param fileName the name of the file or folder to delete
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs or the user canceled
- * the operation. SystemElementNotFoundException is thrown if the remote
- * file doesn't exist.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Delete 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.
- * <p>
- * If an error occurs during the deletion of an item, this operation stops on that item and a {@link SystemMessageException} is thrown.
- * Items deleted before that item will remain deleted. Items specified after that item will not be deleted.
- * The item on which the error occurs will not be deleted.
- *
- * @param remoteParents the array of folders containing the files to delete
- * @param fileNames the names of the files or folders to delete
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void deleteBatch(String[] remoteParents, String[] fileNames, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Rename a file or folder on the host.
- *
- * @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 monitor the progress monitor
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void rename(String remoteParent, String oldName, String newName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Rename a file or folder on the host.
- *
- * @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
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Move the file or folder specified to a different remote path.
- *
- * @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
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void move(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Copy the file or folder to the specified destination.
- *
- * @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
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void copy(String srcParent, String srcName, String tgtParent, String tgtName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Copy a set of files or folders to the specified destination.
- * <p>
- * If an error occurs during the copy of an item, this operation stops on that item and a {@link SystemMessageException} is thrown.
- * Items copied before that item will remain copied. Items copied after that item will not be copied.
- * The item on which the error occurs will not be copied.
- *
- * @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
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs. Typically this would
- * be one of those in the RemoteFileException family.
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void copyBatch(String[] srcParents, String[] srcNames, String tgtParent, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Indicates whether the file system is case sensitive.
- *
- * @return true if the file system has case sensitive file names
- */
- public boolean isCaseSensitive();
-
- /**
- * Set the last modified stamp of the file or folder with the specified
- * timestamp.
- *
- * Note that the precision to which the underlying file system supports last
- * modified times may vary. Therefore, even if this method successfully sets
- * the timestamp, there is no guarantee that the
- * {@link IHostFile#getModifiedDate()} method after a following
- * {@link #getFile(String, String, IProgressMonitor)} call returns exactly
- * the same timestamp.
- *
- * @param parent the parent path of the file to set
- * @param name the name of the file to set
- * @param timestamp the new timestamp in milliseconds from January 1, 1970,
- * 00:00:00 UTC.
- * @param monitor the progress monitor
- * @see IHostFile#getModifiedDate()
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void setLastModified(String parent, String name, long timestamp, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Set the read-only permission of the specified file or folder.
- *
- * @param parent the parent path of the file to set
- * @param name the name of the file to set
- * @param readOnly indicates whether to make the file read-only or
- * read-write
- * @param monitor the progress monitor
- *
- * @since org.eclipse.rse.services 3.0
- */
- public void setReadOnly(String parent, String name, boolean readOnly, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Gets the remote encoding.
- * @param monitor the progress monitor.
- * @return the encoding.
- * @throws SystemMessageException if an error occurs.
- * @since 2.0
- */
- public String getEncoding(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Get the input stream to access the contents a remote file. Clients should
- * close the input stream when done.
- *
- * @param remoteParent the absolute path of the parent.
- * @param remoteFile the name of the remote file.
- * @param isBinary <code>true</code> if the file is a binary file,
- * <code>false</code> otherwise.
- * @param monitor the progress monitor. Only used for the process of opening
- * the Stream. Implementations are not expected to use or update
- * the monitor for actual Stream transfer operations.
- * @return the input stream to access the contents of the remote file.
- * @throws SystemMessageException if an error occurs.
- * @since org.eclipse.rse.services 2.0
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Get the output stream to write to a remote file. Clients should close the
- * output stream when done.
- *
- * @param remoteParent the absolute path of the parent.
- * @param remoteFile the name of the remote file.
- * @param isBinary <code>true</code> if the file is a binary file,
- * <code>false</code> otherwise.
- * @param monitor the progress monitor. Only used for the process of opening
- * the Stream. Implementations are not expected to use or update
- * the monitor for actual Stream transfer operations.
- * @return the input stream to access the contents of the remote file.
- * @throws SystemMessageException if an error occurs.
- * @since org.eclipse.rse.services 2.0
- * @deprecated Use
- * {@link #getOutputStream(String, String, int, IProgressMonitor)}
- * instead
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Get the output stream to write/append to a remote file. Clients should
- * close the output stream when done.
- *
- * @param remoteParent the absolute path of the parent.
- * @param remoteFile the name of the remote file.
- * @param options bit wise or of option constants. Valid constants are
- * {@link IFileService#APPEND}, {@link IFileService#TEXT_MODE},
- * and {@link IFileService#NONE}
- * @param monitor the progress monitor. Only used for the process of opening
- * the Stream. Implementations are not expected to use or update
- * the monitor for actual Stream transfer operations.
- * @return the input stream to access the contents of the remote file.
- * @throws SystemMessageException if an error occurs.
- * @since org.eclipse.rse.services 3.0
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Indicates whether this file service supports code page conversion using
- * the IFileServiceCodePageConverter mechanism. Certain extensions, such as
- * property pages for encoding conversion can determine whether or not to
- * display or enable themselves based on result of this call.
- *
- * @return whether this service supports encoding conversion
- *
- * @since org.eclipse.rse.services 3.0
- */
- public boolean supportsEncodingConversion();
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileServiceCodePageConverter.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileServiceCodePageConverter.java
deleted file mode 100644
index 8cece22c1..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileServiceCodePageConverter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) -[209704] [api] Ability to override default encoding conversion needed.
- * David McKnight (IBM) -[220379] [api] Provide a means for contributing custom BIDI encodings
- * David McKnight (IBM) -[279014] [dstore][encoding] text file corruption can occur when downloading from UTF8 to cp1252
- ********************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import java.io.File;
-import java.nio.charset.CharacterCodingException;
-
-
-/**
- * This interface is used by the extension point
- * It allows overriding the Universal File Subsystem translation of files, and results in
- * binary transfer, with calls to the implementor to handle code page conversion.
- * @since org.eclipse.rse.services 3.0
- */
-public interface IFileServiceCodePageConverter {
-
- /**
- * Converts a client string to remote bytes, for use when uploading in binary mode.
- * @param remotePath the path of the remote file
- * @param clientString the client string to convert
- * @param remoteEncoding The remote encoding for the desired server bytes
- * @param fs The file service to apply conversion to.
- * Can be used to determine implementation specific settings to the converter
- * @return The bytes to upload to the server
- */
- public byte [] convertClientStringToRemoteBytes(String remotePath, String clientString, String remoteEncoding, IFileService fs);
-
- /**
- * Converts the specified file (which was downloaded from the server in binary mode) from server encoding bytes, to local encoding
- * @param remotePath the path of the remote file
- * @param file The file to convert
- * @param localEncoding The remote encoding of the file
- * @param fs The file service to apply conversion to.
- * Can be used to determine implementation specific settings to the converter
- * @throws RuntimeException (wrapping a CharacterCodingException or IOException) in case of an error transposing from source to target encoding
- */
- public void convertFileFromRemoteEncoding(String remotePath, File file, String remoteEncoding, String localEncoding, IFileService fs);
-
- /**
- * Indicates whether or not the specified server encoding and subsystem implementation is supported by this code page converter
- * @param remoteEncoding The remote encoding from the server to check
- * @param fs The file service to apply conversion to.
- * Can be used to determine implementation specific settings to the converter
- * @return True if this code page converter can convert the specified encoding, false otherwise
- */
- public boolean isServerEncodingSupported(String remoteEncoding, IFileService fs);
-
- /**
- * Indicates the priority of this code page converter if more than one code page converter
- * handle a particular encoding. The lower the number, the higher the priority.
- * @return priority
- */
- public int getPriority(String remoteEncoding, IFileService fs);
-
-}
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 210daef0b..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFile.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.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.
- * 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.
- *
- * @return a String representing the path name. Never returns <code>null</code>.
- */
- 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);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissions.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissions.java
deleted file mode 100644
index 7c3ffb751..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissions.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- ********************************************************************************/
-package org.eclipse.rse.services.files;
-
-
-/**
- * Interface for file permission and ownership support in RSE
- * IFileService. An implementation of an IHostFilePermissions
- * object is expected to be a data storage for permission and
- * ownership information.
- * @since 3.0
- */
-public interface IHostFilePermissions {
-
- /**
- * Permission constant indicating that
- * the user can read this file
- */
- public static final int PERM_USER_READ = 1 << 8;
-
- /**
- * Permission constant indicating that
- * the user can write to this file
- */
- public static final int PERM_USER_WRITE = 1 << 7;
-
- /**
- * Permission constant indicating that
- * the user can execute this file
- */
- public static final int PERM_USER_EXECUTE = 1 << 6;
-
- /**
- * Permission constant indicating that
- * the group can read this file
- */
- public static final int PERM_GROUP_READ = 1 << 5;
-
- /**
- * Permission constant indicating that
- * the group can write to this file
- *
- */
- public static final int PERM_GROUP_WRITE = 1 << 4;
-
- /**
- * Permission constant indicating that
- * the group can execute this file
- *
- */
- public static final int PERM_GROUP_EXECUTE = 1 << 3;
-
- /**
- * Permission constant indicating that
- * other users can read this file
- *
- */
- public static final int PERM_OTHER_READ = 1 << 2;
-
- /**
- * Permission constant indicating that
- * other users can write to this file
- *
- */
- public static final int PERM_OTHER_WRITE = 1 << 1;
-
- /**
- * Permission constant indicating that
- * other users can execute to this file
- *
- */
- public static final int PERM_OTHER_EXECUTE = 1 << 0;
-
-
- // support masks
- public static final int PERM_ANY_READ = PERM_USER_READ | PERM_GROUP_READ | PERM_OTHER_READ;
- public static final int PERM_ANY_WRITE = PERM_USER_WRITE | PERM_GROUP_WRITE | PERM_OTHER_WRITE;
- public static final int PERM_ANY_EXECUTE = PERM_USER_EXECUTE | PERM_GROUP_EXECUTE | PERM_OTHER_EXECUTE;
-
- /**
- * Set or reset all the permission bits from the given bitmask.
- *
- * @param bitmask the permission(s) bits to modify
- * @param value whether to turn on off of the permission(s)
- *
- * Example: setPermission(PERM_USER_WRITE | PERM_GROUP_WRITE, true);
- */
- public void setPermission(int bitmask, boolean value);
-
- /**
- * Test if any of the permission bits from the bitmask are set.
- *
- * @param bitmask the permission(s) to check for
- * @return true if one of the permission bits is set
- *
- * Example: getPermission(PERM_USER_WRITE | PERM_GROUP_WRITE)
- */
- public boolean getPermission(int bitmask);
-
- /**
- * Get the set of permission bits.
- *
- * @return set of permission bits
- */
- public int getPermissionBits();
-
- /**
- * Set the permission bits
- * @param bits the set of permission bits
- */
- public void setPermissionBits(int bits);
-
-
- /**
- * return permissions in rwxrwxrwx form
- */
- public String toAlphaString();
-
- /**
- * returns the user owner of the file
- * @return the user owner
- */
- public String getUserOwner();
-
- /**
- * returns the group owner of the file
- * @return the group owner
- */
- public String getGroupOwner();
-
- /**
- * Sets the user owner attribute
- * @param user the user owner attribute
- */
- public void setUserOwner(String user);
-
- /**
- * Sets the group owner attribute
- * @param group the group owner attribute
- */
- public void setGroupOwner(String group);
-
- /**
- * Creates and returns a copy of this object, as specified
- * by the {@link Object#clone()} contract.
- *
- * Each implementer of the IHostFilePermission API must properly implement
- * this method and implement the {@link Cloneable} interface.
- * @return the cloned object
- * @throws CloneNotSupportedException if an instance cannot be cloned for
- * any reason, e.g. because its state contains complex objects that
- * cannot be cloned.
- * @see Object#clone()
- */
- public Object clone() throws CloneNotSupportedException;
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissionsContainer.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissionsContainer.java
deleted file mode 100644
index 30bb91b96..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IHostFilePermissionsContainer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.services.files;
-
-/**
- * A container of permissions. Implementations of IHostFile that support
- * IHostFilePermissions should implement this too
- * @since 3.0
- */
-public interface IHostFilePermissionsContainer {
-
- /**
- * Returns the host file permissions (including user and group) for this file
- * @return the host file permissions
- */
- public IHostFilePermissions getPermissions();
-
- /**
- * TODO remove this API - here for now because we want to prevent duplicate
- * query jobs from being triggered from SystemViewRemoteFileAdapter.getPropertyValue()
- *
- * Sets the permissions attributes for this file. Right now, using this
- * to set a dummy "Pending" set of permissions from UI when doing asynchronous queries
- * from property sheet or table view
- */
- public void setPermissions(IHostFilePermissions permissions);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/PendingHostFilePermissions.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/PendingHostFilePermissions.java
deleted file mode 100644
index 12de1d1a0..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/PendingHostFilePermissions.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.services.files;
-
-/**
- * A dummy HostFilePermissions node that can be used for deferred
- * query of permissions. Clients who want to read permissions but
- * see this pending node need to wait until the real permissions
- * get available.
- *
- * @since 3.0
- */
-public class PendingHostFilePermissions extends HostFilePermissions {
-
- public PendingHostFilePermissions()
- {
- super(0, "Pending", "Pending"); //$NON-NLS-2$
- }
-
-}
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 49c44ab50..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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) - [216351] Improve cancellation of SystemFetchOperation for files
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226374] [api] Need default SystemMessageException specialisations
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-
-/**
- * Exception thrown when attempting a file operation and the user cancelled it
- * before it could be completed. Used to extend RemoteFileException before 3.0
- *
- * @deprecated use SystemOperationCancelledException
- * @since 3.0
- */
-public class RemoteFileCancelledException extends SystemOperationCancelledException {
-
- /**
- * 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;
-
- /**
- * Constructor
- */
- public RemoteFileCancelledException() {
- super();
- }
-}
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 046d7706d..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileException.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - [226374] [api] Need default SystemMessageException specialisations
- * Martin Oberhuber (Wind River) - [286129][api] RemoteFileException(String) violates API contract
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.internal.services.Activator;
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemRemoteMessageException;
-
-
-/**
- * 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 embedded exception that is the
- * original exception from the remote system.
- * <p>
- * Use {#link getRemoteException()} to retrieve that wrapped exception, if any.
- * Extends SystemRemoteMessageException since 3.0
- *
- * @since 3.0
- */
-public class RemoteFileException extends SystemRemoteMessageException
-{
- /**
- * 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;
-
- /**
- * 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
- * @deprecated this constructor violates the contract that all
- * RemoteFileException instances must have an embedded remote
- * exception for {@link #getRemoteException()} to return
- */
- public RemoteFileException(ResourceBundle bundle, String key)
- {
- this(getString(bundle, key));
- }
-
- /**
- * Constructor for RemoteFileException with an error message for
- * getMessage() to return.
- *
- * @param msg The fully resolved message
- * @deprecated this constructor violates the contract that all
- * RemoteFileException instances must have an embedded remote
- * exception for {@link #getRemoteException()} to return
- */
- public RemoteFileException(String msg)
- {
- this(msg, new Exception(msg));
- }
- /**
- * 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, remoteException);
- String msgTxt = RSEServicesMessages.FILEMSG_OPERATION_FAILED;
- if (remoteException != null && remoteException.getMessage() != null && !remoteException.getMessage().equals(msg)) {
- msg = (msg == null) ? remoteException.getMessage() : msg + ": " + remoteException.getMessage();
- }
- String msgDetails = NLS.bind(RSEServicesMessages.FILEMSG_OPERATION_FAILED_DETAILS, msg);
- SystemMessage myMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, "RSEF1002", //$NON-NLS-1$
- IStatus.ERROR, msgTxt, msgDetails);
- setSystemMessage(myMessage);
- }
-
- /**
- * Constructor for RemoteFileException with an error message for
- * getMessage() to return.
- *
- * @param msg The fully resolved message
- * @deprecated this constructor violates the contract that all
- * RemoteFileException instances must have an embedded remote
- * exception for {@link #getRemoteException()} to return
- */
- public RemoteFileException(SystemMessage msg)
- {
- this(msg, new Exception(msg.getLevelOneText()));
- }
- /**
- * 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, remoteException);
- }
-
- 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"; //$NON-NLS-1$ //$NON-NLS-2$
- return msg;
- }
-
-}
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 00d963465..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileIOException.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.internal.services.Activator;
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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(Activator.PLUGIN_ID, remoteException), remoteException);
-
- }
-
- /**
- * Constructor for RemoteFileIOException that also takes a pluginId
- *
- * @param pluginId a plugin ID
- * @param remoteException the initial cause of this exception
- * @since 3.0
- */
- public RemoteFileIOException(String pluginId, Exception remoteException) {
- super(getMyMessage(pluginId, remoteException), remoteException);
-
- }
-
- private static SystemMessage getMyMessage(String pluginId, Exception remoteException) {
-
- String secondLevel = remoteException.getMessage();
- if (secondLevel == null) {
- secondLevel = remoteException.getClass().getName();
- }
-
- String msgTxt = RSEServicesMessages.FILEMSG_OPERATION_FAILED;
- String msgDetails = NLS.bind(RSEServicesMessages.FILEMSG_OPERATION_FAILED_DETAILS, secondLevel);
-
- myMessage = new SimpleSystemMessage(pluginId,
- "RSEF1002", //$NON-NLS-1$
- IStatus.ERROR, msgTxt, msgDetails);
-
- return myMessage;
- }
-
-}
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 0b44e86e5..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileSecurityException.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [226374] [api] Need default SystemMessageException specialisations
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.rse.internal.services.Activator;
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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().
- *
- * @deprecated Use SystemRemoteSecurityException
- */
-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), remoteException);
-
- }
-
- private static SystemMessage getMyMessage(Exception remoteException) {
- if (myMessage == null) {
- String secondLevel = remoteException.getMessage();
- if (secondLevel == null) {
- secondLevel = remoteException.getClass().getName();
- }
-
- String msgTxt = RSEServicesMessages.FILEMSG_SECURITY_VIOLATION;
- String msgDetails = NLS.bind(RSEServicesMessages.FILEMSG_SECURITY_VIOLATION_DETAILS, secondLevel);
-
- myMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- "RSEF1001", //$NON-NLS-1$
- IStatus.ERROR, msgTxt, msgDetails);
- }
- return myMessage;
- }
-}
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 7aaf7b2e6..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.services.files;
-
-import org.eclipse.core.runtime.IStatus;
-
-import org.eclipse.rse.internal.services.Activator;
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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);
- }
-
-
- private static SystemMessage getMyMessage() {
- if (myMessage == null) {
- String msgTxt = RSEServicesMessages.FILEMSG_FOLDER_NOT_EMPTY;
- String msgDetails = RSEServicesMessages.FILEMSG_FOLDER_NOT_EMPTY_DETAILS;
- myMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
- "RSEF1003", //$NON-NLS-1$
- IStatus.ERROR, msgTxt, msgDetails);
- }
- return myMessage;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/package.html b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/package.html
deleted file mode 100644
index f2afc79f6..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/package.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=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <meta name="Copyright" content="Copyright (c) 2008 Wind River Systems, Inc. and others.">
- <meta name="License" content="Made available under the terms of the Eclipse Public License v1.0.">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for the RSE Services Layer.
-<h2>
-Package Specification</h2>
-<p>
-The RSE Services layer provides interfaces and basic utility classes
-for remote operations. There is no restriction whatsoever about the
-kind of those operations, and actually there isn't even a need for
-remote systems to be involved. The Services defined here provide
-basic functionality for RSE to operate on.
-</p><p>
-The RSE Services layer is designed to have only minimal dependency into
-Eclipse core APIs, such that Services can eventually be re-used in
-environments outside Eclipse. This can be done today by providing a library
-with mock objects for the few Eclipse interfaces that Services currently use:
-<code>IAdaptable</code>, <code>IProgressMonitor</code>,
-<code>IStatus</code>, <code>NLS</code>, <code>PlatformObject</code>
-and few others related to the Eclipse Extension Registry, which are only
-used in the Activator and can thus be replaced easily by a different
-mechanisms for providing extensions.
-</p>
-</body>
-</html>
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 161db8910..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractHostProcess.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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
-{
- protected Object[] _properties = new Object[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT+1];
-
- /**
- * create a new AbstractHostProcess with the default property set
- */
- public AbstractHostProcess()
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = " "; //$NON-NLS-1$
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = new String(" "); //$NON-NLS-1$
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = " "; //$NON-NLS-1$
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS] = new Long(-1);
- _properties[ISystemProcessRemoteConstants.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[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID] = getLongAttribute(pid, -1);
- }
-
- public void setPPid(String ppid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID] = getLongAttribute(ppid, -1);
-
- }
-
- public void setName(String name)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME] = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.clientserver.processes.IHostProcess#getLabel()
- */
- public String getLabel()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT];
- }
-
- public void setLabel(String label)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT] = label;
- }
-
- public void setState(String state)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS] = state;
- }
-
- public void setTgid(String tgid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID] = getLongAttribute(tgid, -1);
- }
-
- public void setTracerPid(String tracerpid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID] = getLongAttribute(tracerpid, -1);
- }
-
- public void setUid(String uid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID] = getLongAttribute(uid, -1);
- }
-
- public void setUsername(String username)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME] = username;
- }
-
- public void setGid(String gid)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID] = getLongAttribute(gid, -1);
- }
-
- public void setVmSizeInKB(String size)
- {
- _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE] = getLongAttribute(size, 0);
- }
-
- public void setVmRSSInKB(String size)
- {
- _properties[ISystemProcessRemoteConstants.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("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
- int numOfExpectedTokens = ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT;
- int tokens = str.length;
- if (tokens == numOfExpectedTokens)
- {
- try
- {
- setPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]);
-
- setName(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME]);
-
- setTgid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]);
-
- setPPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]);
-
- setTracerPid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]);
-
- setUid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]);
-
- setUsername(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME]);
-
- setGid(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]);
-
- setVmSizeInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]);
-
- setVmRSSInKB(str[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMRSS]);
-
- setState(str[ISystemProcessRemoteConstants.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[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PID]).longValue();
- }
-
- public long getPPid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_PPID]).longValue();
- }
-
- public String getName()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_EXENAME];
- }
-
- public String getState()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_STATUS];
- }
-
- public long getTgid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TGID]).longValue();
- }
-
- public long getTracerPid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_TRACERPID]).longValue();
- }
-
- public long getUid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_UID]).intValue();
- }
-
- public String getUsername()
- {
- return (String) _properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_USERNAME];
- }
-
- public long getGid()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_GID]).intValue();
- }
-
- public boolean isRoot()
- {
- return (getPPid() == 0);
- }
-
- public long getVmSizeInKB()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_INDEX_VMSIZE]).longValue();
- }
-
- public long getVmRSSInKB()
- {
- return ((Long)_properties[ISystemProcessRemoteConstants.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 < ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT; i++)
- {
- properties = properties + _properties[i].toString();
- if (i != ISystemProcessRemoteConstants.PROCESS_ATTRIBUTES_COUNT - 1)
- properties = properties + IServiceConstants.TOKEN_SEPARATOR;
- }
- return properties;
- }
-}
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 b73c72a90..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/AbstractProcessService.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- ********************************************************************************/
-
-package org.eclipse.rse.services.processes;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.AbstractService;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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;
-
-/**
- * Abstract base class for RSE Process Service.
- */
-public abstract class AbstractProcessService extends AbstractService implements IProcessService
-{
- public IHostProcess[] listAllProcesses(String exeNameFilter, String userNameFilter, String stateFilter, IProgressMonitor monitor) throws SystemMessageException
- {
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setName(exeNameFilter);
- rpfs.setUsername(userNameFilter);
- rpfs.setSpecificState(stateFilter);
- return listAllProcesses(rpfs, monitor);
- }
-
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException
- {
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- return listAllProcesses(rpfs, monitor);
- }
-
- /**
- * 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 in case anything goes wrong
- * @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(1, monitor);
- return roots;
- }
-
- public IHostProcess[] listChildProcesses(long parentPID, IProgressMonitor monitor) throws SystemMessageException
- {
- String pPidString = "" + parentPID; //$NON-NLS-1$
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPpid(pPidString);
-
- return listAllProcesses(rpfs, monitor);
- }
-
- public IHostProcess[] listChildProcesses(long parentPID, IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException
- {
- String pPidString = "" + parentPID; //$NON-NLS-1$
- filter.setPpid(pPidString);
-
- return listAllProcesses(filter, monitor);
- }
-
- public IHostProcess getParentProcess(long pid, IProgressMonitor monitor) throws SystemMessageException
- {
- return getProcess(getProcess(pid, monitor).getPPid(), monitor);
- }
-
- public IHostProcess getProcess(long pid, IProgressMonitor monitor) throws SystemMessageException
- {
- String pidString = "" + pid; //$NON-NLS-1$
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid(pidString);
-
- IHostProcess[] results = listAllProcesses(rpfs, monitor);
- if ((results == null) || (results.length == 0)) return null;
- else return results[0];
- }
-
- /**
- * @deprecated This method was removed from IProcessService in RSE 3.0, and
- * implementers are not expected to return anything useful. Use
- * {@link SimpleSystemMessage} to create system messages
- * instead.
- */
- 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 e58ff7fe2..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/processes/IProcessService.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- ********************************************************************************/
-
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Process service implementations must subclass
- * {@link AbstractProcessService} rather than implementing this
- * interface directly.
- */
-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 in case anything goes wrong
- */
- public IHostProcess[] listAllProcesses(IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a filtered list of all processes on the remote system.
- *
- * @param filter An object to filter results by
- * @param monitor A progress monitor to which progress will be reported
- * @return Filtered list of processes
- * @throws SystemMessageException in case anything goes wrong
- */
- public IHostProcess[] listAllProcesses(IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a filtered list of all processes on the remote system.
- *
- * @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
- * @param monitor A progress monitor to which progress will be reported
- * @return Filtered list of processes
- * @throws SystemMessageException in case anything goes wrong
- */
- public IHostProcess[] listAllProcesses(String exeNameFilter, String userNameFilter, String stateFilter, IProgressMonitor monitor) 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 in case anything goes wrong
- */
- 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 parentPID The ID of the parent process whose children are to be
- * listed
- * @param monitor A progress monitor to which progress will be reported
- * @return List of child processes
- * @throws SystemMessageException in case anything goes wrong
- */
- public IHostProcess[] listChildProcesses(long parentPID, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a filtered list of remote child processes of the given parent
- * process on the remote system
- *
- * @param parentPID The ID of the parent process whose children are to be
- * listed
- * @param filter A filter to narrow results by
- * @param monitor A progress monitor to which progress will be reported
- * @return Filtered list of child processes
- * @throws SystemMessageException in case anything goes wrong
- */
- public IHostProcess[] listChildProcesses(long parentPID, IHostProcessFilter filter, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Given a process, return its parent process object.
- *
- * @param pid the ID of the process to return parent of.
- * @param monitor A progress monitor to which progress will be reported
- * @return The parent process
- * @throws SystemMessageException in case anything goes wrong
- */
- public IHostProcess getParentProcess(long pid, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Given a pid, return an IHostProcess object for it.
- *
- * @param pid The process ID of the desired process
- * @param monitor A progress monitor to which progress will be reported
- * @return IHostProcess object for the given pid
- * @throws SystemMessageException in case anything goes wrong
- */
- public IHostProcess getProcess(long pid, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Kills a process.
- *
- * @param pid the ID of the process to be killed.
- * @param signal the signal to send to the process
- * @param monitor A progress monitor to which progress will be reported
- * @return <code>false</code> if the given process doesn't exist, else
- * <code>true</code>. Throws an exception if anything fails.
- * @throws SystemMessageException in case anything goes wrong
- */
- public boolean kill(long pid, String signal, IProgressMonitor monitor) 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 0407bcdf9..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchResultConfiguration.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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 string the search string.
- */
- public AbstractSearchResultConfiguration(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string, ISearchService searchService)
- {
- results = new Vector();
- setParentResultSet(resultSet);
- setSearchTarget(searchObject);
- setSearchString(string);
- setStatus(IHostSearchConstants.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() != IHostSearchConstants.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;
- }
-}
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 509f13d8a..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/AbstractSearchService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- ********************************************************************************/
-
-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.AbstractService;
-import org.eclipse.rse.services.files.IFileService;
-
-/**
- * Abstract base class for RSE Search Service. A useful implementation should
- * ensure that only minimal data transfer is required between the remote system
- * and the local client.
- */
-public abstract class AbstractSearchService extends AbstractService implements ISearchService
-{
- protected Map _searches;
-
- public AbstractSearchService()
- {
- _searches = new HashMap();
- }
-
- public final void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor)
- {
- ISearchHandler handler = internalSearch(searchConfig, fileService, monitor);
- _searches.put(searchConfig, handler);
- }
-
-
- public final void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor)
- {
- ISearchHandler handler = (ISearchHandler)_searches.get(searchConfig);
- handler.cancel(monitor);
- }
-
-
- protected abstract ISearchHandler internalSearch(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor);
-} \ 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 720817526..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/HostSearchResultSet.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [226262] Make IService IAdaptable and add Javadoc
- *******************************************************************************/
-
-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.PlatformObject;
-
-
-/**
- * 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 extends PlatformObject 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;
- }
-
-}
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 d3e1b8a77..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, 2008 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) - [cleanup] Add API "since" tags
- ********************************************************************************/
-
-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 617ba7104..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResult.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.search;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-
-
-public interface IHostSearchResult
-{
- public static final String SEARCH_RESULT_DELIMITER = ":SEARCH"; //$NON-NLS-1$
- public static final String SEARCH_RESULT_OPEN_DELIMITER = "<"; //$NON-NLS-1$
- public static final String SEARCH_RESULT_CLOSE_DELIMITER = ">"; //$NON-NLS-1$
- public static final String SEARCH_RESULT_INDEX_DELIMITER = ":"; //$NON-NLS-1$
-
- 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();
-}
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 ee2cc8582..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/IHostSearchResultConfiguration.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.search;
-
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-
-/**
- * An interface representing a search result configuration.
- */
-public interface IHostSearchResultConfiguration {
-
- /**
- * 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 the results
- */
- 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 status 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);
-}
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 db46e3d4f..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/search/ISearchService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- ********************************************************************************/
-
-package org.eclipse.rse.services.search;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.files.IFileService;
-
-/**
- * RSE Search Service Interface.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Search service implementations must subclass
- * {@link AbstractSearchService} rather than implementing this
- * interface directly.
- */
-public interface ISearchService
-{
- public void search(IHostSearchResultConfiguration searchConfig, IFileService fileService, IProgressMonitor monitor);
- public void cancelSearch(IHostSearchResultConfiguration searchConfig, IProgressMonitor monitor);
-
-} \ 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 8ec051736..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [197848] Fix shell terminated state when remote dies
- * Martin Oberhuber (Wind River) - [217429] Make registering multiple output listeners thread-safe
- * David McKnight (IBM) - [272421] AbstractHostShellOutputReader does not generate notification when error stream is closed
- *******************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import java.util.ArrayList;
-import java.util.Collections;
-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 = Collections.synchronizedList(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();
- _keepRunning = false;
- }
-
- }
-
- 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;
- }
- }
-
- /** @since 3.0 */
- protected final synchronized void startIfNotAlive() {
- if (!isAlive()) {
- start();
- }
- }
-
- public IHostOutput readLine()
- {
- if (!isAlive())
- {
- internalReadLine();
- startIfNotAlive();
- }
- 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);
- startIfNotAlive();
- }
-
- 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;
- //dispose();
- }
- }
-
- public void run()
- {
- while (_keepRunning)
- {
- try
- {
- Thread.sleep(_waitIncrement);
- Thread.yield();
- handle();
- }
- catch (InterruptedException e)
- {
- finish();
- _keepRunning = false;
- }
- }
-
- //Bug 197848: Fire empty event as notification that we are done
- HostShellChangeEvent event = new HostShellChangeEvent(_hostShell, this, 0, 0);
- fireOutputChanged(event);
- }
-
- protected abstract IHostOutput internalReadLine();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractShellService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractShellService.java
deleted file mode 100644
index 8d4f5ef7b..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractShellService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [226301][api] IShellService should throw SystemMessageException on error
- *******************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.AbstractService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Abstract base class for RSE Shell Service implementations.
- *
- * @since org.eclipse.rse.services 3.0
- */
-public abstract class AbstractShellService extends AbstractService implements IShellService {
-
- private static final String[] EMPTY_ARRAY = new String[0];
-
- /**
- * Return an empty host environment. Extenders should override this method
- * if they are able to return environment on the remote side. If they do not
- * implement this feature, they must not override this method.
- *
- * @see IShellService#getHostEnvironment()
- */
- public String[] getHostEnvironment() throws SystemMessageException {
- // not implemented by default
- // TODO SSH https://bugs.eclipse.org/bugs/show_bug.cgi?id=162018
- return EMPTY_ARRAY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.shells.IShellService#launchShell(java.lang.String, java.lang.String[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor) throws SystemMessageException {
- return launchShell(initialWorkingDirectory, null, environment, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.services.shells.IShellService#runCommand(java.lang.String, java.lang.String, java.lang.String[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment, IProgressMonitor monitor) throws SystemMessageException {
- return runCommand(initialWorkingDirectory, command, null, environment, monitor);
- }
-
-}
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 4effbf6ba..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 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
- * Greg Watson (IBM) - patch for bug #252060
- *******************************************************************************/
-
-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();
- if (input.length == 0) {
- try {
- outputStream.close();
- } catch (IOException e) {
- }
- return;
- }
- 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 19b99e926..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/IShellService.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- ********************************************************************************/
-
-package org.eclipse.rse.services.shells;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * IShellService is an abstraction for running shells and shell commands.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Search service implementations must subclass
- * {@link AbstractShellService} rather than implementing this
- * interface directly.
- */
-public interface IShellService extends IService
-{
- /**
- * Launch a new shell in the specified directory with a default encoding.
- *
- * This is a convenience method, passing <code>null</code> as encoding
- * into {@link #launchShell(String, String, String[], IProgressMonitor)}.
- *
- * @throws SystemMessageException in case an error occurred or the user
- * chose to cancel the operation via the progress monitor.
- */
- public IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Launch a new shell in the specified directory.
- *
- * @param initialWorkingDirectory initial working directory or empty String
- * ("") if not relevant. The remote shell will launch in a
- * directory of its own choice in that case (typically a user's
- * home directory).
- * @param encoding Stream encoding to use, or <code>null</code> to fall
- * back to a default encoding. The Shell Service will make
- * efforts to determine a proper default encoding on the remote
- * side but this is not guaranteed to be correct.
- * @param environment Array of environment variable Strings of the form
- * "var=text". Since not all shell implementations support the
- * passing of environment variables, there is no guarantee that
- * the created shell will actually have the specified environment
- * set.
- * @param monitor Progress Monitor for monitoring and cancellation
- * @return the shell object. Note that the shell may not actually be usable
- * in case the remote side allows opening a channel but immediately
- * closes it again. In this case, {@link IHostShell#isActive()}
- * returns <code>false</code> on the created Shell object.
- * @throws SystemMessageException in case an error occurred or the user
- * chose to cancel the operation via the progress monitor.
- */
- public IHostShell launchShell(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- *
- * Run a single command in it's own shell with a default encoding.
- *
- * This is a convenience method, passing <code>null</code> as encoding
- * into
- * {@link #runCommand(String, String, String, String[], IProgressMonitor)}.
- *
- * @throws SystemMessageException in case an error occurred or the user
- * chose to cancel the operation via the progress monitor.
- */
- public IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Run a single command in it's own shell.
- *
- * This method is similar to
- * {@link #launchShell(String, String, String[], IProgressMonitor)} but
- * immediately executes a specified command rather than just opening a
- * shell. There is no guarantee that after the host shell will accept any
- * subsequent commands after the initial command has been executed; there
- * is, however, also no guarantee that the host shell will terminate the
- * connection automatically. Clients need to call {@link IHostShell#exit()}
- * in case the shell remains active after the initial command is completed.
- *
- * @param initialWorkingDirectory initial working directory or empty String
- * ("") if not relevant. The remote command will launch in a
- * directory of its own choice in that case (typically a user's
- * home directory).
- * @param command initial command to send to the remote side.
- * @param encoding Stream encoding to use, or <code>null</code> to fall
- * back to a default encoding. The Shell Service will make
- * efforts to determine a proper default encoding on the remote
- * side but this is not guaranteed to be correct.
- * @param environment Array of environment variable Strings of the form
- * "var=text". Since not all shell implementations support the
- * passing of environment variables, there is no guarantee that
- * the created shell will actually have the specified environment
- * set.
- * @param monitor Progress Monitor for monitoring and cancellation
- * @return the shell object for getting output and error streams. Note that
- * the shell may not actually be usable in case an error occurred on
- * the remote side, such as the command not being executable. In
- * this case, {@link IHostShell#isActive()} returns
- * <code>false</code> on the created Shell object.
- * @throws SystemMessageException in case an error occurred or the user
- * chose to cancel the operation via the progress monitor.
- */
- public IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return an array of environment variables that describe the environment on
- * the remote system. 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" if
- * supported by a shell service implementation. Should return an
- * empty array in case environment variable retrieval is not
- * supported on a particular shell service implementation.
- * @throws SystemMessageException in case an error occurred or the user
- * chose to cancel the operation via the progress monitor.
- */
- public String[] getHostEnvironment() throws SystemMessageException;
-} \ 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 aa0c58ba7..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/Patterns.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.internal.services.Activator;
-import org.eclipse.rse.internal.services.shells.CommandPattern;
-import org.eclipse.rse.internal.services.shells.OutputPattern;
-
-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;
- }
-}
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.services/src/org/eclipse/rse/services/terminals/AbstractDelegatingTerminalService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractDelegatingTerminalService.java
deleted file mode 100644
index d79952c0f..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractDelegatingTerminalService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 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.
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - extracted from DelegatingTerminalService
- * Anna Dushistova (MontaVista) - fixed getName() and getDescription() methods
- ********************************************************************************/
-package org.eclipse.rse.services.terminals;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.internal.services.RSEServicesMessages;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Base class that can be used for decorating an existing terminal service with
- * additional functionality. By default, all method calls are passed through to
- * the original service.
- *
- * @since 3.1
- */
-public abstract class AbstractDelegatingTerminalService extends AbstractTerminalService {
-
- public abstract ITerminalService getRealTerminalService();
-
- public ITerminalShell launchTerminal(String ptyType, String encoding,
- String[] environment, String initialWorkingDirectory,
- String commandToRun, IProgressMonitor monitor)
- throws SystemMessageException {
- return getRealTerminalService().launchTerminal(ptyType, encoding, environment,
- initialWorkingDirectory, commandToRun, monitor);
- }
-
- public String getDescription() {
- if(getRealTerminalService() != null){
- return getRealTerminalService().getDescription();
- }
- return RSEServicesMessages.AbstractDelegatingTerminalService_description;
- }
-
- public String getName() {
- if(getRealTerminalService() != null){
- return getRealTerminalService().getName();
- }
- return RSEServicesMessages.AbstractDelegatingTerminalService_name;
- }
-
- public void initService(IProgressMonitor monitor) throws SystemMessageException {
- getRealTerminalService().initService(monitor);
- }
-
- public void uninitService(IProgressMonitor monitor) {
- getRealTerminalService().uninitService(monitor);
- }
-
- public Object getAdapter(Class adapter) {
- return getRealTerminalService().getAdapter(adapter);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalService.java
deleted file mode 100644
index 81a577164..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalService.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-import org.eclipse.rse.services.AbstractService;
-
-/**
- * Abstract base class for clients to create an ITerminalService.
- *
- * Currently the main value of this class is to protect extenders from API
- * breakage as the ITerminalService is evolved in the future. We might, for
- * instance, be adding state of the terminal service or capabilities for getting
- * environment variables.
- *
- * @see ITerminalService
- * @since org.eclipse.rse.services 3.1
- */
-public abstract class AbstractTerminalService extends AbstractService implements ITerminalService {
-
- // empty for now, extenders need to implement the launchTerminal() method
- // themselves
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalShell.java
deleted file mode 100644
index 8f5b0def5..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/AbstractTerminalShell.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.PlatformObject;
-
-
-/**
- * Abstract base class for clients to create an ITerminalShell instance.
- *
- * This abstract base class provides valid default implementations for all
- * {@link ITerminalShell} methods where possible. Clients should extend this
- * base class rather than implementing ITerminalShell directly, in order to
- * remain compatible when the ITerminalShell interface is evolved in the future.
- *
- * @since org.eclipse.rse.services 3.1
- */
-public abstract class AbstractTerminalShell extends PlatformObject implements ITerminalShell {
-
- public String getDefaultEncoding() {
- return null;
- }
-
- public String getPtyType() {
- return null;
- }
-
- public boolean isLocalEcho() {
- return false;
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- // do nothing
- }
-
- public InputStream getErrorStream() {
- return null;
- }
-
- public int exitValue() {
- // exit values are not supported by default, but we need to observe the
- // API by throwing IllegalThreadStateException
- if (isActive()) {
- throw new IllegalThreadStateException();
- }
- return 0;
- }
-
- /**
- * Return the interval (in milliseconds) for polling the {@ink #isActive()}
- * method during the {@link #waitFor(long)} method. Subclasses may override
- * to return different poll intervals.
- *
- * The interval may be changed dynamically as appropriate for the current
- * state of this shell. That way, wait polling mechanisms such as
- * exponential backoff can be implemented.
- *
- * Or, a concrete implementation that supports a notification mechanism for
- * knowing when the shell terminates, can use this to tweak the waitFor()
- * method by returning Long.MAX_VALUE here (wait forever), but calling
- * {@link #notifyAll()} when the shell is dead.
- *
- * @return interval (in milliseconds) for polling active state
- */
- protected long getWaitForPollInterval() {
- return 500L;
- }
-
- /**
- * Wait for the shell to terminate. This uses a polling mechanism by
- * default, which can be tweaked by overriding
- * {@link #getWaitForPollInterval()}.
- *
- * @see IBaseShell#waitFor(long)
- */
- public boolean waitFor(long timeout) throws InterruptedException {
- boolean active = isActive();
- if (active) {
- long endTime = (timeout <= 0) ? Long.MAX_VALUE : System.currentTimeMillis() + timeout - getWaitForPollInterval();
- do {
- synchronized (this) {
- wait(getWaitForPollInterval());
- }
- active = isActive();
- } while (active && (timeout <= 0 || System.currentTimeMillis() < endTime));
- }
- return active;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/BaseShellDecorator.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/BaseShellDecorator.java
deleted file mode 100644
index 20b76f019..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/BaseShellDecorator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.PlatformObject;
-
-
-/**
- * Abstract base class for clients to decorate an IBaseShell instance they have
- * with additional functionality.
- *
- * Typically, such additional functionality can be provided either by additional
- * knowledge about the underlying system or process, or by analyzing the input
- * and output streams for some well-known data that gives such additional
- * knowledge.
- *
- * @since org.eclipse.rse.services 3.1
- */
-public abstract class BaseShellDecorator extends PlatformObject implements IBaseShell {
-
- protected final IBaseShell fDelegate;
-
- public BaseShellDecorator(IBaseShell delegate) {
- fDelegate = delegate;
- }
-
- public void exit() {
- fDelegate.exit();
- }
-
- public int exitValue() {
- return fDelegate.exitValue();
- }
-
- public InputStream getErrorStream() {
- return fDelegate.getErrorStream();
- }
-
- public InputStream getInputStream() {
- return fDelegate.getInputStream();
- }
-
- public OutputStream getOutputStream() {
- return fDelegate.getOutputStream();
- }
-
- public boolean isActive() {
- return fDelegate.isActive();
- }
-
- public boolean waitFor(long timeout) throws InterruptedException {
- return fDelegate.waitFor(timeout);
- }
-
- public Object getAdapter(Class adapterType) {
- // TODO do we want to delegate here or have our own adapter???
- // I think we're most flexible first letting adapt to ourselves,
- // and only if not successful then ask the delegate to adapt.
- Object adapter = super.getAdapter(adapterType);
- if (adapter == null) {
- adapter = fDelegate.getAdapter(adapterType);
- }
- return adapter;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/IBaseShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/IBaseShell.java
deleted file mode 100644
index 542c83ecc..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/IBaseShell.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.PlatformObject;
-
-/**
- * A basic shell, representing the connection to some process that may be
- * running local or remote. Clients may implement this interface.
- *
- * Clients implementing this interface are encouraged to extend
- * {@link PlatformObject} for providing the {@link #getAdapter(Class)}
- * functionality.
- *
- * The resulting IBaseShell can be decorated by clients with additional
- * functionality easily by instantiating their subclassed variant of
- * {@link BaseShellDecorator}.
- *
- * @see java.lang.Process
- * @see BaseShellDecorator
- * @since org.eclipse.rse.services 3.1
- */
-public interface IBaseShell extends IAdaptable {
-
- /**
- * Get a local-to-remote OutputStream connected to the standard input of the
- * underlying Process.
- *
- * Clients must not close the obtained OutputStream themselves, since the
- * behavior that this may have on the underlying shell or process is
- * undefined. Use {#exit()} instead to terminate the shell if that is
- * desired, it will close all relevant Streams.
- *
- * @return an OutputStream for talking to the underlying process.
- */
- public OutputStream getOutputStream();
-
- /**
- * Get a remote-to-local InputStream connected to the standard output of the
- * underlying Process.
- *
- * Clients must not close the obtained InputStream themselves, since the
- * behavior that this may have on the underlying shell or process is
- * undefined. Use {#exit()} instead to terminate the shell if that is
- * desired, it will close all relevant Streams.
- *
- * @return an InputStream for reading from the underlying process.
- */
- public InputStream getInputStream();
-
- /**
- * Get a remote-to-local InputStream connected to the standard error output
- * of the underlying Process.
- *
- * Implementations may return <code>null</code> if they do not support
- * separate Streams for output and error.
- *
- * Clients must not close the obtained InputStream themselves, since the
- * behavior that this may have on the underlying shell or process is
- * undefined. Use {#exit()} instead to terminate the shell if that is
- * desired, it will close all relevant Streams.
- *
- * @return an InputStream for reading error output from the underlying
- * process, or <code>null</code> if separate output and error
- * streams are not supported. Error output will be merged with the
- * Stream obtained from {@link #getInputStream()} in that case.
- */
- public InputStream getErrorStream();
-
- /**
- * Test whether this connection is active.
- *
- * @return <code>true</code> if the connection is active, i.e. the Process
- * underlying this connection is running, and the Streams connected
- * to it are not closed.
- * @see #exitValue()
- */
- public boolean isActive();
-
- /**
- * Exit this shell.
- *
- * Implementations are encouraged to try terminating the underlying process
- * in a clean way, if they can. Depending on the implementation, this may be
- * possible or not. What's guaranteed to happen is that the Streams
- * connected with the process are closed so the shell will not be active any
- * more.
- *
- * Execution of this method may run asynchronously in the sense that the
- * method performs everything to initiate terminating the shell but then
- * returns immediately. Clients may use {@link #waitFor(long)} after calling
- * this method to know when the shell is really terminated. At any rate, the
- * exit() method returns quickly and guarantees that the shell will be
- * terminated as soon as possible, after any required (and possible) cleanup
- * is finished.
- *
- * @see java.lang.Process#destroy()
- */
- public void exit();
-
- /**
- * Return the exit value of the Process connected by this shell.
- *
- * Depending on the underlying implementation, this call may not be
- * supported. Implementations which do not support this must throw an
- * IllegalThreadStateException when the shell is still active, or return 0
- * the shell has terminated.
- *
- * @return the exit value of the Process connected by this shell, provided
- * that it has already terminated. By convention, the exit value 0
- * indicates successful completion or the fact that transmission of
- * exit values is not supported by an implementation.
- * @exception IllegalThreadStateException when the shell is still active.
- * @see java.lang.Process#exitValue()
- */
- public int exitValue();
-
- /**
- * Block the calling Thread until this shell is no longer active, or the
- * specified timeout has elapsed. If the underlying shell has already
- * terminated, this method returns immediately.
- *
- * When this method returns <code>false</code>, the shell is no longer
- * active, so an {@link #exitValue()} may be obtained.
- *
- * @param timeout the maximum time (in milliseconds) to wait.
- * Implementations may return sooner even if the underlying
- * Process has not yet terminated, so clients always need to keep
- * track of time themselves and need to check the return value. A
- * timeout value of zero causes this method to not limit the wait
- * time. Negative wait time has undefined behavior.
- * @return <code>true</code> if the Shell is still active after waiting
- * (e.g. because the timeout has elapsed); <code>false</code> if
- * the shell is no longer active.
- * @throws InterruptedException if the waiting Thread has been interrupted,
- * e.g. because the main application is shutting down.
- * @see #isActive()
- */
- public boolean waitFor(long timeout) throws InterruptedException;
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalService.java
deleted file mode 100644
index 49280b705..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalService.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-
-/**
- * Interface for getting Terminal Connections from a remote side, also known as
- * terminal session with Streams.
- *
- * One ITerminalService instance is typically associated with one particular
- * connection to a (potentially remote) system, such that the ITerminalService
- * instance can also hold state data about that session, such as connected
- * state, login and authentication information, configuration data or
- * environment variables.
- *
- * Each
- * {@link #launchTerminal(String, String, String[], String, String, IProgressMonitor)}
- * invocation, however, acts as a factory method such that it creates a new
- * (remote) process and associated {@link ITerminalShell} connection.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Clients must subclass the {@link AbstractTerminalService} class
- * rather than implementing this interface directly.
- *
- * @since org.eclipse.rse.services 3.1
- *
- */
-public interface ITerminalService extends IService {
-
- /**
- * Launch a new terminal connection, also known as shell session with
- * Streams.
- *
- * @param ptyType requested terminal type for the new Terminal. Since not
- * all Terminal implementations support specifying the Terminal
- * Type, there is no guarantee that a particular setting has any
- * effect. Use <code>null</code> to fall back to a default
- * terminal type.
- * @param encoding Stream encoding to use for sending initial working
- * directory and initial commandToRun, and to return on
- * {@link ITerminalShell#getDefaultEncoding()} request. Use
- * <code>null</code> to fall back to a default encoding. The
- * Terminal Service will make efforts to determine a proper
- * default encoding on the remote side but this is not guaranteed
- * to be correct.
- * @param environment Array of environment variable Strings of the form
- * "var=text". Since not all terminal implementations support the
- * passing of environment variables, there is no guarantee that
- * the created shell will actually have the specified environment
- * set. Passing <code>null</code> is allowed in order to
- * specify that no specific environment needs to be passed.
- * @param initialWorkingDirectory initial working directory or empty String
- * ("") if not relevant. The remote shell will launch in a
- * directory of its own choice in that case (typically a user's
- * home directory).
- * @param commandToRun initial command to send to the remote side.
- * @param monitor Progress Monitor for monitoring and cancellation during
- * connection creation.
- * @return the terminal connection object. Note that the connection may not
- * actually be usable in case the remote side allows opening a
- * channel but immediately closes it again. In this case,
- * {@link ITerminalShell#getInputStream()} will throw an
- * exception or be closed from the very beginning.
- * @throws SystemMessageException in case an error occurred or the user
- * chose to cancel the operation via the progress monitor.
- */
- public ITerminalShell launchTerminal(String ptyType, String encoding, String[] environment, String initialWorkingDirectory, String commandToRun,
- IProgressMonitor monitor) throws SystemMessageException;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalShell.java
deleted file mode 100644
index feebe7c96..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/ITerminalShell.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-import org.eclipse.rse.services.shells.IHostShell;
-
-/**
- * Interface representing a terminal connection through Streams.
- *
- * Rather than the underlying {@link IBaseShell}, an ITerminalShell connection
- * adds methods that describe the presentation of the data transmitted over its
- * Streams, as well as methods like {@link #setTerminalSize(int, int)} to change
- * the behavior of the presentation of this data. An instance of ITerminalShell
- * is typically obtained from an {@link ITerminalService}.
- *
- * In RSE, a single remote shell instance can only either support the streamed
- * ITerminalShell interface or the listener-based {@link IHostShell} interface,
- * but not both. Note, though, that with the capabilities that an ITerminalShell
- * has, it is always possible to adapt it to an IHostShell; this is typically
- * not possible the other way round. We therefore recommend extenders of RSE
- * that used to subclass IHostShell to move to the new IBaseShell /
- * ITerminalShell APIs eventually, if they can.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * Clients must subclass the provided {@link AbstractTerminalShell}
- * or {@link TerminalShellDecorator} classes rather than
- * implementing this interface directly.
- *
- * @see IBaseShell
- * @see ITerminalService
- * @see AbstractTerminalShell
- * @see TerminalShellDecorator
- * @since org.eclipse.rse.services 3.1
- */
-public interface ITerminalShell extends IBaseShell {
-
- /**
- * Get the Terminal Type that's expected on this connection.
- *
- * The terminal type may be specified by the client when constructing a
- * concrete instance of an ITerminalShell, or a remote side may actually
- * expect a particular terminal type to be present.
- *
- * @return the terminal type expected by the remote side to properly render
- * the Streams associated with this Terminal, or <code>null</code>
- * if the ITerminalShell does not know what kind of Terminal Type is
- * expected.
- */
- public String getPtyType();
-
- /**
- * Return the default encoding that the terminal service had specified when
- * creating this terminal connection, or that's known from the remote side
- * to be expected. This is not necessarily known or accurate, and may be
- * <code>null</code>.
- *
- * TODO I'm not actually sure if this method is a good idea. Perhaps we
- * should use the IAdaptable mechanism for dealing with encodings, since our
- * shells basically deal with binary data only.
- *
- * @return the specified default encoding, or <code>null</code> if
- * unknown.
- */
- public String getDefaultEncoding();
-
- /**
- * Notify the remote site that the size of the terminal has changed. There
- * is no guarantee that the remote side is actually capable of changing the
- * Terminal size.
- *
- * @param newWidth
- * @param newHeight
- */
- void setTerminalSize(int newWidth, int newHeight);
-
- /**
- * Test if local echo is needed on this terminal connection. Clients are
- * expected to return <code>false</code> if in doubt.
- *
- * @return <code>true</code> if a local echo is needed.
- */
- boolean isLocalEcho();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/TerminalShellDecorator.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/TerminalShellDecorator.java
deleted file mode 100644
index b58e06911..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/TerminalShellDecorator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Anna Dushistova (MontaVista) - [258631][api] ITerminalService should be public API
- *******************************************************************************/
-
-package org.eclipse.rse.services.terminals;
-
-
-/**
- * Abstract base class for clients to decorate an ITerminalShell instance they
- * have with additional functionality.
- *
- * Typically, such additional functionality can be provided either by additional
- * knowledge about the underlying system or process, or by analyzing the input
- * and output streams for some well-known data that gives such additional
- * knowledge.
- *
- * @since org.eclipse.rse.services 3.1
- */
-public abstract class TerminalShellDecorator extends BaseShellDecorator implements ITerminalShell {
-
- public TerminalShellDecorator(ITerminalShell delegate) {
- super(delegate);
- }
-
- protected ITerminalShell getDelegate() {
- return (ITerminalShell) fDelegate;
- }
-
- public String getPtyType() {
- return getDelegate().getPtyType();
- }
-
- public String getDefaultEncoding() {
- return getDelegate().getDefaultEncoding();
- }
-
- public boolean isLocalEcho() {
- return getDelegate().isLocalEcho();
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- getDelegate().setTerminalSize(newWidth, newHeight);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/package.html b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/package.html
deleted file mode 100644
index 864cf3ca2..000000000
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/terminals/package.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <meta name="Copyright" content="Copyright (c) 2008 Wind River Systems, Inc. and others.">
- <meta name="License" content="Made available under the terms of the Eclipse Public License v1.0.">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for the RSE Base Shell and Terminal Services.
-<h2>
-Package Specification</h2>
-<p>
-The RSE Terminal Services packages provides interfaces and basic utility classes
-for shell or terminal connections. The classes in this package are especially designed
-to be extendable by means of the <b>Decorator</b> pattern as well as the <b>Adapter</b>
-pattern:
-<ul>
-<li><code><a href="IBaseShell.html">IBaseShell</a></code>
- is the basic interface for communicating with a (potentially remote) process
- through a channel supporting Streams. The Interface is modeled after the
- <code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html">java.lang.Process</a></code>
- class, but provides some nice enhancements such as a timeout for the
- <code>waitFor()</code> method, as well as an <code>isActive()</code>
- method.</li>
-<li><code><a href="ITerminalShell.html">ITerminalShell</a></code>
- extends IBaseShell, adding methods specific to the presentation of the data
- transferred from the (remote) process: it provides for getDefaultEncoding(),
- getPtyType(), isLocalEcho() as well as setTerminalSize() methods.</li>
-<li><code><a href="AbstractTerminalShell.html">AbstractTerminalShell</a></code>
- is an abstract base class that implementers of ITerminalShell must extend.
- It provides default implementations of all methods where possible, and
- ensures that future evolving of the ITerminalShell interface
- can be done without breaking binary compatibility with extenders implementing it.</li>
-<li><code><a href="BaseShellDecorator.html">BaseShellDecorator</a></code> and
- <code><a href="">TerminalShellDecorator</a></code> abstract base
- classes should be used when clients want to add functionality by decorating
- an existing IBaseShell or ITerminalShell object they have. Again, extending
- these not only saves the extender typing default delegation methods, but also
- ensures that they remain binary compatible in case the interfaces evolve.</li>
-<li><code><a href="ITerminalService.html">ITerminalService</a></code>
- is the RSE Service Interface, and currently only
- provides one factory method <code>launchTerminal()</code> for creating
- a new Terminal Connection.
- <code><a href="">AbstractTerminalService</a></code> must be used as base
- class by extenders who wish to implement the ITerminalService, in order to ensure
- binary compatibility in case the interface evolves - even though
- the AbstractTerminalService is currently empty.</li>
-</ul>
-The classes and interfaces in this package are designed to have only minimal
-dependency into Eclipse core APIs, such that Services can eventually be re-used in
-environments outside Eclipse. Especially
-<code><a href="IBaseShell.html">IBaseShell</a></code>, along with
-<code><a href="ProcessBaseShell.html">ProcessBaseShell</a></code> and
-<code><a href="BaseShellDecorator.html">BaseShellDecorator</a></code> are usable in
-any environment, provided that mock objects are provided for Eclipse
-IAdaptable and PlatformObject.
-</p>
-</body>
-</html>
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 e831f3aba..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/rse/**"/>
- <accessrule kind="discouraged" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <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.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 b795a7b85..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/.settings/.api_filters b/rse/plugins/org.eclipse.rse.shells.ui/.settings/.api_filters
deleted file mode 100644
index f056442a6..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.settings/.api_filters
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.shells.ui" version="2">
- <resource path="src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java" type="org.eclipse.rse.shells.ui.view.SystemViewRemoteOutputAdapter">
- <filter id="642777099">
- <message_arguments>
- <message_argument value="AbstractSystemViewAdapter"/>
- <message_argument value="SystemViewRemoteOutputAdapter"/>
- <message_argument value="getUniquePropertyDescriptors()"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 055475aa3..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.shells.ui;singleton:=true
-Bundle-Version: 3.0.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.shells.ui.ShellsUIPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- 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;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.core.expressions
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.shells.ui;x-internal:=true,
- org.eclipse.rse.internal.shells.ui.actions;x-internal:=true,
- org.eclipse.rse.internal.shells.ui.propertypages;x-internal:=true,
- org.eclipse.rse.internal.shells.ui.view;x-internal:=true,
- org.eclipse.rse.shells.ui,
- 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 d4cc693f9..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 5, 2007</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 d57294b41..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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/elcl16/exportshellhistory.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshellhistory.gif
deleted file mode 100644
index d3255916c..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshellhistory.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshelloutput.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshelloutput.gif
deleted file mode 100644
index dae1880fc..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/exportshelloutput.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/removeshell.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/removeshell.gif
deleted file mode 100644
index 6f6296256..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/elcl16/removeshell.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/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/systemenvvar.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvar.gif
deleted file mode 100644
index bf043f959..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvar.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarlibpath.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarlibpath.gif
deleted file mode 100644
index 51e703b1b..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarlibpath.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarpath.gif b/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarpath.gif
deleted file mode 100644
index 51e703b1b..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/icons/full/obj16/systemenvvarpath.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/plugin.properties b/rse/plugins/org.eclipse.rse.shells.ui/plugin.properties
deleted file mode 100644
index 7fd1e128e..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/plugin.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Shells UI
-providerName = Eclipse.org - DSDP
-
-View.RemoteCommands = Remote Shell
-
-PropertyPage.ServerLauncherSettings = Server Launcher Settings
-PropertyPage.Service = Service
-PropertyPage.EnvVariables = Environment Variables
-
-Launch_Shell=Launch Shell
-Launch_Shell_Tooltip=Launch a command shell from the selected directory
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 797eb822d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/plugin.xml
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2008 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) - [180519] declaratively register adapter factories
-Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
-Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
-Anna Dushistova (MontaVista) - [226550] [api] Launch Shell and Launch Terminal actions should be contributed declaratively
-Anna Dushistova (MontaVista) - [234274][api] Launch Shell / Terminal commands menu placement and category
-Anna Dushistova (MontaVista) - [235934] Launch Shell/Terminal commands enabled when selection is empty
-Anna Dushistova (MontaVista) - [252058] Actions for shells subsystem should be contributed declaratively
-Anna Dushistova (MontaVista) - [251492] Launch Shell Action is enabled in Offline mode
-Kevin Doyle (IBM) - [249320] Launch Shell action not available in Remote System Details/Monitor views
--->
-<?eclipse version="3.0"?>
-<plugin>
-
-<!-- ============================================ -->
-<!-- Register Adapter Factories -->
-<!-- ============================================ -->
-
- <extension point="org.eclipse.core.runtime.adapters">
- <!-- Remote Error -->
- <factory
- class="org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- -->
- </factory>
- <!-- Remote Output -->
- <factory
- class="org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- -->
- </factory>
- <!-- Remote Command Shell -->
- <factory
- class="org.eclipse.rse.internal.shells.ui.view.SystemViewOutputAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- <!-- TODO Check: These are not in the adapter factories
- getAdapterList() Although the adapter implements them
- <adapter type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier"/>
- -->
- </factory>
- <!-- IShellServiceSubSystemConfiguration -->
- <factory
- class="org.eclipse.rse.internal.shells.ui.view.ShellServiceSubSystemConfigurationAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystemConfiguration">
- <adapter type="org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter"/>
- </factory>
- </extension>
-
-
-<!-- ============================================ -->
-<!-- Register Views -->
-<!-- ============================================ -->
- <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.internal.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
- name="%PropertyPage.EnvVariables"
- class="org.eclipse.rse.internal.shells.ui.propertypages.EnvironmentVariablesPropertyPage"
- id="org.eclipse.rse.shells.ui.propertypages.EnvironmentVariablesPropertyPage">
- <!--
- <filter name="envVarPP" value="true"/>
- -->
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem"/>
- </enabledWhen>
- </page>
-
- <page
- name="%PropertyPage.ServerLauncherSettings"
- class="org.eclipse.rse.internal.ui.propertypages.ServerLauncherPropertyPage"
- id="org.eclipse.rse.ui.propertypages.serverLauncherPropertyPage">
- <filter name="serverLaunchPP" value="true"/>
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.Service"
- class="org.eclipse.rse.internal.shells.ui.propertypages.ShellServicesPropertyPage"
- id="org.eclipse.rse.shells.ui.propertypages.ShellServicesPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem"/>
- </enabledWhen>
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.rse.views.common?after=additions">
- <command
- commandId="org.eclipse.rse.shells.ui.actions.LaunchShellCommand"
- icon="icons/full/obj16/systemshell.gif"
- label="%Launch_Shell"
- tooltip="%Launch_Shell_Tooltip">
- <visibleWhen>
- <with variable="selection">
- <count value="1" />
- <iterate>
- <and>
- <test
- property="org.eclipse.rse.core.isOffline"
- value="false">
- </test>
- <or>
- <and>
- <test
- args="shells"
- property="org.eclipse.rse.core.hasSubSystemCategory"
- value="true">
- </test>
- <instanceof
- value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- </instanceof>
- <test
- property="org.eclipse.rse.subsystems.files.isdirectory"
- value="true">
- </test>
- </and>
- <instanceof
- value="org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem">
- </instanceof>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.rse.ui.commands.category"
- id="org.eclipse.rse.shells.ui.actions.LaunchShellCommand"
- name="%Launch_Shell">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.rse.internal.shells.ui.handlers.LaunchShellCommandHandler"
- commandId="org.eclipse.rse.shells.ui.actions.LaunchShellCommand">
- </handler>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.java
deleted file mode 100644
index f494ac3c1..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ShellResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.shells.ui.ShellResources"; //$NON-NLS-1$
-
- 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;
-
- // 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_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_WITH_LABEL;
-
- // 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;
-
- // 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;
-
- // universal commands
- public static String MSG_UCMD_INVOCATION_EMPTY;
-
-
- public static String ACTION_CONTENT_ASSIST;
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ShellResources.class);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.properties b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.properties
deleted file mode 100644
index 21918efe7..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellResources.properties
+++ /dev/null
@@ -1,95 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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:
-# David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
-# Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-###################################################################################
-############################ Universal Commands ############################
-###################################################################################
-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
-
-#=============================================================
-# 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_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_WITH_LABEL = Open Wit&h
-
-#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
-
-#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
-
-# universal commands
-MSG_UCMD_INVOCATION_EMPTY = The invocation may not be blank
-
-
-ACTION_CONTENT_ASSIST=Content Assist
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellsUIPlugin.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellsUIPlugin.java
deleted file mode 100644
index 8fb9517a0..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/ShellsUIPlugin.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519] declaratively register rse.shells.ui. adapter factories
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui;
-
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ShellsUIPlugin extends SystemBasePlugin {
-
- public static final String PLUGIN_ID ="org.eclipse.rse.shells.ui"; //$NON-NLS-1$
- public static final String HELPPREFIX = "org.eclipse.rse.shells.ui."; //$NON-NLS-1$
-
- // Icons
- public static final String PREFIX = PLUGIN_ID + "."; //$NON-NLS-1$
- public static final String ICON_SUFFIX = "Icon"; //$NON-NLS-1$
- public static final String ICON_EXT = ".gif"; //$NON-NLS-1$
-
- // Special Model Object Icons
- public static final String ICON_OBJS_DIR = "full/obj16/"; //$NON-NLS-1$
-
- 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;
-
- // THING ICONS...
- public static final String ICON_MODEL_DIR = "full/obj16/"; //$NON-NLS-1$
-
- 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;
-
-
- // Action Icons
- public static final String ICON_ACTIONS_DIR = "full/elcl16/"; //$NON-NLS-1$
-
- 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_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;
-
- //The shared instance.
- private static ShellsUIPlugin plugin;
-
- /**
- * The constructor.
- */
- public ShellsUIPlugin() {
- 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 ShellsUIPlugin getDefault() {
- return plugin;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.SystemBasePlugin#initializeImageRegistry()
- */
- protected void initializeImageRegistry()
- {
- //SystemElapsedTimer timer = new SystemElapsedTimer();
- //timer.setStartTime();
-
- String path = getIconPath();
-
- // Model Objects and Things
- putImageInRegistry(ICON_SYSTEM_SHELL_ID,
- path+ICON_SYSTEM_SHELL);
- putImageInRegistry(ICON_SYSTEM_SHELLLIVE_ID,
- path+ICON_SYSTEM_SHELLLIVE);
- putImageInRegistry(ICON_SYSTEM_ENVVAR_ID,
- path+ICON_SYSTEM_ENVVAR);
- putImageInRegistry(ICON_SYSTEM_ENVVAR_LIBPATH_ID,
- path+ICON_SYSTEM_ENVVAR_LIBPATH);
- putImageInRegistry(ICON_SYSTEM_ENVVAR_PATH_ID,
- path+ICON_SYSTEM_ENVVAR_PATH);
-
- // Actions...
- putImageInRegistry(ICON_SYSTEM_EXPORT_SHELL_OUTPUT_ID,
- path+ICON_SYSTEM_EXPORT_SHELL_OUTPUT);
- putImageInRegistry(ICON_SYSTEM_EXPORT_SHELL_HISTORY_ID,
- path+ICON_SYSTEM_EXPORT_SHELL_HISTORY);
- putImageInRegistry(ICON_SYSTEM_REMOVE_SHELL_ID,
- path+ICON_SYSTEM_REMOVE_SHELL);
-
- //timer.setEndTime();
- //System.out.println("Time to load images: "+timer);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java
deleted file mode 100644
index 2556d13f6..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/SystemRemoteCommandEntryForm.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISubSystemConfigurationCategories;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.subsystems.files.core.model.ISystemRemoteCommand;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-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 ISystemResourceChangeListener, ISystemShellProvider
-{
- 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
- // ----------------------------------------
- RSECorePlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- }
-
- private void runCommand()
- {
- String cmd = cmdCombo.getText();
- if ( cmd.length() > 0 )
- {
- IHost sysConn = sysConnCombo.getHost();
- if ( sysConn != null )
- {
- //SubSystem[] cmdSubSystems = RSECorePlugin.getTheSystemRegistry().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, new NullProgressMonitor());
- }
- 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 = RSECorePlugin.getTheSystemRegistry().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/internal/shells/ui/actions/SystemBaseShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemBaseShellAction.java
deleted file mode 100644
index d961d8e7a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemBaseShellAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java
deleted file mode 100644
index a843c8d2c..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java
+++ /dev/null
@@ -1,746 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * Kevin Doyle (IBM) - [187083] Launch Shell action available on folders inside virtual files
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Anna Dushistova (MontaVista) - [149285] [ssh] multiple prompts and errors in case of incorrect username
- * Anna Dushistova (MontaVista) - [252058] Actions for shells subsystem should be contributed declaratively
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.actions;
-
-import java.util.Iterator;
-
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.RSECorePlugin;
-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.core.subsystems.SubSystem;
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-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.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.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-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.Display;
-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 class UpdateOutputRunnable implements Runnable
- {
- private SystemCommandsViewPart _cmdsPart;
- private IRemoteCommandShell _cmd;
- public UpdateOutputRunnable(SystemCommandsViewPart cmdsPart, IRemoteCommandShell cmd)
- {
- _cmdsPart = cmdsPart;
- _cmd = cmd;
- }
-
- public void run()
- {
- _cmdsPart.updateOutput(_cmd);
- }
-
- }
-
- private class RunShellJob extends Job
- {
- private IRemoteCmdSubSystem _ss;
- private SystemCommandsViewPart _cmdsPart;
- public RunShellJob(IRemoteCmdSubSystem ss, SystemCommandsViewPart cmdsPart)
- {
- super(ShellResources.ACTION_RUN_SHELL_LABEL);
- _ss = ss;
- _cmdsPart = cmdsPart;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try
- {
- if (!_ss.isConnected())
- {
- connect((SubSystem)_ss, monitor);
- }
- IRemoteCommandShell cmd = _ss.runShell(_selected, monitor);
- Display.getDefault().asyncExec(new UpdateOutputRunnable(_cmdsPart, cmd));
- }
- catch (SystemMessageException e) {
- SystemMessageDialog.displayMessage(e);
- }
- catch (OperationCanceledException e) {
- //do nothing--it's user's action
- }
- catch (Exception e) {
- SystemBasePlugin.logError(
- e.getLocalizedMessage()!=null ? e.getLocalizedMessage() : e.getClass().getName(),
- e);
- }
- return Status.OK_STATUS;
- }
- }
-
- public class PromptForPassword implements Runnable
- {
- public SubSystem _ss;
- private boolean connectionCancelled=false;
- public PromptForPassword(SubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- try
- {
- _ss.promptForPassword();
- }
- catch (OperationCanceledException canceledEx) {
- setConnectionCancelled(true);
- }
- catch (Exception e)
- {
- /* ignore */
- }
- }
-
- public void setConnectionCancelled(boolean connectionCancelled) {
- this.connectionCancelled = connectionCancelled;
- }
-
- public boolean isConnectionCancelled() {
- return connectionCancelled;
- }
- }
-
- public class UpdateRegistry implements Runnable
- {
- private SubSystem _ss;
- public UpdateRegistry(SubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.connectedStatusChange(_ss, true, false);
- }
- }
-
- 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)
- {
- String msgTxt = ShellResources.MSG_UCMD_INVOCATION_EMPTY;
- _errorMessage = new SimpleSystemMessage(ShellsUIPlugin.PLUGIN_ID,
- "RSEG1260", //$NON-NLS-1$
- IStatus.ERROR, msgTxt);
- }
-
- if (_errorMessage != null)
- {
- setErrorMessage(_errorMessage);
- enableOkButton(false);
- }
- else
- {
- clearErrorMessage();
- enableOkButton(true);
- }
-
- return _errorMessage;
- }
- }
-
- /**
- * Constructor for SystemCommandAction
- *
- * @param parent Shell of parent window. Can be null if you don't know it,
- * but call setShell when you do.
- */
- public SystemCommandAction(Shell parent)
- {
- this(parent, false);
- }
-
- /**
- * Constructor for SystemCommandAction
- *
- * @param parent Shell of parent window. Can be null if you don't know it,
- * but call setShell when you do.
- * @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 Shell of parent window. Can be null if you don't know it,
- * but call setShell when you do.
- * @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 Shell of parent window. Can be null if you don't know it,
- * but call setShell when you do.
- * @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 Shell of parent window. Can be null if you don't know it,
- * but call setShell when you do.
- * @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 ? ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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 Shell of parent window. Can be null if you don't know it,
- * but call setShell when you do.
- * @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.getHost();
- 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;
- }
- }
- }
- }
-
- IProgressMonitor monitor = new NullProgressMonitor();
- if (_selected != null)
- {
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- String path = _selected.getAbsolutePath();
-
- if (launchNewShell)
- {
- Object[] results = cmdSubSystem.runCommand(cmd, _selected, monitor);
- 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().isWindows())
- {
- cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
- }
- cmdSubSystem.sendCommandToShell(cdCmd, defaultShell, monitor);
- cmdSubSystem.sendCommandToShell(cmd, defaultShell, monitor);
- }
- }
- else
- {
- IRemoteCmdSubSystem cmdSubSystem = getCommandSubSystem();
- if (cmdSubSystem != null)
- {
- Object[] results = cmdSubSystem.runCommand(cmd, _selected, monitor);
- 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)
- {
- SystemCommandsUI commandsUI = SystemCommandsUI.getInstance();
- SystemCommandsViewPart cmdsPart = commandsUI.activateCommandsView();
-
- RunShellJob job = new RunShellJob(cmdSubSystem, cmdsPart);
- job.schedule();
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- // RSEUIPlugin.getDefault().logInfo("Exception invoking command " + cmd + " on " + sysConn.getAliasName());
- }
-
- }
-
- private boolean connect(SubSystem ss, IProgressMonitor monitor) throws Exception
- {
- if (!ss.isConnected())
- {
-
- Display dis = Display.getDefault();
- PromptForPassword passPrompt = new PromptForPassword(ss);
- dis.syncExec(passPrompt);
- if(!passPrompt.isConnectionCancelled()){
- ss.getConnectorService().connect(monitor);
- dis.asyncExec(new UpdateRegistry(ss));
- }else
- throw new OperationCanceledException();
- }
- return true;
- }
-
- /**
- * 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 the selected object is a virtual folder then we need to select the parent
- // of the archive
- if (ArchiveHandlerManager.isVirtual(_selected.getAbsolutePath())) {
- IRemoteFileSubSystem rfss = _selected.getParentRemoteFileSubSystem();
- String file = _selected.getAbsolutePath();
- // Get the archive's path
- file = file.substring(0, file.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR));
- // Get the parent of the archive's path
- file = file.substring(0, file.lastIndexOf(_selected.getSeparator()));
- try {
- _selected = rfss.getRemoteFileObject(file, null);
- } catch (SystemMessageException exc) {
- }
- }
- if (!_selected.isFile())
- {
- enable = checkObjectType(_selected);
- }
- } else if (selected instanceof IRemoteCmdSubSystem){
- _cmdSubSystem = (IRemoteCmdSubSystem)selected;
- _selected = null;
- enable = true;
- } else if (selected instanceof IRemoteFileSubSystem){
- _cmdSubSystem = RemoteCommandHelpers.getCmdSubSystem(((IRemoteFileSubSystem)selected).getHost());
- _selected = null;
- enable = true;
- }
- }
-
- 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/internal/shells/ui/actions/SystemExportShellHistoryAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellHistoryAction.java
deleted file mode 100644
index e261f1bc4..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellHistoryAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2007 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) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.actions;
-
-import java.io.FileWriter;
-
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-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,
- ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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/internal/shells/ui/actions/SystemExportShellOutputAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellOutputAction.java
deleted file mode 100644
index b5d223229..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemExportShellOutputAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2007 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) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.actions;
-
-import java.io.FileWriter;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-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,
- ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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/internal/shells/ui/actions/SystemShowInShellViewAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemShowInShellViewAction.java
deleted file mode 100644
index d6c64845a..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemShowInShellViewAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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:
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- *******************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.actions;
-
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.internal.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);
- viewPart.showPageFor(cmdShell); // for defect 165680
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateRemoveShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateRemoveShellAction.java
deleted file mode 100644
index 8b3176a3d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateRemoveShellAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.actions;
-
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-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,
- ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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/internal/shells/ui/actions/SystemTerminateShellAction.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java
deleted file mode 100644
index d45bdbfd6..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/actions/SystemTerminateShellAction.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2007 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.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
- //ISystemRegistry registry = RSECorePlugin.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, new NullProgressMonitor());
- }
- }
- 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/internal/shells/ui/handlers/LaunchShellCommandHandler.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/handlers/LaunchShellCommandHandler.java
deleted file mode 100644
index 6edf6391b..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/handlers/LaunchShellCommandHandler.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Anna Dushistova (MontaVista) - Adopted from LaunchShellActionDelegate
- ********************************************************************************/
-package org.eclipse.rse.internal.shells.ui.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.shells.ui.actions.SystemCommandAction;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class LaunchShellCommandHandler extends AbstractHandler {
- private SystemCommandAction _launchAction;
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- if (_launchAction == null) {
- _launchAction = new SystemCommandAction(SystemBasePlugin
- .getActiveWorkbenchShell(), true);
- }
- _launchAction.updateSelection((IStructuredSelection) HandlerUtil
- .getCurrentSelection(event));
- _launchAction.run();
- return null;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java
deleted file mode 100644
index 4da966936..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/EnvironmentVariablesPropertyPage.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.propertypages;
-
-
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Vector;
-
-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.SystemBasePlugin;
-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/internal/shells/ui/propertypages/ShellServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java
deleted file mode 100644
index 332575c0b..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.DummyHost;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-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.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 = getShellServiceSubSystemConfigurations(getSystemType());
- host = new DummyHost(getHostname(), getSystemType());
- }
- else
- {
- host = subSystem.getHost();
- _currentFactory = (IShellServiceSubSystemConfiguration)subSystem.getParentRemoteCmdSubSystemConfiguration();
- factories = getShellServiceSubSystemConfigurations(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[] getShellServiceSubSystemConfigurations(IRSESystemType systemType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, false);
-
- 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 ISubSystemConfiguration getCurrentSubSystemConfiguration()
- {
- 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/internal/shells/ui/view/CommandsViewPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java
deleted file mode 100644
index 10c21ecdb..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java
+++ /dev/null
@@ -1,692 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [180562] dont implement ISystemThemeConstants
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [212940] Duplicate Help Context Identifiers
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.osgi.util.NLS;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.shells.ui.view.CommandEntryViewerConfiguration;
-import org.eclipse.rse.shells.ui.view.SystemCommandEditor;
-import org.eclipse.rse.shells.ui.view.SystemCommandsView;
-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.model.RemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.ui.ISystemThemeConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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, 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);
-
- // global actions
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().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.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
-
- 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, "", ShellResources.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(ISystemThemeConstants.REMOTE_COMMANDS_VIEW_BG_COLOR);
- Color fg = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.REMOTE_COMMANDS_VIEW_FG_COLOR);
- Font fFont =mgr.getCurrentTheme().getFontRegistry().get(ISystemThemeConstants.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((IAdaptable)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().isWindows())
- {
- 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().isWindows())
- {
- 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, new NullProgressMonitor());
- }
- 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, new NullProgressMonitor()); //$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();
-
- String msgTxt = null;
- if (!command.isActive())
- {
- msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FINISHED, title);
- }
- else
- {
- msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_RUNNING, title);
- }
-
- _title = msgTxt;
-
- }
- }
-
- 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;
- }
-
- SystemCommandEditor getEditor() {
- return _inputEntry;
- }
-
- 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/internal/shells/ui/view/CommandsViewWorkbook.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewWorkbook.java
deleted file mode 100644
index 646683f5c..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewWorkbook.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- *******************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.shells.ui.view.SystemCommandsView;
-import org.eclipse.rse.shells.ui.view.TabFolderLayout;
-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();
- }
-
- /**
- * For defect 165680, needed to change the active tab
- * @param root the shell to show
- */
- public void showPageFor(IRemoteCommandShell root)
- {
- for (int i = 0; i < _folder.getItemCount(); i++)
- {
- CTabItem item = _folder.getItem(i);
- CommandsViewPage page = (CommandsViewPage) item.getData();
- if (page != null && root == page.getInput())
- {
- _folder.setSelection(item);
- }
-
- }
- }
-
- 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();
- }
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java
deleted file mode 100644
index 6e6449ae6..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [174945] Remove obsolete icons from rse.shells.ui
- * Anna Dushistova (MontaVista) - [252058] Actions for shells subsystem should be contributed declaratively
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.internal.shells.ui.actions.SystemExportShellHistoryAction;
-import org.eclipse.rse.internal.shells.ui.actions.SystemExportShellOutputAction;
-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 ImageDescriptor _activeShellImageDescriptor;
- protected ImageDescriptor _inactiveShellImageDescriptor;
-
- /**
- * 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 = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.ICON_SYSTEM_SHELLLIVE_ID);
- }
- return _activeShellImageDescriptor;
- }
-
- /**
- * Return the inactive command shell icon for this subsystem
- */
- public ImageDescriptor getInactiveCommandShellImageDescriptor()
- {
- if (_inactiveShellImageDescriptor == null)
- {
- _inactiveShellImageDescriptor = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 17012ecc6..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/ShellServiceSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-
-public class ShellServiceSubSystemConfigurationAdapterFactory implements IAdapterFactory
-{
-
- private ISubSystemConfigurationAdapter ssFactoryAdapter = new ShellServiceSubSystemConfigurationAdapter();
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {ISubSystemConfigurationAdapter.class};
- }
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer to rather do it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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/internal/shells/ui/view/SystemCommandsUI.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsUI.java
deleted file mode 100644
index 0e292bffb..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsUI.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import org.eclipse.rse.ui.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;
-
- public static final String COMMANDS_VIEW_ID = SystemCommandsViewPart.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 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 SystemCommandsViewPart getCommandsView()
- {
- return _viewPart;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java
deleted file mode 100644
index fee33f427..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java
+++ /dev/null
@@ -1,978 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- * Kevin Doyle (IBM) - [198534] Shell Menu Enablement Issue's
- * Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
- * David McKnight (IBM) - [294398] [shells] SystemCommandsViewPart always assumes systemResourceChanged() called on Display thread
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.commands.ActionHandler;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.source.ISourceViewer;
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-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.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.actions.SystemBaseShellAction;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.shells.ui.view.SystemCommandEditor;
-import org.eclipse.rse.shells.ui.view.SystemViewRemoteOutputAdapter;
-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.SystemBasePlugin;
-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.model.ISystemShellProvider;
-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.handlers.IHandlerService;
-import org.eclipse.ui.part.CellEditorActionHandler;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
-/**
- * This is the desktop view wrapper of the System View viewer.
- */
-public class SystemCommandsViewPart
- extends ViewPart
- implements
- ISelectionListener,
- SelectionListener,
- ISelectionChangedListener,
- ISystemResourceChangeListener,
- ISystemShellProvider,
- 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()
- {
- }
- }
-
- /**
- * Content assist action for all remote shells. It is activated with
- * the default key binding for content assistance used in the workbench.
- */
- class ContentAssistAction extends Action {
-
- public void run() {
- if (_folder != null) {
- CommandsViewPage currentTabItem = _folder.getCurrentTabItem();
- if (currentTabItem != null) {
- SystemCommandEditor editor = currentTabItem.getEditor();
- editor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- }
- }
- }
- }
-
- 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, new NullProgressMonitor());
- 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);
-
- IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
- ContentAssistAction caAction = new ContentAssistAction();
- caAction.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
- // the handler is automatically deactivated in the dispose() method of this view
- handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new ActionHandler(caAction));
-
- SystemWidgetHelpers.setHelp(_folder, RSEUIPlugin.HELPPREFIX + "ucmd0000"); //$NON-NLS-1$
-
- ISystemRegistry registry = RSECorePlugin.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();
-
- ISystemRegistry registry = RSECorePlugin.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();
- }
- } else if (_folder != null && _folder.getInput() == null) {
- // The shell contains no input, update all action states
- _folder.updateActionStates();
- _printTableAction.setTableView("", null); //$NON-NLS-1$
- _printTableAction.checkEnabledState();
- _clearAction.checkEnabledState();
-
- // Since no shell is open go through all the shell actions and disable them
- for (int i =0; i < _shellActions.size(); i++) {
- Object action = _shellActions.get(i);
- if (action instanceof SystemBaseShellAction) {
- SystemBaseShellAction shellAction = (SystemBaseShellAction)action;
- shellAction.setEnabled(false);
- }
- }
- }
-
-
-
- }
-
- 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()
- {
- if (_folder != null )
- {
- IActionBars actionBars = getViewSite().getActionBars();
-
- if (_shellActions == null || _shellActions.size() == 0)
- {
- updateShellActions();
- _clearAction = new ClearAction();
- _printTableAction = new SystemTablePrintAction(getTitle(), null);
- IMenuManager menuManager = actionBars.getMenuManager();
- addMenuItems(menuManager);
- _statusLine = actionBars.getStatusLineManager();
- }
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- addToolBarItems(toolBarManager);
-
- updateActionStates();
- }
- }
-
- 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 = RSECorePlugin.getTheSystemRegistry();
- IHost[] connections = registry.getHosts();
-
- for (int i = 0; i < connections.length; i++)
- {
- IHost connection = connections[i];
- if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().isLocal())
- {
- 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();
- }
- }
-
- /**
- * For defect 165680, needed to change the active tab
- * @param root the shell to show
- */
- public void showPageFor(IRemoteCommandShell root)
- {
- if (root != null && _folder != null)
- {
- _folder.showPageFor(root);
- }
- }
-
- public void setInput(IAdaptable object)
- {
- setInput(object, true);
- }
-
- public void setInput(IAdaptable object, boolean updateHistory)
- {
- _folder.setInput(object);
- }
-
-
- protected void initDefaultCommandShells()
- {
- ISystemRegistry registry = RSECorePlugin.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().isLocal())
- {
- 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 = SystemBasePlugin.getActiveWorkbenchShell();
- shell.getDisplay().asyncExec(new CommandSubSystemDisconnectedRunnable((IRemoteCmdSubSystem) source));
- }
- else if (source instanceof IRemoteCommandShell)
- {
- // find out if we're listening to this
- if (Display.getCurrent() != null){
- updateOutput((IRemoteCommandShell) source, false);
- updateActionStates();
- }
- else {
- final IRemoteCommandShell fsource = (IRemoteCommandShell)source;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- updateOutput(fsource, false);
- updateActionStates();
- }
- });
- }
-
-
- }
- }
-
- if (event.getType() == ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED)
- {
- Object source = event.getSource();
- if (source instanceof IRemoteCommandShell)
- {
- if (Display.getCurrent() != null){
- updateOutput((IRemoteCommandShell) source, false);
- _folder.remove(source);
- updateActionStates();
- }
- else {
- final IRemoteCommandShell fsource = (IRemoteCommandShell)source;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- updateOutput(fsource, false);
- _folder.remove(fsource);
- updateActionStates();
- }
- });
- }
- }
- }
- else if (event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH)
- {
- Object parent = event.getParent();
- if (parent instanceof IRemoteCommandShell)
- {
- if (Display.getCurrent() != null){
- updateOutput((IRemoteCommandShell) parent, false);
- }
- else {
- final IRemoteCommandShell fsource = (IRemoteCommandShell)parent;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- updateOutput(fsource, 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 = RSECorePlugin.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 = SystemBasePlugin.getActiveWorkbenchShell();
- 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/internal/shells/ui/view/SystemCommandsViewProvider.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewProvider.java
deleted file mode 100644
index 3c27c8386..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewProvider.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewOutputAdapterFactory.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewOutputAdapterFactory.java
deleted file mode 100644
index 81034d74d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewOutputAdapterFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.shells.ui.view.SystemViewRemoteOutputAdapter;
-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.SystemBasePlugin;
-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};
- }
-
-// /**
-// * Register this factory with the Platform's Adapter Manager.
-// * Can be used for explicit registration, but we prefer doing it
-// * declaratively in plugin.xml so this is currently not used.
-// */
-// 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/internal/shells/ui/view/SystemViewRemoteErrorAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewRemoteErrorAdapter.java
deleted file mode 100644
index cdc320f11..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemViewRemoteErrorAdapter.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Radoslav Gerganov (ProSyst) - [229725] Right click popup menu inside Local Shell view has two copy entries
- *******************************************************************************/
-
-package org.eclipse.rse.internal.shells.ui.view;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.shells.ui.view.SystemViewRemoteOutputAdapter;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteError;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-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)
- {
- Iterator iter = selection.iterator();
- // check if the selection contains only IRemoteError objects
- while (iter.hasNext()) {
- Object current = iter.next();
- if (!(current instanceof IRemoteError)) {
- return;
- }
- }
- // add the same context menu actions as for IRemoteOutput
- 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(ISystemPropertyConstants.P_ERROR_FILENAME, ShellResources.RESID_PROPERTY_ERROR_FILENAME_LABEL, ShellResources.RESID_PROPERTY_ERROR_FILENAME_TOOLTIP);
-
- // line
- _uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_ERROR_LINENO, ShellResources.RESID_PROPERTY_ERROR_LINENO_LABEL, ShellResources.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(ISystemPropertyConstants.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(ISystemPropertyConstants.P_FILE_PATH))
- {
- return output.getAbsolutePath();
- }
- else if (name.equals(ISystemPropertyConstants.P_ERROR_FILENAME))
- {
- return output.getAbsolutePath();
- }
- else if (name.equals(ISystemPropertyConstants.P_ERROR_LINENO))
- {
- return new Integer(output.getLine());
- }
- }
- return null;
- }
-
-}
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 10e6ef7ec..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- ********************************************************************************/
-
-package org.eclipse.rse.shells.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-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.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart;
-import org.eclipse.rse.services.clientserver.PathUtility;
-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.model.RemoteCommandShell;
-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.RemoteCmdSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 = RSECorePlugin.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 = RSECorePlugin.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;
- IProgressMonitor monitor = new NullProgressMonitor();
- 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, monitor);
- }
- cmdSubSystem.sendCommandToShell(cmdString, defaultShell, monitor);
-
-
- }
- 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/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 eaee4c2e1..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Radoslav Gerganov (ProSyst) - [229956][regression][shells][local] Content assist is broken in CVS HEAD
- *******************************************************************************/
-
-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.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-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.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-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.subsystems.shells.core.subsystems.RemoteCmdSubSystem;
-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().getName();
- 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)
- {
- // load org.eclipse.rse.files.ui for adapters in order to be able to perform "content assist" in a local shell, see bug#229956
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) object).getAdapter(ISystemViewElementAdapter.class);
- if (adapter == null) {
- adapter = (ISystemViewElementAdapter) Platform.getAdapterManager().loadAdapter(object,
- ISystemViewElementAdapter.class.getName());
- }
- 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 = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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, new NullProgressMonitor());
- _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
- {
- IProgressMonitor monitor = new NullProgressMonitor();
- IRemoteFile parent = fs.getRemoteFileObject(parentPath, monitor);
-
- Object[] fileList = null;
-
- if (parent.hasContents(RemoteChildrenContentsType.getInstance()))
- {
- fileList = parent.getContents(RemoteChildrenContentsType.getInstance());
- }
- else
- {
- fileList = parent.getParentRemoteFileSubSystem().list(parent, currentText + "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, monitor); //$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().list(workingDirectory, filterString, IFileService.FILE_TYPE_FILES_AND_FOLDERS, new NullProgressMonitor());
- }
- 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/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/SystemCommandEditor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
deleted file mode 100644
index a93a8698d..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
+++ /dev/null
@@ -1,445 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * Radoslav Gerganov (ProSyst) - [221392] [shells] Undo command doesn't work with Eclipse 3.4M5
- * Radoslav Gerganov (ProSyst) - [231835] TVT34:TCT189: "work with compile commands" does not display
- ********************************************************************************/
-
-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.IUndoManager;
-import org.eclipse.jface.text.IUndoManagerExtension;
-import org.eclipse.jface.text.IWidgetTokenKeeper;
-import org.eclipse.jface.text.TextEvent;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.custom.StyledText;
-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.operations.UndoActionHandler;
-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 Action _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)
- {
- // TODO (dwd) will need to have an editor callback on instantiation to add validators instead of assuming one
-// 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)
- {
- 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);
- }
- });
- 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)
- {
- if (fGlobalActions.containsKey(ITextEditorActionConstants.UNDO)) {
- 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(ITextEditorActionConstants.GROUP_GENERATE));
- menu.appendToGroup(ITextEditorActionConstants.GROUP_GENERATE, (IAction) fGlobalActions.get("ContentAssistProposal")); //$NON-NLS-1$
- }
- private IActionBars getActionBars()
- {
- if (_site != null)
- {
- IActionBars actionBars = _site.getActionBars();
- return actionBars;
- }
- return null;
- }
- public void setViewSite(IViewSite site)
- {
- _site = site;
- }
- private void initializeActions()
- {
- IUndoManager undoManager = getUndoManager();
- if (undoManager instanceof IUndoManagerExtension && _site != null) {
- IUndoManagerExtension undoManagerExt = (IUndoManagerExtension) undoManager;
- _undoAction = new UndoActionHandler(_site, undoManagerExt.getUndoContext());
- fGlobalActions.put(ITextEditorActionConstants.UNDO, _undoAction);
- }
-
- _cutAction = new TextViewerAction(this, CUT);
- _cutAction.setText(SystemResources.ACTION_CUT_LABEL);
- _cutAction.setToolTipText(SystemResources.ACTION_CUT_TOOLTIP);
- fGlobalActions.put(ITextEditorActionConstants.CUT, _cutAction);
- _cutAction.setEnabled(false); // defect 46369
-
- _copyAction = new TextViewerAction(this, COPY);
- _copyAction.setText(SystemResources.ACTION_COPY_LABEL);
- _copyAction.setToolTipText(SystemResources.ACTION_COPY_TOOLTIP);
- fGlobalActions.put(ITextEditorActionConstants.COPY, _copyAction);
- _copyAction.setEnabled(false); // defect 46369
-
- _pasteAction = new TextViewerAction(this, PASTE);
- _pasteAction.setText(SystemResources.ACTION_PASTE_LABEL);
- _pasteAction.setToolTipText(SystemResources.ACTION_PASTE_TOOLTIP);
- 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);
- _selectAllAction.setToolTipText(SystemResources.ACTION_SELECT_ALL_TOOLTIP);
- 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)
- {
- if (_undoAction != 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 updateAction(String actionId)
- {
- Object obj = fGlobalActions.get(actionId);
- if (obj instanceof IAction)
- {
- IAction action = (IAction) obj;
- if (action instanceof IUpdate)
- ((IUpdate) action).update();
- }
- }
-
- 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/SystemCommandsView.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java
deleted file mode 100644
index 6d6e366e4..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562] dont implement ISystemThemeConstants
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-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.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewProvider;
-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 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(ISystemThemeConstants.REMOTE_COMMANDS_VIEW_BG_COLOR);
- Color fg = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.REMOTE_COMMANDS_VIEW_FG_COLOR);
- Font fFont = mgr.getCurrentTheme().getFontRegistry().get(ISystemThemeConstants.REMOTE_COMMANDS_VIEW_FONT);
- table.setBackground(bg);
- table.setForeground(fg);
- table.setFont(fFont);
- if (_errColor == null)
- {
- mgr.addPropertyChangeListener(this);
- }
- _errColor = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.MESSAGE_ERROR_COLOR);
- _outColor = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.REMOTE_COMMANDS_VIEW_FG_COLOR);
- _infColor = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.MESSAGE_INFORMATION_COLOR);
- _warColor = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.MESSAGE_WARNING_COLOR);
- _prmColor = mgr.getCurrentTheme().getColorRegistry().get(ISystemThemeConstants.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 getViewAdapter(element).getParent(element);
- }
-}
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 da11d03f9..000000000
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java
+++ /dev/null
@@ -1,1195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [180562] dont implement ISystemOutputRemoteTypes
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [196842] Don't have open menu for folders
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [189873] Improve remote shell editor open action with background jobs
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * David McKnight (IBM) - [228933] file icons shown in shell view should check editor registry for proper icon
- * David McKnight (IBM) - [233349] Could not drag and drop file from Shell view to local folder.
- * David McKnight (IBM) - [233475] Cannot drag and drop file/folder within the shell output
- * Kevin Doyle (IBM) - [247297] Double Clicking on a Shell doesn't open that Shell
- * Martin Oberhuber (Wind River) - [227135] Cryptic exception when sftp-server is missing
- *******************************************************************************/
-
-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.core.runtime.NullProgressMonitor;
-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.ISystemDragDropAdapter;
-import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
-import org.eclipse.rse.internal.files.ui.actions.SystemRemoteFileLineOpenWithMenu;
-import org.eclipse.rse.internal.files.ui.view.DownloadAndOpenJob;
-import org.eclipse.rse.internal.shells.ui.ShellResources;
-import org.eclipse.rse.internal.shells.ui.ShellsUIPlugin;
-import org.eclipse.rse.internal.shells.ui.actions.SystemShowInShellViewAction;
-import org.eclipse.rse.internal.shells.ui.actions.SystemTerminateRemoveShellAction;
-import org.eclipse.rse.internal.shells.ui.actions.SystemTerminateShellAction;
-import org.eclipse.rse.internal.shells.ui.view.ShellServiceSubSystemConfigurationAdapter;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsUI;
-import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.subsystems.files.core.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.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.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.ISharedImages;
-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 ISystemRemoteElementAdapter
-{
-
-
- 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.getTheSystemRegistryUI().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.getTheSystemRegistryUI().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)
- {
- IRemoteFile rfile = SystemRemoteFileLineOpenWithMenu.outputToFile(output);
- if (rfile != null && rfile.isFile()) // for 196842
- {
- //SystemCreateEditLineActions createActions = new SystemCreateEditLineActions();
- //createActions.create(menu, selection, shell, menuGroup);
- // open with ->
- MenuManager submenu =
- new MenuManager(ShellResources.ACTION_OPEN_WITH_LABEL,
- 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(IAdaptable element, IProgressMonitor monitor)
- {
-
- 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(IAdaptable 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, or <code>null</code> if an error
- * occurred
- */
- 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, new NullProgressMonitor());
- }
- 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$
- }
-
- /**
- * 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())
- {
- doOpen(file, output);
- 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);
- viewPart.showPageFor(cmdshell); //196584
- result = true;
- }
- }
- return result;
- }
-
-
- private void doOpen(IRemoteFile remoteFile, IRemoteOutput output)
- {
- if (!remoteFile.isArchive() || !remoteFile.getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().supportsArchiveManagement())
- {
- // only handle double click if object is a file
- ISystemEditableRemoteObject editable = getEditableRemoteObject(remoteFile);
- if (editable != null)
- {
- int line = output.getLine();
- int charStart = output.getCharStart();
- int charEnd = output.getCharEnd();
-
- try
- {
- boolean isOpen = editable.checkOpenInEditor() != ISystemEditableRemoteObject.NOT_OPEN;
- boolean isFileCached = isFileCached(editable, remoteFile);
- if (isFileCached)
- {
- if (!isOpen) {
- editable.setLocalResourceProperties();
- editable.addAsListener();
- }
- editable.openEditor();
- SystemRemoteFileLineOpenWithMenu.handleGotoLine(remoteFile, line, charStart, charEnd);
- }
- else
- {
- DownloadAndOpenJob oJob = new DownloadAndOpenJob(editable, false, line, charStart, charEnd);
- oJob.schedule();
- }
- }
- catch (Exception e)
- {
- }
- }
- }
- }
-
- 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(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
-
- }
-
- // get the remote modified stamp
- long remoteModifiedStamp = remoteFile.getLastModified();
-
- // get dirty flag
- boolean dirty = properties.getDirty();
-
- boolean remoteNewer = (storedModifiedStamp != remoteModifiedStamp);
-
- String remoteEncoding = remoteFile.getEncoding();
- String storedEncoding = properties.getEncoding();
-
- boolean encodingChanged = storedEncoding == null || !(remoteEncoding.equals(storedEncoding));
-
- boolean usedBinary = properties.getUsedBinaryTransfer();
- boolean isBinary = remoteFile.isBinary();
-
- return (!dirty &&
- !remoteNewer &&
- usedBinary == isBinary &&
- !encodingChanged);
- }
- 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;
- String type = output.getType();
-
-
- if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE) ||
- type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)){
- // bug 233475, fall back to the file subsystem
- IRemoteFile file = outputToFile(output);
- if (file != null){
- return file.getParentRemoteFileSubSystem();
- }
- }
-
- Object parent = output.getParent();
- if (parent instanceof IRemoteCommandShell)
- {
- return getSubSystem(parent);
- }
- }
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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 type = out.getType();
- if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE) ||
- type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)){
- return out.getAbsolutePath();
- }
-
- String str = getAbsoluteParentName(element);
- return str + ":" + out.getIndex(); //$NON-NLS-1$
- }
- //FIXME this should never happen
- 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) 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(ISystemOutputRemoteTypes.TYPE_ERROR))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_ERROR_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_WARNING))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WARNING_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_INFORMATIONAL))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_INFO_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY))
- {
- imageDescriptor = //PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE))
- {
- String name = output.getAbsolutePath();
- imageDescriptor = getEditorRegistry().getImageDescriptor(name);
- if (imageDescriptor == null){
- imageDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
- }
- //RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_FILE_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_GREP))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_COMMAND))
- {
- imageDescriptor = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.ICON_SYSTEM_SHELL_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT))
- {
- imageDescriptor = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.ICON_SYSTEM_SHELL_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_PROCESS))
- {
- imageDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROCESS_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_ENVVAR))
- {
- imageDescriptor = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.ICON_SYSTEM_ENVVAR_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_ENVVAR_LIBPATH))
- {
- imageDescriptor = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.ICON_SYSTEM_ENVVAR_LIBPATH_ID);
- }
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_ENVVAR_PATH))
- {
- imageDescriptor = ShellsUIPlugin.getDefault().getImageDescriptor(ShellsUIPlugin.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, IProgressMonitor monitor) 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;
- }
- }
- */
-
- if (element instanceof IRemoteOutput){
- IRemoteOutput output = (IRemoteOutput) element;
-
- if (output.getType().equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)){
- IRemoteFile file = outputToFile(output);
- ISystemDragDropAdapter fadapter = (ISystemDragDropAdapter)((IAdaptable)file).getAdapter(ISystemDragDropAdapter.class);
- return fadapter.canDrop(file);
- }
- }
-
- 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
- {
- // for defect 233349
- // treat file output objects as IRemoteFiles
- if (element instanceof IRemoteOutput){
- IRemoteOutput output = (IRemoteOutput)element;
- String type = output.getType();
- if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE) ||
- type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)){
- IRemoteFile file = outputToFile(output);
- if (file != null){
- ISystemDragDropAdapter fadapter = (ISystemDragDropAdapter)((IAdaptable)file).getAdapter(ISystemDragDropAdapter.class);
- return fadapter.doDrag(file, sameSystemType, monitor);
- }
- }
- }
-
- 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;
- String type = targetOutput.getType();
- if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT) || type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY))
- {
- 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);
- }
- }
- else if (element instanceof IRemoteFile)
- {
- IRemoteFile file = (IRemoteFile)element;
- 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(ISystemPropertyConstants.P_SHELL_STATUS, ShellResources.RESID_PROPERTY_SHELL_STATUS_LABEL, ShellResources.RESID_PROPERTY_SHELL_STATUS_TOOLTIP);
- _shellPropertyDescriptors[1] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_SHELL_CONTEXT, ShellResources.RESID_PROPERTY_SHELL_CONTEXT_LABEL, ShellResources.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 ShellResources.RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE;
- }
- else
- {
- return ShellResources.RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE;
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_SHELL_CONTEXT))
- {
- return cmdShell.getContextString();
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-
- /**
- * Don't show properties for remote output
- */
- public boolean showProperties(Object element){
- return false;
- }
-
-}
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 e831f3aba..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.classpath
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/rse/**"/>
- <accessrule kind="discouraged" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <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.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 f3d3bfe1d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 138063a1c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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.4
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 56f2512c0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.core;singleton:=true
-Bundle-Version: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.files.core.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.expressions,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.1.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.files.core;x-friends:="org.eclipse.rse.subsystems.files.dstore,org.eclipse.rse.subsystems.files.local",
- org.eclipse.rse.internal.subsystems.files.core.model;x-internal:=true,
- 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 d4cc693f9..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 5, 2007</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 d1b9081f4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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) - [240704] Protect against illegal API use of getRemoteFileObject() with relative path as name
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
-
-javacSource=1.4
-javacTarget=1.4
-src.includes = about.html,\
- schema/,\
- .settings/,\
- build.properties
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 c0938dc7a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Files Core
-providerName = Eclipse.org - DSDP
-
-extPoint.remoteFileTypes = Remote File Types
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.xml
deleted file mode 100644
index dcd355630..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/plugin.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?> <!--
- Copyright (c) 2002, 2009 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:
- Anna Dushistova (MontaVista) - [227535] Avoid dependency on files.core
- -->
-
-<plugin>
-<!-- ================================================================= -->
-<!-- Define Remote File Types extension point -->
-<!-- ================================================================= -->
- <extension-point id="remoteFileTypes" name="%extPoint.remoteFileTypes" schema="schema/remoteFileTypes.exsd"/>
-
-
-
-<!-- ================================================================= -->
-<!-- Define Default File Types -->
-<!-- ================================================================= -->
-<extension point="org.eclipse.rse.subsystems.files.core.remoteFileTypes">
-
- <remoteFileTypes extension="a" type="binary"/>
- <remoteFileTypes extension="bmp" type="binary"/>
- <remoteFileTypes extension="c" type="text"/>
- <remoteFileTypes extension="cc" type="text"/>
- <remoteFileTypes extension="class" type="binary"/>
- <remoteFileTypes extension="com" type="binary"/>
- <remoteFileTypes extension="cpp" type="text"/>
- <remoteFileTypes extension="cvv" type="text"/>
- <remoteFileTypes extension="dll" type="binary"/>
- <remoteFileTypes extension="doc" type="binary"/>
- <remoteFileTypes extension="exe" type="binary"/>
- <remoteFileTypes extension="gif" type="binary"/>
- <remoteFileTypes extension="h" type="text"/>
- <remoteFileTypes extension="hh" type="text"/>
- <remoteFileTypes extension="hpp" type="text"/>
- <remoteFileTypes extension="ico" type="binary"/>
- <remoteFileTypes extension="ini" type="text"/>
- <remoteFileTypes extension="jar" type="binary"/>
- <remoteFileTypes extension="java" type="text"/>
- <remoteFileTypes extension="jpeg" type="binary"/>
- <remoteFileTypes extension="jpg" type="binary"/>
- <remoteFileTypes extension="pdf" type="binary"/>
- <remoteFileTypes extension="ppt" type="binary"/>
- <remoteFileTypes extension="so" type="binary"/>
- <remoteFileTypes extension="tif" type="binary"/>
- <remoteFileTypes extension="txt" type="text"/>
- <remoteFileTypes extension="xls" type="binary"/>
- <remoteFileTypes extension="xmi" type="binary"/>
- <remoteFileTypes extension="xml" type="binary"/>
- <remoteFileTypes extension="zip" type="binary"/>
-
-</extension>
-
-<!-- ================================================================= -->
-<!-- Adapter factory for permissions services -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.core.runtime.adapters">
- <!-- Remote Files -->
- <factory
- class="org.eclipse.rse.internal.subsystems.files.core.RemoteFilePermissionsAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
-
- <adapter type="org.eclipse.rse.services.files.IFilePermissionsService"/>
- </factory>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Property Testers -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.rse.internal.subsystems.files.core.RemoteFilePropertyTester"
- id="org.eclipse.rse.subsystems.files.core.RemoteFilePropertyTester"
- namespace="org.eclipse.rse.subsystems.files"
- properties="isdirectory,isvirtual,isroot,isarchive"
- type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- </propertyTester>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/schema/remoteFileTypes.exsd b/rse/plugins/org.eclipse.rse.subsystems.files.core/schema/remoteFileTypes.exsd
deleted file mode 100644
index 3b15f6172..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/schema/remoteFileTypes.exsd
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.subsystems.files.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.rse.subsystems.files.core" id="remoteFileTypes" name="Remote File Types"/>
- </appInfo>
- <documentation>
- This extension point is used to register information about whether particular file types should be considered to contain text or binary data.
-This information is important as it will determine how files will be transferred. The exact meaning of how the transfer of text files differs from binary
-files depends on the actual file service implementation. In general, though, services will strive to change the encoding of remote text files during transfer
-such that it matches the local platform default encoding.
-&lt;p&gt;
-Specific encoding conversions also depend on provided extensions to the
-&lt;a href="org_eclipse_rse_services_codePageConverters.html"&gt;org.eclipse.rse.services.codePageConverters&lt;/a&gt;
-extension point.
-For example, transferring files from a remote dstore Linux host to a local Windows client, the file service may convert text files from
-UTF-8 encoding to Windows cp1252 encoding, and convert remote LF only line endings to local CRLF line endings.
-The benefit of this conversion is that local (external) tools may operate on transferred files in the RSE
-files cache without having to worry about encodings.
-&lt;/p&gt;
-&lt;p&gt;
-Providers may provide an extension for this extension point. No code beyond the XML extension declaration is required.
-See also the &lt;tt&gt;org.eclipse.team.core.fileTypes&lt;/tt&gt; extension point which provides similar information for Repository providers.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="remoteFileTypes" 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>
- </complexType>
- </element>
-
- <element name="remoteFileTypes">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="extension"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="extension" type="string" use="required">
- <annotation>
- <documentation>
- the file extension being identified by this contribution.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- one of either &quot;text&quot; or &quot;binary&quot;, identifying the contents of files matching the value of extension.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="text">
- </enumeration>
- <enumeration value="binary">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="priority" type="string">
- <annotation>
- <documentation>
- Priority used if there are more than one match of a file type. Integer values are allowed.
-In case of more than one matching file type, the with lower priority number will be used.
-If no priority is specified, the default value will be &lt;code&gt;Integer.MAX_VALUE&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;extension point=&quot;org.eclipse.rse.subsystems.files.core.remoteFileTypes&quot;&gt;
- &lt;remoteFileTypes extension=&quot;txt&quot; type=&quot;text&quot;/&gt;
- &lt;remoteFileTypes extension=&quot;gif&quot; type=&quot;binary&quot;/&gt;
- &lt;remoteFileTypes extension=&quot;exe&quot; type=&quot;binary&quot; priority=&quot;100&quot;/&gt;
-&lt;/extension&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="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006, 2007 IBM Corporation. All Rights Reserved.
-This program and the accompanying materials are made available under the terms
-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.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 979f098be..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtility.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.ILanguageUtility;
-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.
- */
- private void setLanguage(String language) {
- this.language = language;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.ILanguageUtility#getSubSystem()
- */
- public IRemoteFileSubSystem getSubSystem() {
- return subsystem;
- }
-
- /**
- * @see org.eclipse.rse.subsystems.files.core.ILanguageUtility#getLanguage()
- */
- public String getLanguage() {
- return language;
- }
-}
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 c6780354f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/AbstractLanguageUtilityFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.ILanguageUtility;
-import org.eclipse.rse.subsystems.files.core.ILanguageUtilityFactory;
-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.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.subsystems.files.core.ILanguageUtilityFactory#getUtility(java.lang.String)
- *
- * @see IJavaLanguageUtility
- */
- public abstract ILanguageUtility getUtility(String language);
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/Activator.java
deleted file mode 100644
index 2de9dc0cb..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/Activator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (wind River) - [203105] Decouple recursive plugin activation of UI adapters
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.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;
-
- public static final String PLUGIN_ID = "org.eclipse.rse.subsystems.files.core"; //$NON-NLS-1$
-
- /**
- * 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;
- }
-
-}
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 9ae082d68..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/IJavaLanguageUtility.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.core;
-
-import org.eclipse.rse.subsystems.files.core.ILanguageUtility;
-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);
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFileMessageIds.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFileMessageIds.java
deleted file mode 100644
index 822dd64c0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFileMessageIds.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.files.core;
-
-public interface ISystemFileMessageIds {
-
- public static final String MSG_FILE_CANNOT_BE_SAVED = "RSEF5003"; //$NON-NLS-1$
- public static final String MSG_FOLDER_UNREADABLE = "RSEF5020"; //$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 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_FILE_NOTFOUND = "RSEF1006"; //$NON-NLS-1$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFilePreferencesConstants.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFilePreferencesConstants.java
deleted file mode 100644
index d47f7ecad..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemFilePreferencesConstants.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.
- * David McKnight (IBM) - [191367] setting supertransfer to be disabled by default
- * Xuan Chen (IBM) - [191367] setting supertransfer back to enabled by default
- * Xuan Chen (IBM) - [202686] Supertransfer should be disabled by default for 2.0.1
- * David McKnight (IBM) - [245260] Different user's connections on a single host are mapped to the same temp files cache
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-public interface ISystemFilePreferencesConstants
-{
-
- public static final String ROOT = "org.eclipse.rse.subsystems.files.core.preferences."; //$NON-NLS-1$
-
- public static final String SHOWHIDDEN = ROOT + "showhidden"; //$NON-NLS-1$
-
- public static final String FILETRANSFERMODEDEFAULT = ROOT + "filetransfermodedefault"; //$NON-NLS-1$
-
- public static final String PRESERVETIMESTAMPS = ROOT + "preservetimestamps"; //$NON-NLS-1$
-
- public static final String SHARECACHEDFILES = ROOT + "sharecachedfiles";//$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 boolean DEFAULT_SHOW_HIDDEN = true;
- public static final boolean DEFAULT_PRESERVETIMESTAMPS = true;
- public static final boolean DEFAULT_SHARECACHEDFILES = true;
- public static final int DEFAULT_FILETRANSFERMODE = 0;
-
- public static final int FILETRANSFERMODE_BINARY = 0;
- public static final int FILETRANSFERMODE_TEXT = 1;
-
- public static final String DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE = "zip"; //$NON-NLS-1$
- public static final boolean DEFAULT_DOSUPERTRANSFER = false;
-
- public static final int DEFAULT_DOWNLOAD_BUFFER_SIZE = 40;
-
- public static final boolean DEFAULT_LIMIT_CACHE = false;
- public static final String DEFAULT_MAX_CACHE_SIZE = "512"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemRemoteEditConstants.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemRemoteEditConstants.java
deleted file mode 100644
index 926b1bb74..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemRemoteEditConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [189130] Move SystemIFileProperties from UI to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-public interface ISystemRemoteEditConstants {
-
-
-
- // Constants for remote editing
- public static final String REMOTE_FILE_OBJECT_KEY = "remote_file_object_key"; //$NON-NLS-1$
-
- public static final String REMOTE_FILE_SUBSYSTEM_KEY = "remote_file_subsystem_key"; //$NON-NLS-1$
- public static final String REMOTE_FILE_PATH_KEY = "remote_file_path_key"; //$NON-NLS-1$
-
- public static final String REMOTE_FILE_MODIFIED_STAMP = "remote_file_modified_stamp"; //$NON-NLS-1$
- public static final String REMOTE_FILE_BINARY_TRANSFER = "remote_file_binary_transfer"; //$NON-NLS-1$
- public static final String TEMP_FILE_DIRTY = "temp_file_dirty"; //$NON-NLS-1$
- public static final String TEMP_FILE_READONLY = "temp_file_readonly"; //$NON-NLS-1$
-
- public static final String DOWNLOAD_FILE_MODIFIED_STAMP = "download_file_modified_stamp"; //$NON-NLS-1$
- // for mounted mappings
- public static final String REMOTE_FILE_MOUNTED = "remote_file_mounted"; //$NON-NLS-1$
- public static final String RESOLVED_MOUNTED_REMOTE_FILE_PATH_KEY = "resolved_mounted_remote_file_path_key"; //$NON-NLS-1$
- public static final String RESOLVED_MOUNTED_REMOTE_FILE_HOST_KEY = "resolved_mounted_remote_file_host_key"; //$NON-NLS-1$
-
-
- // Constants related to how the editor will set the document content
- public static final String LOAD_TYPE_KEY = "load_type_key"; //$NON-NLS-1$
- public static final String LOAD_TYPE_USE_STRING = "load_type_use_string"; //$NON-NLS-1$
-
-
- // Universal remote editing profile
- public static final String DEFAULT_EDITOR_PROFILE = "default"; //$NON-NLS-1$
- public static final String UNIVERSAL_EDITOR_PROFILE = "universal"; //$NON-NLS-1$
- public static final String UNIVERSAL_LOCAL_EDITOR_PROFILE = "universallocal"; //$NON-NLS-1$
-
-
- // Local relative directory for various editor actions
- public static final String EDITOR_COMPARE_LOCATION = "/compare/"; //$NON-NLS-1$
- public static final String EDITOR_GET_FILE_LOCATION = "/get/"; //$NON-NLS-1$
-} \ 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/ISystemTextEditorConstants.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemTextEditorConstants.java
deleted file mode 100644
index acf7020e2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/ISystemTextEditorConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [189130] Move SystemIFileProperties from UI to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-public interface ISystemTextEditorConstants {
-
-
-
- // Editor id
- public static final String SYSTEM_TEXT_EDITOR_ID = "org.eclipse.rse.editor"; //$NON-NLS-1$
- public static final String SYSTEM_TEXT_BROWSER_ID = "org.eclipse.rse.browser"; //$NON-NLS-1$
-
- // Identifier for profile type
- public static final String EDITOR_PROFILE_TYPE = "editorProfileType"; //$NON-NLS-1$
-
- // key to identify file has sequence numbers
- public static final String SEQUENCE_NUMBERS_KEY = "sequence_numbers_key"; //$NON-NLS-1$
-
- // key to identify that a save limit should be set
- public static final String MAX_LINE_LENGTH_KEY = "record_length_key"; //$NON-NLS-1$
-
- // 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"; //$NON-NLS-1$
-
- // key to identify host ccsid
- public static final String CCSID_KEY = "ccsid_key"; //$NON-NLS-1$
- public static final String TEMP_CCSID_KEY = "temp_ccsid_key"; //$NON-NLS-1$
-
- // key to identify logical or visual BIDI
- public static final String BIDI_LOGICAL_KEY = "bidi_logical_key"; //$NON-NLS-1$
-
- // 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"; //$NON-NLS-1$
-} \ 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/RemoteFilePermissionsAdapterFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePermissionsAdapterFactory.java
deleted file mode 100644
index 1134ede23..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePermissionsAdapterFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.rse.services.files.IFilePermissionsService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.view.AbstractSystemRemoteAdapterFactory;
-
-public class RemoteFilePermissionsAdapterFactory extends
- AbstractSystemRemoteAdapterFactory {
-
-
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
-
- IFileService fileService = null;
- if (adaptableObject instanceof IFileService){
- fileService = (IFileService)adaptableObject;
- }
- else if (adaptableObject instanceof IRemoteFile){
- FileServiceSubSystem ss = (FileServiceSubSystem)((IRemoteFile)adaptableObject).getParentRemoteFileSubSystem();
- if (ss != null){
- fileService = ss.getFileService();
- }
- }
-
- if (fileService != null){
- if (adapterType == IFilePermissionsService.class){
- if (fileService instanceof IFilePermissionsService){
- return fileService;
- }
- }
-
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList()
- {
- return new Class[] {IFilePermissionsService.class};
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePropertyTester.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePropertyTester.java
deleted file mode 100644
index 4ffa8d3c1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/RemoteFilePropertyTester.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Kevin Doyle (IBM) - [239700] Compile Commands are available on items it shouldn't
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-public class RemoteFilePropertyTester extends PropertyTester {
-
- public static final String PROPERTY_ISDIRECTORY = "isdirectory"; //$NON-NLS-1$
- public static final String PROPERTY_ISROOT = "isroot"; //$NON-NLS-1$
- public static final String PROPERTY_ISVIRTUAL = "isvirtual"; //$NON-NLS-1$
- public static final String PROPERTY_ISARCHIVE = "isarchive"; //$NON-NLS-1$
-
- public boolean test(Object receiver, String property, Object[] args,
- Object expectedValue) {
- boolean test = ((Boolean) expectedValue).booleanValue();
- if (receiver != null && receiver instanceof IRemoteFile) {
- if (property.equals(PROPERTY_ISDIRECTORY))
- return ((IRemoteFile) receiver).isDirectory() == test;
- else if (property.equals(PROPERTY_ISROOT))
- return ((IRemoteFile) receiver).isRoot() == test;
- else if (property.equals(PROPERTY_ISVIRTUAL))
- return ArchiveHandlerManager.isVirtual(((IRemoteFile) receiver).getAbsolutePath()) == test;
- else if (property.equals(PROPERTY_ISARCHIVE))
- return ((IRemoteFile) receiver).isArchive() == test;
- }
- return !test;
- }
-
-}
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 6fdc6df7b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileAPIProviderImpl.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-import org.eclipse.rse.core.RSECorePlugin;
-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.ISystemFileAPIProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-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 ISystemRegistry 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 = RSECorePlugin.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);
- }
-
-
- // ----------------------------------
- // 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.java
deleted file mode 100644
index c3b848d71..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemFileResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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_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;
-
- // File Filter String Re-Usable form (used in dialog and wizard)
- public static String RESID_FILEFILTERSTRING_FILE_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_FILE_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;
-
- // -------------------------
- // DIALOGS...
- // -------------------------
- // Change System File Filter dialog...
- public static String RESID_CHGFILEFILTER_TITLE;
-
-
- // Select Directory dialog...
- public static String RESID_SELECTDIRECTORY_TITLE;
- public static String RESID_SELECTDIRECTORY_VERBIAGE;
-
- public static String RESID_SELECTDIRECTORY_SELECT_TOOLTIP;
-
- // Select File dialog...
- public static String RESID_SELECTFILE_TITLE;
- public static String RESID_SELECTFILE_VERBIAGE;
- public static String RESID_SELECTFILE_SELECT_TOOLTIP;
-
- // Prompt for home folder dialog...
- public static String RESID_HOMEPROMPT_TITLE;
-
- // -------------------------
- // ACTIONS...
- // -------------------------
- public static String ACTION_NEWFILTER_LABEL;
- public static String ACTION_NEWFILTER_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_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_MODIFIED_LABEL;
- public static String RESID_PP_FILE_READONLY_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_HIDDEN_TOOLTIP;
-
- public static String RESID_PP_FILE_ENCODING_GROUP_LABEL;
- public static String RESID_PP_FILE_ENCODING_DEFAULT_LABEL;
- public static String RESID_PP_FILE_ENCODING_DEFAULT_TOOLTIP;
- public static String RESID_PP_FILE_ENCODING_OTHER_LABEL;
- public static String RESID_PP_FILE_ENCODING_OTHER_TOOLTIP;
- public static String RESID_PP_FILE_ENCODING_ENTER_TOOLTIP;
-
-
- public static String RESID_ENTER_OR_SELECT_FILE_TITLE;
-
- public static String RESID_JOB_SEARCH_NAME;
- public static String RESID_JOB_DECORATEFILES_NAME;
-
-
- public static String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE;
- public static String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID;
- public static String MSG_VALIDATE_NAME_EMPTY;
- public static String MSG_VALIDATE_NAME_EMPTY_DETAILS;
- public static String MSG_VALIDATE_NAME_NOTUNIQUE;
- public static String MSG_VALIDATE_NAME_NOTUNIQUE_DETAILS;
-
-
- public static String FILEMSG_FILE_NOTFOUND;
-
-
-
- public static String MSG_FOLDER_UNREADABLE;
-
- public static String MSG_FILE_CANNOT_BE_SAVED;
- public static String MSG_FILE_CANNOT_BE_SAVED_DETAILS;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemFileResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.properties b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.properties
deleted file mode 100644
index d89564bdf..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.properties
+++ /dev/null
@@ -1,183 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 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:
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# 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_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_MYHOME=My Home
-#=============================================================
-# NEW FILE FILTER WIZARD...
-#=============================================================
-RESID_NEWFILEFILTER_PAGE1_TITLE=File Filter
-RESID_NEWFILEFILTER_PAGE1_DESCRIPTION=Create a file filter
-
-
-
-#=============================================================
-# CHANGE FILE FILTER DIALOG...
-#=============================================================
-RESID_CHGFILEFILTER_TITLE=Change File Filter
-
-
-#=============================================================
-# SELECT DIRECTORY DIALOG...
-#=============================================================
-RESID_SELECTDIRECTORY_TITLE=Browse For Folder
-RESID_SELECTDIRECTORY_VERBIAGE=Select a folder
-RESID_SELECTDIRECTORY_SELECT_TOOLTIP=Expand tree and select folder
-
-#=============================================================
-# SELECT FILE DIALOG...
-#=============================================================
-RESID_SELECTFILE_TITLE=Browse For File
-RESID_SELECTFILE_VERBIAGE=Select a file
-RESID_SELECTFILE_SELECT_TOOLTIP=Expand tree and select file
-
-#=============================================================
-# PROMPT FOR HOME FOLDER DIALOG...
-#=============================================================
-RESID_HOMEPROMPT_TITLE=Prompt For Home Folder
-
-
-#=============================================================
-# REMOTE FILE SYSTEM PROPERTY VALUES
-#=============================================================
-RESID_PROPERTY_FILE_FILTER_VALUE=File filter
-
-#=============================================================
-# REMOTE FILE PROPERTIES PAGE...
-#=============================================================
-RESID_PP_FILE_TYPE_ROOT_VALUE=Root
-RESID_PP_FILE_TYPE_FOLDER_VALUE=Folder
-RESID_PP_FILE_TYPE_FILE_VALUE=File
-
-
-
-
-
-#=============================================================
-# NEW FILTER WIZARD...
-#=============================================================
-
-RESID_FILEFILTERSTRING_FILE_LABEL=File name filter
-RESID_FILEFILTERSTRING_FILE_TOOLTIP=File name filter pattern
-
-
-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_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_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_HIDDEN_LABEL=Hidden
-RESID_PP_FILE_HIDDEN_TOOLTIP=Is this file or folder typically hidden from lists
-
-RESID_PP_FILE_ENCODING_GROUP_LABEL=File encoding
-RESID_PP_FILE_ENCODING_DEFAULT_LABEL=Default (%1)
-RESID_PP_FILE_ENCODING_DEFAULT_TOOLTIP=The default encoding of the platform
-RESID_PP_FILE_ENCODING_OTHER_LABEL=Other:
-RESID_PP_FILE_ENCODING_OTHER_TOOLTIP=Specify a different encoding
-RESID_PP_FILE_ENCODING_ENTER_TOOLTIP=Select or enter an encoding
-
-
-RESID_ENTER_OR_SELECT_FILE_TITLE= Specify File
-
-#=============================================================
-# 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
-
-FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= Filter string ''{0}'' already exists in this filter
-FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID = Filter string name pattern not valid
-
-MSG_VALIDATE_NAME_EMPTY = Enter name
-MSG_VALIDATE_NAME_EMPTY_DETAILS = You must enter a name in the field where the cursor is positioned.
-MSG_VALIDATE_NAME_NOTUNIQUE= Name in use
-MSG_VALIDATE_NAME_NOTUNIQUE_DETAILS = This name is already used by another resource. Enter a unique name.
-FILEMSG_FILE_NOTFOUND = File ''{0}'' not found
-
-
-MSG_FOLDER_UNREADABLE = Folder {0} is not readable. Cannot expand
-
-MSG_FILE_CANNOT_BE_SAVED= File {0} can not be saved on {1}. You do not have write access to the file.
-MSG_FILE_CANNOT_BE_SAVED_DETAILS= Change file permissions to ensure you have write access to the 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 064ad2738..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, 2007 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.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 constitute 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 f969a0c9f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/SystemFileSubSystemConfigurationAPIProviderImpl.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [175680] Deprecate obsolete ISystemRegistry methods
- ********************************************************************************/
-
-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 initial 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 subsystemConfiguration = null;
- //protected Object[] emptyList = new Object[0];
-
- /**
- * Constructor
- * @param subsystemConfiguration The remote file subsystem configuration.
- * Users will drill down from connections that support this subsystem
- * configuration.
- * @param directoryMode true if you only want to traverse directories, false for both files and directories.
- */
- public SystemFileSubSystemConfigurationAPIProviderImpl(IRemoteFileSubSystemConfiguration subsystemConfiguration, boolean directoryMode)
- {
- super(directoryMode);
- this.subsystemConfiguration = subsystemConfiguration;
- }
-
- /**
- * Get the input subsystem object.
- */
- public IRemoteFileSubSystemConfiguration getSubSystemConfiguration()
- {
- return subsystemConfiguration;
- }
-
- // ----------------------------------
- // 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(subsystemConfiguration);
- }
- /**
- * 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 = subsystemConfiguration.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/internal/subsystems/files/core/model/RemotePath.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java
deleted file mode 100644
index 689029542..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePath.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [cleanup] Fix javadoc
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core.model;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.model.IRemotePath;
-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.SystemBasePlugin;
-
-
-/**
- * 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));
- }
- }
- }
- }
-
- /**
- * Set the profile name.
- * @param profileName the profile name.
- */
- protected void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
- /**
- * Set the connection name.
- * @param connectionName the connection name.
- */
- protected void setConnectionName(String connectionName) {
- this.connectionName = connectionName;
- }
-
- /**
- * Set the absolute path string below the connection.
- * Interpretation of this string is up to the subsystem.
- * @param absolutePath the absolute path string.
- */
- protected void setAbsolutePath(String absolutePath) {
- this.absolutePath = absolutePath;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getProfileName()
- */
- public String getProfileName() {
- return profileName;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getConnectionName()
- */
- public String getConnectionName() {
- return connectionName;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#getAbsolutePath()
- */
- public String getAbsolutePath() {
- return absolutePath;
- }
-
- /*
- * (non-Javadoc)
- * @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$
- }
- }
-
- /*
- * (non-Javadoc)
- * @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;
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @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);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#removeFileExtension()
- */
- 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);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#isVirtual()
- */
- public boolean isVirtual() {
- return ArchiveHandlerManager.isVirtual(absolutePath);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.IRemotePath#toRemoteFile()
- */
- public IRemoteFile toRemoteFile() {
-
- if ((profileName == null) || (connectionName == null) || (absolutePath == null)) {
- return null;
- }
-
- ISystemRegistry registry = RSECorePlugin.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, new NullProgressMonitor());
- }
- catch (SystemMessageException e) {
- SystemBasePlugin.logError("Error occured trying to get remote file", e); //$NON-NLS-1$
- }
-
- return remoteFile;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePathUtil.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePathUtil.java
deleted file mode 100644
index 265a0d5fd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/RemotePathUtil.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.core.model;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.subsystems.files.core.model.IRemotePath;
-
-/**
- * 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"); //$NON-NLS-1$
-
- IPath tempPath = new Path(tempDirString);
-
- if (tempDirString == null) {
- return null;
- }
- else {
-
- String absolutePath = remotePath.getAbsolutePath();
-
- // try '/' first
- String sep = "/"; //$NON-NLS-1$
-
- 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 = "\\"; //$NON-NLS-1$
-
- 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeMapping.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeMapping.java
deleted file mode 100644
index 8d2b55f50..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeMapping.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [208951] new priority field
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * Martin Oberhuber (Wind River) - [219975] Fix implementations of clone()
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.core.model;
-
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping;
-
-
-/**
- * An internal class.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class SystemFileTransferModeMapping implements ISystemFileTransferModeMapping, Cloneable {
-
- public static final int DEFAULT_PRIORITY = Integer.MAX_VALUE;
- private String name;
- private String extension;
- private boolean isBinary = true;
- private int priority = DEFAULT_PRIORITY;
-
- /**
- * Constructor for SystemFileTransferModeMapping. The name is set to <code>*</code>.
- * @param extension the extension. Can be <code>null</code>.
- */
- public SystemFileTransferModeMapping(String extension) {
- this("*", extension); //$NON-NLS-1$
- }
-
- /**
- * Constructor for SystemFileTransferModeMapping.
- * @param name the name. If the name is <code>null</code> or if it is an empty string, it is set to <code>*</code>.
- * @param extension the extension. Can be <code>null</code>.
- */
- public SystemFileTransferModeMapping(String name, String extension) {
-
- if ((name == null) || (name.length() < 1)) {
- setName("*"); //$NON-NLS-1$
- }
- else {
- setName(name);
- }
-
- setExtension(extension);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping#getExtension()
- */
- public String getExtension() {
- return extension;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping#getLabel()
- */
- public String getLabel() {
-
- if (extension != null) {
- return (name + "." + extension); //$NON-NLS-1$
- }
- else {
- return name;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping#getName()
- */
- public String getName() {
- return name;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping#isBinary()
- */
- public boolean isBinary() {
- return isBinary;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.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;
- }
-
- /**
- * Set the priority - the smaller the number, the higher priority
- * @param priority priority to set.
- */
- public void setPriority(int priority) {
- this.priority = priority;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping#getPriority()
- */
- public int getPriority()
- {
- return this.priority;
- }
-
- /**
- * Clone this object.
- *
- * Subclasses must ensure that such a deep copy operation is always
- * possible, so their state must always be cloneable.
- */
- public Object clone() {
- try {
- return super.clone();
- }
- catch (CloneNotSupportedException e) {
- //assert false; //can never happen
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeRegistry.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeRegistry.java
deleted file mode 100644
index 80d677f61..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/internal/subsystems/files/core/model/SystemFileTransferModeRegistry.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [208951] Use remoteFileTypes extension point to determine file types
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- *******************************************************************************/
-package org.eclipse.rse.internal.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.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeMapping;
-import org.eclipse.rse.subsystems.files.core.model.ISystemFileTransferModeRegistry;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.XMLMemento;
-
-
-
-/**
- * An internal class.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-
-public class SystemFileTransferModeRegistry implements ISystemFileTransferModeRegistry {
-
- 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"; //$NON-NLS-1$
- private static final String ENCODING = SystemEncodingUtil.ENCODING_UTF_8;
- private static final String ROOT_NODE = "mode"; //$NON-NLS-1$
- private static final String INFO_NODE = "info"; //$NON-NLS-1$
- private static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
- private static final String EXTENSION_ATTRIBUTE = "extension"; //$NON-NLS-1$
- private static final String MODE_ATTRIBUTE = "mode"; //$NON-NLS-1$
- private static final String BINARY_VALUE = "binary"; //$NON-NLS-1$
- private static final String TEXT_VALUE = "text"; //$NON-NLS-1$
- private static final String PRIORITY_ATTRIBUTE = "priority"; //$NON-NLS-1$
-
- /**
- * Constructor for SystemFileTransferModeRegistry
- */
- private SystemFileTransferModeRegistry() {
- super();
- this.plugin = RSEUIPlugin.getDefault();
- initialize();
- }
-
-
- /**
- * Get the singleton instance
- */
- public static SystemFileTransferModeRegistry getInstance() {
-
- if (instance == null) {
- instance = new SystemFileTransferModeRegistry();
- }
-
- return instance;
- }
-
- /**
- * Delete's the existing file associations and reinitializes with defaults
- */
- public void renit()
- {
- deleteAssociations();
- initialize();
- }
-
- /**
- * Initialize the registry from storage.
- */
- private void initialize() {
-
- // load our current associations (if any)
- loadAssociations();
-
-
- // get reference to the extension registry
- IExtensionRegistry extRegistry = Platform.getExtensionRegistry();
-
- // get extensions to our extension point
- IConfigurationElement[] elements = extRegistry.getConfigurationElementsFor("org.eclipse.rse.subsystems.files.core", "remoteFileTypes"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // go through all extensions
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
-
- // get the extension attribute value
- String extension = element.getAttribute("extension"); //$NON-NLS-1$
-
- if (extension != null && !extension.equals("")) { //$NON-NLS-1$
-
- // get the type attribute value
- String type = element.getAttribute("type"); //$NON-NLS-1$
-
- if (type != null && !type.equals("")) { //$NON-NLS-1$
-
- SystemFileTransferModeMapping mapping = new SystemFileTransferModeMapping(extension);
-
- // add extension to list of text types
- if (type.equalsIgnoreCase("text")) { //$NON-NLS-1$
- mapping.setAsText();
- }
- // add extension to list of binary types
- if (type.equalsIgnoreCase("binary")) { //$NON-NLS-1$
- mapping.setAsBinary();
- }
-
- int priority = SystemFileTransferModeMapping.DEFAULT_PRIORITY;
- String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$
- try
- {
- if (priorityStr != null && !priorityStr.equals("")){ //$NON-NLS-1$
- priority = Integer.parseInt(priorityStr);
- }
- }
- catch (Exception e)
- {
- }
- mapping.setPriority(priority);
-
- String key = getMappingKey(mapping);
- if (!typeModeMappings.containsKey(key)){
- typeModeMappings.put(key, mapping);
- }
- else {
- SystemFileTransferModeMapping existingMapping = (SystemFileTransferModeMapping)typeModeMappings.get(key);
- int existingPriority = existingMapping.getPriority();
- if (priority < existingPriority){
-
- // change properties of existing mapping to that of new priority
- if (mapping.isBinary() && existingMapping.isText()){
- existingMapping.setAsBinary();
- }
- else if (mapping.isText() && existingMapping.isBinary()){
- existingMapping.setAsText();
- }
-
- existingMapping.setPriority(priority);
- }
- }
- }
-
- }
- else {
- continue;
- }
- }
- }
-
- /**
- * @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() {
- Comparator c = new Comparator() {
- public int compare(Object o1, Object o2) {
- String s1 = ((ISystemFileTransferModeMapping)o1).getLabel().toUpperCase();
- String s2 = ((ISystemFileTransferModeMapping)o2).getLabel().toUpperCase();
- return s1.compareTo(s2);
- }
- };
- SortedSet s = new TreeSet(c);
- s.addAll(typeModeMappings.values());
- List result = new ArrayList(s);
- 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 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('.');
-
- String name = null;
- String extension = null;
-
- // if there is no extension
- if ((extIndex == -1) || (extIndex == (fileName.length() - 1))) {
- name = fileName;
- }
- else {
- name = fileName.substring(0, extIndex);
- extension = fileName.substring(extIndex + 1);
- }
-
- // check if the name and extension combination exists already
- SystemFileTransferModeMapping mapping = (SystemFileTransferModeMapping)(typeModeMappings.get(getMappingKey(new SystemFileTransferModeMapping(name, extension))));
-
- // if not, check only for the extension
- if (mapping == null) {
- 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(ISystemFilePreferencesConstants.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);
-
- // default
- int defaultFileTransferMode = getFileTransferModeDefaultPreference();
-
- if (defaultFileTransferMode == ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY)
- {
- mapping.setAsBinary();
- }
- else if (defaultFileTransferMode == ISystemFilePreferencesConstants.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();
- }
-
- try
- {
- Integer priorityInt = mementos[i].getInteger(PRIORITY_ATTRIBUTE);
- if (priorityInt != null){
- int priority = priorityInt.intValue();
- mapping.setPriority(priority);
- }
- }
- catch (Exception e)
- {
- }
-
-
- typeModeMappings.put(getMappingKey(mapping), mapping);
- }
-
- result = true;
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not read transfer mode xml file", e); //$NON-NLS-1$
- result = false;
- }
- finally {
-
- try {
-
- if (reader != null)
- reader.close();
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not close reader for transfer mode xml file", e); //$NON-NLS-1$
- }
- }
-
-
- return result;
- }
-
- private void deleteAssociations()
- {
- String location = getFileLocation();
- File assFile = new File(location);
- assFile.delete();
- }
-
- /**
- * 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);
- infoMemento.putInteger(PRIORITY_ATTRIBUTE, mapping.getPriority());
- }
-
- 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); //$NON-NLS-1$
- }
- finally {
-
- try {
-
- if (writer != null)
- writer.close();
- }
- catch (Exception e) {
- SystemBasePlugin.logError("Could not close writer for transfer mode xml file", e); //$NON-NLS-1$
- }
- }
- }
-
-
- /**
- * Get the file location
- */
- private String getFileLocation() {
- return plugin.getStateLocation().append(FILENAME).toOSString();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtility.java
deleted file mode 100644
index da538dbad..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtility.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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"; //$NON-NLS-1$
-
- /**
- * Constant for C language.
- */
- public static final String LANGUAGE_C = "C"; //$NON-NLS-1$
-
- /**
- * Constant for C++ language.
- */
- public static final String LANGUAGE_CPP = "C++"; //$NON-NLS-1$
-
- /**
- * 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();
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtilityFactory.java
deleted file mode 100644
index 686d87a42..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/ILanguageUtilityFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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);
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemIFileProperties.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemIFileProperties.java
deleted file mode 100644
index fe2dbf419..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/SystemIFileProperties.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [189130] Move SystemIFileProperties from UI to Core
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemRemoteEditConstants;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemTextEditorConstants;
-
-
-
-/**
- * Class that encapsulates ISeries IResource persistent properties.
- */
-public class SystemIFileProperties {
-
-
- private static final String STRING_EMPTY = ""; //$NON-NLS-1$
- private static final String EXPORT_KEY = "export"; //$NON-NLS-1$
-
- private static QualifiedName _nameDirty = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.TEMP_FILE_DIRTY );
- private static QualifiedName _nameReadOnly = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.TEMP_FILE_READONLY );
- private static QualifiedName _nameEditorProfileType = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.EDITOR_PROFILE_TYPE );
- private static QualifiedName _nameEncoding = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.SOURCE_ENCODING_KEY );
- private static QualifiedName _nameHasSequenceNumbers = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.SEQUENCE_NUMBERS_KEY );
- private static QualifiedName _nameRecordLength = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.MAX_LINE_LENGTH_KEY );
- private static QualifiedName _nameRemoteCCSID = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.CCSID_KEY );
- private static QualifiedName _nameRemoteFileObject = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.REMOTE_FILE_OBJECT_KEY );
- private static QualifiedName _nameRemoteFilePath = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.REMOTE_FILE_PATH_KEY );
- private static QualifiedName _nameRemoteFileSubSystem = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.REMOTE_FILE_SUBSYSTEM_KEY );
- private static QualifiedName _nameRemoteFileTimeStamp = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.REMOTE_FILE_MODIFIED_STAMP );
- private static QualifiedName _nameDownloadFileTimeStamp = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.DOWNLOAD_FILE_MODIFIED_STAMP );
- private static QualifiedName _nameUsedBinaryTransfer = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.REMOTE_FILE_BINARY_TRANSFER );
- private static QualifiedName _nameTempCCSID = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.TEMP_CCSID_KEY );
- private static QualifiedName _nameRemoteBIDILogical = new QualifiedName( STRING_EMPTY, ISystemTextEditorConstants.BIDI_LOGICAL_KEY );
-
- // for path mapping
- private static QualifiedName _nameRemoteFileMounted = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.REMOTE_FILE_MOUNTED);
- private static QualifiedName _nameResolvedMountedRemoteFileHost = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.RESOLVED_MOUNTED_REMOTE_FILE_HOST_KEY);
- private static QualifiedName _nameResolvedMountedRemoteFilePath = new QualifiedName( STRING_EMPTY, ISystemRemoteEditConstants.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("org.eclipse.rse.ui", ISystemTextEditorConstants.LOCAL_ENCODING_KEY); //$NON-NLS-1$
-
- 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" ); //$NON-NLS-1$
- }
- 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" ); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * 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); //$NON-NLS-1$ //$NON-NLS-2$
- setPropertyLong(key, modificationStamp);
- }
-
- public long getModificationStampAtExport(String hostName, String destination) {
- QualifiedName key = new QualifiedName(STRING_EMPTY, EXPORT_KEY + ":" + hostName + ":" + destination); //$NON-NLS-1$ //$NON-NLS-2$
- return getPropertyLong(key);
- }
-
- public boolean hasModificationStampAtExport(String hostName, String destination) {
- QualifiedName key = new QualifiedName(STRING_EMPTY, EXPORT_KEY + ":" + hostName + ":" + destination); //$NON-NLS-1$ //$NON-NLS-2$
- 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.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 b1f200e55..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, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, 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) - [cleanup] fix javadoc.
- ********************************************************************************/
-
-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 ".".
- * @return path with the file extension removed.
- */
- 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 6640b83d3..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, 2007 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) - [190271] Move ISystemViewInputProvider to Core
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.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 d4f27059d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileRemoteTypes.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.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"; //$NON-NLS-1$
- /**
- * There is only one type category for remote cmds.
- * It is "cmds".
- */
- public static final String TYPECMDCATEGORY = "cmds"; //$NON-NLS-1$
-
- // -----------
- // TYPES...
- // -----------
-
- /**
- * A folder object
- */
- public static final String TYPE_FOLDER = "folder"; //$NON-NLS-1$
- /**
- * A file object
- */
- public static final String TYPE_FILE = "file"; //$NON-NLS-1$
-
- // -----------
- // SUBTYPES...
- // -----------
-
- /**
- * A folder object
- */
- public static final String SUBTYPE_SUBFOLDER = "subfolder"; //$NON-NLS-1$
- /**
- * A root object
- */
- public static final String SUBTYPE_ROOT = "root"; //$NON-NLS-1$
-
-}
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 115c829a4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeMapping.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [208951] new priority field
- *******************************************************************************/
-
-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();
-
-
- /**
- * Gets the priority - the smaller the number, the higher priority
- * @return the priority
- * @since 3.0
- */
- public int getPriority();
-}
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 ded0db456..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/ISystemFileTransferModeRegistry.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.
- * David McKnight (IBM) - [208951] Don't use hard-coded file type defaults
- *******************************************************************************/
-
-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
-{
-
- // 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);
-}
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 1e297d363..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileFilterString.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [219975] Fix implementations of clone()
- *******************************************************************************/
-
-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.
- *
- * Clients may use or subclass this class. When subclassing, clients need to
- * ensure that the subclass is always capable of performing a deep clone
- * operation with the {@link #clone()} method, so if they add fields of
- * complex type, these need to be dealt with by overriding {@link #clone()}.
- */
-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 = ","; //$NON-NLS-1$
- public static final String SWITCH_NOSUBDIRS = " /ns"; //$NON-NLS-1$
- public static final String SWITCH_NOFILES = " /nf"; //$NON-NLS-1$
-
- /**
- * Constructor to use for a filter to list roots when used absolutely, or list all contents
- * when used relatively.
- */
- public RemoteFileFilterString()
- {
- file = "*"; //$NON-NLS-1$
- 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 = "*"; //$NON-NLS-1$
- 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(""); //$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 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;
- }
-
- /**
- * Should the filter show individual files?
- */
- 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("/")); //$NON-NLS-1$
- }
-
- /**
- * This filter string represent a list-files-in-root filter string?
- */
- public boolean listRoot()
- {
- return toStringNoSwitches().equals("/*"); //$NON-NLS-1$
- }
-
- /**
- *
- */
- 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 = "*"; //$NON-NLS-1$
- }
- else if (pathidx>0)
- {
- path = input.substring(0,pathidx);
- if (path.endsWith(":")) // special case: eg, given e: //$NON-NLS-1$
- path = path + PATH_SEP; // need it to be e:\ !!
- if (pathidx == (input.length()-1))
- file = "*"; //$NON-NLS-1$
- 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 = "*"; //$NON-NLS-1$
- }
- 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;
- }
-
- /**
- * Serialize 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.
- *
- * Subclasses must ensure that such a deep copy operation is always
- * possible, so their state must always be cloneable. Which should
- * always be possible to achieve, since this Object also needs to be
- * serializable.
- */
- public Object clone()
- {
- RemoteFileFilterString copy = null;
- try {
- copy = (RemoteFileFilterString)super.clone();
- } catch(CloneNotSupportedException e) {
- //assert false; //can never happen
- throw new RuntimeException(e);
- }
- if (types!=null) {
- copy.types = (String[])types.clone();
- }
- return copy;
- }
-}
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 3de295d60..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/model/RemoteFileUtility.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * David McKnight (IBM) - [267247] Wrong encoding - new method to get source encoding for IFile
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-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.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeRegistry;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-
-
-/**
- * Public utility class for dealing with remote file subsystems.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class RemoteFileUtility
-{
- /**
- * Return the workspace encoding for a given IFile. In none is specified
- * for this particular file, then the default charset is used. If an exception
- * is hit trying to get the encoding, then the fallback is UTF-8
- *
- * @since 3.1
- */
- public static String getSourceEncoding(IFile file)
- {
- String srcEncoding = null;
-
- try {
- srcEncoding = file.getCharset(true);
- if (srcEncoding == null || srcEncoding.length() == 0)
- {
- srcEncoding = file.getWorkspace().getRoot().getDefaultCharset();
- }
- }
- catch (CoreException e){
- srcEncoding = SystemEncodingUtil.ENCODING_UTF_8;
- }
- return srcEncoding;
- }
-
- /**
- * Return the first remote file subsystem associated with a connection.
- * @param connection the connection to query.
- * @return an IRemoteFileSubSystem instance, or <code>null</code> if
- * no file subsystem is configured with the given connection.
- */
- public static IRemoteFileSubSystem getFileSubSystem(IHost connection)
- {
- ISystemRegistry sr = RSECorePlugin.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;
- }
-
- /**
- * Return the list of file subsystems associated with a connection.
- * @param connection the connection to query.
- * @return a list of IRemoteFileSubSystem instances (may be empty).
- */
- public static IRemoteFileSubSystem[] getFileSubSystems(IHost connection)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSECorePlugin.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()]);
- }
-
- /**
- * Return the first remote file subsystem configuration associated with a system type.
- * @param systemType the system type to query.
- * @return an IRemoteFileSubSystemConfiguration instance, or <code>null</code> if
- * no file subsystem is configured with the given system type.
- */
- public static IRemoteFileSubSystemConfiguration getFileSubSystemConfiguration(IRSESystemType systemType)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] sses = sr.getSubSystemConfigurationsBySystemType(systemType, false);
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystemConfiguration)
- {
- return (IRemoteFileSubSystemConfiguration)sses[i];
- }
- }
- return null;
- }
-
- /**
- * Return the global SystemFileTransferModeRegistry.
- * @return the global SystemFileTransferModeRegistry.
- * @since 3.0
- */
- public static ISystemFileTransferModeRegistry getSystemFileTransferModeRegistry()
- {
- return SystemFileTransferModeRegistry.getInstance();
- }
-
-} \ 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 a1cbc3be1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/AbstractRemoteFile.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [231209] [api][breaking] IRemoteFile.getSystemConnection() should be changed to IRemoteFile.getHost()
- * Martin Oberhuber (Wind River) - [234726] Update IRemoteFile Javadocs
- * David McKnight (IBM) - [223461] [Refresh][api] Refresh expanded folder under filter refreshes Filter
- * David McKnight (IBM) - [241327] IRemoteFile.getParentName returns null for ssh, ftp, dstore, and local
- *******************************************************************************/
-
-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
-{
- 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);
- if (_hostFile.isFile() && !_hostFile.isArchive()) // no need to query this again so marking false for stale
- markStale(false, false);
- }
-
- public IRemoteFileSubSystem getParentRemoteFileSubSystem()
- {
- return _subSystem;
- }
-
- public IHost getHost()
- {
- 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;
- }
-
- /**
- * Return the parent's name
- */
- public String getParentName()
- {
- if (_parentFile != null) // optimization if we have the parentFile
- return _parentFile.getName(); // if we had used getParentFile(), the operation may have been more
- // expensive than just using the parent path
- else {
- String parentPath = getParentPath();
- if (parentPath == null) // parentPath may be null - avoid NPE
- return null;
- else
- return getNameFromPath(parentPath);
- }
- }
-
- /**
- * Gets the name from a path
- * @param path to get the name from a path
- * @return the name of file in the path
- */
- private 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 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()
- {
- return true;
- }
-
- public IHostFile getHostFile()
- {
- return _hostFile;
- }
-
- /**
- * Replacing the current associated IHostFile with a new one
- *
- * @param hostFile the new host file
- *
- * @since 3.0
- */
- public void setHostFile(IHostFile hostFile) {
- _hostFile = hostFile;
- }
-
-}
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 7cd34936c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ /dev/null
@@ -1,1255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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()
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Javier Montalvo Orus (Symbian) - [199773] Default file transfer mode is ignored for some file types
- * David McKnight (IBM) - [207095] Implicit connect on getRemoteFileObject
- * David McKnight (IBM) - [207100] fire event after upload and download
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * David McKnight (IBM) - [203114] don't treat XML files specially (no hidden prefs for bin vs text)
- * David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
- * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
- * David McKnight (IBM) - [209704] added supportsEncodingConversion()
- * David Dykstal (IBM) - [197036] pulling up subsystem switch logic
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [219098][api] FileServiceSubSystem should not be final
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Kevin Doyle (IBM) - [224162] SystemEditableRemoteFile.saveAs does not work because FileServiceSubSytem.upload does invalid check
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David Dykstal (IBM) - [221211] fix IFileService API for batch operations
- * Martin Oberhuber (Wind River) - [221211] Fix markStale() for delete() operation with exceptions
- * David Dykstal (IBM) - [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- * Martin Oberhuber (Wind River) - [234038] Mark IRemoteFile stale when changing permissions
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh][local] Return proper "Root" IHostFile
- * David McKnight (IBM) - [233461] [Refresh][api] Refresh expanded folder under filter refreshes Filter
- * Martin Oberhuber (Wind River) - [240704] Protect against illegal API use of getRemoteFileObject() with relative path as name
- * Martin Oberhuber (Wind River) - [234026] Clarify IFileService#createFolder() Javadocs
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- * David McKnight (IBM) - [244041] [files] Renaming a file looses Encoding property
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
-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.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.internal.subsystems.files.core.Activator;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFileMessageIds;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.services.clientserver.PathUtility;
-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.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.IHostSearchResultSet;
-import org.eclipse.rse.services.search.ISearchService;
-import org.eclipse.rse.subsystems.files.core.ILanguageUtilityFactory;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-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.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEncodingManager;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * Generic Subsystem implementation for remote files.
- *
- * Clients may instantiate this class from their subsystem configurations.
- * <p>
- * Extending (overriding) this class is discouraged: configuration of the subsystem
- * behavior should be done by providing a custom {@link IFileService} implementation
- * wherever possible.
- */
-public 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 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
- * @param monitor the progress monitor
- * @return an IRemoteFile object for the file.
- * @see IRemoteFile
- */
- public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException
- {
- // Consistency would be totally messed up if folderOrFileName were a relative path
- // Because IHostFiles would be incorrectly generated, getParent() would return wrong results etc
- assert folderOrFileName.indexOf(getSeparator())<0;
- // for bug 207095, implicit connect if the connection is not connected
- checkIsConnected(monitor);
-
- String fullPath = parent.getAbsolutePath() + getSeparator() + folderOrFileName;
- IRemoteFile file = getCachedRemoteFile(fullPath);
- if (file != null && !file.isStale())
- {
- return file;
- }
- // Fallback in case of incorrect API usage
- // TODO remove this in next release for Performance,
- // since it is just for bad clients using the API incorrectly
- if (folderOrFileName.indexOf(getSeparator()) >= 0) {
- try {
- throw new IllegalArgumentException("getRemoteFileObject: folderOrFileName must not be a relative path"); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Illegal API use: " + e.getLocalizedMessage(), e)); //$NON-NLS-1$
- }
- return getRemoteFileObject(fullPath, monitor);
- }
-
- IHostFile node = getFile(parent.getAbsolutePath(), folderOrFileName, monitor);
- 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
- * @param monitor the progress monitor
- * @return The constructed IRemoteFile
- * @see IRemoteFile
- */
- public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException
- {
-
- String fofName = folderOrFileName;
- if (folderOrFileName.length() > 1)
- {
- fofName = ArchiveHandlerManager.cleanUpVirtualPath(folderOrFileName);
- }
- IRemoteFile file = getCachedRemoteFile(fofName);
- if (file != null && !file.isStale()) {
- return file;
- }
-
- // for bug 207095, implicit connect if the connection is not connected
- checkIsConnected(monitor);
-
- 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$
- IRemoteFile userHome = getUserHome();
- if (userHome == null){
-
- // with 207095, it's possible that we could be trying to get user home when not connected
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ICommonMessageIds.MSG_ERROR_UNEXPECTED,
- IStatus.ERROR,
- CommonMessages.MSG_ERROR_UNEXPECTED);
- throw new SystemMessageException(msg);
- }
- return userHome;
- }
-
- 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(parentPath, name, monitor);
- 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(avp.getPath(), avp.getName(), null);
- 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();
- // with 207095, it's possible that user is not connected, and that userHome is null
- if (userHome == null) {
- return null;
- }
-
- IRemoteFile parent = null;
- if (!".".equals(userHome.getParentPath())) //$NON-NLS-1$
- {
- //note: parent path can be "null" if userHome is a Root
- try
- {
- //parent = getRemoteFileObject(userHome.getParentPath());
- }
- catch (Exception e)
- {
- }
- }
- root = getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, userHome);
- cacheRemoteFile(root, "."); //$NON-NLS-1$
- _userHome = root;
- return root;
- }
-
- /**
- * Return a list of children from the given parent path in service layer format.
- * Was unified from the previous methods getFolders(), getFiles() and getFilesAndFolders()
- * in RSE 3.0
- * @since 3.0
- */
- protected IHostFile[] internalList(String parentPath, String fileNameFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- return getFileService().list(parentPath, fileNameFilter, fileType, monitor);
- }
-
- protected IHostFile getFile(String parentPath, String fileName, IProgressMonitor monitor) throws SystemMessageException
- {
- return getFileService().getFile(parentPath, fileName, monitor);
- }
-
- protected IHostFile[] getRoots(IProgressMonitor monitor) throws InterruptedException, SystemMessageException
- {
- return getFileService().getRoots(monitor);
- }
-
- public IRemoteFile[] getRemoteFileObjects(String[] folderOrFileNames,
- IProgressMonitor monitor) throws SystemMessageException
- {
- // for bug 207095, implicit connect if the connection is not connected
- checkIsConnected(monitor);
-
- String[] parentPaths = new String[folderOrFileNames.length];
- String[] names = new String[folderOrFileNames.length];
- String sep = null;
- for (int i = 0; i < folderOrFileNames.length; i++)
- {
- String fofName = folderOrFileNames[i];
- if (sep == null)
- sep = PathUtility.getSeparator(fofName);
-
- String parentPath = null;
- String name = null;
- int lastSep = fofName.lastIndexOf(sep);
-
- if (lastSep > -1)
- {
- parentPath = fofName.substring(0, lastSep);
-
- if (parentPath.length() == 0) parentPath = "/"; //$NON-NLS-1$
- name = fofName.substring(lastSep + 1, fofName.length());
- }
-
- parentPaths[i] = parentPath;
- names[i] = name;
- }
-
- RemoteFileContext context = getDefaultContext();
- List hostFiles = new ArrayList(10);
- getFileService().getFileMultiple(parentPaths, names, hostFiles, monitor);
- IHostFile[] nodes = new IHostFile[hostFiles.size()];
- hostFiles.toArray(nodes);
- return getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, null, nodes);
- }
-
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException
- {
- String[] parentPaths = new String[parents.length];
- for (int i = 0; i < parents.length; i++)
- {
- parentPaths[i] = parents[i].getAbsolutePath();
- }
-
- List hostFiles = new ArrayList(10);
-
- // query children via the service
- getFileService().listMultiple(parentPaths, fileNameFilters, fileTypes, hostFiles, monitor);
- RemoteFileContext context = getDefaultContext();
-
- IHostFile[] results = (IHostFile[])hostFiles.toArray(new IHostFile[hostFiles.size()]);
-
- // convert the IHostFiles into AbstractRemoteFiles
- AbstractRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, null, results);
-
- // cache the results corresponding to each parent under each parent
- for (int i = 0; i < parents.length; i++)
- {
- IRemoteFile parent = parents[i];
- String parentPath = parentPaths[i];
- String filter = fileNameFilters[i];
-
- List underParent = new ArrayList();
- // what files are under this one?
- for (int j = 0; j < farr.length; j++)
- {
- IRemoteFile child = farr[j];
- String childParentPath = child.getParentPath();
-
- if (parentPath.equals(childParentPath))
- {
- underParent.add(child);
- }
- }
-
- // update the parent with it's latest properties
- // null is passed for the second argument because we currently don't get the parent in our results query
- updateRemoteFile(parent, null, monitor);
-
- if (underParent.size() > 0)
- {
- Object[] qresults = underParent.toArray();
- parent.setContents(RemoteChildrenContentsType.getInstance(), filter, qresults);
- }
- }
-
- return farr;
- }
-
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- String[] parentPaths = new String[parents.length];
- for (int i = 0; i < parents.length; i++)
- {
- parentPaths[i] = parents[i].getAbsolutePath();
- }
-
-
- List hostFiles = new ArrayList(10);
- // query children via the service
- getFileService().listMultiple(parentPaths, fileNameFilters, fileType, hostFiles, monitor);
- RemoteFileContext context = getDefaultContext();
-
- IHostFile[] results = (IHostFile[])hostFiles.toArray(new IHostFile[hostFiles.size()]);
-
- // convert the IHostFiles into AbstractRemoteFiles
- AbstractRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, null, results);
-
- // cache the results corresponding to each parent under each parent
- for (int i = 0; i < parents.length; i++)
- {
- IRemoteFile parent = parents[i];
- String parentPath = parentPaths[i];
- String filter = fileNameFilters[i];
-
- List underParent = new ArrayList();
- // what files are under this one?
- for (int j = 0; j < farr.length; j++)
- {
- AbstractRemoteFile child = farr[j];
- String childParentPath = child.getParentPath();
-
- if (parentPath.equals(childParentPath))
- {
- underParent.add(child);
- }
- }
-
- // update the parent with it's latest properties
- // null is passed for the second argument because we currently don't get the parent in our results query
- updateRemoteFile(parent, null, monitor);
-
- if (underParent.size() > 0)
- {
- Object[] qresults = underParent.toArray();
- parent.setContents(RemoteChildrenContentsType.getInstance(), filter, qresults);
- }
- }
-
- return farr;
- }
-
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- String parentPath = null;
- if (parent != null) {
- parentPath = parent.getAbsolutePath();
- } else {
- parentPath = "/"; //$NON-NLS-1$
- }
-
- if (parent != null && !parent.canRead())
- {
- String msgTxt = NLS.bind(SystemFileResources.MSG_FOLDER_UNREADABLE, parentPath);
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.MSG_FOLDER_UNREADABLE,
- IStatus.INFO, msgTxt);
- throw new SystemMessageException(msg);
- }
-
- // query children of the parent
- IHostFile[] results = internalList(parentPath, fileNameFilter, fileType, monitor);
-
- // Bug 233461: update the parent with it's latest properties
- // null is passed for the second argument because we currently don't get the parent in our results query
- updateRemoteFile(parent, null, monitor);
-
- // convert the IHostFiles to AbstractRemoteFile[]
- AbstractRemoteFile[] farr = getHostFileToRemoteFileAdapter().convertToRemoteFiles(this, context, parent, results);
- if (parent != null)
- parent.setContents(RemoteChildrenContentsType.getInstance(), fileNameFilter, farr);
- return farr;
- }
-
-
-
- private void updateRemoteFile(IRemoteFile parent, IHostFile newHostParent, IProgressMonitor monitor) throws SystemMessageException
- {
- // now newHostParent file passed in so we'll assume it wasn't returned and explicitly get it
- if (newHostParent == null){
- String parentParentPath = parent.getParentPath();
- if (parentParentPath == null){
- parentParentPath = ""; //$NON-NLS-1$
- }
- newHostParent = getFileService().getFile(parentParentPath, parent.getName(), monitor);
- }
-
- if (newHostParent != null){
- IHostFile oldHostParent = parent.getHostFile();
- if (!newHostParent.equals(oldHostParent)){
- ((AbstractRemoteFile)parent).setHostFile(newHostParent);
- parent.markStale(false);
- }
- }
- }
-
-
- 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;
- }
-
- protected boolean isBinary(String localEncoding, String hostEncoding, String remotePath)
- {
- return RemoteFileUtility.getSystemFileTransferModeRegistry().isBinary(remotePath);
- }
-
- protected boolean isBinary(IRemoteFile source)
- {
- return source.isBinary(); // always use preferences (whether xml or not)
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#upload(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void upload(String source, String srcEncoding, String remotePath, String rmtEncoding, IProgressMonitor monitor) throws SystemMessageException {
- 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();
- }
- getFileService().upload(new File(source), remoteParentPath, remoteFileName, isBinary, srcEncoding, rmtEncoding, monitor);
-
- // notify that the file was uploaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, remotePath, remoteParentPath, this));
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#upload(java.lang.String, org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void upload(String source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws SystemMessageException
- {
- String remoteParentPath = destination.getParentPath();
- String remoteFileName = destination.getName();
- String hostEncoding = destination.getEncoding();
- boolean isBinary = isBinary(encoding, hostEncoding, destination.getAbsolutePath());
-
- if ((destination.exists() && !destination.canWrite()) || (!destination.exists() && !destination.getParentRemoteFile().canWrite()))
- {
- String msgTxt = NLS.bind(SystemFileResources.MSG_FILE_CANNOT_BE_SAVED, remoteFileName, getHostName());
- String msgDetails = SystemFileResources.MSG_FILE_CANNOT_BE_SAVED_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.MSG_FILE_CANNOT_BE_SAVED,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
- getFileService().upload(new File(source), remoteParentPath, remoteFileName, isBinary, encoding, hostEncoding, monitor);
-
- // notify that the file was uploaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, destination, destination.getParentRemoteFile(), this));
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public void uploadMultiple(String[] sources, String[] srcEncodings,
- String[] remotePaths, String[] rmtEncodings,
- IProgressMonitor monitor) throws SystemMessageException
- {
- // create list of stuff
- File[] sourceFiles = new File[sources.length];
- boolean[] isBinaries = new boolean[sources.length];
- String[] remoteParentPaths = new String[sources.length];
- String[] remoteFileNames = new String[sources.length];
-
- // gather info
- for (int i = 0; i < sources.length; i++)
- {
- sourceFiles[i] = new File(sources[i]);
- String remotePath = remotePaths[i];
- int slashIndex = remotePath.lastIndexOf(getSeparator());
- if (slashIndex > -1) {
- remoteParentPaths[i] = remotePath.substring(0, slashIndex);
- remoteFileNames[i] = remotePath.substring(slashIndex + 1, remotePath.length());
- isBinaries[i] = isBinary(srcEncodings[i], rmtEncodings[i], remotePath);
- if (ArchiveHandlerManager.isVirtual(remotePath))
- {
- AbsoluteVirtualPath avp = new AbsoluteVirtualPath(remotePath);
- remoteParentPaths[i] = avp.getPath();
- remoteFileNames[i] = avp.getName();
- }
- }
- else // unexpected
- {
- // throw an exception here
- //SystemMessage msg = RSEUIPlugin.getPluginMessage("RSEF5003").makeSubstitution(remoteFileNames[i], getHostName()); //$NON-NLS-1$
- //throw new SystemMessageException(msg);
- }
- }
-
- // upload
- getFileService().uploadMultiple(sourceFiles, remoteParentPaths, remoteFileNames, isBinaries, srcEncodings, rmtEncodings, monitor);
-
- // notification
- // notify that the file was uploaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- for (int j = 0; j < remotePaths.length; j++)
- {
- String remotePath = remotePaths[j];
- String remoteParentPath = remoteParentPaths[j];
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, remotePath, remoteParentPath, this));
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public void uploadMultiple(String[] sources, IRemoteFile[] destinations,
- String[] encodings, IProgressMonitor monitor)
- throws SystemMessageException
-{
- // create list of stuff
- File[] sourceFiles = new File[sources.length];
- boolean[] isBinaries = new boolean[sources.length];
- String[] remoteParentPaths = new String[sources.length];
- String[] remoteFileNames = new String[sources.length];
- String[] hostEncodings = new String[sources.length];
-
- // gather info
- for (int i = 0; i < sources.length; i++)
- {
- sourceFiles[i] = new File(sources[i]);
- IRemoteFile destination = destinations[i];
-
- remoteParentPaths[i] = destination.getAbsolutePath();
- remoteFileNames[i] = destination.getName();
-
- if (!destination.canWrite())
- {
- String msgTxt = NLS.bind(SystemFileResources.MSG_FILE_CANNOT_BE_SAVED, remoteFileNames[i], getHostName());
- String msgDetails = SystemFileResources.MSG_FILE_CANNOT_BE_SAVED_DETAILS;
-
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.MSG_FILE_CANNOT_BE_SAVED,
- IStatus.ERROR, msgTxt, msgDetails);
- throw new SystemMessageException(msg);
- }
-
- hostEncodings[i] = destination.getEncoding();
- isBinaries[i] = isBinary(encodings[i], hostEncodings[i], destination.getAbsolutePath());
-
- }
-
- // upload
- getFileService().uploadMultiple(sourceFiles, remoteParentPaths, remoteFileNames, isBinaries, encodings, hostEncodings, monitor);
-
- // notification
- // notify that the file was uploaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- for (int j = 0; j < destinations.length; j++)
- {
- IRemoteFile destination = destinations[j];
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, destination, destination.getParentRemoteFile(), this));
- }
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#download(org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void download(IRemoteFile file, String localpath, String encoding, IProgressMonitor monitor) throws SystemMessageException
- {
- //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);
-
- // FIXME why are we using file.getEncoding() instead of the specified encoding?
- getFileService().download(parentPath, file.getName(), localFile, isBinary(file), file.getEncoding(), monitor);
- if (monitor.isCanceled())
- {
- localFile.delete();
- }
- else
- {
- // notify that the file was downloaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DOWNLOADED, file, file.getParentRemoteFile(), this));
-
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0
- */
- public void downloadMultiple(IRemoteFile[] sources, String[] destinations,
- String[] encodings, IProgressMonitor monitor)
- throws SystemMessageException
- {
- //Fixing bug 158534. TODO remove when bug 162688 is fixed.
- if (monitor==null) {
- monitor = new NullProgressMonitor();
- }
-
- // get arrays of parent paths and local files
- String[] parentPaths = new String[sources.length];
- String[] names = new String[sources.length];
- boolean[] isBinaries = new boolean[sources.length];
- File[] localFiles = new File[sources.length];
-
- for (int i = 0; i < sources.length; i++)
- {
- IRemoteFile file = sources[i];
- parentPaths[i] = file.getParentPath();
- names[i] = file.getName();
- isBinaries[i] = isBinary(file);
- localFiles[i] = new File(destinations[i]);
- }
-
- getFileService().downloadMultiple(parentPaths, names, localFiles, isBinaries, encodings, monitor);
- if (monitor.isCanceled())
- {
- for (int d = 0; d < localFiles.length; d++)
- {
- File f = localFiles[d];
- f.delete();
- }
- }
- else
- {
- // notify that the file was downloaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- for (int r = 0; r < sources.length; r++)
- {
- IRemoteFile file = sources[r];
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DOWNLOADED, file, file.getParentRemoteFile(), this));
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0 returns void
- */
- public void copy(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws SystemMessageException
- {
- IFileService service = getFileService();
- service.copy(sourceFolderOrFile.getParentPath(), sourceFolderOrFile.getName(), targetFolder.getAbsolutePath(), newName, monitor);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0 returns void
- */
- public void copyBatch(IRemoteFile[] sourceFolderOrFiles, IRemoteFile targetFolder, IProgressMonitor monitor) throws SystemMessageException
- {
- 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();
- }
- service.copyBatch(sourceParents, sourceNames, targetFolder.getAbsolutePath(), monitor);
- }
-
- public IRemoteFile getParentFolder(IRemoteFile folderOrFile, IProgressMonitor monitor)
- {
- try
- {
- return getRemoteFileObject(folderOrFile.getParentPath(), monitor);
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
- public IRemoteFile createFile(IRemoteFile fileToCreate, IProgressMonitor monitor) throws SystemMessageException
- {
- IFileService service = getFileService();
- String parent = fileToCreate.getParentPath();
- String name = fileToCreate.getName();
- IHostFile newFile = service.createFile(parent, name, monitor);
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), fileToCreate.getParentRemoteFile(), newFile);
- }
-
- public IRemoteFile createFolder(IRemoteFile folderToCreate, IProgressMonitor monitor) throws SystemMessageException
- {
- IFileService service = getFileService();
- String parent = folderToCreate.getParentPath();
- String name = folderToCreate.getName();
- IHostFile newFolder = service.createFolder(parent, name, monitor);
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), folderToCreate.getParentRemoteFile(), newFolder);
- }
-
- public IRemoteFile createFolders(IRemoteFile folderToCreate, IProgressMonitor monitor) throws SystemMessageException
- {
- try {
- //As per IFileService#createFolder() API Docs, Services *may* create parent folders.
- //Therefore, first try this shortcut before actually iterating to create parents.
- return createFolder(folderToCreate, monitor);
- } catch (SystemMessageException e) {
- //Parent did not exist? Need to create parent folders on this Service
- IFileService service = getFileService();
- List parents = new ArrayList();
- IRemoteFile parent = folderToCreate;
- while (!parent.isRoot()) {
- parent = parent.getParentRemoteFile();
- IHostFile parentFile = service.getFile(parent.getParentPath(), parent.getName(), monitor);
- if (parentFile.exists()) {
- //Update cache with newest info, since we just got it
- getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent.getParentRemoteFile(), parentFile);
- break;
- } else {
- parents.add(parent);
- }
- }
- if (parents.size()==0) {
- //No parents missing -- throw original exception
- throw e;
- }
- for (int i=parents.size()-1; i>=0; i--) {
- parent = (IRemoteFile)parents.get(i);
- // Remote side will change due to createFolder, so mark it stale
- parent.markStale(true, true);
- // Create new folder and cache the contents
- createFolder(parent, monitor);
- }
- return createFolder(folderToCreate, monitor);
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 returns void
- */
- public void delete(IRemoteFile folderOrFile, IProgressMonitor monitor) throws SystemMessageException
- {
- IFileService service = getFileService();
- String parent = folderOrFile.getParentPath();
- String name = folderOrFile.getName();
- try {
- service.delete(parent, name, monitor);
- } finally {
- folderOrFile.markStale(true);
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 returns void
- */
- public void deleteBatch(IRemoteFile[] folderOrFiles, IProgressMonitor monitor) throws SystemMessageException
- {
-
- 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();
- service.deleteBatch(parents, names, monitor);
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 returns void
- */
- public void rename(IRemoteFile folderOrFile, String newName, IProgressMonitor monitor) throws SystemMessageException
- {
- removeCachedRemoteFile(folderOrFile);
- IFileService service = getFileService();
- String srcParent = folderOrFile.getParentPath();
- String oldName = folderOrFile.getName();
- String newPath = srcParent + folderOrFile.getSeparator() + newName;
-
- String originalEncoding = folderOrFile.getEncoding();
-
- service.rename(srcParent, oldName, newName, monitor);
- folderOrFile.getHostFile().renameTo(newPath);
-
- // for bug 244041 - need to set encoding to be the same as the original file
- RemoteFileEncodingManager mgr = RemoteFileEncodingManager.getInstance();
- String renamedEncoding = folderOrFile.getEncoding();
- if (!renamedEncoding.equals(originalEncoding)){
- mgr.setEncoding(getHostName(), newPath, originalEncoding);
- }
-
-
-
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 returns void
- */
- public void move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws SystemMessageException
- {
- IFileService service = getFileService();
- String srcParent = sourceFolderOrFile.getParentPath();
- String srcName = sourceFolderOrFile.getName();
- String tgtParent = targetFolder.getAbsolutePath();
- removeCachedRemoteFile(sourceFolderOrFile);
-
- String newPath = tgtParent + targetFolder.getSeparator() + newName;
- String originalEncoding = sourceFolderOrFile.getEncoding();
-
- try {
- service.move(srcParent, srcName, tgtParent, newName, monitor);
- } finally {
- sourceFolderOrFile.markStale(true);
- targetFolder.markStale(true);
- }
-
- // for bug 244041 - need to set encoding to be the same as the original file
- RemoteFileEncodingManager mgr = RemoteFileEncodingManager.getInstance();
- IRemoteFile movedFile = getRemoteFileObject(targetFolder, newName, monitor);
- if (movedFile != null && !movedFile.getEncoding().equals(originalEncoding)){
- mgr.setEncoding(getHostName(), newPath, originalEncoding);
- }
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 returns void
- */
- public void setLastModified(IRemoteFile folderOrFile, long newDate, IProgressMonitor monitor) throws SystemMessageException
- {
- String name = folderOrFile.getName();
- String parent = folderOrFile.getParentPath();
- //mark stale regardless of whether the call succeeds or not
- folderOrFile.markStale(true);
- _hostFileService.setLastModified(parent, name, newDate, monitor);
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 returns void
- */
- public void setReadOnly(IRemoteFile folderOrFile, boolean readOnly, IProgressMonitor monitor) throws SystemMessageException
- {
- String name = folderOrFile.getName();
- String parent = folderOrFile.getParentPath();
- //mark stale regardless of whether the call succeeds or not
- folderOrFile.markStale(true);
- _hostFileService.setReadOnly(parent, name, readOnly, monitor);
- }
-
- 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();
- }
- }
-
- /**
- * {@inheritDoc}
- * @see IRemoteFileSubSystem#cancelSearch(IHostSearchResultConfiguration)
- */
- public void cancelSearch(IHostSearchResultConfiguration searchConfig)
- {
- ISearchService searchService = getSearchService();
- if (searchService != null)
- {
- searchService.cancelSearch(searchConfig, null);
- }
- }
-
- 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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- * Overriding the super implementation to return true for any configuration that implements IFileServiceSubSystemConfiguration
- */
- public boolean canSwitchTo(ISubSystemConfiguration configuration) {
- return (configuration instanceof IFileServiceSubSystemConfiguration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- * Overriding the super implementation to do switch the file subsystem bits that need to be copied or initialized in a switch
- */
- protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfig) {
- if (newConfig instanceof IFileServiceSubSystemConfiguration) {
- IHost host = getHost();
- IFileServiceSubSystemConfiguration config = (IFileServiceSubSystemConfiguration) newConfig;
- // file subsystem specific bits
- _cachedRemoteFiles.clear();
- _languageUtilityFactory = null;
- setFileService(config.getFileService(host));
- setHostFileToRemoteFileAdapter(config.getHostFileAdapter());
- setSearchService(config.getSearchService(host));
- }
- }
-
- public Class getServiceType()
- {
- return IFileService.class;
- }
-
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException
- {
- super.initializeSubSystem(monitor);
- getFileService().initService(monitor);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- getFileService().uninitService(monitor);
- _userHome = null;
- super.uninitializeSubSystem(monitor);
- }
-
- /**
- * Returns the encoding from the file service being used by this subsystem.
- * @see RemoteFileSubSystem#getRemoteEncoding()
- */
- public String getRemoteEncoding() {
-
- try {
-
- IHost host = getHost();
-
- // get the encoding from the host that was not set by the remote system
- String encoding = host.getDefaultEncoding(false);
-
- // get the encoding from the host that was set by querying a remote system
- // this allows us to pick up the host encoding that may have been set by another subsystem
- if (encoding == null) {
- encoding = getFileService().getEncoding(null);
-
- if (encoding != null) {
- host.setDefaultEncoding(encoding, true);
- }
- }
-
- if (encoding != null) {
- return encoding;
- }
- else {
- return super.getRemoteEncoding();
- }
- }
- catch (SystemMessageException e) {
- SystemBasePlugin.logMessage(e.getSystemMessage());
- }
-
- return super.getRemoteEncoding();
- }
-
- /**
- * {@inheritDoc} Defers to the file service. The method is basically another
- * way to do download.
- *
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem#getInputStream(java.lang.String,
- * java.lang.String, boolean,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return new FileSubSystemInputStream(getFileService().getInputStream(remoteParent, remoteFile, isBinary, monitor), remoteParent, remoteFile, this);
- }
-
- /**
- * {@inheritDoc}
- * @deprecated Use
- * {@link #getOutputStream(String, String, int, IProgressMonitor)}
- * instead
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return new FileSubSystemOutputStream(getFileService().getOutputStream(remoteParent, remoteFile, isBinary, monitor), remoteParent, remoteFile, this);
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 uses int options argument
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
- return new FileSubSystemOutputStream(getFileService().getOutputStream(remoteParent, remoteFile, options, monitor), remoteParent, remoteFile, this);
- }
-
- /**
- * {@inheritDoc} Defers to the file service.
- * @since 3.0
- */
- public boolean supportsEncodingConversion(){
- return getFileService().supportsEncodingConversion();
- }
-
-} \ 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 64a873337..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, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-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.ui.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/FileSubSystemInputStream.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemInputStream.java
deleted file mode 100644
index 64e0e8031..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemInputStream.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * David McKnight (IBM) - [207100] decorated input stream
- *******************************************************************************/
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * Decorates an input stream that was created in the service layer. The purpose
- * of this class is to notify download after the stream is closed.
- *
- * @since 3.0
- */
-public class FileSubSystemInputStream extends InputStream {
-
- private InputStream _inStream;
- private String _remoteParent;
- private String _remoteFile;
- private IRemoteFileSubSystem _fs;
-
- public FileSubSystemInputStream(InputStream inStream, String remoteParent, String remoteFile, IRemoteFileSubSystem fs)
- {
- _inStream = inStream;
- _remoteParent = remoteParent;
- _remoteFile = remoteFile;
- _fs = fs;
- }
-
- public int available() throws IOException {
- return _inStream.available();
- }
-
- public void close() throws IOException {
- _inStream.close();
-
- // notify that the file was uploaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, _remoteParent, _remoteFile, _fs));
- }
-
- public synchronized void mark(int readlimit) {
- _inStream.mark(readlimit);
- }
-
- public boolean markSupported() {
- return _inStream.markSupported();
- }
-
- public int read(byte[] b, int off, int len) throws IOException {
- return _inStream.read(b, off, len);
- }
-
- public int read(byte[] b) throws IOException {
- return _inStream.read(b);
- }
-
- public synchronized void reset() throws IOException {
- _inStream.reset();
- }
-
- public long skip(long n) throws IOException {
- return _inStream.skip(n);
- }
-
- public int read() throws IOException {
- return _inStream.read();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemOutputStream.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemOutputStream.java
deleted file mode 100644
index 18ba5f861..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileSubSystemOutputStream.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * David McKnight (IBM) - [207100] decorated output stream
- *******************************************************************************/
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-
-/**
- * Decorates an output stream that was created in the service layer. The purpose
- * of this class is to notify upload after the stream is closed.
- *
- * @since 3.0
- */
-public class FileSubSystemOutputStream extends OutputStream {
-
- private OutputStream _outStream;
- private String _remoteParent;
- private String _remoteFile;
- private IRemoteFileSubSystem _fs;
-
-
- public FileSubSystemOutputStream(OutputStream outStream, String remoteParent, String remoteFile, IRemoteFileSubSystem fs)
- {
- _outStream = outStream;
- _remoteParent = remoteParent;
- _remoteFile = remoteFile;
- _fs = fs;
- }
-
- public void close() throws IOException {
- _outStream.close();
-
- // notify that the file was uploaded
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, _remoteParent, _remoteFile, _fs));
- }
-
- public void flush() throws IOException {
- _outStream.flush();
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- _outStream.write(b, off, len);
- }
-
- public void write(byte[] b) throws IOException {
- _outStream.write(b);
- }
-
- public void write(int b) throws IOException {
- _outStream.write(b);
- }
-
-}
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 a60db07b8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/IFileServiceSubSystem.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-
-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
-{
-
- /**
- * 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);
-
-
-
-} \ 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 c091c8f74..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, 2008 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:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-
-import org.eclipse.rse.core.model.IHost;
-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.ILanguageUtilityFactory;
-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
-{
- 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);
-}
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 0e046a66e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/OutputRefresh.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.servicesubsystem;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.services.search.IHostSearchConstants;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-
-
-public class OutputRefresh implements Runnable
-{
- private IHostSearchResultConfiguration searchConfig;
- private boolean isDone = false;
- private boolean isCancelled = false;
-
- public OutputRefresh(IHostSearchResultConfiguration searchConfig)
- {
- this.searchConfig = searchConfig;
- this.isDone = searchConfig.getStatus() == IHostSearchConstants.FINISHED;
- this.isCancelled = searchConfig.getStatus() == IHostSearchConstants.CANCELLED;
- }
-
- public void run() {
-
- if (searchConfig != null)
- {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(searchConfig, ISystemResourceChangeEvents.EVENT_REFRESH, null));
-
- if (isDone || isCancelled)
- {
- registry.fireEvent(new SystemResourceChangeEvent(searchConfig, ISystemResourceChangeEvents.EVENT_SEARCH_FINISHED, null));
- }
-
-
-
- }
- }
-}
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 ad25e514f..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, 2007 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) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-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.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.services.search.ISearchService;
-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(_searchConfig, _fileService, monitor);
-
- 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 dfd7899a3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IHostFileToRemoteFileAdapter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.services.files.IHostFile;
-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.servicesubsystem.IFileServiceSubSystemConfiguration;
-
-
-/**
- * Provider interface for implementers of RSE IFileService instances, by which
- * they convert their internal service objects into objects suitable for the RSE
- * file subsystem.
- *
- * Must be implemented and returned by overriding the
- * {@link IFileServiceSubSystemConfiguration#getHostFileAdapter()} method in the
- * contributed concrete file subsystem configuration.
- */
-public interface IHostFileToRemoteFileAdapter
-{
- /**
- * Convert a list of IHostFile objects from the file service into remote
- * file objects. Used to return IRemoteFile[] before RSE 3.0, returns
- * AbstractRemoteFile since RSE 3.0.
- *
- * @param ss The file service subsystem to which the remote files belong.
- * @param context The context (connection, subsystem, filter) under which
- * the files have been queried.
- * @param parent The parent IRemoteFile below which the new nodes should
- * appear. Can be <code>null</code> when converting root files.
- * @param nodes IHostFile nodes from the file service
- * @return an array of converted remote file objects.
- *
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public AbstractRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes);
-
- /**
- * Convert a single IHostFile object from the file service into a remote
- * file object. Used to return IRemoteFile before RSE 3.0, returns
- * AbstractRemoteFile since RSE 3.0.
- *
- * @param ss The file service subsystem to which the remote files belong.
- * @param context The context (connection, subsystem, filter) under which
- * the files have been queried.
- * @param parent The parent IRemoteFile below which the new nodes should
- * appear. Can be <code>null</code> when converting root files.
- * @param node IHostFile node from the file service
- * @return converted remote file object.
- *
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public AbstractRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node);
-}
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 34123a35e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFile.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * David McKnight (IBM) - [231209] [api][breaking] IRemoteFile.getSystemConnection() should be changed to IRemoteFile.getHost()
- * Martin Oberhuber (Wind River) - [234726] Update IRemoteFile Javadocs
- *******************************************************************************/
-
-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.services.files.IHostFilePermissions;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-
-/**
- * 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 represents a "handle" to the remote file or folder, and allows to
- * mark special folders as "root" of the file system. For editing purposes,
- * a local copy of the remote file can be managed. The support for this is
- * captured in a separate interface, {@link ISystemEditableRemoteObject}.
- * <li>This interface has no action methods, only property access methods. The action methods
- * such as delete, rename, list or getRemoteFileObject() are found in the
- * {@link IRemoteFileSubSystem} interface. All remote commands/actions are routed
- * through subsystems in this remote system framework.
- * <li>Similarly, IRemoteFile handle objects are not constructed directly. They are obtained
- * from factory methods in {@link IRemoteFileSubSystem#getRemoteFileObject(String, org.eclipse.core.runtime.IProgressMonitor)},
- * and related methods, which may delegate the actual object creation to an
- * {@link IHostFileToRemoteFileAdapter} in case of an {@link IFileServiceSubSystem}
- * instance.
- * <li>There are 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
- * RemoteFile class defines. For that, cast to {@link RemoteFile}.
- *
- * @noimplement This interface is not intended to be implemented by clients. Clients
- * should subclass the provided {@link RemoteFile} or one of its subclasses
- * instead. For use with file services (IFileServiceSubSystem), the
- * {@link AbstractRemoteFile} class must be subclassed.
- */
-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.
- *
- * @return the Subsystem holding this file.
- */
- public IRemoteFileSubSystem getParentRemoteFileSubSystem();
-
- /**
- * Return the separator character for this file system: \ or /.
- * Queries it from the subsystem factory.
- *
- * @return the separator character for this file system.
- */
- public char getSeparatorChar();
-
- /**
- * Return the separator character for this file system, as a string: "\" or "/".
- * Queries it from the subsystem factory.
- *
- * @return the separator character for this file system as a String.
- */
-
- 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.
- * @since 3.0 renamed getSystemConnection() to getHost()
- */
- public IHost getHost();
-
- /**
- * Return the parent remote file object expanded to get this object,
- * or <code>null</code> if no such parent exists.
- *
- * @return the parent remote file object or <code>null</code>.
- */
- 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.
- *
- * @return the fully qualified path for uniquely addressing this file
- * on the remote host. Never returns <code>null</code>.
- */
- 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 "symbolic link(....):resolvedPath".
- * The resolvedPath is the path that the link resolves to.
- * A symbolic link that resolves to an executable would appear as
- * "symbolic link(executable(...)):resolvedPath".
- * By default this should just return "file" or "directory".
- * @return the classification, or "unknown", or <code>null</code> if not classifiable.
- */
- 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();
-
- /**
- * Returns the encoding of the remote file.
- * @return the encoding of the remote file.
- * @since 2.0
- */
- public String getEncoding();
-
- /**
- * Returns the permissions for this file if they exist
- * @return the permissions
- * @since 3.0
- */
- public IHostFilePermissions getPermissions();
-
-}
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 fd044a0db..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileExceptionMessages.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.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"; //$NON-NLS-1$
- public static final String FILEMSG_SECURITY_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_FILE_NOTFOUND = "RSEF1005"; //$NON-NLS-1$
-}
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 1e8e8725c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
+++ /dev/null
@@ -1,702 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
- * Kevin Doyle (IBM) - [208778] new API getOutputSteam for getting an output stream in append mode
- * David McKnight (IBM) - [209704] added supportsEncodingConversion()
- * Martin Oberhuber (Wind River) - [226574][api] Add ISubSystemConfiguration#supportsEncoding()
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- * Martin Oberhuber (Wind River) - [234026] Clarify IFileService#createFolder() Javadocs
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetAddress;
-
-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.files.IFileService;
-import org.eclipse.rse.services.files.RemoteFileException;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.subsystems.files.core.ILanguageUtilityFactory;
-
-
-//
-/**
- * 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.
- */
-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 and/or files in the given folders. This list is not filtered.
- *
- * @param parents The parent folders to list folders and/or files in
- * @param fileTypes - indicates whether to query files, folders, both or some other type. There
- * should be exactly one fileType specified per parent.
- * For the default list of available file types see <code>IFileServiceContants</code>
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote folders and/or files in the given folder. Only file names are filtered
- * by the given file name filters. It can be null for no sub-setting.
- *
- * @param parents The parent folders to list folders and files in
- * @param fileNameFilters The name patterns to subset the file list by, or null to return all files.
- * There should be exactly one fileNameFilter per parent.
- * @param fileTypes - indicates whether to query files, folders, both or some other type. There
- * should be exactly one fileType specified per parent.
- * For the default list of available file types see <code>IFileServiceContants</code>
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of all remote folders and/or files in the given folders. This list is not filtered.
- *
- * @param parents The parent folders to list folders and/or files in
- * @param fileType - indicates whether to query files, folders, both or some other type. This fileType is used for each parent query.
- * For the default list of available file types see <code>IFileServiceContants</code>
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, int fileType, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote folders and/or files in the given folder. Only file names are filtered
- * by the given file name filters. It can be null for no sub-setting.
- *
- * @param parents The parent folders to list folders and files in
- * @param fileNameFilters The name patterns to subset the file list by, or null to return all files.
- * There should be exactly one fileNameFilter per parent.
- * @param fileType - indicates whether to query files, folders, both or some other type.
- * Available file types include {@link IFileService#FILE_TYPE_FILES},
- * {@link IFileService#FILE_TYPE_FOLDERS}, and
- * {@link IFileService#FILE_TYPE_FILES_AND_FOLDERS}.
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, String[] fileNameFilters, int fileType, IProgressMonitor monitor) throws SystemMessageException;
-
-
- /**
- * Return a list of all remote folders and/or files in the given folder. The list is not filtered.
- *
- * @param parent The parent folder to list folders and/or files in
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] list(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of all remote folders and/or files in the given folder. The list is not filtered.
- *
- * @param parent The parent folder to list folders and files in
- * @param fileType - indicates whether to query files, folders, both or some other type.
- * Available file types include {@link IFileService#FILE_TYPE_FILES},
- * {@link IFileService#FILE_TYPE_FOLDERS}, and
- * {@link IFileService#FILE_TYPE_FILES_AND_FOLDERS}.
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] list(IRemoteFile parent, int fileType, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote folders and/or files in the given folder. Only file names are filtered
- * by the given file name filter. It can be null for no filtering.
- *
- * @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 fileType - indicates whether to query files, folders, both or some other type.
- * For the default list of available file types see <code>IFileServiceContants</code>
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote folders and/or files in the given folder. The files part of the list is filtered
- * by the given file name filter. It can be null for no filtering.
- *
- * @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
- * - indicates whether to query files, folders, both or some other type
- * @param fileType - indicates whether to query files, folders, both or some other type
- * For the default list of available file types see <code>IFileServiceContants</code>
- * @param monitor the progress monitor
- * @since 3.0
-
- */
- public IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context, int fileType, 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.
- * @param monitor the progress monitor
- *
- * @return the remote file
- */
- public IRemoteFile getParentFolder(IRemoteFile folderOrFile, IProgressMonitor 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);
-
- /**
- * Returns the encoding of the remote system.
- * @return the encoding of the remote system.
- */
- public String getRemoteEncoding();
-
- /**
- * Returns the encoding of the file with the remote path.
- * @param remotePath the remote path of the file.
- * @return the encoding of the remote file.
- */
- // public String getEncoding(String remotePath);
-
- /**
- * Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it.
- * @param folderOrFileNames Fully qualified folder or file names
- * @param monitor the progress monitor
- *
- * @return the set of resources
- * @since 3.0
- */
- public IRemoteFile[] getRemoteFileObjects(String[] folderOrFileNames, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Given a fully qualified file or folder name, return an IRemoteFile
- * object for it.
- * <p>
- * This may be a long-running operation involving remote system access
- * if the file with the given key is not found in the internal cache.
- * </p>
- * @param folderOrFileName Fully qualified folder or file name.
- * @param monitor the progress monitor
- * @return the requested IRemoteFile object.
- * @throws SystemMessageException in case an error occurs contacting the
- * remote system while retrieving the requested remote object.
- */
- public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) 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
- * @param monitor the progress monitor
- *
- * @return the requested IRemoteFile object
- */
- public IRemoteFile getRemoteFileObject(IRemoteFile parent, String folderOrFileName, IProgressMonitor monitor) 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,IProgressMonitor)
- *
- * @param fileToCreate The object representing the file to be created.
- * @return The same input object returned for convenience. Will throw exception if it fails.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- */
- public IRemoteFile createFile(IRemoteFile fileToCreate, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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. If the parent
- * folder does not yet exist, implementations are free to create
- * missing parents or fail (see also {@link IFileService#createFolder(String, String, IProgressMonitor)}).</li>
- * <li>If this folder already exists, this is a no-op.</li>
- * <li>If the given object is a file, not a folder, this is a no-op.</li>
- * </ul>
- *
- * @see #createFolders(IRemoteFile, IProgressMonitor)
- *
- * @param folderToCreate The object representing the folder to be created.
- * @param monitor the progress monitor
- * @return The same input object returned for convenience. Will throw exception if it fails.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- */
- public IRemoteFile createFolder(IRemoteFile folderToCreate, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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, IProgressMonitor)
- *
- * @param folderToCreate The object representing the folder to be created, along with its parents.
- * @param monitor the progress monitor
- * @return The same input object returned for convenience. Will throw exception if it fails.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- */
- public IRemoteFile createFolders(IRemoteFile folderToCreate, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void delete(IRemoteFile folderOrFile, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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>
- * <p>
- * If an error occurs during the deletion of an item, this operation stops on that item and a {@link SystemMessageException} is thrown.
- * Items deleted before that item will remain deleted. Items specified after that item will not be deleted.
- * The item on which the error occurs will not be deleted.
- * 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
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void deleteBatch(IRemoteFile[] folderOrFiles, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void rename(IRemoteFile folderOrFile, String newName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void move(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName,IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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.
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void setLastModified(IRemoteFile folderOrFile, long newDate, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Set a files read-only permissions.
- * Folder or file must exist on disk for this to succeed.
- * @param folderOrFile represents the object to be renamed.
- * @param readOnly whether to set it to be read-only or not
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void setReadOnly(IRemoteFile folderOrFile, boolean readOnly, IProgressMonitor monitor) throws SystemMessageException;
-
-
- // ----------------------------
- // 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
- * @param monitor progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void copy(IRemoteFile sourceFolderOrFile, IRemoteFile targetFolder, String newName, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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.
- * <p>
- * If an error occurs during the copy of an item, this operation stops on that item and a {@link SystemMessageException} is thrown.
- * Items copied before that item will remain copied. Items copied after that item will not be copied.
- * The item on which the error occurs will not be copied.
- * @param sourceFolderOrFile The file or folder to copy
- * @param targetFolder The folder to copy to.
- * @param monitor progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since org.eclipse.rse.subsystems.files.core 3.0
- */
- public void copyBatch(IRemoteFile[] sourceFolderOrFile, IRemoteFile targetFolder, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Get the remote file and save it locally.
- *
- * The file is saved in the encoding specified, with two exceptions:
- * <ul>
- * <li>If the remote file is binary, encoding does not apply.</li>
- * <li>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.</li>
- * </ul>
- * @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
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- */
- public void download(IRemoteFile source, String destination, String encoding, IProgressMonitor monitor) throws SystemMessageException;
-
-
- /**
- * Get the remote files and save them locally.
- *
- * The files are saved in the encodings specified, with two exceptions:
- * <ul>
- * <li>If a remote file is binary, encoding does not apply.</li>
- * <li>If a 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.</li>
- * </ul>
- * @param sources remote files that represent the files to be obtained
- * @param destinations the absolute paths of the local files
- * @param encodings the encodings of the local files
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since 3.0
- */
- public void downloadMultiple(IRemoteFile[] sources, String[] destinations, String[] encodings, IProgressMonitor monitor) throws SystemMessageException;
-
-
-
-
- /**
- * Put the local copy of the remote file back to the remote location.
- *
- * The file is assumed to be in the encoding specified, with
- * two exceptions:
- * <ul>
- * <li>If the local file is binary, encoding does not apply.</li>
- * <li>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.</li>
- * </ul>
- * @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
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- */
- public void upload(String source, IRemoteFile destination, String encoding, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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,
- * with two exceptions:
- * <ul>
- * <li>If the local file is binary, encoding does not apply.</li>
- * <li>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.</li>
- * </ul>
- * @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.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- */
- public void upload(String source, String srcEncoding, String remotePath, String rmtEncoding, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Put the local copies of the remote files to the remote locations.
- *
- * The files are assumed to be in the encodings specified, with
- * two exceptions:
- * <ul>
- * <li>If a local files is binary, encoding does not apply.</li>
- * <li>If a local files is an XML file, then it will be copied
- * to remote in the encoding specified in the XML declaration,
- * or as determined from the XML specification.</li>
- * </ul>
- * @param sources the absolute paths of the local copies
- * @param destinations remote files that represent the files on the server
- * @param encodings the encodings of the local copies
- * @param monitor the progress monitor
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since 3.0
- */
- public void uploadMultiple(String[] sources, IRemoteFile[] destinations, String[] encodings, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Put the local copies of the remote files to the remote locations.
- *
- * The files are assumed to be in the encodings of the local operating system,
- * with two exceptions:
- * <ul>
- * <li>If a local file is binary, encoding does not apply.</li>
- * <li>If a 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.</li>
- * </ul>
- * @param sources the absolute paths of the local copies
- * @param srcEncodings the encodings of the local copies
- * @param remotePaths remote files that represents the files on the server
- * @param rmtEncodings the encodings of the remote files.
- * @throws SystemMessageException if an error occurs.
- * Typically this would be one of those in the
- * {@link RemoteFileException} family.
- * @since 3.0
- */
- public void uploadMultiple(String sources[], String[] srcEncodings, String[] remotePaths, String[] rmtEncodings, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * 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();
-
- /**
- * Gets the input stream to access the contents a remote file. Clients should close the input stream when done. Implementations should not return <code>null</code>.
- * @param remoteParent the absolute path of the parent.
- * @param remoteFile the name of the remote file.
- * @param isBinary <code>true</code> if the file is a binary file, <code>false</code> otherwise.
- * @return the input stream to access the contents of the remote file.
- * @param monitor the progress monitor.
- * @throws SystemMessageException if an error occurs.
- * @since 2.0
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Gets the output stream to write to a remote file. Clients should close the output stream when done. Implementations should not return <code>null</code>.
- * @param remoteParent the absolute path of the parent.
- * @param remoteFile the name of the remote file.
- * @param isBinary <code>true</code> if the file is a binary file, <code>false</code> otherwise.
- * @return the input stream to access the contents of the remote file.
- * @param monitor the progress monitor.
- * @throws SystemMessageException if an error occurs.
- * @since 2.0
- * @deprecated Use {@link #getOutputStream(String, String, int, IProgressMonitor)} instead
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Gets the output stream to write/append to a remote file. Clients should close the output stream when done. Implementations should not return <code>null</code>.
- * @param remoteParent the absolute path of the parent.
- * @param remoteFile the name of the remote file.
- * @param options bit wise or of option constants. Valid constants are {@link IFileService#APPEND}, {@link IFileService#TEXT_MODE}, and {@link IFileService#NONE}
- * @return the input stream to access the contents of the remote file.
- * @param monitor the progress monitor.
- * @throws SystemMessageException if an error occurs.
- * @since 3.0
- */
- public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Indicates whether this file subsystem supports code page conversion using
- * the IFileServiceCodePageConverter mechanism. Certain extensions, such as
- * property pages for encoding conversion can determine whether or not to
- * display or enable themselves based on result of this call.
- *
- * @return whether this service supports encoding conversion
- * @since 3.0
- */
- public boolean supportsEncodingConversion();
-}
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 c818cf28a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteSearchConstants.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.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;
-}
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 c3b81f11d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFile.java
+++ /dev/null
@@ -1,1230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [177523] Unify singleton getter methods
- * David McKnight (IBM) - [173518] [refresh] Read only changes are not shown in RSE until the parent folder is refreshed
- * David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect()
- * David McKnight (IBM) - [209660] use parent encoding as default, rather than system encoding
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * Martin Oberhuber (Wind River) - [219975] Fix implementations of clone()
- * David McKnight (IBM) - [231209] [api][breaking] IRemoteFile.getSystemConnection() should be changed to IRemoteFile.getHost()
- * David McKnight (IBM) - [277911] cached results of remote file query need to be sorted
- * David McKnight (IBM) - [289387] Remote Search does not return line nodes in result tree
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.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.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * 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 #RemoteFile(IRemoteFileContext)} constructor sets the parent subsystem
- * </ul>
- * A concrete implementation which extends this class, also needs to ensure
- * that information is properly set by some means such that the {@link IRemoteFile#exists()},
- * {@link IRemoteFile#getAbsolutePath()}, {@link IRemoteFile#getLength()}
- * and similar methods can be implemented.
- */
-public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
-{
- protected IRemoteFileContext _context;
-
- 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 = true;
-
- // 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
- IRemoteFileSubSystem ss = context.getParentRemoteFileSubSystem();
-
- if (Display.getCurrent() == null) {
- ss.connect(new NullProgressMonitor(), false);
- } else {
- ss.connect(false, null);
- }
- } 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 (pathOnly != null)
- {
- IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
- if (ss != null)
- {
- IProgressMonitor monitor = new NullProgressMonitor();
- try {
- char sep = getSeparatorChar();
- if (pathOnly.length() == 0)
- parentFile = ss.getRemoteFileObject(pathOnly, monitor);
- else if (pathOnly.length() == 1)
- {
- if (pathOnly.charAt(0) == sep)
- {
- parentFile = ss.getRemoteFileObject(pathOnly, monitor); // root file
- }
- }
- else if (!(pathOnly.charAt(pathOnly.length()-1)==sep))
- parentFile = ss.getRemoteFileObject(pathOnly+sep, monitor);
- else
- parentFile = ss.getRemoteFileObject(pathOnly, monitor);
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError("RemoteFileImpl.getParentRemoteFile()", e); //$NON-NLS-1$
- }
- }
- }
- 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.
- *
- * @since 3.0 renamed getSystemConnection() to getHost()
- */
- public IHost getHost()
- {
- IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
- if (ss == null)
- return null;
- else
- return ss.getHost();
- }
-
- /**
- * 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 = getHost();
- 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 RemoteFileUtility.getSystemFileTransferModeRegistry().isBinary(this);
- }
-
- /**
- * @see IRemoteFile#isText()
- */
- public boolean isText()
- {
- if (isDirectory())
- return false;
- else
- return RemoteFileUtility.getSystemFileTransferModeRegistry().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);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemContainer#hasContents(org.eclipse.rse.core.model.ISystemContentsType)
- */
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#hasContents(org.eclipse.rse.core.model.ISystemContentsType, 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemContainer#getContents(org.eclipse.rse.core.model.ISystemContentsType)
- */
- public Object[] getContents(ISystemContentsType contentsType)
- {
- return getContents(contentsType, "*"); //$NON-NLS-1$
- }
-
- private Object[] combine(Object[] set1, Object[] set2)
- {
- ArrayList result = new ArrayList(set1.length + set2.length);
-
- for (int i = 0; i < set1.length; i++)
- {
- result.add(set1[i]);
- }
-
- for (int j = 0; j < set2.length; j++)
- {
- result.add(set2[j]);
- }
-
- 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();
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#getContents(org.eclipse.rse.core.model.ISystemContentsType, java.lang.String)
- */
- public Object[] getContents(ISystemContentsType contentsType, String filter)
- {
- HashMap filters = (HashMap)(_contents.get(contentsType));
- Object[] results = null;
- 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 combine(folders, files);
- }
- }
- else if (contentsType == RemoteFileChildrenContentsType.getInstance())
- {
- if (hasContents(RemoteChildrenContentsType.getInstance()))
- {
- Object[] filesAndFolders = getContents(RemoteChildrenContentsType.getInstance());
- return filesAndFolders;
- }
- }
- else if (contentsType == RemoteFolderChildrenContentsType.getInstance())
- {
- if (hasContents(RemoteChildrenContentsType.getInstance()))
- {
- Object[] filesAndFolders = getContents(RemoteChildrenContentsType.getInstance());
- return getFolders(filesAndFolders);
- }
- }
- return null;
- }
-
- if (filter == null) {
- filter = "*"; //$NON-NLS-1$
- }
-
- if (filters.containsKey(filter)){
- Object[] filterResults = (Object[])filters.get(filter);
- results = filterResults;
- }
- else {
- 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) {
-
- IRemoteFile temp = (IRemoteFile) subContent;
-
- if (temp.isFile()) {
- String compareTo = null;
- boolean filterForFileTypes = isFilterForFileTypes(filter);
-
- if (!filterForFileTypes) {
- compareTo = temp.getName();
- }
- else {
- compareTo = temp.getExtension();
- }
-
- // match with the filter to take out those
- // that do not match the filter
- if (compareTo != null && fmatcher.stringMatches(compareTo)) {
- calculatedResults.add(subContent);
- }
- }
- else {
- calculatedResults.add(subContent);
- }
- }
- else {
- calculatedResults.add(subContent);
- }
- }
- }
- }
- }
- }
- results = calculatedResults.toArray();
- }
-
- if (!isFile()){
- try { // search results aren't comparable so we need to catch exception
- Arrays.sort(results);
- }
- catch (Exception e){
- }
- }
- return results;
- }
-
- /**
- * Returns whether filter is for file types.
- * @param filter the filter.
- * @return <code>true</code> if filter is for file types, <code>false</code> otherwise.
- */
- private boolean isFilterForFileTypes(String filter) {
-
- if (filter.endsWith(",")) { //$NON-NLS-1$
- return true;
- }
- else {
- return false;
- }
- }
-
- 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;
- }
- }
- }
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteContainer#setContents(org.eclipse.rse.core.model.ISystemContentsType, 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();
- }
- }
- }
- }
-
- if (_parentFile != null)
- {
- _parentFile.markStale(true, 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();
-
- IRemoteFileSubSystem ss1 = this.getParentRemoteFileSubSystem();
- IRemoteFileSubSystem ss2 = other.getParentRemoteFileSubSystem();
-
- String alias1 = ""; //$NON-NLS-1$
- if (ss1 != null){
- alias1 = ss1.getHostAliasName();
- }
-
- String alias2 = "";
- if (ss2 != null){
- alias2 = ss2.getHostAliasName();
- }
-
- return alias1.equals(alias2) && path.equals(otherPath);
- }
- else
- {
- return false;
- }
- }
-
- public String getHostName()
- {
- return getHost().getHostName();
- }
-
-
-
- private String getParentPathFor(String path)
- {
- boolean isUnix = getParentRemoteFileSubSystem().getParentRemoteFileSubSystemConfiguration().isUnixStyle();
-
- String separator = getSeparator();
-
- if (isUnix && path.equals(separator))
- {
- return null; // no parent of root
- }
-
- int lastSep = path.lastIndexOf(separator);
-
- if (lastSep == 0) // root is the parent (on unix)
- {
- return separator;
- }
- else if (lastSep > 0)
- {
- return path.substring(0, lastSep);
- }
- else
- {
- return null;
- }
- }
-
- /**
- * Returns the encoding of the remote file. If a user specified value does not exist, then we check
- * it's ancestry for an encoding. Otherwise the encoding of the parent subsystem is returned.
- * @see IRemoteFile#getEncoding()
- */
- public String getEncoding() {
- String hostName = getParentRemoteFileSubSystem().getHost().getHostName();
- String path = getAbsolutePath();
- String encoding = RemoteFileEncodingManager.getInstance().getEncoding(hostName, path);
-
- // ask the parent folder
- if (encoding == null) {
- if (_parentFile != null)
- {
- encoding = _parentFile.getEncoding();
- }
- else
- {
-
- // manually extra parents
- String parentPath = getParentPathFor(path);
- while (parentPath != null && encoding == null)
- {
- encoding = RemoteFileEncodingManager.getInstance().getEncoding(hostName, parentPath);
- parentPath = getParentPathFor(parentPath);
- }
-
- if (encoding == null) // no encoding found - fall back to system
- {
- encoding = getParentRemoteFileSubSystem().getRemoteEncoding();
- }
- }
- }
-
- return encoding;
- }
- /**
- * Sets the encoding of the remote file. It sets the encoding of the remote file in {@link RemoteFileEncodingManager}.
- * @param encoding the encoding to be set for the remote file.
- */
- public void setEncoding(String encoding) {
- RemoteFileEncodingManager.getInstance().setEncoding(getHostName(), getAbsolutePath(), encoding);
- }
-
- /**
- * {@inheritDoc}
- *
- * @since 3.0
- */
- public IHostFilePermissions getPermissions() {
- IHostFile hostFile = getHostFile();
- if (hostFile instanceof IHostFilePermissionsContainer){
- return ((IHostFilePermissionsContainer)hostFile).getPermissions();
- }
- return null;
- }
-}
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 c2d726b5f..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, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-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.ui.model.ISystemContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.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 ab1720c88..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEmpty.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-
-
-/**
- * A "dummy" node to use as a place holder
- */
-public class RemoteFileEmpty extends RemoteFile
-{
- /**
- * Constructor for RemoteFileEmpty
- */
- public RemoteFileEmpty()
- {
- super(new RemoteFileContext(null,null,null));
- }
-
- /**
- * @since 3.0
- */
- public String getAbsolutePath()
- {
- return ""; //$NON-NLS-1$
- }
-
-
- public String getName()
- {
- return "dummy"; //$NON-NLS-1$
- }
-
-
- 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;
- }
-
- /**
- * Override this to provide permissions
- */
- public IHostFilePermissions getPermissions() {
- return null;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEncodingManager.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEncodingManager.java
deleted file mode 100644
index 470c2ccf2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileEncodingManager.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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:
- * Kushal Munir IBM - Initial creation of this file.
- * David McKnight (IBM) [209660] delete encoding mapping when null is specified
- * David McKnight (IBM) - [244041] [files] Renaming a file looses Encoding property
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-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.util.HashMap;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * This singleton class manages encodings of remote files.
- */
-public class RemoteFileEncodingManager {
-
- private static RemoteFileEncodingManager instance;
- private static final String ENCODINGS_DIR = "encodings"; //$NON-NLS-1$
- private static final String ENCODINGS_PROPERTIES_FILE = "encodings.properties"; //$NON-NLS-1$
- private boolean isLoaded;
- private HashMap hostMap;
-
- /**
- * Constructor for the manager.
- */
- private RemoteFileEncodingManager() {
- init();
- }
-
- /**
- * Initializes the manager.
- */
- private void init() {
- isLoaded = false;
- hostMap = new HashMap();
- }
-
- /**
- * Returns the singleton instance.
- * @return the singleton instance.
- */
- public static final RemoteFileEncodingManager getInstance() {
-
- if (instance == null) {
- instance = new RemoteFileEncodingManager();
- }
-
- return instance;
- }
-
- /**
- * Returns the encoding for a file with the given path on a system with the given hostname.
- * @param hostname the hostname of the system.
- * @param remotePath the remote path of the file on the system.
- * @return the encoding.
- */
- public String getEncoding(String hostname, String remotePath) {
-
- // if the encodings have not been loaded from disk, load them now
- if (!isLoaded) {
- load();
- }
-
- // check to see load was successful
- if (isLoaded) {
-
- Properties props = (Properties)(hostMap.get(hostname));
-
- // if no value exists for the hostname key, then return null
- if (props == null) {
- return null;
- }
- // otherwise, check the properties
- // will return null if the remote path is not a property key
- else {
- String encoding = props.getProperty(remotePath);
- return encoding;
- }
- }
- // if loading was not successful, return null
- else {
- return null;
- }
- }
-
- /**
- * Sets the encoding for a file with the given path on a system with the given hostname.
- * @param hostname the hostname of the system.
- * @param remotePath the remote path of the file on the system.
- * @param encoding the encoding to set.
- */
- public void setEncoding(String hostname, String remotePath, String encoding) {
-
- // if the encodings have not been loaded from disk, load them now
- if (!isLoaded) {
- load();
- }
-
- // check to see whether load was successful
- if (isLoaded) {
-
- Properties props = null;
-
- if (hostMap.containsKey(hostname)) {
- props = (Properties)(hostMap.get(hostname));
- }
- else if (encoding != null)
- {
- props = new Properties();
- }
-
- if (props != null)
- {
- if (encoding == null)
- {
- props.remove(remotePath);
- }
- else
- {
- props.setProperty(remotePath, encoding);
- hostMap.put(hostname, props);
- }
- save(); // this wasn't being saved persistently before
- }
- }
- }
-
- /**
- * Loads the encoding data from disk.
- */
- public void load() {
-
- if (!isLoaded) {
-
- IPath encodingsLocation = getEncodingLocation();
- File file = encodingsLocation.toFile();
-
- // if the encodings settings location exists
- if (file.exists() && file.isDirectory()) {
-
- // get a list of all the directory hostnames
- File[] hosts = file.listFiles();
-
- // go through each hostname dir
- for (int i = 0; i < hosts.length; i++) {
-
- // do a check to ensure it indeed is a dir
- if (hosts[i].exists() && hosts[i].isDirectory()) {
-
- // check if encodings.properties file exists in the dir
- IPath encodingsFilePath = new Path(hosts[i].getAbsolutePath());
-
- if (!encodingsFilePath.hasTrailingSeparator()) {
- encodingsFilePath.addTrailingSeparator();
- }
-
- encodingsFilePath = encodingsFilePath.append(ENCODINGS_PROPERTIES_FILE);
- encodingsFilePath = encodingsFilePath.makeAbsolute();
-
- File encodingsFile = encodingsFilePath.toFile();
-
- if (!encodingsFile.exists()) {
- continue;
- }
- else {
- Properties props = new Properties();
- InputStream inputStream = null;
-
- try {
- inputStream = new FileInputStream(encodingsFile);
- props.load(inputStream);
- hostMap.put(hosts[i].getName(), props);
- }
- catch (FileNotFoundException e) {
- RSEUIPlugin.logError("File " + encodingsFilePath.toOSString() + " could not be found", e); //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
- catch (IOException e) {
- RSEUIPlugin.logError("I/O problems reading file " + encodingsFilePath.toOSString(), e); //$NON-NLS-1$
- continue;
- }
- }
- }
- }
- }
-
- isLoaded = true;
- }
- }
-
- /**
- * Saves the encoding data to disk.
- */
- public void save() {
-
- Set hosts = hostMap.keySet();
-
- // if there are hosts in the hashmap
- if (hosts != null && !hosts.isEmpty()) {
-
- // get the location for encoding settings
- IPath encodingsLocation = getEncodingLocation();
- File file = encodingsLocation.toFile();
-
- // create the location if it does not exist
- if (!file.exists()) {
- file.mkdirs();
- }
-
- // if the location now exists
- if (file.exists() && file.isDirectory()) {
-
- Iterator iter = hosts.iterator();
-
- while (iter.hasNext()) {
- String hostname = (String)(iter.next());
-
- IPath hostDirPath = new Path(encodingsLocation.toOSString());
-
- if (!hostDirPath.hasTrailingSeparator()) {
- hostDirPath.addTrailingSeparator();
- }
-
- hostDirPath = hostDirPath.append(hostname);
- hostDirPath.makeAbsolute();
-
- File hostDir = hostDirPath.toFile();
-
- Properties props = (Properties)(hostMap.get(hostname));
-
- if (props != null && !props.isEmpty()) {
-
- if (!hostDir.exists()) {
- hostDir.mkdirs();
- }
-
- if (hostDir.exists() && hostDir.isDirectory()) {
-
- IPath encodingsFilePath = new Path(hostDirPath.toOSString());
- encodingsFilePath = encodingsFilePath.append(ENCODINGS_PROPERTIES_FILE);
- encodingsFilePath = encodingsFilePath.makeAbsolute();
-
- File encodingsFile = encodingsFilePath.toFile();
-
- if (!encodingsFile.exists()) {
- boolean created = false;
-
- try {
- created = encodingsFile.createNewFile();
- }
- catch (IOException e) {
- RSEUIPlugin.logError("I/O error when trying to create encodings file " + encodingsFilePath.toOSString(), e); //$NON-NLS-1$
- created = false;
- }
-
- if (!created) {
- continue;
- }
- }
-
- OutputStream outStream = null;
-
- try {
- outStream = new FileOutputStream(encodingsFile);
- props.store(outStream, null);
- }
- catch (FileNotFoundException e) {
- RSEUIPlugin.logError("File " + encodingsFilePath + " could not be found", e); //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
- catch (IOException e) {
- RSEUIPlugin.logError("I/O problems writing to file " + encodingsFilePath, e); //$NON-NLS-1$
- continue;
- }
- }
- }
- // no properties for hostname, so remove the dir corresponding to the hostname if it exists
- else {
-
- if (hostDir.exists()) {
- hostDir.delete();
- }
- }
- }
- }
- }
- }
-
- /**
- * Returns the absolute path of the location that contains the encoding settings.
- * @return the absolute path of the location that contains encoding settings.
- */
- private IPath getEncodingLocation() {
- IPath location = RSEUIPlugin.getDefault().getStateLocation();
- location = location.append(ENCODINGS_DIR);
- location = location.makeAbsolute();
- return location;
- }
-}
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 49ccd71bd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileRoot.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.files.IHostFilePermissions;
-
-/**
- * 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));
- setRootFile(rootFile);
- }
-
- /**
- * Constructor when root is not known.
- * Client must call {@link #setRootFile(IRemoteFile)} before any
- * get.. calls in this class are actually used.
- */
- 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"; //$NON-NLS-1$
- }
-
- 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()
- {
- return rootFile.getAbsolutePath();
- }
- public String getParentName()
- {
- // TODO Auto-generated method stub
- return null;
- }
- public boolean isRoot()
- {
- return true;
- }
- public boolean isDirectory()
- {
- return true;
- }
- public boolean isFile()
- {
- return false;
- }
-
- public boolean isHidden()
- {
- return false;
- }
-
- public boolean canRead()
- {
- return rootFile.canRead();
- }
-
- public boolean canWrite()
- {
- return rootFile.canWrite();
- }
-
- public boolean exists()
- {
- return rootFile.exists();
- }
-
- public long getLastModified()
- {
- return rootFile.getLastModified();
- }
-
- public long getLength()
- {
- return rootFile.getLength();
- }
-
- public boolean showReadOnlyProperty()
- {
- return rootFile.showReadOnlyProperty();
- }
-
- public String getClassification()
- {
- return rootFile.getClassification();
- }
-
- /**
- * @since 3.0
- */
- public String getAbsolutePath()
- {
- return rootFile.getAbsolutePath();
- }
-
- public String getCanonicalPath()
- {
- return rootFile.getCanonicalPath();
- }
-
- public IHostFile getHostFile()
- {
- return rootFile.getHostFile();
- }
-
- /**
- * Override this to provide permissions
- */
- public IHostFilePermissions getPermissions() {
- return rootFile.getPermissions();
- }
-}
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 fdbe88d0c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSchedulingRule.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.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.getHost().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 c8d253897..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
+++ /dev/null
@@ -1,1495 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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()
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [196664] prevent unnecessary query on the parent
- * Rupen Mardirossian (IBM) - [204307] listFolders now deals with a null parameter for fileNameFilter preventing NPE
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * David McKnight (IBM) - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * Martin Oberhuber (Wind River) - [226574][api] Add ISubSystemConfiguration#supportsEncoding()
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-
-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.IOException;
-import java.io.InputStreamReader;
-import java.lang.reflect.InvocationTargetException;
-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.Vector;
-
-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.Platform;
-import org.eclipse.osgi.util.NLS;
-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.internal.subsystems.files.core.Activator;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFileMessageIds;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-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.SimpleSystemMessage;
-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.search.IHostSearchResult;
-import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 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
-{
- 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 retrieval
- protected HashMap _cachedRemoteFiles = new HashMap();
-
- /**
- * 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;
- }
-
-
- 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("*")) { //$NON-NLS-1$
- 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(".") && !isOffline()) //$NON-NLS-1$
- {
- try
- {
- container = getRemoteFileObject(container, new NullProgressMonitor()).getAbsolutePath();
- }
- catch (Exception e)
- {
-
- }
- //return true;
- }
-
- // DKM - if the filter and the remote object are the same
- if (container.equals(remoteObjectAbsoluteName))
- 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(String, IProgressMonitor)}.
- * 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).
- * @param filterStrings array of filter patterns for objects to return.
- * @param monitor the progress monitor we are running under
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterStrings(java.lang.String[], org.eclipse.core.runtime.IProgressMonitor)
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
- 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!"); //$NON-NLS-1$
- System.out.println("connection == "+getHostAliasName()); //$NON-NLS-1$
- return null;
- }
-
- // TODO - change this to use listMulti to be more efficient
- for (int idx=0; idx<filterStrings.length; idx++)
- {
- if (monitor != null)
- {
- monitor.setTaskName(getResolvingMessage(filterStrings[idx]));
- }
-
- children = internalResolveFilterString(filterStrings[idx], monitor);
-
- 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]);
- }
- }
-
-
- private String fixFilterString(IRemoteFileSubSystemConfiguration rfssf, String filterString)
- {
- boolean windows = !rfssf.isUnixStyle();
-
- 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);
- }
-
- return filterString;
- }
-
- /**
- * 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(String,IProgressMonitor)
- */
- protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
- IRemoteFileSubSystemConfiguration rfssf = getParentRemoteFileSubSystemConfiguration();
- filterString = fixFilterString(rfssf, filterString);
-
- RemoteFileFilterString fs = new RemoteFileFilterString(rfssf, filterString);
- currFilterString = fs;
-
- if (fs.listRoots())
- return listRoots(new RemoteFileContext(this, null, fs), monitor);
- else
- {
- boolean showDirs = fs.getShowSubDirs();
- boolean showFiles = fs.getShowFiles();
- String path = fs.getPath();
- boolean windows = !rfssf.isUnixStyle();
-
- if (windows && (path != null) && !path.endsWith(rfssf.getSeparator()))
- path = path + rfssf.getSeparatorChar();
-
- String filter = fs.getFileOrTypes();
- IRemoteFile parent = null;
- try
- {
- parent = getRemoteFileObject(path, monitor);
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("RemoteFileSubSystemImpl.logError()", e); //$NON-NLS-1$
- }
-
- 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)
- {
- // has everything
- }
- else if (hasFileContents)
- {
- // already have the files, now add the folders
- list(parent, filter, IFileService.FILE_TYPE_FOLDERS, monitor);
- }
- else if (hasFolderContents)
- {
- // already have the folders, now add the files
- list(parent, filter, IFileService.FILE_TYPE_FILES, monitor);
- }
- else
- {
- // don't have anything - query both
- list(parent, filter, IFileService.FILE_TYPE_FILES_AND_FOLDERS, monitor);
- }
- children = parent.getContents(RemoteChildrenContentsType.getInstance(), filter);
- }
- else if (showDirs)
- {
- if (hasFolderContents)
- {
- children = parent.getContents(RemoteFolderChildrenContentsType.getInstance(), filter);
- }
- else
- {
- children = list(parent, filter, IFileService.FILE_TYPE_FOLDERS, monitor);
- }
- }
- else
- {
- if (hasFileContents)
- {
- children = parent.getContents(RemoteFileChildrenContentsType.getInstance(), filter);
- }
- else
- {
- children = list(parent, filter, IFileService.FILE_TYPE_FILES, monitor);
- }
- }
- }
- // otherwise return message saying parent could not be found
- else if (parent != null && !parentExists) {
- children = new SystemMessageObject[1];
- String msgTxt = NLS.bind(SystemFileResources.FILEMSG_FILE_NOTFOUND, parent.getAbsolutePath());
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.FILEMSG_FILE_NOTFOUND,
- IStatus.ERROR, msgTxt);
- 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(Object parent, String filterString, IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
- {
- 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(parent, fs, onlyOne, monitor);
- if (!onlyOne && (children != null))
- {
- addResolvedFilterStringObjects(vChildren, children, allStrings, idx);
- }
- }
- if (!onlyOne && vChildren != null)
- {
- 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);
- }
- return internalResolveOneFilterString(parent, fs, true, monitor);
- }
-
- 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(Object parent, RemoteFileFilterString fs, boolean sort, IProgressMonitor monitor)
- throws InvocationTargetException, 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 = list((IRemoteFile) parent, filterString, IFileService.FILE_TYPE_FILES_AND_FOLDERS, monitor);
- else if (showDirs)
- children = list((IRemoteFile) parent, filterString, IFileService.FILE_TYPE_FILES_AND_FOLDERS, monitor);
- else
- children = list((IRemoteFile) parent, filterString, IFileService.FILE_TYPE_FILES, 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 and files in the given folder. The
- * list is not subsetted.
- *
- * @param parents The parent folders to list folders and files in
- * @param fileTypes - indicates whether to query files, folders, both or
- * some other type
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException
- {
- String[] fileNameFilters = new String[parents.length];
- for (int i = 0; i < parents.length; i++)
- {
- fileNameFilters[i] = "*"; // default filter //$NON-NLS-1$
- }
-
- return listMultiple(parents, fileNameFilters, fileTypes, monitor);
- }
-
- /**
- * Return a list of all remote folders and files in the given folder. The
- * list is not subsetted.
- *
- * @param parents The parent folders to list folders and files in
- * @param fileType - indicates whether to query files, folders, both or some
- * other type
- * @param monitor the progress monitor
- * @since 3.0
- */
- public IRemoteFile[] listMultiple(IRemoteFile[] parents, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- String[] fileNameFilters = new String[parents.length];
- for (int i = 0; i < parents.length; i++)
- {
- fileNameFilters[i] = "*"; // default filter //$NON-NLS-1$
- }
-
- return listMultiple(parents, fileNameFilters, fileType, 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
- * @param monitor the progress monitor
- * @since 3.0 renamed from listFoldersAndFiles()
- */
- public IRemoteFile[] list(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
- {
- return list(parent, IFileService.FILE_TYPE_FILES_AND_FOLDERS, 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
- * @param fileType the type of file
- * @param monitor the monitor
- * @since 3.0 using int fileType parameter
- */
- public IRemoteFile[] list(IRemoteFile parent, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- return list(parent, (String) null, fileType, 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.
- * @param fileType the type of file
- * @param monitor the monitor
- * @since 3.0 using int fileType parameter
- */
- public IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException
- {
- String path = parent.getAbsolutePath();
- fileNameFilter = (fileNameFilter == null) ? "*" : fileNameFilter; //$NON-NLS-1$
- IRemoteFileSubSystemConfiguration config = getParentRemoteFileSubSystemConfiguration();
- RemoteFileFilterString filterString = new RemoteFileFilterString(config, path, fileNameFilter);
- filterString.setShowFiles(true);
- filterString.setShowSubDirs(true);
- RemoteFileContext context = new RemoteFileContext(this, parent, filterString);
- return list(parent, fileNameFilter, context, fileType, 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, new NullProgressMonitor());
-
- 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;
- }
- }
-
- /**
- * Given a set of fully qualified file or folder names, return an
- * ISystemResourceSet object for it. <b>Overrideable</b> Override this
- * method to provide optimized implementation
- *
- * @param folderOrFileNames Fully qualified folder or file names
- * @since 3.0
- */
- public IRemoteFile[] getRemoteFileObjects(String[] folderOrFileNames, IProgressMonitor monitor) throws SystemMessageException
- {
- IRemoteFile[] results = new IRemoteFile[folderOrFileNames.length];
- for (int i = 0; i < folderOrFileNames.length; i++)
- {
- String path = folderOrFileNames[i];
- results[i] = getRemoteFileObject(path, monitor);
- }
- return results;
- }
-
-
-
- /**
- * 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().
- *
- * @see SubSystem#getObjectWithAbsoluteName(String, IProgressMonitor)
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception
- {
- Object filterRef = super.getObjectWithAbsoluteName(key, monitor);
- 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) < 0) {
-
- IRemoteFile remoteFile = getRemoteFileObject(key, monitor);
-
- 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 fileNameFilter 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)
- {
- 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;
- }
-
- /**
- * 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); //$NON-NLS-1$
- 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); //$NON-NLS-1$ //$NON-NLS-2$
- }
- 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); //$NON-NLS-1$
- 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); //$NON-NLS-1$
- 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
-
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException
- {
- super.initializeSubSystem(monitor);
- // load UI plugin for adapters right after successful connect
- Platform.getAdapterManager().loadAdapter(new RemoteFileEmpty(), "org.eclipse.rse.ui.view.ISystemViewElementAdapter"); //$NON-NLS-1$
- getConnectorService().addCommunicationsListener(this);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().removeCommunicationsListener(this);
- super.uninitializeSubSystem(monitor);
- }
-
- /**
- * 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 instanceof RemoteFile) {
- RemoteFile roldFile = (RemoteFile)oldFile;
- if (roldFile._parentFile != null) // prevent parent query from bug #196664
- {
- roldFile._parentFile.replaceContent(oldFile, file);
- }
- }
- else if (oldFile != null && oldFile.getParentRemoteFile() != null) {
- oldFile.getParentRemoteFile().replaceContent(oldFile, file);
- }
-
- // preserve persistent information from old file to new
- if (oldFile != null)
- 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
- //ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- //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;
- }
-
- /**
- * 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); //$NON-NLS-1$
- }
-
- // 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(), new NullProgressMonitor());
- }
- catch (Exception e)
- {
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- * @deprecated Do not call this method directly since it is not implemented.
- */
- public void cancelSearch(IHostSearchResultConfiguration searchConfig)
- {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * Returns the local platform encoding if the default encoding of the host was not set.
- * Subclasses should override to return the actual remote encoding.
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#getRemoteEncoding()
- */
- public String getRemoteEncoding() {
- IHost host = getHost();
-
- // get the encoding from the host that was not by the remote system
- String encoding = host.getDefaultEncoding(false);
-
- // get the encoding from the host that was set by querying a remote system
- // this allows us to pick up the host encoding that may have been set by another subsystem
- if (encoding == null) {
- encoding = host.getDefaultEncoding(true);
- }
-
- if (encoding != null) {
- return encoding;
- }
- else {
- return SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
- }
- }
-}
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 be0aa9cb8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * David Dykstal (IBM) - [197036] fixed NPE found during testing
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.subsystems;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.rse.core.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.ISubSystemConfigurator;
-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.internal.core.SystemResourceConstants;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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;
- }
-
- /**
- * 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...
- // --------------------------------------------
-
- /**
- * 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;
- }
-
- /**
- * Return true if you support user-defined/managed named file types
- * <p>We return true
- */
- public boolean supportsFileTypes()
- {
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#renameSubSystemProfile(java.lang.String, java.lang.String)
- */
- public void renameSubSystemProfile(String oldProfileName, String newProfileName)
- {
- super.renameSubSystemProfile(oldProfileName, newProfileName);
-
- // change all IFile properties in remote systems temp files tree
- IProject project = SystemBasePlugin.getWorkspaceRoot().getProject(SystemResourceConstants.RESOURCE_TEMPFILES_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("."); //$NON-NLS-1$
- String theRest = absoluteSubSystemName.substring(profileDelim, absoluteSubSystemName.length());
- properties.setRemoteFileSubSystem(newName + theRest);
- }
- }
- else if (resource instanceof IFolder)
- {
- recursivelyUpdateIFileProperties(newName, (IFolder)resource);
- }
- }
- }
- catch (Exception e)
- {
- }
- }
-
- // -------------------------------------------------------
- // 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
- // -----------------------------------------------------
- String poolName = getDefaultFilterPoolName(mgr.getName(), getId());
- pool = mgr.createSystemFilterPool(poolName, 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 (pool != null && isUserPrivateProfile(mgr))
- {
-
-
- // ----------------------
- // "My Home" filter...
- // ----------------------
- RemoteFileFilterString myHomeFilterString = new RemoteFileFilterString(this);
- myHomeFilterString.setPath(getSeparator());
- String[] filterStrings = new String[] {"./*"}; //$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...
- // ----------------------
- RemoteFileFilterString rootFilesFilterString = new RemoteFileFilterString(this);
- rootFilesFilterString.setPath(getSeparator());
- filterStrings = new String[] {rootFilesFilterString.toString()};
- mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_ROOTFILES,filterStrings);
- }
- else
- {
- // create an "All"
- // need at least some kind of filter predefined for any given profile
- // ----------------------
- // "Root Files" filter...
- // ----------------------
- RemoteFileFilterString rootFilesFilterString = new RemoteFileFilterString(this);
- rootFilesFilterString.setPath(getSeparator());
- String[] filterStrings = new String[] {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); //$NON-NLS-1$
- }
- 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.
- */
- protected void initializeSubSystem(ISubSystem ss, ISubSystemConfigurator[] configurators)
- {
- super.initializeSubSystem(ss, configurators); // 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;
- }
-
-}
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 7cc37b4e3..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, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-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.ui.model.ISystemContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.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 93981fdb7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteSearchResultConfiguration.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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.IHostSearchConstants;
-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 string the search string.
- */
- public RemoteSearchResultConfiguration(IHostSearchResultSet resultSet, Object searchObject, SystemSearchString string) {
- results = new Vector();
- setParentResultSet(resultSet);
- setSearchTarget(searchObject);
- setSearchString(string);
- setStatus(IHostSearchConstants.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() != IHostSearchConstants.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;
- }
-}
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 575b4dc50..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, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-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.ui.model.ISystemContentsType#getType()
- */
- public String getType()
- {
- return CONTENTS_TYPE_SEARCH_RESULTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.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 1f136a6ae..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [cleanup] fix javadoc.
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-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.core.runtime.IStatus;
-import org.eclipse.rse.internal.subsystems.files.core.Activator;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFileMessageIds;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.services.clientserver.NamePatternMatcher;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
-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(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.MSG_VALIDATE_NAME_EMPTY,
- IStatus.ERROR, SystemFileResources.MSG_VALIDATE_NAME_EMPTY, SystemFileResources.MSG_VALIDATE_NAME_EMPTY_DETAILS),
- new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE,
- IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE),
- new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID,
- IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID));
- isFileName = isFolderName = true;
- }
-
- /**
- * 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;
- }
-
- /**
- * 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"; //$NON-NLS-1$
- }
-
-
-}
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 0a23e16ac..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.core.util;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.subsystems.files.core.Activator;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFileMessageIds;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.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(new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.MSG_VALIDATE_NAME_EMPTY,
- IStatus.ERROR,
- SystemFileResources.MSG_VALIDATE_NAME_EMPTY, SystemFileResources.MSG_VALIDATE_NAME_EMPTY_DETAILS),
- new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.MSG_VALIDATE_NAME_NOTUNIQUE,
- IStatus.ERROR,
- SystemFileResources.MSG_VALIDATE_NAME_NOTUNIQUE, SystemFileResources.MSG_VALIDATE_NAME_NOTUNIQUE_DETAILS),
- isFolder ? new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE,
- IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE) :
- new SimpleSystemMessage(Activator.PLUGIN_ID,
- ISystemFileMessageIds.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID,
- IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID));
-
- try
- {
- IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().list(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"; //$NON-NLS-1$
- }
-}
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 b7464f3ca..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.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.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 b377fa6b4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 bc8dfa4b5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/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.files.dstore;singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.files.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.connectorservice.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.extra;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.files.dstore;x-internal:=true,
- org.eclipse.rse.subsystems.files.dstore
-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 d4cc693f9..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 5, 2007</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 b3c717ec9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 2d49dd129..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Files
-providerName = Eclipse.org - DSDP
-
-Files=Files
-FilesDescription=This configuration allows you to work with files on local or remote systems using the DataStore protocol.
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 5aecf1734..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/plugin.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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 Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="files"
- class="org.eclipse.rse.subsystems.files.dstore.DStoreFileSubSystemConfiguration"
- description="%FilesDescription"
- icon="icons/full/obj16/systemfiles_obj.gif"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- id="dstore.files"
- name="%Files"
- priority="100"
- serviceType="_dstore-files._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
- vendor="%providerName">
- </configuration>
-
- <configuration
- category="files"
- class="org.eclipse.rse.subsystems.files.dstore.DStoreWindowsFileSubSystemConfiguration"
- description="%FilesDescription"
- icon="icons/full/obj16/systemfiles_obj.gif"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- id="dstore.windows.files"
- name="%Files"
- priority="100"
- serviceType="_dstore-files-w._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.windows"
- vendor="%providerName">
- </configuration>
-
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/Activator.java
deleted file mode 100644
index 74a059e79..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/Activator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519][api] declaratively register adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.dstore;
-
-import org.eclipse.rse.ui.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);
- }
-
- /**
- * 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/internal/subsystems/files/dstore/DStoreFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java
deleted file mode 100644
index a5be2a6d7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFile.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [234726] Update IRemoteFile Javadocs
- * David McKnight (IBM) - [246897] Wrong canonical path for a symbolic link
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.dstore;
-
-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.internal.services.dstore.files.DStoreFileService;
-import org.eclipse.rse.internal.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-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;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-public class DStoreFile extends AbstractRemoteFile
-{
-
- private DStoreFileService getDStoreFileService()
- {
- FileServiceSubSystem ss = (FileServiceSubSystem)_context.getParentRemoteFileSubSystem();
- return (DStoreFileService)ss.getFileService();
- }
-
- public IRemoteFile getParentRemoteFile()
- {
- // because this can get called by eclipse from the main thread, and dstore can have problems with main-thread queries,
- // this is overridden to provide a parent without doing the actual query
- if (this._parentFile == null)
- {
- if (isRoot())
- {
- return null;
- }
-
- IRemoteFile parentFile = null;
-
- String pathOnly = getParentPath();
- if (pathOnly != null)
- {
- DStoreFileService fileService = getDStoreFileService();
- IRemoteFileSubSystem ss = _context.getParentRemoteFileSubSystem();
- if (ss != null)
- {
-
- try {
- char sep = getSeparatorChar();
- if (pathOnly.length() == 0)
- {
- return null;
- }
- else if (pathOnly.equals(getAbsolutePath()))
- {
- return null;
- }
- else if (pathOnly.length() == 1)
- {
- // parentFile is already null
- //parentFile = null;
-
- IHostFile hostParent = fileService.getHostFile(pathOnly);
- if (hostParent == null)
- {
- DataStore ds = _dstoreHostFile.getDataElement().getDataStore();
- DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, ""); //$NON-NLS-1$
- element.setAttribute(DE.A_VALUE, pathOnly);
-
- hostParent = new DStoreHostFile(element);
- }
- parentFile = new DStoreFile((FileServiceSubSystem)ss, _context, (IRemoteFile)null, (DStoreHostFile)hostParent);
- }
- else if (!(pathOnly.charAt(pathOnly.length()-1)==sep))
- {
- DataStore ds = _dstoreHostFile.getDataElement().getDataStore();
-
- IHostFile hostParent = fileService.getHostFile(pathOnly);
- if (hostParent == null)
- {
- int nameSep = pathOnly.lastIndexOf(sep);
- String parentName = pathOnly;
- String parentPath = pathOnly;
- if (nameSep > 0)
- {
- parentName = pathOnly.substring(nameSep + 1);
- parentPath = pathOnly.substring(0, nameSep);
- if (parentPath.endsWith(":")) //$NON-NLS-1$
- {
- parentPath = parentPath + sep;
- }
- }
- else
- {
- parentName = pathOnly.substring(nameSep + 1);
- parentPath = "" + sep; //$NON-NLS-1$
- }
-
- DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, parentName);
- element.setAttribute(DE.A_VALUE, parentPath);
-
- hostParent = new DStoreHostFile(element);
- }
- parentFile = new DStoreFile((FileServiceSubSystem)ss, _context, (IRemoteFile)null, (DStoreHostFile)hostParent);
- //parentFile = ss.getRemoteFileObject(pathOnly+sep);
- }
- else
- {
- DataStore ds = _dstoreHostFile.getDataElement().getDataStore();
-
-
- IHostFile hostParent = fileService.getHostFile(pathOnly);
- if (hostParent == null)
- {
- int nameSep = pathOnly.lastIndexOf(sep);
- String parentName = pathOnly;
- String parentPath = pathOnly;
- if (nameSep > 0)
- {
- parentName = pathOnly.substring(nameSep + 1);
- parentPath = pathOnly.substring(0, nameSep);
- if (parentPath.endsWith(":")) //$NON-NLS-1$
- {
- parentPath = parentPath + sep;
- }
- }
- else
- {
- parentName = pathOnly.substring(nameSep + 1);
- parentPath = "" + sep; //$NON-NLS-1$
- }
-
- DataElement element = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR, parentName);
- element.setAttribute(DE.A_VALUE, parentPath);
- hostParent = new DStoreHostFile(element);
- }
- parentFile = new DStoreFile((FileServiceSubSystem)ss, _context, (IRemoteFile)null, (DStoreHostFile)hostParent);
-
- //parentFile = ss.getRemoteFileObject(pathOnly);
- }
- } catch (Exception e) {
- SystemBasePlugin.logError("RemoteFileImpl.getParentRemoteFile()", e); //$NON-NLS-1$
- }
- }
- }
- else
- {
- }
- this._parentFile = parentFile;
- }
- return this._parentFile;
- }
-
- protected Object clone() throws CloneNotSupportedException {
- // TODO Auto-generated method stub
- return super.clone();
- }
-
- 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()
- {
- String classification = getClassification();
- if (classification != null && classification.startsWith("symbolic link")){ //$NON-NLS-1$
- // special path - use path in classification
- int colonIndex = classification.indexOf(":");
- String canonicalPath = classification.substring(colonIndex + 1);
- return canonicalPath;
- }
- return getAbsolutePath();
- }
-
- public String getClassification()
- {
- return _dstoreHostFile.getClassification();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileAdapter.java
deleted file mode 100644
index 0a3051301..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileAdapter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Martin Oberhuber (Wind River) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
- * David McKnight (IBM) - [244765] Invalid thread access during workbench termination
- * David McKnight (IBM) - [255699] NPE when filter string doesn't return result in FileServiceSubSystem.list
- * David McKnight (IBM) - [190805] [performance][dstore] Right-click > Disconnect on a dstore connection is slow and spawns many Jobs
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.dstore;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService;
-import org.eclipse.rse.internal.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.internal.services.dstore.files.DStoreVirtualHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-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.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-public class DStoreFileAdapter implements IHostFileToRemoteFileAdapter
-{
- private RemoteFilePropertyChangeListener _listener;
-
- private void registerFilePropertyChangeListener(FileServiceSubSystem ss)
- {
- if (_listener != null && _listener.isFinished()){
- _listener = null;
- }
- if (_listener == null)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)ss.getConnectorService();
- IWorkbench wb = PlatformUI.getWorkbench();
- if (!wb.isClosing()) {
- Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
- _listener = new RemoteFilePropertyChangeListener(shell, connectorService, connectorService.getDataStore(), ss);
- }
- }
- }
-
-
- public AbstractRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes)
- {
- registerFilePropertyChangeListener(ss);
-
- List results = new ArrayList();
-
- for (int i = 0; i < nodes.length; i++)
- {
- DStoreHostFile node = (DStoreHostFile)nodes[i];
-
- if (node != null){
- DStoreFile 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 (DStoreFile[]) results.toArray(new DStoreFile[results.size()]);
- }
-
-
- public AbstractRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node)
- {
- registerFilePropertyChangeListener(ss);
-
- DStoreFile 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java
deleted file mode 100644
index a3f88a113..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreFileSubSystemSearchResultConfiguration.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Kevin Doyle (IBM) - [190010] Added cancel() method that will call the search service to cancel
- * David McKnight (IBM) - [190010] performance improvement to use caching for dstore search
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * David McKnight (IBM) - [214378] [dstore] remote search doesn't display results sometimes
- * David McKnight (IBM) - [261644] [dstore] remote search improvements
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.dstore;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.rse.internal.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.internal.services.dstore.search.DStoreSearchResultConfiguration;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.services.search.IHostSearchConstants;
-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.IRemoteFileContext;
-import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
-import org.eclipse.swt.widgets.Display;
-
-public class DStoreFileSubSystemSearchResultConfiguration extends DStoreSearchResultConfiguration
-{
-
-
- private FileServiceSubSystem _fileSubSystem;
- private IRemoteFile _searchObject;
- private List _convertedResults;
-
- public DStoreFileSubSystemSearchResultConfiguration(IHostSearchResultSet set, Object searchObject, SystemSearchString searchString, ISearchService searchService, IHostFileToRemoteFileAdapter fileAdapter)
- {
- super(set, searchObject, searchString, searchService);
- _searchObject = (IRemoteFile)searchObject;
- _fileSubSystem = (FileServiceSubSystem)_searchObject.getParentRemoteFileSubSystem();
- _convertedResults = new ArrayList();
- }
-
- /**
- * @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)
- {
- if (results.size() > _convertedResults.size())
- {
- for (int i = _convertedResults.size(); i < results.size(); i++)
- {
- DataElement fileNode = (DataElement)results.get(i);
- if (fileNode != null && !fileNode.getType().equals("error")) //$NON-NLS-1$
- {
- try
- {
- IHostFile hostFile = new DStoreHostFile(fileNode);
- IRemoteFileContext context = _fileSubSystem.getTheDefaultContext();
- IRemoteFile remoteFile = _fileSubSystem.getHostFileToRemoteFileAdapter().convertToRemoteFile(_fileSubSystem, context, null, hostFile);
-
- 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.add(remoteFile);
- }
- catch (Exception e)
- {
- }
- }
- }
- }
- return _convertedResults.toArray(new IRemoteFile[_convertedResults.size()]);
- }
- else
- {
- return new IRemoteFile[0];
- }
-
- }
-
- public Object getSearchTarget()
- {
- try
- {
- return _fileSubSystem.getFileService().getFile(_searchObject.getParentPath(), _searchObject.getName(), null);
- }
- catch (Exception e)
- {
-
- }
- return null;
- }
-
- public void domainChanged(DomainEvent e)
- {
- if (_status.getValue().equals("done")) //$NON-NLS-1$
- {
- //setStatus(IHostSearchConstants.FINISHED); // moved to within DelayedDomainListenerRemover
- // need to wait for the results though
- DelayedDomainListenerRemover remover = new DelayedDomainListenerRemover(this, _status);
- remover.start();
- }
- else if (_status.getValue().equals("cancelled")) //$NON-NLS-1$
- {
- setStatus(IHostSearchConstants.CANCELLED);
- _status.getDataStore().getDomainNotifier().removeDomainListener(this);
- }
- OutputRefresh refresh = new OutputRefresh(this);
- Display.getDefault().asyncExec(refresh);
- }
-
- public void cancel()
- {
- if (getStatus() == IHostSearchConstants.RUNNING)
- {
- getSearchService().cancelSearch(this, new NullProgressMonitor());
- }
- }
-
- private class DelayedDomainListenerRemover extends Thread
- {
- private DStoreFileSubSystemSearchResultConfiguration _config;
- private DataElement _status;
- public DelayedDomainListenerRemover(DStoreFileSubSystemSearchResultConfiguration config, DataElement status)
- {
- _status = status;
- _config = config;
- }
-
- public void run()
- {
- try
- {
- sleep(5000);
- }
- catch (Exception e)
- {
- }
- _status.getDataStore().getDomainNotifier().removeDomainListener(_config);
- _config.setStatus(IHostSearchConstants.FINISHED);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreJavaLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreJavaLanguageUtility.java
deleted file mode 100644
index e1bc6a053..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreJavaLanguageUtility.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.dstore;
-
-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.internal.services.dstore.files.DStoreHostFile;
-import org.eclipse.rse.internal.subsystems.files.core.AbstractJavaLanguageUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * This class is the Java language utility for universal.
- */
-public class DStoreJavaLanguageUtility extends AbstractJavaLanguageUtility {
-
- /**
- * 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;
- }
-
- DataElement deObj = ((DStoreHostFile)univFile.getHostFile()).getDataElement();
-
- DataStore ds = deObj.getDataStore();
- DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), IUniversalDataStoreConstants.C_QUERY_QUALIFIED_CLASSNAME);
-
- if (queryCmd != null) {
- DataElement status = ds.synchronizedCommand(queryCmd, deObj, true);
- DataElement className = ds.find(status, DE.A_TYPE, IUniversalDataStoreConstants.TYPE_QUALIFIED_CLASSNAME, 1);
-
- if (className != null && !className.equals("null")) { //$NON-NLS-1$
- return className.getName();
- }
- else {
- SystemBasePlugin.logWarning("Qualified class name for " + remoteFile.getAbsolutePath() + " is null"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreLanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreLanguageUtilityFactory.java
deleted file mode 100644
index fa145af94..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreLanguageUtilityFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.dstore;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.internal.subsystems.files.core.AbstractLanguageUtilityFactory;
-import org.eclipse.rse.subsystems.files.core.ILanguageUtility;
-import org.eclipse.rse.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.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreSearchResult.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreSearchResult.java
deleted file mode 100644
index 0e00ee104..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreSearchResult.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.dstore;
-
-
-
-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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreVirtualFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreVirtualFile.java
deleted file mode 100644
index 249f93ed4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/DStoreVirtualFile.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.dstore;
-
-import org.eclipse.rse.internal.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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/RemoteFilePropertyChangeListener.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/RemoteFilePropertyChangeListener.java
deleted file mode 100644
index f3866f5ee..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/internal/subsystems/files/dstore/RemoteFilePropertyChangeListener.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [190805] [performance][dstore] Right-click > Disconnect on a dstore connection is slow and spawns many Jobs
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.dstore;
-
-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.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-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.core.subsystems.IConnectorService;
-import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.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.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 ISystemRegistry _registry;
-
- protected IConnectorService system;
-
- protected boolean _networkDown = false;
-
- protected HashMap _decorateJobs;
-
- protected boolean _finished = false;
-
- public class DecorateJob extends UIJob
- {
- private DataElement[] _files;
- private DStoreFile _parentFile;
- private boolean _isDone = false;
- public DecorateJob(DataElement[] 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;
- IRemoteFile[] children = new IRemoteFile[_files.length];
- try {
- for (int i = 0; i < _files.length; i++)
- {
- DataElement file = _files[i];
- StringBuffer path = new StringBuffer(file.getAttribute(DE.A_VALUE));
- path.append(_fileSubSystem.getSeparatorChar());
- path.append(file.getName());
-
- children[i] = _fileSubSystem.getRemoteFileObject(path.toString(), monitor);
- }
-
- _registry.fireEvent(new
- org.eclipse.rse.core.events.SystemResourceChangeEvent(children,
- ISystemResourceChangeEvents.EVENT_ICON_CHANGE,
- _parentFile));
- }
- catch (Exception e){}
-
- _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 = RSECorePlugin.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 != null &&
- (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);
- _finished = true;
- }
-
- public boolean isFinished()
- {
- return _finished;
- }
-
- /**
- * @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());
-
- List toUpdate = new ArrayList();
- for (int i = 0; i < children.size(); i++)
- {
-
- DataElement subject = (DataElement) children.get(i);
- String type = subject.getType();
- if (type != null &&
- (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) ||
- type.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)))
-
- {
- toUpdate.add(subject);
- }
- }
-
- if (!toUpdate.isEmpty())
- {
- DecorateJob job = getDecorateJob(parentFile);
- if (job == null)
- {
- job = new DecorateJob((DataElement[])toUpdate.toArray(new DataElement[toUpdate.size()]), parentFile);
- job.setRule(parentFile);
- putDecorateJob(parentFile, job);
- job.schedule(1000);
- }
-
- }
- }
-
- }
-
- protected DecorateJob getDecorateJob(IRemoteFile file)
- {
- return (DecorateJob)_decorateJobs.get(file);
- }
-
- protected void putDecorateJob(IRemoteFile file, DecorateJob job)
- {
- _decorateJobs.put(file, job);
- }
-
-
-
- /**
- * @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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java
deleted file mode 100644
index cd9636339..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [177523] Unify singleton getter methods
- * Kushal Munir (IBM) - [189352] Set whether file service is Unix-style system or not
- * David McKnight (IBM) - [206755] upload and download buffer should be in kbytes, not bytes
- * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
- * David McKnight (IBM) - [227406][api][dstore] need apis for getting buffer size in IDataStoreProvider
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.jface.preference.IPreferenceStore;
-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.dstore.universal.miners.IUniversalDataStoreConstants;
-import org.eclipse.rse.internal.services.dstore.files.DStoreFileService;
-import org.eclipse.rse.internal.services.dstore.search.DStoreSearchService;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.internal.subsystems.files.dstore.DStoreFileAdapter;
-import org.eclipse.rse.internal.subsystems.files.dstore.DStoreFileSubSystemSearchResultConfiguration;
-import org.eclipse.rse.internal.subsystems.files.dstore.DStoreLanguageUtilityFactory;
-import org.eclipse.rse.services.clientserver.SystemSearchString;
-import org.eclipse.rse.services.dstore.IDStoreService;
-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.ILanguageUtilityFactory;
-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.servicesubsystem.FileServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-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 subsystem. 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.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public IFileService createFileService(IHost host)
- {
- final IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- final DStoreFileService service = new DStoreFileService(connectorService, RemoteFileUtility.getSystemFileTransferModeRegistry());
- service.setIsUnixStyle(isUnixStyle());
-
- int dvalue = store.getInt(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE) * IUniversalDataStoreConstants.KB_IN_BYTES;
- if (dvalue == 0)
- dvalue = IUniversalDataStoreConstants.BUFFER_SIZE;
- service.setBufferDownloadSize(dvalue);
-
-
- int uvalue = store.getInt(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE) * IUniversalDataStoreConstants.KB_IN_BYTES;
- if (uvalue == 0)
- uvalue = IUniversalDataStoreConstants.BUFFER_SIZE;
- service.setBufferUploadSize(uvalue);
-
-
- // Listen to preference changes
- IPropertyChangeListener preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event){
- String propertyName = event.getProperty();
- if (propertyName.equals(ISystemFilePreferencesConstants.DOWNLOAD_BUFFER_SIZE)){
- int value = Integer.parseInt((String)event.getNewValue());
- service.setBufferDownloadSize(value);
- }
- else if (propertyName.equals(ISystemFilePreferencesConstants.UPLOAD_BUFFER_SIZE)){
- int value = Integer.parseInt((String)event.getNewValue());
- service.setBufferDownloadSize(value);
- }
- }
- };
-
- Preferences pstore = RSEUIPlugin.getDefault().getPluginPreferences();
- pstore.addPropertyChangeListener(preferenceListener);
-
- return service;
- }
-
- public ISearchService createSearchService(IHost host)
- {
- DStoreConnectorService connectorService = (DStoreConnectorService)getConnectorService(host);
- return new DStoreSearchService(connectorService);
- }
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreWindowsFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreWindowsFileSubSystemConfiguration.java
deleted file mode 100644
index 8bf4d98d5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/DStoreWindowsFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- * Martin Oberhuber (Wind River) - [235463][ftp][dstore] Incorrect case sensitivity reported on windows-remote
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.files.dstore;
-
-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.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-public class DStoreWindowsFileSubSystemConfiguration extends DStoreFileSubSystemConfiguration
-{
-
- public DStoreWindowsFileSubSystemConfiguration() {
- super();
- _isWindows = true;
- setIsUnixStyle(!_isWindows);
- }
-
- 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); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return null;
- }
- if (isUserPrivateProfile(mgr))
- {
-
- // ----------------------
- // "My Home" filter...
- // ----------------------
- String[] filterStrings = new String[] {".\\*"}; //$NON-NLS-1$
- RemoteFileFilterString myHomeFilterString = new RemoteFileFilterString(this);
- myHomeFilterString.setPath(getSeparator());
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemFileResources.RESID_FILTER_MYHOME,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
-
- RemoteFileFilterString defaultFilterString = new RemoteFileFilterString(this);
- filterStrings = new String[] {defaultFilterString.toString()};
- String filterName = SystemFileResources.RESID_FILTER_DRIVES;
-
- mgr.createSystemFilter(pool, filterName, filterStrings);
- }
- else
- {
- RemoteFileFilterString defaultFilterString = new RemoteFileFilterString(this);
- String[] filterStrings = new String[] {defaultFilterString.toString()};
- String filterName = SystemFileResources.RESID_FILTER_DRIVES;
-
- mgr.createSystemFilter(pool, filterName, filterStrings);
- }
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
- }
- return pool;
- }
-
- public String getSeparator()
- {
- return "\\"; //$NON-NLS-1$
- }
-
- public char getSeparatorChar()
- {
- return '\\';
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/package.html b/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/package.html
deleted file mode 100644
index f128e5a73..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.dstore/src/org/eclipse/rse/subsystems/files/dstore/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="David McKnight (IBM)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized DataStore file subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized DataStore file
-subsystems.
-<p>The class <b>DStoreFileSubSystemConfiguration</b> is the main factory
-for creating an DataStore file subsystem. By deriving from it, extenders
-can create their customized DataStore file subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created FileServiceSubSystem or DStoreFileService in a
- delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 5a718c0ca..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 1123655ef..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.files.ftp;singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.files.ftp.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.ui.console,
- org.eclipse.rse.services.files.ftp;bundle-version="[3.0.0,4.0.0)",
- org.apache.commons.net;bundle-version="[1.4.1,3.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.files.ftp;x-internal:=true,
- org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;x-internal:=true,
- org.eclipse.rse.internal.subsystems.files.ftp.model;x-internal:=true,
- org.eclipse.rse.internal.subsystems.files.ftp.parser;x-friends:="org.eclipse.rse.services.files.ftp",
- org.eclipse.rse.subsystems.files.ftp
-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 d4cc693f9..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 5, 2007</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 88303730d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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/
-src.includes = about.html,\
- schema/
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 b7edbc5f9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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) - [214141] Avoid NPE if missing SYST command
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE FTP Files
-providerName=Eclipse.org - DSDP
-
-# Name of Extension Point
-extPoint.ftpListingParsers=FTP Directory Listing Parsers
-
-FtpSystemLabel=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.
-
-FTPParser.UNIX=UNIX
-FTPParser.MVS=MVS
-FTPParser.WinNT=WinNT
-FTPParser.OS2=OS2
-FTPParser.OS400=OS400
-FTPParser.VMS=VMS
-FTPParser.UNIXDefault=UNIX Default
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 70933cb19..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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 Orus (Symbian) - add Windows to list of valid FTP systems
- Martin Oberhuber (Wind River) - add FTP Only system type
- Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
- Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
- Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
- Javier Montalvo Orus (Symbian) - improved autodetection of FTPListingParser
- Martin Oberhuber (Wind River) - [198692] Use FTP LIST -a to list UNIX hidden files
- Javier Montalvo Orus (Symbian) - [225821] [ftp] opening "/home" fails on OS/400 IFS
- Martin Oberhuber (Wind River) - [214141] Avoid NPE if missing SYST command
- -->
-<?eclipse version="3.1"?>
-<plugin>
- <extension point="org.eclipse.rse.core.systemTypes">
- <systemType
- label="%FtpSystemLabel"
- 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.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows;org.eclipse.rse.systemtype.ftp"
- 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"
- serviceType="_ftp._tcp">
- </configuration>
- </extension>
-
- <extension-point id="ftpListingParsers" name="%extPoint.ftpListingParsers" schema="schema/ftpListingParsers.exsd"/>
-
- <extension point="org.eclipse.rse.subsystems.files.ftp.ftpListingParsers">
- <parser
- class="org.apache.commons.net.ftp.parser.UnixFTPEntryParser"
- id="org.eclipse.rse.ftp.parser.Unix"
- label="%FTPParser.UNIX"
- listCommandModifiers="-a"
- priority="100"
- systemTypeRegex=".*[Uu][Nn][Ii][Xx].*">
- </parser>
- <parser
- class="org.apache.commons.net.ftp.parser.MVSFTPEntryParser"
- systemTypeRegex=".*[Mm][Vv][Ss].*"
- id="org.eclipse.rse.ftp.parser.MVS"
- label="%FTPParser.MVS"
- priority="100">
- </parser>
- <parser
- class="org.eclipse.rse.internal.subsystems.files.ftp.parser.RSENTFTPEntryParser"
- systemTypeRegex=".*[Ww][Ii][Nn][Dd][Oo][Ww][Ss].*"
- id="org.eclipse.rse.ftp.parser.WinNT"
- label="%FTPParser.WinNT"
- priority="100">
- </parser>
- <parser
- class="org.apache.commons.net.ftp.parser.OS2FTPEntryParser"
- systemTypeRegex=".*[Oo][Ss]/2.*"
- id="org.eclipse.rse.ftp.parser.OS2"
- label="%FTPParser.OS2"
- priority="100">
- </parser>
- <parser
- class="org.eclipse.rse.internal.subsystems.files.ftp.parser.RSEOS400FTPEntryParser"
- systemTypeRegex=".*[Oo][Ss]/400.*"
- id="org.eclipse.rse.ftp.parser.OS400"
- label="%FTPParser.OS400"
- priority="100">
- <initCommand
- cmd="site namefmt 1">
- </initCommand>
- </parser>
- <parser
- class="org.eclipse.rse.internal.subsystems.files.ftp.parser.RSEVMSFTPEntryParser"
- systemTypeRegex=".*[Vv][Mm][Ss].*"
- id="org.eclipse.rse.ftp.parser.VMS"
- label="%FTPParser.VMS"
- priority="100">
- </parser>
- <!-- Bug 214141: Default parser if nothing matches is Unix -->
- <parser
- class="org.apache.commons.net.ftp.parser.UnixFTPEntryParser"
- id="org.eclipse.rse.ftp.parser.UnixDefault"
- label="%FTPParser.UNIXDefault"
- listCommandModifiers="-a"
- priority="10000"
- systemTypeRegex=".*">
- </parser>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/schema/ftpListingParsers.exsd b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/schema/ftpListingParsers.exsd
deleted file mode 100644
index 02363c958..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/schema/ftpListingParsers.exsd
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.rse.subsystems.files.ftp" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.rse.subsystems.files.ftp" id="ftpListingParsers" name="FTP Directory Listing Parsers"/>
- </appinfo>
- <documentation>
- Extension point that allows providing extra parsers for the FTP LIST command output.
-Apache commons net provides some APIs and factories to costumize the parser and this extension
-provides an easy way to setup a custom parser and integrate it into RSE.
-The provided extension points will be available as a list in the property &quot;FTP Settings&quot;,
-allowing the user to select them overriding the default parser.
-The string attributes &lt;code&gt;defaultDateFormatStr&lt;/code&gt; &lt;code&gt;recentDateFormatStr&lt;/code&gt;
- &lt;code&gt;serverLanguageCode&lt;/code&gt; &lt;code&gt;serverTimeZoneId&lt;/code&gt; &lt;code&gt;shortMonthNames&lt;/code&gt; have to
- follow the format described by &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt;
- Each parser can also specify one or more FTP commands to be sent after establishing the connection in the &lt;code&gt;initCommands&lt;/code&gt; attribute.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="parser"/>
- </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="parser">
- <complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element ref="initCommand"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- Name that will be displayed in the FTP Settings dialog
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Extension of &lt;code&gt;org.apache.commons.net.ftp.Configurable,org.apache.commons.net.ftp.FTPFileEntryParser&lt;/code&gt; implementing the parser for the specific server
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.apache.commons.net.ftp.Configurable,org.apache.commons.net.ftp.FTPFileEntryParser"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="defaultDateFormatStr" type="string">
- <annotation>
- <documentation>
- This property specifies the main date format that will be used by a parser configured by this configuration to parse file timestamps. If this is not specified, such a parser will use as a default value, the most commonly used format which will be in as used in &lt;code&gt;en_US&lt;/code&gt; locales. This should be in the format described for &lt;code&gt;java.text.SimpleDateFormat&lt;/code&gt;. property.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="recentDateFormatStr" type="string">
- <annotation>
- <documentation>
- This property specifies a secondary date format that will be used by a parser configured by this configuration to parse file timestamps, typically those less than a year old. If this is not specified, such a parser will not attempt to parse using an alternate format.
-This is used primarily in unix-based systems.
-This should be in the format described for &lt;code&gt;java.text.SimpleDateFormat&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="serverLanguageCode" type="string">
- <annotation>
- <documentation>
- This property allows user to specify a &lt;a href=&quot;http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt&quot;&gt;
-two-letter ISO-639 language code&lt;/a&gt; that will be used to configure the set of month names used by the file timestamp parser.
-If neither this nor the shortMonthNames is specified, parsing will assume English month names, which may or may not be significant, depending on whether the date format(s) specified via defaultDateFormatStr and/or recentDateFormatStr are using
- numeric or alphabetic month names.
-If the code supplied is not supported here, &lt;code&gt;en_US&lt;/code&gt;
-month names will be used. We are supporting here those language
-codes which, when a &lt;code&gt; java.util.Locale&lt;/code&gt; is constucted
-using it, and a &lt;code&gt;java.text.SimpleDateFormat&lt;/code&gt; is
-constructed using that Locale, the array returned by the
-SimpleDateFormat&apos;s &lt;code&gt;getShortMonths()&lt;/code&gt; method consists solely of three 8-bit ASCII character strings. Additionally,
-languages which do not meet this requirement are included if a
-common alternative set of short month names is known to be used.
-This means that users who can tell us of additional such encodings
-may get them added to the list of supported languages by contacting
-the Apache Commons Net team.
-&lt;strong&gt; Please note that this attribute will NOT be used to determine a locale-based date format for the language. &lt;/strong&gt;
-Experience has shown that many if not most FTP servers outside the
-United States employ the standard &lt;code&gt;en_US&lt;/code&gt; date format
-orderings of &lt;code&gt;MMM d yyyy&lt;/code&gt; and &lt;code&gt;MMM d HH:mm&lt;/code&gt;
-and attempting to deduce this automatically here would cause more
-problems than it would solve. The date format must be changed
-via the defaultDateFormatStr and/or recentDateFormatStr parameters.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="shortMonthNames" type="string">
- <annotation>
- <documentation>
- This property allows the user to specify a set of month names used by the server that is different from those that may be specified using the setServerLanguageCode property.
-This should be a string containing twelve strings each composed of
-three characters, delimited by pipe (|) characters. Currently,
-only 8-bit ASCII characters are known to be supported. For example, a set of month names used by a hypothetical Icelandic FTP server might conceivably be specified as &lt;code&gt;&quot;jan|feb|mar|apr|ma&amp;#xED;|j&amp;#xFA;n|j&amp;#xFA;l|&amp;#xE1;g&amp;#xFA;|sep|okt|n&amp;#xF3;v|des&quot;&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="serverTimeZoneId" type="string">
- <annotation>
- <documentation>
- This property allows a time zone to be specified corresponding to that known to be used by an FTP server in file listings. This might be particularly useful to clients such as Ant that try to use these timestamps for dependency checking. This should be one of the identifiers used by &lt;code&gt;java.util.TimeZone&lt;/code&gt; to refer to time zones, for example, &lt;code&gt;America/Chicago&lt;/code&gt; or &lt;code&gt;Asia/Rangoon&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="systemTypeRegex" type="string">
- <annotation>
- <documentation>
- Regular expression used to match with the string returned by the FTP SYST command to autodetect the parser if not specified by the user
- </documentation>
- </annotation>
- </attribute>
- <attribute name="priority" type="string">
- <annotation>
- <documentation>
- Priority used if more than one extension matches the regular expression given by the &lt;code&gt;ftpSystemTypes&lt;/code&gt; attribute. Integer values are allowed.
-In case of more than one parser with a matching regular expression, the parser with lower priority number will be used.
-If no priority is specified, the default value will be &lt;code&gt;Integer.MAX_VALUE&lt;/code&gt;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="listCommandModifiers" type="string">
- <annotation>
- <documentation>
- Modifiers of the FTP &quot;LIST&quot; command. As an example if the LIST command has to be &quot;LIST -l&quot;, the contents of this optional field has to be &quot;-l&quot;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="initCommand">
- <annotation>
- <documentation>
- FTP initialization command to perform after connecting to the remote server, when the server&apos;s system type is detected to match the current listing parser.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="cmd" type="string" use="required">
- <annotation>
- <documentation>
- Command string to execute
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- RSE 2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;!-- Default UNIX parser provided by Apache commons net package --&gt;
-&lt;parser
- class=&quot;org.apache.commons.net.ftp.parser.UnixFTPEntryParser&quot;
- name=&quot;UNIX&quot;&gt;
-&lt;/parser&gt;
-
-&lt;!-- Custom parser implementing org.apache.commons.net.ftp.Configurable and org.apache.commons.net.ftp.FTPFileEntryParser --&gt;
-&lt;!-- sending FTP list command &quot;LIST -l&quot; with priority 1--&gt;
-&lt;parser
- class=&quot;com.mycompany.MyParser&quot;
- label=&quot;MyParser&quot;
- listCommandModifiers=&quot;-l&quot;
- priority=&quot;1&quot;&gt;
-&lt;/parser&gt;
-
-&lt;!-- UNIX server that uses Danish month names and &quot;European&quot; date formatting in Denmark&apos;s time zone --&gt;
-&lt;parser
- class=&quot;org.apache.commons.net.ftp.parser.UnixFTPEntryParser&quot;
- label=&quot;UNIX_Danish&quot;
- defaultDateFormatStr = &quot;d MMM yyyy&quot;
- recentDateFormatStr = &quot;d MMM HH:mm&quot;
- serverLanguageCode = &quot;da&quot;
- serverTimeZoneId = &quot;Europe/Copenhagen&quot;
- &gt;
-&lt;/parser&gt;
-
-&lt;!-- VMS server that uses month names in a language not supported but uses the standard date formatting --&gt;
-&lt;parser
- class=&quot;org.apache.commons.net.ftp.parser.VMSFTPEntryParser&quot;
- label=&quot;VMS_custom&quot;
- shortMonthNames=&quot;jan|feb|mar|apr|ma\u00ED|j\u00FAn|j\u00FAl|\u00e1g\u00FA|sep|okt|n\u00F3v|des&quot;
- &gt;
-&lt;/parser&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- The provider of a new FTPEntryParser must implement &lt;samp&gt;org.apache.commons.net.ftp.Configurable&lt;/samp&gt; and &lt;samp&gt;org.apache.commons.net.ftp.FTPFileEntryParser&lt;/samp&gt;
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- Customized VMS and WinNT implementations are supplied in the &lt;code&gt;org.eclipse.rse.subsystems.files.ftp&lt;/code&gt; plug-in.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007, 2008 Symbian Software Ltd. and others. All rights reserved.
-This program and the accompanying materials are made available under the terms
-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
- Javier Montalvo Orus (Symbian) - added ftpSystemTypes and priority
- Javier Montalvo Orus (Symbian) - [212382] additional &quot;initCommands&quot; slot for ftpListingParsers extension point
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/Activator.java
deleted file mode 100644
index 8c4576320..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519][api] declaratively register adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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);
- }
-
- /**
- * 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/internal/subsystems/files/ftp/FTPSubsystemResources.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.java
deleted file mode 100644
index 4f6b5ea03..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp;
-
-import org.eclipse.osgi.util.NLS;
-
-public class FTPSubsystemResources extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.subsystems.files.ftp.FTPSubsystemResources"; //$NON-NLS-1$
- static {
- NLS.initializeMessages(BUNDLE_NAME, FTPSubsystemResources.class);
- }
- private FTPSubsystemResources() {
- }
-
- public static String RESID_FTP_CONNECTORSERVICE_NAME;
- public static String RESID_FTP_CONNECTORSERVICE_DESCRIPTION;
- public static String RESID_FTP_SETTINGS_LABEL;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.properties b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.properties
deleted file mode 100644
index 9294e1d6e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/FTPSubsystemResources.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Copyright (c) 2007 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
-# David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-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.
-RESID_FTP_SETTINGS_LABEL=FTP Settings
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java
deleted file mode 100644
index 1d7ba7ef9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 Orus (Symbian) - Bug 140348 - FTP did not use port number
- * Javier Montalvo Orus (Symbian) - Bug 161209 - Need a Log of ftp commands
- * Javier Montalvo Orus (Symbian) - Bug 169680 - [ftp] FTP files subsystem and service should use passive mode
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [cleanup] move FTPSubsystemResources out of core
- * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
- * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
- * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
- * David McKnight (IBM) - [196632] [ftp] Passive mode setting does not work
- * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
- * Martin Oberhuber (Wind River) - [203500] Support encodings for FTP paths
- * Martin Oberhuber (Wind River) - [235463][ftp][dstore] Incorrect case sensitivity reported on windows-remote
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ILabeledObject;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.PropertyType;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.internal.services.files.ftp.FTPService;
-import org.eclipse.rse.internal.subsystems.files.ftp.FTPSubsystemResources;
-import org.eclipse.rse.internal.subsystems.files.ftp.parser.FTPClientConfigFactory;
-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.ui.subsystems.StandardConnectorService;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.MessageConsole;
-
-
-
-public class FTPConnectorService extends StandardConnectorService
-{
- protected FTPService _ftpService;
-
- /** Indicates the default string encoding on this platform */
- private static String _defaultEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
-
- public FTPConnectorService(IHost host, int port)
- {
- super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
- _ftpService = new FTPService();
- if (getHost().getSystemType().isWindows()) {
- // Configured against a Windows-specific system type
- _ftpService.setIsCaseSensitive(false);
- }
- getPropertySet();
- }
-
- private IPropertySet getPropertySet()
- {
- IPropertySet propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
-
- if(propertySet==null)
- {
-
- //Active - passive mode
- propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$
- propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- // FTP List parser
- String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
- String[] keysArray = new String[keys.length+1];
-
- System.arraycopy(keys, 0, keysArray, 0, keys.length);
-
- keysArray[keysArray.length-1]="AUTO"; //$NON-NLS-1$
-
- Arrays.sort(keysArray);
-
- propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (propertySet instanceof ILabeledObject) {
- String label = FTPSubsystemResources.RESID_FTP_SETTINGS_LABEL;
- ((ILabeledObject)propertySet).setLabel(label);
- }
- return propertySet;
- }
-
- protected void internalConnect(IProgressMonitor monitor) throws RemoteFileException, IOException
- {
- internalConnect();
- }
-
- private void internalConnect() throws RemoteFileException, IOException
- {
- IPropertySet propertySet = getPropertySet();
- SystemSignonInformation info = getSignonInformation();
- _ftpService.setHostName(info.getHostname());
- _ftpService.setUserId(info.getUserId());
- _ftpService.setPassword(info.getPassword());
- _ftpService.setPortNumber(getPort());
- _ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
- _ftpService.setPropertySet(propertySet);
- _ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
- //TODO this code should be in IHost
- String encoding = getHost().getDefaultEncoding(false);
- if (encoding==null) encoding = getHost().getDefaultEncoding(true);
- //TODO Here, we set the FTP default encoding same as the local encoding.
- //Another alternative would be to set ISO-8859-1, which is the
- //default-default internal to FTP, or keep it "null".
- if (encoding==null) encoding = _defaultEncoding;
- //</code to be in IHost>
- _ftpService.setControlEncoding(encoding);
-
- _ftpService.connect();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#getHomeDirectory()
- */
- public String getHomeDirectory() {
- if (_ftpService!=null) {
- IHostFile f = _ftpService.getUserHome();
- if (f!=null) {
- return f.getAbsolutePath();
- }
- }
- //fallback while not yet connected
- return super.getHomeDirectory();
- }
-
- 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;
- }
-
- protected void internalDisconnect(IProgressMonitor monitor)
- {
- _ftpService.disconnect();
- }
-
- public boolean isConnected()
- {
- return (_ftpService != null && _ftpService.isConnected());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
deleted file mode 100644
index c0de65f02..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorServiceManager.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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 command 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 getInstance()
- {
- 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/internal/subsystems/files/ftp/connectorservice/IFTPSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/IFTPSubSystem.java
deleted file mode 100644
index eae0c29ca..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/IFTPSubSystem.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.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/internal/subsystems/files/ftp/model/FTPFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPFileAdapter.java
deleted file mode 100644
index 07d563518..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPFileAdapter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- * Martin Oberhuber (Wind River) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.services.files.ftp.FTPHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-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.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-
-public class FTPFileAdapter implements IHostFileToRemoteFileAdapter
-{
-
- public AbstractRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes)
- {
- List results = new ArrayList();
- for (int i = 0; i < nodes.length; i++)
- {
- FTPHostFile node = (FTPHostFile)nodes[i];
- FTPRemoteFile ftpFile = new FTPRemoteFile(ss, context, parent, node);
- results.add(ftpFile);
- ss.cacheRemoteFile(ftpFile);
- }
- return (FTPRemoteFile[]) results.toArray(new FTPRemoteFile[results.size()]);
- }
-
- public AbstractRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node)
- {
- FTPRemoteFile file = new FTPRemoteFile(ss, context, parent, (FTPHostFile) node);
- ss.cacheRemoteFile(file);
- return file;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPRemoteFile.java
deleted file mode 100644
index 7ff50043f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/model/FTPRemoteFile.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 Orus (Symbian) - [198272] FTP should return classification for symbolic links so they show a link overlay
- * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.model;
-
-
-import org.eclipse.rse.internal.services.files.ftp.FTPHostFile;
-import org.eclipse.rse.services.clientserver.PathUtility;
-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()
- {
- return _ftpHostFile.getClassification();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile#getSeparator()
- */
- public String getSeparator() {
- String absPath = getAbsolutePath();
- if (absPath!=null && absPath.length()>1) {
- return PathUtility.getSeparator(absPath);
- }
- String home = getParentRemoteFileSubSystem().getConnectorService().getHomeDirectory();
- if (home!=null && home.length()>1) {
- return PathUtility.getSeparator(home);
- }
- return PathUtility.getSeparator(absPath);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile#getSeparatorChar()
- */
- public char getSeparatorChar() {
- return getSeparator().charAt(0);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigFactory.java
deleted file mode 100644
index bd89da9d6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigFactory.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2009 Symbian Software Ltd. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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
- * Javier Montalvo Orus (Symbian) - improved autodetection of FTPListingParser
- * Javier Montalvo Orus (Symbian) - [212382] additional "initCommands" slot for ftpListingParsers extension point
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.parser;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.regex.Pattern;
-
-import org.apache.commons.net.ftp.FTPClientConfig;
-import org.apache.commons.net.ftp.FTPFileEntryParser;
-import org.apache.commons.net.ftp.parser.ParserInitializationException;
-import org.apache.commons.net.ftp.parser.UnixFTPEntryParser;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigFactory;
-import org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigProxy;
-import org.osgi.framework.Bundle;
-
-public class FTPClientConfigFactory implements IFTPClientConfigFactory {
-
- private static FTPClientConfigFactory factory = null;
-
- private Hashtable ftpConfigProxyById = new Hashtable();
- private Hashtable ftpParsers = new Hashtable();
- private IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.rse.subsystems.files.ftp","ftpListingParsers"); //$NON-NLS-1$ //$NON-NLS-2$
- private UnixFTPEntryParser defaultFTPEntryParser = new UnixFTPEntryParser();
-
- /**
- * Constructor of the parser factory
- * @return an instance of the factory
- */
- public static FTPClientConfigFactory getParserFactory()
- {
- if(factory==null)
- {
- factory = new FTPClientConfigFactory();
- }
-
- return factory;
- }
-
- private FTPClientConfigFactory() {
-
- IConfigurationElement[] ce = ep.getConfigurationElements();
- for (int i = 0; i < ce.length; i++) {
-
- String id = ce[i].getAttribute("id"); //$NON-NLS-1$
- String label = ce[i].getAttribute("label"); //$NON-NLS-1$
- String priority = ce[i].getAttribute("priority"); //$NON-NLS-1$
- String systemTypeRegex = ce[i].getAttribute("systemTypeRegex"); //$NON-NLS-1$
- String className = ce[i].getAttribute("class"); //$NON-NLS-1$
- Bundle declaringBundle = Platform.getBundle(ce[i].getContributor().getName());
-
- String listCommandModifiers = ce[i].getAttribute("listCommandModifiers"); //$NON-NLS-1$
-
- String defaultDateFormatStr = ce[i].getAttribute("defaultDateFormatStr"); //$NON-NLS-1$
- String recentDateFormatStr = ce[i].getAttribute("recentDateFormatStr"); //$NON-NLS-1$
- String serverLanguageCode = ce[i].getAttribute("serverLanguageCode"); //$NON-NLS-1$
- String shortMonthNames = ce[i].getAttribute("shortMonthNames"); //$NON-NLS-1$
- String serverTimeZoneId = ce[i].getAttribute("serverTimeZoneId"); //$NON-NLS-1$
-
- IConfigurationElement[] initialCommandsSequence = ce[i].getChildren("initCommand"); //$NON-NLS-1$
- String[] initialCommands = new String[initialCommandsSequence.length];
-
- for (int j = 0; j < initialCommands.length; j++) {
- initialCommands[j] = initialCommandsSequence[j].getAttribute("cmd"); //$NON-NLS-1$
- }
-
- FTPClientConfigProxy ftpClientConfigProxy = new FTPClientConfigProxy(id,label,priority,systemTypeRegex,className,declaringBundle,listCommandModifiers,
- defaultDateFormatStr,recentDateFormatStr,serverLanguageCode,shortMonthNames,serverTimeZoneId, initialCommands);
-
- ftpConfigProxyById.put(id, ftpClientConfigProxy);
-
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigFactory#getFTPClientConfig(java.lang.String)
- */
- public IFTPClientConfigProxy getFTPClientConfig(String parser, String systemName)
- {
- if (systemName == null) {
- // avoid NPE if systemName could not be determined
- systemName = ""; //$NON-NLS-1$
- }
-
- FTPClientConfigProxy foundFTPClientConfigProxy = null;
-
- if(parser.equals("AUTO")) //$NON-NLS-1$
- {
- int previousPriority = Integer.MAX_VALUE;
- FTPClientConfigProxy foundProxy = null;
-
- Enumeration ftpConfigProxyEnum = ftpConfigProxyById.elements();
-
- while(ftpConfigProxyEnum.hasMoreElements())
- {
- FTPClientConfigProxy proxy = (FTPClientConfigProxy)ftpConfigProxyEnum.nextElement();
-
- if(proxy.getSystemTypeRegex()!=null)
- {
- Pattern ftpSystemTypesRegex = Pattern.compile(proxy.getSystemTypeRegex());
- if(ftpSystemTypesRegex.matcher(systemName).matches())
- {
- int priority = proxy.getPriority();
-
- if(priority < previousPriority)
- {
- foundProxy = proxy;
- previousPriority = priority;
- }
- }
- }
- }
-
- //process the selected proxy
- if(foundProxy != null)
- {
- FTPClientConfig config = null;
-
- if(!ftpParsers.containsKey(foundProxy.getClassName()))
- {
- FTPFileEntryParser entryParser = null;
- try {
- entryParser = (FTPFileEntryParser)foundProxy.getDeclaringBundle().loadClass(foundProxy.getClassName()).newInstance();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
- ftpParsers.put(foundProxy.getClassName(), entryParser);
- }
-
- config = new FTPClientConfig(foundProxy.getClassName());
-
- //not necessary checking for null, as null is valid input
- config.setDefaultDateFormatStr(foundProxy.getDefaultDateFormatStr());
- config.setRecentDateFormatStr(foundProxy.getRecentDateFormatStr());
- config.setServerLanguageCode(foundProxy.getServerLanguageCode());
- config.setShortMonthNames(foundProxy.getShortMonthNames());
- config.setServerTimeZoneId(foundProxy.getServerTimeZoneId());
-
- //not necessary storing in the hashtable, as discovered will not be reused
- foundProxy.setFTPClientConfig(config);
-
- foundFTPClientConfigProxy = foundProxy;
-
- }
- }
-
-
- if(foundFTPClientConfigProxy==null)
- {
- if(ftpConfigProxyById.containsKey(parser))
- {
- //restore parser from the proxy hashtable
- foundFTPClientConfigProxy = (FTPClientConfigProxy)ftpConfigProxyById.get(parser);
-
- //activate if necessary
- if(foundFTPClientConfigProxy.getFTPClientConfig()==null)
- {
- FTPClientConfig config = null;
-
- if(!ftpParsers.containsKey(foundFTPClientConfigProxy.getClassName()))
- {
- FTPFileEntryParser entryParser = null;
- try {
- entryParser = (FTPFileEntryParser)foundFTPClientConfigProxy.getDeclaringBundle().loadClass(foundFTPClientConfigProxy.getClassName()).newInstance();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
- ftpParsers.put(foundFTPClientConfigProxy.getClassName(), entryParser);
- }
-
- config = new FTPClientConfig(foundFTPClientConfigProxy.getClassName());
-
- //not necessary checking for null, as null is valid input
- config.setDefaultDateFormatStr(foundFTPClientConfigProxy.getDefaultDateFormatStr());
- config.setRecentDateFormatStr(foundFTPClientConfigProxy.getRecentDateFormatStr());
- config.setServerLanguageCode(foundFTPClientConfigProxy.getServerLanguageCode());
- config.setShortMonthNames(foundFTPClientConfigProxy.getShortMonthNames());
- config.setServerTimeZoneId(foundFTPClientConfigProxy.getServerTimeZoneId());
-
- foundFTPClientConfigProxy.setFTPClientConfig(config);
-
- }
- }
- }
-
- return foundFTPClientConfigProxy;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigFactory#getKeySet()
- */
- public String[] getKeySet()
- {
- return (String[])ftpConfigProxyById.keySet().toArray(new String[ftpConfigProxyById.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory#createFileEntryParser(java.lang.String)
- */
- public FTPFileEntryParser createFileEntryParser(String key) throws ParserInitializationException {
-
- FTPFileEntryParser entryParser = null;
- if (key == null) {
- // avoid NPE in containsKey when the SYST command returned null
- key = ""; //$NON-NLS-1$
- }
- if(!ftpParsers.containsKey(key))
- {
- entryParser = defaultFTPEntryParser;
- }
- else
- {
- entryParser = (FTPFileEntryParser)ftpParsers.get(key);
- }
-
- return entryParser;
- }
-
- /*
- * (non-Javadoc)
- * @see org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory#createFileEntryParser(org.apache.commons.net.ftp.FTPClientConfig)
- */
- public FTPFileEntryParser createFileEntryParser(FTPClientConfig config) throws ParserInitializationException {
-
- String key = config.getServerSystemKey();
- return createFileEntryParser(key);
-
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigProxy.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigProxy.java
deleted file mode 100644
index 1c29948a0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/FTPClientConfigProxy.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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
- * Javier Montalvo Orus (Symbian) - improved autodetection of FTPListingParser
- * Javier Montalvo Orus (Symbian) - [212382] additional "initCommands" slot for ftpListingParsers extension point
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.parser;
-
-import org.apache.commons.net.ftp.FTPClientConfig;
-import org.eclipse.rse.internal.services.files.ftp.parser.IFTPClientConfigProxy;
-import org.osgi.framework.Bundle;
-
-public class FTPClientConfigProxy implements IFTPClientConfigProxy{
-
- private String id;
- private String label;
- private int priority = Integer.MAX_VALUE;
- private String systemTypeRegex;
- private String className;
- private Bundle declaringBundle;
- private String listCommandModifiers;
-
- private String defaultDateFormatStr;
- private String recentDateFormatStr;
- private String serverLanguageCode;
- private String shortMonthNames;
- private String serverTimeZoneId;
- private String[] initialCommands;
-
- private FTPClientConfig ftpClientConfig;
-
- public FTPClientConfigProxy(String id, String label, String priority, String systemTypeRegex, String className, Bundle declaringBundle, String listCommandModifiers,
- String defaultDateFormatStr, String recentDateFormatStr, String serverLanguageCode, String shortMonthNames, String serverTimeZoneId, String[] initialCommands)
- {
- this.id = id;
- this.label = label;
-
- try{
- this.priority = Integer.parseInt(priority);
- }catch(NumberFormatException e){}
-
- this.systemTypeRegex = systemTypeRegex;
- this.className = className;
- this.listCommandModifiers = listCommandModifiers;
-
- this.declaringBundle = declaringBundle;
-
- this.defaultDateFormatStr = defaultDateFormatStr;
- this.recentDateFormatStr = recentDateFormatStr;
- this.serverLanguageCode = serverLanguageCode;
- this.shortMonthNames = shortMonthNames;
- this.serverTimeZoneId = serverTimeZoneId;
-
- this.initialCommands = initialCommands;
-
- }
-
- public String getId() {
- return id;
- }
-
- public String getLabel() {
- return label;
- }
-
- public int getPriority() {
- return priority;
- }
-
- public String getSystemTypeRegex() {
- return systemTypeRegex;
- }
-
- public String getClassName() {
- return className;
- }
-
- public Bundle getDeclaringBundle() {
- return declaringBundle;
- }
-
- public String getListCommandModifiers() {
- return listCommandModifiers;
- }
-
- public String getDefaultDateFormatStr() {
- return defaultDateFormatStr;
- }
-
- public String getRecentDateFormatStr() {
- return recentDateFormatStr;
- }
-
- public String getServerLanguageCode() {
- return serverLanguageCode;
- }
-
- public String getShortMonthNames() {
- return shortMonthNames;
- }
-
- public String getServerTimeZoneId() {
- return serverTimeZoneId;
- }
-
- public FTPClientConfig getFTPClientConfig() {
- return ftpClientConfig;
- }
-
- public String[] getInitialCommands() {
- return initialCommands;
- }
-
- public void setFTPClientConfig(FTPClientConfig ftpClientConfig) {
- this.ftpClientConfig=ftpClientConfig;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSENTFTPEntryParser.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSENTFTPEntryParser.java
deleted file mode 100644
index 2fbaff89e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSENTFTPEntryParser.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 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
- * Javier Montalvo Orus (Symbian) - [198272] Classification for executable in WinNT parser
- * Javier Montalvo Orus (Symbian) - [198635] On Windows servers, only lowercase *.exe files are treated as executable
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.parser;
-
-import org.apache.commons.net.ftp.FTPFile;
-import org.apache.commons.net.ftp.parser.NTFTPEntryParser;
-
-public class RSENTFTPEntryParser extends NTFTPEntryParser {
-
- public FTPFile parseFTPEntry(String entry)
- {
- FTPFile f = super.parseFTPEntry(entry);
-
- if(f != null)
- {
- // only USER permission is shown in RSE
- f.setPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION, true);
- f.setPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION, true);
-
- if(f.getName().toLowerCase().endsWith(".exe")) //$NON-NLS-1$
- {
- f.setPermission(FTPFile.USER_ACCESS, FTPFile.EXECUTE_PERMISSION, true);
- }
- }
- return (f);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEOS400FTPEntryParser.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEOS400FTPEntryParser.java
deleted file mode 100644
index 21667e5d7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEOS400FTPEntryParser.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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
- * Javier Montalvo Orus (Symbian) - [225821] [ftp] opening "/home" fails on OS/400 IFS
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ftp.parser;
-
-import org.apache.commons.net.ftp.FTPFile;
-import org.apache.commons.net.ftp.parser.OS400FTPEntryParser;
-
-public class RSEOS400FTPEntryParser extends OS400FTPEntryParser {
- public FTPFile parseFTPEntry(String entry)
- {
- FTPFile f = super.parseFTPEntry(entry);
-
- if(f != null)
- {
- // only USER permission is shown in RSE
- f.setPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION, true);
- f.setPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION, true);
- }
-
- return f;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEVMSFTPEntryParser.java b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEVMSFTPEntryParser.java
deleted file mode 100644
index 98043080a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/parser/RSEVMSFTPEntryParser.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 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.internal.subsystems.files.ftp.parser;
-
-import java.util.StringTokenizer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.net.ftp.FTPFile;
-import org.apache.commons.net.ftp.parser.VMSFTPEntryParser;
-
-public class RSEVMSFTPEntryParser extends VMSFTPEntryParser {
-
- private static final Pattern PERMISSIONS_PATTERN= Pattern.compile(".*(\\([a-zA-Z]*,[a-zA-Z]*,[a-zA-Z]*,[a-zA-Z]*\\))"); //$NON-NLS-1$
-
- public FTPFile parseFTPEntry(String entry)
- {
- FTPFile f = super.parseFTPEntry(entry);
-
- if(f != null)
- {
- if (!isVersioning())
- {
- if(f.getName().lastIndexOf(".DIR")!=-1) //$NON-NLS-1$
- {
- f.setName(f.getName().substring(0, f.getName().lastIndexOf(".DIR"))); //$NON-NLS-1$
- }
- }
-
- Matcher m = PERMISSIONS_PATTERN.matcher(entry.trim());
-
- if(m.matches())
- {
- //Set file permission.
- //VMS has (SYSTEM,OWNER,GROUP,WORLD) users that can contain
- //R (read) W (write) E (execute) D (delete)
-
- StringTokenizer t = new StringTokenizer(m.group(1), ","); //$NON-NLS-1$
-
- //discard SYSTEM permission
- t.nextElement();
-
- //iterate for OWNER GROUP WORLD permissions
- for (int access = 0; access < 3; access++)
- {
- String token = t.nextToken();
-
- f.setPermission(access, FTPFile.READ_PERMISSION, token.indexOf('R') >= 0);
- f.setPermission(access, FTPFile.WRITE_PERMISSION, token.indexOf('W') >= 0);
- f.setPermission(access, FTPFile.EXECUTE_PERMISSION, token.indexOf('E') >= 0);
- }
- }
- }
-
- return f;
- }
-}
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 e14f3e3c4..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, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don 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.services.files.ftp.IFTPService;
-import org.eclipse.rse.internal.subsystems.files.ftp.connectorservice.FTPConnectorService;
-import org.eclipse.rse.internal.subsystems.files.ftp.connectorservice.FTPConnectorServiceManager;
-import org.eclipse.rse.internal.subsystems.files.ftp.model.FTPFileAdapter;
-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.ILanguageUtilityFactory;
-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;
-
-
-/**
- * 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.getInstance().getConnectorService(host, getServiceImplType());
- }
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- FTPConnectorServiceManager.getInstance().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/package.html b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/package.html
deleted file mode 100644
index 7474f2fb1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/subsystems/files/ftp/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized FTP file subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized FTP file
-subsystems.
-<p>The class <b>FTPFileSubSystemConfiguration</b> is the main factory
-for creating an FTP file subsystem. By deriving from it, extenders
-can create their customized FTP file subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created FileServiceSubSystem or FTPService in a
- delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 a774099f9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 ca2f7aee6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/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.local;singleton:=true
-Bundle-Version: 2.1.101.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.files.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.connectorservice.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.internal.subsystems.files.local;x-internal:=true,
- org.eclipse.rse.internal.subsystems.files.local.model;x-internal:=true,
- org.eclipse.rse.subsystems.files.local
-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 d4cc693f9..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 5, 2007</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 8a94f8ec6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
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 91f593e0d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Local Files
-providerName = Eclipse.org - DSDP
-
-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.
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 029dc923c..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, 2007 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) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.systemtype.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/internal/subsystems/files/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/Activator.java
deleted file mode 100644
index 025135b56..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519][api] declaratively register adapter factories
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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);
- }
-
- /**
- * 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$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalJavaLanguageUtility.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalJavaLanguageUtility.java
deleted file mode 100644
index 5010c8cc5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalJavaLanguageUtility.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.local;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.rse.internal.subsystems.files.core.AbstractJavaLanguageUtility;
-import org.eclipse.rse.internal.subsystems.files.local.model.LocalFile;
-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.ui.SystemBasePlugin;
-
-/**
- * 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;
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalLanguageUtilityFactory.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalLanguageUtilityFactory.java
deleted file mode 100644
index 5b5b7f353..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalLanguageUtilityFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.files.local;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.internal.subsystems.files.core.AbstractLanguageUtilityFactory;
-import org.eclipse.rse.subsystems.files.core.ILanguageUtility;
-import org.eclipse.rse.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.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java
deleted file mode 100644
index 1800056f2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/LocalSearchResultConfiguration.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [186128] Move IProgressMonitor last in all API
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.IHostSearchConstants;
-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() != IHostSearchConstants.RUNNING) {
- super.cancel();
- return;
- }
-
- // cancel search
- getSearchService().cancelSearch(this, null);
- }
-
- public Object getSearchTarget()
- {
- try
- {
- return _fileSubSystem.getFileService().getFile(_searchObject.getParentPath(), _searchObject.getName(), null);
- //return _searchObject.getAbsolutePath();
- }
- catch (Exception e)
- {
-
- }
- return null;
- }
-
- public FileServiceSubSystem getFileServiceSubSystem()
- {
- return _fileSubSystem;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFile.java
deleted file mode 100644
index b7af7c270..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFile.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [187571] Classification is empty for local directories
- * Martin Oberhuber (Wind River) - [234726] Update IRemoteFile Javadocs
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.local.model;
-
-import org.eclipse.rse.internal.services.local.files.LocalHostFile;
-import org.eclipse.rse.services.clientserver.SystemFileClassifier;
-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
-{
- 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) {
- if (isFile()) {
- _classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
- } else if (isDirectory()) {
- _classification = "directory"; //$NON-NLS-1$
- } else {
- _classification = "unknown"; //$NON-NLS-1$
- }
- }
- return _classification;
- }
-
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFileAdapter.java
deleted file mode 100644
index bb83fbdf7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalFileAdapter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.local.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.services.local.files.LocalHostFile;
-import org.eclipse.rse.internal.services.local.files.LocalVirtualHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-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.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-
-public class LocalFileAdapter implements IHostFileToRemoteFileAdapter
-{
-
- public AbstractRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes)
- {
- if (nodes == null) return null;
-
- List results = new ArrayList();
- for (int i = 0; i < nodes.length; i++)
- {
- IHostFile child = nodes[i];
-
- LocalFile 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 (LocalFile[]) results.toArray(new LocalFile[results.size()]);
- }
-
- public AbstractRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node)
- {
- LocalFile 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalVirtualFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalVirtualFile.java
deleted file mode 100644
index 71894e630..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/internal/subsystems/files/local/model/LocalVirtualFile.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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.
- * Xuan Chen (IBM) - [200872] [Archives] Size Property displays size of Archive not of file inside Archive
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.local.model;
-
-import java.io.File;
-
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.internal.services.local.files.LocalVirtualHostFile;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-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;
-
-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 long getLength()
- {
- return _node.getChild().getSize();
- }
-
- 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)
- {
- try {
- return _node.getChild().getExtractedFile(srcEncoding, isText, null);
- } catch (SystemMessageException e) {
- //FIXME check if this is OK, or should we better return null?
- return new SystemMessageObject(e.getSystemMessage(), ISystemMessageObject.MSGTYPE_ERROR, null);
- }
- }
-
- 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;
- }
-}
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 bb61f72b5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/LocalFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186997] No deferred queries in Local Files
- * Kevin Doyle (IBM) - [199871] LocalFileService needs to implement getMessage()
- * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- * David McKnight (IBM) - [280605] SystemTextEditor.isLocal() returns false for LocalFileSubSystemConfiguration
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.files.local;
-
-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.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.internal.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.internal.services.local.ILocalService;
-import org.eclipse.rse.internal.services.local.files.LocalFileService;
-import org.eclipse.rse.internal.services.local.search.LocalSearchService;
-import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
-import org.eclipse.rse.internal.subsystems.files.local.LocalLanguageUtilityFactory;
-import org.eclipse.rse.internal.subsystems.files.local.LocalSearchResultConfiguration;
-import org.eclipse.rse.internal.subsystems.files.local.model.LocalFileAdapter;
-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.ILanguageUtilityFactory;
-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.servicesubsystem.FileServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-
-/**
- * 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$
- String[] myDocsFilterStrings = new String[] {myDocsFilterString.toString()};
- mgr.createSystemFilter(pool, myHomeFilterName, myDocsFilterStrings);
-
-
- RemoteFileFilterString defaultFilterString = new RemoteFileFilterString(this);
- if (!_isWindows)
- defaultFilterString.setPath(getSeparator());
- String[] filterStrings = new String[] {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);
- }
- else
- {
- RemoteFileFilterString defaultFilterString = new RemoteFileFilterString(this);
- if (!_isWindows)
- defaultFilterString.setPath(getSeparator());
- String[] filterStrings = new String[] {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 boolean supportsDeferredQueries() {
- //No need for deferred queries in Local, since these are always fast
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- LocalConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IFileService createFileService(IHost host)
- {
- return new LocalFileService(RemoteFileUtility.getSystemFileTransferModeRegistry());
- }
-
- 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;
- }
-
- public String getEditorProfileID()
- {
- return "universallocal"; //$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/package.html b/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/package.html
deleted file mode 100644
index 20bd123f6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.local/src/org/eclipse/rse/subsystems/files/local/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized local file subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized local file
-subsystems.
-<p>The class <b>LocalFileSubSystemConfiguration</b> is the main factory
-for creating an local file subsystem. By deriving from it, extenders
-can create their customized local file subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created FileServiceSubSystem or LocalFileService in a
- delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 37927a33e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 413e06a5e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.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.files.ssh; singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.files.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.connectorservice.ssh;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.services.ssh;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.files.ssh;x-internal:=true,
- 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 d4cc693f9..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 5, 2007</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 3e7a9fddc..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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/
-src.includes = about.html
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 b7b96fd85..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE SSH Files
-providerName = Eclipse.org - DSDP
-
-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 b9b1445b5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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
-Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="files"
- class="org.eclipse.rse.subsystems.files.ssh.SftpFileSubSystemConfiguration"
- description="%SshFileSubsystemDescription"
- icon="icons/full/obj16/systemfiles_obj.gif"
- iconlive="icons/full/obj16/systemfileslive_obj.gif"
- id="ssh.files"
- name="%SshFileSubsystemName"
- priority="100"
- serviceType="_sftp-ssh._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
- vendor="%providerName">
- </configuration>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/Activator.java
deleted file mode 100644
index d57bb8532..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/Activator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
- *******************************************************************************/
-package org.eclipse.rse.internal.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);
- }
-
- /*
- * (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/internal/subsystems/files/ssh/SftpFileAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/SftpFileAdapter.java
deleted file mode 100644
index b60c41e5d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/SftpFileAdapter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 FTPFileAdapter.
- * Martin Oberhuber (Wind River) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ssh;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.services.ssh.files.SftpHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-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.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-public class SftpFileAdapter implements IHostFileToRemoteFileAdapter {
-
- public AbstractRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes) {
-
- List results = new ArrayList();
- if (nodes!=null) {
- for (int i = 0; i < nodes.length; i++) {
- SftpHostFile node = (SftpHostFile)nodes[i];
- SftpRemoteFile remoteFile = new SftpRemoteFile(ss, context, parent, node);
- results.add(remoteFile);
- ss.cacheRemoteFile(remoteFile);
- }
- }
- return (SftpRemoteFile[]) results.toArray(new SftpRemoteFile[results.size()]);
- }
-
- public AbstractRemoteFile convertToRemoteFile(FileServiceSubSystem ss, IRemoteFileContext context, IRemoteFile parent, IHostFile node) {
- SftpRemoteFile 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/internal/subsystems/files/ssh/SftpRemoteFile.java b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/SftpRemoteFile.java
deleted file mode 100644
index 9a05eed3f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/internal/subsystems/files/ssh/SftpRemoteFile.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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 FTPRemoteFile.
- * Martin Oberhuber (Wind River) - [216343] immediate link targets and canonical paths for Sftp
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.files.ssh;
-
-import org.eclipse.rse.internal.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() {
- String canPath = getSftpHostFile().getCanonicalPath();
- if (canPath.equals(getAbsolutePath()) && _parentFile!=null) {
- String parentCanPath = _parentFile.getCanonicalPath();
- StringBuffer path = new StringBuffer(parentCanPath);
- if (!parentCanPath.endsWith("/")) //$NON-NLS-1$
- {
- path.append('/');
- }
- path.append(getName());
- canPath = path.toString();
- }
- return canPath;
- }
-
- public String getClassification() {
- return getSftpHostFile().getClassification();
- }
-
-}
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 1131c741d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/SftpFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService;
-import org.eclipse.rse.internal.connectorservice.ssh.SshConnectorServiceManager;
-import org.eclipse.rse.internal.services.ssh.ISshService;
-import org.eclipse.rse.internal.services.ssh.files.SftpFileService;
-import org.eclipse.rse.internal.subsystems.files.ssh.SftpFileAdapter;
-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.ILanguageUtilityFactory;
-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/package.html b/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/package.html
deleted file mode 100644
index 10e54837b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.files.ssh/src/org/eclipse/rse/subsystems/files/ssh/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized sftp file subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized sftp file
-subsystems.
-<p>The class <b>SftpFileSubSystemConfiguration</b> is the main factory
-for creating an Sftp file subsystem. By deriving from it, extenders
-can create their customized sftp file subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created FileServiceSubSystem or SftpFileService in a
- delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 ce7393340..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.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.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 06d3ed14d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 b9b5524b4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/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.processes.core;singleton:=true
-Bundle-Version: 3.1.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package:
- org.eclipse.rse.internal.subsystems.processes.core;x-internal:=true,
- org.eclipse.rse.internal.subsystems.processes.core.subsystem;x-internal:=true,
- 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;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.runtime,
- org.eclipse.swt,
- org.eclipse.ui,
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-Activator: org.eclipse.rse.internal.subsystems.processes.core.Activator
-Bundle-ActivationPolicy: lazy
-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 d4cc693f9..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 5, 2007</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 6457046ef..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 80d0b0962..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Processes Core
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/Activator.java
deleted file mode 100644
index 33229cbb1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [180519][api] declaratively register rse.processes.ui adapter factories
- * Martin Oberhuber (wind River) - [203105] Decouple recursive plugin activation of UI adapters
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java
deleted file mode 100644
index febf83c50..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.processes.core.subsystem;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemProcessesCoreResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties
deleted file mode 100644
index f577d085d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/internal/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL=All Processes
-RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL=My Processes
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/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 013ca42ca..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2007 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) - [182454] improve getAbsoluteName() documentation
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-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.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-
-/**
- * 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.
- */
-public class RemoteProcessImpl implements IRemoteProcess
-{
- 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 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(new NullProgressMonitor(), false);
- } 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 068c77d7b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-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.internal.subsystems.processes.core.subsystem.SystemProcessesCoreResources;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 false
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters()
- */
- public boolean supportsNestedFilters()
- {
- 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))
- {
-
-
- // ----------------------
- // "All Processes" filter...
- // ----------------------
- HostProcessFilterImpl allProcessesFilterString = new HostProcessFilterImpl();
- String[] filterStrings = new String[] {allProcessesFilterString.toString()};
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL, filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
-
- //------------------------
- // "My Processes" filter...
- // ----------------------
- HostProcessFilterImpl myProcessesFilterString = new HostProcessFilterImpl();
- myProcessesFilterString.setUsername("${user.id}"); //$NON-NLS-1$
-
- filterStrings = new String[] {myProcessesFilterString.toString()};
- filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL, filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
- }
- else
- {
-
- // ----------------------
- // "All Processes" filter...
- // ----------------------
- HostProcessFilterImpl allProcessesFilterString = new HostProcessFilterImpl();
- String[] filterStrings = new String[] {allProcessesFilterString.toString()};
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL, filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
- }
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
- }
- return pool;
- }
-
- public ISystemValidator getPortValidator()
- {
- ISystemValidator portValidator = new ValidatorServerPortInput();
- return portValidator;
- }
-
-}
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 007fefef1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [262930] Remote System Details view not restoring filter memento input
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-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.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * Default implementation of the IRemoteProcessSubSystem interface.
- * <p>
- * Some of the methods are simply convenience methods - these are
- * implemented here, whereas the real work takes place in the
- * ProcessServiceSubSystem.
- * </p>
- */
-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.IRemoteProcessSubSystem#getParentRemoteProcessSubSystemConfiguration()
- */
- public IRemoteProcessSubSystemConfiguration getParentRemoteProcessSubSystemConfiguration()
- {
- return (IRemoteProcessSubSystemConfiguration) super.getSubSystemConfiguration();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem#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) throws SystemMessageException
- {
- super.initializeSubSystem(monitor);
- // load UI plugin for adapters right after successful connect
- Platform.getAdapterManager().loadAdapter(new RemoteProcessImpl(null, null), "org.eclipse.rse.ui.view.ISystemViewElementAdapter"); //$NON-NLS-1$
- 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);
- super.uninitializeSubSystem(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem#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(String filterString, IProgressMonitor monitor)
- 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.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see SubSystem#getObjectWithAbsoluteName(String, IProgressMonitor)
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception
- {
- // first attempt getting filter
- Object filterRef = super.getObjectWithAbsoluteName(key, monitor);
- if (filterRef != null) {
- return filterRef;
- }
-
- try
- {
- long pid = Long.parseLong(key);
- return getRemoteProcessObject(pid);
- }
- catch (NumberFormatException e)
- {
- return super.getObjectWithAbsoluteName(key, 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/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 9e18b164a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-
-public interface IProcessServiceSubSystem extends IRemoteProcessSubSystem
-{
-
-} \ 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 9bf9648ad..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.rse.core.model.IHost;
-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 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 43c7be8c6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * David Dykstal (IBM) - [197036] refactored switch configuration
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David McKnight (IBM) - [220524] internalSwitchServiceSubSystemConfiguration -> internalSwitchSubSystemConfiguration
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-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.ISubSystemConfiguration;
-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.
- */
-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(new NullProgressMonitor());
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid("" + pid); //$NON-NLS-1$
- IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
- IHostProcess process = getProcessService().getProcess(pid, null);
- 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(new NullProgressMonitor());
- return getProcessService().kill(process.getPid(), signal, null);
- }
-
- /* (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(monitor);
- IHostProcess[] processes = getProcessService().listAllProcesses(processFilter, monitor);
- 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(monitor);
- IHostProcess[] processes = getProcessService().listChildProcesses(parent.getPid(), processFilter, monitor);
- 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(monitor);
- IHostProcess[] processes = getProcessService().listChildProcesses(parent.getPid(), monitor);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalSwitchSubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration configuration)
- {
- IProcessServiceSubSystemConfiguration config = (IProcessServiceSubSystemConfiguration) configuration;
- IHost host = getHost();
- setProcessService(config.getProcessService(host));
- setHostProcessToRemoteProcessAdapter(config.getHostProcessAdapter());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- public boolean canSwitchTo(ISubSystemConfiguration configuration) {
- return configuration instanceof IProcessServiceSubSystemConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.ISubSystem#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) throws SystemMessageException
- {
- 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)
- {
- getProcessService().uninitService(monitor);
- super.uninitializeSubSystem(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 7237ecc2b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-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.ui.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.ISubSystemConfiguration#getServiceType()
- */
- public final Class getServiceType()
- {
- return IProcessService.class;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.ui.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host)
- {
- return getConnectorService(host).supportsServerLaunchProperties();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.ISubSystemConfiguration#getService(org.eclipse.rse.ui.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 b7464f3ca..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.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.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 a142908e1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 032883858..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/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.processes.dstore;singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.processes.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.extra;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.connectorservice.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.subsystems.processes.dstore;x-internal:=true,
- org.eclipse.rse.subsystems.processes.dstore
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 d4cc693f9..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 5, 2007</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 5d4f729c2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 280fac646..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Processes
-providerName = Eclipse.org - DSDP
-
-Processes=Processes
-ProcessesDescription=This configuration allows you to work with processes on local or remote systems using the DataStore protocol.
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 6ca816a72..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/plugin.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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 Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
-<!-- ============================================== -->
-<!-- Define subsystem factories for sample -->
-<!-- ============================================== -->
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="processes"
- class="org.eclipse.rse.subsystems.processes.dstore.DStoreProcessSubSystemConfiguration"
- description="%ProcessesDescription"
- icon="icons/full/obj16/processsubsystem_obj.gif"
- iconlive="icons/full/obj16/processsubsystemlive_obj.gif"
- id="dstore.processes"
- name="%Processes"
- priority="200"
- serviceType="_dstore-proc._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
- vendor="%providerName">
- </configuration>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/Activator.java
deleted file mode 100644
index 797be372f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519] declaratively register rse.processes.ui adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.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);
- }
-
- /**
- * 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/internal/subsystems/processes/dstore/DStoreProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/DStoreProcessAdapter.java
deleted file mode 100644
index 1fc9bef41..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/internal/subsystems/processes/dstore/DStoreProcessAdapter.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.subsystems.processes.dstore;
-
-import java.util.ArrayList;
-
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.rse.internal.services.dstore.processes.DStoreHostProcess;
-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 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;
- }
-
-}
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 0550387e4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/DStoreProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-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.internal.services.dstore.processes.DStoreProcessService;
-import org.eclipse.rse.internal.subsystems.processes.dstore.DStoreProcessAdapter;
-import org.eclipse.rse.services.dstore.IDStoreService;
-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.ui.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 whether environment variables property page is supported
- */
- 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.ui.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.ui.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host)
- {
- return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- DStoreConnectorServiceManager.getInstance().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.dstore/src/org/eclipse/rse/subsystems/processes/dstore/package.html b/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/package.html
deleted file mode 100644
index e08bc6e18..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.dstore/src/org/eclipse/rse/subsystems/processes/dstore/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="David McKnight (IBM)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized DataStore process subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized DataStore process
-subsystems.
-<p>The class <b>DStoreProcessSubSystemConfiguration</b> is the main factory
-for creating a DataStore process subsystem. By deriving from it, extenders
-can create their customized DataStore process subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created ProcessServiceSubSystem or DStoreProcessService
- in a delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 e11794ba5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 713cccacf..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.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.processes.local;singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.processes.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.connectorservice.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.internal.subsystems.processes.local;x-internal:=true,
- 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 d4cc693f9..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 5, 2007</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 8a94f8ec6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
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 9d2402309..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Local Processes
-providerName = Eclipse.org - DSDP
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 3b1f06701..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/plugin.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2007 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.
- -->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
-<!-- ============================================== -->
-<!-- Define subsystem factories for sample -->
-<!-- ============================================== -->
-<!--
- <extension
- point="org.eclipse.rse.core.subsystemfactory">
- <factory
- systemTypeIds="org.eclipse.rse.systemtype.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.internal.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/internal/subsystems/processes/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/internal/subsystems/processes/local/Activator.java
deleted file mode 100644
index 6a69ceb08..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/internal/subsystems/processes/local/Activator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519] declaratively register rse.processes.ui adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.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.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/internal/subsystems/processes/local/LocalProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/internal/subsystems/processes/local/LocalProcessAdapter.java
deleted file mode 100644
index 4ae8ca1b7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/internal/subsystems/processes/local/LocalProcessAdapter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-
-}
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 23761c52e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/LocalProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [168975] Move RSE Events API to Core
- * Kevin Doyle (IBM) - [199871] LocalProcessService needs to implement getMessage()
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.local;
-
-
-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.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.internal.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.internal.services.local.ILocalService;
-import org.eclipse.rse.internal.services.local.processes.LocalProcessService;
-import org.eclipse.rse.internal.subsystems.processes.local.LocalProcessAdapter;
-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.ui.model.IHost)
- */
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#createProcessService(org.eclipse.rse.ui.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.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public Class getServiceImplType()
- {
- return ILocalService.class;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/package.html b/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/package.html
deleted file mode 100644
index 313941b73..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.local/src/org/eclipse/rse/subsystems/processes/local/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized local process subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized local process
-subsystems.
-<p>The class <b>LocalProcessSubSystemConfiguration</b> is the main factory
-for creating a local process subsystem. By deriving from it, extenders
-can create their customized local process subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created ProcessServiceSubSystem or LocalProcessService in a
- delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.classpath b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.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.shell.linux/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.project b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.project
deleted file mode 100644
index f78fb7841..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.processes.shell.linux</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.ui.prefs b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 07346397c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/.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.processes.shell.linux/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/META-INF/MANIFEST.MF
deleted file mode 100644
index af4aecf08..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/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.subsystems.processes.shell.linux;singleton:=true
-Bundle-Version: 1.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.processes.shell.linux.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.subsystems.processes.shell.linux;x-internal:=true,
- org.eclipse.rse.subsystems.processes.shell.linux
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/about.html b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/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 5, 2007</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.shell.linux/build.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/build.properties
deleted file mode 100644
index ed16768ae..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 MontaVista Software, 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:
-# Yufen Kuo (MontaVista) - initial API and implementation
-# Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
-################################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- icons/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystem_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystem_obj.gif
deleted file mode 100644
index e07b81aa6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystem_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystemlive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystemlive_obj.gif
deleted file mode 100644
index 96a447a71..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/icons/full/obj16/processsubsystemlive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.properties
deleted file mode 100644
index ef61b583f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 MontaVista Software, 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:
-# Yufen Kuo (MontaVista) - initial API and implementation
-# Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
-# Xuan Chen (IBM) - added NLS_MESSAGEFORMAT comments
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Linux Shell Processes
-providerName = Eclipse.org - DSDP
-
-ShellProcessSubsystemName=Shell Processes
-ShellProcessSubsystemDescription=This configuration allows you to work with processes on remote linux systems using any contributed Shell subsystem.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.xml
deleted file mode 100644
index ce7946cc0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-Copyright (c) 2006, 2007 MontaVista Software, 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:
-Yufen Kuo (MontaVista) - initial API and implementation
-Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<plugin>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.systemtype.linux"
- name="%ShellProcessSubsystemName"
- description="%ShellProcessSubsystemDescription"
- iconlive="icons/full/obj16/processsubsystemlive_obj.gif"
- icon="icons/full/obj16/processsubsystem_obj.gif"
- category="processes"
- class="org.eclipse.rse.subsystems.processes.shell.linux.ShellProcessSubSystemConfiguration"
- vendor="%providerName"
- priority="200"
- id="processes.shell.linux"/>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/Activator.java
deleted file mode 100644
index 57d6ef3e0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/Activator.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
- * Anna Dushistova (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-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.shells.IShellService;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystem;
-
-/**
- * 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.processes.shell.linux"; //$NON-NLS-1$
-
- /**
- * string to be echo'ed when running command in shell, used to indicate that
- * the command has finished running
- */
- public static String DONE_MARKUP_STRING = "--RSE:donedonedone:--"; //$NON-NLS-1$
-
- /**
- * command delimiter for shell
- */
- public final static String CMD_DELIMITER = ";"; //$NON-NLS-1$
-
- private final static String SHELL_EXIT_CMD = " exit "; //$NON-NLS-1$
-
- private final static String SHELL_ECHO_CMD = " echo "; //$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;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getDefault() == null) {
- // If the default instance is not yet initialized,
- // return a static identifier. This identifier must
- // match the plugin id defined in plugin.xml
- return PLUGIN_ID;
- }
- return getDefault().getBundle().getSymbolicName();
- }
-
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status
- * status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Logs an internal error with the specified message.
- *
- * @param message
- * the error message to log
- */
- public static void logErrorMessage(String message) {
- log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR,
- message, null));
- }
-
- /**
- * Logs an internal error with the specified throwable
- *
- * @param e
- * the exception to be logged
- */
- public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, e
- .getMessage(), e));
- }
-
- /**
- * format the command to be sent into the shell command with the done markup
- * string and the exit string. The done markup string is needed so we can
- * tell that end of output has been reached.
- *
- * @param cmd
- * @return formatted command string
- */
- public static String formatShellCommand(String cmd) {
- if (cmd == null || cmd.equals("")) //$NON-NLS-1$
- return cmd;
- StringBuffer formattedCommand = new StringBuffer();
- formattedCommand.append(cmd).append(CMD_DELIMITER);
- formattedCommand.append(SHELL_ECHO_CMD).append(DONE_MARKUP_STRING);
- formattedCommand.append(CMD_DELIMITER).append(SHELL_EXIT_CMD);
- return formattedCommand.toString();
- }
-
- /**
- * Find the first shell service associated with the host.
- *
- * @param host the connection
- * @return shell service object, or <code>null</code> if not found.
- */
- public static IShellService getShellService(IHost host) {
- ISubSystem ss = getSuitableSubSystem(host);
- if (ss!=null) {
- return (IShellService)ss.getSubSystemConfiguration().getService(host).getAdapter(IShellService.class);
- }
- return null;
- }
-
- /**
- * Find the first IShellServiceSubSystem service associated with the host.
- *
- * @param host the connection
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- public static ISubSystem getSuitableSubSystem(IHost host) {
- if (host == null)
- return null;
- ISubSystem[] subSystems = host.getSubSystems();
- IShellService ssvc = null;
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- IService svc = subSystems[i].getSubSystemConfiguration().getService(host);
- if (svc!=null) {
- ssvc = (IShellService)svc.getAdapter(IShellService.class);
- if (ssvc != null) {
- return subSystems[i];
- }
- }
- }
- return null;
- }
-
- /**
- * Find the first IProcessServiceSubSystem service associated with the host.
- *
- * @param host the connection
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- public static IProcessServiceSubSystem getProcessServiceSubSystem(IHost host) {
- if (host == null)
- return null;
- ISubSystem[] subSystems = host.getSubSystems();
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- if (subSystems[i] instanceof IProcessServiceSubSystem) {
- return (IProcessServiceSubSystem)subSystems[i];
- }
- }
- return null;
- }
-
- /**
- * append the error message into a string from reading the error Stream.
- *
- * @param errStream
- * @return error message
- */
- public static String getErrorMessage(InputStream errStream) {
-
- // error buffer
- StringBuffer errBuf = new StringBuffer();
-
- byte[] bytes = null;
-
- int numOfBytesRead = 0;
- try {
- int available = errStream.available();
- 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();
- }
-
- return errBuf.toString();
- } catch (IOException e) {
- Activator.log(e);
- }
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/DelegatingShellProcessConnectorService.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/DelegatingShellProcessConnectorService.java
deleted file mode 100644
index 5f878c884..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/DelegatingShellProcessConnectorService.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractDelegatingConnectorService;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystem;
-
-/**
- * This class delegates the connector service requests for the linux process
- * subsystem to the connector service of the shell subsystem.
- */
-public class DelegatingShellProcessConnectorService extends AbstractDelegatingConnectorService
-{
- private IConnectorService _realService;
-
- /**
- * @param host the linux host that is the target for this connector service.
- */
- public DelegatingShellProcessConnectorService(IHost host)
- {
- super(host);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractDelegatingConnectorService#getRealConnectorService()
- */
- public IConnectorService getRealConnectorService()
- {
- if (_realService != null)
- {
- return _realService;
- }
- else
- {
- ISubSystem ss = Activator.getSuitableSubSystem(getHost());
- if (ss != null)
- {
- _realService = ss.getConnectorService();
-
- // register the process subsystem
- IProcessServiceSubSystem ps = Activator.getProcessServiceSubSystem(getHost());
- _realService.registerSubSystem(ps);
- return _realService;
- }
- else
- {
- return null;
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxHostProcess.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxHostProcess.java
deleted file mode 100644
index 971fe1372..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxHostProcess.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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:
- * Yu-Fen Kuo (MontaVista) - adapted from RSE AbstractHostProcess
- * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import java.util.StringTokenizer;
-
-import org.eclipse.rse.services.processes.AbstractHostProcess;
-
-/**
- * This class parses one line of the process record at a time and saves property
- * value into it's member fields.
- *
- */
-public class LinuxHostProcess extends AbstractHostProcess {
-
- private static String NAME = "Name"; //$NON-NLS-1$
-
- private static String STATE = "State"; //$NON-NLS-1$
-
- private static String TGID = "Tgid"; //$NON-NLS-1$
-
- private static String PID = "Pid"; //$NON-NLS-1$
-
- private static String PPID = "PPid"; //$NON-NLS-1$
-
- private static String TRACERPID = "TracerPid"; //$NON-NLS-1$
-
- private static String UID = "Uid"; //$NON-NLS-1$
-
- private static String GID = "Gid"; //$NON-NLS-1$
-
- private static String VMSIZE = "VmSize"; //$NON-NLS-1$
-
- private static String VMRSS = "VmRSS"; //$NON-NLS-1$
-
- private static String STATUS_DELIMITER = "|"; //$NON-NLS-1$
-
- private LinuxProcessHelper linuxProcessHelper;
-
- /**
- * constructor
- *
- * @param linuxProcessHelper
- */
- public LinuxHostProcess(LinuxProcessHelper linuxProcessHelper) {
- super();
- this.linuxProcessHelper = linuxProcessHelper;
- }
-
- /**
- * process one line of process record and based on the property name, put
- * the corresponding value in the right member field(s). The state value
- * would get converted into state code before the value is saved.
- *
- * @param line
- * one line of the process record
- */
- public void processLine(String line) {
- String[] result = line.split(":"); //$NON-NLS-1$
- if (result.length < 2)
- return;
- String propertyName = result[0];
- String propertyValue = result[1].trim();
- if (NAME.equals(propertyName)) {
- this.setName(propertyValue);
- this.setLabel(propertyValue);
- // initialize some of the properties
- this.setVmSizeInKB("0"); //$NON-NLS-1$
- this.setVmRSSInKB("0"); //$NON-NLS-1$
- } else if (STATE.equals(propertyName)) {
- String firstValue = getFirstValue(propertyValue);
- if (firstValue != null)
- this.setState(linuxProcessHelper
- .convertToStateCode(propertyValue));
- } else if (TGID.equals(propertyName)) {
- this.setTgid(propertyValue);
- } else if (PID.equals(propertyName)) {
- this.setPid(propertyValue);
- } else if (PPID.equals(propertyName)) {
- this.setPPid(propertyValue);
- } else if (TRACERPID.equals(propertyName)) {
- this.setTracerPid(propertyValue);
- } else if (TRACERPID.equals(propertyName)) {
- this.setTracerPid(propertyValue);
- } else if (UID.equals(propertyName)) {
- String firstValue = getFirstValue(propertyValue);
- if (firstValue != null) {
- this.setUid(firstValue);
- this.setUsername(linuxProcessHelper.getUsername(firstValue));
- }
- } else if (GID.equals(propertyName)) {
- String firstValue = getFirstValue(propertyValue);
- if (firstValue != null)
- this.setGid(firstValue);
- } else if (VMSIZE.equals(propertyName)) {
- String firstValue = getFirstValue(propertyValue);
- if (firstValue != null)
- this.setVmSizeInKB(firstValue);
- } else if (VMRSS.equals(propertyName)) {
- String firstValue = getFirstValue(propertyValue);
- if (firstValue != null)
- this.setVmRSSInKB(firstValue);
- }
- }
-
- /**
- * checks if the line is a starting of a new process record New process
- * record should start with Name: string
- *
- * @param line
- * one line of process record
- * @return true if is a new process record
- */
- public static boolean isNewRecord(String line) {
- String[] result = line.split(":"); //$NON-NLS-1$
-
- if (result.length >= 2 && NAME.equals(result[0])) {
- return true;
- }
- return false;
- }
-
- private String getFirstValue(String propertyValue) {
- StringTokenizer st = new StringTokenizer(propertyValue);
- if (st.hasMoreTokens()) {
- return st.nextToken();
- }
- return null;
- }
-
- // "pid|name|status|tgid|ppid|tracerpid|uid|username|gid|vmSize|vmRSS"
- /**
- * format the property values in the format that IHostProcessFilter.allows()
- * can use it to determine if this process record is allowed by the filter
- * to be displayed to the user.
- *
- * @return formatted string in the following format:
- * "pid|name|status|tgid|ppid|tracerpid|uid|username|gid|vmSize|vmRSS"
- */
- public String getStatusLine() {
- StringBuffer statusLine = new StringBuffer();
- statusLine = statusLine.append(getPid()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getName()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getState()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getTgid()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getPPid()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getTracerPid()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getUid()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getUsername()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getGid()).append(STATUS_DELIMITER);
- statusLine = statusLine.append(getVmSizeInKB())
- .append(STATUS_DELIMITER);
- statusLine = statusLine.append(getVmRSSInKB()).append(STATUS_DELIMITER);
-
- return statusLine.toString();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java
deleted file mode 100644
index 86c9d0913..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxProcessHelper.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2009 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:
- * Yu-Fen Kuo (MontaVista) - adapted from RSE UniversalLinuxProcessHandler
- * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [175308] Need to use a job to wait for shell to exit
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- * Anna Dushistova (MontaVista) - [175300][performance] processes.shell.linux subsystem is slow over ssh
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-
-/**
- * Helper class that helps to get state code and user name info most of the code
- *
- */
-public class LinuxProcessHelper {
- private HashMap stateMap;
-
- private HashMap _usernamesByUid;
-
- private HashMap _uidsByUserName;
-
- private IHost _host;
-
- private static String COMMAND_GET_PASSWD = "getent passwd"; //$NON-NLS-1$
-
- /**
- * constructor
- */
- public LinuxProcessHelper(IHost host) {
- super();
- stateMap = new HashMap();
- for (int i = ISystemProcessRemoteConstants.STATE_STARTING_INDEX; i < ISystemProcessRemoteConstants.STATE_ENDING_INDEX; i++) {
- stateMap.put(new Character(ISystemProcessRemoteConstants.ALL_STATES[i]), ISystemProcessRemoteConstants.ALL_STATES_STR[i]);
- }
- _host = host;
- }
-
- /**
- * this code is adapted from
- * org.eclipse.rse.services.clientserver.processes.handlers.UniversalLinuxProcessHandler
- */
- public String convertToStateCode(String state) {
- String stateCode = " "; //$NON-NLS-1$
- if (state == null)
- return stateCode;
- if (state.trim().equals("")) //$NON-NLS-1$
- 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 + ","; //$NON-NLS-1$
- }
- }
- if (stateCode.trim().equals("")) //$NON-NLS-1$
- return " "; //$NON-NLS-1$
- else
- return stateCode.trim();
- }
-
- /**
- * this code is adapted from
- * org.eclipse.rse.services.clientserver.processes.handlers.UniversalLinuxProcessHandler
- */
- public void populateUsernames() {
- if (_usernamesByUid != null && _uidsByUserName != null || _host == null)
- return;
- _usernamesByUid = new HashMap();
- _uidsByUserName = new HashMap();
-
- IShellService shellService = Activator.getShellService(_host);
- Process p = null;
- try {
- IHostShell hostShell = shellService.launchShell("", null, new NullProgressMonitor()); //$NON-NLS-1$
- hostShell.writeToShell(getUserNameCommand());
- p = new HostShellProcessAdapter(hostShell);
- // when p.waitFor() is called here, the hostShell.isActive() always
- // return true.
- // p.waitFor();
- } catch (Exception e) {
- Activator.log(e);
- if (p != null) {
- p.destroy();
- }
- return;
- }
- BufferedReader bufferReader = new BufferedReader(
- new InputStreamReader(p.getInputStream()));
-
- String nextLine;
- try {
- while ((nextLine = bufferReader.readLine()) != null
- && !nextLine.equals(Activator.DONE_MARKUP_STRING)) {
- String[] fields = nextLine.split(":"); //$NON-NLS-1$
- 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);
- }
- }
- bufferReader.close();
- } catch (IOException e) {
- Activator.log(e);
- }
-
- // Wait for remote process to exit.
- WaiterJob waiter = new WaiterJob(p);
- waiter.schedule();
- }
-
- /**
- * Gets the uid associated with the given username on this system
- */
- public String getUid(String username) {
- if (_uidsByUserName != null)
- return (String) _uidsByUserName.get(username);
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Gets the username associated with the given uid on this system
- */
- public String getUsername(String uid) {
- String username = null;
- if (_usernamesByUid != null)
- username = (String) _usernamesByUid.get(uid);
- if (username != null && !username.equals("")) //$NON-NLS-1$
- return username;
- return uid;
- }
-
- protected String getUserNameCommand() {
- return Activator.formatShellCommand(COMMAND_GET_PASSWD);
- }
-
- public boolean isInitialized(){
- if (_usernamesByUid != null && _uidsByUserName != null){
- return true;
- }
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.java
deleted file mode 100644
index 102b755f6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Anna Dushistova (MontaVista) - [175300][performance] processes.shell.linux subsystem is slow over ssh
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import org.eclipse.osgi.util.NLS;
-
-public class LinuxShellProcessResources extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.subsystems.processes.shell.linux.LinuxShellProcessResources"; //$NON-NLS-1$
-
- public static String LinuxRemoteProcessService_name;
-
- public static String LinuxRemoteProcessService_description;
-
- public static String LinuxRemoteProcessService_monitor_fetchProcesses;
-
- public static String LinuxRemoteProcessService_getSignalTypes_empty;
-
- public static String LinuxShellProcessService_initHelper;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, LinuxShellProcessResources.class);
- }
-
- private LinuxShellProcessResources() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.properties
deleted file mode 100644
index 24ffc36b4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessResources.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 MontaVista Software, 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:
-# Yu-Fen Kuo (MontaVista) - initial API and implementation
-# Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
-# Xuan Chen (IBM) - added NLS_MESSAGEFORMAT comments
-# Anna Dushistova (MontaVista) - [175300][performance] processes.shell.linux subsystem is slow over ssh
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-LinuxRemoteProcessService_name=Shell Process Service
-LinuxRemoteProcessService_description=listing processes on the remote target through a contributed shell service
-LinuxRemoteProcessService_monitor_fetchProcesses=Fetching Remote Process Information...
-LinuxRemoteProcessService_getSignalTypes_empty=Failed to retrieve signal types from remote target.
-LinuxShellProcessService_initHelper=Populating usernames
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java
deleted file mode 100644
index 4a9808011..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/LinuxShellProcessService.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [175308] Need to use a job to wait for shell to exit
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable and add Javadoc
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- * Anna Dushistova (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- * Anna Dushistova (MontaVista) - [175300][performance] processes.shell.linux subsystem is slow over ssh
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-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.ISubSystem;
-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.processes.AbstractProcessService;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-
-/**
- * class to fetch remote linux target's process info
- *
- */
-public class LinuxShellProcessService extends AbstractProcessService {
-
- private static String COMMAND_GET_SIGNAL_TYPES = "kill -l"; //$NON-NLS-1$
-
- private static String COMMAND_GET_PROCESSES = "cat /proc/[0-9]*/status"; //$NON-NLS-1$
-
- private static String COMMAND_KILL_PROCESSES = "kill "; //$NON-NLS-1$
-
- private String[] statusTypes;
-
- private LinuxProcessHelper linuxProcessHelper;
-
- private IHost host;
-
- /**
- * constructor
- *
- * @param host the connection to work on
- */
- public LinuxShellProcessService(final IHost host) {
- this.host = host;
- }
-
- public String[] getSignalTypes() {
- if (statusTypes == null)
- statusTypes = internalGetSignalTypes();
- return statusTypes;
- }
-
- public boolean kill(final long PID, final String signal,
- final IProgressMonitor monitor) throws SystemMessageException {
- String signalString;
- if (signal
- .equals(ISystemProcessRemoteConstants.PROCESS_SIGNAL_TYPE_DEFAULT))
- signalString = ""; //$NON-NLS-1$
- else
- signalString = "-" + signal; //$NON-NLS-1$
- IShellService shellService = Activator.getShellService(host);
- IHostShell hostShell = shellService.launchShell(
- "", null, new NullProgressMonitor()); //$NON-NLS-1$
- hostShell.writeToShell(getKillCommand(PID, signalString));
- Process p = null;
- try {
- p = new HostShellProcessAdapter(hostShell);
- // p.waitFor();
- } catch (Exception e) {
- e.printStackTrace();
- if (p != null) {
- p.destroy();
- }
- return false;
- }
- // if (p.exitValue() != 0) {
- String errMsg = Activator.getErrorMessage(p.getErrorStream());
- if (!errMsg.trim().equals("")) { //$NON-NLS-1$
- Activator.logErrorMessage(errMsg.toString());
- } else
- return true;
- // }
- return false;
- }
-
- public IHostProcess[] listAllProcesses(final IHostProcessFilter filter,
- final IProgressMonitor monitor) throws SystemMessageException {
- // this is to workaround RSE bug 147531
- if (filter.getUsername().equals("${user.id}") && host != null) { //$NON-NLS-1$
- ISubSystem ss = Activator.getSuitableSubSystem(host);
- if (ss!=null) {
- // change filter username so the filter will filter out the right
- // process for my processes
- String connectionUserId=ss.getConnectorService().getUserId();
- filter.setUsername(connectionUserId);
- }
- }
-
- if (monitor != null) {
- monitor.beginTask(
- LinuxShellProcessResources.LinuxRemoteProcessService_monitor_fetchProcesses,
- 100);
- }
- if(!linuxProcessHelper.isInitialized()){
- // initialize username /uid hashmap before getting any process
- if (monitor != null) {
- monitor.setTaskName(LinuxShellProcessResources.LinuxShellProcessService_initHelper);
- }
- linuxProcessHelper.populateUsernames();
- if (monitor != null) {
- monitor.setTaskName(LinuxShellProcessResources.LinuxRemoteProcessService_monitor_fetchProcesses);
- }
- }
- IShellService shellService = Activator.getShellService(host);
- IHostShell hostShell = shellService.launchShell(
- "", null, new NullProgressMonitor()); //$NON-NLS-1$
- hostShell.writeToShell(getProcessesCommand());
- Process p = null;
- try {
- p = new HostShellProcessAdapter(hostShell);
- // p.waitFor();
- } catch (Exception e) {
- e.printStackTrace();
- if (p != null) {
- p.destroy();
- }
- return null;
- }
- BufferedReader bufferReader = new BufferedReader(
- new InputStreamReader(p.getInputStream()));
-
- String nextLine;
- LinuxHostProcess hostProcess = null;
- final ArrayList hostProcessList = new ArrayList();
- try {
- while ((nextLine = bufferReader.readLine()) != null
- && !nextLine.equals(Activator.DONE_MARKUP_STRING)) {
- if ((hostProcess == null)
- || LinuxHostProcess.isNewRecord(nextLine)) {
- if (hostProcess != null) {
- boolean allows = filter.allows(hostProcess
- .getStatusLine());
- if (allows)
- hostProcessList.add(hostProcess);
- }
- hostProcess = new LinuxHostProcess(linuxProcessHelper);
- }
-
- hostProcess.processLine(nextLine);
- if (progressWorked(monitor, 1)) {
- break;
- }
- }
- if (hostProcess != null) {
- // add the last record if allows by filter
- boolean allows = filter.allows(hostProcess.getStatusLine());
- if (allows)
- hostProcessList.add(hostProcess);
- }
- bufferReader.close();
- } catch (IOException e) {
- Activator.log(e);
- }
-
- // Wait for remote process to exit.
- WaiterJob waiter = new WaiterJob(p);
- waiter.schedule();
-
- return (IHostProcess[]) hostProcessList
- .toArray(new IHostProcess[hostProcessList.size()]);
- }
-
- public String getDescription() {
- return LinuxShellProcessResources.LinuxRemoteProcessService_description;
- }
-
- public String getName() {
- return LinuxShellProcessResources.LinuxRemoteProcessService_name;
- }
-
- public void initService(final IProgressMonitor monitor) throws SystemMessageException {
- super.initService(monitor);
- linuxProcessHelper = new LinuxProcessHelper(host);
- }
-
- private boolean progressWorked(final IProgressMonitor monitor,
- final int work) {
- boolean cancelRequested = false;
- if (monitor != null) {
- monitor.worked(work);
- cancelRequested = monitor.isCanceled();
- }
- return cancelRequested;
- }
-
- /**
- * Returns a list of the signal types supported by the 'kill' command on
- * this system. Signal Types will be used in the Kill dialog for user to
- * choose which signal they want to use for killing a process.
- *
- * @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() {
- IShellService shellService = Activator.getShellService(host);
- Process p = null;
- try {
- IHostShell hostShell = shellService.launchShell("", null, new NullProgressMonitor()); //$NON-NLS-1$
- hostShell.writeToShell(getSignalTypesCommand());
- p = new HostShellProcessAdapter(hostShell);
- // p.waitFor();
- } catch (Exception e) {
- Activator.log(e);
- if (p != null) {
- p.destroy();
- }
- return null;
- }
- BufferedReader bufferReader = new BufferedReader(
- new InputStreamReader(p.getInputStream()));
- String line = null;
- ArrayList lines = null;
- try {
-
- StringBuffer output = new StringBuffer();
- while ((line = bufferReader.readLine()) != null
- && !line.equals(Activator.DONE_MARKUP_STRING)) {
- output = output.append(line);
- }
- bufferReader.close();
-
- if (output.length() > 0) {
- StringTokenizer st = new StringTokenizer(output.toString());
- lines = new ArrayList();
- while (st.hasMoreTokens()) {
- String token = st.nextToken().trim();
- if (token.matches("([A-Z]*)")) { //$NON-NLS-1$
- lines.add(token);
- }
- }
- }
- } catch (IOException e) {
- Activator.log(e);
- }
-
- // Wait for remote process to exit.
- WaiterJob waiter = new WaiterJob(p);
- waiter.schedule();
-
- if (lines == null || lines.size() <= 0) {
- Activator.logErrorMessage(LinuxShellProcessResources.LinuxRemoteProcessService_getSignalTypes_empty);
- } else {
- return (String[]) lines.toArray(new String[lines.size()]);
- }
- return null;
-
- }
-
- protected String getSignalTypesCommand() {
- return Activator.formatShellCommand(COMMAND_GET_SIGNAL_TYPES);
- }
-
- protected String getProcessesCommand() {
- return Activator.formatShellCommand(COMMAND_GET_PROCESSES);
- }
-
- protected String getKillCommand(final long PID, final String signalString) {
- String cmdLine = COMMAND_KILL_PROCESSES + signalString + " " + PID; //$NON-NLS-1$
- return Activator.formatShellCommand(cmdLine);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/ShellProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/ShellProcessAdapter.java
deleted file mode 100644
index e279e0bb8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/ShellProcessAdapter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-import java.util.ArrayList;
-
-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;
-
-/**
- * Utility class to convert host process records into remote process records
- *
- */
-public class ShellProcessAdapter implements IHostProcessToRemoteProcessAdapter {
-
- /**
- * Convert a set of IHostProcess objects to IRemoteProcess objects.
- *
- * @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(
- final IRemoteProcessContext context, final IRemoteProcess parent,
- final IHostProcess[] nodes) {
- if (nodes == null)
- return null;
-
- final ArrayList list = new ArrayList(nodes.length);
-
- for (int idx = 0; idx < nodes.length; idx++) {
- final LinuxHostProcess node = (LinuxHostProcess) nodes[idx];
- final IRemoteProcess newProcess = new RemoteProcessImpl(context,
- node);
- list.add(newProcess);
- }
-
- final IRemoteProcess[] processes = new IRemoteProcess[list.size()];
-
- for (int idx = 0; idx < list.size(); idx++) {
- processes[idx] = (IRemoteProcess) list.get(idx);
- }
-
- return processes;
- }
-
- /**
- * Convert a single IHostProcess object to an IRemoteProcess object.
- *
- * @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(
- final IRemoteProcessContext context, final IRemoteProcess parent,
- final IHostProcess node) {
- final IHostProcess[] nodes = new IHostProcess[1];
- nodes[0] = node;
-
- final 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.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/WaiterJob.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/WaiterJob.java
deleted file mode 100644
index 77aa772f4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/internal/subsystems/processes/shell/linux/WaiterJob.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [175308] Need to use a job to wait for shell to exit
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.processes.shell.linux;
-
-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;
-
-class WaiterJob extends Job
-{
- private Process _p;
- public WaiterJob(Process p)
- {
- super("LinuxShellProcessWaiter"); //$NON-NLS-1$
- _p = p;
- setSystem(true);
- }
-
- public IStatus run(IProgressMonitor monitor) {
- try {
- _p.waitFor();
- if (_p.exitValue()!=0)
- {
- String errMsg = Activator.getErrorMessage(_p.getErrorStream());
- if (!errMsg.trim().equals("")) { //$NON-NLS-1$
- Activator.logErrorMessage(errMsg.toString());
- }
- }
- } catch(InterruptedException e) {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/ShellProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/ShellProcessSubSystemConfiguration.java
deleted file mode 100644
index 11eb6aa29..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/ShellProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Yu-Fen Kuo (MontaVista) - adapted from RSE ProcessServiceSubSystemConfiguration
- * Martin Oberhuber (Wind River) - [refactor] "shell" instead of "ssh" everywhere
- * Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
- * Anna Dushistova (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.shell.linux;
-
-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.processes.shell.linux.Activator;
-import org.eclipse.rse.internal.subsystems.processes.shell.linux.DelegatingShellProcessConnectorService;
-import org.eclipse.rse.internal.subsystems.processes.shell.linux.LinuxShellProcessService;
-import org.eclipse.rse.internal.subsystems.processes.shell.linux.ShellProcessAdapter;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.services.shells.IShellService;
-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;
-
-/**
- * This class is used by org.eclipse.rse.core.subsystemConfigurations extension
- * that defines the process subsystem using ssh protocol on linux remote
- * targets.
- *
- */
-public class ShellProcessSubSystemConfiguration extends
- ProcessServiceSubSystemConfiguration {
- protected IHostProcessToRemoteProcessAdapter hostProcessAdapter;
-
- public ISubSystem createSubSystemInternal(IHost conn) {
- IConnectorService connectorService = getConnectorService(conn);
- ISubSystem subsys = new ProcessServiceSubSystem(conn, connectorService,
- getProcessService(conn), getHostProcessAdapter());
- return subsys;
- }
-
- public IHostProcessToRemoteProcessAdapter getHostProcessAdapter() {
- if (hostProcessAdapter == null) {
- hostProcessAdapter = new ShellProcessAdapter();
- }
- return hostProcessAdapter;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- ISubSystem ss = Activator.getSuitableSubSystem(host);
- if (ss!=null)
- {
- return ss.getConnectorService();
- }
- else
- {
- return new DelegatingShellProcessConnectorService(host);
- }
- }
-
- public Class getServiceImplType() {
- return IShellService.class;
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService) {
- //Nothing to do here since we just re-use the existing IShellServiceSubSystem
- }
-
- public IProcessService createProcessService(IHost host) {
- return new LinuxShellProcessService(host);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/package.html b/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/package.html
deleted file mode 100644
index 63477148b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.shell.linux/src/org/eclipse/rse/subsystems/processes/shell/linux/package.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized shell process subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized shell process
-subsystems.
-<p>The class <b>ShellProcessSubSystemConfiguration</b> is the main factory
-for creating a shell process subsystem: a process subsystem that gathers
-its data by running commands on a remote system through a shell subsystem
-that's registered against the same host. By deriving from it, extenders
-can create their customized shell process subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created ProcessServiceSubSystem or LinuxShellProcessService
- in a delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 e31514c50..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 888d065be..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/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.core
-Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.shells.core.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.resources,
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.shells.core;x-internal:=true,
- org.eclipse.rse.internal.subsystems.shells.servicesubsystem;x-internal:=true,
- org.eclipse.rse.internal.subsystems.shells.subsystems;x-internal:=true,
- 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 d4cc693f9..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 5, 2007</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 a57d4d0a1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 4ac02e9b7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Shells Core
-providerName = Eclipse.org - DSDP
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/Activator.java
deleted file mode 100644
index 4fa761865..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/Activator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [180519] declaratively register rse.shells.ui. adapter factories
- * Martin Oberhuber (wind River) - [203105] Decouple recursive plugin activation of UI adapters
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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/internal/subsystems/shells/core/ShellStrings.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.java
deleted file mode 100644
index 095391537..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [181066] NLS missing messages with DAEMON and Shells
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ShellStrings extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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;
-
- public static String MSG_CONNECT_FAILED;
-
-
- static
- {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ShellStrings.class);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.properties
deleted file mode 100644
index ae1998a74..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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:
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
-###############################################################################
-
-# 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
-
-MSG_CONNECT_FAILED = Connect to {0} failed with an unexpected exception
-
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 77fc6278d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [197848] Fix shell terminated state when remote dies
- ********************************************************************************/
-
-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.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.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.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
- {
- ISystemRegistry registry = RSECorePlugin.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()));
- }
-
- //Bug 197848: Artificial event for shell termination
- if (_outputs.length == 0 && !_command.isActive()) {
- ISubSystem subsys = _command.getCommandSubSystem();
- //update action states in commands view
- registry.fireEvent(
- new SystemResourceChangeEvent(_command, ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_FINISHED, subsys));
- //update "connected" overlay in SystemView
- registry.fireEvent(
- new SystemResourceChangeEvent(_command, ISystemResourceChangeEvents.EVENT_REFRESH, subsys));
- }
- }
- }
- 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/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 722f7216e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David McKnight (IBM) - [208813] removing deprecated APIs
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.subsystems;
-
-
-
-
-
-
-
-import org.eclipse.rse.core.subsystems.IRemoteSystemEnvVar;
-
-/**
- * Encapsulation of environment variable properties set uniquely per connection.
- */
-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;
-
-
- 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.
- */
- 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();
- }
-
-}
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/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 82e6aa26a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [219975] Fix implementations of clone()
- ********************************************************************************/
-
-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.
- * <p>
- * Clients may use or subclass this class. When subclassing, clients need to
- * ensure that the subclass is always capable of performing a deep clone
- * operation with the {@link #clone()} method, so if they add fields of
- * complex type, these need to be dealt with by overriding {@link #clone()}.
- */
-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;
- }
-
- /**
- * Serialize into a string capturing all the attributes
- */
- public String toString()
- {
- return shellStr;
- }
-
- /**
- * Clone this into another filter string object with the same attributes.
- *
- * Subclasses must ensure that such a deep copy operation is always
- * possible, so their state must always be cloneable. Which should
- * always be possible to achieve, since this Object also needs to be
- * serializable.
- */
- public Object clone()
- {
- RemoteCommandFilterString copy = null;
- try {
- copy = (RemoteCommandFilterString)super.clone();
- } catch(CloneNotSupportedException e) {
- //assert false; //can never happen
- throw new RuntimeException(e);
- }
- if (types!=null)
- {
- //duplicate the array in case somebody changes its contents
- copy.types = (String[])types.clone();
- }
- 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/RemoteCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java
deleted file mode 100644
index db3a01f8b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-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.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.RSECorePlugin;
-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.subsystems.shells.core.subsystems.RemoteCmdSubSystem;
-
-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()
- {
- Object[] array = new Object[_output.size()];
- synchronized (_output)
- {
- _output.toArray(array);
- }
- return array;
- }
-
- 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 = RSECorePlugin.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;
- }
-
- /**
- * Returns the context of this Shell as a String for persistence.
- * The context is typically the current working directory.
- * Returns an empty String if no context can be determined.
- *
- * @return The current context as String, or an empty String
- * if no context exists. Never returns <code>null</code>.
- */
- public String getContextString()
- {
- if(_cwd != null) {
- return _cwd.getAbsolutePath();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * 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 the working directory.
- */
- public void setWorkingDirectory(IRemoteFile file)
- {
- _cwd = file;
- }
-
- protected boolean isWindows()
- {
- return getCommandSubSystem().getHost().getSystemType().isWindows();
- }
-
-
-
- /**
- * 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/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 354b2c021..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShellOperation.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-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.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.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.SystemBasePlugin;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Base class for command shell wrappers that use echo markers to parse command finish.
- * 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, ISystemShellProvider
-{
-
- 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
- {
- RSECorePlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- _remoteCmdShell = _cmdSubSystem.runShell(_pwd, new NullProgressMonitor());
- }
- 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()
- {
- RSECorePlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- if (_remoteCmdShell != null && _remoteCmdShell.isActive())
- {
- try
- {
- _cmdSubSystem.cancelShell(_remoteCmdShell, new NullProgressMonitor());
- }
- 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, new NullProgressMonitor());
-
- }
- 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, new NullProgressMonitor());
-
- }
- 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 (on the main Thread) 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 (on the main Thread) when the shell is complete
- */
- public void handleShellFinished()
- {
- finish();
- }
-
- /**
- * Called (on the main Thread) when the specified command is complete
- *
- * @param cmd the completed command
- */
- public abstract void handleCommandFinished(String cmd);
-
- /**
- * Called (on the main Thread) 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/RemoteError.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteError.java
deleted file mode 100644
index f98e732a3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteError.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.subsystems.shells.core.model;
-
-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);
- }
-
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteOutput.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteOutput.java
deleted file mode 100644
index 2b4abd601..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteOutput.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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.subsystems.shells.core.model;
-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;
- }
-
- public String toString(){
- return getLabel();
- }
-}
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 fb76de4fe..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-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;
-
-public class SimpleCommandOperation
-{
- protected IRemoteCmdSubSystem _subsystem;
- protected IRemoteFile _workingDirectory;
- protected IRemoteCommandShell _cmdShell;
- protected List _envVars;
- protected int _outputLineIndex = 0;
- protected boolean _runAsShell = false;
-
- public SimpleCommandOperation(IRemoteCmdSubSystem subsystem, IRemoteFile workingDirectory, boolean runAsShell)
- {
- _subsystem = subsystem;
- _workingDirectory = workingDirectory;
- _envVars = new ArrayList();
- _runAsShell = runAsShell;
- }
-
- public IRemoteCommandShell getCommandShell()
- {
- return _cmdShell;
- }
-
- public void setEnvironmentVariable(String name, String value)
- {
- _envVars.add(name + "=" + value); //$NON-NLS-1$
-
- }
-
- public void setEnvironmentVariables(String[] names, String[] values)
- {
- for (int i = 0; i < names.length; i++)
- {
- setEnvironmentVariable(names[i], values[i]);
- }
- }
-
- public void setEnvironmentVariables(String[] vars)
- {
- for (int i = 0; i < vars.length; i++)
- {
- _envVars.add(vars[i]);
- }
- }
-
- public String[] getEnvironmentVariables()
- {
- String[] vars = new String[_envVars.size()];
- for (int i = 0; i < vars.length; i++)
- {
- vars[i] = (String)_envVars.get(i);
- }
- return vars;
- }
-
- /**
- * Run a command
- * @param command the command to run
- * @param exitShell indicates whether to exit the shell after running the command
- * @throws Exception
- */
- public void runCommand(String command, boolean exitShell) throws Exception
- {
- if (_runAsShell)
- {
- _cmdShell = _subsystem.runShell(_workingDirectory, null);
-
-
- _subsystem.sendCommandToShell(command, _cmdShell, new NullProgressMonitor());
- if (exitShell)
- {
- _subsystem.sendCommandToShell("exit", _cmdShell, new NullProgressMonitor()); //$NON-NLS-1$
- }
- }
- else
- {
-
- Object[] result =_subsystem.runCommand(command, _workingDirectory, false, new NullProgressMonitor());
- _cmdShell= (IRemoteCommandShell)result[0];
- }
- }
-
- /**
- * Launch a shell with the specified exports and command
- * @param exports the command to initialize the shell environment
- * @param command the command to run
- * @param exitShell indicates whether to exit the shell after running the command
- * @throws Exception
- */
- public void runCommandInShell(String exports, String command, boolean exitShell) throws Exception
- {
- _runAsShell = true;
- _cmdShell = _subsystem.runShell(_workingDirectory, null);
-
- if (exports != null)
- {
- _subsystem.sendCommandToShell(exports, _cmdShell, new NullProgressMonitor());
- }
- _subsystem.sendCommandToShell(command, _cmdShell, new NullProgressMonitor());
- if (exitShell)
- {
- exitShell();
- }
- }
-
- public void removeShell()
- {
- try
- {
- _subsystem.removeShell(_cmdShell);
- }
- catch (Exception e)
- {
- }
- }
-
- public void exitShell()
- {
- if (_runAsShell)
- {
- try
- {
- _subsystem.sendCommandToShell("exit", _cmdShell, new NullProgressMonitor()); //$NON-NLS-1$
- }
- catch (Exception e)
- {
- }
- }
- }
-
- public void putInput(String input) throws Exception
- {
- if (isActive())
- {
- _subsystem.sendCommandToShell(input, _cmdShell, new NullProgressMonitor());
- }
- }
-
- public boolean isActive()
- {
- if (_cmdShell != null)
- {
- return _cmdShell.isActive();
- }
- return false;
- }
-
- protected boolean hasMoreOutput()
- {
- if (_cmdShell != null)
- {
- if (_cmdShell.getSize() > _outputLineIndex)
- {
- return true;
- }
- else if (_cmdShell.listOutput().length > _outputLineIndex)
- {
- return true;
- }
- }
- return false;
- }
-
- public void cancelCommand() throws Exception
- {
- if (_cmdShell != null && _cmdShell.isActive())
- {
- _cmdShell.getCommandSubSystem().cancelShell(_cmdShell, null);
- }
- }
-
-
- public String readLine(boolean waitForOutput)
- {
- if (_cmdShell != null)
- {
- boolean isActive = true;
- if (!hasMoreOutput() && waitForOutput)
- {
- while (!hasMoreOutput() && isActive)
- {
-
- try
- {
- isActive = isActive();
- Thread.sleep(100);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- {
- Object[] out = _cmdShell.listOutput();
- if (out.length > _outputLineIndex)
- {
- Object output = out[_outputLineIndex];
- _outputLineIndex++;
- if (output instanceof IRemoteOutput)
- {
- return ((IRemoteOutput)output).getText();
- }
- else if (output instanceof IRemoteFile)
- {
- return ((IRemoteFile)output).getLabel();
- }
-
-
- }
- else if (!isActive)
- {
- return null;
- }
-
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-}
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 74b80bc89..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [208813] removing deprecated APIs
- * David McKnight (IBM) - [247533] [apidoc] IRemoteCmdSubSystem#runCommand() Javadocs do not match implementation
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.IRemoteSystemEnvVar;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * 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.
- * @param monitor the progress monitor
- * @return Array of objects that are the result of running this command. In a typical use, such as a
- * command run from a shell, there is only one result in the array and that is the IRemoteCommandShell
- * object. In that cause, the lines of output for the shell are contained as children under the
- * IRemoteCommandShell object.
- *
- */
- public Object[] runCommand(String command, Object context, IProgressMonitor monitor) 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
- * @param monitor the progress monitor
- * @return Array of objects that are the result of running this command. In a typical use, such as a
- * command run from a shell, there is only one result in the array and that is the IRemoteCommandShell
- * object. In that cause, the lines of output for the shell are contained as children under the
- * IRemoteCommandShell object.
- */
- public Object[] runCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor) 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.
- * @param monitor the progress monitor
- * @return An object that represents the command and it's output.
- *
- */
- public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) 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.
- * @param monitor the progress monitor
- */
- public void sendCommandToShell(String input, Object commandObject, IProgressMonitor monitor) throws Exception;
-
- /**
- * Cancel a shell or running command.
- * @param commandObject the shell or command to cancel
- * @param monitor the progress monitor
- *
- */
- public void cancelShell(Object commandObject, IProgressMonitor monitor) 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();
-
- /**
- * 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();
-
- 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 ac4b4cf02..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystemConfiguration.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - Get rid of invalid Javadoc
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-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 180d286fa..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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();
-
- /**
- * Get the current context for this command shell as a string. Unlike getContext(), this method
- * simply returns a string representation of the context (so that no query is required to get the
- * working directory).
- * @return the context as a string
- */
- public String getContextString();
-
- /**
- * 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();
-}
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/RemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java
deleted file mode 100644
index cb3d1c6a5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java
+++ /dev/null
@@ -1,1293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [230285] [shells] Remote shells should be restored on quit and re-start of RSE
- * David McKnight (IBM) - [252708] Saving Profile Job happens when not changing Property Values on Connections
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-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.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISystemRegistry;
-import org.eclipse.rse.core.model.PropertyList;
-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.ISubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.internal.subsystems.shells.core.ShellStrings;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteSystemEnvVar;
-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.model.RemoteOutput;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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
-{
- private static String COMMAND_SHELLS_MEMENTO = "commandshells"; //$NON-NLS-1$
- private static String ENVIRONMENT_VARS = "EnvironmentVariables"; //$NON-NLS-1$
-
- protected ArrayList _cmdShells;
-
- protected IRemoteCommandShell _defaultShell;
-
- protected IRemoteFileSubSystem _fileSubSystem;
-
- public RemoteCmdSubSystem(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- _cmdShells = new ArrayList();
- }
-
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException {
- super.initializeSubSystem(monitor);
- // load UI plugin for adapters right after successful connect
- Platform.getAdapterManager().loadAdapter(new RemoteOutput(null, ""), "org.eclipse.rse.ui.view.ISystemViewElementAdapter"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Return parent subsystem factory, cast to a RemoteCmdSubSystemConfiguration
- */
- public IRemoteCmdSubSystemConfiguration getParentRemoteCmdSubSystemConfiguration()
- {
- return (IRemoteCmdSubSystemConfiguration) super.getSubSystemConfiguration();
- }
-
- /**
- * 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())
- {
- String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
-
- throw new OperationCanceledException(msgTxt);
- }
- 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() {
- IPropertySet environmentVariables = getEnvironmentVariables();
- String[] names = environmentVariables.getPropertyKeys();
- IRemoteSystemEnvVar[] result = new IRemoteSystemEnvVar[names.length];
- for (int i = 0; i < names.length; i++) {
- String name = names[i];
- String value = environmentVariables.getPropertyValue(name);
- IRemoteSystemEnvVar v = new RemoteSystemEnvVar();
- v.setName(name);
- v.setValue(value);
- result[i] = v;
- }
- return result;
- }
-
-
- private boolean areVariablesTheSame(String[] names, String[] values)
- {
- IPropertySet environmentVariables = getPropertySet(ENVIRONMENT_VARS);
- if (environmentVariables == null || names == null){
- return false;
- }
- else {
- String[] originalNames = environmentVariables.getPropertyKeys();
- if (originalNames.length != names.length){
- return false;
- }
- else {
- for (int i = 0; i < names.length; i++){
- String name = names[i];
- String originalName = originalNames[i];
-
- // names should be the same (i.e. in same order)
- if (!name.equals(originalName)){
- return false;
- }
- else {
- String value = values[i];
- String originalValue = environmentVariables.getPropertyValue(name);
- if (!value.equals(originalValue)){
- return false;
- }
- }
- }
- }
- }
- return true;
- }
- /**
- * 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.
- * @param names the array of names
- * @param values the array of string values
- */
- public void setEnvironmentVariableList(String[] names, String[] values) {
- if (areVariablesTheSame(names, values)){
- // unchanged so don't bother doing anything
- return;
- }
-
- removePropertySet(ENVIRONMENT_VARS);
- IPropertySet environmentVariables = getEnvironmentVariables();
- if (names != null) {
- for (int i = 0; i < names.length; i++) {
- environmentVariables.addProperty(names[i], values[i]);
- }
- }
- try {
- if (getSubSystemConfiguration() != null) getSubSystemConfiguration().saveSubSystem(this);
- } catch (Exception exc) {
- RSECorePlugin.getDefault().getLogger().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) {
- IPropertySet environmentVariables = getEnvironmentVariables();
- environmentVariables.addProperty(name, value);
- commit();
- }
-
- /**
- * Add environment variable entry, given a RemoteSystemEnvVar object
- */
- public void addEnvironmentVariable(IRemoteSystemEnvVar rsev) {
- addEnvironmentVariable(rsev.getName(), rsev.getValue());
- }
-
- /**
- * Remove environment variable entry given its RemoteSystemEnvVar object
- * @param rsev the remote system environment variable to remove
- */
- public void removeEnvironmentVariable(IRemoteSystemEnvVar rsev) {
- removeEnvironmentVariable(rsev.getName());
- }
-
- /**
- * Remove environment variable entry given only its environment variable
- * name
- */
- public void removeEnvironmentVariable(String name) {
- IPropertySet environmentVariables = getEnvironmentVariables();
- environmentVariables.removeProperty(name);
- commit();
- }
-
- /**
- * Given an environment variable name, find its RemoteSystemEnvVar object.
- * Returns null if not found.
- */
- public IRemoteSystemEnvVar getEnvironmentVariable(String name) {
- IRemoteSystemEnvVar result = null;
- String value = getEnvironmentVariableValue(name);
- if (value != null) {
- result = new RemoteSystemEnvVar();
- result.setName(name);
- result.setValue(value);
- }
- return result;
- }
-
- /**
- * Given an environment variable name, find its value. Returns null if not
- * found.
- */
- public String getEnvironmentVariableValue(String name) {
- IPropertySet environmentVariables = getEnvironmentVariables();
- String value = environmentVariables.getPropertyValue(name);
- return value;
- }
-
- /**
- *
- */
- protected String[] getEnvVarsAsStringArray() {
- IPropertySet environmentVariables = getEnvironmentVariables();
- String[] names = environmentVariables.getPropertyKeys();
- String[] result = new String[names.length];
- for (int i = 0; i < names.length; i++) {
- String name = names[i];
- String value = environmentVariables.getPropertyValue(name);
- result[i] = name + "=" + value; //$NON-NLS-1$
- }
- return result;
- }
-
- 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()
- {
- return getHost().getSystemType().isWindows();
- }
-
- /**
- * 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$\
- IProgressMonitor monitor = new NullProgressMonitor();
- 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, monitor);
- 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(String,IProgressMonitor)
- */
- protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor)
- throws InvocationTargetException, 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 output ID.
- *
- * @see ISubSystem#getObjectWithAbsoluteName(String, IProgressMonitor)
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) 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) {
- if (outKey != null) {
- int outIndex = Integer.parseInt(outKey);
- return theCmd.getOutputAt(outIndex);
- }
- return theCmd;
- }
- //fallback to return filter reference or similar
- return super.getObjectWithAbsoluteName(key, monitor);
- }
-
- // 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.getContextString();
- if (context instanceof String)
- {
- shellBuffer.append(context);
- gotShell = true;
- }
- else
- {
- shellBuffer.append(cmd.getType());
- gotShell = true;
- }
- }
- }
-
- IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
- if (set == null){
- set = createPropertySet("Remote"); //$NON-NLS-1$
- }
- if (set != null)
- {
- IProperty property = set.getProperty(COMMAND_SHELLS_MEMENTO);
- if (property == null){
- property = set.addProperty(COMMAND_SHELLS_MEMENTO, shellBuffer.toString());
- }
- else {
- property.setValue(shellBuffer.toString());
- }
- }
- commit();
- }
-
- protected void internalRemoveShell(Object command) throws InvocationTargetException,
- InterruptedException
- {
- if (command instanceof IRemoteCommandShell)
- {
- IRemoteCommandShell cmdShell = (IRemoteCommandShell) command;
- if (cmdShell.isActive())
- {
- internalCancelShell(command, null);
- }
- if (_defaultShell == command)
- {
- _defaultShell = null;
- }
- cmdShell.removeOutput();
- _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 = null;
- IPropertySet set = getPropertySet("Remote"); //$NON-NLS-1$
- if (set != null)
- {
- shellStr = set.getPropertyValue(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(context, null);
- results[numShells] = rmtCmd;
- numShells++;
- }
- catch (Exception e)
- {
- }
- }
- }
- }
-
- //ISystemRegistry registry = RSECorePlugin.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.ui.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()
- {
- ISystemRegistry registry = RSECorePlugin.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()
- {
- ISystemRegistry registry = RSECorePlugin.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()
- {
- RSECorePlugin.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;
- }
- }
-
- private IPropertySet getEnvironmentVariables() {
- IPropertySet environmentVariables = getPropertySet(ENVIRONMENT_VARS);
- if (environmentVariables == null) {
- environmentVariables = createPropertySet(ENVIRONMENT_VARS);
- }
- return environmentVariables;
- }
-
- public IPropertySet createPropertySet(String name) {
- IPropertySet result = null;
- if (name.equals(ENVIRONMENT_VARS)) {
- result = new PropertyList(ENVIRONMENT_VARS);
- addPropertySet(result);
- } else {
- result = super.createPropertySet(name);
- }
- return result;
- }
-
- /**
- * overridden so that for universal we don't need to do in modal thread
- *
- * @deprecated use
- * {@link #runCommand(String, Object, boolean, IProgressMonitor)}
- */
- public Object[] runCommand(String command, Object context, boolean interpretOutput) throws Exception
- {
- return internalRunCommand(command, context, interpretOutput, null);
- }
-
- /**
- * overridden so that for universal we don't need to do in modal thread
- */
- public Object[] runCommand(String command, Object context, boolean interpretOutput, IProgressMonitor monitor) throws Exception
- {
- return internalRunCommand(command, context, interpretOutput, monitor);
- }
-
- /**
- * overridden so that for universal we don't need to do in modal thread
- *
- * @deprecated use {@link #runShell(Object, IProgressMonitor)}
- */
- public IRemoteCommandShell runShell(Object context) throws Exception
- {
- IRemoteCommandShell cmdShell = null;
- if (isConnected())
- {
- cmdShell = internalRunShell(context, null);
- }
- else
- {
- return null;
- }
-
-
- Refresh refreshOnMain = new Refresh(this);
- Display.getDefault().asyncExec(refreshOnMain);
-
- return cmdShell;
- }
-
-
-
- /**
- * overridden so that for universal we don't need to do in modal thread
- */
- public IRemoteCommandShell runShell(Object context, IProgressMonitor monitor) throws Exception
- {
- IRemoteCommandShell cmdShell = internalRunShell(context, monitor);
-
- Refresh refreshOnMain = new Refresh(this);
- Display.getDefault().asyncExec(refreshOnMain);
-
- 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.
- *
- * @deprecated use {@link #runCommand(String, Object, IProgressMonitor)}
- */
- public Object[] runCommand(String command, Object context) throws Exception
- {
- return runCommand(command, context, true);
- }
-
- /**
- * 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, IProgressMonitor monitor) throws Exception
- {
- return runCommand(command, context, true, monitor);
- }
-
-
-
- /**
- * 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.
- * @param monitor the progress monitor
- */
- public void sendCommandToShell(String input, Object commandObject, IProgressMonitor monitor) throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- internalSendCommandToShell(input, commandObject, monitor);
- }
- 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(commandObject, null);
- }
- else
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
- if (ok)
- {
- try
- {
- CancelShellJob job = new CancelShellJob(commandObject);
- scheduleJob(job, null);
- }
- 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$
- }
- }
-
- /**
- * Cancel a shell or running command.
- * @param commandObject the shell or command to cancel.
- * @param monitor the progress monitor
- */
- public void cancelShell(Object commandObject, IProgressMonitor monitor) throws Exception
- {
- boolean ok = true;
- if (!isConnected())
- ok = promptForPassword();
-
- if (ok)
- {
- internalCancelShell(commandObject, monitor);
- }
- 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
- {
- RemoveShellJob job = new RemoveShellJob(commandObject);
- scheduleJob(job, null);
- }
- 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))
- {
- String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
-
- throw new Exception(msgTxt);
- }
- runOutputs = internalRunCommand(_cmd, _runContext, _runInterpret, mon);
- }
- }
-
- /**
- * 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)){
-
- String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = new Object[]
- {
- internalRunShell(_runContext, mon)
- };
- }
- }
-
- /**
- * 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))
- {
- String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
-
- throw new Exception(msgTxt);
- }
- internalCancelShell(_runContext, mon);
- }
- }
-
- /**
- * 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)){
- String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
-
- throw new Exception(msgTxt);
- }
- internalSendCommandToShell(_cmd, _runContext, mon);
- }
- }
-
- /**
- * 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)){
- String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- internalRemoveShell(_runContext);
- }
- }
-
- /**
- * Runs a remote command.
- * This method must be overridden by implementers of command subsystems.
- * @param cmd The command to execute.
- * @param context The IServiceCommandShell that provides the context in which to run this command.
- * @param monitor a monitor for progress and cancellation, the caller is expected to call monitor.done()
- * @return an array of 1 object, the IServiceCommandShell, which can be queried for output.
- * @throws InterruptedException if the user cancels the operation
- * @throws SystemMessageException if the command results in an error on the target system
- * @throws InvocationTargetException if something else bad happens
- */
- protected Object[] internalRunCommand(String cmd, Object context, IProgressMonitor monitor)
- throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException, SystemMessageException
- {
- return null;
- }
-
- /**
- * Runs a remote command and interprets any resulting output.
- * This method must be overridden by implementers of command subsystems.
- * @param cmd The command to execute.
- * @param context The IServiceCommandShell that provides the context in which to run this command.
- * @param monitor a monitor for progress and cancellation, the caller is expected to call monitor.done()
- * @return an array of 1 object, the IServiceCommandShell, which can be queried for output.
- * @throws InterruptedException if the user cancels the operation
- * @throws SystemMessageException if the command results in an error on the target system
- * @throws InvocationTargetException if something else bad happens
- */
- protected Object[] internalRunCommand(String cmd, Object context, boolean interpretOutput, IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException, SystemMessageException
- {
- return null;
- }
-
- /**
- * Establishes a new shell. This causes the shell to start and establish its initial environment.
- * This method must be overridden by implementers of command subsystems.
- * @param context the current directory for this shell. Can be a String containing a path
- * name to be used as the current directory or an IRemoteFile representing
- * a directory. If null or "null", the home directory is used.
- * @param monitor a monitor for progress and cancellation, the caller is expected to call monitor.done()
- * @return the newly established shell.
- * @throws InterruptedException if the user cancels the operation
- * @throws SystemMessageException if the command results in an error on the target system
- * @throws InvocationTargetException if something else bad happens
- */
- protected IRemoteCommandShell internalRunShell(Object context, IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException, SystemMessageException
- {
- return null;
- }
-
- /**
- * Cancels a running shell.
- * This method must be overridden by implementers of command subsystems.
- * @param command the IServiceCommandShell to cancel.
- * @param monitor a monitor for progress and cancellation, the caller is expected to call monitor.done()
- * @throws InterruptedException if the user cancels the operation
- * @throws InvocationTargetException if something else bad happens
- */
- protected void internalCancelShell(Object command, IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- }
-
- /**
- * Sends a command to a shell for execution.
- * This method must be overridden by implementers of command subsystems.
- * @param cmd the command to execute.
- * @param command the IServiceCommandShell that provides the context in which to execute the command.
- * @param monitor a monitor for progress and cancellation, the caller is expected to call monitor.done()
- * @throws InterruptedException if the user cancels the operation
- * @throws InvocationTargetException if something else bad happens
- */
- protected void internalSendCommandToShell(String cmd, Object command, IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException
- {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java
deleted file mode 100644
index 2f566a7f3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.subsystems.shells.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.subsystems.SubSystemConfiguration;
-
-
-
-public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfiguration implements IRemoteCmdSubSystemConfiguration
-{
- protected String translatedType;
-
-
- /**
- * Default constructor.
- */
- public RemoteCmdSubSystemConfiguration()
- {
- super();
- }
- // --------------------------------------------
- // PARENT METHODS RELATED TO WHAT WE SUPPORT...
- // --------------------------------------------
-
- /**
- * 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#supportsCommands()
- */
- public boolean supportsCommands()
- {
- return true;
- }
-
- /**
- * Test if filters are supported. We return <code>false</code>.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters()
- {
- return false;
- }
-
- /**
- * Test if nested filters are supported. We return <code>false</code>.
- * @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$
- }
-
-}
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 b66f77545..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystem.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-
-
-
-public interface IShellServiceSubSystem extends IRemoteCmdSubSystem
-{
- 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 214b30c37..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/IShellServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-
-import org.eclipse.rse.core.model.IHost;
-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
-{
- 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 a3c18e7ca..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [225510][api] Fix OutputRefreshJob API leakage
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
-
-import org.eclipse.rse.internal.subsystems.shells.core.ShellStrings;
-import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
-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.model.RemoteCommandShell;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteError;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
-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;
- private 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"; //$NON-NLS-1$ //$NON-NLS-2$
- 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;
- }
- }
- // FIXME unify with notifyListeners() below?
- if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, outputs, false);
- _lastRefreshJob.schedule();
- }
- else
- {
- _lastRefreshJob.addOutputs(outputs);
- }
- }
-
- /**
- * Notify listeners about new outputs. This will update any shell views with
- * the new data.
- *
- * @param outputs the output objects to notify
- * @param cwdChanged <code>true</code> if the current directory changed
- * @since org.eclipse.rse.subsystems.shells.core 3.0
- */
- protected void notifyOutputChanged(IRemoteOutput[] outputs, boolean cwdChanged) {
- // if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, outputs, cwdChanged);
- _lastRefreshJob.schedule();
- }
- /*
- * else { _lastRefreshJob.addOutputs(outputs);
- * _lastRefreshJob.schedule(); }
- */
- }
-
- public ICandidateCommand[] getCandidateCommands()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void writeToShell(String cmd)
- {
- _hostShell.writeToShell(cmd);
- }
-}
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 5346e3b86..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * David McKnight (IBM) - [191599] Need to pass in shell encoding
- * David Dykstal (IBM) - [197036] refactored switch configuration
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David McKnight (IBM) - [220524] internalSwitchServiceSubSystemConfiguration -> internalSwitchSubSystemConfiguration
- * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- ********************************************************************************/
-
-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.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-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;
-import org.eclipse.rse.subsystems.shells.core.subsystems.RemoteCmdSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-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)
- {
- IRSESystemType type = getHost().getSystemType();
- if (type.isLocal())
- {
- _userHome = System.getProperty("user.home"); //$NON-NLS-1$
- }
- else if (type.isWindows())
- {
- _userHome = "c:\\"; //$NON-NLS-1$
- }
- else
- {
- // Assume UNIX compatible file system
- _userHome = "/home/" + getUserId(); //$NON-NLS-1$
- }
- }
- return _userHome;
- }
-
-
- protected Object[] internalRunCommand(String cmd, Object context, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, SystemMessageException
- {
- return internalRunCommand(cmd, context, false, monitor);
- }
-
- protected Object[] internalRunCommand(String cmd, Object context, boolean interpretOutput, IProgressMonitor monitor) 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(cwd, cmd, getUserAndHostEnvVarsAsStringArray(), monitor);
- 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(Object context, IProgressMonitor monitor) 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();
- String encoding = getHost().getDefaultEncoding(true);
- IHostShell hostShell = service.launchShell(cwd, encoding, getUserAndHostEnvVarsAsStringArray(), monitor);
- 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(Object command, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
- {
- if (command instanceof IServiceCommandShell)
- {
- IServiceCommandShell cmd = (IServiceCommandShell)command;
- cmd.getHostShell().exit();
- }
- }
-
- protected void internalSendCommandToShell(String cmd, Object command, IProgressMonitor monitor) 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()
- {
- try {
- return getShellService().getHostEnvironment();
- } catch (SystemMessageException e) {
- SystemBasePlugin.logError(e.getSystemMessage().getLevelOneText(), e);
- }
- return new String[0];
- }
-
- public List getHostEnvironmentVariables()
- {
- List l = new ArrayList();
- String[] vars = getHostEnvironment();
- for (int i = 0; i < vars.length; i++)
- {
- l.add(vars[i]);
- }
- return l;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#canSwitchTo(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- public boolean canSwitchTo(ISubSystemConfiguration configuration) {
- return configuration instanceof IShellServiceSubSystemConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalServiceSubSystemConfiguration(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfiguration) {
- IShellServiceSubSystemConfiguration configuration = (IShellServiceSubSystemConfiguration) newConfiguration;
- IHost host = getHost();
- setShellService(configuration.getShellService(host));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#getServiceType()
- */
- public Class getServiceType()
- {
- return IShellService.class;
- }
-
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException
- {
- super.initializeSubSystem(monitor);
- getShellService().initService(monitor);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- cancelAllShells();
- getShellService().uninitService(monitor);
- super.uninitializeSubSystem(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 bab7770e3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.subsystems.shells.core.subsystems.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.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.RemoteCmdSubSystemConfiguration;
-
-
-
-
-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);
- }
-}
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 d7474a4d0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 2c0e001b7..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: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.shells.dstore.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.dstore.extra;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.connectorservice.dstore;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.internal.subsystems.shells.dstore;x-internal:=true,
- org.eclipse.rse.subsystems.shells.dstore
-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 d4cc693f9..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 5, 2007</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 b3c717ec9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2007 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/
-src.includes = about.html
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 699cda8fc..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE DStore Shells
-providerName = Eclipse.org - DSDP
-
-Shells=Shells
-ShellsDescription=This configuration allows you to work with shells and commands on local or remote systems using the DataStore protocol.
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 c4f4dcf16..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/plugin.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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 Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="shells"
- class="org.eclipse.rse.subsystems.shells.dstore.DStoreShellSubSystemConfiguration"
- description="%ShellsDescription"
- icon="icons/full/obj16/systemcommands_obj.gif"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- id="dstore.shells"
- name="%Shells"
- priority="300"
- serviceType="_dstore-shell._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows"
- vendor="%providerName">
- </configuration>
-
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/Activator.java
deleted file mode 100644
index d2eb567e7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519] declaratively register rse.shells.ui. adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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);
- }
-
- /**
- * 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/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java
deleted file mode 100644
index 50448d2bd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David McKnight (IBM) - [202822] cleanup output datalements after use
- * Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage
- * David McKnight (IBM) - [286671] Dstore shell service interprets &lt; and &gt; sequences
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.dstore;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.dstore.core.model.DataElement;
-import org.eclipse.dstore.core.model.DataStore;
-import org.eclipse.dstore.extra.DomainEvent;
-import org.eclipse.dstore.extra.IDomainListener;
-import org.eclipse.rse.internal.services.dstore.shells.DStoreHostOutput;
-import org.eclipse.rse.internal.services.dstore.shells.DStoreHostShell;
-import org.eclipse.rse.internal.services.dstore.shells.DStoreShellOutputReader;
-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.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteError;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
-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;
-import org.eclipse.swt.widgets.Shell;
-
-public class DStoreServiceCommandShell extends ServiceCommandShell
-{
- private class CleanUpSpirited extends Thread implements IDomainListener
- {
- private DataElement _status;
- private DataStore _ds;
- private boolean _done = false;
-
- public CleanUpSpirited(DataElement status, String name)
- {
- _status = status;
- _ds = status.getDataStore();
- _ds.getDomainNotifier().addDomainListener(this);
- }
-
- public void domainChanged(DomainEvent e)
- {
- deleteElements();
- }
-
- public void run()
- {
- while (!_done)
- {
- try
- {
- Thread.sleep(10000);
- }
- catch (Exception e)
- {
- }
- deleteElements();
- }
- }
-
- private void deleteElements()
- {
- if (_status.getNestedSize() > 0)
- {
- //synchronized (_status)
- {
- int ssize = _status.getNestedSize();
- if (_status.get(ssize - 1).isSpirit())
- {
- // delete
- _ds.deleteObjects(_status);
- _ds.refresh(_status);
-
- _ds.getDomainNotifier().removeDomainListener(this);
- _done = true;
- }
- }
- }
- }
-
- public Shell getShell() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean listeningTo(DomainEvent e) {
- if (e.getParent() == _status)
- return true;
- return false;
- }
-
- }
-
- 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
- {
- IRemoteFileSubSystem ss = getFileSubSystem();
- if (ss.isConnected())
- {
- return ss.getRemoteFileObject(workingDir, new NullProgressMonitor());
- }
- }
- catch (Exception e)
- {
- }
- }
- return null;
- }
-
- public String getContextString()
- {
- DStoreHostShell shell = (DStoreHostShell)getHostShell();
- DStoreShellOutputReader reader = (DStoreShellOutputReader)shell.getStandardOutputReader();
- return reader.getWorkingDirectory();
- }
-
- private String convertSpecialCharacters(String input){
- // needed to ensure xml characters aren't converted in xml layer
- String converted = input.replaceAll("&#38;", "&") //$NON-NLS-1$ //$NON-NLS-2$
- .replaceAll("&#59;", ";"); //$NON-NLS-1$//$NON-NLS-2$
- return converted;
- }
-
- 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(convertSpecialCharacters(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;
- }
- }
- notifyOutputChanged(outputs, false);
- }
-
- public boolean isActive()
- {
- boolean activeShell = _hostShell.isActive();
- if (!activeShell)
- {
- DataElement status = ((DStoreHostShell)_hostShell).getStatus();
- if (_output.size() < status.getNestedSize())
- {
- return true;
- }
- }
- return activeShell;
- }
-
- public void removeOutput()
- {
- DStoreHostShell shell = (DStoreHostShell)getHostShell();
- DataElement status = shell.getStatus();
- DataStore ds = status.getDataStore();
-
- int ssize = status.getNestedSize();
- if (ssize > 0)
- {
- if (!ds.isConnected())
- {
- status.removeNestedData();
- }
- else if (status.get(ssize - 1).isSpirit() || !ds.isDoSpirit())
- {
- // objects can be deleted directly at this point since there will be no more updates from the server
- ds.deleteObjects(status);
- ds.refresh(status);
- }
- else
- {
- // cleanup later
- // objects need to be deleted later since the server will still be sending spirited update
- // if we don't defer this, then the deleted elements would get recreated when the spirits are updated
- CleanUpSpirited cleanUp = new CleanUpSpirited(status, getId());
- cleanUp.start();
- }
- }
-
-
-
-
- synchronized(_output)
- {
- _output.clear();
- }
-
- }
-
-}
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 84978be3d..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, 2008 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.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.internal.services.dstore.shells.DStoreShellService;
-import org.eclipse.rse.internal.subsystems.shells.dstore.DStoreServiceCommandShell;
-import org.eclipse.rse.services.dstore.IDStoreService;
-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;
-
-/**
- * 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));
- return subsys;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return DStoreConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- DStoreConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public IShellService createShellService(IHost host)
- {
- return new DStoreShellService((IDataStoreProvider)getConnectorService(host));
- }
-
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/package.html b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/package.html
deleted file mode 100644
index 0abb0a539..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/subsystems/shells/dstore/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="David McKnight (IBM)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized DataStore shell subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized DataStore shell
-subsystems.
-<p>The class <b>DStoreShellSubSystemConfiguration</b> is the main factory
-for creating an DataStore shell subsystem. By deriving from it, extenders
-can create their customized DataStore shell subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created ShellServiceSubSystem or DStoreShellService
- in a delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 9bb68bff3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 536dcf359..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/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.local;singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.shells.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.connectorservice.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.internal.subsystems.shells.local;x-internal:=true,
- org.eclipse.rse.internal.subsystems.shells.local.model;x-internal:=true,
- 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 d4cc693f9..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 5, 2007</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 8a94f8ec6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
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 13aa9c66f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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.
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Local Shells
-providerName = Eclipse.org - DSDP
-
-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.
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 0205cd6c8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
-<!-- ============================================== -->
-<!-- Define subsystem configurations for sample -->
-<!-- ============================================== -->
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- systemTypeIds="org.eclipse.rse.systemtype.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/internal/subsystems/shells/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/internal/subsystems/shells/local/Activator.java
deleted file mode 100644
index 1b62d7343..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/internal/subsystems/shells/local/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [180519] declaratively register rse.shells.ui. adapter factories
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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);
- }
-
- /**
- * 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/internal/subsystems/shells/local/model/LocalServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/internal/subsystems/shells/local/model/LocalServiceCommandShell.java
deleted file mode 100644
index 4063415fd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/internal/subsystems/shells/local/model/LocalServiceCommandShell.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [225510][api] Fix OutputRefreshJob API leakage
- * David McKnight (IBM) - [272032][ssh][telnet][local] shell output not setting line numbers when available
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.local.model;
-
-
-import java.io.File;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-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.model.RemoteError;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
-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, new NullProgressMonitor());
- }
- catch (Exception e)
- {
- }
- }
- return null;
- }
-
- public String getContextString()
- {
- return _workingDir;
- }
-
-
-
- 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);
- }
- if (parsedMsg.line > 0){
- output.setLine(parsedMsg.line);
- }
- }
-
- addOutput(output);
- outputs[i] = output;
- }
- notifyOutputChanged(outputs, false);
- }
-
- public void writeToShell(String cmd)
- {
- _patterns.update(cmd);
- super.writeToShell(cmd);
-
- }
-
-}
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 9dcb82238..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.subsystems.shells.local;
-
-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.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.internal.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.internal.services.local.ILocalService;
-import org.eclipse.rse.internal.services.local.shells.LocalShellService;
-import org.eclipse.rse.internal.subsystems.shells.local.model.LocalServiceCommandShell;
-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;
-
-
-
-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.subsystems.shells.core.subsystems.RemoteCmdSubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getInstance().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.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public Class getServiceImplType()
- {
- return ILocalService.class;
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- return new LocalServiceCommandShell(cmdSS, hostShell);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/package.html b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/package.html
deleted file mode 100644
index ab6d876aa..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized local shell subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized local shell
-subsystems.
-<p>The class <b>LocalShellSubSystemConfiguration</b> is the main factory
-for creating a local shell subsystem. By deriving from it, extenders
-can create their customized local shell subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created ShellServiceSubSystem or LocalShellService
- in a delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
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 186c133f2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 fe0beed73..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/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.shells.ssh; singleton:=true
-Bundle-Version: 2.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.shells.ssh.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.connectorservice.ssh;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.services.ssh;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.subsystems.shells.ssh;x-internal:=true,
- 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 d4cc693f9..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 5, 2007</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 8a94f8ec6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
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 a51dd85cd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE SSH Shells
-providerName = Eclipse.org - DSDP
-
-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 5bfdef8b8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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
-Javier Montalvo Orus (Symbian) - [plan] Improve Discovery and Autodetect in RSE
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="shells"
- class="org.eclipse.rse.subsystems.shells.ssh.SshShellSubSystemConfiguration"
- description="%SshShellSubsystemDescription"
- icon="icons/full/obj16/systemcommands_obj.gif"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- id="ssh.shells"
- name="%SshShellSubsystemName"
- priority="300"
- serviceType="_ssh._tcp;_sftp-ssh._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
- vendor="%providerName">
- </configuration>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/Activator.java
deleted file mode 100644
index 48504fb07..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-
- /*
- * (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/internal/subsystems/shells/ssh/SshServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java
deleted file mode 100644
index ae563737e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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 LocalServiceCommandShell
- * Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage
- * Anna Dushistova (MontaVista) - [259414][api] refactor the "SSH Shell" to use the generic Terminal->IHostShell converter
- * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
- * David McKnight (IBM) - [272032][ssh][telnet][local] shell output not setting line numbers when available
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.shells.ssh;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.services.shells.TerminalServiceHostShell;
-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.model.RemoteError;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
-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
-{
- 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, new NullProgressMonitor());
- }
- catch (Exception e)
- {
- }
- }
- return null;
-
- }
-
- public String getContextString()
- {
- return _workingDir;
- }
-
- 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);
- }
- if (parsedMsg.line > 0){
- output.setLine(parsedMsg.line);
- }
- }
-
- addOutput(output);
- outputs.add(output);
- }
- IRemoteOutput[] remoteOutputs = (IRemoteOutput[])outputs.toArray(new IRemoteOutput[outputs.size()]);
- notifyOutputChanged(remoteOutputs, false);
- }
-
- /**
- * 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();
- if (shell instanceof TerminalServiceHostShell) {
- return ((TerminalServiceHostShell)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 fdeea2349..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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 template for ssh service.
- * Anna Dushistova (MontaVista) - [259414][api] refactor the "SSH Shell" to use the generic Terminal->IHostShell converter
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.ssh;
-
-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.connectorservice.ssh.SshConnectorService;
-import org.eclipse.rse.internal.connectorservice.ssh.SshConnectorServiceManager;
-import org.eclipse.rse.internal.services.ssh.ISshService;
-import org.eclipse.rse.internal.services.ssh.terminal.SshTerminalService;
-import org.eclipse.rse.internal.subsystems.shells.ssh.SshServiceCommandShell;
-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;
-
-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 subsystem.
- * 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 (IShellService) (new SshTerminalService(cserv)).getAdapter(IShellService.class);
- }
-
- 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.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/package.html b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/package.html
deleted file mode 100644
index 8b4f4a53f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized ssh shell subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized ssh shell
-subsystems.
-<p>The class <b>SshShellSubSystemConfiguration</b> is the main factory
-for creating an Ssh shell subsystem. By deriving from it, extenders
-can create their customized ssh shell subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Registering pre-defined filters through a filter pool manager.</li>
-<li>Wrapping the created ShellServiceSubSystem or SshShellService
- in a delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.classpath b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.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.telnet/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.project b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.project
deleted file mode 100644
index 4ba47ae9c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.shells.telnet</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.subsystems.shells.telnet/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/META-INF/MANIFEST.MF
deleted file mode 100644
index b72a82eac..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/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.telnet;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.shells.telnet.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.connectorservice.telnet;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.rse.services.telnet;bundle-version="[2.0.0,2.1.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.shells.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.rse.internal.subsystems.shells.telnet;x-internal:=true,
- org.eclipse.rse.subsystems.shells.telnet
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/about.html b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/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 5, 2007</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.telnet/build.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/build.properties
deleted file mode 100644
index b0b0052b0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 061b6e226..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 3faca4474..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.properties
deleted file mode 100644
index 783a3f69f..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# Sheldon D'souza (Celunite) - Changes to strings
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE Telnet Shells
-providerName=Eclipse.org - DSDP
-
-TelnetSystemLabel=Telnet Only (Experimental)
-TelnetSystemDescription=Connection for Telnet access to remote systems
-
-TelnetShellSubsystemName=Telnet Shells (Experimental)
-TelnetShellSubsystemDescription=Work with shells and commands on remote systems using the Telnet protocol.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.xml
deleted file mode 100644
index 15738ac02..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2007 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
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension point="org.eclipse.rse.core.systemTypes">
- <systemType
- description="%TelnetSystemDescription"
- icon="icons/full/obj16/systemcommands_obj.gif"
- iconLive="icons/full/obj16/systemcommandslive_obj.gif"
- id="org.eclipse.rse.systemtype.telnet"
- label="%TelnetSystemLabel"
- name="Telnet Only"/>
- </extension>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="shells"
- class="org.eclipse.rse.subsystems.shells.telnet.TelnetShellSubSystemConfiguration"
- description="%TelnetShellSubsystemDescription"
- icon="icons/full/obj16/systemcommands_obj.gif"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- id="telnet.shells"
- name="%TelnetShellSubsystemName"
- priority="300"
- serviceType="_telnet._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.telnet"
- vendor="%providerName">
- </configuration>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/Activator.java
deleted file mode 100644
index 8323ff28b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Celunite, 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:
- * Sheldon D'souza (Celunite)
- *******************************************************************************/
-package org.eclipse.rse.internal.subsystems.shells.telnet;
-
-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.telnet"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (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;
- }
-
- /*
- * (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/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/TelnetServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/TelnetServiceCommandShell.java
deleted file mode 100644
index 30923aeb3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/internal/subsystems/shells/telnet/TelnetServiceCommandShell.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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 LocalServiceCommandShell
- * Sheldon D'souza (Celunite) - Adapted from SshServiceCommandShell
- * Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- * Anna Dushistova (MontaVista) - [261478] Remove SshShellService, SshHostShell (or deprecate and schedule for removal in 3.2)
- * David McKnight (IBM) - [272032][ssh][telnet][local] shell output not setting line numbers when available
- *******************************************************************************/
-package org.eclipse.rse.internal.subsystems.shells.telnet;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.services.shells.TerminalServiceHostShell;
-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.model.RemoteError;
-import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
-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 TelnetServiceCommandShell extends ServiceCommandShell {
-
- private Patterns _patterns;
- private String _curCommand;
- private String _workingDir;
- private IRemoteFileSubSystem _fs;
-
- public TelnetServiceCommandShell(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 && _fs != null)
- {
- try
- {
- return _fs.getRemoteFileObject(workingDir, new NullProgressMonitor());
- }
- 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);
- }
- if (parsedMsg.line > 0){
- output.setLine(parsedMsg.line);
- }
- }
-
- addOutput(output);
- outputs.add(output);
- }
- IRemoteOutput[] remoteOutputs = (IRemoteOutput[])outputs.toArray(new IRemoteOutput[outputs.size()]);
- notifyOutputChanged(remoteOutputs, false);
- }
-
- /**
- * 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 TelnetHostShell.
- * @return String promptCommand
- */
- protected String getPromptCommand() {
- IHostShell shell = getHostShell();
- //assert shell instanceof TelnetHostShell;
- if (shell instanceof TerminalServiceHostShell) {
- return ((TerminalServiceHostShell)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.telnet/src/org/eclipse/rse/subsystems/shells/telnet/TelnetShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/TelnetShellSubSystemConfiguration.java
deleted file mode 100644
index 1d0889b8d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/TelnetShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 template for ssh service.
- * Sheldon D'souza (Celunite) - Adapted template for telnet service
- * Anna Dushistova (MontaVista) - [240523] [rseterminals] Provide a generic adapter factory that adapts any ITerminalService to an IShellService
- *******************************************************************************/
-package org.eclipse.rse.subsystems.shells.telnet;
-
-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.connectorservice.telnet.TelnetConnectorService;
-import org.eclipse.rse.internal.connectorservice.telnet.TelnetConnectorServiceManager;
-import org.eclipse.rse.internal.services.telnet.ITelnetService;
-import org.eclipse.rse.internal.services.telnet.terminal.TelnetTerminalService;
-import org.eclipse.rse.internal.subsystems.shells.telnet.TelnetServiceCommandShell;
-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;
-
-public class TelnetShellSubSystemConfiguration extends
- ShellServiceSubSystemConfiguration {
-
- public TelnetShellSubSystemConfiguration() {
- 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)
- {
- TelnetConnectorService connectorService = (TelnetConnectorService)getConnectorService(host);
- ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, createShellService(host));
- return subsys;
- }
-
- public IShellService createShellService(IHost host) {
- TelnetConnectorService cserv = (TelnetConnectorService)getConnectorService(host);
- return (IShellService) (new TelnetTerminalService(cserv)).getAdapter(IShellService.class);
- }
-
- public IConnectorService getConnectorService(IHost host) {
- return TelnetConnectorServiceManager.getInstance().getConnectorService(host, ITelnetService.class);
- }
-
- public void setConnectorService(IHost host,
- IConnectorService connectorService) {
- TelnetConnectorServiceManager.getInstance().setConnectorService(host, ITelnetService.class, connectorService);
- }
-
- public Class getServiceImplType() {
- return ITelnetService.class;
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell) {
- return new TelnetServiceCommandShell(cmdSS, hostShell);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/package.html b/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/package.html
deleted file mode 100644
index 9cebd3e54..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.telnet/src/org/eclipse/rse/subsystems/shells/telnet/package.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=iso-8859-1">
- <meta name="Author" content="Martin Oberhuber (Wind River)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized telnet shell subsystems.
-<h2>
-Package Specification</h2>
-The package provides support classes for creating customized telnet shell
-subsystems.
-<p>The class <b>TelnetSubSystemConfiguration</b> is the main factory
-for creating a telnet shell subsystem. By deriving from it, extenders
-can create their customized telnet shell subsystem configuration which can
-then be registered against their system types. A custom
-<b>SubSystemConfigurationAdapter</b> can be registered for UI-specific
-customizations. Possible customizations include:
-<ul>
-<li>Changing the isCaseSensitive() method for system types that
- are not of UNIX style.</li>
-<li>Wrapping the created ShellServiceSubSystem or IShellService
- in a delegate for modifying operation of the Subsystem.</li>
-</ul>
-</p>
-</body>
-</html>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.classpath b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.classpath
deleted file mode 100644
index 2fbb7a23e..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.classpath
+++ /dev/null
@@ -1,7 +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="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.project b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.project
deleted file mode 100644
index f5a8f08ff..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.terminals.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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5c96d7ee9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Apr 04 23:25:44 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-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.terminals.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 7dd76592b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/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.subsystems.terminals.core;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.subsystems.terminals.core,
- org.eclipse.rse.subsystems.terminals.core.elements
-Bundle-ActivationPolicy: lazy
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/about.html b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.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 5, 2007</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.terminals.core/build.properties b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/build.properties
deleted file mode 100644
index f26a677c9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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:
-#
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- about.html,\
- plugin.xml
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommands_obj.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommandslive_obj.gif
deleted file mode 100644
index be88df2b4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/icons/full/obj16/terminalcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.properties
deleted file mode 100644
index abf61a5b5..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2008, 2009 MontaVista Software, 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:
-# Yu-Fen Kuo - initial API and implementation
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Terminals Core
-providerName = Eclipse.org - DSDP
-
-TerminalSubsystemName = Terminals
-TerminalSubsystemDescription = Work with terminals and commands on remote systems.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.xml
deleted file mode 100644
index 3cbdb5249..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/plugin.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2008 MontaVista Software, 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:
-Yu-Fen Kuo (MontaVista)- initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="terminals"
- class="org.eclipse.rse.internal.subsystems.terminals.core.TerminalSubSystemConfigurationImpl"
- description="%TerminalSubsystemDescription"
- icon="icons/full/obj16/terminalcommands_obj.gif"
- iconlive="icons/full/obj16/terminalcommandslive_obj.gif"
- id="terminals"
- name="%TerminalSubsystemName"
- priority="300"
- systemTypeIds="org.eclipse.rse.systemtype.telnet"
- vendor="%providerName">
- </configuration>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalConnectorService.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalConnectorService.java
deleted file mode 100644
index 908248fb3..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalConnectorService.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - [239159] The shell process subsystem not working without the shells subsystem present for the systemType
- * David McKnight (IBM) - adapted from DelegatingShellProcessConnectorService
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.terminals.core;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.AbstractDelegatingConnectorService;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-
-/**
- * This class delegates the connector service requests for the terminal
- * subsystem to the connector service of any subsystem that has service which
- * can be adopted to ITerminalService.
- */
-public class DelegatingTerminalConnectorService extends
- AbstractDelegatingConnectorService {
- private IConnectorService _realService;
-
- /**
- * @param host
- * the linux host that is the target for this connector service.
- */
- public DelegatingTerminalConnectorService(IHost host) {
- super(host);
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.rse.core.subsystems.AbstractDelegatingConnectorService#
- * getRealConnectorService()
- */
- public IConnectorService getRealConnectorService() {
- if (_realService != null) {
- return _realService;
- } else {
- ISubSystem ss = TerminalSubSystemHelper
- .getSuitableSubSystem(getHost());
- if (ss != null) {
- _realService = ss.getConnectorService();
-
- // register the process subsystem
- ITerminalServiceSubSystem ts = TerminalSubSystemHelper
- .getTerminalServiceSubSystem(getHost());
- _realService.registerSubSystem(ts);
- return _realService;
- } else {
- return null;
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalService.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalService.java
deleted file mode 100644
index 5718bf3f7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/DelegatingTerminalService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 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.
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - [259412][api][rseterminal] Decide whether to extract any API from DelegatingTerminalService.
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.terminals.core;
-
-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.terminals.AbstractDelegatingTerminalService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-
-/**
- * Base class that can be used for decorating an existing terminal service with
- * additional functionality. By default, all method calls are passed through to
- * the original service.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- *
- * @since org.eclipse.rse.subsystems.terminals.core 1.0
- */
-public class DelegatingTerminalService extends AbstractDelegatingTerminalService {
-
- private IHost _host;
- private ITerminalService _realService;
-
- public DelegatingTerminalService(IHost host) {
- _host = host;
- }
-
- public ITerminalService getRealTerminalService() {
- if (_host != null && _realService == null) {
- ISubSystem[] subSystems = _host.getSubSystems();
- if (subSystems != null) {
- for (int i = 0; i < subSystems.length && _realService == null; i++) {
- ISubSystem subsys = subSystems[i];
-
- IService svc = subsys.getSubSystemConfiguration()
- .getService(_host);
- if (svc != null) {
- ITerminalService tsvc = (ITerminalService) svc
- .getAdapter(ITerminalService.class);
- if (tsvc != null && tsvc != this) {
- _realService = tsvc;
- }
- }
- }
- }
- }
-
- return _realService;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemConfigurationImpl.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemConfigurationImpl.java
deleted file mode 100644
index f0c4792ef..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemConfigurationImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - adapted from SshTerminalSubsystemConfiguration
- *******************************************************************************/
-
-package org.eclipse.rse.internal.subsystems.terminals.core;
-
-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.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystemConfiguration;
-
-public class TerminalSubSystemConfigurationImpl extends
- TerminalServiceSubSystemConfiguration {
-
- /**
- * Instantiate and return an instance of OUR subsystem. 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 TerminalServiceSubSystem(host,
- connectorService, getTerminalService(host));
- return subsys;
- }
-
- public ITerminalService createTerminalService(IHost host) {
-
- ISubSystem ss = TerminalSubSystemHelper.getSuitableSubSystem(host);
- if (ss != null) {
- return (ITerminalService) (ss.getSubSystemConfiguration()
- .getService(host)).getAdapter(ITerminalService.class);
- } else {
- return new DelegatingTerminalService(host);
- }
-
- }
-
- public void setConnectorService(IHost host,
- IConnectorService connectorService) {
- // SshConnectorServiceManager.getInstance().setConnectorService(host,
- // ISshService.class, connectorService);
- // Nothing to do here since we just re-use the existing suitable
- // subsystem
- }
-
- public IConnectorService getConnectorService(IHost host) {
- ISubSystem ss = TerminalSubSystemHelper.getSuitableSubSystem(host);
- if (ss != null) {
- return ss.getConnectorService();
- } else {
- return new DelegatingTerminalConnectorService(host);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemHelper.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemHelper.java
deleted file mode 100644
index a5d3f820c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/internal/subsystems/terminals/core/TerminalSubSystemHelper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.internal.subsystems.terminals.core;
-
-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.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-
-/**
- * Helper class that helps to get subsystem with service that can be adapted to
- * ITerminalService most of the code
- *
- */
-public class TerminalSubSystemHelper {
- /**
- * Find the first ITerminalServiceSubSystem service associated with the
- * host.
- *
- * @param host
- * the connection
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- public static ISubSystem getSuitableSubSystem(IHost host) {
- if (host == null)
- return null;
- ISubSystem[] subSystems = host.getSubSystems();
- ITerminalService ssvc = null;
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- IService svc = subSystems[i].getSubSystemConfiguration()
- .getService(host);
- if (svc != null) {
- ssvc = (ITerminalService) svc
- .getAdapter(ITerminalService.class);
- if (ssvc != null) {
- return subSystems[i];
- }
- }
- }
- return null;
- }
-
- /**
- * Returns ITerminalServiceSubSystem associated with the host.
- *
- * @param host
- * the connection
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- public static ITerminalServiceSubSystem getTerminalServiceSubSystem(
- IHost host) {
- if (host == null)
- return null;
- ISubSystem[] subSystems = host.getSubSystems();
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- if (subSystems[i] instanceof ITerminalServiceSubSystem) {
- return (ITerminalServiceSubSystem) subSystems[i];
- }
- }
- return null;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java
deleted file mode 100644
index 481b60981..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystem.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, 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
- *
- * Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
- * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
- ********************************************************************************/
-package org.eclipse.rse.subsystems.terminals.core;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-
-/**
- * Specialized interface for remote terminal subsystems.
- *
- */
-public interface ITerminalServiceSubSystem extends ISubSystem {
- public void addChild(TerminalElement element);
-
- public void removeChild(TerminalElement element);
-
- public void removeChild(String terminalTitle);
-
- public TerminalElement getChild(String terminalTitle);
-
- /**
- * @return parent subsystem factory, cast to a
- * ITerminalServiceSubSystemConfiguration
- * @since 1.0
- */
- public ITerminalServiceSubSystemConfiguration getParentRemoteTerminalSubSystemConfiguration();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java
deleted file mode 100644
index 4e413e4e9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/ITerminalServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, 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
- *
- * Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.terminals.core;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.services.terminals.ITerminalService;
-
-/**
- * An interface representing factories for creating TerminalServiceSubSystem
- * objects.
- *
- */
-public interface ITerminalServiceSubSystemConfiguration extends
- ISubSystemConfiguration {
- /**
- * Return the terminal service.
- *
- * @param host connection
- * @return the internal terminal service interface.
- * @since 1.0
- */
- public ITerminalService getTerminalService(IHost host);
-
- /**
- * Create the terminal service.
- *
- * @param host connection
- * @return the new terminal service interface.
- * @since 1.0
- */
- public ITerminalService createTerminalService(IHost host);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java
deleted file mode 100644
index a5a0002d4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystem.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl
- * Martin Oberhuber (Wind River) - [228577] [rseterminal] Further cleanup
- * Anna Dushistova (MontaVista) - [227569] [rseterminal][api] Provide a "generic" Terminal subsystem
- * Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.terminals.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.IHost;
-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.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * A Subsystem that has terminal instances as children.
- *
- */
-
-public class TerminalServiceSubSystem extends SubSystem implements
- ITerminalServiceSubSystem, ICommunicationsListener {
-
- private ITerminalService _hostService = null;
-
- private ArrayList children = new ArrayList();
-
- /**
- * Constructor.
- *
- * @since 1.0
- */
- public TerminalServiceSubSystem(IHost host,
- IConnectorService connectorService, ITerminalService hostService) {
- super(host, connectorService);
- _hostService = hostService;
- }
-
- private void fireAsyncRefresh(final Object target) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(target,
- ISystemResourceChangeEvents.EVENT_REFRESH, target));
-
- }
- });
- }
-
- /**
- * Return the Terminal Service associated with this subsystem.
- *
- * @since 1.0
- */
- public ITerminalService getTerminalService() {
- return _hostService;
- }
-
- public Class getServiceType() {
- return ITerminalService.class;
- }
-
- public void addChild(TerminalElement element) {
- if (element != null) {
- synchronized (children) {
- children.add(element);
- }
- fireAsyncRefresh(this);
- }
- }
-
- public void removeChild(TerminalElement element) {
- if (element != null) {
- synchronized (children) {
- children.remove(element);
- }
- fireAsyncRefresh(this);
- }
- }
-
- public void removeChild(String terminalTitle) {
- removeChild(getChild(terminalTitle));
- }
-
- public TerminalElement getChild(String terminalTitle) {
- synchronized (children) {
- for (Iterator it = children.iterator(); it.hasNext();) {
- TerminalElement element = (TerminalElement) it.next();
- if (element.getName().equals(terminalTitle))
- return element;
- }
- }
- return null;
- }
-
- public Object[] getChildren() {
- synchronized (children) {
- return children.toArray();
- }
- }
-
- public boolean hasChildren() {
- synchronized (children) {
- return !children.isEmpty();
- }
- }
-
- /**
- * Set the terminal service associated with this subsystem.
- *
- * @since 1.0
- */
- public void setTerminalService(ITerminalService service) {
- _hostService = service;
- }
-
- public void communicationsStateChange(CommunicationsEvent e) {
- switch (e.getState()) {
- case CommunicationsEvent.AFTER_DISCONNECT:
- // no longer listen
- getConnectorService().removeCommunicationsListener(this);
- break;
-
- case CommunicationsEvent.BEFORE_DISCONNECT:
- case CommunicationsEvent.CONNECTION_ERROR:
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- cancelAllTerminals();
- }
- });
- break;
- default:
- break;
- }
-
- }
-
- public boolean isPassiveCommunicationsListener() {
- return true;
- }
-
- /**
- * Set the terminal service associated with this subsystem.
- */
- public void cancelAllTerminals() {
- Object[] terminals;
- synchronized (children) {
- terminals = getChildren();
- children.clear();
- }
- if (terminals.length > 0) {
- for (int i = terminals.length - 1; i >= 0; i--) {
- TerminalElement element = (TerminalElement) terminals[i];
- try {
- removeTerminalElement(element);
- } catch (Exception e) {
- RSECorePlugin.getDefault().getLogger().logError(
- "Error removing terminal", e); //$NON-NLS-1$
- }
- }
- fireAsyncRefresh(this);
- }
- }
-
- private void removeTerminalElement(TerminalElement element) {
- element.getTerminalShell().exit();
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(element,
- ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED, null));
- }
-
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException {
- super.initializeSubSystem(monitor);
- getConnectorService().addCommunicationsListener(this);
- }
-
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- getConnectorService().removeCommunicationsListener(this);
- super.uninitializeSubSystem(monitor);
- }
-
- public boolean canSwitchTo(ISubSystemConfiguration configuration) {
- return (configuration instanceof ITerminalServiceSubSystemConfiguration);
- }
-
- /**
- * @inheritDoc
- * @since 1.0
- */
- public ITerminalServiceSubSystemConfiguration getParentRemoteTerminalSubSystemConfiguration() {
- return (ITerminalServiceSubSystemConfiguration) super
- .getSubSystemConfiguration();
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java
deleted file mode 100644
index 0465c5509..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/TerminalServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - [227569] [rseterminal][api] Provide a "generic" Terminal subsystem
- * Anna Dushistova (MontaVista) - [240530] [rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.terminals.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-
-/**
- * The implementation of the ITerminalServiceSubSystemConfiguration interface
- * contains information about what features the subsystem supports, and creates
- * TerminalServiceSubSystem instances.
- *
- */
-public abstract class TerminalServiceSubSystemConfiguration extends
- SubSystemConfiguration implements
- ITerminalServiceSubSystemConfiguration {
-
- private Map _services;
-
- protected TerminalServiceSubSystemConfiguration() {
- super();
- _services = new HashMap();
- }
-
- public boolean supportsFilters() {
- return false;
- }
-
- /**
- * @inheritDoc
- * @since 1.0
- */
- public final ITerminalService getTerminalService(IHost host) {
- ITerminalService service = (ITerminalService) _services.get(host);
- if (service == null) {
- service = createTerminalService(host);
- _services.put(host, service);
- }
- return service;
- }
-
- public final IService getService(IHost host) {
- return getTerminalService(host);
- }
-
- public Class getServiceType() {
- return ITerminalService.class;
- }
-
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = TerminalServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java
deleted file mode 100644
index 983053f49..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Martin Oberhuber (Wind River) - [228577] [rseterminal] Further cleanup
- * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
- ********************************************************************************/
-package org.eclipse.rse.subsystems.terminals.core.elements;
-
-import org.eclipse.rse.core.subsystems.AbstractResource;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-
-/**
- * An element in the RSE Tree that resembles a Terminal connection.
- *
- */
-public class TerminalElement extends AbstractResource {
- private String name;
- private ITerminalShell terminalShell;
-
- /**
- * Constructor.
- */
- public TerminalElement(String name,
- ITerminalServiceSubSystem terminalServiceSubSystem) {
- super(terminalServiceSubSystem);
- this.name = name;
- }
-
- /**
- * Return the name of this element, which will also be used as the label in
- * the tree.
- */
- public final String getName() {
- return name;
- }
-
- public String toString() {
- return getName();
- }
-
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (!(obj instanceof TerminalElement))
- return false;
- TerminalElement other = (TerminalElement) obj;
- return name.equals(other.getName())
- && getSubSystem().equals(other.getSubSystem())
- && (terminalShell == null ? other.getTerminalShell() == null
- : terminalShell.equals(other.getTerminalShell()));
- }
-
- public int hashCode() {
- if (terminalShell != null)
- return terminalShell.hashCode() * 37 + name.hashCode();
- return name.hashCode() ;
- }
-
- /**
- * Return the back-end connection of this terminal instance.
- *
- * @since 1.0
- */
- public ITerminalShell getTerminalShell() {
- return terminalShell;
- }
-
- /**
- * Set the back-end connection of this terminal instance.
- *
- * @since 1.0
- */
- public void setTerminalShell(ITerminalShell terminalShell) {
- this.terminalShell = terminalShell;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.html b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.html
deleted file mode 100644
index b6b516e98..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/package.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=iso-8859-1">
- <meta name="Author" content="Anna Dushistova (MontaVista)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized terminal subsystems.
-<h2>
-Package Specification</h2>
-This package contains supporting classes for RSE Terminal Integration.
-</body>
-</html>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/package.html b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/package.html
deleted file mode 100644
index 595864fa7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/package.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Anna Dushistova (MontaVista)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for creating customized terminal subsystems.
-<h2>
-Package Specification</h2>
-This package provides classes and interfaces to support terminal
-subsystems.
-<p>The class <b>TerminalServiceSubSystemConfiguration</b> is the main factory
-for creating a terminal subsystem. By deriving from it, extenders
-can create their customized terminal subsystem configuration which can
-then be registered against their system types.
-The class <b>TerminalServiceSubSystem</b> is a basic ITerminalServiceSubsystem implementation,
-containing terminal instances as children.
-</p>
-</body>
-</html>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.classpath b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.classpath
deleted file mode 100644
index c428259e6..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.classpath
+++ /dev/null
@@ -1,12 +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">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/rse/internal/connectorservice/ssh/*"/>
- <accessrule kind="accessible" pattern="org/eclipse/rse/internal/services/ssh/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.project b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.project
deleted file mode 100644
index 7b37bf204..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.terminals.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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9c9f492d7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Apr 04 23:26:40 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-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.terminals.ssh/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index 83690d472..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.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.subsystems.terminals.ssh;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.connectorservice.ssh;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.services.ssh;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.rse.subsystems.terminals.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.rse.subsystems.terminals.ssh
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/about.html b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.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 5, 2007</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.terminals.ssh/build.properties b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/build.properties
deleted file mode 100644
index 2781e3821..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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,\
- about.html,\
- plugin.xml,\
- icons/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommands_obj.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommandslive_obj.gif
deleted file mode 100644
index be88df2b4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/icons/full/obj16/terminalcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.properties
deleted file mode 100644
index acae6d4d4..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2008, 2009 MontaVista Software 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:
-# Yu-Fen Kuo - initial API and implementation
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE SSH Terminals
-providerName = Eclipse.org - DSDP
-
-SshTerminalSubsystemName=Ssh Terminals
-SshTerminalSubsystemDescription=Work with terminals and commands on remote systems using the Secure Shell (ssh) protocol.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.xml
deleted file mode 100644
index 55c0e9edd..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2008 MontaVista Software, 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:
-Yu-Fen Kuo (MontaVista)- initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="terminals"
- class="org.eclipse.rse.subsystems.terminals.ssh.SshTerminalSubSystemConfiguration"
- description="%SshTerminalSubsystemDescription"
- icon="icons/full/obj16/terminalcommands_obj.gif"
- iconlive="icons/full/obj16/terminalcommandslive_obj.gif"
- id="ssh.terminals"
- name="%SshTerminalSubsystemName"
- priority="300"
- serviceType="_ssh._tcp;_sftp-ssh._tcp"
- systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
- vendor="%providerName">
- </configuration>
- </extension>
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java
deleted file mode 100644
index 7a4ff7061..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.terminals.ssh/src/org/eclipse/rse/subsystems/terminals/ssh/SshTerminalSubSystemConfiguration.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, 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:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - [240530][rseterminal][apidoc] Add terminals.rse Javadoc into org.eclipse.rse.doc.isv
- *******************************************************************************/
-
-package org.eclipse.rse.subsystems.terminals.ssh;
-
-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.connectorservice.ssh.SshConnectorService;
-import org.eclipse.rse.internal.connectorservice.ssh.SshConnectorServiceManager;
-import org.eclipse.rse.internal.services.ssh.ISshService;
-import org.eclipse.rse.internal.services.ssh.terminal.SshTerminalService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystemConfiguration;
-
-/**
- * An SSH Terminal Subsystem Factory.
- *
- */
-public class SshTerminalSubSystemConfiguration extends
- TerminalServiceSubSystemConfiguration {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = TerminalServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
- /**
- * Instantiate and return an instance of OUR subsystem. 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 TerminalServiceSubSystem(host,
- connectorService, createTerminalService(host));
- return subsys;
- }
-
- /**
- * @inheritDoc
- * @since 1.0
- */
- public ITerminalService createTerminalService(IHost host) {
- SshConnectorService cserv = (SshConnectorService) getConnectorService(host);
- return new SshTerminalService(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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/.classpath b/rse/plugins/org.eclipse.rse.terminals.ui/.classpath
deleted file mode 100644
index 15074e4a2..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/.classpath
+++ /dev/null
@@ -1,11 +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">
- <accessrules>
- <accessrule kind="accessible" pattern="**/internal/terminal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/.cvsignore b/rse/plugins/org.eclipse.rse.terminals.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/.project b/rse/plugins/org.eclipse.rse.terminals.ui/.project
deleted file mode 100644
index 75d1acacb..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.terminals.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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/.settings/.api_filters b/rse/plugins/org.eclipse.rse.terminals.ui/.settings/.api_filters
deleted file mode 100644
index d000db6ad..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.terminals.ui" version="2">
- <resource path="src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java" type="org.eclipse.rse.internal.terminals.ui.views.RSETerminalConnector">
- <filter id="574619656">
- <message_arguments>
- <message_argument value="ITerminalConnector"/>
- <message_argument value="RSETerminalConnector"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.terminals.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6f2d71496..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Apr 04 23:28:00 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index c08201de1..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.terminals.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.internal.terminals.ui.Activator
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.expressions,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.subsystems.terminals.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.internal.terminals.ui;x-internal:=true,
- org.eclipse.rse.internal.terminals.ui.actions;x-internal:=true,
- org.eclipse.rse.internal.terminals.ui.configuration.adapter;x-internal:=true,
- org.eclipse.rse.internal.terminals.ui.handlers;x-internal:=true,
- org.eclipse.rse.internal.terminals.ui.views;x-internal:=true
-Bundle-Localization: plugin
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/about.html b/rse/plugins/org.eclipse.rse.terminals.ui/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.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 5, 2007</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.terminals.ui/about.ini b/rse/plugins/org.eclipse.rse.terminals.ui/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/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=dsdp32.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.terminals.ui/about.mappings b/rse/plugins/org.eclipse.rse.terminals.ui/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/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.terminals.ui/about.properties b/rse/plugins/org.eclipse.rse.terminals.ui/about.properties
deleted file mode 100644
index d9f1bb1c1..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# 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=RSE Terminals UI\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright MontaVista Software, Inc. and others 2002, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/build.properties b/rse/plugins/org.eclipse.rse.terminals.ui/build.properties
deleted file mode 100644
index 461306288..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- dsdp32.png,\
- plugin.properties,\
- plugin.xml,\
- icons/
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/dsdp32.png b/rse/plugins/org.eclipse.rse.terminals.ui/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/icons/removeterminal.gif b/rse/plugins/org.eclipse.rse.terminals.ui/icons/removeterminal.gif
deleted file mode 100644
index 6f6296256..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/icons/removeterminal.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminal_view.gif b/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminal_view.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminal_view.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommands_obj.gif b/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommands_obj.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommandslive_obj.gif
deleted file mode 100644
index bb860542c..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/icons/terminalcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/plugin.properties b/rse/plugins/org.eclipse.rse.terminals.ui/plugin.properties
deleted file mode 100644
index 0807ab6cf..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 MontaVista Software, 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:
-# Yu-Fen Kuo (MontaVista) - initial API and implementation
-# Anna Dushistova (MontaVista) - [227535][rseterminal][api] terminals.ui should not depend on files.core
-# Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE Terminals UI
-providerName = Eclipse.org - DSDP
-
-terminalsView.name = Terminals
-
-Launch_Terminal_Label =Launch Terminal
-Launch_Terminal_Tooltip=Launch a terminal from the selected directory
-
-terminalsCategory.name = Terminal Commands
-Terminals.Service = Service \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/plugin.xml b/rse/plugins/org.eclipse.rse.terminals.ui/plugin.xml
deleted file mode 100644
index 9fd7e0088..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/plugin.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2008 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) - [180519] declaratively register adapter factories
-Yu-Fen Kuo (MontaVista) - [170910] Integrate Terminal with RSE
-Anna Dushistova (MontaVista) - [227535] [rseterminal][api] terminals.ui should not depend on files.core
-Anna Dushistova (MontaVista) - [234274][api] Launch Shell / Terminal commands menu placement and category
-Anna Dushistova (MontaVista) - [235934] Launch Shell/Terminal commands enabled when selection is empty
-Anna Dushistova (MontaVista) - [251492] Launch Shell Action is enabled in Offline mode
-Kevin Doyle (IBM) - [249320] Launch Shell action not available in Remote System Details/Monitor views
-Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
-Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
--->
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension point="org.eclipse.core.runtime.adapters">
- <!-- ITerminalServiceSubSystemConfiguration -->
- <factory
- class="org.eclipse.rse.internal.terminals.ui.configuration.adapter.TerminalServiceSubSystemConfigurationAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystemConfiguration">
- <adapter type="org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter"/>
- </factory>
- <factory
- class="org.eclipse.rse.internal.terminals.ui.views.TerminalViewElementsAdapterFactory"
- adaptableType="org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement">
- <adapter type="org.eclipse.rse.ui.view.ISystemViewElementAdapter"/>
- <adapter type="org.eclipse.rse.core.subsystems.ISystemDragDropAdapter"/>
- <adapter type="org.eclipse.rse.ui.view.ISystemRemoteElementAdapter"/>
- <adapter type="org.eclipse.ui.views.properties.IPropertySource"/>
- <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
- <adapter type="org.eclipse.ui.IActionFilter"/>
- </factory>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%terminalsView.name"
- icon="icons/terminal_view.gif"
- category="org.eclipse.rse.ui.view"
- class="org.eclipse.rse.internal.terminals.ui.views.TerminalViewer"
- id="org.eclipse.rse.terminals.ui.view.TerminalView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.rse.views.common?after=additions">
- <command
- commandId="org.eclipse.rse.terminals.ui.actions.LaunchTerminalCommand"
- icon="icons/terminal_view.gif"
- label="%Launch_Terminal_Label"
- tooltip="%Launch_Terminal_Tooltip">
- <visibleWhen>
- <with variable="selection">
- <count value="1" />
- <iterate>
- <and>
- <test
- property="org.eclipse.rse.core.isOffline"
- value="false">
- </test>
- <or>
- <and>
- <test
- args="terminals"
- property="org.eclipse.rse.core.hasSubSystemCategory"
- value="true">
- </test>
- <instanceof
- value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- </instanceof>
- <test
- property="org.eclipse.rse.subsystems.files.isdirectory"
- value="true">
- </test>
- </and>
- <instanceof
- value="org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem">
- </instanceof>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.rse.ui.commands.category"
- id="org.eclipse.rse.terminals.ui.actions.LaunchTerminalCommand"
- name="%Launch_Terminal_Label">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.rse.internal.terminals.ui.handlers.LaunchTerminalCommandHandler"
- commandId="org.eclipse.rse.terminals.ui.actions.LaunchTerminalCommand">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%Terminals.Service"
- class="org.eclipse.rse.internal.terminals.ui.propertypages.TerminalServicesPropertyPage"
- id="org.eclipse.rse.terminals.ui.propertypages.TerminalServicesPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem"/>
- </enabledWhen>
- </page>
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/Activator.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/Activator.java
deleted file mode 100644
index afa9a05f4..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/Activator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, Inc. and others.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Martin Oberhuber (Wind River) - [235626] Convert terminals.ui to MessageBundle format
- ********************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui;
-
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends SystemBasePlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.rse.internal.terminals.ui"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static String ICON_ID_LAUNCH_TERMINAL = "icon_id_launch_terminal"; //$NON-NLS-1$
- public static String ICON_ID_TERMINAL_SUBSYSTEM = "icon_id_terminal_subsystem"; //$NON-NLS-1$
- public static String ICON_ID_TERMINAL_SUBSYSTEM_LIVE = "icon_id_terminal_subsystem_live"; //$NON-NLS-1$
- public static String ICON_ID_REMOVE_TERMINAL = "icon_id_remove_terminal"; //$NON-NLS-1$
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (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;
- }
-
- /*
- * (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;
- }
-
- /**
- * Initialize the image registry by declaring all of the required graphics.
- */
- protected void initializeImageRegistry() {
- String path = getIconPath();
- putImageInRegistry(ICON_ID_LAUNCH_TERMINAL, path + "terminal_view.gif"); //$NON-NLS-1$
- putImageInRegistry(ICON_ID_TERMINAL_SUBSYSTEM, path
- + "terminalcommands_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(ICON_ID_TERMINAL_SUBSYSTEM_LIVE, path
- + "terminalcommandslive_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(ICON_ID_REMOVE_TERMINAL, path + "removeterminal.gif"); //$NON-NLS-1$
-
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalServiceHelper.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalServiceHelper.java
deleted file mode 100644
index 82c8a2edd..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalServiceHelper.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Anna Dushistova (MontaVista) - [227535] [rseterminal][api] terminals.ui should not depend on files.core
- * Anna Dushistova (MontaVista) - [227569] [rseterminal][api] Provide a "generic" Terminal subsystem
- ********************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.RSECorePlugin;
-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.terminals.ui.views.RSETerminalConnector;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalViewTab;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-
-public class TerminalServiceHelper {
-
- /**
- * Constructor for TerminalServiceHelper.
- */
- public TerminalServiceHelper() {
- super();
- }
-
- public static ITerminalServiceSubSystem getTerminalSubSystem(
- IHost connection) {
- ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
- ISubSystem[] subsystems = systemRegistry.getSubSystems(connection);
- for (int i = 0; i < subsystems.length; i++) {
- if (subsystems[i] instanceof ITerminalServiceSubSystem) {
- ITerminalServiceSubSystem subSystem = (ITerminalServiceSubSystem) subsystems[i];
- return subSystem;
- }
- }
- return null;
- }
-
- public static ITerminalServiceSubSystem[] getTerminalSubSystems(
- IHost connection) {
- List results = new ArrayList();
- ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
- ISubSystem[] subsystems = systemRegistry.getSubSystems(connection);
- for (int i = 0; i < subsystems.length; i++) {
- if (subsystems[i] instanceof ITerminalServiceSubSystem) {
- ITerminalServiceSubSystem subSystem = (ITerminalServiceSubSystem) subsystems[i];
- results.add(subSystem);
- }
- }
- return (ITerminalServiceSubSystem[]) results
- .toArray(new ITerminalServiceSubSystem[results.size()]);
- }
-
- public static TerminalElement createTerminalElement(CTabItem item,
- ITerminalServiceSubSystem terminalServiceSubSystem) {
- TerminalElement element = new TerminalElement(item.getText(),
- terminalServiceSubSystem);
- return element;
- }
-
- public static void removeTerminalElementFromHost(CTabItem item, IHost host) {
- ITerminalServiceSubSystem terminalServiceSubSystem = getTerminalSubSystem(host);
- if (terminalServiceSubSystem != null) {
- TerminalElement element = terminalServiceSubSystem.getChild(item.getText());
- terminalServiceSubSystem.removeChild(element);
- }
-
- }
-
- public static void updateTerminalShellForTerminalElement(CTabItem item) {
- Object data = item.getData();
- if (data instanceof IHost){
- IHost host = (IHost) data;
- ITerminalServiceSubSystem terminalServiceSubSystem = TerminalServiceHelper.getTerminalSubSystem(host);
- TerminalElement element = terminalServiceSubSystem.getChild(item.getText());
- if (element != null){
- ITerminalShell terminalShell = getTerminalShellFromTab(item);
- if (element.getTerminalShell() != terminalShell){
- element.setTerminalShell(terminalShell);
- }
- }
- }
- }
- private static ITerminalShell getTerminalShellFromTab(CTabItem item) {
- ITerminalShell terminalShell = null;
- ITerminalViewControl terminalViewControl = (ITerminalViewControl) item
- .getData(TerminalViewTab.DATA_KEY_CONTROL);
- ITerminalConnector terminalConnector = terminalViewControl
- .getTerminalConnector();
- if (terminalConnector instanceof RSETerminalConnector) {
- RSETerminalConnector rseTerminalConnector = (RSETerminalConnector) terminalConnector;
- terminalShell = rseTerminalConnector.getTerminalHostShell();
- }
- return terminalShell;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java
deleted file mode 100644
index 4d0951930..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [235626] initial API and implementation
- * Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views
- * Zhou Renjian (Kortide) - [282256] "null:..." status message for launched terminal
- *******************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TerminalUIResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.terminals.ui.TerminalUIResources"; //$NON-NLS-1$
-
- public static String RemoveTerminalAction_label;
- public static String RemoveTerminalAction_tooltip;
- public static String ShowInTerminalViewAction_label;
- public static String ShowInTerminalViewAction_tooltip;
-
- public static String TerminalsUI_cannotOpenView_error;
-
- public static String TerminalViewer_text;
-
- public static String TerminalViewElementAdapter_type;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, TerminalUIResources.class);
- // FIXME Workaround for NLS added in TM 3.1.1 where some translations
- // may no longer be possible. Fallback to hardcoded text in case the NLS
- // can not be found.
- // May be removed in TM 3.2 when a new NLS translation cycle starts.
- if (TerminalViewElementAdapter_type.startsWith("NLS missing message: ")) { //$NON-NLS-1$
- TerminalViewElementAdapter_type = "Terminal"; //$NON-NLS-1$
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties
deleted file mode 100644
index 68ad21366..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/TerminalUIResources.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Copyright (c) 2008 MontaVista Software, 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:
-# Yu-Fen Kuo (MontaVista) - initial API and implementation
-# Martin Oberhuber (Wind River) - [235626] Convert terminals.ui to MessageBundle format
-# Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views
-# Zhou Renjian (Kortide) - [282256] "null:..." status message for launched terminal
-################################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-RemoveTerminalAction_label=Remove Terminal
-RemoveTerminalAction_tooltip=Remove current terminal from terminals view
-ShowInTerminalViewAction_label=Show In Terminals View
-ShowInTerminalViewAction_tooltip=Show current terminal in Terminals view
-
-TerminalsUI_cannotOpenView_error=Can not open remote terminals view
-TerminalViewer_text=To open a terminal, right-click the Terminal subsystem under the target. Then select 'Launch Terminal' from the context menu.
-
-TerminalViewElementAdapter_type=Terminal
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/RemoveTerminalAction.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/RemoveTerminalAction.java
deleted file mode 100644
index e19c5190e..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/RemoveTerminalAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- * Anna Dushistova (MontaVista) - Adapted from SystemShowInShellViewAction
- * Anna Dushistova (MontaVista) - Adapted from ShowInTerminalViewAction
- * Martin Oberhuber (Wind River) - [235626] Convert terminals.ui to MessageBundle format
- *******************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.terminals.ui.Activator;
-import org.eclipse.rse.internal.terminals.ui.TerminalUIResources;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalViewer;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalsUI;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.swt.widgets.Shell;
-
-public class RemoveTerminalAction extends TerminalElementBaseAction {
- public RemoveTerminalAction(Shell parent) {
- this(TerminalUIResources.RemoveTerminalAction_label, TerminalUIResources.RemoveTerminalAction_tooltip,
- Activator.getDefault().getImageDescriptor(
- Activator.ICON_ID_REMOVE_TERMINAL), parent);
- }
-
- public RemoveTerminalAction(String label, String tooltip,
- ImageDescriptor image, Shell parent) {
- super(label, tooltip, image, parent);
- }
-
- public void run() {
- TerminalsUI terminalsUI = TerminalsUI.getInstance();
- TerminalViewer viewPart = terminalsUI.activateTerminalsView();
- for (int i = 0; i < selected.size(); i++) {
- TerminalElement element = (TerminalElement) selected.get(i);
- viewPart.getTabFolder().disposePageFor(element.getName());
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/ShowInTerminalViewAction.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/ShowInTerminalViewAction.java
deleted file mode 100644
index 5bde847fa..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/ShowInTerminalViewAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- * Anna Dushistova (MontaVista) - Adapted from SystemShowInShellViewAction
- * Martin Oberhuber (Wind River) - [235626] Convert terminals.ui to MessageBundle format
- *******************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui.actions;
-
-import org.eclipse.rse.internal.terminals.ui.Activator;
-import org.eclipse.rse.internal.terminals.ui.TerminalUIResources;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalViewer;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalsUI;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.swt.widgets.Shell;
-
-public class ShowInTerminalViewAction extends TerminalElementBaseAction {
-
- public ShowInTerminalViewAction(Shell parent) {
- super(TerminalUIResources.ShowInTerminalViewAction_label, TerminalUIResources.ShowInTerminalViewAction_tooltip,
- Activator.getDefault().getImageDescriptor(Activator.ICON_ID_LAUNCH_TERMINAL), parent);
- allowOnMultipleSelection(false);
- }
-
- /**
- * Called when this action is selected from the popup menu.
- */
- public void run() {
- TerminalsUI terminalsUI = TerminalsUI.getInstance();
- TerminalViewer viewPart = terminalsUI.activateTerminalsView();
- for (int i = 0; i < selected.size(); i++) {
- TerminalElement element = (TerminalElement) selected.get(i);
- viewPart.getTabFolder().showPageFor(element.getName());
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/TerminalElementBaseAction.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/TerminalElementBaseAction.java
deleted file mode 100644
index 96d658a0b..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/actions/TerminalElementBaseAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Anna Dushistova (MontaVista) - Adapted from SystemBaseShellAction
- * Yu-Fen Kuo (MontaVista) - Adapted from SystemBaseShellAction
- *******************************************************************************/
-
-package org.eclipse.rse.internal.terminals.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.terminals.core.elements.TerminalElement;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-public abstract class TerminalElementBaseAction extends SystemBaseAction {
- protected List selected;
-
- public TerminalElementBaseAction(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 object = e.next();
- if (object instanceof TerminalElement) {
- if (isApplicable((TerminalElement) object)) {
- selected.add(object);
- enable = true;
- } else {
- return false;
- }
- } else {
- return false;
- }
- }
-
- return enable;
- }
-
- protected boolean isApplicable(TerminalElement element) {
- return true;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapter.java
deleted file mode 100644
index be4296243..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Yu-Fen Kuo (MontaVista) - Adapted from ShellServiceSubSystemConfigurationAdapter
- * Anna Dushistova (MontaVista) - [227535] [rseterminal][api] terminals.ui should not depend on files.core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui.configuration.adapter;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.terminals.ui.Activator;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-
-public class TerminalServiceSubSystemConfigurationAdapter extends
- SubSystemConfigurationAdapter {
- protected ImageDescriptor activeImageDescriptor;
- protected ImageDescriptor inactiveImageDescriptor;
-
- public ImageDescriptor getImage(ISubSystemConfiguration config) {
- if (inactiveImageDescriptor == null) {
- inactiveImageDescriptor = Activator.getDefault()
- .getImageDescriptor(Activator.ICON_ID_TERMINAL_SUBSYSTEM);
- }
- return inactiveImageDescriptor;
- }
-
- public ImageDescriptor getLiveImage(ISubSystemConfiguration config) {
- if (activeImageDescriptor == null) {
- activeImageDescriptor = Activator.getDefault().getImageDescriptor(
- Activator.ICON_ID_TERMINAL_SUBSYSTEM_LIVE);
- }
- return activeImageDescriptor;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index 133b2baba..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/configuration/adapter/TerminalServiceSubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [180519][api] declaratively register adapter factories
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Yu-Fen Kuo (MontaVista) - Adapted from ShellServiceSubSystemConfigurationAdapterFactory
- ********************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui.configuration.adapter;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystemConfiguration;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-public class TerminalServiceSubSystemConfigurationAdapterFactory implements
- IAdapterFactory {
-
- private ISubSystemConfigurationAdapter factoryAdapter;
-
- public TerminalServiceSubSystemConfigurationAdapterFactory() {
- super();
- factoryAdapter = new TerminalServiceSubSystemConfigurationAdapter();
- }
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- Object adapter = null;
- if (adaptableObject instanceof TerminalServiceSubSystemConfiguration)
- adapter = factoryAdapter;
-
- return adapter;
- }
-
- public Class[] getAdapterList() {
- return new Class[] { ISubSystemConfigurationAdapter.class };
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/handlers/LaunchTerminalCommandHandler.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/handlers/LaunchTerminalCommandHandler.java
deleted file mode 100644
index ad7987c66..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/handlers/LaunchTerminalCommandHandler.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [187218] Fix error reporting for connect()
- * Kevin Doyle (IBM) - [187083] Launch Shell action available on folders inside virtual files
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Yu-Fen Kuo (MontaVista) - Adapted from SystemCommandAction
- * Anna Dushistova (MontaVista) - [227535] Adapted from LaunchTerminalAction to remove dependency from files.core
- * Anna Dushistova (MontaVista) - [244637] [rseterminal] Launch Terminal with selected directory doesn't work
- ********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.handlers;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.internal.terminals.ui.TerminalServiceHelper;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalViewer;
-import org.eclipse.rse.internal.terminals.ui.views.TerminalsUI;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class LaunchTerminalCommandHandler extends AbstractHandler {
-
- private ITerminalServiceSubSystem subSystem;
- private Object selected;
- private ISystemFilterReference selectedFilterRef;
-
- public LaunchTerminalCommandHandler() {
- }
-
- private IHost getCurrentHost(IAdaptable adaptable) {
- IHost currentHost = null;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) adaptable
- .getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null) {
- ISubSystem ss = adapter.getSubSystem(adaptable);
- if (ss != null) {
- currentHost = ss.getHost();
- }
- }
- return currentHost;
- }
-
- private ITerminalServiceSubSystem getTerminalSubSystem() {
- IHost currentHost = null;
-
- if (selectedFilterRef != null) {
- currentHost = getCurrentHost((IAdaptable) selectedFilterRef);
- } else if (selected != null) {
- currentHost = getCurrentHost((IAdaptable) selected);
- }
- if (currentHost != null) {
- return TerminalServiceHelper.getTerminalSubSystem(currentHost);
-
- }
- return subSystem;
- }
-
- private Object getTargetFromFilter() {
- 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) {
- return target;
- }
- }
- }
- return null;
- }
-
- private void init(IStructuredSelection selection) {
- Iterator e = selection.iterator();
- Object selectedObject = e.next();
-
- selected = null;
- subSystem = null;
- selectedFilterRef = null;
-
- if (selectedObject != null) {
- if (selectedObject instanceof ISystemFilterReference) {
- selectedFilterRef = (ISystemFilterReference) selectedObject;
- selected = getTargetFromFilter();
- } else if (selectedObject instanceof ITerminalServiceSubSystem) {
- subSystem = (ITerminalServiceSubSystem) selectedObject;
- } else {
- selected = selectedObject;
- }
- }
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- init((IStructuredSelection) HandlerUtil.getCurrentSelection(event));
- ITerminalServiceSubSystem terminalSubSystem = getTerminalSubSystem();
- if (terminalSubSystem != null) {
- TerminalsUI terminalsUI = TerminalsUI.getInstance();
- TerminalViewer viewer = terminalsUI.activateTerminalsView();
- if (!terminalSubSystem.isConnected()) {
- try {
- terminalSubSystem.connect(new NullProgressMonitor(), false);
- } catch (OperationCanceledException e) {
- // user canceled, return silently
- return null;
- } catch (Exception e) {
- SystemBasePlugin.logError(e.getLocalizedMessage(), e);
- }
- }
- if (terminalSubSystem.isConnected()) {
- CTabItem tab = viewer.getTabFolder().createTabItem(
- terminalSubSystem.getHost(), getInitialDirectoryCmd());
- TerminalElement element = TerminalServiceHelper
- .createTerminalElement(tab, terminalSubSystem);
- terminalSubSystem.addChild(element);
-
- }
- }
- return null;
- }
-
- private String getInitialDirectoryCmd() {
- if (selected == null)
- return null;
- String path = getWorkingDirectory(selected);
-
- String cdCmd;
- if (getTerminalSubSystem().getHost().getSystemType().isWindows()) {
- cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$
- } else
- {
- cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$
- }
- return cdCmd + "\r"; //$NON-NLS-1$
- }
-
- private String getWorkingDirectory(Object element) {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element)
- .getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null) {
- String path = (String) adapter.getAbsoluteName(element);
- // folder -- real or virtual
- if (ArchiveHandlerManager.isVirtual(path)) {
- path = path
- .substring(
- 0,
- path
- .indexOf(ArchiveHandlerManager.VIRTUAL_CANONICAL_SEPARATOR));
- }
- return path;
- }
- return null;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/propertypages/TerminalServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/propertypages/TerminalServicesPropertyPage.java
deleted file mode 100644
index b09b38786..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/propertypages/TerminalServicesPropertyPage.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Anna Dushistova (MontaVista) - adapted from ProcessServicesPropertyPage
- * Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
- ********************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui.propertypages;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem;
-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 TerminalServicesPropertyPage extends ServicesPropertyPage {
- private ITerminalServiceSubSystemConfiguration _currentFactory;
-
- protected TerminalServiceSubSystem getTerminalServiceSubSystem() {
- return (TerminalServiceSubSystem) getElement();
- }
-
- protected ServiceElement[] getServiceElements() {
- TerminalServiceSubSystem subSystem = getTerminalServiceSubSystem();
-
- IHost host = subSystem.getHost();
- _currentFactory = subSystem.getParentRemoteTerminalSubSystemConfiguration();
- ITerminalServiceSubSystemConfiguration[] factories = getTerminalServiceSubSystemConfigurations(host
- .getSystemType());
-
- // create elements for each
- ServiceElement[] elements = new ServiceElement[factories.length];
- for (int i = 0; i < factories.length; i++) {
- ITerminalServiceSubSystemConfiguration factory = factories[i];
- elements[i] = new FactoryServiceElement(host, factory);
- if (factory == _currentFactory) {
- elements[i].setSelected(true);
- }
- }
-
- return elements;
- }
-
- protected ITerminalServiceSubSystemConfiguration[] getTerminalServiceSubSystemConfigurations(
- IRSESystemType systemType) {
- List results = new ArrayList();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr
- .getSubSystemConfigurationsBySystemType(systemType, false, true);
-
- for (int i = 0; i < factories.length; i++) {
- ISubSystemConfiguration factory = factories[i];
- if (factory instanceof ITerminalServiceSubSystemConfiguration) {
- results.add(factory);
- }
- }
-
- return (ITerminalServiceSubSystemConfiguration[]) results
- .toArray(new ITerminalServiceSubSystemConfiguration[results
- .size()]);
- }
-
- protected ISubSystemConfiguration getCurrentSubSystemConfiguration() {
- return _currentFactory;
- }
-
- public void setSubSystemConfiguration(ISubSystemConfiguration factory) {
- _currentFactory = (ITerminalServiceSubSystemConfiguration) factory;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectionThread.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectionThread.java
deleted file mode 100644
index 36950a44a..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectionThread.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl
- * Anna Dushistova (MontaVista) - [246592] Terminal session issues "cd /
- ********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.internal.terminals.ui.TerminalServiceHelper;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-public class RSETerminalConnectionThread extends Thread {
- private final ITerminalControl fControl;
- private final RSETerminalConnectorImpl fConn;
- private ITerminalShell shell;
-
- public RSETerminalConnectionThread(RSETerminalConnectorImpl conn,
- ITerminalControl control) {
- super();
- fControl = control;
- fConn = conn;
- fControl.setState(TerminalState.CONNECTING);
- }
-
- public void run() {
- ITerminalServiceSubSystem subsystem = TerminalServiceHelper
- .getTerminalSubSystem(fConn.host);
-
- try {
- subsystem.connect(new NullProgressMonitor(), false);
- } catch (Exception e1) {
- connectFailed(e1.getMessage(), e1.getMessage());
- }
- try {
- if (subsystem instanceof TerminalServiceSubSystem) {
- ITerminalService ts = ((TerminalServiceSubSystem) subsystem).getTerminalService();
- shell = ts.launchTerminal("ansi", null, null, null, null, new NullProgressMonitor());
- }
- fConn.setInputStream(shell.getInputStream());
- fConn.setOutputStream(shell.getOutputStream());
- } catch (SystemMessageException e) {
- RSECorePlugin.getDefault().getLogger().logError("Error launching terminal", e); //$NON-NLS-1$
- }
- fConn.setTerminalHostShell(shell);
- fControl.setState(TerminalState.CONNECTED);
- try {
- // this is the workaround to delay read data
- // otherwise we might end of with race condition to processText
- // before dimension is set.
- Thread.sleep(500);
- // read data until the connection gets terminated
- readDataForever(fConn.getInputStream());
- } catch (InterruptedIOException e) {
- // we got interrupted: we are done...
- } catch (IOException e) {
- RSECorePlugin.getDefault().getLogger().logError("Error while reading data", e); //$NON-NLS-1$
- } catch (InterruptedException e) {
- }
- // when reading is done, we set the state to closed
- fControl.setState(TerminalState.CLOSED);
- }
-
- /**
- * disconnect the ssh session
- */
- void disconnect() {
- interrupt();
- }
-
- /**
- * Read the data from the 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];
- int n;
- // read until the thread gets interrupted....
- while ((n = in.read(bytes)) != -1) {
- fControl.getRemoteToTerminalOutputStream().write(bytes, 0, n);
- }
- }
-
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg(msg);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java
deleted file mode 100644
index 03ed67997..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008, 2009 MontaVista Software, Inc. and others
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- ********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-
-public class RSETerminalConnector extends RSETerminalConnectorImpl implements ITerminalConnector {
-
- public RSETerminalConnector(IHost host) {
- super(host);
- }
-
- public String getId() {
- return "rse_internal_connector"; //$NON-NLS-1$
- }
-
- public String getInitializationErrorMessage() {
- return null;
- }
-
- public String getName() {
- return "rse_internal_connector";
- }
-
- public boolean isHidden() {
- return true;
- }
-
- public boolean isInitialized() {
- return true;
- }
-
- public Object getAdapter(Class adapterType) {
- if (adapterType.isInstance(this))
- return this;
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectorImpl.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectorImpl.java
deleted file mode 100644
index 389d58b86..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnectorImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - initial API and implementation
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl
- ********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class RSETerminalConnectorImpl extends TerminalConnectorImpl {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- IHost host;
- private RSETerminalConnectionThread fConnection;
- private ITerminalShell shell;
-
- public RSETerminalConnectorImpl(IHost host) {
- super();
- this.host = host;
- }
-
- public void connect(ITerminalControl control) {
- super.connect(control);
- fConnection = new RSETerminalConnectionThread(this, control);
- fConnection.start();
- }
-
- public void doDisconnect() {
- fConnection.disconnect();
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- RSECorePlugin.getDefault().getLogger().logError("Error while closing input stream", exception); //$NON-NLS-1$
- }
- }
-
- if (getTerminalToRemoteStream() != null) {
- try {
- getTerminalToRemoteStream().close();
- } catch (Exception exception) {
- RSECorePlugin.getDefault().getLogger().logError("Error while closing terminal-to-remote stream", exception); //$NON-NLS-1$
- }
- }
- }
-
- public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
-
- public String getSettingsSummary() {
- return "RSE: " + host.getName();
- }
-
- public boolean isLocalEcho() {
- return shell.isLocalEcho();
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- if(shell != null)
- {
- shell.setTerminalSize(newWidth, newHeight);
- }
- }
-
- public InputStream getInputStream() {
- return fInputStream;
- }
-
- public void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
-
- public void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
-
- public void setTerminalHostShell(ITerminalShell shell) {
- this.shell = shell;
- }
-
- public ITerminalShell getTerminalHostShell() {
- return shell;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java
deleted file mode 100644
index be36435d9..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementAdapter.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562] dont implement ISystemOutputRemoteTypes
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
- * David McKnight (IBM) - [196842] Don't have open menu for folders
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [189873] Improve remote shell editor open action with background jobs
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Yu-Fen Kuo (MontaVista) - Adopted from SystemViewRemoteOutputAdapter
- * Anna Dushistova (MontaVista) - Adopted from SystemViewRemoteOutputAdapter
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Zhou Renjian (Kortide) - [282256] "null:..." status message for launched terminal
- *******************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.terminals.ui.Activator;
-import org.eclipse.rse.internal.terminals.ui.TerminalUIResources;
-import org.eclipse.rse.internal.terminals.ui.actions.RemoveTerminalAction;
-import org.eclipse.rse.internal.terminals.ui.actions.ShowInTerminalViewAction;
-import org.eclipse.rse.services.terminals.ITerminalShell;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-public class TerminalViewElementAdapter extends AbstractSystemViewAdapter
- implements ISystemRemoteElementAdapter {
- private List actions = null;
- private ShowInTerminalViewAction showInTerminalViewAction;
- private RemoveTerminalAction closeTerminalAction;
-
- public TerminalViewElementAdapter() {
- actions = new ArrayList();
- }
-
- public void addActions(SystemMenuManager menu,
- IStructuredSelection selection, Shell parent, String menuGroup) {
- Object firstSelection = selection.getFirstElement();
-
- if (firstSelection != null) {
- if (firstSelection instanceof TerminalElement) {
- TerminalElement cmdShell = (TerminalElement) firstSelection;
- if (showInTerminalViewAction == null) {
- showInTerminalViewAction = new ShowInTerminalViewAction(
- getShell());
-
- }
- menu.add(ISystemContextMenuConstants.GROUP_OPEN,
- showInTerminalViewAction);
-
- getTerminalActions((ITerminalServiceSubSystemConfiguration) cmdShell
- .getSubSystem().getSubSystemConfiguration());
-
- menu.add(ISystemContextMenuConstants.GROUP_CHANGE,
- closeTerminalAction);
- }
- } else {
- return;
- }
- }
-
- public List getTerminalActions(ITerminalServiceSubSystemConfiguration factory) {
- actions.clear();
- if (actions.size() == 0) {
- if (closeTerminalAction == null) {
- closeTerminalAction = new RemoveTerminalAction(getShell());
- }
- actions.add(closeTerminalAction);
- }
- return actions;
- }
-
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
- return null;
- }
-
- public ImageDescriptor getImageDescriptor(Object element) {
- if (element instanceof TerminalElement){
- TerminalElement terminalElement = (TerminalElement)element;
- ITerminalShell terminalShell = terminalElement.getTerminalShell();
- if (terminalShell != null){
- if (terminalShell.isActive())
- return Activator.getDefault().getImageDescriptor(
- Activator.ICON_ID_TERMINAL_SUBSYSTEM_LIVE);
- }
- }
- return Activator.getDefault().getImageDescriptor(
- Activator.ICON_ID_TERMINAL_SUBSYSTEM);
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public String getType(Object element) {
- return TerminalUIResources.TerminalViewElementAdapter_type;
- }
-
- public boolean hasChildren(IAdaptable element) {
- return false;
- }
-
- protected IPropertyDescriptor[] internalGetPropertyDescriptors() {
- return null;
- }
-
- protected Object internalGetPropertyValue(Object key) {
- return null;
- }
-
- public String getAbsoluteParentName(Object element) {
- return null;
- }
-
- public Object getRemoteParent(Object element, IProgressMonitor monitor)
- throws Exception {
- return null;
- }
-
- public String[] getRemoteParentNamesInUse(Object element,
- IProgressMonitor monitor) throws Exception {
- return null;
- }
-
- public boolean refreshRemoteObject(Object oldElement, Object newElement) {
- return false;
- }
-
- public String getRemoteSubType(Object element) {
- return null;
- }
-
- public String getRemoteType(Object element) {
- return null;
- }
-
- public String getRemoteTypeCategory(Object element) {
- return null;
- }
-
- public String getSubSystemConfigurationId(Object element) {
- return null;
- }
-
- public String getText(Object element) {
- return element.toString();
- }
-
- public String getAbsoluteName(Object object) {
- return object.toString();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementsAdapterFactory.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementsAdapterFactory.java
deleted file mode 100644
index 4692fd319..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewElementsAdapterFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Yu-Fen Kuo (MontaVista) - initial API and implementation
- * Anna Dushistova (MontaVista) - initial API and implementation
- ********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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;
-
-public class TerminalViewElementsAdapterFactory implements IAdapterFactory {
-
- private TerminalViewElementAdapter elementAdapter = new TerminalViewElementAdapter();
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- Object adapter = null;
- if (adaptableObject instanceof TerminalElement)
- adapter = elementAdapter;
-
- 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;
- }
-
- public Class[] getAdapterList() {
- return new Class[] { ISystemViewElementAdapter.class,
- ISystemDragDropAdapter.class,
- ISystemRemoteElementAdapter.class, IPropertySource.class,
- IWorkbenchAdapter.class, IActionFilter.class };
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewTab.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewTab.java
deleted file mode 100644
index 1aa256892..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewTab.java
+++ /dev/null
@@ -1,462 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- * Yu-Fen Kuo (MontaVista) - Adapted from CommandsViewWorkbook
- * Anna Dushistova (MontaVista) - Adapted from CommandsViewWorkbook
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Martin Oberhuber (Wind River) - [227571] RSE Terminal should honor Encoding set on the IHost
- * Michael Scharf (Wind River) - [236203] [rseterminal] Potentially UI blocking code in TerminalViewTab.createTabItem
- * Anna Dushistova (MontaVista) - [244437] [rseterminal] Possible race condition when multiple Terminals are launched after each other
- * Martin Oberhuber (Wind River) - [247700] Terminal uses ugly fonts in JEE package
- * Anna Dushistova (MontaVista) - [267609] [rseterminal] The first "Launch Terminal" command creates no terminal tab
- ********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.core.runtime.IAdaptable;
-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.resource.FontRegistry;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.terminals.ui.TerminalServiceHelper;
-import org.eclipse.rse.subsystems.terminals.core.ITerminalServiceSubSystem;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-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.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.FillLayout;
-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.Menu;
-import org.eclipse.tm.internal.terminal.control.ITerminalListener;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.control.TerminalViewControlFactory;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionClearAll;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCopy;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCut;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionPaste;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionSelectAll;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * This is the desktop view wrapper of the System View viewer.
- */
-public class TerminalViewTab extends Composite {
-
- public static String DATA_KEY_CONTROL = "$_control_$"; //$NON-NLS-1$
-
- private final CTabFolder tabFolder;
-
- private IPropertyChangeListener propertyChangeListener;
-
- private Menu menu;
-
- private boolean fMenuAboutToShow;
-
- private TerminalActionCopy fActionEditCopy;
-
- private TerminalActionCut fActionEditCut;
-
- private TerminalActionPaste fActionEditPaste;
-
- private TerminalActionClearAll fActionEditClearAll;
-
- private TerminalActionSelectAll fActionEditSelectAll;
-
- protected class TerminalContextMenuHandler implements MenuListener,
- IMenuListener {
- public void menuHidden(MenuEvent event) {
- fMenuAboutToShow = false;
- fActionEditCopy.updateAction(fMenuAboutToShow);
- }
-
- public void menuShown(MenuEvent e) {
-
- }
-
- public void menuAboutToShow(IMenuManager menuMgr) {
- fMenuAboutToShow = true;
- fActionEditCopy.updateAction(fMenuAboutToShow);
- fActionEditCut.updateAction(fMenuAboutToShow);
- fActionEditSelectAll.updateAction(fMenuAboutToShow);
- fActionEditPaste.updateAction(fMenuAboutToShow);
- fActionEditClearAll.updateAction(fMenuAboutToShow);
- }
- }
-
- public TerminalViewTab(final Composite parent, TerminalViewer viewer) {
- super(parent, SWT.NONE);
- tabFolder = new CTabFolder(this, SWT.NONE);
- tabFolder.setLayout(new FillLayout());
- tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
- setLayout(new FillLayout());
- tabFolder.setBackground(parent.getBackground());
- tabFolder.setSimple(false);
- tabFolder.setUnselectedImageVisible(false);
- tabFolder.setUnselectedCloseVisible(false);
-
- tabFolder.setMinimizeVisible(false);
- tabFolder.setMaximizeVisible(false);
- setupActions();
- }
-
- public void dispose() {
- if (propertyChangeListener != null) {
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- mgr.removePropertyChangeListener(propertyChangeListener);
- propertyChangeListener = null;
- }
- if (!tabFolder.isDisposed()) {
- tabFolder.dispose();
- }
- super.dispose();
- }
-
- public CTabFolder getFolder() {
- return tabFolder;
- }
-
- public void remove(Object root) {
-
- }
-
- public int getItemCount(){
- return tabFolder.getItemCount();
- }
-
- public CTabItem getSelectedTab() {
- if (tabFolder.getItemCount() > 0) {
- int index = tabFolder.getSelectionIndex();
- CTabItem item = tabFolder.getItem(index);
- return item;
- }
-
- return null;
- }
-
- public void showCurrentPage() {
- tabFolder.setFocus();
- }
-
- public void showPageFor(Object root) {
- for (int i = 0; i < tabFolder.getItemCount(); i++) {
- CTabItem item = tabFolder.getItem(i);
- if (item.getData() == root) {
- tabFolder.setSelection(item);
- }
-
- }
- }
-
- public void showPageFor(String tabName) {
- for (int i = 0; i < tabFolder.getItemCount(); i++) {
- CTabItem item = tabFolder.getItem(i);
- if (item.getText().equals(tabName)) {
- tabFolder.setSelection(item);
- return;
- }
-
- }
- }
-
- public void disposePageFor(String tabName) {
- for (int i = 0; i < tabFolder.getItemCount(); i++) {
- CTabItem item = tabFolder.getItem(i);
- if (item.getText().equals(tabName)) {
- item.dispose();
- return;
- }
-
- }
- }
-
- public void propertyChange(PropertyChangeEvent e) {
- // for now always update
- if (tabFolder!=null) {
- CTabItem[] items = tabFolder.getItems();
- for (int i=0; i<items.length; i++) {
- Object control = items[i].getData(DATA_KEY_CONTROL);
- if (control instanceof ITerminalViewControl) {
- updateTheme((ITerminalViewControl) control);
- }
- }
- }
- }
-
- public void updateTheme(final ITerminalViewControl control) {
- if (control != null) {
- IThemeManager mgr = PlatformUI.getWorkbench().getThemeManager();
- Font font;
- FontRegistry fr = mgr.getCurrentTheme().getFontRegistry();
- if (fr.hasValueFor("terminal.views.view.font.definition")) { //$NON-NLS-1$
- //Terminal View font if available
- font = fr.get("terminal.views.view.font.definition"); //$NON-NLS-1$
- } else if (fr.hasValueFor("REMOTE_COMMANDS_VIEW_FONT")) { //$NON-NLS-1$
- //fallback: "Remote Shell Font"
- font = fr.get("REMOTE_COMMANDS_VIEW_FONT"); //$NON-NLS-1$
- } else {
- //fallback: "Basic Text Font"
- font = fr.get("org.eclipse.jface.textfont"); //$NON-NLS-1$
- }
- control.setFont(font);
- if (propertyChangeListener == null) {
- final TerminalViewTab myself = this;
- propertyChangeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- myself.propertyChange(event);
- }
- };
- mgr.addPropertyChangeListener(propertyChangeListener);
- }
- }
- }
-
- public CTabItem createTabItem(IAdaptable root,
- final String initialWorkingDirCmd) {
- final CTabItem item = new CTabItem(tabFolder, SWT.CLOSE);
- setTabTitle(root, item);
-
- item.setData(root);
- Composite c = new Composite(tabFolder, SWT.NONE);
- c.setLayout(new FillLayout());
-
- tabFolder.getParent().layout(true);
- if (root instanceof IHost) {
- final IHost host = (IHost) root;
-
- ITerminalConnector connector = new RSETerminalConnector(host);
- ITerminalViewControl terminalControl = TerminalViewControlFactory
- .makeControl(new ITerminalListener() {
-
- public void setState(final TerminalState state) {
- if (state == TerminalState.CLOSED
- || state == TerminalState.CONNECTED) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (!item.isDisposed()) {
- final ITerminalServiceSubSystem terminalServiceSubSystem = TerminalServiceHelper
- .getTerminalSubSystem(host);
-
- if (state == TerminalState.CONNECTED)
- TerminalServiceHelper
- .updateTerminalShellForTerminalElement(item);
-
- setTabImage(host, item);
- ISystemRegistry registry = RSECorePlugin
- .getTheSystemRegistry();
- registry
- .fireEvent(new SystemResourceChangeEvent(
- terminalServiceSubSystem,
- ISystemResourceChangeEvents.EVENT_REFRESH,
- terminalServiceSubSystem));
- }
- if (state == TerminalState.CONNECTED) {
-
- if (initialWorkingDirCmd != null) {
- Object data = item
- .getData(DATA_KEY_CONTROL);
- if (data instanceof ITerminalViewControl)
- ((ITerminalViewControl) data)
- .pasteString(initialWorkingDirCmd);
- }
- }
- }
- });
- }
-
- }
-
- public void setTerminalTitle(String title) {
-
- }
- }, c, new ITerminalConnector[] { connector });
- // Specify Encoding for Terminal
- try {
- terminalControl.setEncoding(host.getDefaultEncoding(true));
- } catch (UnsupportedEncodingException e) {
- /* ignore and allow fallback to default encoding */
- }
- terminalControl.setConnector(connector);
- item.setData(DATA_KEY_CONTROL, terminalControl);
- updateTheme(terminalControl);
- terminalControl.connectTerminal();
- }
- item.setControl(c);
- tabFolder.setSelection(item);
- item.addDisposeListener(new DisposeListener() {
-
- public void widgetDisposed(DisposeEvent e) {
- Object source = e.getSource();
- if (source instanceof CTabItem) {
- CTabItem currentItem = (CTabItem) source;
- Object data = currentItem.getData(DATA_KEY_CONTROL);
- if (data instanceof ITerminalViewControl) {
- ((ITerminalViewControl) data).disposeTerminal();
- }
- data = currentItem.getData();
- if (data instanceof IHost) {
- TerminalServiceHelper.removeTerminalElementFromHost(
- currentItem, (IHost) data);
- }
- }
-
- }
-
- });
-
- setupContextMenus();
- return item;
-
- }
-
- protected void setupActions() {
- fActionEditCopy = new TerminalActionCopy() {
- protected ITerminalViewControl getTarget() {
- return getCurrentTerminalViewControl();
- }
- };
- fActionEditCut = new TerminalActionCut() {
- protected ITerminalViewControl getTarget() {
- return getCurrentTerminalViewControl();
- }
- };
- fActionEditPaste = new TerminalActionPaste() {
- protected ITerminalViewControl getTarget() {
- return getCurrentTerminalViewControl();
- }
- };
- fActionEditClearAll = new TerminalActionClearAll() {
- protected ITerminalViewControl getTarget() {
- return getCurrentTerminalViewControl();
- }
- };
- fActionEditSelectAll = new TerminalActionSelectAll() {
- protected ITerminalViewControl getTarget() {
- return getCurrentTerminalViewControl();
- }
- };
- }
-
- protected void setupContextMenus() {
- ITerminalViewControl terminalViewControl = getCurrentTerminalViewControl();
- if (terminalViewControl == null)
- return;
-
- if (menu == null) {
- MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menu = menuMgr.createContextMenu(tabFolder);
- loadContextMenus(menuMgr);
- TerminalContextMenuHandler contextMenuHandler = new TerminalContextMenuHandler();
- menuMgr.addMenuListener(contextMenuHandler);
- menu.addMenuListener(contextMenuHandler);
- }
- Control ctlText = terminalViewControl.getControl();
- ctlText.setMenu(menu);
- }
-
- protected void loadContextMenus(IMenuManager menuMgr) {
- menuMgr.add(fActionEditCopy);
- menuMgr.add(fActionEditPaste);
- menuMgr.add(new Separator());
- menuMgr.add(fActionEditClearAll);
- menuMgr.add(fActionEditSelectAll);
- menuMgr.add(new Separator());
-
- // Other plug-ins can contribute there actions here
- menuMgr.add(new Separator("Additions")); //$NON-NLS-1$
- }
-
- private void setTabTitle(IAdaptable root, CTabItem titem) {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) root
- .getAdapter(ISystemViewElementAdapter.class);
- if (va != null) {
- updateWithUniqueTitle(va.getName(root), titem);
- setTabImage(root, titem);
- }
- }
-
- private void setTabImage(IAdaptable root, CTabItem titem) {
- ISystemViewElementAdapter va = (ISystemViewElementAdapter) root
- .getAdapter(ISystemViewElementAdapter.class);
- if (va != null) {
- if (root instanceof IHost) {
- ITerminalServiceSubSystem terminalServiceSubSystem = TerminalServiceHelper
- .getTerminalSubSystem((IHost) root);
- TerminalElement element = terminalServiceSubSystem
- .getChild(titem.getText());
- if (element != null) {
- va = (ISystemViewElementAdapter) element
- .getAdapter(ISystemViewElementAdapter.class);
- titem
- .setImage(va.getImageDescriptor(element)
- .createImage());
- return;
- }
- }
-
- titem.setImage(va.getImageDescriptor(root).createImage());
- }
- }
-
- private void updateWithUniqueTitle(String title, CTabItem currentItem) {
- CTabItem[] items = tabFolder.getItems();
- int increment = 1;
- String temp = title;
- for (int i = 0; i < items.length; i++) {
- if (items[i] != currentItem) {
- String name = items[i].getText();
- if (name != null) {
- if (name.equals(temp)) {
- temp = title + " " + increment++; //$NON-NLS-1$
- }
- }
-
- }
- }
- currentItem.setText(temp);
- }
-
- private ITerminalViewControl getCurrentTerminalViewControl() {
- if (tabFolder != null && !tabFolder.isDisposed()) {
- CTabItem item = tabFolder.getSelection();
- if (item != null && !item.isDisposed()) {
- Object data = item.getData(DATA_KEY_CONTROL);
- if (data instanceof ITerminalViewControl)
- return ((ITerminalViewControl) data);
- }
- }
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java
deleted file mode 100644
index 2e6bd6f57..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalViewer.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * David McKnight (IBM) - [165680] "Show in Remote Shell View" does not work
- * Kevin Doyle (IBM) - [198534] Shell Menu Enablement Issue's
- * Radoslav Gerganov(ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
- * Yu-Fen Kuo (MontaVista) - Adapted from SystemCommandsViewPart
- * Anna Dushistova (MontaVista) - Adapted from SystemCommandsViewPart
- * Yu-Fen Kuo (MontaVista) - [227572] RSE Terminal doesn't reset the "connected" state when the shell exits
- * Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl
- * Anna Dushistova (MontaVista) - [238257] Request a help text when no tab is open in "Remote Shell", "Remote Monitor" and "Terminals" views
- * Anna Dushistova (MontaVista) - [235097] [rseterminal] Cannot activate RSE Terminals View with the keyboard
- * Anna Dushistova (MontaVista) - [267609] [rseterminal] The first "Launch Terminal" command creates no terminal tab
- *********************************************************************************/
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-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.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.terminals.ui.TerminalUIResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.terminals.core.elements.TerminalElement;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-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.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.part.ViewPart;
-
-public class TerminalViewer extends ViewPart implements ISelectionListener,
- SelectionListener, ISelectionChangedListener,
- ISystemResourceChangeListener, ISystemShellProvider, IRSEViewPart,
- IMenuListener, ISystemMessageLine {
-
- private TerminalViewTab tabFolder;
-
- private PageBook pagebook;
-
- private Label noTabShownLabel;
-
- public static String VIEW_ID = "org.eclipse.rse.terminals.ui.view.TerminalView"; //$NON-NLS-1$
-
- public void createPartControl(Composite parent) {
- pagebook = new PageBook(parent, SWT.NONE);
-
- tabFolder = new TerminalViewTab(pagebook, this);
- tabFolder.getFolder().addSelectionListener(this);
-
- // Page 2: Nothing selected
- noTabShownLabel = new Label(pagebook, SWT.TOP + SWT.LEFT + SWT.WRAP);
- noTabShownLabel.setText(TerminalUIResources.TerminalViewer_text);
- showEmptyPage();
-
-
- ISelectionService selectionService = getSite().getWorkbenchWindow()
- .getSelectionService();
- selectionService.addSelectionListener(this);
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
-
- registry.addSystemResourceChangeListener(this);
-
- fillLocalToolBar();
-
- }
-
- public void setFocus() {
- tabFolder.setFocus();
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- // TODO Auto-generated method stub
-
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void widgetSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event) {
- if (event.getType() == ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_REMOVED) {
- Object source = event.getSource();
- if (source instanceof TerminalElement) {
- tabFolder.disposePageFor(((TerminalElement) source).getName());
- }
- }else if(event.getType() == ISystemResourceChangeEvents.EVENT_REFRESH){
- if(tabFolder.getItemCount() == 0)
- showEmptyPage();
- else
- showTabsPage();
- }
- }
-
- public Shell getShell() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Viewer getRSEViewer() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void menuAboutToShow(IMenuManager manager) {
- // TODO Auto-generated method stub
-
- }
-
- public void clearErrorMessage() {
- // TODO Auto-generated method stub
-
- }
-
- public void clearMessage() {
- // TODO Auto-generated method stub
-
- }
-
- public String getErrorMessage() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getMessage() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public SystemMessage getSystemErrorMessage() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setErrorMessage(String message) {
- // TODO Auto-generated method stub
-
- }
-
- public void setErrorMessage(SystemMessage message) {
- // TODO Auto-generated method stub
-
- }
-
- public void setErrorMessage(Throwable exc) {
- // TODO Auto-generated method stub
-
- }
-
- public void setMessage(String message) {
- // TODO Auto-generated method stub
-
- }
-
- public void setMessage(SystemMessage message) {
- // TODO Auto-generated method stub
-
- }
-
- public void fillLocalToolBar() {
- if (tabFolder != null) {
- // IActionBars actionBars = getViewSite().getActionBars();
- //
- // if (_shellActions == null || _shellActions.size() == 0)
- // {
- // updateShellActions();
- // _clearAction = new ClearAction();
- // _printTableAction = new SystemTablePrintAction(getTitle(), null);
- // IMenuManager menuManager = actionBars.getMenuManager();
- // addMenuItems(menuManager);
- // _statusLine = actionBars.getStatusLineManager();
- // }
- // IToolBarManager toolBarManager = actionBars.getToolBarManager();
- // addToolBarItems(toolBarManager);
- //
- // updateActionStates();
- }
- }
-
- public TerminalViewTab getTabFolder() {
- return tabFolder;
- }
-
- private void showEmptyPage() {
- pagebook.showPage(noTabShownLabel);
- }
-
- private void showTabsPage(){
- pagebook.showPage(tabFolder);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalsUI.java b/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalsUI.java
deleted file mode 100644
index 8563074d2..000000000
--- a/rse/plugins/org.eclipse.rse.terminals.ui/src/org/eclipse/rse/internal/terminals/ui/views/TerminalsUI.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Yu-Fen Kuo (MontaVista) - Adapted from SystemCommandsUI
- * Anna Dushistova (MontaVista) - [228577] [rseterminal] Clean up RSE Terminal impl
- * Martin Oberhuber (Wind River) - [235626] Convert terminals.ui to MessageBundle format
- ********************************************************************************/
-
-package org.eclipse.rse.internal.terminals.ui.views;
-
-import org.eclipse.rse.internal.terminals.ui.TerminalUIResources;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A singleton class which has handle to the terminals view
- */
-public class TerminalsUI {
-
- // singleton instance
- private static TerminalsUI instance;
- private static TerminalViewer viewer;
-
- private TerminalsUI() {
- super();
- }
-
- /**
- * Get the singleton instance.
- *
- * @return the singleton object of this type
- */
- public static TerminalsUI getInstance() {
- if (instance == null) {
- instance = new TerminalsUI();
- }
-
- return instance;
- }
-
- public TerminalViewer activateTerminalsView() {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- viewer = (TerminalViewer) page.showView(TerminalViewer.VIEW_ID);
- page.bringToTop(viewer);
- } catch (PartInitException e) {
- SystemBasePlugin.logError(TerminalUIResources.TerminalsUI_cannotOpenView_error, e);
- }
-
- return viewer;
- }
-
- public static TerminalViewer getTerminalsView() {
- return viewer;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui.capabilities/.project b/rse/plugins/org.eclipse.rse.ui.capabilities/.project
deleted file mode 100644
index 3bf241597..000000000
--- a/rse/plugins/org.eclipse.rse.ui.capabilities/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.ui.capabilities</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.ui.capabilities/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.ui.capabilities/META-INF/MANIFEST.MF
deleted file mode 100644
index 11a6a9dbe..000000000
--- a/rse/plugins/org.eclipse.rse.ui.capabilities/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.rse.ui.capabilities;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
diff --git a/rse/plugins/org.eclipse.rse.ui.capabilities/about.html b/rse/plugins/org.eclipse.rse.ui.capabilities/about.html
deleted file mode 100644
index eabcdec66..000000000
--- a/rse/plugins/org.eclipse.rse.ui.capabilities/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 8, 2009</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.capabilities/build.properties b/rse/plugins/org.eclipse.rse.ui.capabilities/build.properties
deleted file mode 100644
index 341afc272..000000000
--- a/rse/plugins/org.eclipse.rse.ui.capabilities/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2009 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,\
- plugin.properties,\
- plugin.xml
diff --git a/rse/plugins/org.eclipse.rse.ui.capabilities/plugin.properties b/rse/plugins/org.eclipse.rse.ui.capabilities/plugin.properties
deleted file mode 100644
index 8ce6b72b1..000000000
--- a/rse/plugins/org.eclipse.rse.ui.capabilities/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Copyright (c) 2009 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
-################################################################################
-providerName=Eclipse.org - DSDP
-bundleName=RSE Capabilities Plug-in
-
-activity.rse=Remote System Explorer
-activity.rse.desc=Enable features of the Remote System Explorer (RSE).
-activity.tm.terminal=Terminal
-activity.tm.terminal.desc=Enables the TM Terminal View. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui.capabilities/plugin.xml b/rse/plugins/org.eclipse.rse.ui.capabilities/plugin.xml
deleted file mode 100644
index 622c60b62..000000000
--- a/rse/plugins/org.eclipse.rse.ui.capabilities/plugin.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?> <!--
- Copyright (c) 2009 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
- -->
-
-<plugin>
-
- <extension
- point="org.eclipse.ui.activities">
-
- <!-- EXAMPLE CODE: Uncomment for debugging Capability Defs
- Put the activity in the category: By means of not putting it
- in any category, the Activity is invisible in the Prefspage UI.
- Products can add categories, or define trigger points to enable it.
- <category id="org.eclipse.rse.Category"
- description="Remote System Explorer (RSE) Activities"
- name="Remote System Explorer" />
- <categoryActivityBinding activityId="org.eclipse.rse.activity"
- categoryId="org.eclipse.rse.Category" />
- <categoryActivityBinding activityId="org.eclipse.tm.terminal.activity"
- categoryId="org.eclipse.rse.Category" />
- -->
-
- <!-- EXAMPLE CODE: CreateRemoteProject is special: typically not
- in the UI, but disabled by default
- <categoryActivityBinding activityId="org.eclipse.rse.CreateRemoteProject"
- categoryId="org.eclipse.rse.Category" />
- <defaultEnablement id="org.eclipse.rse.CreateRemoteProject" />
- -->
-
- <!-- All of RSE, defined using general pattern for plugins -->
- <activity
- description="%activity.rse.desc"
- id="org.eclipse.rse.activity"
- name="%activity.rse">
- </activity>
- <activityPatternBinding
- activityId="org.eclipse.rse.activity"
- pattern="org\.eclipse\.rse\..*/.*">
- </activityPatternBinding>
- <activityPatternBinding
- activityId="org.eclipse.rse.activity"
- pattern="org\.eclipse\.tm\.discovery\..*/.*">
- </activityPatternBinding>
-
- <!-- Create remote project: May be disabled by default without UI -->
- <activity id="org.eclipse.rse.CreateRemoteProject"
- description="Filters EFS Create Remote Project menu in the RSE Views"
- name="RSE Create Remote Project" />
- <activityPatternBinding
- activityId="org.eclipse.rse.CreateRemoteProject"
- pattern="org\.eclipse\.rse\.efs\.ui/createRemoteProject"/>
-
- <!-- Terminal -->
- <activity id="org.eclipse.tm.terminal.activity"
- description="%activity.tm.terminal.desc"
- name="%activity.tm.terminal" />
- <activityPatternBinding
- activityId="org.eclipse.tm.terminal.activity"
- pattern="org\.eclipse\.tm\.terminal\..*/.*"/>
-
- </extension>
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.ui/.classpath b/rse/plugins/org.eclipse.rse.ui/.classpath
deleted file mode 100644
index e36b0554b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.classpath
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="model"/>
- <classpathentry kind="src" path="UI"/>
- <classpathentry kind="src" path="subsystems"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/rse/**"/>
- <accessrule kind="discouraged" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <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.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/.options b/rse/plugins/org.eclipse.rse.ui/.options
deleted file mode 100644
index 561d2db3f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.rse.ui/debug = true
diff --git a/rse/plugins/org.eclipse.rse.ui/.project b/rse/plugins/org.eclipse.rse.ui/.project
deleted file mode 100644
index 00484ef09..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.ui/.settings/.api_filters b/rse/plugins/org.eclipse.rse.ui/.settings/.api_filters
deleted file mode 100644
index 2027e2021..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.settings/.api_filters
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.rse.ui" version="2">
- <resource path="subsystems/org/eclipse/rse/core/subsystems/SubSystem.java" type="org.eclipse.rse.core.subsystems.SubSystem">
- <filter id="574619656">
- <message_arguments>
- <message_argument value="ISystemFilterPoolReferenceManagerProvider"/>
- <message_argument value="SubSystem"/>
- </message_arguments>
- </filter>
- <filter id="574619656">
- <message_arguments>
- <message_argument value="ISubSystem"/>
- <message_argument value="SubSystem"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
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 5abac8507..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Aug 06 17:28:09 CEST 2009
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
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 138063a1c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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.4
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 5b6b53f97..000000000
--- a/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml
+++ /dev/null
@@ -1,944 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2008 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) - [174945] split importexport icons from rse.ui
-Kevin Doyle (IBM) - [212940] Added help for Remote Monitor
-David Dykstal (IBM) - [231630] adding help for services property page
-David Dykstal (IBM) - [232317] adding help for datastore preferences page
-David Dykstal (IBM) - [232585] adding help for service subsystem wizard page
-David Dykstal (IBM) - [244950] fix broken links due to ".htm" extension
--->
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<contexts>
- <context id="ServicesPropertyPage">
- <description>This page displays properties that configure the underlying services used by this subsystem. Select the configuration to be used for this subsystem and then edit the properties for each available service in that configuration.</description>
- </context>
- <context id="ServiceSubsystemWizardPage">
- <description>This wizard page displays the properties of the underlying services used by this subsystem.
-
-Select the configuration to be used for this subsystem and then edit the properties for each available service in that configuration.</description>
- </context>
-
-<!-- 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>
-
-<!-- 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.html" 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.html" 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.html" 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.html" 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.html" 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.html" 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.html" 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.html" 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.html" 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... -->
-<!-- FIXME this one is OBSOLETE, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=186769 -->
-<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>
-<!-- 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>
-<!-- Remote Monitor View... -->
-<context id="mntr0000">
-<description>This view lets you view the contents and properties of remote objects and configure polling options to refresh remote objects every 5 to 200 seconds.
-</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.html" />
-</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.html" />
-</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.html" />
-</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.html" />
-</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.html" />
-<topic label="Connecting to a remote Windows host" href="../org.eclipse.rse.doc.user/tasks/tbeginwindows.html" />
-</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.html" />
-<topic label="Connecting to a remote Windows host" href="../org.eclipse.rse.doc.user/tasks/tbeginwindows.html" />
-</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.html"/>
-</context>
-<context id="rsac0000">
-<description>Opens Remote Search dialog page for text and file searching on remote systems.</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>
-
-<!-- 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>
-
-<!-- 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>
-
-<!-- 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>
-<context id="ActionImportConnectionDefinitions">
- <description>This action imports connection definitions that have been exported from another workbench. A file selection dialog is displayed, and the specified file containing the connection definitions is imported. New connections will appear in the workspace. If a connection by that name already exists in the workspace, the connection being imported will be renamed.</description>
-</context>
-<context id="ActionExportConnectionDefinitions">
- <description>This action exports connection definitions to a file. A file selection dialog is displayed, and you specify the directory and file name into which to export the selected connections and their filters. You may then import the connections into another workbench using the import action.</description>
-</context>
-<context id="DStorePreferencePage">
- <description>The DataStore preference page allows you to set various parameters associated with DataStore protocol.
-
-You may set the timeout value used to establish the initial connection as well as the &quot;keepalive&quot; characteristics of the underlying connection.
-
-You may also show or suppress warnings if the server and client versions of the protocol are not exactly matched.</description>
-</context>
-
-</contexts>
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 ba7e5c2eb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,60 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.ui;singleton:=true
-Bundle-Version: 3.1.1.qualifier
-Bundle-Activator: org.eclipse.rse.ui.RSEUIPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.expressions,
- org.eclipse.core.resources,
- org.eclipse.jface.text,
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.forms,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)"
-Import-Package: com.ibm.icu.lang,
- com.ibm.icu.text,
- com.ibm.icu.util
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.core.subsystems,
- org.eclipse.rse.internal.ui;x-friends:="org.eclipse.rse.connectorservice.dstore,org.eclipse.rse.processes.ui",
- org.eclipse.rse.internal.ui.actions;x-internal:=true,
- org.eclipse.rse.internal.ui.dialogs;x-internal:=true,
- org.eclipse.rse.internal.ui.filters;x-internal:=true,
- org.eclipse.rse.internal.ui.filters.dialogs;x-internal:=true,
- org.eclipse.rse.internal.ui.logging;x-internal:=true,
- org.eclipse.rse.internal.ui.propertypages;x-internal:=true,
- org.eclipse.rse.internal.ui.subsystems;x-internal:=true,
- org.eclipse.rse.internal.ui.view;x-internal:=true,
- org.eclipse.rse.internal.ui.view.monitor;x-internal:=true,
- org.eclipse.rse.internal.ui.view.scratchpad;x-internal:=true,
- org.eclipse.rse.internal.ui.view.search;x-internal:=true,
- org.eclipse.rse.internal.ui.view.team;x-internal:=true,
- org.eclipse.rse.internal.ui.widgets;x-internal:=true,
- 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.internal.model;x-internal:=true,
- org.eclipse.rse.ui.messages,
- org.eclipse.rse.ui.model,
- org.eclipse.rse.ui.open,
- org.eclipse.rse.ui.operations,
- org.eclipse.rse.ui.propertypages,
- org.eclipse.rse.ui.subsystems,
- org.eclipse.rse.ui.validators,
- org.eclipse.rse.ui.view,
- org.eclipse.rse.ui.widgets,
- org.eclipse.rse.ui.widgets.services,
- org.eclipse.rse.ui.wizards,
- org.eclipse.rse.ui.wizards.newconnection,
- org.eclipse.rse.ui.wizards.registries
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/DefaultUIInteractionProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/DefaultUIInteractionProvider.java
deleted file mode 100644
index e715cde09..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/DefaultUIInteractionProvider.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [190231] initial API and implementation
- * Martin Oberhuber (Wind River) - brought in methods from SubSystem (c) IBM
- * Martin Oberhuber (Wind River) - [236355] [api] Add an IRSEInteractionProvider#eventExec() method
- *******************************************************************************/
-package org.eclipse.rse.internal.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.rse.core.IRSEInteractionProvider;
-import org.eclipse.rse.core.IRSERunnableWithProgress;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A Default Interaction Provider that runs in the Eclipse / SWT UI. Meant to
- * provide the same functionality as it was there before UI / Non-UI Splitting.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work or
- * that it will remain the same. Please do not use this API without consulting
- * with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
- * team.
- * </p>
- *
- * @since org.eclipse.rse.ui 3.0
- */
-public class DefaultUIInteractionProvider implements IRSEInteractionProvider {
-
- private Shell shell = 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);
- }
- }
-
- /**
- * 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.
- *
- * @deprecated this is scheduled to be removed since we want to avoid UI
- * components in SubSystem.
- */
- 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.getTheSystemRegistryUI().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;
- }
- }
-
- /**
- * 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();
- }
-
- public void runInDefaultContext(boolean fork, boolean cancellable, IRSERunnableWithProgress runnable) throws InvocationTargetException,
- InterruptedException {
- // TODO Auto-generated method stub
- }
-
- private Display getDefaultDisplay() {
- Display d = Display.getCurrent();
- if (d == null) {
- d = SystemBasePlugin.getActiveWorkbenchShell().getDisplay();
- if (d == null) {
- d = Display.getDefault();
- }
- }
- return d;
- }
-
- public void asyncExec(final Runnable runnable) {
- getDefaultDisplay().asyncExec(runnable);
- }
-
- public void eventExec(final Runnable runnable) {
- if (Display.getCurrent() != null) {
- runnable.run();
- } else {
- asyncExec(runnable);
- }
- }
-
- public void flushRunnableQueue() {
- Display d = Display.getCurrent();
- if (d == null) {
- getDefaultDisplay().syncExec(new Runnable() {
- public void run() {
- flushRunnableQueue();
- }
- });
- } else {
- while (d.readAndDispatch()) {
- // flush the event queue
- }
- }
- }
-
- public IProgressMonitor getDefaultProgressMonitor() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void showMessage(SystemMessage msg) {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.java
deleted file mode 100644
index 790b829c0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class GenericMessages extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.ui.GenericMessages";//$NON-NLS-1$
-
- public static String ResourceNavigator_goto;
-
-
- public static String TransferOperation_message;
-
-
-
- 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 RSEQuery_task;
-
- public static String Error;
- public static String Question;
- public static String Warning;
- public static String Information;
-
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, GenericMessages.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.properties
deleted file mode 100644
index 905cc019d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/GenericMessages.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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:
-# David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
-# David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-ResourceNavigator_goto = Goto
-
-# ==============================================================================
-# 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
-
-TransferOperation_message = Transfer Operation
-
-RSEQuery_task = RSE Query
-
-Error=Error
-Question=Question
-Warning=Warning
-Information=Information
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/PreferencesMapper.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/PreferencesMapper.java
deleted file mode 100644
index 5aa5c8148..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/PreferencesMapper.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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.ui;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-/**
- * The PreferencesMapper provides an implementation of IPreferenceStore over a "lower level"
- * Preferences store. This is a relatively straightforward delegation.
- *
- * This class is internal and may not be used or subclassed by users of RSE. This should be used
- * only within RSE as a means of exploiting field editors on preferences that are stored
- * in {@link Preferences}.
- *
- * @see Preferences
- * @see IPreferenceStore
- */
-public class PreferencesMapper implements IPreferenceStore {
-
- private Preferences preferences = null;
- private boolean listening = true;
- private Map listeners = new HashMap();
-
- private class MyPropertyChangeListener implements org.eclipse.core.runtime.Preferences.IPropertyChangeListener {
-
- private IPropertyChangeListener containedListener = null;
-
- public MyPropertyChangeListener(IPropertyChangeListener containedListener) {
- this.containedListener = containedListener;
- }
-
- public void propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
- if (listening) {
- String property = event.getProperty();
- Object oldValue = event.getOldValue();
- Object newValue = event.getNewValue();
- PropertyChangeEvent newEvent = new PropertyChangeEvent(this, property, oldValue, newValue);
- containedListener.propertyChange(newEvent);
- }
- }
-
- }
-
- public PreferencesMapper(Preferences preferences) {
- this.preferences = preferences;
- }
-
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (!listeners.containsKey(listener)) {
- MyPropertyChangeListener l = new MyPropertyChangeListener(listener);
- listeners.put(listener, l);
- preferences.addPropertyChangeListener(l);
- }
- }
-
- public boolean contains(String name) {
- return preferences.contains(name);
- }
-
- public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
- for (Iterator z = listeners.keySet().iterator(); z.hasNext();) {
- IPropertyChangeListener listener = (IPropertyChangeListener) z.next();
- PropertyChangeEvent e = new PropertyChangeEvent(this, name, oldValue, newValue);
- listener.propertyChange(e);
- }
- }
-
- public boolean getBoolean(String name) {
- return preferences.getBoolean(name);
- }
-
- public boolean getDefaultBoolean(String name) {
- return preferences.getDefaultBoolean(name);
- }
-
- public double getDefaultDouble(String name) {
- return preferences.getDefaultDouble(name);
- }
-
- public float getDefaultFloat(String name) {
- return preferences.getDefaultFloat(name);
- }
-
- public int getDefaultInt(String name) {
- return preferences.getDefaultInt(name);
- }
-
- public long getDefaultLong(String name) {
- return preferences.getDefaultLong(name);
- }
-
- public String getDefaultString(String name) {
- return preferences.getDefaultString(name);
- }
-
- public double getDouble(String name) {
- return preferences.getDouble(name);
- }
-
- public float getFloat(String name) {
- return preferences.getFloat(name);
- }
-
- public int getInt(String name) {
- return preferences.getInt(name);
- }
-
- public long getLong(String name) {
- return preferences.getLong(name);
- }
-
- public String getString(String name) {
- return null;
- }
-
- public boolean isDefault(String name) {
- return preferences.isDefault(name);
- }
-
- public boolean needsSaving() {
- return preferences.needsSaving();
- }
-
- public void putValue(String name, String value) {
- listening = false;
- preferences.setValue(name, value);
- listening = true;
- }
-
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- Object candidate = listeners.get(listener);
- if (candidate instanceof MyPropertyChangeListener) {
- MyPropertyChangeListener l = (MyPropertyChangeListener) candidate;
- preferences.removePropertyChangeListener(l);
- }
- listeners.remove(listener);
- }
-
- public void setDefault(String name, double value) {
- preferences.setDefault(name, value);
- }
-
- public void setDefault(String name, float value) {
- preferences.setDefault(name, value);
- }
-
- public void setDefault(String name, int value) {
- preferences.setDefault(name, value);
- }
-
- public void setDefault(String name, long value) {
- preferences.setDefault(name, value);
- }
-
- public void setDefault(String name, String defaultObject) {
- preferences.setDefault(name, defaultObject);
- }
-
- public void setDefault(String name, boolean value) {
- preferences.setDefault(name, value);
- }
-
- public void setToDefault(String name) {
- preferences.setToDefault(name);
- }
-
- public void setValue(String name, double value) {
- preferences.setValue(name, value);
- }
-
- public void setValue(String name, float value) {
- preferences.setValue(name, value);
- }
-
- public void setValue(String name, int value) {
- preferences.setValue(name, value);
- }
-
- public void setValue(String name, long value) {
- preferences.setValue(name, value);
- }
-
- public void setValue(String name, String value) {
- preferences.setValue(name, value);
- }
-
- public void setValue(String name, boolean value) {
- preferences.setValue(name, value);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSESystemTypeAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSESystemTypeAdapterFactory.java
deleted file mode 100644
index 8fe72b89e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSESystemTypeAdapterFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [186779] Fix IRSESystemType.getAdapter()
- ********************************************************************************/
-package org.eclipse.rse.internal.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-
-public class RSESystemTypeAdapterFactory implements IAdapterFactory {
-
- private RSESystemTypeAdapter adapter = new RSESystemTypeAdapter();
-
- public Class[] getAdapterList()
- {
- return new Class[] {RSESystemTypeAdapter.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, IRSESystemType.class);
- }
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof IRSESystemType) {
- return adapter;
- }
- else {
- return null;
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSEUIInitJob.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSEUIInitJob.java
deleted file mode 100644
index a3d4e1d62..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/RSEUIInitJob.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [197167] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.internal.ui;
-
-import org.eclipse.core.resources.IProject;
-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.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-public class RSEUIInitJob extends Job {
-
- public RSEUIInitJob() {
- super("RSE_UI_INIT"); //$NON-NLS-1$
- }
-
- public IStatus run(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- RSECorePlugin.waitForInitCompletion();
- } catch (InterruptedException e) {
- String message = "UI Initialization interrupted"; //$NON-NLS-1$
- status = new Status(IStatus.INFO, RSEUIPlugin.PLUGIN_ID, message);
- SystemBasePlugin.logInfo(message);
- }
- // listen for project change events if a project is being used
- IProject remoteSystemsProject = SystemResourceManager.getRemoteSystemsProject(false);
- if (remoteSystemsProject.exists()) {
- SystemResourceListener listener = SystemResourceListener.getListener(remoteSystemsProject);
- SystemResourceManager.startResourceEventListening(listener);
- }
- return status;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemProfileForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemProfileForm.java
deleted file mode 100644
index d968b8368..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemProfileForm.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.validators.ValidatorFactory;
-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 verbiage;
- //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 showVerbiage = 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 showVerbiage Specify true to show first-time-user verbiage.
- */
- public SystemProfileForm(ISystemMessageLine msgLine, Object caller, ISystemProfile profile, boolean showVerbiage)
- {
- this.msgLine = msgLine;
- this.caller = caller;
- this.profile = profile;
- this.showVerbiage = showVerbiage;
- callerInstanceOfWizardPage = (caller instanceof WizardPage);
- callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog);
- nameValidator = ValidatorFactory.getProfileNameValidator(profile.getName());
- }
-
- /**
- * 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);
-
- // VERBIAGE LABEL
- if (showVerbiage)
- {
- verbiage = SystemWidgetHelpers.createVerbiage(
- composite_prompts, SystemResources.RESID_PROFILE_PROFILENAME_VERBIAGE, 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.java
deleted file mode 100644
index 7f24142dd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SystemPropertyResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.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_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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties
deleted file mode 100644
index 71fc1b2bf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2008 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) - [195399] Improve String display for default port 0
-# David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
-###############################################################################
-
-##############################################################
-# 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_TERM_NOTAPPLICABLE=Not applicable
-RESID_TERM_NOTAVAILABLE=Not available
-RESID_PORT_DYNAMICSELECT={0} (Default or first available)
-RESID_PROPERTY_INHERITED=(Inherited)
-
-RESID_PROPERTY_FILTERTYPE_VALUE=Remote system filter
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResourceListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResourceListener.java
deleted file mode 100644
index 7f8c69717..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResourceListener.java
+++ /dev/null
@@ -1,819 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [191130] log exception instead of printing, do not log if project is not available
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui;
-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.core.runtime.CoreException;
-import org.eclipse.rse.core.ISystemResourceListener;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.core.RemoteSystemsProject;
-import org.eclipse.rse.internal.core.model.SystemModelChangeEvent;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveHelpers;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveLayout;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 ISystemResourceListener, 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;
- // [191130] the event can be ignored if the project cannot be accessed
- if (!resource.isAccessible()) return true;
- try
- {
- if (!(((IProject) resource).hasNature(RemoteSystemsProject.ID)))
- return true;
- }
- catch (CoreException exc)
- {
- RSECorePlugin.getDefault().getLogger().logError("Exception trying to test the natures of the project that fired a resource change event", exc); //$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 = RSECorePlugin.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 = RSECorePlugin.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)
- {
- RSECorePlugin.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(false));
- else
- us = inst;
-
- return us.changesPending;
- }
-
- /**
- * Re-load the whole RSE from the workspace. This is to be called after a team synchronization.
- */
- public static void reloadRSE()
- {
- SystemResourceListener us = null;
- if (inst == null)
- us = getListener(SystemResourceManager.getRemoteSystemsProject(false));
- 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 model.
- // 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/UI/org/eclipse/rse/internal/ui/SystemResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java
deleted file mode 100644
index 959da53ae..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java
+++ /dev/null
@@ -1,1057 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [181066] NLS missing messages with DAEMON and Shells
- * Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
- * David McKnight (IBM) - [210229] table refresh needs unique table-specific tooltip-text
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * Rupen Mardirossian (IBM) - [210682] Added BUTTON_OVERWRITE_ALL & and tooltip, also added some verbiage for new SystemCopyDialog.
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- * David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional
- * David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
- * David Dykstal (IBM) - [231943] Make "true" and "false" translatable on SystemTypeFieldEditor
- * David Dykstal (IBM) - [188150] adding "go up one level" tooltip
- * David Dykstal (IBM) - [233678] title string is constructed by concatenation, should be substituted
- * David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.ui.SystemResources";//$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_CANCEL_ALL;
- public static String BUTTON_CANCEL_ALL_TOOLTIP;
- public static String BUTTON_OVERWRITE_ALL;
- public static String BUTTON_OVERWRITE_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_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_VERBIAGE;
- 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_VERBIAGE;
-
- // GENERIC SINGLE-SELECT RENAME DIALOG...
-
- public static String RESID_SIMPLE_RENAME_PROMPT_LABEL;
-
-
- 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_WARNING_LABEL;
- public static String RESID_DELETE_WARNING_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;
-
-
- // 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;
-
- // GENERIC RESOURCE NAME COLLISION DIALOG...
- public static String RESID_COLLISION_RENAME_TITLE;
- public static String RESID_COLLISION_RENAME_VERBIAGE;
- public static String RESID_COLLISION_RENAME_LABEL;
- public static String RESID_COLLISION_COPY_VERBIAGE;
- public static String RESID_COLLISION_COPY_COLHDG_OLDNAME;
-
-
- // -------------------------
- // 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_VERBIAGE;
-
- // RENAME DEFAULT PROFILE WIZARD PAGE...
- public static String RESID_PROFILE_PROFILENAME_LABEL;
- public static String RESID_PROFILE_PROFILENAME_TIP;
- public static String RESID_PROFILE_PROFILENAME_VERBIAGE;
-
-
- // 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_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_MAIN_PAGE_TITLE;
- public static String RESID_NEWCONN_MAIN_PAGE_DESCRIPTION;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_DESCRIPTION;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_TITLE;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBIAGE1;
- public static String RESID_NEWCONN_SUBSYSTEMPAGE_FILES_VERBIAGE2;
- 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_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_VERIFYHOSTNAME_LABEL;
- public static String RESID_CONNECTION_VERIFYHOSTNAME_TOOLTIP;
-
- 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_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_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;
-
-
-
- // 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;
-
-
- // NAME PAGE (page 2) OF NEW FILTER WIZARD...
- public static String RESID_NEWFILTER_PAGE2_DESCRIPTION;
-
- public static String RESID_NEWFILTER_PAGE2_NAME_VERBIAGE;
-
- public static String RESID_NEWFILTER_PAGE2_POOL_VERBIAGE;
-
- public static String RESID_NEWFILTER_PAGE2_POOL_VERBIAGE_TIP;
-
- public static String RESID_NEWFILTER_PAGE2_PROFILE_VERBIAGE;
-
- 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_VERBIAGE;
- public static String RESID_NEWFILTER_PAGE3_POOLS_VERBIAGE;
-
-
- // 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;
-
- // CREATE UNNAMED FILTER DIALOG...
- public static String RESID_CRTFILTER_TITLE;
-
-
- // NEW SYSTEM FILTER STRING WIZARD...
-
- public static String RESID_FILTERSTRING_STRING_LABEL;
- public static String RESID_FILTERSTRING_STRING_TIP;
-
-
- // 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;
-
-
- // WORK WITH HISTORY DIALOG...
- public static String RESID_WORKWITHHISTORY_TITLE;
- public static String RESID_WORKWITHHISTORY_VERBIAGE;
- public static String RESID_WORKWITHHISTORY_PROMPT;
- 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_LABEL_OPTIONAL;
- 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_OLD_LABEL;
- public static String RESID_CHANGE_PASSWORD_OLD_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_CATEGORY_VALUE;
- public static String RESID_TEAMVIEW_PROPERTYSET_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_PROPERTYSET_LABEL;
- public static String RESID_TEAMVIEW_CATEGORY_PROPERTYSET_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;
-
-
-
- public static String RESID_SYSTEMREGISTRY_CONNECTIONS;
-
- // SUBSYSTEM PROPERTIES PAGE...
- 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_USERID_LABEL;
- public static String RESID_SUBSYSTEM_USERID_TIP;
-
- public static String RESID_SUBSYSTEM_USERID_INHERITBUTTON_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_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_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_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_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_TYPE_VALUE;
-
-
- 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_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_VERBIAGE;
-
- // REMOTE SERVER LAUNCH PROPERTIES PAGE...
- public static String RESID_PROP_SERVERLAUNCHER_MEANS;
- 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_BUTTON_NEWCONNECTION_LABEL;
- public static String WIDGET_BUTTON_NEWCONNECTION_TOOLTIP;
-
- // -------------------------
- // PREFERENCES...
- // -------------------------
- public static String RESID_PREF_ROOT_PAGE;
-
- 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_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;
-
-
- // 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;
-
- // -------------------------------------------
- // remote search view constants
- // -------------------------------------------
-
- // 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_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_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_NEWFILE_LABEL;
- public static String ACTION_NEWFILE_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_TO_LABEL;
- public static String ACTION_CASCADING_EXPAND_TO_TOOLTIP;
-
- public static String ACTION_CASCADING_VIEW_LABEL;
- public static String ACTION_CASCADING_VIEW_TOOLTIP;
-
- public static String ACTION_CASCADING_PREFERENCES_LABEL;
- //FIXME This one is OBSOLETE with https://bugs.eclipse.org/bugs/show_bug.cgi?id=186769
- public static String ACTION_CASCADING_PREFERENCES_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_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_SHOW_PREFERENCEPAGE_LABEL;
- public static String ACTION_SHOW_PREFERENCEPAGE_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_TESTFILTERSTRING_LABEL;
- public static String ACTION_TESTFILTERSTRING_TOOLTIP;
-
- public static String ACTION_NEWFILTER_LABEL;
- public static String ACTION_NEWFILTER_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_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_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_REFRESH_TABLE_LABLE;
- public static String ACTION_REFRESH_TABLE_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_MOVEUPLEVEL_TOOLTIP;
- public static String ACTION_GOUPLEVEL_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_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_TABLE_LABEL;
- public static String ACTION_TABLE_TOOLTIP;
-
- public static String ACTION_MONITOR_LABEL;
- public static String ACTION_MONITOR_TOOLTIP;
-
- public static String ACTION_SEARCH_LABEL;
- public static String ACTION_SEARCH_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_DIFFPERSP2_LABEL;
- public static String ACTION_OPENEXPLORER_DIFFPERSP2_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_ALL_LABEL;
- public static String ACTION_EXPAND_ALL_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;
-
-
-
- // 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_FACTORIES_LABEL;
- public static String RESID_PROPERTIES_FACTORIES_TOOLTIP;
- public static String RESID_PROPERTIES_PROPERTIES_LABEL;
- public static String RESID_PROPERTIES_PROPERTIES_TOOLTIP;
-
-
- // 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;
-
- public static String RESID_EXPORT_CONNECTION_ACTIONS_TOOLTIP;
-
- public static String RESID_EXPORT_CONNECTIONS_ACTION_LABEL;
-
- // Encoding
- public static String RESID_HOST_ENCODING_GROUP_LABEL;
- public static String RESID_HOST_ENCODING_SETTING_NOTE;
- public static String RESID_HOST_ENCODING_SETTING_MSG;
- public static String RESID_HOST_ENCODING_REMOTE_LABEL;
- public static String RESID_HOST_ENCODING_REMOTE_ENCODING_LABEL;
- public static String RESID_HOST_ENCODING_REMOTE_TOOLTIP;
- public static String RESID_HOST_ENCODING_OTHER_LABEL;
- public static String RESID_HOST_ENCODING_OTHER_TOOLTIP;
- public static String RESID_HOST_ENCODING_ENTER_TOOLTIP;
-
- public static String RESID_IMPORT_CONNECTION_ACTION_LABEL;
-
- public static String RESID_IMPORT_CONNECTION_ACTION_TOOLTIP;
-
- public static String RESID_IMPORT_CONNECTION_LABEL_LONG;
-
- public static String SystemExportConnectionAction_CoreExceptionFound;
-
- public static String SystemExportConnectionAction_Error;
-
- public static String SystemExportConnectionAction_ExportJobName;
-
- public static String SystemExportConnectionAction_OverwriteFileCondition;
-
- public static String SystemExportConnectionAction_UnexpectedException;
-
- public static String SystemExportConnectionAction_Warning;
-
- public static String SystemExportConnectionAction_WriteProtectedFileCondition;
-
- public static String SystemImportConnectionAction_CoreExceptionFound;
-
- public static String SystemImportConnectionAction_Error;
-
- public static String SystemImportConnectionAction_FileNotFoundCondition;
-
- public static String SystemImportConnectionAction_FileNotReadableCondition;
-
- public static String SystemImportConnectionAction_ImportJobName;
-
- public static String SystemImportConnectionAction_UnexpectedException;
-
- public static String SystemTableViewPart_title;
-
- public static String SystemTypeFieldEditor_false;
-
- public static String SystemTypeFieldEditor_true;
-
-
- // collision dialog when copying from RSE resources to Eclipse resources
- public static String RESID_COLLISION_DUPLICATE_RESOURCE_TITLE;
- public static String RESID_COLLISION_OVERWRITE_RESOURCE_MESSAGE;
-
- 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/internal/ui/SystemResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties
deleted file mode 100644
index d73c50a7a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties
+++ /dev/null
@@ -1,1099 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 2008 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) - [185552] Remove remoteSystemsViewPreferencesActions extension point
-# David McKnight (IBM) - [210229] table refresh needs unique table-specific tooltip-text
-# Kevin Doyle (IBM) - [212944] New Profile dialog should have title "New Profile"
-# David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David Dykstal (IBM) - [181331] new filter wizard title should be "New Filter"
-# David Dykstal (IBM) - [142452] copy operations for connections, filterpools, and filters should be named "Copy..."
-# David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
-# Rupen Mardirossian (IBM) - [210692] Define strings for SystemCopyDialog
-# Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
-# David Dykstal (IBM) - [197018] Last Page of New Filter Wizard mentions Change Action
-# David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional
-# David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
-# David Dykstal (IBM) - [231943] Make true and false translatable on SystemTypeFieldEditor
-# David Dykstal (IBM) - [188150] adding "go up one level" tooltip
-# David Dykstal (IBM) - [233678] title string is constructed by concatenation, should be substituted
-# David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work
-# David McKnight (IBM) - [287066] TVT35:TCT635: PLK: dots at ends of tooltips
-################################################################################
-
-# 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_CANCEL_ALL = Cancel All
-BUTTON_CANCEL_ALL_TOOLTIP = Cancel for all
-BUTTON_OVERWRITE_ALL = Overwrite All
-BUTTON_OVERWRITE_ALL_TOOLTIP = Overwrite for all
-
-TERM_YES=Yes
-TERM_NO=No
-TERM_TRUE=True
-TERM_FALSE=False
-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_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_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_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
-
-##############################################################
-# 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_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_VERBIAGE=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_VERBIAGE=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_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
-
-# 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
-
-#=============================================================
-# 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
-
-#=============================================================
-# GENERIC COPY/MOVE NAME-COLLISION DIALOG...
-#=============================================================
-RESID_COLLISION_RENAME_TITLE=Duplicate Name Collision
-RESID_COLLISION_RENAME_VERBIAGE=A resource named "{0}" already exists.
-RESID_COLLISION_RENAME_LABEL=Rename to
-RESID_COLLISION_COPY_VERBIAGE=The following resources already exist. Would you like to overwrite all of the existing resources or cancel the operation?
-RESID_COLLISION_COPY_COLHDG_OLDNAME=Resource
-
-
-#=============================================================
-# NEW PROFILE WIZARD...
-#=============================================================
-RESID_NEWPROFILE_TITLE=New Profile
-RESID_NEWPROFILE_PAGE1_TITLE=Remote System Profile
-RESID_NEWPROFILE_PAGE1_DESCRIPTION=Define profile to hold connections
-RESID_NEWPROFILE_VERBIAGE=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_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 Connection
-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
-RESID_NEWCONN_MAIN_PAGE_TITLE=Select Remote System Type
-RESID_NEWCONN_MAIN_PAGE_DESCRIPTION=Please select the system type of the remote system to connect.
-
-#=============================================================
-# 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_VERBIAGE1=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_VERBIAGE2=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_PROFILE_PROFILENAME_LABEL=Profile
-RESID_PROFILE_PROFILENAME_TIP=New name for the profile
-RESID_PROFILE_PROFILENAME_VERBIAGE=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_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_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_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_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_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_CONNECTIONS=Connections
-
-#=============================================================
-# SUBSYSTEM PROPERTY PAGE DIALOG...
-#=============================================================
-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_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
-
-# 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_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_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_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_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_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_TYPE_VALUE==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_VERBIAGE=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 Filter
-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_VERBIAGE=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_VERBIAGE=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_VERBIAGE=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_VERBIAGE_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_VERBIAGE=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 Properties from its pop-up menu.
-RESID_NEWFILTER_PAGE3_POOLS_VERBIAGE=Tip: Too many filters? Turn on "Show filter pools in Remote Systems view." Select Preferences from the Window 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_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
-
-#=============================================================
-# CREATE UNNAMED FILTER DIALOG...
-#=============================================================
-RESID_CRTFILTER_TITLE=Create Filter
-
-
-#=============================================================
-# NEW FILTER STRING ACTION AND WIZARD...
-#=============================================================
-RESID_FILTERSTRING_STRING_LABEL=Filter string:
-RESID_FILTERSTRING_STRING_TIP=Enter a 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
-
-
-#=============================================================
-# PROMPT FOR PASSWORD DIALOG...
-#=============================================================
-RESID_PASSWORD_TITLE = Enter Password
-RESID_PASSWORD_LABEL = Password
-RESID_PASSWORD_LABEL_OPTIONAL=Password (optional)
-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_OLD_LABEL=Old password:
-RESID_CHANGE_PASSWORD_OLD_TOOLTIP=Enter your old 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_VERBIAGE=Remove or re-order history for this GUI control
-RESID_WORKWITHHISTORY_PROMPT=History
-RESID_WORKWITHHISTORY_BUTTON_TIP=Bring up the Work With History dialog
-
-#=============================================================
-# Team View
-#=============================================================
-RESID_TEAMVIEW_SUBSYSFACTORY_VALUE=SubSystem factory
-RESID_TEAMVIEW_CATEGORY_VALUE=Category
-RESID_TEAMVIEW_PROPERTYSET_VALUE=Property set
-
-
-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_PROPERTYSET_LABEL=Property sets
-RESID_TEAMVIEW_CATEGORY_PROPERTYSET_TOOLTIP=Lists all property sets in this profile
-
-#=============================================================
-# 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_TO_LABEL=Expand To
-ACTION_CASCADING_EXPAND_TO_TOOLTIP=Expand children with subsetting criteria
-
-ACTION_CASCADING_VIEW_LABEL=View
-ACTION_CASCADING_VIEW_TOOLTIP=Set viewing options
-
-ACTION_CASCADING_PREFERENCES_LABEL=Preferences
-ACTION_CASCADING_PREFERENCES_TOOLTIP=Go to the appropriate preferences page
-
-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_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_SHOW_PREFERENCEPAGE_LABEL=Remote Systems...
-ACTION_SHOW_PREFERENCEPAGE_TOOLTIP=Go to the Remote Systems primary preferences page
-
-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_UPDATEFILTER_LABEL=Change...
-ACTION_UPDATEFILTER_TOOLTIP=Change this filter's name or contents
-
-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_NEWFILTERPOOL_LABEL=Filter Pool...
-ACTION_NEWFILTERPOOL_TOOLTIP=Create new pool to hold filters
-
-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_REFRESH_ALL_LABEL=Refresh All
-ACTION_REFRESH_ALL_TOOLTIP=Refresh all resource information
-
-ACTION_REFRESH_LABEL=Re&fresh
-ACTION_REFRESH_TOOLTIP=Refresh information of selected resource
-
-ACTION_REFRESH_TABLE_LABLE=Refresh
-ACTION_REFRESH_TABLE_TOOLTIP=Refresh the contents of the table
-
-
-ACTION_DELETE_LABEL=Delete...
-ACTION_DELETE_TOOLTIP=Prompts for confirmation to delete selected resources
-
-ACTION_RENAME_LABEL=Rena&me...
-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_MOVEUPLEVEL_TOOLTIP=Move selected resources up one level
-
-ACTION_GOUPLEVEL_TOOLTIP=Go up one level
-
-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_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_SEARCH_LABEL=Search...
-ACTION_SEARCH_TOOLTIP=Opens a dialog to search for text and files
-
-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_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_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_ALL_LABEL=All
-ACTION_EXPAND_ALL_TOOLTIP=Show all contents
-
-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
-
-
-
-#==============================================================
-# Signon Information Preferences Page
-#==============================================================
-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_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
-
-
-###################################################################################
-############################ 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
-
-#=============================================================
-# 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_FACTORIES_LABEL=Configuration
-RESID_PROPERTIES_FACTORIES_TOOLTIP=
-RESID_PROPERTIES_PROPERTIES_LABEL=Properties
-RESID_PROPERTIES_PROPERTIES_TOOLTIP=
-
-
-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
-RESID_EXPORT_CONNECTION_ACTIONS_TOOLTIP=Export connection definition
-RESID_EXPORT_CONNECTIONS_ACTION_LABEL=Export...
-
-# Strings for Encodings
-RESID_HOST_ENCODING_GROUP_LABEL=Default encoding
-RESID_HOST_ENCODING_SETTING_NOTE=Note:
-RESID_HOST_ENCODING_SETTING_MSG=This setting can only be changed when no subsystem is connected
-RESID_HOST_ENCODING_REMOTE_LABEL=Default from remote system
-RESID_HOST_ENCODING_REMOTE_ENCODING_LABEL=Default from remote system (%1)
-RESID_HOST_ENCODING_REMOTE_TOOLTIP=The default encoding of the platform obtained from the remote system
-RESID_HOST_ENCODING_OTHER_LABEL=Other:
-RESID_HOST_ENCODING_OTHER_TOOLTIP=Specify a different encoding
-RESID_HOST_ENCODING_ENTER_TOOLTIP=Select or enter an encoding
-RESID_IMPORT_CONNECTION_ACTION_LABEL=Import...
-RESID_IMPORT_CONNECTION_ACTION_TOOLTIP=Import connection definition
-RESID_IMPORT_CONNECTION_LABEL_LONG=Import Connection...
-SystemExportConnectionAction_CoreExceptionFound=Core exception found during export.
-SystemExportConnectionAction_Error=Error
-SystemExportConnectionAction_ExportJobName=RSE Connection Export Job
-SystemExportConnectionAction_OverwriteFileCondition=The file {0} already exists. Click OK to overwrite it.
-SystemExportConnectionAction_UnexpectedException=unexpected exception
-SystemExportConnectionAction_Warning=Warning
-SystemExportConnectionAction_WriteProtectedFileCondition=The file {0} is write protected.
-SystemImportConnectionAction_CoreExceptionFound=Core exception found during import.
-SystemImportConnectionAction_Error=Error
-SystemImportConnectionAction_FileNotFoundCondition=File {0} does not exist.
-SystemImportConnectionAction_FileNotReadableCondition=You do not have permission to read file {0}.
-SystemImportConnectionAction_ImportJobName=RSE Connection Import Job
-SystemImportConnectionAction_UnexpectedException=unexpected exception
-SystemTableViewPart_title={0} {1}
-SystemTypeFieldEditor_false=false
-SystemTypeFieldEditor_true=true
-
-# collision dialog when copying from RSE to eclipse workspace
-RESID_COLLISION_DUPLICATE_RESOURCE_TITLE=Resource Exists
-RESID_COLLISION_OVERWRITE_RESOURCE_MESSAGE=The resource {0} already exists. Do you want to overwrite it?
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemSortableSelection.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemSortableSelection.java
deleted file mode 100644
index 748778784..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemSortableSelection.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemTabFolderLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemTabFolderLayout.java
deleted file mode 100644
index c0693a065..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemTabFolderLayout.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/ShowInSystemsViewDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/ShowInSystemsViewDelegate.java
deleted file mode 100644
index bce67adb7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/ShowInSystemsViewDelegate.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [160105] [usability] Universal action needed to locate a resource in the Remote Systems View
- * David McKnight (IBM) - [218227][usability] Contribute a "Show in RSE" action to Resource Navigator and Project Explorer
- ********************************************************************************/
-package org.eclipse.rse.internal.ui.actions;
-
-import java.util.ArrayList;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-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.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ContextObject;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-public class ShowInSystemsViewDelegate implements IViewActionDelegate {
-
- /**
- * Main thread runnable used to create tree items in system view and look for the target remote object
- * item in the tree. If the remote object item is not found, then this indirectly recurses via a new
- * LinkFromContainerJob.
- */
- private class ShowChildrenInTree implements Runnable
- {
- private Object _parentObject;
- private Object[] _children;
- private ISystemTree _systemTree;
- private IAdaptable _targetRemoteObj;
- private ISystemFilterReference _filterReference;
-
- public ShowChildrenInTree(Object parentObject, Object[] children, ISystemFilterReference filterReference, ISystemTree systemTree, IAdaptable targetRemoteObj)
- {
- _parentObject = parentObject;
- _children = children;
- _systemTree = systemTree;
- _targetRemoteObj = targetRemoteObj;
- _filterReference = filterReference;
- }
-
- private String getAbsolutePath(IAdaptable adaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- return adapter.getAbsoluteName(adaptable);
- }
-
- public void run()
- {
- if (_filterReference != null){
- // make sure the filter is expanded
- _systemTree.revealAndExpand(_filterReference.getSubSystem(), _filterReference.getReferencedFilter());
- }
- else {
- // make sure the parent is expanded
- List matches = new ArrayList();
- _systemTree.findAllRemoteItemReferences(_parentObject, _parentObject, matches);
- if (matches.size() > 0){
- TreeItem item = (TreeItem)matches.get(0);
- item.setExpanded(true);
- }
- }
-
- Vector matches = new Vector();
-
- _systemTree.findAllRemoteItemReferences(_parentObject, _parentObject, matches);
- if (matches.size() > 0){
- TreeItem item = (TreeItem)matches.get(0);
- _systemTree.createTreeItems(item, _children);
- item.setExpanded(true);
-
- IAdaptable container = null;
-
- String targetPath = getAbsolutePath(_targetRemoteObj);
-
- // is one of these items our remote object
- for (int i = 0; i < item.getItemCount(); i++){
- TreeItem childItem = item.getItem(i);
- Object data = childItem.getData();
- if (data instanceof IAdaptable){
- IAdaptable childObj = (IAdaptable)data;
- String childPath = getAbsolutePath(childObj);
-
- if (childPath.equals(targetPath)){
- // select our remote file
- _systemTree.getTree().setSelection(childItem);
- return; // we're done!
- }
- else if (targetPath.startsWith(childPath)){
- container = childObj; // using this to start a deeper search for the target remote file
- }
- }
- }
-
- // remote file not found so now we have to expand further
- if (container != null){
- LinkFromContainerJob job = new LinkFromContainerJob(container, _filterReference, _targetRemoteObj, _systemTree);
- job.schedule();
- }
- }
- }
- }
- /**
- * Job for doing a query on a filter and then using Display.asyncExec() to reveal the results in the tree.
- */
- private class LinkFromFilterJob extends Job
- {
- private ISubSystem _subSystem;
- private IAdaptable _targetRemoteObj;
- private ISystemTree _systemTree;
-
- public LinkFromFilterJob(IAdaptable targetRemoteObject, ISystemTree systemTree) {
- super(NLS.bind(CommonMessages.MSG_RESOLVE_PROGRESS, ShowInSystemsViewDelegate.getAdapter(targetRemoteObject).getAbsoluteName(targetRemoteObject)));
-
- _targetRemoteObj = targetRemoteObject;
- _subSystem = getSubSystem(_targetRemoteObj);
- _systemTree = systemTree;
- }
-
-
-
- private ISubSystem getSubSystem(IAdaptable adaptable)
- {
- ISystemViewElementAdapter adapter = ShowInSystemsViewDelegate.getAdapter(adaptable);
- return adapter.getSubSystem(adaptable);
- }
-
- public IStatus run(IProgressMonitor monitor){
- try
- {
- // find matching filter reference
- ISystemFilterReference ref = findMatchingFilterReference(_targetRemoteObj, monitor);
- if (ref == null)
- {
- // the object is nowhere to be found!
- return Status.OK_STATUS;
- }
-
- // get the context
- ContextObject contextObject = new ContextObject(ref, _subSystem, ref);
-
- // get the children
- Object[] children = ShowInSystemsViewDelegate.getAdapter((IAdaptable)ref).getChildren(contextObject, monitor);
-
- if (monitor.isCanceled()){
- return Status.CANCEL_STATUS;
- }
-
- // put these items in the tree and look for remoteFile
- // if we can't find the remote file under this filter, the ShowChildrenInTree will recurse
- Display.getDefault().asyncExec(new ShowChildrenInTree(ref, children, ref, _systemTree, _targetRemoteObj));
- }
- catch (Exception e){
- e.printStackTrace();
- }
- return Status.OK_STATUS;
- }
-
- private ISystemFilterReference findMatchingFilterReference(IAdaptable targetObj, IProgressMonitor monitor)
- {
- String remoteObjectName = getAbsolutePath(targetObj);
- ISystemFilterPoolReferenceManager refmgr = _subSystem.getFilterPoolReferenceManager();
- if (refmgr != null){
- ISystemFilterReference[] refs = refmgr.getSystemFilterReferences(_subSystem);
- for (int i = 0; i < refs.length; i++) {
- ISystemFilterReference ref = refs[i];
-
- if (doesFilterEncompass(ref.getReferencedFilter(), remoteObjectName)){
- return ref;
- }
- }
-
- // not finding it..use registry to try this
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- List matches = sr.findFilterReferencesFor(targetObj, _subSystem, false);
- if (matches != null && matches.size() > 0){
- return (ISystemFilterReference)matches.get(0);
- }
-
- // child may be deep in the tree and not directly under a filter
- ISystemViewElementAdapter adapter = ShowInSystemsViewDelegate.getAdapter(targetObj);
- Object parent = adapter.getParent(targetObj);
- ISystemFilterReference filterRef = findMatchingFilterReference((IAdaptable)parent, monitor);
- if (filterRef != null){
- return filterRef;
- }
- }
- return null;
- }
-
- private String getAbsolutePath(IAdaptable adaptable){
- ISystemViewElementAdapter adapter = ShowInSystemsViewDelegate.getAdapter(adaptable);
- return adapter.getAbsoluteName(adaptable);
- }
-
- private boolean doesFilterEncompass(ISystemFilter filter, String remoteObjectAbsoluteName)
- {
- 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$
- {
- // my home filter - will encompass iff remoteObjectAbsoluteName is within the home dir
- try
- {
- IAdaptable homeObj = (IAdaptable)_subSystem.getObjectWithAbsoluteName(".", new NullProgressMonitor()); //$NON-NLS-1$
- if (homeObj != null){
- String homePath = getAbsolutePath(homeObj);
- would = remoteObjectAbsoluteName.startsWith(homePath);
- }
- }
- catch (Exception e){
- }
- }
- else
- would = doesFilterStringEncompass(strings[idx], remoteObjectAbsoluteName);
- }
- }
-
- return would;
- }
-
- private boolean doesFilterStringEncompass(String filterString, String remoteObjectAbsoluteName)
- {
- return false;
- }
-
- }
-
- /**
- * Job for doing a query on a container and then using Display.asyncExec() to reveal the results in the tree.
- */
- private class LinkFromContainerJob extends Job
- {
- private ISubSystem _subSystem;
- private IAdaptable _remoteContainer;
- private IAdaptable _targetRemoteObj;
- private ISystemTree _systemTree;
- private ISystemFilterReference _filterRef;
-
- public LinkFromContainerJob(IAdaptable remoteContainer, ISystemFilterReference filterRef, IAdaptable targetRemoteObj, ISystemTree systemTree) {
-
- super(NLS.bind(CommonMessages.MSG_RESOLVE_PROGRESS, ShowInSystemsViewDelegate.getAdapter(remoteContainer).getAbsoluteName(targetRemoteObj)));
-
- _remoteContainer = remoteContainer;
- _subSystem = getSubSystem(remoteContainer);
- _filterRef = filterRef; // used for context of query
- _targetRemoteObj = targetRemoteObj;
- _systemTree = systemTree;
- }
-
- private ISubSystem getSubSystem(IAdaptable adaptable)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- return adapter.getSubSystem(adaptable);
- }
-
- public IStatus run(IProgressMonitor monitor){
- try
- {
- // get the adapter
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)_remoteContainer.getAdapter(ISystemViewElementAdapter.class);
-
- // get the context
- ContextObject contextObject = new ContextObject(_remoteContainer, _subSystem, _filterRef);
-
- // get the children
- Object[] children = adapter.getChildren(contextObject, monitor);
-
- if (monitor.isCanceled()){
- return Status.CANCEL_STATUS;
- }
-
- // put these items in the tree and look for remoteFile
- // if we can't find the remote file under this filter, the ShowChildrenInTree will recurse
- Display.getDefault().asyncExec(new ShowChildrenInTree(_remoteContainer, children, _filterRef, _systemTree, _targetRemoteObj));
- }
- catch (Exception e){
- }
- return Status.OK_STATUS;
- }
-
- }
- private IAction _action;
- protected Object _selectedObject;
- private SystemViewPart _systemViewPart;
-
- public void init(IViewPart view) {
-
- }
-
- public void run(IAction action) {
- SystemViewPart viewPart = activateSystemView();
- SystemView systemTree = viewPart.getSystemView();
-
- // now we've got to show the object in this view part
- TreeItem item = (TreeItem)systemTree.findFirstRemoteItemReference(_selectedObject, null);
- if (item != null){
- systemTree.getTree().setSelection(item);
- }
- else if (_selectedObject instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapter((IAdaptable)_selectedObject);
- if (adapter != null){
- ISubSystem subSystem = adapter.getSubSystem(_selectedObject);
- if (subSystem.getSubSystemConfiguration().supportsFilters()){
- // no match, so we will expand from filter
- // query matching filter in a job (to avoid main thread)
- LinkFromFilterJob job = new LinkFromFilterJob((IAdaptable)_selectedObject, systemTree);
- job.schedule();
- }
- else {
- // no filters so need to directly check children
- Object[] children = subSystem.getChildren();
-
- // put these items in the tree and look for remote object
- // if we can't find the remote object under this, the ShowChildrenInTree will recurse
- Display.getDefault().asyncExec(new ShowChildrenInTree(subSystem, children, null, systemTree, (IAdaptable)_selectedObject));
- }
- }
- }
- }
-
-
- public SystemViewPart activateSystemView(){
- try
- {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- _systemViewPart = (SystemViewPart) page.showView(SystemViewPart.ID);
- page.bringToTop(_systemViewPart);
- }
- catch (PartInitException e)
- {
- e.printStackTrace();
- SystemBasePlugin.logError("Can not open system view part", e); //$NON-NLS-1$
- }
-
- return _systemViewPart;
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (_action == null) {
- _action= action;
- }
- IStructuredSelection sel = (IStructuredSelection)selection;
- if (sel.size() == 1){
- _action.setEnabled(true);
- _selectedObject = sel.getFirstElement();
- }
- else {
- _action.setEnabled(false);
- }
- }
-
- public static ISystemViewElementAdapter getAdapter(IAdaptable adaptable)
- {
- return (ISystemViewElementAdapter)adaptable.getAdapter(ISystemViewElementAdapter.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingBrowseWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingBrowseWithAction.java
deleted file mode 100644
index 64bab9041..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingBrowseWithAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingCompareWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingCompareWithAction.java
deleted file mode 100644
index 06257afb8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingCompareWithAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingExpandToAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingExpandToAction.java
deleted file mode 100644
index 32289f390..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingExpandToAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingGoToAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingGoToAction.java
deleted file mode 100644
index 1d1cf45be..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingGoToAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [232355] Go To menu item missing
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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;
- // something in ganymede m7 causes the actions of this menu to be lost, therefore must re-create each time
- // FIXME this looks like a hack
- setCreateMenuEachTime(true);
- setPopulateMenuEachTime(true);
- 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingNewAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingNewAction.java
deleted file mode 100644
index 64ee8a336..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingNewAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingOpenWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingOpenWithAction.java
deleted file mode 100644
index c448b530b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingOpenWithAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingPulldownMenuAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingPulldownMenuAction.java
deleted file mode 100644
index cf5ed59b1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingPulldownMenuAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServerBaseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServerBaseAction.java
deleted file mode 100644
index 77d96f92c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServerBaseAction.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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.internal.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.internal.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();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServersAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServersAction.java
deleted file mode 100644
index f33fd03bb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingRemoteServersAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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)
- {
- if (conn != null)
- {
- SystemCascadingRemoteServerBaseAction action = (SystemCascadingRemoteServerBaseAction)actions[idx];
- action.setHost(conn);
- if (conn.isOffline())
- action.setEnabled(false);
- else
- action.setEnabled(action.shouldEnable(conn));
- }
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingReplaceWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingReplaceWithAction.java
deleted file mode 100644
index c86c0ba0e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingReplaceWithAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingViewAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingViewAction.java
deleted file mode 100644
index 811808306..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingViewAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingWorkWithAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingWorkWithAction.java
deleted file mode 100644
index 055be4ccf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCascadingWorkWithAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionCopyString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionCopyString.java
deleted file mode 100644
index c7f5da339..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionCopyString.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionDeleteString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionDeleteString.java
deleted file mode 100644
index 0f3388eb5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionDeleteString.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringDown.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringDown.java
deleted file mode 100644
index 2fe9949c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringDown.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringUp.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringUp.java
deleted file mode 100644
index 4de0e8ebf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionMoveStringUp.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.actions;
-
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionPasteString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionPasteString.java
deleted file mode 100644
index ccf81688f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemChangeFilterActionPasteString.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearAllPasswordsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearAllPasswordsAction.java
deleted file mode 100644
index d93d4985a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearAllPasswordsAction.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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.hasPassword(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.hasPassword(false) || system.hasPassword(true))
- {
- // get the user id
-
- // clear userid/password from memory and fire event
- //DKM and disk now
- system.clearPassword(true, true);
- RSECorePlugin.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/internal/ui/actions/SystemClearPasswordAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearPasswordAction.java
deleted file mode 100644
index 35a96bcbb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemClearPasswordAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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.hasPassword(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.clearPassword(true, true);
- RSECorePlugin.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/internal/ui/actions/SystemCollapseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAction.java
deleted file mode 100644
index 54471566e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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 = getViewAdapter(selectedObject);
- if (adapter != null) {
- if (adapter.hasChildren((IAdaptable)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");
- ISystemRegistry sr = RSECorePlugin.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/internal/ui/actions/SystemCollapseAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java
deleted file mode 100644
index 0ec73754b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCollapseAllAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * 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, PlatformUI.getWorkbench().getSharedImages()
- .getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL), // D54577
- parent);
- //setHoverImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptorFromIDE("elcl16/collapseall.gif")); //$NON-NLS-1$
- setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL));
- 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() {
- ISystemRegistry sr = RSECorePlugin.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/internal/ui/actions/SystemCommonDeleteAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java
deleted file mode 100644
index 2875e84c0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonDeleteAction.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [188637] Handle the caught exception in DeleteJob.run when file fails to be deleted
- * Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste with Remote Search view open
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- * David McKnight (IBM) - [234030] SystemCommonDeleteAction should not fire delete event if deleting is failed
- * David McKnight (IBM) - [203361] Deleting multiple target connections misleading
- * David McKnight (IBM) - [261367] RSE- Mutiple selection Delete does not process all items selected
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Vector;
-
-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.Dialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemDeleteDialog;
-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.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.model.SystemRemoteElementResourceSet;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Display;
-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>
- *
- * @see org.eclipse.rse.internal.ui.dialogs.SystemDeleteDialog
- */
-public class SystemCommonDeleteAction
- extends SystemBaseDialogAction
-{
- public class DeleteEventRunnable implements Runnable
- {
- private List _localDeletedResources;
- private List _remoteDeletedResources;
- public DeleteEventRunnable(List localDeletedResources, List remoteDeletedResources)
- {
- _localDeletedResources = localDeletedResources;
- _remoteDeletedResources = remoteDeletedResources;
- }
-
- public void run()
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- if (_remoteDeletedResources.size() > 0)
- {
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, _remoteDeletedResources, null, null, null);
- }
- if (_localDeletedResources.size() > 0)
- {
- Object[] localDeleted = _localDeletedResources.toArray();
- sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(localDeleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, null/*(getSelectedParent())*/));
- }
- }
- }
-
-
- public class DeleteJob extends Job
- {
- private List _localResources;
- private List _remoteSets;
- public DeleteJob(List localResources, List remoteSets)
- {
- super(SystemResources.ACTION_DELETE_LABEL);
- _localResources = localResources;
- _remoteSets = remoteSets;
- setUser(true);
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- boolean ok = true;
- List localDeletedObjects = new Vector();
- List remoteDeletedObjects = new Vector();
- HashMap objectsToDelete = new HashMap();
-
- // local delete is pretty straight-forward
- for (int l = 0; l < _localResources.size() && ok; l++)
- {
- Object element = _localResources.get(l);
- ISystemViewElementAdapter adapter = getViewAdapter(element);
- try
- {
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok)
- {
- localDeletedObjects.add(element);
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage(), e);
- }
- }
- SystemMessageException exception = null;
-
-
- // remote delete is not as straight-forward
- for (int r = 0; r < _remoteSets.size() && ok; r++)
- {
- SystemRemoteElementResourceSet set = (SystemRemoteElementResourceSet)_remoteSets.get(r);
- ISystemViewElementAdapter adapter = set.getViewAdapter();
- try
- {
- for (int i = 0; i < set.size(); i++)
- {
- Object thisObject = set.get(i);
- String objectName = adapter.getName(thisObject);
- objectsToDelete.put(thisObject, objectName);
- remoteDeletedObjects.add(thisObject);
- }
- List resSet = new ArrayList(set.getResourceSet());
- ok = adapter.doDeleteBatch(getShell(), resSet, monitor);
- }
- catch (SystemMessageException e)
- {
- exception = e;
- ok = false;
- }
- catch (Exception e)
- {
- SystemMessageDialog.displayExceptionMessage(getShell(), e);
- return Status.CANCEL_STATUS;
- }
-
- if (!ok){
- remoteDeletedObjects.clear();
- if (monitor.isCanceled() && set.size() > 1)
- {
- for (int i = 0; i < set.size(); i++)
- {
- Object thisObject = set.get(i);
- if (!(adapter.exists(thisObject)))
- {
- //This object has been deleted
- remoteDeletedObjects.add(thisObject);
- }
- }
- if (remoteDeletedObjects.size() > 0)
- {
- //Get the moved file names
- Object thisObject = remoteDeletedObjects.get(0);
- String deletedFileNames = null;
- //We could not use adapter.getName(thisObject) here since in dstore case, this name has
- //already been changed to "deleted". So we need to remember the object and name map, and
- //find the object name in the map here.
- deletedFileNames = (String)objectsToDelete.get(thisObject);
- for (int i=1; i<(remoteDeletedObjects.size()); i++)
- {
- thisObject = remoteDeletedObjects.get(i);
- deletedFileNames = deletedFileNames + "\n" + (String)objectsToDelete.get(thisObject); //$NON-NLS-1$
- }
- SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_INTERRUPTED);
- thisMessage.makeSubstitution(deletedFileNames);
- SystemMessageDialog.displayErrorMessage(shell, thisMessage);
- }
- }
- else
- {
- SystemMessageDialog.displayMessage(exception);
- }
- }
-
- }
-
- // start a runnable to do the action refresh events
- DeleteEventRunnable fireEvents = new DeleteEventRunnable(localDeletedObjects, remoteDeletedObjects);
- Display.getDefault().asyncExec(fireEvents);
-
- if (ok)
- return Status.OK_STATUS;
- else
- return Status.CANCEL_STATUS;
- }
-
- }
-
- private String promptLabel;
- private List _setList;
-
- /**
- * 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$
- _setList = new Vector();
- }
-
- /**
- * 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)
- {
- _setList.clear();
- 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)
- {
- Object firstSelection = getFirstSelection();
- if (firstSelection != null)
- {
- SystemDeleteDialog dlg = new SystemDeleteDialog(shell);
- if (promptLabel != null)
- dlg.setPromptLabel(promptLabel);
-
- 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;
- }
- else
- {
- return null;
- }
- }
-
-
- /**
- * New method of doing delete where the physical deletion occurs in a job whereas the refresh is done in a runnable
- */
- protected Object getDialogValue(Dialog dlg)
- {
- if (!((SystemDeleteDialog)dlg).wasCancelled() && (getDeleteTarget() != null))
- {
- ISystemDeleteTarget target = getDeleteTarget();
- ISelection selection = target.getSelection();
-
- if (selection instanceof IStructuredSelection)
- {
- // keep track of the current set
- List localSet = new Vector();
-
- // divide up all objects to delete
- List selectedResources = ((SystemDeleteDialog)dlg).getSelectedResources();
-
- for (int i = 0; i < selectedResources.size(); i++)
- {
- Object object = selectedResources.get(i);
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getViewAdapter(object);
- if (getRemoteAdapter(object) != null)
- {
- ISubSystem subSystem = adapter.getSubSystem(object);
- // a remote object so add to remote set
- SystemRemoteElementResourceSet set = getSetFor(subSystem, adapter);
- set.addResource(object);
- }
- else
- {
- localSet.add(object);
- }
- }
-
- // do delete for each set
- DeleteJob job = new DeleteJob(localSet, _setList);
- job.schedule();
- }
-
- }
- return null;
- }
-
-
-
-
- protected SystemRemoteElementResourceSet getSetFor(ISubSystem subSystem, ISystemViewElementAdapter adapter) {
- for (int i = 0; i < _setList.size(); i++) {
- SystemRemoteElementResourceSet set = (SystemRemoteElementResourceSet) _setList.get(i);
- if (set.getViewAdapter() == adapter && set.getSubSystem() == subSystem) {
- return set;
- }
- }
-
- // no existing set - create one
- SystemRemoteElementResourceSet newSet = new SystemRemoteElementResourceSet(subSystem, adapter);
- _setList.add(newSet);
- return newSet;
- }
-
-
-
- protected IRunnableContext getRunnableContext(Shell shell)
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
- else
- {
- irc = new ProgressMonitorDialog(shell);
- RSEUIPlugin.getTheSystemRegistryUI().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/internal/ui/actions/SystemCommonRenameAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonRenameAction.java
deleted file mode 100644
index fd927aea3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonRenameAction.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemRenameDialog;
-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.actions.SystemBaseDialogAction;
-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.internal.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, verbiage;
-
- /**
- * 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 verbiage 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 setMultiSelectVerbiage(String verbiage)
- {
- this.verbiage = verbiage;
- }
-
- /**
- * 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, verbiage 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, verbiage 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)
- {
- IStructuredSelection sel = getSelection();
- // multi-select
- if (sel != null && sel.size() > 1)
- {
- SystemRenameDialog dlg = new SystemRenameDialog(parent);
- if (nameValidator != null)
- dlg.setNameValidator(nameValidator);
- if (multiSelectionHelp != null)
- dlg.setHelp(multiSelectionHelp);
- if (verbiage != null)
- dlg.setVerbiage(verbiage);
- return dlg;
- }
- // single-select
- else if (sel != null && sel.size() == 1)
- {
- 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;
- }
- else
- {
- return null;
- }
- }
-
- /**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonSelectAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonSelectAllAction.java
deleted file mode 100644
index 9d482c2c1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCommonSelectAllAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.actions.SystemBaseAction;
-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());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java
deleted file mode 100644
index 4502bd451..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * Martin Oberhuber (Wind River) - [149285][ssh] multiple prompts and errors in case of incorrect username
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This is the action for connecting to the remote subsystem
- */
-public class SystemConnectAction extends SystemBaseAction
-{
- public class ConnectJob extends Job
- {
- private ISubSystem _subsystem;
- public ConnectJob(ISubSystem subsystem)
- {
- super(SystemResources.ACTION_CONNECT_LABEL);
- _subsystem = subsystem;
- }
-
-
- public IStatus run(IProgressMonitor monitor)
- {
- try {
- if (_subsystem.getHost().getSystemType().isWindows())
- _subsystem.connect(monitor, false);
- else
- _subsystem.connect(monitor, true);
- }
- catch (OperationCanceledException e) {
- // user cancelled
- return Status.CANCEL_STATUS;
- }
- catch (SystemMessageException e) {
- SystemMessageDialog.displayMessage(e);
- }
- catch (Exception e) {
- SystemBasePlugin.logError(
- e.getLocalizedMessage()!=null ? e.getLocalizedMessage() : e.getClass().getName(),
- e);
- }
- if (monitor.isCanceled())
- {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
- }
-
- /**
- * 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();
- ConnectJob job = new ConnectJob(ss);
- job.schedule();
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAllSubSystemsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAllSubSystemsAction.java
deleted file mode 100644
index 80a60151e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAllSubSystemsAction.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * Martin Oberhuber (Wind River) - [216266] Consider stateless subsystems (supportsSubSystemConnect==false)
- * David McKnight (IBM) - [237970] Subsystem.connect( ) fails for substituting host name when isOffline( ) is true
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.RSECorePlugin;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This is the action for connecting all subsystems for a given connection.
- */
-public class SystemConnectAllSubSystemsAction extends SystemBaseAction
-{
- public class ConnectAllJob extends Job
- {
- private IHost _connection;
- public ConnectAllJob(IHost connection)
- {
- super(SystemResources.ACTION_CONNECT_ALL_LABEL);
- _connection = connection;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- List failedSystems = new ArrayList();
- try
- {
- //forced instantiation of all subsystems
- ISubSystem[] subsystems = _connection.getSubSystems();
- for (int i = 0; i < subsystems.length; i++)
- {
- ISubSystem subsystem = subsystems[i];
- IConnectorService system = subsystem.getConnectorService();
- if (!subsystem.isConnected()
- && subsystem.getSubSystemConfiguration().supportsSubSystemConnect()
- && !failedSystems.contains(system))
- {
- try
- {
- subsystem.connect(monitor, false);
- }
- catch (SystemMessageException e) {
- //TODO should we collect all messages and just show one dialog with a MultiStatus?
- failedSystems.add(system);
- SystemMessageDialog.displayMessage(e);
- }
- catch (Exception e) {
- failedSystems.add(system);
- if ((e instanceof InterruptedException) || (e instanceof OperationCanceledException)) {
- // 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
- break;
- }
- SystemBasePlugin.logError(
- e.getLocalizedMessage()!=null ? e.getLocalizedMessage() : e.getClass().getName(),
- e);
- }
- }
- }
- }
- catch (Exception exc)
- {
- } // msg already shown
- if (failedSystems.size() > 0)
- {
- return Status.CANCEL_STATUS;
- }
- else
- {
- return Status.OK_STATUS;
- }
- }
-
- }
-
- 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 = RSECorePlugin.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) &&
- !((IHost)obj).isOffline() &&
- !sr.areAllSubSystemsConnected((IHost)obj))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
-
- IHost conn = (IHost)getFirstSelection();
- ConnectAllJob job = new ConnectAllJob(conn);
- job.schedule();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java
deleted file mode 100644
index 6007a80c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemCopyConnectionAction.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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.swt.widgets.Shell;
-
-
-/**
- * Copy a connection action.
- */
-public class SystemCopyConnectionAction extends SystemBaseCopyAction
-{
- private SystemSimpleContentElement initialSelectionElement = null;
- /**
- * Constructor for SystemCopyConnectionAction
- */
- public SystemCopyConnectionAction(Shell parent)
- {
- super(parent, SystemResources.ACTION_COPY_CONNECTION_LABEL, MODE_COPY);
- setToolTipText(SystemResources.ACTION_COPY_CONNECTION_TOOLTIP);
- sr = RSECorePlugin.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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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(oldConnection, targetProfile, newName, monitor);
- 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 = RSECorePlugin.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAction.java
deleted file mode 100644
index ad360f36c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java
deleted file mode 100644
index aa7b09f6c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [175277] Cannot disconnect multiple connections at once with multiselect
- * David Dykstal (IBM) - [197036] minor refactoring
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.rse.core.RSECorePlugin;
-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.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This is the action for disconnecting 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(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION);
- sr = RSECorePlugin.getTheSystemRegistry();
- // TODO help for connect all
- //setHelp(RSEUIPlugin.HELPPREFIX+"actn0022");
- }
-
- private static ISubSystem[] getDisconnectableSubsystems(Object element)
- {
- ISubSystem[] result = null;
- if (element instanceof IHost) {
- IHost host = (IHost)element;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystem[] ss = sr.getSubSystems(host);
- List l = new ArrayList();
- for (int i=0; i<ss.length; i++) {
- if (ss[i].isConnected() && ss[i].getSubSystemConfiguration().supportsSubSystemConnect()) {
- l.add(ss[i]);
- }
- }
- result = (ISubSystem[])l.toArray(new ISubSystem[l.size()]);
- }
- return result;
- }
-
- /**
- * 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 {
- ISubSystem[] ss = getDisconnectableSubsystems(obj);
- return (ss!=null && ss.length>0);
- }
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run()
- {
- Iterator it = getSelection().iterator();
- while (it.hasNext()) {
- Object item = it.next();
- if (item instanceof IHost) {
- try {
- sr.disconnectAllSubSystems((IHost) item);
- } catch (Exception exc) {} // msg already shown
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExpandAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExpandAction.java
deleted file mode 100644
index 98847930c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExpandAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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 = getViewAdapter(selectedObject);
- if (adapter != null) {
- if (adapter.hasChildren((IAdaptable)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");
- ISystemRegistry sr = RSECorePlugin.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/internal/ui/actions/SystemExportConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExportConnectionAction.java
deleted file mode 100644
index d09166d5e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemExportConnectionAction.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [216858] provide ability to import and export connections
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.Assert;
-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.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.persistence.RSEEnvelope;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This is the action for exporting a connection to a file.
- */
-public class SystemExportConnectionAction extends SystemBaseAction {
-
- private class ExportJob extends Job {
-
- private File outFile;
- private IHost host;
-
- public ExportJob(IHost host, File outFile) {
- super(SystemResources.SystemExportConnectionAction_ExportJobName);
- this.outFile = outFile;
- this.host = host;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- IRSEPersistenceManager manager = RSECorePlugin.getThePersistenceManager();
- IRSEPersistenceProvider persistenceProvider = manager.getPersistenceProvider("org.eclipse.rse.persistence.PropertyFileProvider"); //$NON-NLS-1$
- RSEEnvelope envelope = new RSEEnvelope();
- envelope.add(host);
- try {
- FileOutputStream out = new FileOutputStream(outFile);
- envelope.put(out, persistenceProvider, monitor);
- out.close();
- } catch (FileNotFoundException e) {
- // should not happen, log as unexpected
- SystemBasePlugin.logError(SystemResources.SystemExportConnectionAction_UnexpectedException, e);
- } catch (CoreException e) {
- // log the exception and return the status code
- SystemBasePlugin.logError(SystemResources.SystemExportConnectionAction_CoreExceptionFound, e);
- status = e.getStatus();
- } catch (IOException e) {
- // should not happend, log as unexpected
- SystemBasePlugin.logError(SystemResources.SystemExportConnectionAction_UnexpectedException, e);
- }
- return status;
- }
-
- }
-
- /**
- * Constructor.
- */
- public SystemExportConnectionAction() {
- super(SystemResources.RESID_EXPORT_CONNECTIONS_ACTION_LABEL, SystemResources.RESID_EXPORT_CONNECTION_ACTIONS_TOOLTIP, null);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "ActionExportConnectionDefinitions"); //$NON-NLS-1$
- }
-
- /**
- * The export connection action is enabled when the selection contains only connections (hosts)
- */
- public boolean checkObjectType(Object obj) {
- boolean result = obj instanceof IHost;
- return result;
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run() {
- FileDialog saveDialog = new FileDialog(shell, SWT.SAVE);
- String path = saveDialog.open();
- if (path != null) {
- File outFile = new File(path);
- boolean ok = true;
- if (outFile.exists()) {
- if (outFile.canWrite()) {
- String title = SystemResources.SystemExportConnectionAction_Warning;
- String message = MessageFormat.format(SystemResources.SystemExportConnectionAction_OverwriteFileCondition, new String[] {path});
- ok = MessageDialog.openConfirm(shell, title, message);
- } else {
- String title = SystemResources.SystemExportConnectionAction_Error;
- String message = MessageFormat.format(SystemResources.SystemExportConnectionAction_WriteProtectedFileCondition, new String[] {path});
- MessageDialog.openError(shell, title, message);
- ok = false;
- }
- }
- if (ok) {
- IStructuredSelection selection = getSelection();
- Assert.isTrue(selection.size() == 1, "selection size should be one"); //$NON-NLS-1$
- IHost host = (IHost) selection.getFirstElement();
- Job exportJob = new ExportJob(host, outFile);
- exportJob.schedule();
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java
deleted file mode 100644
index 82c929a7d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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 ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
- {
- return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java
deleted file mode 100644
index 8fa6fcc20..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCascadingNewFilterPoolReferenceFPMgrAction.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.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.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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 ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce)
- {
- return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java
deleted file mode 100644
index 0e473997e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterAction.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.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.internal.ui.SystemResources;
-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.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.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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);
- setToolTipText(SystemResources.ACTION_COPY_FILTER_TOOLTIP);
- 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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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);
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java
deleted file mode 100644
index 56897e178..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterPoolAction.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David Dykstal (IBM) - [194268] fixed updateSelection to disable when selection is empty
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.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.internal.ui.SystemResources;
-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.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.subsystems.ISubSystemConfigurationAdapter;
-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);
- setToolTipText(SystemResources.ACTION_COPY_FILTERPOOL_TOOLTIP);
- 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 = false;
- if (!selection.isEmpty()) {
- enable = true;
- Iterator e = selection.iterator();
- while (enable && e.hasNext()) {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement) {
- selectedObject = ((SystemSimpleContentElement) selectedObject).getData();
- }
- ISystemFilterPool pool = null;
- if (selectedObject instanceof ISystemFilterPool) {
- pool = (ISystemFilterPool) selectedObject;
- } else if (selectedObject instanceof ISystemFilterPoolReference) {
- pool = ((ISystemFilterPoolReference) selectedObject).getReferencedFilterPool();
- }
- // enable if this is not a connection specific filter pool
- enable = (pool != null) && (pool.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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java
deleted file mode 100644
index 244c77d58..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterCopyFilterStringAction.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.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.internal.ui.SystemResources;
-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.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.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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/internal/ui/actions/SystemFilterMoveDownFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterAction.java
deleted file mode 100644
index 64b1441a7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterAction.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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)
- {
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterPoolReferenceAction.java
deleted file mode 100644
index 6ab1096f9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveDownFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java
deleted file mode 100644
index 8586af980..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterAction.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.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.internal.ui.SystemResources;
-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.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.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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);
- setToolTipText(SystemResources.ACTION_MOVE_FILTER_TOOLTIP);
- 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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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);
- }
- }
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java
deleted file mode 100644
index 235435686..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterPoolAction.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David Dykstal (IBM) - [194268] fixed updateSelection() to disable when selection is empty
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-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.internal.ui.SystemResources;
-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.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.subsystems.ISubSystemConfigurationAdapter;
-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);
- setToolTipText(SystemResources.ACTION_MOVE_FILTERPOOL_TOOLTIP);
- 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 = false;
- if (!selection.isEmpty()) {
- enable = true;
- Iterator e = selection.iterator();
- Set managers = new HashSet();
- while (enable && e.hasNext()) {
- Object selectedObject = e.next();
- if (selectedObject instanceof SystemSimpleContentElement) {
- selectedObject = ((SystemSimpleContentElement) selectedObject).getData();
- }
- ISystemFilterPool pool = null;
- if (selectedObject instanceof ISystemFilterPool){
- pool = (ISystemFilterPool) selectedObject;
- }
- else if (selectedObject instanceof ISystemFilterPoolReference) {
- pool = ((ISystemFilterPoolReference) selectedObject).getReferencedFilterPool();
- }
- if (pool != null) {
- String ownerName = pool.getOwningParentName();
- ISystemFilterPoolManager manager = pool.getSystemFilterPoolManager();
- managers.add(manager);
- // enable if the number of managers is one and the owner name is null (i.e. the pool does not belong to a connection)
- enable = (managers.size() == 1) && (ownerName == null);
- } else {
- enable = false;
- }
- }
- }
- 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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java
deleted file mode 100644
index f587cd6ed..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveFilterStringAction.java
+++ /dev/null
@@ -1,490 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.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.internal.ui.SystemResources;
-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.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.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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);
- setToolTipText(SystemResources.ACTION_MOVE_FILTERSTRING_TOOLTIP);
- 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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterAction.java
deleted file mode 100644
index 6285cd814..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterAction.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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)
- {
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterPoolReferenceAction.java
deleted file mode 100644
index 455ce1306..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterMoveUpFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java
deleted file mode 100644
index 551e3c20a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterNewFilterPoolAction.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterNewFilterPoolWizard;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterPoolWizardDialog;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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.actions.SystemFilterAbstractFilterPoolWizardAction;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
-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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterPoolReferenceSelectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterPoolReferenceSelectAction.java
deleted file mode 100644
index 038ec5438..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterPoolReferenceSelectAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.SystemBasePlugin;
-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/internal/ui/actions/SystemFilterRemoveFilterPoolReferenceAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterRemoveFilterPoolReferenceAction.java
deleted file mode 100644
index 6d2c6dd96..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterRemoveFilterPoolReferenceAction.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java
deleted file mode 100644
index 2669a5af4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterSelectFilterPoolsAction.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-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);
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java
deleted file mode 100644
index 68186b9e1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsAction.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [194268] action now assumes the first filter pool manager is selected if there was no selection
- * provided by the caller.
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolManagerUIProvider;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-import org.eclipse.rse.ui.filters.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-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) {
- SystemSimpleContentElement initialElementSelection = null;
- ISystemFilterPoolReferenceManagerProvider sprmp = getReferenceManagerProviderSelection();
- if (sprmp != null) {
- ISystemFilterPoolManager initialSelection = sprmp.getSystemFilterPoolReferenceManager().getDefaultSystemFilterPoolManager();
- if (initialSelection != null) {
- initialElementSelection = SystemFilterUIHelpers.getDataElement(input, initialSelection);
- }
- } else {
- SystemSimpleContentElement[] children = input.getChildren();
- if (children.length > 0) {
- initialElementSelection = children[0];
- }
- }
- 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)
- {
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java
deleted file mode 100644
index 16f6784d3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemFilterWorkWithFilterPoolsRefreshAllAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - 146339 Added refresh action graphic.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemImportConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemImportConnectionAction.java
deleted file mode 100644
index bfae6ba5d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemImportConnectionAction.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [216858] provide ability to import and export connections
- * David Dykstal (IBM) - [233876] filters lost after restart
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-
-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.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.core.model.ISystemProfileOperation;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.persistence.RSEEnvelope;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This action is used to import a connection from a file into the selected profile.
- */
-public class SystemImportConnectionAction extends SystemBaseAction {
-
- private class ImportJob extends Job {
-
- private ISystemProfile profile = null;
- private File inFile = null;
-
- public ImportJob(File inFile, ISystemProfile profile) {
- super(SystemResources.SystemImportConnectionAction_ImportJobName);
- this.inFile = inFile;
- this.profile = profile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(final IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- final FileInputStream in = new FileInputStream(inFile);
- // run inside an ISystemProfileOperation to ensure that the changes are committed
- status = SystemProfileManager.run(new ISystemProfileOperation() {
- public IStatus run() {
- IStatus operationStatus = Status.OK_STATUS;
- try {
- final RSEEnvelope envelope = new RSEEnvelope();
- envelope.get(in, monitor);
- envelope.mergeWith(profile);
- } catch (CoreException e) {
- // log the exception and return the status code
- operationStatus = e.getStatus();
- String message = operationStatus.getMessage();
- if (message == null) {
- message = SystemResources.SystemImportConnectionAction_CoreExceptionFound;
- }
- SystemBasePlugin.logError(message, e);
- }
- return operationStatus;
- }
- });
- } catch (FileNotFoundException e) {
- // should not happen, log as unexpected
- SystemBasePlugin.logError(SystemResources.SystemImportConnectionAction_UnexpectedException, e);
- }
- return status;
- }
-
- }
-
- /**
- * Creates a new action to import a connection into a profile.
- */
- public SystemImportConnectionAction() {
- super(SystemResources.RESID_IMPORT_CONNECTION_ACTION_LABEL, SystemResources.RESID_IMPORT_CONNECTION_ACTION_TOOLTIP, null);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "ActionImportConnectionDefinitions"); //$NON-NLS-1$
- }
-
- /**
- * The import action can be run if the selection contains profiles or hosts.
- * @return true if the selection contains a profile or a host.
- */
- public boolean checkObjectType(Object obj) {
- return (obj instanceof ISystemProfile || obj instanceof IHost);
- }
-
- /**
- * Called when this action is selection from the popup menu.
- */
- public void run() {
- FileDialog openDialog = new FileDialog(shell, SWT.OPEN);
- String path = openDialog.open();
- if (path != null) {
- File inFile = new File(path);
- if (inFile.exists()) {
- if (inFile.canRead()) {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfileManager profileManager = registry.getSystemProfileManager();
- ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile();
- IStructuredSelection selection = getSelection();
- if (selection != null && selection.size() > 0) {
- Object selected = getFirstSelection();
- if (selected instanceof IHost) {
- profile = ((IHost)selected).getSystemProfile();
- } else if (selected instanceof ISystemProfile) {
- profile = (ISystemProfile) selected;
- }
- }
- ImportJob importJob = new ImportJob(inFile, profile);
- importJob.schedule();
- } else {
- String title = SystemResources.SystemImportConnectionAction_Error;
- String message = MessageFormat.format(SystemResources.SystemImportConnectionAction_FileNotReadableCondition, new String[] {path});
- MessageDialog.openError(shell, title, message);
- }
- } else {
- String title = SystemResources.SystemImportConnectionAction_Error;
- String message = MessageFormat.format(SystemResources.SystemImportConnectionAction_FileNotFoundCondition, new String[] {path});
- MessageDialog.openError(shell, title, message);
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java
deleted file mode 100644
index f9c2b4795..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveConnectionAction.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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.swt.widgets.Shell;
-
-
-/**
- * Move a connection action.
- */
-public class SystemMoveConnectionAction extends SystemBaseCopyAction
-{
-
- 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!
- setToolTipText(SystemResources.ACTION_MOVE_CONNECTION_TOOLTIP);
- sr = RSECorePlugin.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(Object, Object, String, IProgressMonitor)
- */
- protected boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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(oldConnection, targetProfile, newName, monitor);
- 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 = RSECorePlugin.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveDownConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveDownConnectionAction.java
deleted file mode 100644
index 1c708ef23..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveDownConnectionAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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 = RSECorePlugin.getTheSystemRegistry();
- 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 = RSECorePlugin.getTheSystemRegistry();
- 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/internal/ui/actions/SystemMoveUpConnectionAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveUpConnectionAction.java
deleted file mode 100644
index 9ffb6a043..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemMoveUpConnectionAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.SystemSortableSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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 = RSECorePlugin.getTheSystemRegistry();
- 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 = RSECorePlugin.getTheSystemRegistry();
-
- 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/internal/ui/actions/SystemNewProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemNewProfileAction.java
deleted file mode 100644
index 746fb89d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemNewProfileAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [cleanup] Avoid using SystemStartHere in production code
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamView;
-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.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 = RSECorePlugin.getTheSystemProfileManager().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();
- }
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenExplorerPerspectiveAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenExplorerPerspectiveAction.java
deleted file mode 100644
index e5f7f86ab..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenExplorerPerspectiveAction.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * David McKnight (IBM) - [187342] Open in New Window expand failed error when not connected
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.model.ISystemPromptableObject;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Display;
-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()
- {
- final IAdaptable input = getPageInput();
- final ISubSystem ss = getSubSystem(input);
- if (ss!=null && !ss.isConnected()) {
- // Connect if the object's children will require a live connection. If the connect is made, then
- // the open window occurs as a result of the callback to connect.
- try
- {
- ss.connect(false,
- new IRSECallback() // call back for opening the window after the connect
- {
- public void done(IStatus status, Object object)
- {
- if (ss.isConnected()) // only open the window if we're connected
- {
- Display.getDefault().asyncExec(new Runnable()
- {
- public void run()
- {
- openWindow(input);
- }
- });
- }
-
- }
- });
- }
- catch (Exception e) {
- // ignore since connect failed (and don't show in the window)
- SystemBasePlugin.logError(e.getMessage(), e);
- }
- }
- else {
- openWindow(input);
- }
- }
-
- /**
- * Returns the associated subsystem if the object is remote, a filter or a subsystem
- * @param input the input object
- * @return
- */
- private ISubSystem getSubSystem(IAdaptable input)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)input.getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null) {
- if ((input instanceof ISystemFilterReference)
- || input instanceof ISubSystem
- || adapter.isRemote(input)) // not sure if we'd ever have
- // a remote object when not connected
- {
- return adapter.getSubSystem(input);
- }
- }
- return null;
- }
-
-
- /**
- * Open the input object in a new window
- * @param input the input to the new window
- */
- protected void openWindow(IAdaptable input)
- {
- OpenInNewWindowAction workbenchOpenAction = // NEW FOR RELEASE 2
- new OpenInNewWindowAction(window,input);
- 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/internal/ui/actions/SystemOpenRSEPerspectiveAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenRSEPerspectiveAction.java
deleted file mode 100644
index f40be6180..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemOpenRSEPerspectiveAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.rse.internal.ui.view.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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java
deleted file mode 100644
index 1e63e4327..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceQualifyConnectionNamesAction.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.core.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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
-
-{
- /**
- * Constructor
- */
- public SystemPreferenceQualifyConnectionNamesAction(Shell parent)
- {
- super(SystemResources.ACTION_QUALIFY_CONNECTION_NAMES_LABEL,SystemResources.ACTION_QUALIFY_CONNECTION_NAMES_TOOLTIP,
- parent);
- setSelectionSensitive(false);
- allowOnMultipleSelection(true);
- setChecked(RSEUIPlugin.getTheSystemRegistryUI().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();
- RSEUIPlugin.getTheSystemRegistryUI().setQualifiedHostNames(newState);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_QUALIFYCONNECTIONNAMES,
- !newState,newState); // defect 41794
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSECorePlugin.getTheSystemRegistry().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/internal/ui/actions/SystemPreferenceRestoreStateAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceRestoreStateAction.java
deleted file mode 100644
index 1614d0b3f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceRestoreStateAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.core.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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 = RSECorePlugin.getTheSystemRegistry();
- setChecked(SystemPreferencesManager.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.setRememberState(newState);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_RESTORESTATE,
- !newState,newState);
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSECorePlugin.getTheSystemRegistry().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/internal/ui/actions/SystemPreferenceShowFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceShowFilterPoolsAction.java
deleted file mode 100644
index 357a29e2b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemPreferenceShowFilterPoolsAction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.core.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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.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.setShowFilterPools(newState);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS,
- !newState,newState); // defect 41794
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSECorePlugin.getTheSystemRegistry().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/internal/ui/actions/SystemProfileNameCopyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java
deleted file mode 100644
index 1a248a11d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameCopyAction.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemCopyProfileDialog;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-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 = RSECorePlugin.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()
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().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(profile, newName,makeActive,monitor);
- 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();
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameSelectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameSelectAction.java
deleted file mode 100644
index 9703421c1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemProfileNameSelectAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.rse.core.RSECorePlugin;
-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.core.model.SystemProfileManager;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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.getDefault();
- 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 = RSECorePlugin.getTheSystemRegistry();
- sr.setSystemProfileActive(profile, isChecked());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStartAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStartAction.java
deleted file mode 100644
index 8110e6e4c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStartAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStopAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStopAction.java
deleted file mode 100644
index 04b6a33be..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRemoteServerStopAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemResolveFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemResolveFilterStringAction.java
deleted file mode 100644
index 7bae8eabe..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemResolveFilterStringAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.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)
- {
- return new SystemResolveFilterStringDialog(shell, subsystem, filterString);
- } // end createDialog()
-
- /**
- * Return selected object. If multiple objects are selected,
- * returns the first selected object.
- */
- public Object getSelectedObject()
- {
- return getValue();
- }
-
-} // end class SystemResolveFilterStringAction
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRunAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRunAction.java
deleted file mode 100644
index fbc786162..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemRunAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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());
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSeparatorAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSeparatorAction.java
deleted file mode 100644
index a07fe470d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSeparatorAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInMonitorAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInMonitorAction.java
deleted file mode 100644
index 844047dd2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInMonitorAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.monitor.SystemMonitorUI;
-import org.eclipse.rse.internal.ui.view.monitor.SystemMonitorViewPart;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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((IAdaptable)selected))
- {
- _selected = selected;
- enable = true;
- }
- }
-
- return enable;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInTableAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInTableAction.java
deleted file mode 100644
index b62ccd8e6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowInTableAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemTableViewPart;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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((IAdaptable)selected))
- {
- _selected = selected;
- enable = true;
- }
- }
-
- return enable;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowPreferencesPageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowPreferencesPageAction.java
deleted file mode 100644
index 395adf4a3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemShowPreferencesPageAction.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [185552] Remove remoteSystemsViewPreferencesActions extension point
- * Kevin Doyle (IBM) - [186769] Enable Contributions to Drop Down menu of Remote Systems view -> Preferences
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.rse.ui.actions.SystemBaseAction;
-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 Preferences 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>
- * @deprecated this will be moved to use the command/handler extension point.
- */
-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 menu shortcut to show a particular preference page.
- */
- 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)
- {
- shell = RSEUIPlugin.getTheSystemRegistryUI().getShell();
- 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/internal/ui/actions/SystemStringPromptAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemStringPromptAction.java
deleted file mode 100644
index deaabc8de..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemStringPromptAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.actions.SystemBaseDialogAction;
-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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManager.java
deleted file mode 100644
index cfe34b63c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManager.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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
-{
- 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/internal/ui/actions/SystemSubMenuManagerForTesting.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManagerForTesting.java
deleted file mode 100644
index 335b8f13a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemSubMenuManagerForTesting.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTeamReloadAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTeamReloadAction.java
deleted file mode 100644
index 970cb1f81..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTeamReloadAction.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.SystemResourceListener;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.actions.SystemBaseAction;
-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 = RSECorePlugin.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/internal/ui/actions/SystemTestFilterStringAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTestFilterStringAction.java
deleted file mode 100644
index e3f37647e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemTestFilterStringAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemTestFilterStringDialog;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-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;
-
- /**
- * 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)
- {
- return new SystemTestFilterStringDialog(shell, subsystem, filterString);
- }
-
- /**
- * Required by parent. We just return null.
- */
- protected Object getDialogValue(Dialog dlg)
- {
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToAllAction.java
deleted file mode 100644
index bc7187090..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToAllAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.ui.actions;
-
-import org.eclipse.rse.internal.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.internal.ui.actions.SystemViewExpandToBaseAction#getFilterString(Object)
- */
- protected String getFilterString(Object selectedObject)
- {
- return null;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToBaseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToBaseAction.java
deleted file mode 100644
index d714ff286..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemViewExpandToBaseAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemTree;
-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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java
deleted file mode 100644
index f624d1b8f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [251026] Work Offline requires being selected twice to turn on Offline Mode
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-
-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.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Display;
-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()
- {
- final IHost conn = (IHost)getFirstSelection();
- final ISystemRegistry sr = RSECorePlugin.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
- final Display display = Display.getCurrent();
- String jobName = NLS.bind(CommonMessages.MSG_DISCONNECT_PROGRESS, conn.getName());
- Job disconnectJob = new Job(jobName)
- {
- public IStatus run(IProgressMonitor monitor){
- ISubSystem[] subsystems = sr.getSubSystems(conn);
- if (subsystems != null && subsystems.length > 0){
- boolean cancelled = false;
- // disconnect each connector service associated with the host
- for (int i = 0; i < subsystems.length && !cancelled; i++){
-
- final ISubSystem subSystem = subsystems[i];
-
- if(subSystem.getSubSystemConfiguration().supportsSubSystemConnect()){
- if (subSystem.isConnected()){
- // should always have a connector service
- IConnectorService cs = subSystem.getConnectorService();
- if (cs.isConnected()){
- try {
- cs.disconnect(monitor);
- }
- catch (Exception e){
- SystemBasePlugin.logError(e.getMessage());
- }
-
- // failed to disconnect?
- if (cs.isConnected()){
- cancelled = true;
- }
- else {
- cs.reset();
- display.asyncExec(new Runnable(){
- public void run(){
- // this will take care of updating all subsystems
- sr.connectedStatusChange(subSystem, false, true, false);
- }
- });
- }
- }
- }
- }
- if (monitor.isCanceled()){
- cancelled = true;
- }
- }
-
- if (cancelled){ // either monitor got cancelled or disconnect failed
- setChecked(false);
- sr.setHostOffline(conn, false);
- return Status.CANCEL_STATUS;
- }
- }
- return Status.OK_STATUS;
- }
-
- };
-
- disconnectJob.schedule();
- }
- }
-
-
-
- /* (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/internal/ui/actions/SystemWorkWithProfilesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkWithProfilesAction.java
deleted file mode 100644
index c8cc645bb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkWithProfilesAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.actions;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveHelpers;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewPart;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-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 = RSECorePlugin.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/internal/ui/dialogs/CopyRunnable.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/CopyRunnable.java
deleted file mode 100644
index bac7df7da..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/CopyRunnable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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:
- * Rupen Mardirossian (IBM) - [210693] Created class to run SystemCopyDialog for enhancement defect.
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-
-import java.util.List;
-
-public class CopyRunnable implements Runnable
-{
- private boolean _ok;
- private List _existingNames;
- private SystemCopyDialog dlg;
-
- public CopyRunnable(List existing)
- {
- _existingNames = existing;
- }
-
- public void run() {
- dlg = new SystemCopyDialog(null, _existingNames);
- dlg.open();
- if (!dlg.wasCancelled())
- _ok = true;
- else
- _ok = false;
- }
- public boolean getOk()
- {
- return _ok;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java
deleted file mode 100644
index 5bf4f2206..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemControlEnableState.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.internal.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();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyDialog.java
deleted file mode 100644
index 7dc13c0bf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyDialog.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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:
- * Rupen Mardirossian (IBM) - [210693] Created Dialog for enhancement defect
- ********************************************************************************/
-
-
-package org.eclipse.rse.internal.ui.dialogs;
-
-import java.util.List;
-
-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.viewers.TableViewer;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemCopyTableProvider;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-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.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * Dialog for confirming overwriting of resources when copy collision occurs.
- *
- * This dialog is a mirror copy of the SystemDeleteDialog with a few changes
- *
- */
-
-public class SystemCopyDialog extends SystemPromptDialog
-{
- private String verbiage;
- private SystemCopyTableProvider sctp;
- private Table table;
- private TableViewer tableViewer;
- private GridData tableData;
- private List collisions;
-
- // column layout
- private ColumnLayoutData columnLayouts[] =
- {
- new ColumnPixelData(19, false),
- new ColumnWeightData(150,150,true)
- };
-
- // column headers
- private String columnHeaders[] = {
- "", //$NON-NLS-1$
- SystemResources.RESID_COLLISION_COPY_COLHDG_OLDNAME
- };
- /**
- * Constructor when you have your list of files and would like to use default title.
- */
- public SystemCopyDialog(Shell shell, List files)
- {
- this(shell, SystemResources.RESID_COPY_TITLE, files);
- }
- /**
- * Constructor when you have your own title and list of files.
- */
- public SystemCopyDialog(Shell shell, String title, List files)
- {
- super(shell, title);
- setOkButtonLabel(SystemResources.BUTTON_OVERWRITE_ALL);
- setOkButtonToolTipText(SystemResources.BUTTON_OVERWRITE_ALL_TOOLTIP);
- setCancelButtonLabel(SystemResources.BUTTON_CANCEL_ALL);
- setCancelButtonToolTipText(SystemResources.BUTTON_CANCEL_ALL_TOOLTIP);
- collisions=files;
- }
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent)
- {
- // Inner composite
- int nbrColumns = 1;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
-
- if (verbiage != null)
- SystemWidgetHelpers.createVerbiage(composite, verbiage, nbrColumns, false, 200);
- else
- SystemWidgetHelpers.createVerbiage(composite, SystemResources.RESID_COLLISION_COPY_VERBIAGE, nbrColumns, false, 200);
-
- // TABLE
- tableViewer = createTableViewer(composite, nbrColumns);
- createColumns();
-
- sctp = new SystemCopyTableProvider();
-
- int width = tableData.widthHint;
- int nbrRows = Math.min(collisions.size(),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(sctp);
- tableViewer.setContentProvider(sctp);
-
- tableViewer.setInput(collisions);
-
- return composite;
- }
- /**
- * Creates and returns TableViewer
- */
- 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;
- }
-
- protected Control getInitialFocusControl()
- {
- return null;
- }
-
-
- 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]);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyProfileDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyProfileDialog.java
deleted file mode 100644
index 245d0f062..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyProfileDialog.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.ui.SystemResources;
-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.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFactory;
-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.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog for copying a system profile.
- */
-public class SystemCopyProfileDialog extends SystemPromptDialog
-{
- 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);
- }
- nameValidator = ValidatorFactory.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableProvider.java
deleted file mode 100644
index 0fb79f0f0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableProvider.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Rupen Mardirossian (IBM) - [210682] Created for SystemCopyDialog
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-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.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-/**
- * This class is the table provider class for the SystemCopyDialog
- */
-public class SystemCopyTableProvider implements ITableLabelProvider, IStructuredContentProvider
-{
-
- static final int COLUMN_IMAGE = 0;
- static final int COLUMN_NAME = 1;
- protected Map imageTable = new Hashtable(20);
- protected Object[] children = null;
-
- /**
- * Constructor for SystemCopyTableProvider
- */
- public SystemCopyTableProvider()
- {
- super();
- }
-
- private SystemCopyTableRow getTableRow(Object element)
- {
- return (SystemCopyTableRow)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();
- 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)
- {
- List list = (List)inputElement;
- children = new SystemCopyTableRow[list.size()];
- for(int i=0;i<list.size();i++)
- {
- children[i] = new SystemCopyTableRow(list.get(i), i);
- }
- }
- return children;
- }
-
- /**
- * Return the 0-based row number of the given element.
- */
- public int getRowNumber(SystemCopyTableRow row)
- {
- return row.getRowNumber();
- }
-
- /**
- *
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
- {
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableRow.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableRow.java
deleted file mode 100644
index 88156a5f8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemCopyTableRow.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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:
- * Rupen Mardirossian (IBM) - [210682] created for SystemCopyDialog
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.ISystemTypedObject;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-/**
- * Represents one row in the table in the SystemCopyDialog dialog.
- */
-public class SystemCopyTableRow
-{
-
- private Object element;
- private String name;
- private String type;
- private ImageDescriptor imageDescriptor;
- private ISystemViewElementAdapter adapter;
- private ISystemRemoteElementAdapter remoteAdapter;
- private int rowNbr = 0;
-
- public SystemCopyTableRow(Object element, int rowNbr)
- {
- if (element instanceof SystemSimpleContentElement)
- element = ((SystemSimpleContentElement)element).getData();
- this.element = element;
- this.adapter = getViewAdapter(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 = getViewAdapter(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 copy
- * @return display name of the item.
- */
- public String getName()
- {
- return name;
- }
- /**
- * Return the resource type of the item to be copy
- * @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 getViewAdapter()
- {
- 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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;
- }
-}
-
-
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteDialog.java
deleted file mode 100644
index 69dec1e92..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteDialog.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [186640] Add IRSESystemType.testProperty()
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- * David McKnight (IBM) - [203361] Deleting multiple target connections misleading
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-import java.util.ArrayList;
-import java.util.List;
-
-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.internal.ui.SystemResources;
-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.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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;
-import org.eclipse.swt.widgets.TableItem;
-
-/**
- * Dialog for confirming resource deletion.
- * <p>
- * This is a re-usable dialog that you can use directly, or via the {@link org.eclipse.rse.internal.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.internal.ui.actions.SystemCommonDeleteAction
- */
-public class SystemDeleteDialog extends SystemPromptDialog
- implements ISelectionChangedListener
-{
- private String warningMessage, warningTip;
- private String promptLabel;
- private SystemDeleteTableProvider sdtp;
- //private Label prompt;
- private Table table;
- private TableViewer tableViewer;
- private GridData tableData;
- private List _selectedResources;
-
- // 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 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);
-
- // check all off
- TableItem[] items = tableViewer.getTable().getItems();
- for (int i = 0; i < items.length; i++){
- items[i].setChecked(true);
- }
-
- return composite;
- }
-
- private TableViewer createTableViewer(Composite parent, int nbrColumns)
- {
- table = new Table(parent, SWT.CHECK | 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()
- {
- _selectedResources = new ArrayList();
- TableItem[] items = table.getItems();
- for (int i = 0; i < items.length; i++){
- if (items[i].getChecked()){
- SystemDeleteTableRow row = (SystemDeleteTableRow)items[i].getData();
- _selectedResources.add(row.getElement());
- }
- }
-
- return true;
- }
-
- public List getSelectedResources()
- {
- return _selectedResources;
- }
-
-
- /**
- * 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(o);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableProvider.java
deleted file mode 100644
index 90822e9ca..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableProvider.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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/internal/ui/dialogs/SystemDeleteTableRow.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableRow.java
deleted file mode 100644
index b0cde89c1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemDeleteTableRow.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.ISystemTypedObject;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-
-/**
- * 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 = getViewAdapter(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 = getViewAdapter(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 getViewAdapter()
- {
- 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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/internal/ui/dialogs/SystemRenameDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameDialog.java
deleted file mode 100644
index d5af9af26..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameDialog.java
+++ /dev/null
@@ -1,696 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- * David McKnight (IBM) - [242714] Esc on Multiple Rename Dialog doesn't close the dialog
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.model.IHost;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.SystemBasePlugin;
-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.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.internal.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.internal.ui.actions.SystemCommonRenameAction
- */
-public class SystemRenameDialog extends SystemPromptDialog
- implements
- 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 verbiage;
-
- 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(IBasicPropertyConstants.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(ISystemPropertyConstants.P_NEWNAME);
- if (modifiable)
- {
- 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(ISystemPropertyConstants.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 verbiage to show above the table. The default is "Enter new name for each resource"
- */
- public void setVerbiage(String verbiage)
- {
- this.verbiage = verbiage;
- }
- /**
- * 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)
- {
- 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 (verbiage != null)
- SystemWidgetHelpers.createVerbiage(composite, verbiage, nbrColumns, false, 200);
- else
- SystemWidgetHelpers.createVerbiage(composite, SystemResources.RESID_RENAME_VERBIAGE, 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 = 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;
-
-
- //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 if (detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- }
- 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(inputElement, null);
- } 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)
- {
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableProvider.java
deleted file mode 100644
index f9a448caf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableProvider.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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 org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener)
- {
- }
-
- /**
- * @see org.eclipse.jface.viewers.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 org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property)
- {
- return true;
- }
-
- /**
- * @see org.eclipse.jface.viewers.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableRow.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableRow.java
deleted file mode 100644
index a0e0fc9a2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemRenameTableRow.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [226143] [api][breaking] Make RSE rename/delete dialogs internal
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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 = getViewAdapter(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.getViewAdapter();
- 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.getViewAdapter();
- 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemResolveFilterStringDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemResolveFilterStringDialog.java
deleted file mode 100644
index f7af4d6c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemResolveFilterStringDialog.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemResolveFilterStringAPIProviderImpl;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-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
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemTestFilterStringDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemTestFilterStringDialog.java
deleted file mode 100644
index b3c481c23..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemTestFilterStringDialog.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.RSECorePlugin;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemTestFilterStringAPIProviderImpl;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-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 subsystemConfigurationId = 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.subsystemConfigurationId = subsystem.getSubSystemConfiguration().getId();
- sr = RSECorePlugin.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.subsystemConfigurationId = 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 newSubSystem = null;
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
- if (config!=null) {
- ISubSystem[] newSubSystems = config.getSubSystems(newConnection, true);
- if (newSubSystems != null && newSubSystems.length > 0) {
- newSubSystem = newSubSystems[0];
- subsystemConfigurationId = 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/internal/ui/dialogs/SystemWorkWithHistoryDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemWorkWithHistoryDialog.java
deleted file mode 100644
index 5f7ef3aff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemWorkWithHistoryDialog.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [240414] NPE in SystemHistoryCombo
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.dialogs;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-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 Listener, ArmListener
-{
- private String[] historyInput;
- private String[] historyOutput;
- private String[] defaultHistory;
- //private Label verbiage;
- 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);
-
- // verbiage
- /*verbiage =*/ SystemWidgetHelpers.createLabel(composite,SystemResources.RESID_WORKWITHHISTORY_VERBIAGE, 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);
- if (historyInput != null)
- 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolManagerUIProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolManagerUIProvider.java
deleted file mode 100644
index 74e0deb4a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterPoolManagerUIProvider.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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);
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java
deleted file mode 100644
index d943cd29f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/SystemFilterWorkWithFilterPoolsTreeViewer.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.internal.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.swt.SWT;
-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, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); // DKM - putting style here to avoid SWT.BORDER (defect 168972)
-
- 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()));
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java
deleted file mode 100644
index 104db8500..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizard.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.ui.SystemResources;
-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.filters.SystemFilterPoolDialogOutputs;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
-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
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java
deleted file mode 100644
index bcabb50f5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardDefaultMainPage.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.filters.dialogs;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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++) {
- ISystemFilterPoolManager manager = mgrs[idx];
- mgrNames[idx] = manager.getName();
- ISystemValidator iiv = new ValidatorFilterPoolName(manager.getSystemFilterPoolNames());
- 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 != 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;
-
- 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java
deleted file mode 100644
index ba5b0007c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterNewFilterPoolWizardMainPageInterface.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java
deleted file mode 100644
index c974271c8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterPoolWizardDialog.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.rse.ui.filters.dialogs.SystemFilterPoolWizardInterface;
-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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWizardDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWizardDialog.java
deleted file mode 100644
index d575bda88..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWizardDialog.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.filters.dialogs;
-import org.eclipse.rse.ui.dialogs.SystemWizardDialog;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterAction;
-import org.eclipse.rse.ui.filters.dialogs.ISystemFilterWizard;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogInterface;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogOutputs;
-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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java
deleted file mode 100644
index a07205344..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [197036] fixed delete filter pool bug found during testing of this bug
- * see also bug 194260 regarding deleting filter pools
- * David Dykstal (IBM) - [194268] fixed initial selection and new action selection
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.dialogs.Dialog;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterCopyFilterPoolAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveFilterPoolAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterNewFilterPoolAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterWorkWithFilterPoolsRefreshAllAction;
-import org.eclipse.rse.internal.ui.filters.SystemFilterPoolManagerUIProvider;
-import org.eclipse.rse.internal.ui.filters.SystemFilterWorkWithFilterPoolsTreeViewer;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.ISystemAction;
-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.SystemFilterUIHelpers;
-import org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-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
- ISelectionChangedListener,
- ISystemDeleteTarget, ISystemRenameTarget,
- SystemFilterPoolDialogInterface
- //,ISystemResourceChangeListener
-{
- class DeleteFilterPoolAction extends SystemCommonDeleteAction {
- public DeleteFilterPoolAction(Shell parent, ISystemDeleteTarget deleteTarget) {
- super(parent, deleteTarget);
- }
- protected Object getDialogValue(Dialog dlg) {
- doDelete(null);
- return null;
- }
- }
-
- 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 DeleteFilterPoolAction 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 DeleteFilterPoolAction(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()
- {
- //RSECorePlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- return super.close();
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
-
- clearErrorMessage();
-/*
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- */
- return true;
- }
-
- /**
- * 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)
- {
- 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)
- {
- 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));
- if (mgrElement != null)
- 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();
- if (element != null) {
- 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());
- }
- }
- }
- 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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemUnNamedFilterDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemUnNamedFilterDialog.java
deleted file mode 100644
index 07424635c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemUnNamedFilterDialog.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.filters.dialogs;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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()
- {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.java
deleted file mode 100644
index 083bed04c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - 148434 Better F1 help.
- *******************************************************************************/
-package org.eclipse.rse.internal.ui.logging;
-
-import org.eclipse.osgi.util.NLS;
-
-public class LoggingPreferenceLabels extends NLS {
-
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.ui.logging.LoggingPreferenceLabels";//$NON-NLS-1$
-
- public static String LOGGING_PREFERENCE_PAGE_TOPLABEL;
- 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.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.properties
deleted file mode 100644
index c6b759bab..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferenceLabels.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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.
-###############################################################################
-
-# =====================================
-# Remote System Logging properties file
-# =====================================
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-# Preference Page
-# ----------------
-LOGGING_PREFERENCE_PAGE_TOPLABEL = 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.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferencePage.java
deleted file mode 100644
index c9725ac0d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/logging/LoggingPreferencePage.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 Canada) - 148434 Better F1 help.
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.logging;
-
-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.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;
- }
-
- /**
- * Method declared on PreferencePage
- */
- protected Control createContents(Composite parent) {
- Composite composite_tab = createComposite(parent, 1, 1);
- String topLabel = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_TOPLABEL;
- Group group = createGroup(composite_tab, 1, 1, topLabel);
- radioButton0 = createRadioButton(group, LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_ERRORS_ONLY);
- radioButton1 = createRadioButton(group, LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_WARNINGS_ERRORS);
- radioButton2 = createRadioButton(group, LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_INFO_DEBUG);
- if (Logger.DEBUG) {
- radioButton3 = createRadioButton(group, LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_FULL_DEBUG);
- }
- initializeValues();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, "org.eclipse.rse.ui.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(Logger.LOGGING_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(Logger.LOGGING_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(Logger.LOGGING_LEVEL, choice);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/RemoteSystemsPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/RemoteSystemsPreferencePage.java
deleted file mode 100644
index c457b4d62..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/RemoteSystemsPreferencePage.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * - created and used PreferencesMapper
- * Martin Oberhuber (Wind River) - [180562] don't implement ISystemPreferencesConstants
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-
-
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.internal.core.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.internal.ui.PreferencesMapper;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBooleanFieldEditor;
-import org.eclipse.rse.ui.propertypages.SystemTypeFieldEditor;
-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
-{
- private SystemBooleanFieldEditor showFilterPoolsEditor;
- private SystemBooleanFieldEditor qualifyConnectionNamesEditor;
- private SystemBooleanFieldEditor rememberStateEditor;
-
-
- // 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()
- {
- IPreferenceStore coreStore = new PreferencesMapper(RSECorePlugin.getDefault().getPluginPreferences());
-
- // 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);
-
-
- // set mnemonics
- (new Mnemonics()).setOnPreferencePage(true).setMnemonics(getFieldEditorParent());
-
- }
-
- public void init(IWorkbench workbench)
- {
- }
-
- /**
- * 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();
- SystemPreferencesManager.savePreferences(); // better save to disk, just in case.
- if (!RSECorePlugin.isTheSystemRegistryActive())
- return ok;
- if (showFilterPoolsEditor != null)
- {
- boolean newValue = showFilterPoolsEditor.getBooleanValue();
- if (newValue != lastShowFilterPoolsValue)
- {
- RSEUIPlugin.getTheSystemRegistryUI().setShowFilterPools(newValue);
- firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS,lastShowFilterPoolsValue,newValue);
- }
- lastShowFilterPoolsValue = newValue;
- }
- if (showNewConnectionPromptEditor != null)
- {
- boolean newValue = showNewConnectionPromptEditor.getBooleanValue();
- if (newValue != lastShowNewConnectionPromptValue)
- {
- RSEUIPlugin.getTheSystemRegistryUI().setShowNewHostPrompt(newValue);
- }
- lastShowNewConnectionPromptValue = newValue;
- }
- if (qualifyConnectionNamesEditor != null)
- {
- boolean newValue = qualifyConnectionNamesEditor.getBooleanValue();
- if (newValue != lastQualifyConnectionNamesValue)
- {
- RSEUIPlugin.getTheSystemRegistryUI().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;
- }
-
- return ok;
- }
-
- /**
- * Fire a preference change event
- */
- private void firePreferenceChangeEvent(int type, boolean oldValue, boolean newValue)
- {
- RSECorePlugin.getTheSystemRegistry().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/internal/ui/propertypages/ServerConnectionSecurityPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerConnectionSecurityPropertyPage.java
deleted file mode 100644
index 39ef15d29..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerConnectionSecurityPropertyPage.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- * David McKnight (IBM) - [197129] Removing obsolete ISystemConnectionWizardPropertyPage and SystemSubSystemsPropertiesWizardPage
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.IRSESystemType;
-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.internal.ui.widgets.ServerConnectionSecurityForm;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-public class ServerConnectionSecurityPropertyPage extends SystemBasePropertyPage
-{
-
-
- 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(IRSESystemType systemType)
- {
-
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerLauncherPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerLauncherPropertyPage.java
deleted file mode 100644
index 01c7942f5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/ServerLauncherPropertyPage.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * David McKnight (IBM) - [197129] Removing obsolete ISystemConnectionWizardPropertyPage and SystemSubSystemsPropertiesWizardPage
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-
-import org.eclipse.rse.core.IRSESystemType;
-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.ui.ISystemVerifyListener;
-import org.eclipse.rse.ui.propertypages.ISystemConnectionWizardErrorUpdater;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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 IRSESystemType _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 && connectorService != 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(IRSESystemType systemType)
- {
- _systemType = systemType;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java
deleted file mode 100644
index 8def9f3ef..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [226574] don't show encoding if no subsystem supports it
- * David McKnight (IBM) - [252708] Saving Profile Job happens when not changing Property Values on Connections
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-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.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemConnectionFormCaller;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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);
-
- // only add encoding fields if needed for this connection
- ISubSystem[] sses = conn.getSubSystems();
- boolean addEncodingFields = false;
- for (int i = 0; i < sses.length && !addEncodingFields; i++){
- ISubSystem ss = sses[i];
- addEncodingFields = ss.getSubSystemConfiguration().supportsEncoding(conn);
- }
-
- if (addEncodingFields){
- // add encoding fields
- form.addDefaultEncodingFields();
- }
-
- // 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();
- }
-
- private boolean hasConnectionChanged(IHost conn){
- if (!compareStrings(conn.getName(), form.getConnectionName()) ||
- !compareStrings(conn.getHostName(), form.getHostName()) ||
- !compareStrings(conn.getDescription(), form.getConnectionDescription()) ||
- !compareStrings(conn.getDefaultUserId(), form.getDefaultUserId())){
- return true;
- }
- return false;
- }
-
- private boolean compareStrings(String str1, String str2){
- if (str1 == null || str1.length() == 0)
- return (str2 == null || str2.length() == 0);
- else
- return (str2 == null || str2.length() == 0) ? false: str1.equals(str2);
- }
-
- /**
- * Called by parent when user presses OK
- */
- public boolean performOk()
- {
- boolean okToClose = verifyPageContents();
- if (okToClose)
- {
- IHost conn = (IHost)getElement();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- if (hasConnectionChanged(conn)){
- sr.updateHost( conn, conn.getSystemType(), form.getConnectionName(),form.getHostName(),
- form.getConnectionDescription(), form.getDefaultUserId(),
- form.getUserIdLocation() );
- }
-
- // update encoding
- String encoding = form.getDefaultEncoding();
- boolean isRemoteEncoding = form.isEncodingRemoteDefault();
-
- String currentEncoding = conn.getDefaultEncoding(false);
-
- // user set encoding
- if (!isRemoteEncoding && encoding != null && !encoding.equals(currentEncoding)) {
- conn.setDefaultEncoding(encoding, false);
- }
- // remote default encoding
- else if (currentEncoding != null){
- // remove user encoding from host property first
- conn.setDefaultEncoding(null, false);
- // remove default remote encoding to indicate to get from remote system
- conn.setDefaultEncoding(null, true);
- }
-
- 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) && !conn.getSystemType().isLocal())
- {
- // 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(IRSESystemType systemType, boolean duringInitialization)
- {
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java
deleted file mode 100644
index b8f4380d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionSubSystemsPropertyPage.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemTabFolderLayout;
-import org.eclipse.rse.ui.ISystemConnectionFormCaller;
-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.ISystemMessageLineTarget;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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.ui.model.IHost
- <page
- objectClass="org.eclipse.rse.ui.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 =
- RSECorePlugin.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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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(IRSESystemType systemType, boolean duringInitialization)
- {
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectorServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectorServicesPropertyPage.java
deleted file mode 100644
index 25e6c6f60..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectorServicesPropertyPage.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.propertypages;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolPropertyPage.java
deleted file mode 100644
index a693f4e08..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolPropertyPage.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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());
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolReferencePropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolReferencePropertyPage.java
deleted file mode 100644
index b25404479..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPoolReferencePropertyPage.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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());
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPropertyPage.java
deleted file mode 100644
index 594e1552b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemFilterPropertyPage.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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);
- labelType.setToolTipText(SystemResources.RESID_PP_FILTER_TYPE_PROMPTABLE_TOOLTIP);
- }
- 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);
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemLoggingPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemLoggingPreferencePage.java
deleted file mode 100644
index 1559527a3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemLoggingPreferencePage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.propertypages;
-
-import org.eclipse.rse.internal.ui.logging.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemPreferenceInitializer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemPreferenceInitializer.java
deleted file mode 100644
index 758f83155..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemPreferenceInitializer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewProfilePropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewProfilePropertyPage.java
deleted file mode 100644
index e80cb7465..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewProfilePropertyPage.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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 = RSECorePlugin.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/internal/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java
deleted file mode 100644
index 6a2641579..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemTeamViewSubSystemConfigurationPropertyPage.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.propertypages;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
-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_VERBIAGE, 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$
- if (ssf.getSubSystemConfigurationProxy().supportsAllSystemTypes())
- {
- systypes = SystemResources.TERM_ALL;
- }
- else
- {
- IRSESystemType[] types = ssf.getSystemTypes();
- StringBuffer buf = new StringBuffer();
- for (int idx=0; idx<types.length; idx++)
- {
- if (idx>0)
- buf.append(", "); //$NON-NLS-1$
- buf.append(types[idx].getLabel());
- }
- systypes = buf.toString();
- }
- 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/internal/ui/view/ContextObjectWithViewer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ContextObjectWithViewer.java
deleted file mode 100644
index 6672fbfec..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ContextObjectWithViewer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [187739] [refresh] Sub Directories are collapsed when Parent Directory is Refreshed on Remote Systems
- ********************************************************************************/
-package org.eclipse.rse.internal.ui.view;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.ContextObject;
-
-public class ContextObjectWithViewer extends ContextObject {
- private Viewer _viewer;
- private IRSECallback _callback;
-
- public ContextObjectWithViewer(Object modelObject, Viewer viewer){
- super(modelObject);
- _viewer = viewer;
- }
-
- public ContextObjectWithViewer(Object modelObject, ISubSystem subsystem, Viewer viewer){
- super(modelObject, subsystem);
- _viewer = viewer;
- }
-
- public ContextObjectWithViewer(Object modelObject, ISubSystem subsystem, ISystemFilterReference filterReference, Viewer viewer){
- super(modelObject, subsystem, filterReference);
- _viewer = viewer;
- }
-
- public ContextObjectWithViewer(Object modelObject, Viewer viewer, IRSECallback callback){
- super(modelObject);
- _viewer = viewer;
- _callback = callback;
- }
-
- public ContextObjectWithViewer(Object modelObject, ISubSystem subsystem, Viewer viewer, IRSECallback callback){
- super(modelObject, subsystem);
- _viewer = viewer;
- _callback = callback;
- }
-
- public ContextObjectWithViewer(Object modelObject, ISubSystem subsystem, ISystemFilterReference filterReference, Viewer viewer, IRSECallback callback){
- super(modelObject, subsystem, filterReference);
- _viewer = viewer;
- _callback = callback;
- }
-
- public Viewer getViewer()
- {
- return _viewer;
- }
-
- public IRSECallback getCallback()
- {
- return _callback;
- }
-
- public void setCallback(IRSECallback callback){
- _callback = callback;
- }
-
- public void setViewer(Viewer viewer){
- _viewer = viewer;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ElementComparer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ElementComparer.java
deleted file mode 100644
index 48e1c205a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ElementComparer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Kevin Doyle (IBM) - [195537] Move ElementComparer From SystemView to Separate File
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [225911] Exception received after deleting a profile containing a connection
- * David Dykstal (IBM) - [228774] [regression] AssertionFailedException when connecting to New Connection
- * Martin Oberhuber (Wind River) - [228774] Improve ElementComparer Performance
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import org.eclipse.jface.viewers.IElementComparer;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.core.model.SystemRegistry;
-
-/**
- * An implementation of an element comparer for the system view.
- */
-public class ElementComparer implements IElementComparer {
-
- public boolean equals(Object a, Object b) {
- // equal if same absolute name in same subsystem;
- // or, when adapters are not found, both are the same instance.
- return SystemRegistry.isSameObjectByAbsoluteName(a, null, b, null);
- }
-
- public int hashCode(Object element) {
- /*
- * Hashcodes should be invariant across the lifetime of the object.
- * Since one adapter is typically used for many elements in RSE,
- * performance would be better if the original Element's hashCode
- * were used rather than the adapter's hashCode. The problem with
- * this is, that if the remote object changes, it cannot be
- * identified any more.
- * Note that currently the hashCode of the object can change
- * over time if properties are modified (this is probably a bug).
- * Therefore, if there is no absolute name, play it safe and return the adapter's hashCode which won't ever change.
- */
- int result = 0;
- if (element != null) {
- ISystemDragDropAdapter dda = SystemRegistry.getSystemDragDropAdapter(element);
- if (dda != null) {
- // adapter available
- String absName = dda.getAbsoluteName(element);
- if (absName != null) {
- result = absName.hashCode();
- } else {
- result = dda.hashCode();
- }
- } else {
- // --MOB: Usually, we should fall back to constant hashcode 0
- // here if no adapter is available, in order to ensure constant
- // hashcode even if object properties change. But as a matter of
- // fact, those elements that we have in the SystemView and which
- // do not have an adapter registered, are very few; and they are
- // always constant over their lifetime, such as the "Pending..."
- // node for instance. We therefore return the element's hashcode
- // here, along with the corresponding equals() code above,
- // which falls back to Object equality if no adapter is
- // available.
- result = element.hashCode();
- }
- }
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ISystemMementoConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ISystemMementoConstants.java
deleted file mode 100644
index e3dcf4ff4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/ISystemMementoConstants.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java
deleted file mode 100644
index c276c671c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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.internal.ui.view;
-
-import org.eclipse.jface.viewers.IDelayedLabelDecorator;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * The SafeTreeViewer wraps an SWT TreeViewer in order to avoid
- * exceptions due to accessing already disposed items.
- *
- * The main reason for this wrapping is that delayed label providers
- * (i.e. instances of {@link IDelayedLabelDecorator}) can trigger tree
- * item updates called in the viewer after the tree item itself got
- * disposed already. This happens especially if items appear and
- * disappear very fast within the tree which then will lead to nasty
- * SWT Widget already disposed exceptions.
- *
- * Clients may subclass this class.
- *
- * @since RSE 2.0
- */
-public class SafeTreeViewer extends TreeViewer {
-
- /**
- * Constructor.
- *
- * @param parent The parent control.
- */
- public SafeTreeViewer(Composite parent) {
- super(parent);
- }
-
- /**
- * Constructor.
- *
- * @param tree The tree control.
- */
- public SafeTreeViewer(Tree tree) {
- super(tree);
- }
-
- /**
- * Constructor.
- *
- * @param parent The parent control.
- * @param style The SWT style bits passed to the tree creation.
- */
- public SafeTreeViewer(Composite parent, int style) {
- super(parent, style);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#doUpdateItem(org.eclipse.swt.widgets.Item, java.lang.Object)
- */
- protected void doUpdateItem(Item item, Object element) {
- if (item != null && item.isDisposed()) return;
- super.doUpdateItem(item, element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#doUpdateItem(org.eclipse.swt.widgets.Widget, java.lang.Object, boolean)
- */
- protected void doUpdateItem(Widget widget, Object element, boolean fullMap) {
- if (widget != null && widget.isDisposed()) return;
- super.doUpdateItem(widget, element, fullMap);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getItemCount(org.eclipse.swt.widgets.Control)
- */
- protected int getItemCount(Control widget) {
- if (widget != null && widget.isDisposed()) return 0;
- return super.getItemCount(widget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getItemCount(org.eclipse.swt.widgets.Item)
- */
- protected int getItemCount(Item item) {
- if (item != null && item.isDisposed()) return 0;
- return super.getItemCount(item);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#showItem(org.eclipse.swt.widgets.Item)
- */
- protected void showItem(Item item) {
- if (item != null && item.isDisposed()) return;
- super.showItem(item);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#updatePlus(org.eclipse.swt.widgets.Item, java.lang.Object)
- */
- protected void updatePlus(Item item, Object element) {
- if (item != null && item.isDisposed()) return;
- super.updatePlus(item, element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#createChildren(org.eclipse.swt.widgets.Widget)
- */
- protected void createChildren(Widget widget) {
- if (widget != null && widget.isDisposed()) return;
- super.createChildren(widget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getChild(org.eclipse.swt.widgets.Widget, int)
- */
- protected Item getChild(Widget widget, int index) {
- if (widget != null && widget.isDisposed()) return null;
- return super.getChild(widget, index);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getChildren(org.eclipse.swt.widgets.Widget)
- */
- protected Item[] getChildren(Widget widget) {
- if (widget != null && widget.isDisposed()) return new Item[0];
- return super.getChildren(widget);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getExpanded(org.eclipse.swt.widgets.Item)
- */
- protected boolean getExpanded(Item item) {
- if (item != null && item.isDisposed()) return false;
- return super.getExpanded(item);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getItems(org.eclipse.swt.widgets.Item)
- */
- protected Item[] getItems(Item item) {
- if (item != null && item.isDisposed()) return new Item[0];
- return super.getItems(item);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.TreeViewer#getParentItem(org.eclipse.swt.widgets.Item)
- */
- protected Item getParentItem(Item item) {
- if (item != null && item.isDisposed()) return null;
- return super.getParentItem(item);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SubSystemConfigurationAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SubSystemConfigurationAdapterFactory.java
deleted file mode 100644
index e78215033..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SubSystemConfigurationAdapterFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-
-
-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/internal/ui/view/SystemComboBoxCellEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxCellEditor.java
deleted file mode 100644
index 6d35e73a4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxCellEditor.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.osgi.util.NLS;
-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>
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-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(
- NLS.bind(getErrorMessage(), 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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxPropertyDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxPropertyDescriptor.java
deleted file mode 100644
index e849c9158..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemComboBoxPropertyDescriptor.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.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);
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java
deleted file mode 100644
index c04f7a187..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDNDTransferRunnable.java
+++ /dev/null
@@ -1,897 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Rupen Mardirossian (IBM) - [187713] Check to see if target is null before attempting to retrieve targetAdapter in tranferRSEResources method (line 248)
- * Martin Oberhuber (Wind River) - [200682] Fix drag&drop for elements just adaptable to IResource, like CDT elements
- * David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
- * Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when cancelling copy
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David McKnight (IBM) - [228587] [dnd] NPE From Refresh on Copy/Paste
- * David McKnight (IBM) - [232889] Dragging and dropping files from a remote unix system to a local project does not work
- * David McKnight (IBM) - [234721] [dnd] When dragging a file from windows file explorer into RSE, a refresh error is given.
- * David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work
- * David McKnight (IBM) - [196166] [usability][dnd] Changing the sort order of hosts in the SystemView should work by drag & drop
- * David McKnight (IBM) - [248922] [dnd] display error message when copy operation hits exception
- * Radoslav Gerganov (ProSyst) - [231428] [files] NPE on canceling copy operation from remote host
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.WorkspaceJob;
-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.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.ui.GenericMessages;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.internal.model.SystemScratchpad;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.undo.CopyResourcesOperation;
-import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
-import org.eclipse.ui.progress.UIJob;
-
-
-/**
- * Runnable to perform actual transfer operation.
- *
- */
-public class SystemDNDTransferRunnable extends WorkspaceJob
-{
-
- 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;
- private Shell _shell;
-
- 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);
- _shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- 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;
- }
-
- /**
- * Transfer RSE resources.
- *
- * @param target actual target object (parent item) to drop into
- * @param targetSubSystem subsystem of target object
- * @param targetAdapter RSE ISystemDragDropAdapter of target object
- * @param monitor progress monitor for cancellation
- * @return <code>true</code> if successfully transferred, or
- * <code>false</code> if cancelled.
- */
- protected boolean transferRSEResources(Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter, IProgressMonitor monitor)
- {
- // 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 (monitor.isCanceled()) {
- monitor.done();
- return false;
- }
- 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())
- {
- //Even the droppedObject has message, it could still has
- //dropped results. (user cancels the operation, but some objects
- //has already been copied.
- //Need to make sure we refresh those copied object.
- List results = droppedObjects.getResourceSet();
- for (int d = 0; d < results.size(); d++)
- {
- _resultTgtObjects.add(results.get(d));
- }
- 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 && targetSubSystem != null)
- {
- ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
- if (factory.supportsDropInFilters())
- {
- target = targetSubSystem.getTargetForFilter((ISystemFilterReference)target);
- if (target == null)
- {
- return false;
- }
- else
- {
- 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(IResource target, ISubSystem targetSubSystem, IProgressMonitor monitor)
- {
- boolean alwaysOverwrite = false;
-
- List resourcesToCopy = new ArrayList();
- IWorkspaceRoot root = target.getWorkspace().getRoot();
- 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)
- {
- // find all the files to copy and check that they don't exist first
- ISystemDragDropAdapter srcAdapter = (ISystemDragDropAdapter) ((IAdaptable) srcObject).getAdapter(ISystemDragDropAdapter.class);
- Object tempFile = srcAdapter.doDrag(srcObject, true, monitor);
- if (tempFile instanceof IResource)
- {
- boolean canCopy = true;
- IResource res = (IResource)tempFile;
- try
- {
- IPath destPath = target.getFullPath();
- destPath = destPath.append(res.getName());
-
- IResource newResource = root.findMember(destPath);
-
- // check for existing files
- if (!alwaysOverwrite){
- if (newResource != null && newResource.exists()){
- int result = checkOverwrite(res, newResource);
- if (result != IDialogConstants.YES_ID && result != IDialogConstants.YES_TO_ALL_ID){
- canCopy = false;
- if (result == IDialogConstants.CANCEL_ID){
- // cancel the whole operation
- monitor.setCanceled(true);
- return false;
- }
-
- _resultSrcObjects.remove(srcObject);
- }
- else if (result == IDialogConstants.YES_TO_ALL_ID){
- alwaysOverwrite = true; // don't ask anymore
- }
- }
- }
-
- // add to the list of files to copy
- if (canCopy){
- resourcesToCopy.add(res);
- }
- }
- catch (Exception e)
- {
- operationFailed(monitor);
- SystemBasePlugin.logError(e.getMessage(), e);
- }
- }
- }
- }
-
- // now doing the actual copy
- if (!resourcesToCopy.isEmpty()) {
- IResource[] resources = (IResource[])resourcesToCopy.toArray(new IResource[resourcesToCopy.size()]);
- IPath destinationPath = target.getFullPath();
- CopyResourcesOperation op = new CopyResourcesOperation(resources, destinationPath,
- SystemResources.RESID_COPY_TITLE);
-
-
- IAdaptable adaptable = WorkspaceUndoUtil.getUIInfoAdapter(_shell);
- try {
- PlatformUI.getWorkbench().getOperationSupport()
- .getOperationHistory().execute(op, monitor,adaptable);
- } catch (ExecutionException e) {
- SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
- if (e.getCause() instanceof CoreException) {
- SystemBasePlugin.logError(e.getMessage(), e);
- errorMessage.makeSubstitution(e.getCause().getMessage());
- } else {
- SystemBasePlugin.logError(e.getMessage(), e);
- errorMessage.makeSubstitution(e.getMessage());
- }
-
- showErrorMessage(errorMessage);
- operationFailed(monitor);
- return false;
- }
- }
-
- return true;
- }
-
-
- private int checkOverwrite(final IResource source, final IResource destination) {
- final int[] result = new int[1]; // using array since you can't change a final int
-
- Runnable query = new Runnable() {
- public void run() {
- int resultId[] = {
- IDialogConstants.YES_ID,
- IDialogConstants.YES_TO_ALL_ID,
- IDialogConstants.NO_ID,
- IDialogConstants.CANCEL_ID };
-
- String labels[] = new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL,
- IDialogConstants.NO_LABEL,
- IDialogConstants.CANCEL_LABEL };
-
- String title = SystemResources.RESID_COLLISION_DUPLICATE_RESOURCE_TITLE;
- String msg = NLS.bind(SystemResources.RESID_COLLISION_OVERWRITE_RESOURCE_MESSAGE, destination.getFullPath().makeRelative());
-
- MessageDialog dialog = new MessageDialog(
- PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- title,
- null, msg, MessageDialog.QUESTION, labels, 0);
- dialog.open();
- if (dialog.getReturnCode() == SWT.DEFAULT) {
- // A window close returns SWT.DEFAULT - mapped to a cancel
- result[0] = IDialogConstants.CANCEL_ID;
- } else {
- result[0] = resultId[dialog.getReturnCode()];
- }
- }
- };
-
- PlatformUI.getWorkbench().getDisplay().syncExec(query);
- return result[0];
- }
-
- protected boolean transferNonRSEResources(Object target, ISubSystem targetSubSystem, ISystemDragDropAdapter targetAdapter, IProgressMonitor monitor)
- {
-
- 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 && targetSubSystem != null)
- {
-
- 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)
- {
- // Eclipse resource transfer
- IResource resource = null;
- if (srcObject instanceof IResource) {
- resource = (IResource) srcObject;
- } else if (srcObject instanceof IAdaptable) {
- resource = (IResource)((IAdaptable)srcObject).getAdapter(IResource.class);
- } else {
- resource = (IResource)Platform.getAdapterManager().getAdapter(srcObject, IResource.class);
- }
- if (resource!=null) {
- 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 && targetSubSystem != null)
- {
- 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 && targetSubSystem != null)
- {
- 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 runInWorkspace(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);
-
- // checking for IResource since we already handle them specially
- if (targetAdapter != null && !(target instanceof IResource))
- {
- targetSubSystem = targetAdapter.getSubSystem(target);
-
- if (targetSubSystem != null && !targetSubSystem.isConnected())
- {
- try
- {
- targetSubSystem.connect(monitor, false);
- }
- 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(target, targetSubSystem, targetAdapter, monitor);
- }
- else
- {
- transferNonRSEResources(target, targetSubSystem, targetAdapter, monitor);
- }
- }
- else if (target instanceof IResource)
- {
- transferRSEResourcesToEclipseResource((IResource)target, targetSubSystem, monitor);
- }
- }
-
- // 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)
- {
- String[] oldNames = new String[_resultSrcObjects.size()];
- ISystemRegistry registry = RSECorePlugin.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;
- }
- ISystemDragDropAdapter adapter = null;
- if (src instanceof IAdaptable) {
- adapter = (ISystemDragDropAdapter)((IAdaptable)src).getAdapter(ISystemDragDropAdapter.class);
- }
- else {
- adapter = (ISystemDragDropAdapter)Platform.getAdapterManager().getAdapter(src, ISystemDragDropAdapter.class);
- }
-
- if (adapter != null){
- oldNames[t] = adapter.getAbsoluteName(src);
- }
- else if (src instanceof IResource){ // could be an eclipse resource
- oldNames[t] = ((IResource)src).getFullPath().toOSString();
- }
- else if (src instanceof String){ // local os resource
- oldNames[t] = (String)src;
- }
- else {
- oldNames[t] = ""; // source resource unknown //$NON-NLS-1$
- }
- }
-
- if (_originatingViewer instanceof TreeViewer)
- {
- try
- {
- TreeViewer viewer = (TreeViewer) _originatingViewer;
-
- if (!(_target instanceof IHost)){ // not sure when we'd want to expand a host
- viewer.setExpandedState(_target, true);
- }
- }
- catch (Exception e)
- {
-
- }
- }
-
- if (doRefresh)
- {
- String operation = ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY;
- registry.fireRemoteResourceChangeEvent(operation, ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, _resultTgtObjects, _target, _targetSubSystem, oldNames, _originatingViewer);
- }
- else if (_target instanceof SystemScratchpad)
- {
- registry.fireEvent(new SystemResourceChangeEvent(_resultTgtObjects, ISystemResourceChangeEvents.EVENT_ADD_MANY, _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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDecoratingLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDecoratingLabelProvider.java
deleted file mode 100644
index 9d9eda810..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDecoratingLabelProvider.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDeferredTableTreeContentManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDeferredTableTreeContentManager.java
deleted file mode 100644
index cdb4cc0be..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDeferredTableTreeContentManager.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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 the initial implementation:
- * David McKnight.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.ui.operations.SystemDeferredTreeContentManager;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-public class SystemDeferredTableTreeContentManager extends
- SystemDeferredTreeContentManager {
-
- 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));
- }
- }
-
- /**
- * Return the IDeferredWorkbenchAdapter for element or the element if it is
- * an instance of IDeferredWorkbenchAdapter. If it does not exist return
- * null.
- *
- * @param element
- * @return IDeferredWorkbenchAdapter or <code>null</code>
- */
- protected IDeferredWorkbenchAdapter getAdapter(Object element)
- {
-
- if (element instanceof IContextObject)
- {
- element = ((IContextObject)element).getModelObject();
- }
- return super.getAdapter(element);
- }
-
-
- public class RelayoutView implements Runnable
- {
- public RelayoutView(Object parent)
- {
- }
-
- public void run()
- {
- _view.computeLayout();
- _view.refresh(true);
- //SystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- //registry.fireEvent(new SystemResourceChangeEvent(_parent, ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE, _parent));
- }
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java
deleted file mode 100644
index 3a003789d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemDropActionDelegate.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [254588] SystemDropActionDelegate performs refreshLocal too early
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-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.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.GenericMessages;
-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 IProjectNature)
- {
- target = ((IProjectNature)target).getProject();
- }
-
- if (target instanceof IResource)
- {
- resource = (IResource) target;
- localPath = resource.getLocation().toOSString();
- }
- else if (target instanceof String)
- {
- localPath = (String)target;
- }
- else if (target instanceof IAdaptable)
- {
- target = ((IAdaptable)target).getAdapter(IResource.class);
- if (target != null && target instanceof IResource)
- {
- resource = (IResource)target;
- localPath = resource.getLocation().toOSString();
- }
- }
-
-
- if (localPath != null)
- {
-
- if (data instanceof byte[])
- {
- byte[] result = (byte[]) data;
-
- // get the sources
- 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);
- }
-
- final SystemDNDTransferRunnable runnable = new SystemDNDTransferRunnable(target, srcObjects, null, SystemDNDTransferRunnable.SRC_TYPE_RSE_RESOURCE);
- final IResource lresource = resource;
-
- Job transferAndRefreshJob = new WorkspaceJob(GenericMessages.TransferOperation_message){
- public IStatus runInWorkspace(IProgressMonitor monitor){
- IStatus result = runnable.runInWorkspace(monitor);
-
- if (lresource != null){
- try {
- lresource.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- catch (CoreException e)
- {
- }
- }
- return result;
- }
- };
-
- transferAndRefreshJob.schedule();
-
- RSEUIPlugin.getTheSystemRegistryUI().clearRunnableContext();
- }
-
- 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 = RSECorePlugin.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.getTheSystemRegistryUI().getRunnableContext();
- if (irc != null)
- {
- return irc;
- }
-
- irc = new ProgressMonitorDialog(shell);
- RSEUIPlugin.getTheSystemRegistryUI().setRunnableContext(shell, irc);
- return irc;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java
deleted file mode 100644
index 076c5ad93..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemEmptyListAPIProviderImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-/**
- * 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
-{
-
-
- /**
- * 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;
- }
-
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritablePropertyData.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritablePropertyData.java
deleted file mode 100644
index 2453553da..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritablePropertyData.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.ui.view;
-import org.eclipse.rse.internal.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$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextCellEditor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextCellEditor.java
deleted file mode 100644
index e02669709..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextCellEditor.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.osgi.util.NLS;
-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(NLS.bind(getErrorMessage(), 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(NLS.bind(getErrorMessage(), value));
- }
- valueChanged(oldValidState, newValidState);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextPropertyDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextPropertyDescriptor.java
deleted file mode 100644
index 55ef23897..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemInheritableTextPropertyDescriptor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveHelpers.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveHelpers.java
deleted file mode 100644
index 5c3b52f8e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveHelpers.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveLayout.java
deleted file mode 100644
index 7a1183db0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPerspectiveLayout.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.view;
-
-
-
-import org.eclipse.rse.internal.ui.view.scratchpad.SystemScratchpadViewPart;
-import org.eclipse.rse.internal.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$
-
-
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPropertySheetForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPropertySheetForm.java
deleted file mode 100644
index 952a26fb3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemPropertySheetForm.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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.internal.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.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);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResolveFilterStringAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResolveFilterStringAPIProviderImpl.java
deleted file mode 100644
index 23b08dffe..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResolveFilterStringAPIProviderImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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
-
-
-} // end class SystemResolveFilterStringAPIProviderImpl
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java
deleted file mode 100644
index 3d4b23bb0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionForm.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * Kevin Doyle (IBM) - Added getSystemViewForm()
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API
- * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [232130] meaningless label provided for filter references
- * David McKnight (IBM) - [244430] [regression] Incorrect behaviour for SystemSelectRemoteFolderAction
- * David McKnight (IBM) - [267061] resource dialog/form to allow custom host combo label
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-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.SystemActionViewerFilter;
-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.ISystemResourceSelectionInputProvider;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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 ISystemResourceSelectionInputProvider _inputProvider;
- private SystemHostCombo _connectionCombo;
- private SystemViewForm _systemViewForm;
- private Composite _propertySheetContainer;
- private 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 _verbiage = null;
- protected Label verbiageLabel;
- private Composite _container;
-
- // history
- private HashMap _history;
-
- // outputs
- protected IHost outputConnection = null;
- protected Object[] outputObjects = null;
-
-
- public SystemResourceSelectionForm(Shell shell, Composite parent, Object caller,
- ISystemResourceSelectionInputProvider inputProvider,
- String verbiage,
- boolean multipleSelection,
- ISystemMessageLine msgLine)
- {
- _msgLine= msgLine;
- _history = new HashMap();
- _inputProvider = inputProvider;
- _multipleSelection = multipleSelection;
- _shell = shell;
- _verbiage = verbiage;
- 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.
- */
- public Object[] getSelectedObjects()
- {
- return outputObjects;
- }
-
- /**
- * Return the embedded System Tree object.
- * Will be null until createControls is called.
- */
- public ISystemTree getSystemTree()
- {
- return _systemViewForm.getSystemTree();
- }
-
- 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/VERBIAGE TEXT AT TOP
- verbiageLabel = SystemWidgetHelpers.createVerbiage(composite_prompts, _verbiage, gridColumns, false, PROMPT_WIDTH);
-
-
- boolean allowMultipleConnnections = _inputProvider.allowMultipleConnections();
- if (!allowMultipleConnnections)
- {
- //Label connectionLabel = SystemWidgetHelpers.createLabel(composite_prompts, _inputProvider.getSystemConnection().getHostName());
- }
- else
- {
- IRSESystemType[] systemTypes = _inputProvider.getSystemTypes();
- String category = _inputProvider.getCategory();
-
- if (systemTypes != null)
- {
- _connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, systemTypes, _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,
- SystemWidgetHelpers.getValidSystemTypes(null),
- _inputProvider.getSystemConnection(),
- _inputProvider.allowNewConnection());
-
- }
- _connectionCombo.addSelectionListener(new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent evt)
- {
- IHost connection = _connectionCombo.getHost();
- connectionChanged(connection);
- }}
- );
- _connectionCombo.listenToConnectionEvents(true);
- }
-
- _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.getSystemTree().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 getViewAdapter(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 setVerbiage(String verbiage)
- {
- _verbiage = verbiage;
- }
-
- public boolean setPreSelection(Object selection)
- {
- ISystemViewElementAdapter adapter = getViewAdapter(selection);
- if (adapter != null)
- {
- Object parent = adapter.getParent(selection);
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISubSystem ss = adapter.getSubSystem(selection);
- IHost connection = ss.getHost();
- if (_inputProvider.allowMultipleConnections())
- {
- if (_connectionCombo.getHost()!= connection || _inputProvider.getSystemConnection() != connection)
- {
- _connectionCombo.select(connection);
- }
- }
- List filterRefs = registry.findFilterReferencesFor(selection, ss, false);
-
- ISystemTree systemTree = _systemViewForm.getSystemTree();
- if (filterRefs.size() > 0)
- {
- ISystemFilterReference ref = (ISystemFilterReference)filterRefs.get(0);
- systemTree.expandTo(ref, selection);
-
- return true;
- }
- else
- {
- if (setPreSelection(parent))
- {
- systemTree.expandTo(parent, selection);
- 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)
- {
- String text = ""; //$NON-NLS-1$
- ISystemViewElementAdapter adapter = getViewAdapter(selection);
- if (selection instanceof ISystemFilterReference) {
- text = adapter.getText(selection);
- } else {
- 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._verbiage = message;
- if (verbiageLabel != null)
- verbiageLabel.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);
- }
-
-
- /**
- * Sets the label for the connection combo in the form
- */
- public void setConnectionComboLabel(String label)
- {
- if (_connectionCombo != null){
- _connectionCombo.setLabel(label);
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java
deleted file mode 100644
index f5aee241c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [252912] SystemRemoteFileDialog shows Local contents even when specifying a SystemType
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import java.util.ArrayList;
-import java.util.List;
-
-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.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-public abstract class SystemResourceSelectionInputProvider extends SystemAbstractAPIProvider
- implements ISystemResourceSelectionInputProvider
-{
- private IHost _connection = null;
- private boolean _onlyConnection = false;
- private boolean _allowNew = true;
- private IRSESystemType[] _systemTypes;
- private String _category = null;
-
- public SystemResourceSelectionInputProvider(IHost connection)
- {
- _connection = connection;
- }
-
- public SystemResourceSelectionInputProvider()
- {
- // choose random host
- IHost[] hosts = getValidHosts();
- if (hosts != null && hosts.length>0) {
- _connection = hosts[0];
- }
- }
-
- private boolean validHost(IHost host){
- if (_systemTypes != null){
- IRSESystemType hostType = host.getSystemType();
- for (int t = 0; t < _systemTypes.length; t++){
- IRSESystemType type = _systemTypes[t];
- if (hostType.equals(type)){
- return true;
- }
- }
- return false;
- }
- else {
- return true;
- }
- }
-
- private IHost[] getValidHosts() {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- IHost[] hosts = registry.getHosts();
-
- // make sure the hosts are valid for the specified system types
- if (_systemTypes != null){
- List hostList = new ArrayList();
- for (int i = 0; i < hosts.length; i++){
- IHost host = hosts[i];
- if (validHost(host)){
- hostList.add(host);
- }
- }
- return (IHost[])hostList.toArray(new IHost[hostList.size()]);
- }
- else {
- return hosts;
- }
- }
-
- 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 IRSESystemType[] getSystemTypes()
- {
- return _systemTypes;
- }
-
- public void setSystemTypes(IRSESystemType[] types)
- {
- _systemTypes = types;
- if (_connection != null){ // reset the connection if isn't valid
- if (!validHost(_connection)){
- _connection = null;
- }
- }
- }
-
- public Object[] getSystemViewRoots()
- {
- if (_connection == null)
- {
- IHost[] hosts = getValidHosts();
- if (hosts!=null && hosts.length!=0) {
- _connection = hosts[0];
- }
- }
- if (_connection != null){
- return getConnectionChildren(_connection);
- }
- else {
- return new Object[0];
- }
- }
-
- public boolean hasSystemViewRoots()
- {
- return false;
- }
-
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- if (selectedConnection != null)
- {
- ISubSystem ss = getSubSystem(selectedConnection);
- if (ss!=null) {
- return ss.getChildren();
- }
- }
- return new Object[0];
- }
-
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- if (selectedConnection != null)
- {
- ISubSystem ss = getSubSystem(selectedConnection);
- if (ss!=null) {
- return ss.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/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
deleted file mode 100644
index af65137d8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemSelectRemoteObjectAPIProviderImpl.java
+++ /dev/null
@@ -1,631 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.IRSESystemType;
-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.filters.SystemFilterUtil;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemSelectRemoteObjectAPIProvider;
-import org.eclipse.rse.ui.view.ISystemSelectRemoteObjectAPIProviderCaller;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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 ISystemSelectRemoteObjectAPIProvider
- {
-
-
- 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 subsystemConfigurationId;
- protected String subsystemConfigurationCategory;
- protected String filterSuffix;
- protected IRSESystemType[] 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 configId The subsystemConfigurationId to restrict connections and subsystems to
- * An alternative to factoryCategory. Specify only one, pass null for the other.
- * @param configCategory The subsystem configuration 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 configId, String configCategory,
- boolean showNewConnectionPrompt, IRSESystemType[] systemTypes)
- {
- super();
- this.subsystemConfigurationId = configId;
- this.subsystemConfigurationCategory = configCategory;
- 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 subsystemConfigurationId,if that has been set!
- *
- * @param systemTypes An array of system types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] 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 = getViewAdapter(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 filters to be exposed to the user. These will be shown to the
- * user when they expand a connection.
- */
- 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((IAdaptable)subsystem, new NullProgressMonitor());
- else
- {
- children = resolveFilterString(subsystem, filterString);
- }
-
- return checkForEmptyList(children, null, 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((IAdaptable)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);
- ISubSystem subsystem = null;
-
- if ((subsystems != null) && (subsystems.length > 0))
- {
- 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 = "+subsystemConfigurationId+", SSFCat = "+subsystemConfigurationCategory); //$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++)
- {
- ISystemFilter quickFilter = quickFilters[idx];
- children[idx] = SystemFilterUtil.makeSimpleFilter(quickFilter.getName());
- quickFilter.clone((ISystemFilter)children[idx]);
- ((ISystemFilter)children[idx]).setSubSystem(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].isTransient()))
- {
- quickFilters[idx].setSubSystem(subsystem);
- }
- }
-
- children = quickFilters;
- }
- }
-
- else if ((filterString == null) || (filterSuffix != null))
- {
- children = subsystem.getChildren();
- }
- else
- {
- children = resolveFilterString(subsystem, filterString);
- }
- }
-
- return checkForEmptyList(children, subsystem, 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 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 (subsystemConfigurationId != null) {
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
- conns = sr.getHostsBySubSystemConfiguration(config);
- }
- else if (subsystemConfigurationCategory != null)
- conns = sr.getHostsBySubSystemConfigurationCategory(subsystemConfigurationCategory);
- 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 checkForEmptyList(children, null, false);
- }
-
- /**
- * Given a connection, return the subsystem(s) appropriate for the given
- * subsystem configuration id or category
- */
- protected ISubSystem[] getSubSystems(IHost selectedConnection)
- {
- ISubSystem[] subsystems = null;
- if (subsystemConfigurationId != null) {
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(subsystemConfigurationId);
- if (config==null)
- subsystems = new ISubSystem[0];
- else
- subsystems = config.getSubSystems(selectedConnection, true);
- }
- else if (subsystemConfigurationCategory != null) {
- subsystems = sr.getSubSystemsBySubSystemConfigurationCategory(subsystemConfigurationCategory, 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, new NullProgressMonitor());
- } catch (InterruptedException exc)
- {
- if (cancelledObject == 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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/internal/ui/view/SystemTableTreeView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java
deleted file mode 100644
index 321df29dc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeView.java
+++ /dev/null
@@ -1,2057 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste with Search view open
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Assert;
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-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.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.internal.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ContextObject;
-import org.eclipse.rse.ui.view.IContextObject;
-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.SystemAdapterHelpers;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-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.Item;
-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.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
- //FIXEM change TreeViewer to TableTreeViewer when Eclipse fixes SWT viewer
- //extends TableTreeViewer
- extends TreeViewer
- implements IMenuListener,
- ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget,
- ISystemResourceChangeListener, ISystemRemoteChangeListener,
- ISystemShellProvider, 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 = getViewAdapter(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 = getViewAdapter(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 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 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);
-
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.addSystemResourceChangeListener(this);
- sr.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 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 getViewAdapter(Object obj)
- {
- return SystemAdapterHelpers.getViewAdapter(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 = getViewAdapter(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 getViewAdapter(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;
- if (nameDescriptor != null)
- {
- 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[] dragtransfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), FileTransfer.getInstance(), EditorInputTransfer.getInstance()};
- Transfer[] droptransfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), FileTransfer.getInstance(), EditorInputTransfer.getInstance()};
-
- addDragSupport(ops, dragtransfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, droptransfers, 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.core.events.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);
- List remoteResourceNames = null;
- if (remoteResource instanceof List)
- {
- remoteResourceNames = (List) remoteResource;
- remoteResource = remoteResourceNames.get(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 = getViewAdapter(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 = getViewAdapter(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.getOldNames()[0]; // right now we're assuming that a rename event is for a single resource
- 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 = getViewAdapter(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
- {
- ISystemViewElementAdapter ra = getViewAdapter(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 = getViewAdapter(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 getViewAdapterForContents()
- {
- SystemTableTreeViewProvider provider = (SystemTableTreeViewProvider) getContentProvider();
- if (provider != null)
- {
- Object[] children = provider.getChildren(getInput());
- if (children != null && children.length > 0)
- {
- IAdaptable child = (IAdaptable) children[0];
- return getViewAdapter(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);
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.removeSystemResourceChangeListener(this);
- sr.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;
- }
-
- /**
- * 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)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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 = getViewAdapter(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.core.events.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)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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 = getViewAdapter(element);
- Object parentElement = getParentForContent(element);
-
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null)
- oldFullName = remoteAdapter.getAbsoluteName(element);
- // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++], null);
- if (ok)
- {
- if (remoteAdapter != null) {
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), new String[]{oldFullName}, this);
- }
- else {
- sr.fireEvent(new org.eclipse.rse.core.events.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 ISystemRemoteElementAdapter for the given
- * object. Returns null if this object is 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;
- }
-
- /**
- * Returns the implementation of IRemoteObjectIdentifier for the given
- * object. Returns null if this object is not adaptable to this.
- *
- * @deprecated should use {@link #getViewAdapter(Object)} since
- * IRemoteObjectIdentifier is not defined in the adapter factories
- */
- protected IRemoteObjectIdentifier getRemoteObjectIdentifier(Object o)
- {
- return (IRemoteObjectIdentifier)((IAdaptable)o).getAdapter(IRemoteObjectIdentifier.class);
- }
-
- /**
- * 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 = getViewAdapter(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);
-
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- {
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
- // OPEN IN NEW PERSPECTIVE ACTION... if (fromSystemViewPart && showOpenViewActions())
- if (!_selectionIsRemoteObject)
- {
- //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);
-
- }
-
-
- }
- }
-
- /**
- * 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 = getViewAdapter(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 = getViewAdapter(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();
- }
- }
- }
-
- /**
- * Overridden so that we can pass a wrapper IContextObject into the provider to get children instead
- * of the model object, itself
- */
- protected void createChildren(final Widget widget)
- {
- if (widget instanceof TreeItem)
- {
- final Item[] tis = getChildren(widget);
- if (tis != null && tis.length > 0) {
- Object data = tis[0].getData();
- if (data != null) {
- return; // children already there!
- }
- }
-
- BusyIndicator.showWhile(widget.getDisplay(), new Runnable() {
- public void run() {
- // fix for PR 1FW89L7:
- // don't complain and remove all "dummies" ...
- if (tis != null) {
- for (int i = 0; i < tis.length; i++) {
- if (tis[i].getData() != null) {
- disassociate(tis[i]);
- Assert.isTrue(tis[i].getData() == null,
- "Second or later child is non -null");//$NON-NLS-1$
-
- }
- tis[i].dispose();
- }
- }
- Object d = widget.getData();
- if (d != null)
- {
- Object parentElement = getContextObject((TreeItem)widget);
- Object[] children = getSortedChildren(parentElement);
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- createTreeItem(widget, children[i], -1);
- }
- }
- }
- }
-
- });
- }
- else
- {
- super.createChildren(widget);
- }
- }
-
-
- /**
- * Get the containing filter reference for an item
- * @param item the item to get the filter reference for
- * @return the filter reference
- */
- public ISystemFilterReference getContainingFilterReference(TreeItem item)
- {
- Object data = item.getData();
- if (data instanceof ISystemFilterReference)
- {
- return (ISystemFilterReference)data;
- }
- else
- {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- {
- return getContainingFilterReference(parent);
- }
- else
- {
- Object input = getInput();
- if (input instanceof ISystemFilterReference)
- {
- return (ISystemFilterReference)input;
- }
- else
- {
- return null;
- }
- }
- }
- }
-
- /**
- * Get the containing subsystem from an item
- * @param item the item to get the subsystem for
- * @return the subsystem
- */
- public ISubSystem getContainingSubSystem(TreeItem item)
- {
- Object data = item.getData();
- if (data instanceof ISubSystem)
- {
- return (ISubSystem)data;
- }
- else
- {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- {
- return getContainingSubSystem(parent);
- }
- else
- {
- Object input = getInput();
- if (input instanceof ISubSystem)
- {
- return (ISubSystem)input;
- }
- else
- {
- return null;
- }
- }
- }
- }
-
- /**
- * Get the context object from a tree item
- * @param item the item to get the context for
- * @return the context object
- */
- public IContextObject getContextObject(TreeItem item)
- {
- Object data = item.getData();
- ISystemFilterReference filterReference = getContainingFilterReference(item);
- if (filterReference != null)
- {
- return new ContextObject(data, filterReference.getSubSystem(), filterReference);
- }
- else
- {
- ISubSystem subSystem = getContainingSubSystem(item);
- if (subSystem != null)
- {
- return new ContextObject(data, subSystem);
- }
- else
- {
- return new ContextObject(data);
- }
- }
- }
-
- /**
- * Overrides the standard viewer method to get the model object from the context object
- */
- public void add(Object parentElementOrTreePath, Object[] childElements) {
- Assert.isNotNull(parentElementOrTreePath);
- assertElementsNotNull(childElements);
-
- if (parentElementOrTreePath instanceof IContextObject)
- {
- parentElementOrTreePath = ((IContextObject)parentElementOrTreePath).getModelObject();
- }
- super.add(parentElementOrTreePath, childElements);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java
deleted file mode 100644
index bd0b1d177..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableTreeViewProvider.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.NullProgressMonitor;
-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.model.ISystemContainer;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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((IAdaptable)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.getViewAdapter(object, _viewer);
- }
- else
- {
- result = SystemAdapterHelpers.getViewAdapter(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
- {
- Object element = object;
- // object could either be a model object or a wrapper IContextObject
- if (object instanceof IContextObject)
- {
- element = ((IContextObject)object).getModelObject();
- }
- {
-
- ISystemViewElementAdapter adapter = getAdapterFor(element);
- adapter.setViewer(_viewer);
-
-
-
- if (adapter.hasChildren((IAdaptable)element))
- {
- if (supportsDeferredQueries())
- {
- if (manager != null)
- {
- ISubSystem ss = adapter.getSubSystem(object);
- if (ss != null && adapter.supportsDeferredQueries(ss))
- {
- // if (ss.isConnected())
- {
-
- results = manager.getChildren(object);
- }
- }
- }
- }
- else
- {
- if (object instanceof IContextObject)
- {
- results = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
- }
- else
- {
- results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
- }
- }
- 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/internal/ui/view/SystemTableViewColumnManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java
deleted file mode 100644
index 7f875bfd3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewColumnManager.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import java.util.HashMap;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.view.ISystemTableViewColumnManager;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-
-public class SystemTableViewColumnManager implements ISystemTableViewColumnManager
-{
- 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);
- String historyKey = getHistoryKey(adapter);
- String[] history = new String[descriptors.length];
- for (int i = 0; i < descriptors.length; i++)
- {
- history[i] = descriptors[i].getId().toString();
- }
-
- SystemPreferencesManager.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 the visible descriptors
- */
- 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();
-
- String historyKey = getHistoryKey(adapter);
- String[] history = SystemPreferencesManager.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];
- if (uniqueDescriptors != null)
- {
- 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/internal/ui/view/SystemTableViewFilter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewFilter.java
deleted file mode 100644
index 28017c115..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewFilter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java
deleted file mode 100644
index ee454a2fb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java
+++ /dev/null
@@ -1,2022 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - 146339 Added refresh action graphic.
- * David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [189005] Changed setFocus() to setInput to SystemRegistryUI
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [191288] Up To Action doesn't go all the way back to the connections
- * Xuan Chen (IBM) - [192716] Refresh Error in Table View after Renaming folder shown in table
- * Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location
- * Kevin Doyle (IBM) - [193394] After Deleting the folder shown in Table get an error
- * Kevin Doyle (IBM) - [197971] NPE when table has no input and doing commands in Systems View
- * Martin Oberhuber (Wind River) - [199585] Fix NPE during testConnectionRemoval unit test
- * David McKnight (IBM) - [187543] use view filter to only show containers for set input dialog
- * David McKnight (IBM) - [210229] table refresh needs unique table-specific tooltip-text
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Xuan Chen (IBM) - [225685] NPE when running archive testcases
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API type
- * Martin Oberhuber (Wind River) - [228774] Improve ElementComparer Performance
- * David McKnight (IBM) - [229116] NPE in when editing remote file in new workspace
- * David McKnight (IBM) - [231867] TVT34:TCT196: PLK: "Subset" window too narrow
- * David Dykstal (IBM) - [231867] TVT34:TCT196: PLK: "Subset" window too narrow
- * David Dykstal (IBM) - [188150] adding "go up one level" tooltip
- * David McKnight (IBM) - [232320] remote system details view restore problem
- * David McKnight (IBM) - [233578] Promptable Filter Displayed 3 times when clicking cancel
- * David Dykstal (IBM) - [233678] title string is constructed by concatenation, should be substituted
- * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
- * David McKnight (IBM) - [260346] RSE view for jobs does not remember resized columns
-*******************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-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.Job;
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSECallback;
-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.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.core.model.SystemRegistry;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-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.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.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemTableViewColumnManager;
-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.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.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.Table;
-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.views.properties.IPropertyDescriptor;
-import org.osgi.framework.Bundle;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Comment goes here
- */
-public class SystemTableViewPart extends ViewPart
- implements ISelectionListener, ISelectionChangedListener,
- ISystemMessageLine, ISystemShellProvider,
- 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_GOUPLEVEL_TOOLTIP, 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;
- setEnabled(true);
- }
- else
- {
- _parent = null;
- setEnabled(false);
- }
- }
- 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_TABLE_LABLE,
- //RSEUIPlugin.getDefault().getImageDescriptor(ICON_SYSTEM_REFRESH_ID));
- RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID));
- setToolTipText(SystemResources.ACTION_REFRESH_TABLE_TOOLTIP);
- }
-
- public void run()
- {
- Object inputObject = _viewer.getInput();
- if (inputObject instanceof ISystemContainer)
- {
- ((ISystemContainer)inputObject).markStale(true);
- }
- ((SystemTableViewProvider) _viewer.getContentProvider()).flushCache();
- ISystemRegistry registry = RSECorePlugin.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);
-
- SystemActionViewerFilter filter = new SystemActionViewerFilter();
- Class[] types = {Object.class};
- filter.addFilterCriterion(types, "hasChildren", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- dlg.setViewerFilter(filter);
-
- Object inputObject = _viewer.getInput();
- if (inputObject == null)
- {
- inputObject = RSECorePlugin.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);
- textData3.widthHint = 150;
- _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 Job
- {
- private IMemento _rmemento;
- public RestoreStateRunnable(IMemento memento)
- {
- super("Restore RSE Table"); //$NON-NLS-1$
- _rmemento = memento;
- }
-
- public IStatus run(final IProgressMonitor monitor)
- {
- try {
- IStatus wstatus = RSECorePlugin.waitForInitCompletion();
- if (!wstatus.isOK() && wstatus.getSeverity() == IStatus.ERROR){
- return wstatus;
- }
- }
- catch (InterruptedException e){
- return Status.CANCEL_STATUS;
- }
-
-
- final IMemento memento = _rmemento;
-
- // set the cached column widths (for later use)
- String columnWidths = memento.getString(TAG_TABLE_VIEW_COLUMN_WIDTHS_ID);
- if (columnWidths != null)
- {
- if (columnWidths.indexOf(";") > 0){ //$NON-NLS-1$
- // matches new format for column width memento
- // new code - as of RSE 3.1
- HashMap cachedColumnWidths = new HashMap();
-
- // parse out set of columns
- String[] columnSets = columnWidths.split(";"); //$NON-NLS-1$
- for (int i = 0; i < columnSets.length; i++){
- String columnSet = columnSets[i];
-
- // parse out columns for set
- String[] pair = columnSet.split("="); //$NON-NLS-1$
- String key = pair[0];
-
- // parse out widths
- String widthArray = pair[1];
- String[] widthStrs = widthArray.split(","); //$NON-NLS-1$
-
- int[] widths = new int[widthStrs.length];
- for (int w = 0; w < widths.length; w++){
- widths[w] = Integer.parseInt(widthStrs[w]);
- }
-
- cachedColumnWidths.put(key, widths);
- _viewer.setCachedColumnWidths(cachedColumnWidths);
- }
- }
- }
-
-
- 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);
- final String filterID = memento.getString(TAG_TABLE_VIEW_FILTER_ID);
- final String objectID = memento.getString(TAG_TABLE_VIEW_OBJECT_ID);
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
-
- Object input = null;
- if (subsystemId == null)
- {
- if (connectionId != null)
- {
-
- ISystemProfile profile = registry.getSystemProfile(profileId);
- input = registry.getHost(profile, connectionId);
- }
- else
- {
- // 191288 we now use registry instead of registry ui as input
- input = registry;
- }
- }
- else
- {
- // from the subsystem ID determine the profile, system and subsystem
- final ISubSystem subsystem = registry.getSubSystem(subsystemId);
-
- if (subsystem != null) {
- if (filterID == null && objectID == null) {
- input = subsystem;
- }
- else {
- if (!subsystem.isConnected()) {
- try {
- final Object finInput = input;
- subsystem.connect(false, new IRSECallback() {
- public void done(IStatus status, Object result) {
- // this needs to be done on the main thread
- // so doing an asynchExec()
- Display.getDefault().asyncExec(new RunOnceConnectedOnMainThread(memento, finInput, subsystem, filterID, objectID));
- }
- });
- return Status.OK_STATUS;
- }
- catch (Exception e) {
- return Status.CANCEL_STATUS;
- }
- }
- return runOnceConnected(monitor, memento, input, subsystem, filterID, objectID);
- } // end else
- } // end if (subsystem != null)
- } // end else
- return runWithInput(monitor, input, memento);
- }
-
- private class RunOnceConnectedOnMainThread implements Runnable
- {
- private IMemento _inmemento;
- private Object _input;
- private ISubSystem _subSystem;
- private String _filterID;
- private String _objectID;
- public RunOnceConnectedOnMainThread(IMemento memento, Object input, ISubSystem subSystem, String filterID, String objectID)
- {
- _inmemento = memento;
- _input = input;
- _subSystem = subSystem;
- _filterID = filterID;
- _objectID = objectID;
- }
-
- public void run()
- {
- runOnceConnected(new NullProgressMonitor(), _inmemento, _input, _subSystem, _filterID, _objectID);
- }
- }
-
- public IStatus runOnceConnected(IProgressMonitor monitor, IMemento memento, Object input, ISubSystem subsystem, String filterID, String objectID)
- {
- if (subsystem.isConnected()) {
- if (filterID != null) {
- try {
- input = subsystem.getObjectWithAbsoluteName(filterID, monitor);
- }
- catch (Exception e) {
- //ignore
- }
- }
- else {
- if (objectID != null) {
- try {
- input = subsystem.getObjectWithAbsoluteName(objectID, monitor);
- }
- catch (Exception e) {
- return Status.CANCEL_STATUS;
- }
- }
- } // end else
- } // end if (subsystem.isConnected)
- return runWithInput(monitor, input, memento);
- }
-
- public IStatus runWithInput(IProgressMonitor monitor, Object input, IMemento memento)
- {
- if (input != null && input instanceof IAdaptable)
- {
- _mementoInput = (IAdaptable) input;
- if (_mementoInput != null && _viewer != null)
- {
- // set input needs to be run on the main thread
- Display.getDefault().asyncExec(new Runnable()
- {
- public void run(){
- setInput(_mementoInput);
- }
- });
- }
- }
- return Status.OK_STATUS;
- }
-
- }
-
-
-
- private class SelectColumnsAction extends BrowseAction
- {
-
- class SelectColumnsDialog extends SystemPromptDialog
- {
- private ISystemViewElementAdapter _adapter;
- private ISystemTableViewColumnManager _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, ISystemTableViewColumnManager columnManager)
- {
- super(shell, SystemResources.RESID_TABLE_SELECT_COLUMNS_LABEL);
- setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_TOOLTIP);
- _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()
- {
- ISystemTableViewColumnManager 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(RSECorePlugin.getTheSystemRegistry());
- }
- }
-
- _viewer.getControl().setFocus();
- }
-
- public SystemTableView getViewer()
- {
- return _viewer;
- }
-
- public Viewer getRSEViewer()
- {
- return _viewer;
- }
-
- public void createPartControl(Composite parent)
- {
- //Want to register SystemTableViewPart as resouce change listener first, since it may update the _inputObject
- //of the SystemTableView, which will affect the behaviour of the resource change event handling of SystemTableView.
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.addSystemResourceChangeListener(this);
- registry.addSystemRemoteChangeListener(this);
-
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- _viewer = new SystemTableView(table, 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
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().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);
-
-
- SystemWidgetHelpers.setHelp(_viewer.getControl(), RSEUIPlugin.HELPPREFIX + "sysd0000"); //$NON-NLS-1$
-
- getSite().registerContextMenu(_viewer.getContextMenuManager(), _viewer);
- getSite().registerContextMenu(ISystemContextMenuConstants.RSE_CONTEXT_MENU, _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);
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.removeSystemRemoteChangeListener(this);
- registry.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)
- {
- if (adapter.isPromptable(element))
- {
- adapter.getChildren((IAdaptable)element, new NullProgressMonitor());
- }
- else if (adapter.hasChildren((IAdaptable)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);
- String title = MessageFormat.format(SystemResources.SystemTableViewPart_title, new String[] {type, name});
- setContentDescription(title);
- }
- }
- }
-
- /**
- * 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:
- removeFromHistory(event.getSource());
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- Object[] multi = event.getMultiSource();
- for (int i = 0; i < multi.length; i++) {
- // Update the history to remove all references to object
- removeFromHistory(multi[i]);
- }
- break;
- default:
- break;
- }
- }
-
- protected void removeFromHistory(Object c)
- {
- // if the object is in history, remove it since it's been deleted
- // and remove all objects whose parent is the deleted object
- for (int i = 0; i < _browseHistory.size(); i++)
- {
- HistoryItem hist = (HistoryItem)_browseHistory.get(i);
- Object historyObj = hist.getObject();
- if (historyObj == c || historyObj.equals(c) || isParentOf(c,historyObj))
- {
- _browseHistory.remove(hist);
- if (_browsePosition >= i)
- {
- _browsePosition--;
- if (_browsePosition < 0)
- {
- _browsePosition = 0;
- }
- }
- // Since we are removing an item the size decreased by one so i
- // needs to decrease by one or we will skip elements in _browseHistory
- i--;
- }
- }
-
- if (_currentItem != null) {
- Object currentObject = _currentItem.getObject();
-
- // Update the input of the viewer to the closest item in the history
- // that still exists if the current viewer item has been deleted.
- if (c == currentObject || c.equals(currentObject) || isParentOf(c,currentObject))
- {
- if (_browseHistory.size() > 0)
- {
- _currentItem = (HistoryItem)_browseHistory.get(_browsePosition);
- setInput(_currentItem.getObject(), null, false);
- }
- else
- {
- _currentItem = null;
- setInput(RSECorePlugin.getTheSystemRegistry(), null, true);
- }
- }
- }
- }
-
- protected boolean isParentOf(Object parent, Object child) {
- if (parent instanceof IAdaptable && child instanceof IAdaptable) {
- ISystemDragDropAdapter adapterParent = (ISystemDragDropAdapter) ((IAdaptable)parent).getAdapter(ISystemDragDropAdapter.class);
- ISystemDragDropAdapter adapterChild = (ISystemDragDropAdapter) ((IAdaptable)child).getAdapter(ISystemDragDropAdapter.class);
- // Check that both parent and child are from the same SubSystem
- if (adapterParent != null && adapterChild != null &&
- adapterParent.getSubSystem(parent) == adapterChild.getSubSystem(child)) {
- String parentAbsoluteName = adapterParent.getAbsoluteName(parent);
- String childAbsoluteName = adapterChild.getAbsoluteName(child);
- // Check if the child's absolute name starts with the parents absolute name
- // if it does then parent is the parent of child.
- if(childAbsoluteName != null && childAbsoluteName.startsWith(parentAbsoluteName)) {
- return true;
- }
- }
- }
- return 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.core.events.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
- Object remoteResource = event.getResource();
- java.util.List remoteResourceNames = null;
- if (remoteResource instanceof java.util.List)
- {
- remoteResourceNames = (java.util.List) remoteResource;
- remoteResource = remoteResourceNames.get(0);
- }
-
- Object child = event.getResource();
-
-
- Object input = _viewer.getInput();
-
- String[] oldNames = event.getOldNames();
- // right now assuming only one resource
- String oldName = (oldNames == null) ? null : oldNames[0];
- boolean referToSameObject = false;
- if (input != null && oldName != null){
- referToSameObject = SystemRegistry.isSameObjectByAbsoluteName(input, null, child, oldName);
- }
-
- if (input == child || child instanceof java.util.List || referToSameObject)
- {
- 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 java.util.List)
- {
- java.util.List list = (java.util.List)child;
- for (int v = 0; v < list.size(); v++)
- {
- Object c = list.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(RSECorePlugin.getTheSystemRegistry());
- rsr.setSystem(true);
- rsr.schedule();
-
- }
-
- /**
- * 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.getRememberState())
- {
- _memento = memento;
-
- }
- }
-
- /**
- * Method declared on IViewPart.
- */
- public void saveState(IMemento memento)
- {
- super.saveState(memento);
-
- if (!SystemPreferencesManager.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 = RSECorePlugin.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);
- }
- }
- }
-
-
-
- // new code - as of RSE 3.1
- _viewer.inputChanged(input, input); // make sure the latest widths are stored
- Map cachedColumnWidths = _viewer.getCachedColumnWidths();
- StringBuffer columnWidths = new StringBuffer();
- Iterator keyIter = cachedColumnWidths.keySet().iterator();
- while (keyIter.hasNext()){
- String key = (String)keyIter.next();
- int[] widths = (int[])cachedColumnWidths.get(key);
-
- columnWidths.append(key);
- columnWidths.append('=');
-
- for (int w = 0; w < widths.length; w++){
- columnWidths.append(widths[w]);
- if (w != widths.length - 1){
- columnWidths.append(',');
- }
- }
-
- // always append this, even with last item
- columnWidths.append(';');
- }
- memento.putString(TAG_TABLE_VIEW_COLUMN_WIDTHS_ID, columnWidths.toString());
- }
- }
- }
-
-
-// -------------------------------
- // 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/internal/ui/view/SystemTableViewSorter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewSorter.java
deleted file mode 100644
index beb554584..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewSorter.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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.rse.ui.view.ISystemViewElementAdapter;
-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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java
deleted file mode 100644
index d1ba7aed3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTestFilterStringAPIProviderImpl.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-/**
- * 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
-{
-
-
- protected String filterString = null;
- protected ISubSystem subsystem = 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;
- }
-
- /**
- * 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, new NullProgressMonitor());
- children = checkForEmptyList(children, null, true);
- } catch (InterruptedException exc)
- {
- children = getCancelledMessageObject();
- } catch (Exception exc)
- {
- children = getFailedMessageObject();
- 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;
- }
-
-
- // ----------------------------------
- // OUR OWN METHODS...
- // ----------------------------------
-
-} \ No newline at end of file
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 8f4a26def..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemView.java
+++ /dev/null
@@ -1,6735 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * Kevin Doyle (IBM) - [180875] - Removed part of double click listener that opens files
- * 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()
- * Uwe Stieber (Wind River) - [172492] Use SafeTreeViewer
- * - [177537] [api] Dynamic system type provider need a hook to add dynamic system type specific menu groups
- * - Several bugfixes.
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * Martin Oberhuber (Wind River) - [186964] Fix adapter actions for multiselect, and and NPE
- * Martin Oberhuber (Wind River) - [186991] Avoid remote refresh if no element is remote
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Kevin Doyle (IBM) - [194602] handleDoubleClick does expand/collapse on treepath instead of element
- * David McKnight (IBM) - [194897] Should not remote refresh objects above subsystem.
- * Kevin Doyle - [193380] Deleting connection Refresh's Entire Remote Systems view
- * Kevin Doyle - [195537] Move ElementComparer to Separate File
- * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
- * David McKnight (IBM) - [187205] Prevented expansion of non-expanded on remote refresh
- * David McKnight (IBM) - [196930] Don't add the connection when it's not supposed to be shown
- * Tobias Schwarz (Wind River) - [197484] Provide ContextObject for queries on all levels
- * David McKnight (IBM) - [196662] Avoid main thread query to check exists when remote refreshing
- * Kevin Doyle (IBM) - [198576] Renaming a folder directly under a Filter doesn't update children
- * Kevin Doyle (IBM) - [196582] Deprecated getRemoteObjectIdentifier
- * Martin Oberhuber (Wind River) - [198650] Fix assertion when restoring workbench state
- * Martin Oberhuber (Wind River) - [183176] Fix "widget is disposed" during Platform shutdown
- * David McKnight (IBM) - [204684] CheckExistsJob used for determining if a remote object exists after a query of it's children
- * David McKnight (IBM) - [205592] CheckExistsJob should use the context model object to get adapter
- * David McKnight (IBM) - [205819] Need to use input stream copy when EFS files are the src
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [199424] api to create tree items after query complete
- * David McKnight (IBM) - [187711] expandTo to handle filters specially
- * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
- * David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile
- * David McKnight (IBM) - [224380] system view should only fire property sheet update event when in focus
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David Dykstal (IBM) - [225911] Exception received after deleting a profile containing a connection
- * David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
- * David McKnight (IBM) - [231903] TVT34:TCT198: PLK: problems with "Show prompt" checkbox and "New connection prompt"
- * David McKnight (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click
- * David McKnight (IBM) - [233570] ClassCastException when moving filter after "go into" action
- * David Dykstal (IBM) - [233530] Backing out previous change for this bug
- * David McKnight (IBM) - [223461] [Refresh][api] Refresh expanded folder under filter refreshes Filter
- * David McKnight (IBM) - [236874] NPE upon selecting an item that is not associated with subsystem
- * David McKnight (IBM) - [238363] Performance improvement for refresh in system view.
- * David McKnight (IBM) - [241722] New -> File doesn't select the newly created file
- * David McKnight (IBM) - [187739] [refresh] Sub Directories are collapsed when Parent Directory is Refreshed on Remote Systems
- * David Dykstal (IBM) - [233530] Not Prompted on Promptable Filters after using once by double click
- * David McKnight (IBM) - [241744] Refresh collapse low level nodes which is expended before.
- * David McKnight (IBM) - [249245] not showing inappropriate popup actions for: Refresh, Show In Table, Go Into, etc.
- * David McKnight (IBM) - [251625] Widget disposed exception when renaming/pasting a folder
- * David McKnight (IBM) - [257721] Doubleclick doing special handling and expanding
- * David McKnight (IBM) - [190805] [performance][dstore] Right-click > Disconnect on a dstore connection is slow and spawns many Jobs
- * David McKnight (IBM) - [190001] [refresh] Avoid unnecessary duplicate queries during drag&drop to filter
- * Martin Oberhuber (Wind River) - [276195] Avoid unnecessary selectionChanged when restoring connections
- * David McKnight (IBM) - [277328] Unhandled Event Loop Exception When Right-Clicking on "Pending..." Message
- * David McKnight (IBM) - [283793] [dstore] Expansion indicator(+) does not reset after no connect
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.resources.WorkspaceJob;
-import org.eclipse.core.runtime.Assert;
-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.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.IContentProvider;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.IPostSelectionProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.ITreePathContentProvider;
-import org.eclipse.jface.viewers.ITreeSelection;
-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.TreePath;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.IRSECallback;
-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.ISystemViewInputProvider;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingGoToAction;
-import org.eclipse.rse.internal.ui.actions.SystemCollapseAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemExpandAction;
-import org.eclipse.rse.internal.ui.actions.SystemImportConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.internal.ui.actions.SystemShowInMonitorAction;
-import org.eclipse.rse.internal.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
-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.ISystemMessages;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.model.ISystemPromptableObject;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.model.SystemRemoteElementResourceSet;
-import org.eclipse.rse.ui.model.SystemResourceChangeEventUI;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemSelectAllTarget;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.custom.BusyIndicator;
-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.Display;
-import org.eclipse.swt.widgets.Event;
-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.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.internal.progress.ProgressMessages;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.part.ResourceTransfer;
-import org.eclipse.ui.progress.PendingUpdateAdapter;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
-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 SafeTreeViewer
- implements ISystemTree, ISystemShellProvider,
- ISystemResourceChangeListener, ISystemRemoteChangeListener,
- IMenuListener, IPostSelectionProvider,
- ISystemDeleteTarget, ISystemRenameTarget, ISystemSelectAllTarget,
- ISelectionChangedListener, ITreeViewerListener
-{
-
- // for deferred queries
- class ExpandRemoteObjects implements IRSECallback {
- private List _toExpand;
-
- public ExpandRemoteObjects(List toExpand){
- _toExpand = toExpand;
- }
-
- public void done(IStatus status, Object result) {
-
- if (Display.getCurrent() != null){ // on main thread
- execute();
- }
- else {
- // need to run this code on main thread
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
- {
- public void run() {
- execute();
- }
- });
- }
- }
-
- private void execute()
- {
- // expand each previously expanded sub-node, recursively
- for (int idx = 0; idx < _toExpand.size(); idx++) {
- ExpandedItem itemToExpand = (ExpandedItem) _toExpand.get(idx);
- if (itemToExpand.isRemote()) {
- // find remote item based on its original name and unchanged root parent
- Item item = null;
- item = findFirstRemoteItemReference(itemToExpand.remoteName, itemToExpand.subsystem, itemToExpand.parentItem);
-
- // if found, re-expand it
- if (item != null && !item.isDisposed()) {
- IRSECallback callback = getCallbackForSubChildren(itemToExpand, _toExpand);
- createChildren(item, callback);
- ((TreeItem) item).setExpanded(true);
- }
- } else if (itemToExpand.data!=null) {
- setExpandedState(itemToExpand.data, true);
- }
- }
- }
-
- private IRSECallback getCallbackForSubChildren(ExpandedItem remoteParent, List itemsToExpand){
- List subChildren = new ArrayList();
-
-
- String parentName = remoteParent.remoteName;
- Object parent = remoteParent.data;
- String absoluteParentName = remoteParent.remoteAdapter.getAbsoluteName(parent);
-
- for (int i = 0; i < itemsToExpand.size(); i++){
- ExpandedItem itemToExpand = (ExpandedItem) itemsToExpand.get(i);
- if (parentName.equals(itemToExpand.remoteName)){
- // same item
- }
- else if (itemToExpand.remoteName != null && itemToExpand.remoteName.startsWith(parentName)){
- // child item
- subChildren.add(itemToExpand);
- }
- else {
- // some objects might need explicit comparison
- Object object = itemToExpand.data;
- ISystemRemoteElementAdapter adapter = itemToExpand.remoteAdapter;
- String childParentName = adapter.getAbsoluteParentName(object);
- if (absoluteParentName.equals(childParentName)){
- subChildren.add(itemToExpand);
- }
- }
- }
-
- if (subChildren.size() > 0){
- return new ExpandRemoteObjects(subChildren);
- }
- else {
- return null;
- }
- }
- }
- protected Shell shell; // shell hosting this viewer: TODO can be removed
- 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 initialized on demand:
- // should be accessed by getters only
- private SystemNewConnectionAction _newConnectionAction;
- private SystemImportConnectionAction _importConnectionAction;
- private SystemRefreshAction _refreshAction;
- private PropertyDialogAction _propertyDialogAction;
- private SystemCollapseAction _collapseAction; // defect 41203
- private SystemExpandAction _expandAction; // defect 41203
- private SystemOpenExplorerPerspectiveAction _openToPerspectiveAction;
-
- private SystemShowInTableAction _showInTableAction;
- private SystemShowInMonitorAction _showInMonitorAction;
- private GoIntoAction _goIntoAction;
- private SystemCascadingGoToAction _gotoActions;
- // global actions: to be accessed by getters only
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- private SystemCommonDeleteAction _deleteAction; // for global delete menu item
- private SystemCommonRenameAction _renameAction; // for common rename menu item
- private SystemCommonSelectAllAction _selectAllAction; // for common Ctrl+A select-all
- // special flags needed when building popup menu, set after examining selections
- protected boolean selectionShowPropertiesAction;
- 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;
- // 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;
-
- protected boolean _allowAdapterToHandleDoubleClick = true;
-
- /**
- * 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, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); // DKM - putting style here to avoid SWT.BORDER (defect 168972)
- assert shell == parent.getShell();
- this.shell = shell;
- this.inputProvider = inputProvider;
- 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);
- assert shell == parent.getShell();
- this.shell = shell;
- this.inputProvider = inputProvider;
- 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);
- assert shell == parent.getShell();
- this.shell = shell;
- this.inputProvider = inputProvider;
- 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);
- assert shell == tree.getShell();
- this.shell = shell;
- this.inputProvider = inputProvider;
- 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);
- 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
- setComparer(new ElementComparer());
-
-
-
- // 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
- // ----------------------------------------
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.addSystemResourceChangeListener(this);
- sr.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.
- * Expands/Collapses selected item if it can be expanded/collapsed
- */
- protected void handleDoubleClick(DoubleClickEvent event) {
- if (!enabledMode) {
- //event.doit = false;
- return;
- }
- ITreeSelection s = (ITreeSelection) event.getSelection();
- Object element = s.getFirstElement();
- if (element == null) return;
- // Get the path for the element and use it for setting expanded state,
- // so the proper TreeItem is expanded/collapsed
- TreePath[] paths = s.getPathsFor(element);
- if (paths == null || paths.length == 0 || paths[0] == null) return;
- TreePath elementPath = paths[0];
-
- // bringing back handling at the adapter level here due to bug 257721
- ISystemViewElementAdapter adapter = getViewAdapter(element);
- boolean alreadyHandled = false;
- if (adapter != null && _allowAdapterToHandleDoubleClick)
- alreadyHandled = adapter.handleDoubleClick(element);
-
- if (!alreadyHandled && isExpandable(element)) {
- boolean expandedState = getExpandedState(elementPath);
- setExpandedState(elementPath, !expandedState);
- // DWD: fire collapse / expand event
- Event baseEvent = new Event();
- baseEvent.item = findItem(element);
- baseEvent.widget = baseEvent.item;
- TreeEvent treeEvent = new TreeEvent(baseEvent);
- if (expandedState) {
- handleTreeCollapse(treeEvent);
- } else {
- handleTreeExpand(treeEvent);
- }
- 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
- 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;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- private IAction getImportConnectionAction() {
- if (_importConnectionAction == null) {
- _importConnectionAction = new SystemImportConnectionAction(); // true=>from popup menu
- _importConnectionAction.setShell(getShell());
- _importConnectionAction.setText(SystemResources.RESID_IMPORT_CONNECTION_LABEL_LONG);
- }
- return _importConnectionAction;
- }
-
- /**
- * Return the refresh action
- */
- public IAction getRefreshAction() {
- if (_refreshAction == null) _refreshAction = new SystemRefreshAction(getShell());
- _refreshAction.setId(ActionFactory.REFRESH.getId());
- _refreshAction.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
- 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.setId(ActionFactory.PROPERTIES.getId());
- _propertyDialogAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.PROPERTIES);
- }
-
-
- _propertyDialogAction.selectionChanged(getSelection());
-
- return _propertyDialogAction;
- }
-
-
- /**
- * 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);
- _renameAction.setId(ActionFactory.RENAME.getId());
- _renameAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.RENAME);
- 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);
- _deleteAction.setId(ActionFactory.DELETE.getId());
- _deleteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
- 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(getImportConnectionAction());
- menu.add(new GroupMarker(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$
-
-
- Object selectedObject = selection.getFirstElement();
- if (selectedObject instanceof PendingUpdateAdapter){
- return; // no menu for "Pending..."
- }
-
- // 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);
- }
-
- // 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 (showProperties()) {
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection()) menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
-
- // GO INTO ACTION...
- // OPEN IN NEW WINDOW ACTION...
- if (fromSystemViewPart) {
-
-
- ISystemViewElementAdapter adapter = getViewAdapter(selectedObject);
-
- boolean hasChildren = adapter.hasChildren((IAdaptable)selectedObject);
- if (!selectionIsRemoteObject)
- {
- GoIntoAction goIntoAction = getGoIntoAction();
- boolean singleSelection = selection.size() == 1;
- goIntoAction.setEnabled(singleSelection);
- if (singleSelection) {
- // dkm - first find out if the selection will have children
- // only add this action if there are children
- if (hasChildren && showOpenViewActions())
- {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_GOTO, goIntoAction);
- }
- }
-
-
- if (showOpenViewActions()) {
- SystemOpenExplorerPerspectiveAction opa = getOpenToPerspectiveAction();
- opa.setSelection(selection);
- menu.appendToGroup(opa.getContextMenuGroup(), opa);
- }
- }
-
- if (showGenericShowInTableAction() && hasChildren) {
- SystemShowInTableAction showInTableAction = getShowInTableAction();
- showInTableAction.setSelection(selection);
- menu.appendToGroup(getOpenToPerspectiveAction().getContextMenuGroup(), showInTableAction);
-
- SystemShowInMonitorAction showInMonitorAction = getShowInMonitorAction();
- showInMonitorAction.setSelection(selection);
- menu.appendToGroup(getOpenToPerspectiveAction().getContextMenuGroup(), showInMonitorAction);
- }
- }
-
- // GO TO CASCADING ACTIONS...
- if (fromSystemViewPart && (selectionIsRemoteObject || showOpenViewActions())) {
- SystemCascadingGoToAction gotoActions = getGoToActions();
- gotoActions.setSelection(selection);
- menu.appendToGroup(gotoActions.getContextMenuGroup(), gotoActions.getSubMenu());
- }
-
- // ADAPTER SPECIFIC ACTIONS (Must be the last actions added to the menu!!!)
- 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;
-
- // can we ask adapters to contribute menu items?
- // This can be done consistently only if all elements
- // in the (multi) selection adapt to the same adapter instance.
- // otherwise, adapters will not be allowed to contribute.
- while (elements.hasNext() && !skipAdapterActions) {
- Object element = elements.next();
- if (adapter == null) {
- adapter = getViewAdapter(element);
- } else if (adapter != getViewAdapter(element)) {
- // selected elements have different adapters
- skipAdapterActions = true;
- }
- //if (adapter != null)
- // adapters.put(adapter,element); // want only unique adapters
- }
-
- //Enumeration uniqueAdapters = adapters.keys();
- if (adapter != null && !skipAdapterActions) {
- 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 dynamic menu popups
- aVA.addDynamicPopupMenuActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADDITIONS);
-
- // add remote actions
- aVA.addCommonRemoteActions(ourMenu, selection, shell, ISystemContextMenuConstants.GROUP_ADAPTERS);
- }
- //}
- }
-
-
- // 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);
- }
- }
-
- // ***** DO NOT ADD ANY ACTIONS AFTER HERE *****
-
- }
-
- }
-
-
- /**
- * 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
-
- // [177537] [api] Dynamic system type provider need a hook to add dynamic system type specific menu groups.
- IRSESystemType[] systemTypes = SystemWidgetHelpers.getValidSystemTypes(null);
- for (int i = 0; i < systemTypes.length; i++) {
- IRSESystemType systemType = systemTypes[i];
- Object adapter = systemType.getAdapter(RSESystemTypeAdapter.class);
- if (adapter instanceof RSESystemTypeAdapter) {
- ((RSESystemTypeAdapter)adapter).addCustomMenuGroups(menu);
- }
- }
-
- 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 = getViewAdapter(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 = getViewAdapter(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
- }
-
- 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() {
- //getShell() can lead to "widget is disposed" errors, but avoiding them here does not really help
- if (!getTree().isDisposed()) {
- return getTree().getShell();
- }
- return shell;
- }
-
- /**
- * 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;
- removeTransientMessages(item);
- Shell shell = getShell();
- Object data = item.getData();
- boolean showBusy = (data instanceof IHost) && ((IHost)data).isOffline();
- if (showBusy) SystemPromptDialog.setDisplayCursor(shell, busyCursor);
- super.handleTreeExpand(event);
- if (showBusy) SystemPromptDialog.setDisplayCursor(shell, null);
- }
-
- /**
- * Remove the transient messages from this item.
- * @param item The tree item whose children should be examined for transient messages.
- */
- private void removeTransientMessages(TreeItem 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);
- }
- }
- }
- }
- }
-
-
- /**
- * Clear current selection. Ignore widget disposed message.
- */
- protected void clearSelection() {
- try {
- setSelection((ISelection) null);
- } catch (Exception exc) {
- }
- }
-
-
-
- /**
- * Returns the implementation of ISystemViewElementAdapter for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected ISystemViewElementAdapter getViewAdapter(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.getViewAdapter(o, this, provider);
- } else {
- return SystemAdapterHelpers.getViewAdapter(o, this);
- }
- }
-
- /**
- * Returns the implementation of IRemoteObjectIdentifier for the given
- * object. Returns null if this object is not adaptable to this.
- *
- * @deprecated should use {@link #getViewAdapter(Object)} since IRemoteObjectIdentifier
- * is not defined in the adapter factories
- */
- protected IRemoteObjectIdentifier getRemoteObjectIdentifier(Object o)
- {
- return (IRemoteObjectIdentifier)((IAdaptable)o).getAdapter(IRemoteObjectIdentifier.class);
- }
-
- /**
- * Returns the implementation of ISystemRemoteElementAdapter for the given
- * object. Returns null if this object is not adaptable to this.
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
- {
- if (o instanceof IAdaptable)
- {
- return (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- }
- return null;
- }
-
-
- /**
- *
- */
- public void handleDispose(DisposeEvent event) {
- //if (debug)
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"Inside handleDispose for SystemView");
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.removeSystemResourceChangeListener(this);
- sr.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 (getViewAdapter(firstSelection) != null) {
- ISubSystem ss = getViewAdapter(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[] children = null;
- Item[] newResult = new Item[oldResult.length];
- if (parentItem instanceof Item) {
- children = oldResult;
- } else
- children = getChildren(parentItem);
-
- for (int i = 0; i < oldResult.length; i++)
- {
- Item first = removeFirstItem(oldResult, children);
- newResult[i] = first;
- }
-
- return newResult;
-
- }
-
-
- protected Item removeFirstItem(Item[] items, Item[] children)
- {
- if (items != null)
- {
- for (int i = 0; i < items.length; i++)
- {
- if (items[i] != null)
- {
- Item current = items[i];
- items[i] = null;
- return current;
- }
- }
- }
- return null;
- }
-
-
-
- /**
- * Move one tree item to a new location
- */
- protected void moveTreeItem(Widget parentItem, Item item, Object src, int newPosition) {
- if (item==null) {
- //Null items during RSECombinedTestSuite - put debugBreak here to investigate
- assert item!=null;
- return;
- }
- 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.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) {
- if (!getControl().isDisposed()) {
- ResourceChangedJob job = new ResourceChangedJob(event, this);
- job.setPriority(Job.INTERACTIVE);
- if (Display.getCurrent() != null) {
- job.runInUIThread(null);
- } else {
- // 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) {
- }
- */
- } else {
- trace("resource changed while shutting down"); //$NON-NLS-1$
- }
- }
-
- public void trace(String str) {
- String id = RSEUIPlugin.getDefault().getBundle().getSymbolicName();
- String val = Platform.getDebugOption(id + "/debug"); //$NON-NLS-1$
- if ("true".equals(val)) { //$NON-NLS-1$
- try {
- throw new IllegalStateException(str);
- } catch(IllegalStateException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * 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 Exception _originatingThread; //for debugging
-
- public ResourceChangedJob(ISystemResourceChangeEvent event, SystemView originatingViewer) {
- super("Resource Changed..."); //$NON-NLS-1$
- //FIXME Shouldn't the originatingViewer be taken from the event if possible, if it is instanceof ISystemResourceChangeEventUI?
- //See also originatedHere, below
- _originatingViewer = originatingViewer;
- _event = event;
- //_originatingThread = new Exception();
- //_originatingThread.fillInStackTrace();
- ////_originatingThread.printStackTrace();
- ////System.out.println("<<<<<<<<<<<<<");
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (getControl().isDisposed()) {
- trace("SystemView: refresh after disposed"); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
- int type = _event.getType();
- Object src = _event.getSource();
- Object parent = _event.getParent();
-
- String[] properties = new String[1];
- if (parent == RSECorePlugin.getTheSystemRegistry()) parent = inputProvider;
- ISubSystem ss = null;
- Widget item = null;
- Widget parentItem = null;
- Object[] multiSource = null;
- Object previous = null;
- boolean wasSelected = false;
- boolean originatedHere = true;
- if (_event instanceof SystemResourceChangeEventUI) {
- Viewer viewer = ((SystemResourceChangeEventUI)_event).getOriginatingViewer();
- if (viewer!=null && viewer!=_originatingViewer) {
- originatedHere = false;
- }
- Object viewerItem = ((SystemResourceChangeEventUI)_event).getViewerItem();
- if (viewerItem instanceof TreeItem) {
- inputTreeItem = (TreeItem)viewerItem;
- } else {
- inputTreeItem = null;
- }
- } else {
- inputTreeItem = null;
- }
-
- //logDebugMsg("INSIDE SYSRESCHGD: " + type + ", " + src + ", " + parent);
- switch (type) {
- // SPECIAL CASES: ANYTHING TO DO WITH FILTERS!!
- case ISystemResourceChangeEvents.EVENT_RENAME_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_CHANGE_FILTER_REFERENCE:
- findAndUpdateFilter(_event, type);
- break;
- case ISystemResourceChangeEvents.EVENT_CHANGE_FILTERSTRING_REFERENCE:
- findAndUpdateFilterString(_event, type);
- break;
-
- case ISystemResourceChangeEvents.EVENT_ADD_FILTERSTRING_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_DELETE_FILTERSTRING_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_MOVE_FILTERSTRING_REFERENCES:
- //findAndUpdateFilterStringParent(event, type);
- //break;
- case ISystemResourceChangeEvents.EVENT_ADD_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_DELETE_FILTER_REFERENCE:
- case ISystemResourceChangeEvents.EVENT_MOVE_FILTER_REFERENCES:
- // are we a secondary perspective, and our input or parent of our input was deleted?
- if ((
- (type == ISystemResourceChangeEvents.EVENT_DELETE_FILTERSTRING_REFERENCE)
- || (type == ISystemResourceChangeEvents.EVENT_DELETE_FILTER_REFERENCE)
- )
- && affectsInput(src)
- ) {
- close();
- return Status.OK_STATUS;
- }
-
- findAndUpdateFilterParent(_event, type);
- break;
-
- case ISystemResourceChangeEvents.EVENT_ADD:
- case ISystemResourceChangeEvents.EVENT_ADD_RELATIVE:
- if (debug) {
- logDebugMsg("SV event: EVENT_ADD "); //$NON-NLS-1$
- }
- // clearSelection();
- //refresh(parent);t
- 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);
- if (addingConnection)
- {
- // 196930 - don't add the connection when it's not supposed to be shown
- IHost con = (IHost)src;
- IRSESystemType sysType = 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(RSESystemTypeAdapter.class));
-
- if (adapter == null || !adapter.isEnabled(sysType))
- {
- // don't add this if our src is not enabled
- return Status.OK_STATUS;
- }
- }
- else {
- return Status.OK_STATUS;
- }
- }
-
- //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 == ISystemResourceChangeEvents.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();
-
- Item[] currentItems = null;
- if (parentItem instanceof Tree)
- {
- currentItems = ((Tree)parentItem).getItems();
- }
- else
- {
- currentItems = getItems((Item)parentItem);
- }
- boolean exists = false;
- // check for src
- for (int i = 0; i < currentItems.length && !exists; i++)
- {
- Item cur = currentItems[i];
- if (cur.getData() == src)
- {
- exists = true;
- }
- }
-
- //logDebugMsg("ADDING CONN? "+ addingConnection + ", position="+pos);
- if (!exists)
- {
- createTreeItem(parentItem, src, pos);
- }
- // setSelection(new StructuredSelection(src), true);
- }
- break;
- case ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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;
- }
- if (parent != null) {
- parentItem = findItem(parent);
- } else {
- // find first parentItem for source
- if (multiSource != null && multiSource.length > 0) {
- Widget sitem = findItem(multiSource[0]);
- if (sitem instanceof TreeItem) {
- parentItem = ((TreeItem)sitem).getParentItem();
- if (parentItem == null) {
- parentItem = ((TreeItem)sitem).getParent();
- }
- }
- }
- }
- if (parentItem == null) {
- return Status.OK_STATUS;
- }
- if ((parentItem instanceof Item) && !getExpanded((Item) parentItem)) {
- refresh(parent); // flush memory
- } else if (parentItem instanceof Tree) {
- if (_originatingViewer != null) {
- _originatingViewer.remove(multiSource);
- }
- } else {
- wasSelected = isSelectedOrChildSelected(multiSource);
- if (wasSelected) {
- clearSelection();
- }
- if (_originatingViewer != null) {
- _originatingViewer.remove(multiSource);
- }
- if (wasSelected) {
- setSelection(parent != null ? new StructuredSelection(parent) : null, 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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
- if (debug) logDebugMsg("SV event: EVENT_ICON_CHANGE "); //$NON-NLS-1$
-
- if (src instanceof Object[]){
- Object[] srcs = (Object[])src;
- for (int s = 0; s < srcs.length; s++){
- if (initViewerFilters != null && initViewerFilters.length > 0) {
- Widget w = findItem(srcs[s]);
- if (w == null) {
- refresh(parent);
- } else {
- properties[0] = IBasicPropertyConstants.P_IMAGE;
- update(srcs[s], properties); // for refreshing non-structural properties in viewer when model changes
-
- }
- } else {
- properties[0] = IBasicPropertyConstants.P_IMAGE;
- update(srcs[s], properties); // for refreshing non-structural properties in viewer when model changes
- }
- }
- }
- else {
- 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 ISystemResourceChangeEvents.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.getTheSystemRegistryUI()))
- refreshAll();
- else {
- //FIXME Why do we forceRemote here? EVENT_REFRESH_SELECTED also does not do forceRemote.
- //smartRefresh(src, false);
- smartRefresh(src, true);
- }
- updatePropertySheet();
- break;
- // refresh the parent of the currently selected items.
- // todo: intelligently re-select previous selections
- case ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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;
- List selectedRemoteObjects = new Vector();
- items = getTree().getSelection();
- int itemIdx = 0;
- //System.out.println("Inside EVENT_REFRESH_SELECTED. FIRST SELECTED OBJECT = " + items[0].handle);
- while (i.hasNext()) {
-
- Object element = i.next();
- ISystemViewElementAdapter adapter = _originatingViewer.getViewAdapter(element);
- if ((parentElementItem == null) && (adapter != null) && (!adapter.hasChildren((IAdaptable)element))) {
- //parentItem = getParentItem((Item)findItem(element));
- parentItem = getParentItem(items[itemIdx]);
- if ((parentItem != null) && (parentItem instanceof Item)) parentElementItem = (Item) parentItem; //.getData();
- }
- if (getViewAdapter(element) != null) {
- selectedRemoteObjects.add(element);
- if (ss == null) ss = getViewAdapter(element).getSubSystem(element);
- }
- itemIdx++;
- }
- if (parentElementItem != null) {
- //refresh(parentElement);
- //FIXME IF a multi-select contains elements with a different parent than the one found, they will be ignored.
- 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());
- }
- //else
- //{
- //i = selected.iterator();
- //while (i.hasNext())
- //refresh(i.next());
- //}
-
- updatePropertySheet();
- break;
- case ISystemResourceChangeEvents.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;
- List selRemoteObjects = new Vector();
- if (j.hasNext()) {
- Object element = j.next();
- ISystemViewElementAdapter adapter = _originatingViewer.getViewAdapter(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 (getViewAdapter(element) != null) {
- selRemoteObjects.add(element);
- ss = getViewAdapter(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 ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE:
- if (debug) logDebugMsg("SV event: EVENT_REFRESH_REMOTE: src = " + src); //$NON-NLS-1$
-
- // Fake expanded is set to the item for the src object if the object is in a collapsed state and
- // resides directly under a filter. The item is artificially expanded in order to allow
- // refreshRemoteObject() to go through with a query of the item. After the query is kicked off,
- // fakeExpanded is contracted in order to retain the original tree expand state.
- TreeItem fakeExpanded = null;
-
- ISystemViewElementAdapter adapter = getViewAdapter(src);
- if (adapter != null)
- {
- // we need to refresh filters
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- // if this is a filter reference, we just need to refresh it
- if (src instanceof ISystemFilterReference)
- {
- refresh(src);
- break;
- }
-
- // need to find filter references contain this object
- List filterReferences = sr.findFilterReferencesFor(src, adapter.getSubSystem(src), false);
-
- // first, find out if src is a container or not
- // if it's a container, just pass into refreshRemoteObject
- // if it's NOT a container, pass in it's parent
- boolean hasChildren = adapter.hasChildren((IAdaptable)src);
- if (!hasChildren && !(src instanceof ISubSystem))
- {
- // make the src the parent of the src
- Object srcParent = adapter.getParent(src);
- if (srcParent != null)
- {
- if (filterReferences.size() > 0){
- for (int r = 0; r < filterReferences.size(); r++){
- ISystemFilterReference ref = (ISystemFilterReference)filterReferences.get(r);
- refresh(ref);
- }
- break;
- }
- else {
- src = srcParent;
- }
-
- }
- }
- else
- {
- // only do this if the object is "remote"
- if (adapter.isRemote(src))
- {
- // get up-to-date version of the container (need to make sure it still exists)
- if (ss == null)
- {
- ss = adapter.getSubSystem(src);
- }
- if (ss != null)
- {
- // for bug 196662
- // if we're refreshing a previously unexpanded node, then a query will not happen
- // so we should refresh it's parent in this case
- Widget w = findItem(src);
- if (w instanceof TreeItem)
- {
- TreeItem titem = (TreeItem)w;
- TreeItem[] titems = titem.getItems();
- if (titems.length > 0 && !titem.getExpanded())
- {
- // the item is artificially expanded in order to allow the query to go through in
- // refreshRemoteObject()
- titem.setExpanded(true);
-
- // we set this so that after calling refreshRemoteObject(), the item can be re-collapsed
- fakeExpanded = titem;
- }
- }
- }
- }
- }
- }
-
- refreshRemoteObject(src, parent, originatedHere);
- if (fakeExpanded != null){
- fakeExpanded.setExpanded(false);
- }
-
- break;
- case ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE:
- if (debug) logDebugMsg("SV event: EVENT_PROPERTY_CHANGE "); //$NON-NLS-1$
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- ISystemRemoteElementAdapter ra = (ISystemRemoteElementAdapter)((IAdaptable)src).getAdapter(ISystemRemoteElementAdapter.class);
- if (ra != null) {
- updateRemoteObjectProperties(src);
- } else
- update(src, allProps); // for refreshing non-structural properties in viewer when model changes
- updatePropertySheet();
- break;
- case ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE:
- if (debug) logDebugMsg("SV event: EVENT_PROPERTYSHEET_UPDATE "); //$NON-NLS-1$
- updatePropertySheet();
- break;
- case ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.EVENT_COLLAPSE_SELECTED: // defect 41203
- if (debug) logDebugMsg("SV event: EVENT_COLLAPSE_SELECTED "); //$NON-NLS-1$
- collapseSelected();
- break;
- case ISystemResourceChangeEvents.EVENT_EXPAND_SELECTED: // defect 41203
- if (debug) logDebugMsg("SV event: EVENT_EXPAND_SELECTED "); //$NON-NLS-1$
- expandSelected();
- break;
-
- case ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.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
- // ------------------------------------
-
-
- private static class CheckPending implements Runnable
- {
- private boolean _notReady = true;
- private TreeItem _item;
-
- public CheckPending(TreeItem item)
- {
- _item = item;
- }
-
- public void run()
- {
- if (_item.isDisposed()) {
- // Parent was deleted in the meantime
- _notReady = false;
- } else {
- Item[] items = _item.getItems();
- // We know that a child must appear eventualy, because the
- // REMOTE_RESOURCE_CREATED event is only sent in case of
- // successful creation of the element.
- _notReady = (items.length <= 0 || ProgressMessages.PendingUpdateAdapter_PendingLabel.equals(items[0].getText()));
- }
- }
-
- public boolean isNotReady()
- {
- return _notReady;
- }
- }
-
- /**
- * 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.core.events.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event) {
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- boolean originatedHere;
-
- if (event instanceof SystemResourceChangeEventUI) {
- Viewer viewer = ((SystemResourceChangeEventUI)event).getOriginatingViewer();
- originatedHere = (viewer==this);
- }
- else if (event instanceof SystemRemoteChangeEvent){
- Object viewer = ((SystemRemoteChangeEvent)event).getOriginatingViewer();
- originatedHere = (viewer==this);
- }
- else {
- originatedHere = false;
- }
-
- List remoteResourceNames = null;
- if (remoteResource instanceof List) {
- remoteResourceNames = (List) remoteResource;
- remoteResource = remoteResourceNames.get(0);
- }
- // getRemoteResourceAbsoluteName(remoteResourceParent); // DWD may not be necessary
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null) return;
-
- ISubSystem ss = getSubSystem(event, remoteResource, remoteResourceParent);
-
- List 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
- List 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.get(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);
- }
-
- Object filterRef = filterItem.getData();
- if (filterRef != remoteResourceParent){ // don't refresh it here if the filter reference is the object to refresh anyway
- 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)
- {
- Object data = selectedItem.getData();
- boolean allowExpand = true;
- ISystemViewElementAdapter adapter = getViewAdapter(data);
-
- if (adapter != null && data instanceof IAdaptable)
- {
- allowExpand = adapter.hasChildren((IAdaptable)data);
- }
- if (allowExpand && !selectedItem.getExpanded()) // if the filter is expanded, then we already refreshed it...
- {
- createChildren(selectedItem);
- selectedItem.setExpanded(true);
- }
- if (adapter.supportsDeferredQueries(ss))
- {
- final List names = remoteResourceNames;
- final String name = remoteResourceName;
- final ISubSystem subsys = ss;
- final TreeItem item = selectedItem;
- final IWorkbench wb = RSEUIPlugin.getDefault().getWorkbench();
-
- // do the selection after the query triggered via refreshRemoteObject() completes
- Job job = new Job("select resource") //$NON-NLS-1$
- {
- public IStatus run(IProgressMonitor monitor) {
-
- boolean notReady = true;
- while (notReady && !wb.isClosing())
- {
- try {
- Thread.sleep(100);
- }
- catch (InterruptedException e){}
-
- CheckPending checkRunnable = new CheckPending(item);
- wb.getDisplay().syncExec(checkRunnable);
- notReady = checkRunnable.isNotReady();
- }
-
- wb.getDisplay().asyncExec(new Runnable()
- {
- public void run()
- {
- if (!wb.isClosing() && !item.isDisposed()) {
- if (names != null)
- selectRemoteObjects(names, subsys, item);
- else
- selectRemoteObjects(name, subsys, item);
- }
- }
- });
-
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- job.schedule();
- }
- else {
- 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.get(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.get(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.getOldNames()[0], ss); // assuming only one resource renamed
-
- // refresh remoteResource if it's a directory
- ISystemViewElementAdapter adapter = getViewAdapter(remoteResource);
- if (remoteResource instanceof IAdaptable && adapter.hasChildren((IAdaptable) remoteResource)) {
- refreshRemoteObject(remoteResource, remoteResource, originatedHere);
- }
-
- // now, find all filters that list the contents of the OLD name container.
- filterMatches = findAllRemoteItemFilterReferences(event.getOldNames()[0], ss, null); // assuming only one resource renamed
- if (filterMatches != null) {
- for (int idx = 0; idx < filterMatches.size(); idx++) {
- FilterMatch match = (FilterMatch) filterMatches.get(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.get(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 List getRemoteSelection() {
- List prevSelection = null;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator i = selection.iterator();
- while (i.hasNext()) {
- Object element = i.next();
- ISystemViewElementAdapter ra = getViewAdapter(element);
- if (ra != null) {
- if (prevSelection == null) prevSelection = new Vector();
- prevSelection.add(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 {
- ISystemViewElementAdapter ra = getViewAdapter(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 List) {
- List v = (List) remoteResource;
- if (v.size() > 0) ss = getSubSystem(event, v.get(0), null);
- } else {
- ISystemViewElementAdapter ra = getViewAdapter(remoteResource);
- if (ra != null) ss = ra.getSubSystem(remoteResource);
- }
- }
- if ((ss == null) && (remoteParent != null) && !(remoteParent instanceof String)) {
- if (remoteParent instanceof List) {
- List v = (List) remoteParent;
- if (v.size() > 0) ss = getSubSystem(event, null, v.get(0));
- } else {
- ISystemViewElementAdapter ra = getViewAdapter(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() != RSECorePlugin.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() != RSECorePlugin.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) {
- List matches = null;
- String oldElementName = null;
-
- // STEP 1: get the object's remote adapter and subsystem
- if (deleteObject instanceof String)
- oldElementName = (String) deleteObject;
- else {
- ISystemViewElementAdapter rmtAdapter = getViewAdapter(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.get(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);
-
- List toRemove = new ArrayList();
- // STEP 3: process all references to the object
- for (int idx = 0; idx < matches.size(); idx++) {
- Item match = (Item) matches.get(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 {
- toRemove.add(match);
- //System.out.println(".....calling remove(data) on this match");
- //remove(data); // remove this item from the tree
- }
- }
- }
-
- // do the remove now
- for (int i = 0; i < toRemove.size(); i++)
- {
- Item childItem = (Item)toRemove.get(i);
- disassociate(childItem);
- childItem.dispose();
- }
-
- // 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
- }
- */
-
- List matches = null;
-
- // STEP 1: get the object's remote adapter and subsystem
- String newElementName = null;
- ISystemViewElementAdapter rmtAdapter = null;
- if (renameObject instanceof String) {
- //FIXME How to get the adapter based on the String name?
- newElementName = (String)renameObject;
- } else {
- rmtAdapter = getViewAdapter(renameObject);
- subsystem = rmtAdapter.getSubSystem(renameObject);
- newElementName = rmtAdapter.getName(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.get(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed())
- {
- Object data = match.getData();
-
- ISystemRemoteElementAdapter remoteAdapter = (ISystemRemoteElementAdapter)((IAdaptable)data).getAdapter(ISystemRemoteElementAdapter.class);
-
- if (data != renameObject) // not a binary match
- {
- if (remoteAdapter != null)
- {
- // DKM - would be nice to eventually get rid of remote element adapter
- refresh = remoteAdapter.refreshRemoteObject(data, renameObject); // old, new
- }
- } else {
- refresh = true;
- }
-
- // rename explicitly here (since internalUpdate doesn't seem to have an effect
- match.setText(newElementName);
- //updateItem(match, renameObject);
- 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)
- {
- // causes duplicates to appear when there are more than one rename objects
- //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) {
- List matches = new Vector();
-
- // STEP 1: get the object's remote adapter and subsystem
- ISystemRemoteElementAdapter rmtAdapter = (ISystemRemoteElementAdapter)((IAdaptable)remoteObject).getAdapter(ISystemRemoteElementAdapter.class);
-
- 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.get(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
- ISystemViewElementAdapter rmtAdapter = null;
- ISubSystem subsystem = null;
- String oldElementName = null;
- boolean doesDeferredQueries = false;
- if (!(remoteObject instanceof String)) {
- rmtAdapter = getViewAdapter(remoteObject);
- if (rmtAdapter == null) return false;
- subsystem = rmtAdapter.getSubSystem(remoteObject);
- assert subsystem!=null : "EVENT_REFRESH_REMOTE outside subsystem"; //$NON-NLS-1$
- oldElementName = rmtAdapter.getAbsoluteName(remoteObject);
- doesDeferredQueries = rmtAdapter.supportsDeferredQueries(subsystem);
- } else
- oldElementName = (String) remoteObject;
-
- List matches = new Vector();
- // STEP 2: find all references to the object
- findAllRemoteItemReferences(oldElementName, remoteObject, subsystem, matches);
- if (matches.size()>0 && remoteObject instanceof String) {
- //TODO one String may reference multiple different context objects, so we should really iterate over all matches here
- //See javadoc of findAllRemoteItemReferences
- remoteObject = getFirstRemoteObject(matches);
- rmtAdapter = getViewAdapter(remoteObject);
- assert rmtAdapter!=null; //cannot happen because matches were result of String query
- if (rmtAdapter!=null) {
- subsystem = rmtAdapter.getSubSystem(remoteObject);
- assert subsystem!=null : "EVENT_REFRESH_REMOTE outside subsystem"; //$NON-NLS-1$
- doesDeferredQueries = rmtAdapter.supportsDeferredQueries(subsystem);
- }
- }
-
- 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++) {
- Widget match = (Widget) matches.get(idx);
- // a reference to this remote object
- if ((match instanceof TreeItem) && !((TreeItem) match).isDisposed()) {
- TreeItem matchedItem = (TreeItem)match;
- Object data = matchedItem.getData();
- boolean wasExpanded = matchedItem.getExpanded();
-
-
-
- smartRefresh(new TreeItem[] { matchedItem }); // 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)
- {
- boolean allowExpand = true;
- if (rmtAdapter != null && data instanceof IAdaptable)
- {
- allowExpand = rmtAdapter.hasChildren((IAdaptable)data);
- }
- if (allowExpand && wasExpanded && !getExpanded(matchedItem)) // assume if callers wants to select kids that they want to expand parent
- {
- createChildren(matchedItem);
- setExpanded(matchedItem, 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?
- // DKM - added wasExpanded check since we don't want to expand something that isn't already expanded
- if (!doesDeferredQueries && wasExpanded && !(toSelect instanceof SystemViewDummyObject)) {
- //selecting remote objects makes only sense if not deferred, because
- //in the deferred case the objects will be retrieved in a separate job.
- selectRemoteObjects(toSelect, null, match); // select the given kids in this parent
- }
- }
- }
- }
- }
- return true;
- }
-
- protected void doUpdateItem(final Item item, Object element)
- {
- // adding this because base eclipse version isn't renaming properly on duplicates
- ISystemViewElementAdapter adapter = getViewAdapter(element);
- if (adapter != null && item != null && !item.isDisposed())
- {
- String oldText = item.getText();
- String newText = adapter.getText(element);
- if (oldText == null || !oldText.equals(newText))
- {
- //if (newText != null){
- item.setText(newText);
- //}
- }
- }
-
- super.doUpdateItem(item, element);
- }
-
- /**
- * Given the result TreeItems of findAllRemoteItemReferences,
- * return the Data of the first Item.
- */
- protected Object getFirstRemoteObject(List matches) {
- if ((matches == null) || (matches.size() == 0)) return null;
- Object firstRemote = matches.get(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) {
- 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
- {
- //MOB cannot see why the selection is cleared here
- //clearSelection(); // there is nothing much else we can do. Calling code will restore it anyway hopefully
- doOurInternalRefresh(fWidget, fElement, fDoStruct, true);
- } else // it is us that is selected. This might be a refresh selected operation. TreeItem address won't change
- {
- doOurInternalRefresh(fWidget, fElement, fDoStruct, true);
- }
- } else {
- preservingSelection(new Runnable() {
- public void run() {
- doOurInternalRefresh(fWidget, fElement, fDoStruct, true);
- }
- });
- }
- }
-
- protected boolean isSelectionRemote() {
- ISelection s = getSelection();
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) s;
- Iterator it = ss.iterator();
- while (it.hasNext()) {
- if (getRemoteAdapter(it.next()) != null) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected void doOurInternalRefresh(Widget widget, Object element, boolean doStruct, boolean firstCall) {
- if (widget instanceof Item) {
- Object data = element;
- if (data instanceof IContextObject) {
- data = ((IContextObject)data).getModelObject();
- }
- if (doStruct) {
- updatePlus((Item) widget, data);
- }
- updateItem(widget, data);
- }
-
- /* may cause performance issue in bug 238363
- * calling refresh on each child item means that we'll be doing update on it
- * which ends up making it a pending decoration change since it's an update on an
- * item that already has text
- // recurse
- Item[] children = getChildren(widget);
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- Widget item = children[i];
- Object data = item.getData();
- if (data instanceof IAdaptable && item instanceof TreeItem) {
- data = getContextObject((TreeItem)item);
- }
- if (data != null) doOurInternalRefresh(item, data, doStruct, false);
- }
- }
-*/
-
- if (firstCall) {
-
- internalRefresh(element);
- }
- }
-
- /**
- * Override of internalRefreshStruct so that we can account for context
- */
- protected void internalRefreshStruct(Widget widget, Object element, boolean updateLabels) {
- if (widget instanceof TreeItem)
- {
- ContextObjectWithViewer contextObject = getContextObject((TreeItem)widget);
- IRSECallback callback = null;
-
- ArrayList expandedChildren = new ArrayList();
- if (widget instanceof TreeItem){
- TreeItem currItem = (TreeItem)widget;
- gatherExpandedChildren(currItem, currItem, expandedChildren);
- }
-
- if (expandedChildren.size() > 0){
- callback = new ExpandRemoteObjects(expandedChildren);
- contextObject.setCallback(callback);
- }
-
- internalRSERefreshStruct(widget, contextObject, updateLabels);
- }
- else
- {
- internalRSERefreshStruct(widget, element, updateLabels);
- }
- }
-
- /**
- * This is used during RSE refresh - otherwise filters aren't applied during refresh
- * @param widget the widget to refresh
- * @param element the element to refresh
- * @param updateLabels whether to update labels (ends up being ignored and having the value of true)
- */
- private void internalRSERefreshStruct(Widget widget, Object element, boolean updateLabels)
- {
- updateChildren(widget, element, null); // DKM - using deprecated API because it's the only way to call updateChildren
- // need a better solution for this in the future (the proper updateChildren is private)
- Item[] children = getChildren(widget);
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- Widget item = children[i];
- Object data = item.getData();
- if (data instanceof IAdaptable && item instanceof TreeItem) {
- data = getContextObject((TreeItem)item);
- }
- if (data != null) {
- internalRSERefreshStruct(item, data, updateLabels);
- }
- }
- }
-
- }
-
- 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 = getViewAdapter(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
- {
- ISystemViewElementAdapter ra = getViewAdapter(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 {
- ISystemViewElementAdapter ra = getViewAdapter(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 List 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) {
- ISystemViewElementAdapter ra = getViewAdapter(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 List 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 List) {
- //String elementName = null;
- List setList = (List)src;
- ArrayList selItems = new ArrayList();
- // our goal here is to turn the List of names or remote objects into a collection of
- // actual TreeItems we matched them on...
- for (int idx = 0; idx < setList.size(); idx++) {
- Object o = setList.get(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;
- List selectedRemoteObjects = new Vector();
- Widget parentItem = null;
- ISubSystem ss = null;
- while (i.hasNext()) {
- Object element = i.next();
- if (parentElement == null) {
- Item item = (Item) findItem(element);
- if (item != null) {
- parentItem = getParentItem(item);
- }
- if ((parentItem != null) && (parentItem instanceof Item)) parentElement = ((Item) parentItem).getData();
- }
- if (getViewAdapter(element) != null) {
- selectedRemoteObjects.add(element);
- if (ss == null) ss = getViewAdapter(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 re-expands 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) {
- 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];
- for (int idx = 0; idx < itemsToRefresh.length; idx++) {
- TreeItem currItem = itemsToRefresh[idx];
- if (currItem.getExpanded()) {
- // ...if this selected item is expanded, recursively gather up all its expanded descendents
- Object data = currItem.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getViewAdapter(data);
- if (adapter != null && adapter.isPromptable(data))
- setExpandedState(data, false); // collapse temp expansion of prompts
- else {
- //expandedChildren.add(new ExpandedItem(currItem)); we don't need special processing for given items themselves as they will not be refreshed, only their kids
- gatherExpandedChildren((fullRefresh ? null : currItem), currItem, expandedChildren);
- wasExpanded[idx] = true;
- }
- } else {
- wasExpanded[idx] = false;
- }
- }
- // ok, we have found all expanded descendants 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); // 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 (absolute name) won't change, only that of its children.
- for (int idx = 0; idx < itemsToRefresh.length; idx++) {
- TreeItem currItem = itemsToRefresh[idx];
- setExpanded(currItem, false); // collapse node
- ourInternalRefresh(currItem, currItem.getData(), true, true); // dispose of children, update plus
-
- if (wasExpanded[idx]) {
-
-
-
- IRSECallback callback = new ExpandRemoteObjects(expandedChildren);
-
- createChildren(currItem, callback); // re-expand
- currItem.setExpanded(true);
- } else // hmm, item was not expanded so just flush its memory
- {
-
- }
- }
-
- // for non-deferred queries
-
- // 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;
-
- // for deferred queries, we handle this via a callback
- 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 if (itemToExpand.data!=null) {
- ExpandedItem nextItemToExpand = null;
- if (idx + 1< expandedChildren.size()){
- nextItemToExpand = (ExpandedItem)expandedChildren.get(idx + 1);
- }
- // this is to address bug 241744
- if (nextItemToExpand != null && nextItemToExpand.isRemote()){ // if the next item to expand is remote
- List remainingExpandedChildren = new ArrayList(expandedChildren.size() - idx);
- for (int e = idx + 1; e < expandedChildren.size(); e++){
- remainingExpandedChildren.add(expandedChildren.get(e));
- }
-
- Item item = findFirstRemoteItemReference(itemToExpand.remoteName, itemToExpand.subsystem, itemToExpand.parentItem);
- if (item != null){
- IRSECallback callback = new ExpandRemoteObjects(remainingExpandedChildren);
- createChildren(item, callback);
- ((TreeItem) item).setExpanded(true);
- }
- }
- else { // original approach
- setExpandedState(itemToExpand.data, true);
- }
- if (debug) System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$
- }
- }
-
- getControl().setRedraw(true);
- }
-
- public void refreshRemote(Object element)
- {
- smartRefresh(element, true);
- }
-
-
-
- protected ArrayList getExpandedChildren(TreeItem[] roots){
- ArrayList expandedChildren = new ArrayList();
- for (int idx = 0; idx < roots.length; idx++) {
- TreeItem currItem = roots[idx];
- if (currItem.getExpanded()) {
- Object data = currItem.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getViewAdapter(data);
- if(adapter != null && adapter.isPromptable(data)) {
- setExpandedState(data, false);
- }
- else {
- expandedChildren.add(new ExpandedItem(null, currItem));
- }
- }
- }
- return expandedChildren;
- }
-
- /**
- * 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 = getExpandedChildren(roots);
- if (expandedChildren.size() > 0)
- anyExpanded = true;
-
- if (!anyExpanded)
- super.refresh();
- else {
- internalRefresh(getInput());
- roots = tree.getItems(); // re-query roots
- smartRefresh(roots, expandedChildren, forceRemote);
- }
- } else if (getViewAdapter(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 {
- ISystemViewElementAdapter adapter = getViewAdapter(element);
- // DKM - taken out as per defect 174295
- //String elementName = adapter.getName(element);
-
- String searchString = adapter.getAbsoluteName(element);
- ISubSystem subSystem = adapter.getSubSystem(element);
-
- List matches = new Vector();
- findAllRemoteItemReferences(searchString, element, subSystem, matches);
-
- // DKM - taken out as per defect 174295
- //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 {
- //private TreeItem item; //not needed since we'll get the item by absolute name
- //For mixed remote/non-remote selections we may want a TreePath
- TreeItem parentItem;
- Object data;
- String remoteName;
- ISubSystem subsystem;
- private ISystemRemoteElementAdapter remoteAdapter;
-
- ExpandedItem(TreeItem parentItem, TreeItem item) {
- this.parentItem = parentItem;
- 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 {
- ISystemViewElementAdapter adapter = getViewAdapter(data);
- if (adapter != null) {
- remoteName = adapter.getAbsoluteName(data);
- subsystem = adapter.getSubSystem(data);
- }
- 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();
- for (int idx = 0; idx < itemChildren.length; idx++) {
- TreeItem currChild = itemChildren[idx];
- if (currChild.getExpanded()) {
- Object data = currChild.getData();
- ISystemViewElementAdapter adapter = null;
- if (data != null) adapter = getViewAdapter(data);
- if (adapter != null && adapter.isPromptable(data)) {
- setExpandedState(data, false);
- } else {
- 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 ISystemResourceChangeEvents.EVENT_RENAME_FILTER_REFERENCE:
- eventType = "EVENT_RENAME_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case ISystemResourceChangeEvents.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 == ISystemResourceChangeEvents.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 == ISystemResourceChangeEvents.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 == ISystemResourceChangeEvents.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 ISystemResourceChangeEvents.EVENT_ADD_FILTER_REFERENCE:
- add = true;
- if (debug) eventType = "EVENT_ADD_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE_FILTER_REFERENCE:
- delete = true;
- if (debug) eventType = "EVENT_DELETE_FILTER_REFERENCE"; //$NON-NLS-1$
- break;
- case ISystemResourceChangeEvents.EVENT_MOVE_FILTER_REFERENCES:
- move = true;
- if (debug) eventType = "EVENT_MOVE_FILTER_REFERENCES"; //$NON-NLS-1$
- break;
- case ISystemResourceChangeEvents.EVENT_ADD_FILTERSTRING_REFERENCE:
- add = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_ADD_FILTERSTRING_REFERENCE"; //$NON-NLS-1$
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE_FILTERSTRING_REFERENCE:
- delete = true;
- afilterstring = true;
- if (debug) eventType = "EVENT_DELETE_FILTERSTRING_REFERENCE"; //$NON-NLS-1$
- break;
- case ISystemResourceChangeEvents.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;
- }
-
- 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?
- Widget 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 = internalFindReferencedItem(item, refdParent, SEARCH_INFINITE);
- }
- // 3b and 3d. (filter pool or filter)
- else if (parent instanceof ISystemFilterContainer) {
- refdParent = (ISystemFilterContainer) parent;
- parentRefItem = internalFindReferencedItem(item, refdParent, SEARCH_INFINITE);
- }
- // 3c (subsystem)
- else {
- parentRefItem = item;
- }
- 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
- {
- // Widgets can only be Tree or TreeItem here
- if (parentRefItem instanceof Item){
- 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;
-
- Widget result = mappedFindFirstRemoteItemReference(element);
- if (result == null)
- {
- result = recursiveInternalFindReferencedItem(parent, element, searchLimit);
- }
- return result;
- }
-
- /**
- * 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;
- }
-
-
-
- /**
- * 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) {
- //List 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 (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) {
-
- Item match = mappedFindFirstRemoteItemReference(remoteObject);
- if (match != null)
- return match;
-
- //List matches = new Vector();
- ISystemViewElementAdapter adapter = getViewAdapter(remoteObject);
- if (adapter == null) return 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);
- //System.out.println("recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem)");
- match = recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem);
- }
-
- //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 List to populate with hits, or <code>null</code> to
- * get a new List created and returned with the hits.
- * @return the List populated with hits, or <code>null</code> if <code>null</code>
- * was passed in as the List to populate and no hits were found.
- */
- public List findAllRemoteItemReferences(Object element, Object elementObject, List matches) {
- String searchString = null;
- ISubSystem subsystem = null;
- if (element instanceof String)
- searchString = (String) element;
- else {
- if (elementObject == null)
- elementObject = element;
- ISystemViewElementAdapter adapter = getViewAdapter(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();
-
- // try new map lookup method - won't work in cases of rename
- if (!mappedFindAllRemoteItemReferences(elementObject, matches)){
- for (int idx = 0; idx < roots.length; idx++) {
- //System.out.println("recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);");
- 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>
- * TODO: This method should not return any invalid matches, i.e. remote objects
- * that do match the String identifier but have been deleted already. Because the
- * same remote object can appear in multiple contexts in the RSE Tree, a single
- * remote object identifier String may evaluate to multiple different matches
- * to fill into the matches argument. All those context object matches, however,
- * reference the same real-world model objects due to the constraint that
- * {@link IRemoteObjectIdentifier} uniquely identifies a remote object.
- * <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 List to populate with hits (TreeItem objects),
- * or <code>null</code> to get a new List created and returned
- * @return the List populated with hits, or <code>null</code> if
- * <code>null</code> was passed as matches to populate and no matches
- * were found.
- */
- protected List findAllRemoteItemReferences(String searchString, Object elementObject, ISubSystem subsystem, List matches) {
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null)
- matches = new Vector();
-
- // try new map lookup method - won't work in cases of rename
- if (!mappedFindAllRemoteItemReferences(elementObject, matches)){
-
- boolean foundExact = false;
- for (int idx = 0; idx < roots.length; idx++){
- if (recursiveFindExactMatches((TreeItem)roots[idx], elementObject, subsystem, matches)){
- foundExact = true;
- }
- }
-
- if (!foundExact)
- {
- for (int idx = 0; idx < roots.length; idx++){
- matches = recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);
- }
- }
- }
- return matches;
- }
-
-
- private boolean recursiveFindExactMatches(TreeItem root, Object elementObject, ISubSystem subsystem, List matches)
- {
- boolean foundSomething = false;
- Object data = root.getData();
- if (data == elementObject)
- {
- matches.add(root);
- foundSomething = true;
- }
- if (subsystem != null){
- if (data instanceof ISubSystem){
- if (data != subsystem)
- return false;
- }
- else if (data instanceof IHost){
- if (subsystem.getHost() != data)
- return false;
- }
- }
-
- TreeItem[] children = root.getItems();
- for (int i = 0; i < children.length; i++)
- {
- if (recursiveFindExactMatches(children[i], elementObject, subsystem, matches))
- {
- foundSomething = true;
- }
- }
- return foundSomething;
- }
-
- /**
- * 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;
-
- // use map first
- Item match = mappedFindFirstRemoteItemReference(elementObject);
-
- for (int idx = 0; (match == null) && (idx < roots.length); idx++) {
- //System.out.println("recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem)");
- match = recursiveFindFirstRemoteItemReference(roots[idx], searchString, elementObject, subsystem);
- }
-
- return match;
- }
-
- protected Item mappedFindFirstRemoteItemReference(Object elementObject)
- {
- return (Item)findItem(elementObject);
- }
-
- protected boolean mappedFindAllRemoteItemReferences(Object elementObject, List occurrences)
- {
- Widget[] items = findItems(elementObject);
- if (items.length > 0)
- {
- for (int i = 0; i < items.length; i++)
- {
- occurrences.add(items[i]);
- }
- return true;
- }
-
- return false;
- }
-
- /**
- * 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 List to populate with hits. Must not be <code>null</code>
- * @return the given List populated with hits
- */
- protected List recursiveFindAllRemoteItemReferences(Item parent, String elementName, Object elementObject, ISubSystem subsystem, List occurrences) {
- Object rawData = parent.getData();
- ISystemViewElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getViewAdapter(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.add(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.add(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();
- ISystemViewElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getViewAdapter(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 List to populate with hits. Can be <code>null</code>,
- * in which case a new List is created and returned.
- * @return List of FilterMatch objects for each affected filter, or
- * <code>null</code> if <code>null</code> was passed in as the List
- * to populate and no matches were found.
- */
- protected List findAllRemoteItemFilterReferences(String elementName, ISubSystem subsystem, List 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 List to populate with hits. Must not be <code>null</code>.
- *
- * @return The given List of occurrences, populated with FilterMatch objects
- * for each affected filter.
- */
- protected List recursiveFindAllRemoteItemFilterReferences(Item parent, String elementName, ISubSystem subsystem, List 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;
- ISubSystem fss = (ISubSystem) filterRef.getProvider();
- if (fss != null) // should never happen!!
- {
- // #1
- if (fss.doesFilterMatch(filterRef.getReferencedFilter(), elementName)) {
- occurrences.add(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.add(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) {
- if (subsystem==null) {
- return occurrences; //bug 187061: renaming a host has no subsystem associated, therefore no other matches to rename
- }
- 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 encapsulate what is put in the List 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...
- selectionShowPropertiesAction = true;
- 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 = getViewAdapter(element);
- if (adapter == null) continue;
-
- if (selectionShowPropertiesAction) selectionShowPropertiesAction = adapter.showProperties(element);
-
- 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 = adapter.isRemote(element);
-
- if (selectionIsRemoteObject && !selectionFlagsUpdated) {
- ISubSystem srcSubSystem = adapter.getSubSystem(element);
- if (srcSubSystem != null &&
- (srcSubSystem.isConnected() || element instanceof ISystemFilterReference || element instanceof ISubSystem))
- {
- SystemRemoteElementResourceSet set = null;
- if (lastSet != null)
- {
- if (lastSet.getViewAdapter() == 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 properties menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showProperties() {
- return selectionShowPropertiesAction;
- }
-
- /**
- * 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
- *
- * @deprecated all deletion should now occur independently of the view and the
- * view should only deal with the handling of refresh events
- */
- public boolean doDelete(IProgressMonitor monitor) {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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;
- List deletedVector = new Vector();
-
- // keep track of the current set
- SystemRemoteElementResourceSet set = null;
-
- try {
- while (ok && elements.hasNext()) {
- element = elements.next();
- //multiSource[idx++] = element;
- adapter = getViewAdapter(element);
- if (getRemoteAdapter(element) != null) continue;
- ok = adapter.doDelete(getShell(), element, monitor);
- if (ok) {
- anyOk = true;
- deletedVector.add(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.getViewAdapter();
-
- 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();
-
- List refreshedList = new Vector();
-
- while (iter.hasNext()) {
- Object obj = iter.next();
- ISystemViewElementAdapter adp = getViewAdapter(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.get(idx);
- sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getSelectedParent()));
- }
- }
- return ok;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- private class RenameJob extends WorkspaceJob
- {
- String[] newNames = null;
- Object[] elements = null;
- Object[] elementAdapters = null;
- Object parentElement = null;
- String renameMessage = null;
-
- /**
- * RenameJob job.
- * @param newNames array of new names of all the elements need to be renamed
- * @param elements array of all the elements need to be renamed
- * @param elementAdapters array of all the view adapters of the elements need to be renamed
- * @param parentElement the parent object of the list of objects to be renamed
- * @param renameMessage the title of the Rename job.
- */
- public RenameJob(String[] newNames, Object[] elements, Object[] elementAdapters, Object parentElement, String renameMessage)
- {
- super(renameMessage);
- this.newNames = newNames;
- this.elements = elements;
- this.elementAdapters = elementAdapters;
- this.parentElement = parentElement;
- setUser(true);
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- Object element = null;
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = ""; //$NON-NLS-1$
- String oldName = ""; //$NON-NLS-1$
- Vector fileNamesRenamed = new Vector();
-
- boolean ok = true;
- try {
- int steps = elements.length;
- monitor.beginTask(renameMessage, steps);
- for (int i=0; i < elements.length; i++)
- {
- element = elements[i];
- adapter = (ISystemViewElementAdapter)elementAdapters[i];
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null)
- {
- oldName = remoteAdapter.getName(element);
- oldFullName = remoteAdapter.getAbsoluteName(element); // pre-rename
- monitor.subTask(getRenamingMessage(oldName).getLevelOneText());
- }
- ok = adapter.doRename(null, element, newNames[i], monitor);
- if (ok)
- {
- fileNamesRenamed.add(oldName);
- if (remoteAdapter != null)
- {
- ISubSystem ss = adapter.getSubSystem(element);
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, new String[] {oldFullName}, this);
- }
-
- else
- sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- monitor.worked(1);
- }
- }
- catch (SystemMessageException exc)
- {
- ok = false;
- //If this operation is cancelled, need to display a proper message to the user.
- if (monitor.isCanceled() && fileNamesRenamed.size() > 0)
- {
- //Get the renamed file names
- String renamedFileNames = (String)(fileNamesRenamed.get(0));
- for (int i=1; i<(fileNamesRenamed.size()); i++)
- {
- renamedFileNames = renamedFileNames + "\n" + fileNamesRenamed.get(i); //$NON-NLS-1$
- }
- //getMessage("RSEG1125").makeSubstitution(movedFileName));
- SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_RENAME_INTERRUPTED);
- thisMessage.makeSubstitution(renamedFileNames);
- SystemMessageDialog.displayErrorMessage(shell, thisMessage);
- }
- else
- {
- SystemMessageDialog.displayErrorMessage(shell, exc.getSystemMessage());
- }
- } catch (Exception exc) {
- //String msg = exc.getMessage();
- //if ((msg == null) || (exc instanceof ClassCastException))
- // msg = exc.getClass().getName();
- exc.printStackTrace();
- SystemMessageDialog.displayErrorMessage(null, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg),
- exc);
- ok = false;
- }
-
- return Status.OK_STATUS;
- }
- }
- /**
- * 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;
- }
-
- /**
- * Get the specific "Renaming %1..."
- */
- protected SystemMessage getRenamingMessage(String oldName)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_RENAMEGENERIC_PROGRESS);
- msg.makeSubstitution(oldName);
- return msg;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames) {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
- Object parentElement = getSelectedParent();
-
- Object[] renameElements = new Object[newNames.length];
- Object[] elementAdapters = new Object[newNames.length];
- int i = 0;
- while (elements.hasNext()) {
- renameElements[i] = elements.next();
- elementAdapters[i] = getViewAdapter(renameElements[i]);
- i++;
- //remoteAdapter = getRemoteAdapter(element);
- }
- SystemMessage renameMessage = getRenamingMessage(""); //$NON-NLS-1$
- String renameMessageText = renameMessage.getLevelOneText();
- RenameJob renameJob = new RenameJob(newNames, renameElements, elementAdapters, parentElement, renameMessageText);
- renameJob.schedule();
- return true;
- }
-
- 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 flavor is optimized for the case when you have the tree item directly.
- * @return Array of Objects leading to the given TreeItem,
- * sorted from the leaf item up.
- */
- public Object[] getElementNodes(TreeItem item) {
- List v = new Vector();
- v.add(item.getData());
- while (item != null) {
- item = item.getParentItem();
- if (item != null) v.add(item.getData());
- }
- Object[] nodes = new Object[v.size()];
- for (int idx = 0; idx < nodes.length; idx++)
- nodes[idx] = v.get(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 flavor returns an array of TreeItem objects versus element objects.
- * @return Array of TreeItem objects leading to the given TreeItem,
- * sorted from the leaf item up.
- */
- public TreeItem[] getItemNodes(TreeItem item) {
- List v = new Vector();
- v.add(item);
- while (item != null) {
- item = item.getParentItem();
- if (item != null) v.add(item);
- }
- TreeItem[] nodes = new TreeItem[v.size()];
- for (int idx = 0; idx < nodes.length; idx++)
- nodes[idx] = (TreeItem) v.get(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);
- }
-
- /**
- * 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;
-
- // only fire this event if the view actually has focus
- if (getControl().isFocusControl())
- {
- // 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[] dragtransfers = new Transfer[]
- { PluginTransfer.getInstance(),
- EditorInputTransfer.getInstance()
- };
-
- Transfer[] droptransfers = new Transfer[]
- { PluginTransfer.getInstance(),
- FileTransfer.getInstance(),
- EditorInputTransfer.getInstance(),
- ResourceTransfer.getInstance()
- };
-
- addDragSupport(ops | DND.DROP_DEFAULT, dragtransfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, droptransfers, new SystemViewDataDropAdapter(this));
- }
- // ----------------------------------
- // Support for EXPAND TO-> ACTIONS...
- // ----------------------------------
-
- public void expandTo(Object parentObject, Object remoteObject)
- {
- SystemViewLabelAndContentProvider provider = (SystemViewLabelAndContentProvider)getContentProvider();
- provider.setEnableDeferredQueries(false);
-
- ISystemViewElementAdapter adapter = getViewAdapter(parentObject);
- ISystemViewElementAdapter targetAdapter = getViewAdapter(remoteObject);
- Assert.isNotNull(adapter, "adapter is null for " + parentObject); //$NON-NLS-1$
- ISubSystem ss = adapter.getSubSystem(parentObject);
- String parentName = adapter.getAbsoluteName(parentObject);
- String remoteObjectName = targetAdapter.getAbsoluteName(remoteObject);
- Item parentItem = findFirstRemoteItemReference(parentName, ss, null);
- if (parentItem != null)
- {
- createChildren(parentItem);
- Item[] children = getItems(parentItem);
- setExpanded(parentItem, true);
- for (int i = 0; i < children.length; i++)
- {
-
- Item child = children[i];
- Object data = child.getData();
- if (data.equals(remoteObject))
- {
- select(remoteObject, false);
- provider.setEnableDeferredQueries(true);
- return;
- }
- else if (data instanceof ISystemFilterReference)
- {
- ISystemFilterReference ref = (ISystemFilterReference)data;
- if (ss.doesFilterMatch(ref.getReferencedFilter(), remoteObjectName)){
- expandTo(data, remoteObject);
- }
- else if (ss.doesFilterListContentsOf(ref.getReferencedFilter(),remoteObjectName)){
- expandTo(data, remoteObject);
- }
- }
- else if (data instanceof ISystemFilterPoolReference)
- {
- expandTo(data, remoteObject);
- }
- else
- {
- ISystemViewElementAdapter dataAdapter = (ISystemViewElementAdapter)((IAdaptable)data).getAdapter(ISystemViewElementAdapter.class);
- String path = dataAdapter.getAbsoluteName(data);
- if (remoteObjectName.startsWith(path))
- {
- expandTo(data, remoteObject);
- }
- }
- }
- }
- provider.setEnableDeferredQueries(true);
- }
-
-
- /**
- * 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();
- ISystemViewElementAdapter remoteAdapter = getViewAdapter(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.getViewAdapter() == 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;
- }
-*/
-
- /**
- * For bug 204684:
- *
- * Because we don't have an API for ISystemViewElementAdapter.exists()...
- * This class is used to determine whether an object exists and consequently whether to remove it from the view
- * after a query comes back with either no children or a SystemMessageObject. We query the parent to determine
- * whether the remote object exists - in that case we just leave the message as is in the view. In the case where
- * we detect that the object does not exist, we re-populate the parent node with the new children.
- */
- public static class CheckExistenceJob extends Job
- {
-
-
- private IAdaptable _remoteObject;
- //private TreeItem _parentItem;
- private IContextObject _context;
- public CheckExistenceJob(IAdaptable remoteObject, TreeItem parentItem, IContextObject context)
- {
- super("Check existence"); //$NON-NLS-1$
- _remoteObject = remoteObject;
- //_parentItem = parentItem;
- _context = context;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- // need to use the model object to get the adapter (since it could be a filter)
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)_context.getModelObject().getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null)
- {
- final Object[] children = adapter.getChildren(_context, monitor);
- if (contains(children, _remoteObject))
- {
- // we want to end this so the user sees the error message
- }
- else
- {
- Display.getDefault().asyncExec(new Runnable(){
- public void run()
- {
- /*
- // first need to remove the old items
- TreeItem[] items = _parentItem.getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getData() != null) {
- disassociate(items[i]);
- items[i].dispose();
- } else {
- items[i].dispose();
- }
- }
-
-
- // we want to propagate the changes to the view
- add(_context.getModelObject(), children);
- */
- // refresh using the event since other views may need updating
- IAdaptable par = _context.getModelObject();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemResourceChangeEvent(par, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null));
-
- }
- });
- }
- }
-
- return Status.OK_STATUS;
- }
-
- public static boolean contains(Object[] children, IAdaptable remoteObject)
- {
- ISystemViewElementAdapter adapter1 = (ISystemViewElementAdapter)remoteObject.getAdapter(ISystemViewElementAdapter.class);
- String path1 = adapter1==null ? null : adapter1.getAbsoluteName(remoteObject);
- for (int i = 0; i < children.length; i++)
- {
- if (remoteObject==children[i] || remoteObject.equals(children[i]))
- {
- return true;
- }
- else if (children[i] instanceof IAdaptable)
- {
- IAdaptable remoteObject2 = (IAdaptable)children[i];
- ISystemViewElementAdapter adapter2 = (ISystemViewElementAdapter)remoteObject2.getAdapter(ISystemViewElementAdapter.class);
- if (adapter2 != null)
- {
- String path2 = adapter2.getAbsoluteName(remoteObject2);
- if (path1 != null && path2 != null && path1.equals(path2))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
- }
-
-
- public void add(Object parentElementOrTreePath, Object[] childElements) {
- assertElementsNotNull(childElements);
-
- IContextObject contextObject = null;
- ISystemFilterReference originalFilter = null;
- if (parentElementOrTreePath instanceof IContextObject)
- {
- contextObject = (IContextObject)parentElementOrTreePath;
- originalFilter = contextObject.getFilterReference();
- parentElementOrTreePath = contextObject.getModelObject();
-
- }
-
-
- List matches = new Vector();
- 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)
- {
- ISubSystem subSystem = adapter.getSubSystem(parentElementOrTreePath);
-
- boolean unexpandContainer = false;
- // if the subsystem is not connected, then need to keep the widget expandable
- if (childElements.length == 0 && !subSystem.isConnected()){
- unexpandContainer = true;
- }
-
-
- IHost parentHost = subSystem.getHost();
- for (int i = 0; i < matches.size(); i++)
- {
- Widget match = (Widget) matches.get(i);
-
- // for bug 283793
- if (match instanceof TreeItem && unexpandContainer){
- TreeItem titem = ((TreeItem)match);
- if (titem.getExpanded()){
- setExpanded(titem, false);
- }
- }
- else {
- Object data = null;
- try {
- data = match.getData();
- }
- catch (SWTException e){
- // not sure why this occurs -logging it for now
- // this is reported in bug 251625
- SystemBasePlugin.logError("Exception in SystemView.add() with " + match); //$NON-NLS-1$
- SystemBasePlugin.logError(e.getMessage());
- }
-
- 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 (unexpandContainer){
- // brings back the + icon
- refresh(parentElementOrTreePath);
- return;
- }
- }
-
- 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);
- ISystemFilterReference ref = null;
- if (match instanceof TreeItem)
- {
- ref = getContainingFilterReference((TreeItem)match);
- }
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
-
- if (matches.size() > 1 && ref != null && ref != originalFilter)
- {
- // could have the same object under multiple filters
- // need to apply filter
-
- Object[] newChildren = null;
- if (match instanceof TreeItem)
- {
- ContextObjectWithViewer context = getContextObject((TreeItem)match);
- newChildren = adapter.getChildren(context, new NullProgressMonitor());
- internalAdd(match, parentElementOrTreePath, newChildren);
- }
- }
- else
- {
- internalAdd(match, parentElementOrTreePath, childElements);
-
- // refresh parent in this case because the parentElementOrTreePath may no longer exist
- if (childElements.length == 0 || childElements[0] instanceof SystemMessageObject)
- {
- if (adapter.isRemote(parentElementOrTreePath) && !adapter.hasChildren((IAdaptable)parentElementOrTreePath))
- {
- /*
- // refresh the parent
- Object par = adapter.getParent(parentElementOrTreePath);
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemResourceChangeEvent(par, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null));
-
- */
-
- // for bug 204684, using this job to determine whether or not the object exists before trying to update
- if (match instanceof TreeItem)
- {
- TreeItem parentItem = ((TreeItem)match).getParentItem();
- if (parentItem != null)
- {
- ContextObjectWithViewer context = getContextObject(parentItem);
- if (adapter.supportsDeferredQueries(context.getSubSystem())) {
- CheckExistenceJob job = new CheckExistenceJob((IAdaptable)parentElementOrTreePath, parentItem, context);
- job.schedule();
- } else {
- Object[] children = adapter.getChildren(context, new NullProgressMonitor());
- if (!CheckExistenceJob.contains(children, (IAdaptable)parentElementOrTreePath)) {
- IAdaptable par = context.getModelObject();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.fireEvent(new SystemResourceChangeEvent(par, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null));
- }
- }
- }
- }
- }
- }
-
- }
- }
- }
-
- TreeItem item = getFirstSelectedTreeItem();
- if (item != null)
- {
- if (item.getData() == parentElementOrTreePath)
- {
- updatePropertySheet();
- }
- }
-
- // for bug 187739
- if (contextObject instanceof ContextObjectWithViewer) {
- ContextObjectWithViewer ctx = (ContextObjectWithViewer)contextObject;
- IRSECallback cb = ctx.getCallback();
- if (cb!=null) {
- cb.done(Status.OK_STATUS, childElements);
- }
- }
- }
-
-
- /**
- * Get the containing filter reference for an item
- * @param item the item to get the filter reference for
- * @return the filter reference
- */
- public ISystemFilterReference getContainingFilterReference(TreeItem item)
- {
- Object data = item.getData();
- if (data instanceof ISystemFilterReference)
- {
- return (ISystemFilterReference)data;
- }
- else
- {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- {
- return getContainingFilterReference(parent);
- }
- else
- {
- Object input = getInput();
- if (input instanceof ISystemFilterReference)
- {
- return (ISystemFilterReference)input;
- }
- else
- {
- return null;
- }
- }
- }
- }
-
- /**
- * Get the containing subsystem from an item
- * @param item the item to get the subsystem for
- * @return the subsystem
- */
- public ISubSystem getContainingSubSystem(TreeItem item)
- {
- Object data = item.getData();
- if (data instanceof ISubSystem)
- {
- return (ISubSystem)data;
- }
- else
- {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- {
- return getContainingSubSystem(parent);
- }
- else
- {
- Object input = getInput();
- if (input instanceof ISubSystem)
- {
- return (ISubSystem)input;
- }
- else
- {
- return null;
- }
- }
- }
- }
-
-
- /**
- * Get the context object from a tree item
- * @param item the item to get the context for
- * @return the context object
- */
- public ContextObjectWithViewer getContextObject(TreeItem item)
- {
- Object data = item.getData();
- ISystemFilterReference filterReference = getContainingFilterReference(item);
- if (filterReference != null)
- {
- return new ContextObjectWithViewer(data, filterReference.getSubSystem(), filterReference, this);
- }
- else
- {
- ISubSystem subSystem = getContainingSubSystem(item);
- if (subSystem != null)
- {
- return new ContextObjectWithViewer(data, subSystem, this);
- }
- else
- {
- return new ContextObjectWithViewer(data, this);
- }
- }
- }
-
-
- /**
- * Create tree items for the specified children
- *
- * @param widget the parent item for the items to create
- * @param children the children to create items for
- */
- public void createTreeItems(TreeItem widget, Object[] children)
- {
- TreeItem[] tis = widget.getItems();
-
- // first dispose of dummies
- for (int i = 0; i < tis.length; i++) {
- if (tis[i].getData() != null) {
- disassociate(tis[i]);
- Assert.isTrue(tis[i].getData() == null,
- "Second or later child is non -null");//$NON-NLS-1$
- }
- tis[i].dispose();
- }
-
- // now create children
- for (int i = 0; i < children.length; i++)
- {
- createTreeItem(widget, children[i], -1);
- }
- }
-
- /**
- * For bug 187739
- */
- protected void createChildren(final Widget widget, IRSECallback callback)
- {
- if (widget instanceof TreeItem)
- {
- final Item[] tis = getChildren(widget);
- if (tis != null && tis.length > 0) {
- Object data = tis[0].getData();
- if (data != null) {
- return; // children already there!
- }
- }
- final IRSECallback cb = callback;
-
- BusyIndicator.showWhile(widget.getDisplay(), new Runnable() {
- public void run() {
- // fix for PR 1FW89L7:
- // don't complain and remove all "dummies" ...
- if (tis != null) {
- for (int i = 0; i < tis.length; i++) {
- if (tis[i].getData() != null) {
- disassociate(tis[i]);
- Assert.isTrue(tis[i].getData() == null,
- "Second or later child is non -null");//$NON-NLS-1$
-
- }
- tis[i].dispose();
- }
- }
- Object d = widget.getData();
- if (d != null)
- {
- ContextObjectWithViewer parentElement = getContextObject((TreeItem)widget);
- if (cb != null){
- parentElement.setCallback(cb);
- }
-
- Object[] children = getSortedChildren(parentElement);
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- createTreeItem(widget, children[i], -1);
- }
- }
- }
- }
-
- });
- }
- else
- {
- super.createChildren(widget);
- }
- }
-
- /**
- * Overridden so that we can pass a wrapper IContextObject into the provider to get children instead
- * of the model object, itself
- */
- protected void createChildren(final Widget widget)
- {
- createChildren(widget, null);
- }
-
- /**
- * Override to pass context into hasChildren()
- *
- */
- public boolean isExpandable(Object elementOrTreePath) {
- Object element;
- TreePath path;
- if (elementOrTreePath instanceof TreePath) {
- path = (TreePath) elementOrTreePath;
- element = path.getLastSegment();
- } else {
- element = elementOrTreePath;
- path = null;
- }
- IContentProvider cp = getContentProvider();
- if (cp instanceof ITreePathContentProvider) {
- ITreePathContentProvider tpcp = (ITreePathContentProvider) cp;
- if (path == null) {
- // A path was not provided so try and find one
- Widget w = findItem(element);
- if (w instanceof Item) {
- Item item = (Item) w;
- path = getTreePathFromItem(item);
- }
- if (path == null) {
- path = new TreePath(new Object[] { element });
- }
- }
- return tpcp.hasChildren(path);
- }
- if (cp instanceof ITreeContentProvider)
- {
- ITreeContentProvider tcp = (ITreeContentProvider) cp;
- if (elementOrTreePath instanceof TreeItem)
- {
- ContextObjectWithViewer context = getContextObject((TreeItem)elementOrTreePath);
- return tcp.hasChildren(context);
- }
- else
- {
- return tcp.hasChildren(element);
- }
- }
- return false;
- }
-
- public void update(Object element, String[] properties) {
- Assert.isNotNull(element);
- List matches = new Vector();
- findAllRemoteItemReferences(element, element, matches);
-
- for (int i = 0; i < matches.size(); i++) {
-
- internalUpdate((Widget)matches.get(i), element, properties);
- }
- }
-
- /**
- * This method is used to set whether or not the tree viewer allows the view adapter
- * for a selected object to handle a double-click. If so, the adapter implements it's
- * own handleDoubleClickMethod() and returns whether or not the operation is complete
- * such that the view does or does not need to do additional processing (such as expansion).
- * Typically the method is called with <code>false</code> when the SystemView is used in a
- * dialog since, in that context, it makes no sense to respond to double-clicks by opening
- * in an editor. In contrast to this approach, SystemView.setEnabled(false) prevents any
- * handling of double-click (such as the tree expand) and disables the context menu.
- *
- * @param flag whether to allow the adapter to handle the double click
- */
- public void allowAdapterToHandleDoubleClick(boolean flag)
- {
- _allowAdapterToHandleDoubleClick = flag;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java
deleted file mode 100644
index 59442b816..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForConnections.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-/**
- * 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 getViewAdapter(connection).getChildren(connection, new NullProgressMonitor()); // 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 getViewAdapter(selectedConnection).getChildren(selectedConnection, new NullProgressMonitor()); // 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;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java
deleted file mode 100644
index 773aa5edd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterPools.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java
deleted file mode 100644
index a30acf68c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilterStrings.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.NullProgressMonitor;
-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;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-/**
- * 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(), new NullProgressMonitor());
- children = checkForEmptyList(children, element, true);
- }
- catch (InterruptedException exc)
- {
- children = new SystemMessageObject[1];
- children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED),
- ISystemMessageObject.MSGTYPE_CANCEL, element);
- System.out.println("Cancelled."); //$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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java
deleted file mode 100644
index 7ce326bae..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForFilters.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISystemViewInputProvider;
-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.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-
-/**
- * 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, RSEUIPlugin.getTheSystemRegistryUI().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.getViewer()!=null))
- {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(sfr, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null);
- Viewer v = (Viewer)inputProvider.getViewer();
- if (v instanceof ISystemResourceChangeListener)
- {
- //sr.fireEvent((ISystemResourceChangeListener)v, event); // only expand in the current viewer, not all viewers!
- RSEUIPlugin.getTheSystemRegistryUI().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
- {
- if (nestedFilterReferences != null)
- {
- Object[] allChildren = ss.resolveFilterStrings(filterStrings, new NullProgressMonitor());
- int nbrNestedFilters = 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 cancelled 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
-
- return checkForEmptyList(children, element, true);
- }
- }
- }
- /**
- * 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;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java
deleted file mode 100644
index 8ad201567..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAPIProviderForSubSystems.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.view.SystemAbstractAPIProvider;
-
-
-/**
- * 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAdapterFactory.java
deleted file mode 100644
index fb180a3fe..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewAdapterFactory.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-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.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryAdapter;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryNode;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewProfileAdapter;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewPropertySetAdapter;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewPropertySetNode;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationAdapter;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.rse.ui.model.ISystemPromptableObject;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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 = new SystemTeamViewCategoryAdapter();
- private SystemTeamViewSubSystemConfigurationAdapter subsysFactoryAdapter = new SystemTeamViewSubSystemConfigurationAdapter();
- private SystemTeamViewPropertySetAdapter propertySetAdapter = new SystemTeamViewPropertySetAdapter();
-
- 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);
- manager.registerAdapters(this, SystemTeamViewPropertySetNode.class);
-
- // FIXME - UDAs no longer in core
- //manager.registerAdapters(this, SystemTeamViewCompileTypeNode.class);
- //manager.registerAdapters(this, SystemTeamViewCompileCommandNode.class);
- //manager.registerAdapters(this, SystemUDActionElement.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 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 = categoryAdapter;
- else if (adaptableObject instanceof SystemTeamViewSubSystemConfigurationNode) adapter = subsysFactoryAdapter;
- else if (adaptableObject instanceof SystemTeamViewPropertySetNode) adapter = propertySetAdapter;
-
- /** 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;
- }
-
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewCompositeActionGroup.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewCompositeActionGroup.java
deleted file mode 100644
index aeb4d88b7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewCompositeActionGroup.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.view;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.action.IMenuManager;
-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();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
deleted file mode 100644
index 1f339864a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
+++ /dev/null
@@ -1,785 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * - created and used RSEPreferencesManager
- * Uwe Stieber (Wind River) - Menu action contributions can be acknowlegded by system type provider
- * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * Kevin Doyle (IBM) - [189005] Fixed getParent() to return SystemRegistryUI instead of SystemRegistry
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [191288] Up To Action doesn't go all the way back to the connections
- * Uwe Stieber (Wind River) - [199032] [api] Remove method acceptContextMenuActionContribution(...) from RSESystemTypeAdapter
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [216266] Consider stateless subsystems (supportsSubSystemConnect==false)
- * David Dykstal (IBM) - [197036] minor refactoring caused by SystemRegistry fix for this bug
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
- * David McKnight (IBM) - [226324] Default user ID from preferences not inherited
- * David McKnight (IBM) - [196166] [usability][dnd] Changing the sort order of hosts in the SystemView should work by drag & drop
- * David McKnight (IBM) - [286230] [dnd] Dropping resources on host nodes leads to classcast exception
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.GroupMarker;
-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.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-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.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemClearAllPasswordsAction;
-import org.eclipse.rse.internal.ui.actions.SystemConnectAllSubSystemsAction;
-import org.eclipse.rse.internal.ui.actions.SystemCopyConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemDisconnectAllSubSystemsAction;
-import org.eclipse.rse.internal.ui.actions.SystemExportConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemImportConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemMoveConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemMoveDownConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemMoveUpConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemWorkOfflineAction;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-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
-{
- private SystemNewConnectionAction 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;
- private SystemExportConnectionAction exportAction = null;
- private SystemImportConnectionAction importAction = 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 the system type object for the specified host.
- *
- * @param host The host to get the system type object from.
- * @return The system type object or <code>null</code>.
- */
- private IRSESystemType getSystemTypeForHost(IHost host) {
- if (host != null) {
- return host.getSystemType();
- }
- return 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();
-
- // bugzilla#161195: _ALL_ actions needs to be passed to the system type for approval.
- // _Never_ add any action without the system type provider having said ok to this.
- IHost host = (IHost)selection.getFirstElement();
- IRSESystemType sysType = getSystemTypeForHost(host);
- Object adapter = sysType != null ? sysType.getAdapter(RSESystemTypeAdapter.class) : null;
- RSESystemTypeAdapter sysTypeAdapter = adapter instanceof RSESystemTypeAdapter ? (RSESystemTypeAdapter)adapter : null;
-
- //updateAction.setValue(null); // reset
- menu.add(menuGroup, anotherConnectionAction);
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_NEW, new GroupMarker(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING));// user or BP/ISV additions
-
- menu.add(menuGroup, copyAction);
- menu.add(menuGroup, moveAction);
- menu.add(menuGroup, upAction);
- menu.add(menuGroup, downAction);
- menu.add(menuGroup, exportAction);
- menu.add(menuGroup, importAction);
-
- // MJB: RE defect 40854
- addConnectOrDisconnectAction(menu, menuGroup, selection);
-
- // SystemClearAllPasswordsAction is added only if passwords are supported
- // by any of the sub systems.
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- IConnectorService[] connectorServices = registry.getConnectorServices(host);
- boolean passwordsSupported = false;
- for (int i = 0; i < connectorServices.length && passwordsSupported == false; i++) {
- passwordsSupported |= connectorServices[i].supportsPassword();
- }
- if (passwordsSupported) menu.add(menuGroup, clearPasswordAction);
-
- // yantzi: artemis 6.0, offline support, only add work offline action for system types that support offline mode
- if (sysTypeAdapter != null && sysTypeAdapter.isEnableOffline(host.getSystemType())) {
- menu.add(menuGroup, offlineAction);
- }
- }
-
- private void addConnectOrDisconnectAction(SystemMenuManager menu, String menuGroup, IStructuredSelection selection) {
- IHost host = (IHost)selection.getFirstElement();
-
- ISystemRegistry sysReg = RSECorePlugin.getTheSystemRegistry();
- boolean anySupportsConnect = sysReg.isAnySubSystemSupportsConnect(host);
-
- if (anySupportsConnect) {
- boolean anyConnected = sysReg.isAnySubSystemConnected(host);
- boolean allConnected = sysReg.areAllSubSystemsConnected(host);
-
- if (!allConnected) menu.add(menuGroup, connectAction);
- if (anyConnected) menu.add(menuGroup, disconnectAction);
- }
- }
-
- private void createActions()
- {
- anotherConnectionAction = new SystemNewConnectionAction(null,
- SystemResources.ACTION_ANOTHERCONN_LABEL,
- SystemResources.ACTION_ANOTHERCONN_TOOLTIP,
- false,
- true,
- null);
- anotherConnectionAction.setHelp(RSEUIPlugin.HELPPREFIX+"actn0015"); //$NON-NLS-1$
-
- //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);
- exportAction = new SystemExportConnectionAction();
- importAction = new SystemImportConnectionAction();
- 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;
- boolean anyConnected = RSECorePlugin.getTheSystemRegistry().isAnySubSystemConnected(connection);
- ImageDescriptor descriptor = null;
- IRSESystemType systemType = getSystemTypeForHost(connection);
- if (systemType != null) {
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.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.getTheSystemRegistryUI().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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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 RSECorePlugin.getTheSystemRegistry();
- }
-
- /**
- * Return the children of this object
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- 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(IAdaptable 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(ISystemPropertyConstants.P_SYSTEMTYPE))
- return conn.getSystemType().getLabel();
- else if (name.equals(ISystemPropertyConstants.P_HOSTNAME))
- return conn.getHostName();
- else if (name.equals(ISystemPropertyConstants.P_DEFAULTUSERID))
- {
- setDefaultUserIdPropertyData(userIdData, conn);
- //System.out.println("Testing getPropertyValue: " + userIdData);
- return userIdData;
- }
- else if (name.equals(ISystemPropertyConstants.P_DESCRIPTION))
- return conn.getDescription();
- else if (name.equals(ISystemPropertyConstants.P_PROFILE))
- return conn.getSystemProfile().getName();
- else if (name.equals(ISystemPropertyConstants.P_IS_CONNECTED))
- {
- if (conn.isOffline())
- {
- return SystemResources.RESID_OFFLINE_LABEL;
- }
- else
- {
- boolean anyConnected = RSECorePlugin.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 = RSEPreferencesManager.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(ISystemPropertyConstants.P_DEFAULTUSERID))
- changed = changed_userId;
- else if (property.equals(ISystemPropertyConstants.P_HOSTNAME))
- changed = changed_hostName;
- else if (property.equals(ISystemPropertyConstants.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;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- if (property.equals(ISystemPropertyConstants.P_DEFAULTUSERID))
- {
- //sr.updateConnection(null, conn, conn.getSystemType().getName(), conn.getAliasName(),
- // conn.getHostName(), conn.getDescription(), original_userId, USERID_LOCATION_CONNECTION);
- updateDefaultUserId(conn, original_userIdData);
- }
- else if (property.equals(ISystemPropertyConstants.P_HOSTNAME))
- {
- sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), original_hostName,
- conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
- }
- else if (property.equals(ISystemPropertyConstants.P_DESCRIPTION))
- {
- sr.updateHost(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
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.updateHost(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;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- if (name.equals(ISystemPropertyConstants.P_DEFAULTUSERID))
- {
- //System.out.println("Testing setPropertyValue: " + value);
- //sr.updateConnection(null, conn, conn.getSystemType().getName(), conn.getAliasName(),
- // conn.getHostName(), conn.getDescription(), (String)value, USERID_LOCATION_CONNECTION);
- updateDefaultUserId(conn, (SystemInheritablePropertyData)value);
- changed_userId = true;
- }
- else if (name.equals(ISystemPropertyConstants.P_HOSTNAME))
- {
- // DKM - don't update unless it really changed
- // defect 57739
- if (!((String)value).equalsIgnoreCase(conn.getHostName()))
- {
- sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), (String)value,
- conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
- changed_hostName = true;
- }
- }
- else if (name.equals(ISystemPropertyConstants.P_DESCRIPTION))
- {
- // DKM - don't update unless it really changed
- // defect 57739
- if (!((String)value).equalsIgnoreCase(conn.getDescription()))
- {
- sr.updateHost(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 host = (IHost)element;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- //do not allow delete if any subsystem is connected but supports disconnect.
- //specifically, this allows deletion of "Local" which is always connected (but does not support disconnect)
- //need to get subsystems from registry instead of host in order to be lazy:
- //subsystems which are not yet instantiated do not need to be considered.
- ISubSystem[] ss = sr.getSubSystems(host);
- for (int i=0; i<ss.length; i++) {
- if (ss[i].isConnected() && ss[i].getSubSystemConfiguration().supportsSubSystemConnect())
- return false;
- }
- }
- return true;
- }
-
-
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor)
- {
- boolean ok = true;
- IHost conn = (IHost)element;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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, IProgressMonitor monitor) throws Exception
- {
- boolean ok = true;
- IHost conn = (IHost)element;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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;
- }
-
- public boolean canDrop(Object element) {
- if (element instanceof IHost){
- return true;
- }
- return false;
- }
-
- public Object doDrop(Object from, Object to, boolean sameSystemType,
- boolean sameSystem, int srcType, IProgressMonitor monitor) {
- if (from instanceof IHost){
- IHost srcHost = (IHost)from;
- IHost tgtHost = (IHost)to;
- if (srcHost != null && tgtHost != null && srcHost != tgtHost){
- ISystemProfile profile = tgtHost.getSystemProfile();
- ISystemHostPool pool = tgtHost.getHostPool();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
-
- int tgtPosition = pool.getHostPosition(tgtHost);
- int srcPosition = pool.getHostPosition(srcHost);
-
- int delta = tgtPosition - srcPosition;
-
- IHost[] conns = new IHost[1];
- conns[0] = srcHost;
-
- sr.moveHosts(profile.getName(),conns,delta);
- }
- return srcHost;
- }
- return null;
- }
-
- /**
- * 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;
- }
-
-
- /**
- * Make sure that the drop of the specified src object is appropriate on target object
- */
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- if (src instanceof IHost && target instanceof IHost && src != target){
- // make sure they use the same profile
- ISystemProfile p1 = ((IHost)src).getSystemProfile();
- ISystemProfile p2 = ((IHost)target).getSystemProfile();
- return p1 == p2;
- }
- 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)
- {
- 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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java
deleted file mode 100644
index beff42ec1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [142065] fix drag and drop on Mac OS X
- * Kevin Doyle (IBM) - [187536] Drag & Drop file to Editor launchs file in system editor
- * David McKnight (IBM) - [248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Iterator;
-
-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.NullProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.LazyDownloadJob;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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;
- private ISelection _selection = null; // set this on dragStart, set to null on dragFinished
- 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)
- {
- _selection = null; // drag has finished, forget the selection
- 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 = RSECorePlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem);
- dataStream.append(subSystemId);
- }
- else if (dragObject instanceof IHost)
- {
- IHost connection = (IHost)dragObject;
- String connectionId = RSECorePlugin.getTheSystemRegistry().getAbsoluteNameForConnection(connection);
- dataStream.append(connectionId);
- }
- else
- {
- subSystem = adapter.getSubSystem(dragObject);
-
- if (subSystem != null)
- {
- String subSystemId = RSECorePlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem);
- dataStream.append(subSystemId);
-
- }
-
- String objectId = adapter.getAbsoluteName(dragObject);
- dataStream.append(":"); //$NON-NLS-1$
- dataStream.append(objectId);
- }
- }
-
- public void dragStart(DragSourceEvent event)
- {
- /*
- * Remember the selection at drag start. This is the only point at which the selection is valid
- * during the drag operations on all platforms.
- */
- _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;
- event.detail = DND.DROP_COPY;
- ////FIXME as per bug [142947], drag under feedback now works differently in SWT
- //event.feedback = DND.FEEDBACK_INSERT_AFTER;
- }
- }
- }
- 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)
- {
-
- /*
- * We cannot request the selection from the selection provider at this point since
- * on some platforms (particularly Mac OS X) the selection is forgotten by the underlying
- * OS control immediately after the drag is started. This call is invoked at the end
- * of the drag operation but just before the corresponding drop call in the drop adapter.
- * Thus, we must remember the selection at drag start.
- */
- 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);
- }
- }
- }
- }
- }
-
- byte[] bytes = null;
- try {
- bytes = dataStream.toString().getBytes("UTF-8"); //$NON-NLS-1$
- }
- catch (UnsupportedEncodingException e){
- bytes = dataStream.toString().getBytes();
- }
-
- PluginTransferData data = new PluginTransferData("org.eclipse.rse.ui.view.DropActions", bytes); //$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())
- {
- Object dragObject = iterator.next();
- if (dragObject instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) dragObject).getAdapter(ISystemViewElementAdapter.class);
- if (adapter.canDrag(dragObject))
- {
- IResource resource = getResource((IAdaptable)dragObject);
- if (resource != null)
- {
- String fileName = resource.getLocation().toOSString();
- fileNames[i] = fileName;
- 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.isOpenExternal())
- {
- 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$
- }
-
- private IResource getResource(IAdaptable dragObject)
- {
- IResource resource = null;
- ISystemViewElementAdapter viewAdapter = (ISystemViewElementAdapter) dragObject.getAdapter(ISystemViewElementAdapter.class);
- ISystemRemoteElementAdapter remoteAdapter = (ISystemRemoteElementAdapter)dragObject.getAdapter(ISystemRemoteElementAdapter.class);
-
- if (remoteAdapter != null)
- {
-
- if (remoteAdapter.canEdit(dragObject))
- {
- ISystemEditableRemoteObject editable = remoteAdapter.getEditableRemoteObject(dragObject);
- // corresponds to a file
- IFile file = editable.getLocalResource();
- if (!file.exists())
- {
- // this is a drag and drop to windows explorer
- // because we're dealing with file paths we need to force this to complete before allowing the drop
- // so instead of doing the job, I'm forcing the transfer on this thread
- LazyDownloadJob job = new LazyDownloadJob(editable);
- job.run(new NullProgressMonitor());
- //job.setPriority(Job.INTERACTIVE);
- //job.schedule();
- }
- resource = file;
- }
- else if (viewAdapter != null)
- {
- if (viewAdapter.hasChildren(dragObject))
- {
- IContainer parentFolder = null;
- // corresponds to a folder
- Object[] children = viewAdapter.getChildren(dragObject, new NullProgressMonitor());
- for (int i = 0; i < children.length; i++)
- {
- IAdaptable child = (IAdaptable)children[i];
- IResource childResource = getResource(child);
- if (childResource != null)
- {
- parentFolder = childResource.getParent();
- if (!parentFolder.exists())
- {
- try
- {
- parentFolder.touch(new NullProgressMonitor());
- }
- catch (Exception e)
- {
-
- }
-
- }
- }
- }
-
-
- resource = parentFolder;
- }
- }
- }
- return resource;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java
deleted file mode 100644
index 546adad6c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDropAdapter.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [192704] work around drag&drop issues from Project Explorer
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [234924] [ftp][dnd][Refresh] Copy/Paste file from Package Explorer doesn't refresh folder
- * David McKnight (IBM) - [248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Iterator;
-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.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.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerDropAdapter;
-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.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-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.internal.model.SystemScratchpad;
-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.IPersistableElement;
-import org.eclipse.ui.part.EditorInputTransfer;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.PluginTransferData;
-
-
-/**
- * Drop adapter for dropping objects in the Systems views.
- *
- */
-public class SystemViewDataDropAdapter
-//extends PluginDropAdapter
-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;
- }
-
-
- // DKM - hack to see if project explorer resources can be dropped in RSE
- private boolean isLocalSelectionResources(PluginTransferData transferData)
- {
- byte[] result = transferData.getData();
-
- // get the sources
- 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];
- if (srcStr.equals("org.eclipse.ui.navigator.ProjectExplorer")) //$NON-NLS-1$
- {
- return true;
- }
- }
- return false;
- }
-
- private ArrayList getRSESourceObjects(PluginTransferData transferData)
- {
- byte[] result = transferData.getData();
-
- // get the sources
- String str = null;
- try {
- str = new String(result, "UTF-8"); //$NON-NLS-1$
- }
- catch (UnsupportedEncodingException e)
- {
- str = new String(result);
- }
-
- String[] tokens = str.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;
- if (isLocalSelectionResources(transferData))
- {
- IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
- Iterator selIt = selection.iterator();
- while (selIt.hasNext())
- {
- srcObjects.add(selIt.next());
- }
- _sourceType = SystemDNDTransferRunnable.SRC_TYPE_ECLIPSE_RESOURCE;
- }
- else
- {
- 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 EditorInputTransfer.EditorInputData[])
- {
- EditorInputTransfer.EditorInputData[] editorInput = (EditorInputTransfer.EditorInputData[])data;
- for (int i = 0; i < editorInput.length; i++)
- {
- IPersistableElement inData = editorInput[i].input.getPersistable();
- if (inData instanceof FileEditorInput){
- IFile file = ((FileEditorInput)inData).getFile();
- srcObjects.add(file);
- }
- }
- _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 = RSECorePlugin.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.getTheSystemRegistryUI().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.getTheSystemRegistryUI().setRunnableContext(shell, irc);
- return irc;
- }
- }
-
- public void dragOver(DropTargetEvent event)
- {
- super.dragOver(event);
- event.feedback &= ~DND.FEEDBACK_EXPAND;
- event.detail = DND.DROP_COPY;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java
deleted file mode 100644
index ee61f3752..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDummyObject.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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 _instance;
-
- /**
- * Constructor for SystemViewDummyObject.
- */
- public SystemViewDummyObject()
- {
- super();
- }
-
- /**
- * Return the singleton of this
- */
- public static SystemViewDummyObject getInstance()
- {
- if (_instance == null)
- _instance = new SystemViewDummyObject();
- return _instance;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java
deleted file mode 100644
index 611c12d14..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterAdapter.java
+++ /dev/null
@@ -1,593 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David Dykstal (IBM) - [224671] [api] org.eclipse.rse.core API leaks non-API types
- * David Dykstal (IBM) - [226761] fix NPE in team view when expanding items
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import java.util.Arrays;
-import java.util.Vector;
-
-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.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISystemModifiableContainer;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterName;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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
-{
-
-
- //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(menu, selection, shell, menuGroup, ssFactory, filter);
- 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
- * @return the desired image descriptor
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- ImageDescriptor filterImage = null;
- ISystemFilter filter = getFilter(element);
- if (filter.getProvider() != null) {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) filter.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter != null) {
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- ISystemFilter filter = getFilter(element);
- if (filter.isTransient())
- {
- return filter.getName();
- }
- else
- {
- 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 filter.getSubSystem();
- return filter.getParentFilterContainer();
- }
-
- /**
- * Return the children of this filter.
- * This is a combination of nested filters and resolved filter objects.
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- ISystemFilter filter = getFilter(element);
- // transient filters...
- if (filter.isTransient())
- {
- if (filter.isPromptable())
- return checkForEmptyList(processPromptingFilter(filter), element, true);
-
- Object[] children = null;
- String[] filterStrings = filter.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)filter.getSubSystem();
- 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();
- }
- if (filter instanceof ISystemModifiableContainer) {
- ISystemModifiableContainer containingFilter = (ISystemModifiableContainer) filter;
- // get children from cache if the children have been cached
- if (ss.getSubSystemConfiguration().supportsFilterCaching() && !containingFilter.isStale() &&
- containingFilter.hasContents(SystemChildrenContentsType.getInstance())) {
- children = containingFilter.getContents(SystemChildrenContentsType.getInstance());
- }
- // otherwise, get children and then cache
- else {
- children = checkForEmptyList(ss.resolveFilterStrings(filterStrings, monitor), element, true);
-
- if (ss.getSubSystemConfiguration().supportsFilterCaching()) {
- containingFilter.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 = SystemAdapterHelpers.getViewAdapter(child, getViewer()).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 checkForEmptyList(null, element, false);
-
- // normal filters...
- //Vector strings = filter.getFilterStringsVector();
- ISystemFilterString[] filterStrings = filter.getSystemFilterStrings();
- ISystemFilter[] filters = filter.getSystemFilters();
- Vector vChildren = new Vector();
-
- // start with nested filters...
- for (int idx=0; idx < filters.length; idx++)
- vChildren.addElement(filters[idx]);
- // continue with resolved filter string objects...
- for (int idx=0; idx < filterStrings.length; idx++)
- {
- vChildren.addElement(filterStrings[idx]);
- }
-
- // 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 = (Viewer)inputProvider.getViewer();
- if (v instanceof ISystemResourceChangeListener)
- {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(newFilter, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null);
- RSEUIPlugin.getTheSystemRegistryUI().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(IAdaptable 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(ISystemPropertyConstants.P_PARENT_FILTERPOOL,SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP);
- // parent filter
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PARENT_FILTER,SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP);
- // number filter strings
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.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, IProgressMonitor monitor) 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;
- String[] 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();
- }
- Vector names = new Vector(filterNames.length);
- names.addAll(Arrays.asList(filterNames));
- 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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java
deleted file mode 100644
index a967f9acb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolAdapter.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David Dykstal (IBM) - [226761] fix NPE in team view when expanding items
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-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.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.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-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
-{
- 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(menu, selection, shell, menuGroup, ssFactory, pool);
- 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
- * @return the desired image descriptor
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- ImageDescriptor poolImage = null;
- ISystemFilterPool pool = (ISystemFilterPool) element;
- if (pool.getProvider() != null) {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) pool.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter != null) {
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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(IAdaptable element, IProgressMonitor monitor)
- {
- ISystemFilterPool fp = (ISystemFilterPool)element;
- return fp.getSystemFilters();
- }
-
- /**
- * Return true if this object has children. That is, has filters.
- */
- public boolean hasChildren(IAdaptable 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(ISystemPropertyConstants.P_PARENT_FILTERPOOL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_TOOLTIP);
-
- // parent filter pool's profile
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PROFILE, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_TOOLTIP);
-
- // Related connection
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.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, IProgressMonitor monitor) 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();
- String[] names = mgr.getSystemFilterPoolNames();
- ISystemValidator nameValidator = new ValidatorFilterPoolName(names);
- 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$
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java
deleted file mode 100644
index d6ebd844e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterPoolReferenceAdapter.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Tobias Schwarz (Wind River) - [181394] Include Context in getAbsoluteName() for filter and pool references
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-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.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.ISystemFilterPoolReferenceManagerProvider;
-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.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterPoolName;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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
-{
- 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);
- if (adapter != null) {
- // Lazy Loading: By default, ISubSystemConfigurationAdapter will
- // only be available after its declaring bundle has been loaded,
- // which usually happens on "connect" of a subsystem. Before that
- // time, dynamically contributed actions will not be available.
- // Implementations that want their dynamic actions to be avaialble
- // earlier need to either declare them by static plugin.xml, or
- // provision for more eager loading of the bundle that declares
- // their adapter.
- IAction[] actions = adapter.getFilterPoolActions(menu, selection, shell, menuGroup, ssFactory, pool);
- if (actions != null) {
- for (int idx = 0; idx < actions.length; idx++) {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- actions = adapter.getFilterPoolReferenceActions(menu, selection, shell, menuGroup, ssFactory, (ISystemFilterPoolReference) element);
- 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)
- {
- ISystemFilterPoolReference ref = (ISystemFilterPoolReference)element;
- return (ISubSystem)ref.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 != null) {
- ISystemFilterPoolManagerProvider provider = pool.getProvider();
- if (provider != null) {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) provider.getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter != null) {
- // Lazy Loading: Customized filter pool images will only be
- // available once the bundle that declares the
- // ISubSystemConfigurationAdapter has been activated. Until
- // that time, a default image is shown. Clients who want
- // their customized images be available earlier need to
- // provision for more eager loading of their bundles at the
- // right time (e.g. when expanding the SubSystem node,
- // rather than when connecting).
- poolImage = adapter.getSystemFilterPoolImage(pool);
- }
- }
- }
- if (poolImage == null) {
- poolImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTERPOOL_ID);
- }
- return poolImage;
- }
-
- private ISystemFilterPool getFilterPool(Object element)
- {
- ISystemFilterPoolReference ref = (ISystemFilterPoolReference)element;
- ISystemFilterPool pool = ref.getReferencedFilterPool();
- return pool; // 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) {
- ISystemFilterPoolReference reference = (ISystemFilterPoolReference) element;
- String result = reference.getName();
- ISystemFilterPool pool = getFilterPool(element);
- if (pool != null) {
- result = pool.getName();
- }
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- //TODO consider caching the absolute name in the FilterPoolReference to avoid unnecessary String operations - the name won't ever change
- ISystemFilterPoolReference filterPoolRef = (ISystemFilterPoolReference)element;
- ISystemFilterPoolReferenceManagerProvider subSystem = filterPoolRef.getProvider();
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getViewAdapter(subSystem);
- String parentAbsoluteName = (adapter != null) ? adapter.getAbsoluteName(subSystem) : ""; //$NON-NLS-1$
- String referenceName = filterPoolRef.getName();
- String managerName = filterPoolRef.getReferencedFilterPoolManagerName();
- String absoluteName = parentAbsoluteName + "." + managerName + "." + referenceName; //$NON-NLS-1$ //$NON-NLS-2$
- return absoluteName;
- }
-
- /**
- * 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 = (ISystemFilterPoolReference)element;
- return SubSystemHelpers.getParentSubSystem(fpr);
- }
-
- /**
- * Return the children of this object.
- * For filter pools, this is a list of filters.
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)element;
- ISubSystem ss = getSubSystem(element);
- return fpRef.getSystemFilterReferences(ss);
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(IAdaptable element) {
- int count = 0;
- ISystemFilterPoolReference fpRef = (ISystemFilterPoolReference)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(ISystemPropertyConstants.P_PARENT_FILTERPOOL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPOOL_TOOLTIP);
-
- // parent filter pool's profile
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PROFILE, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPOOLREFERENCE_PARENTPROFILE_TOOLTIP);
-
- // Related connection
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.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
- {
- 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, IProgressMonitor monitor) 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 if (element instanceof ISystemFilterPool) {
- fp = (ISystemFilterPool) element;
- } else {
- throw new IllegalArgumentException();
- }
- ISystemFilterPoolManager mgr = fp.getSystemFilterPoolManager();
- String[] names = mgr.getSystemFilterPoolNames();
- ISystemValidator nameValidator = new ValidatorFilterPoolName(names);
- 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 SystemAdapterHelpers.getViewAdapter(parent, getViewer()).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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java
deleted file mode 100644
index 9c3b531a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterReferenceAdapter.java
+++ /dev/null
@@ -1,1049 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
- * Tobias Schwarz (Wind River) - [181394] Include Context in getAbsoluteName() for filter and pool references
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Kevin Doyle (IBM) - [187707] Added separator between New Folder and New File in context menu
- * David McKnight (IBM) - [199566] Remove synchronzied from internalGetChildren
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [210563] error messages need to be shown if incurred during filter expansion
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [232148] Invalid thread access exception from SystemViewFilterReferenceAdapter.internalGetChildren()
- * David McKnight (IBM) - [233494] Show in Table Action should be removed from promptable filters
- * David McKnight (IBM) - [238507] Promptable Filters refreshed after modifying filter strings
- * David McKnight (IBM) - [244824] filter not refreshed if child is "empty list" or system message node
- * David McKnight (IBM) - [249245] not showing inappropriate popup actions for: Refresh, Show In Table, Go Into, etc.
- * David McKnight (IBM) - [254614] Promptable filter's shouldn't require supportsCommands on the subsystem to be false
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISystemViewInputProvider;
-import org.eclipse.rse.core.model.SystemChildrenContentsType;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-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.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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorFilterName;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.IContextObject;
-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.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Display;
-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
-{
- //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);
- if (adapter != null) {
- // Lazy Loading: Specialized actions on filters are available only
- // after the bundle that declares the ISubSystemConfigurationAdapter
- // has been loaded, which typically is after connecting. We do not
- // load the bundle here because this code is executed as part of
- // showing a context menu. Subsystems who want their actions to be
- // available earlier need to provide them by static plugin.xml
- // markup or provision for more eager loading of their bundle, e.g.
- // through Platform.getAdapterManager().loadAdapter() at the right
- // time.
- IAction[] actions = adapter.getFilterActions(menu, selection, shell, menuGroup, ssFactory, filter);
- if (actions != null)
- {
- for (int idx = 0; idx < actions.length; idx++) {
- IAction action = actions[idx];
- if (action instanceof SystemNewFilterAction)
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_NEW, new Separator());
- menu.add(menuGroup, action);
- }
- }
- actions = adapter.getFilterReferenceActions(menu, selection, shell, menuGroup, ssFactory, getFilterReference(selection.getFirstElement()));
- 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);
- if (adapter != null) {
- // Lazy Loading: Customized Filter Images will be available only
- // after the bundle that declares the
- // ISubSystemConfigurationAdapter has been loaded. Until that
- // time, a default filter image is used. Extenders who want to
- // see their filter images right away need to provision for
- // eager loading of their bundles at the right time (i.e. when
- // expanding the Subsystem node).
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- //TODO consider caching the absolute name in the FilterReference to avoid unnecessary String operations - the name won't ever change
- ISystemFilterPoolReference filterPoolReference = getFilterReference(element).getParentSystemFilterReferencePool();
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getViewAdapter(filterPoolReference);
- String parentAbsoluteName = (adapter != null) ? adapter.getAbsoluteName(filterPoolReference) : ""; //$NON-NLS-1$
- return parentAbsoluteName + "." + getName(element); //$NON-NLS-1$
- }
-
- /**
- * 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.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(IAdaptable element, IProgressMonitor monitor)
- {
- return internalGetChildren(element, monitor);
- }
-
- /**
- * Gets all the children and then passes the children to the subsystem configuration adapter for filtering.
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getChildren(org.eclipse.rse.ui.view.IContextObject, org.eclipse.core.runtime.IProgressMonitor)
- */
- public Object[] getChildren(IContextObject element, IProgressMonitor monitor) {
- Object[] children = getChildren(element.getModelObject(), monitor);
- ISubSystem subsystem = element.getSubSystem();
- ISubSystemConfiguration configuration = subsystem.getSubSystemConfiguration();
- Object adapter = Platform.getAdapterManager().getAdapter(configuration, ISubSystemConfigurationAdapter.class);
-
- if (adapter instanceof ISubSystemConfigurationAdapter)
- {
- children = ((ISubSystemConfigurationAdapter)adapter).applyViewFilters(element, children);
- }
-
- return children;
- }
-
- /*
- * 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 Object[] internalGetChildren(Object element, IProgressMonitor monitor)
- {
- Object[] children = null;
- final ISystemFilterReference fRef = getFilterReference(element);
- ISystemFilter referencedFilter = fRef.getReferencedFilter();
- boolean promptable = referencedFilter.isPromptable();
-
- final ISubSystem ss = fRef.getSubSystem();
- final ISubSystemConfiguration ssf = SubSystemHelpers.getParentSubSystemConfiguration(referencedFilter);
-
- // PROMPTING FILTER?...
- if (promptable)
- {
- final Object[] pchildren = new SystemMessageObject[1];
- final Object pelement = element;
- // promptable's need to be run on the main thread since they display dialogs
- Display.getDefault().syncExec(new Runnable()
- {
-
- public void run()
- {
- try
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssf.getAdapter(ISubSystemConfigurationAdapter.class);
-
- ISystemFilter newFilter = adapter.createFilterByPrompting(ssf, fRef, getShell());
- if (newFilter == null)
- {
- pchildren[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, pelement);
- }
- else // filter successfully created!
- {
- // return "filter created successfully" message object for this node
- pchildren[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FILTERCREATED), ISystemMessageObject.MSGTYPE_OBJECTCREATED, pelement);
- // select the new filter reference...
- ISystemFilterReference sfr = fRef.getParentSystemFilterReferencePool().getExistingSystemFilterReference(ss, newFilter);
- ISystemViewInputProvider inputProvider = getInput();
- if ((sfr != null) && (inputProvider != null) && (inputProvider.getViewer() != null))
- {
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(sfr, ISystemResourceChangeEvents.EVENT_SELECT_EXPAND, null);
- Viewer v = (Viewer)inputProvider.getViewer();
- if (v instanceof ISystemResourceChangeListener)
- {
- //sr.fireEvent((ISystemResourceChangeListener)v, event); // only expand in the current viewer, not all viewers!
- RSEUIPlugin.getTheSystemRegistryUI().postEvent((ISystemResourceChangeListener) v, event); // only expand in the current viewer, not all viewers!
- }
- }
- }
- }
- catch (Exception exc)
- {
- pchildren[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, pelement);
- SystemBasePlugin.logError("Exception prompting for filter ", exc); //$NON-NLS-1$
- }
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(),"returning children");
- }
- });
- return pchildren;
- }
-
- // 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)
- {
- if (children.length == 0){
- doQuery = true;
- fRef.markStale(true);
- }
- else {
- // 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);
- }
- }
- else if (child instanceof ISystemMessageObject){
- if (((ISystemMessageObject)child).isTransient()){
- doQuery = true;
- fRef.markStale(true);
- }
- }
- }
- }
- }
- }
- if (doQuery)
- {
- Object[] allChildren = null;
-
- if (monitor == null)
- {
- allChildren = ss.resolveFilterStrings(filterStrings, new NullProgressMonitor());
- }
- else
- {
- allChildren = ss.resolveFilterStrings(filterStrings, monitor);
- }
-
- if (allChildren == null)
- {
- // System.out.println("filter children == null!"); //$NON-NLS-1$
- }
- else
- {
- if (allChildren.length == 1 && allChildren[0] instanceof ISystemMessageObject)
- {
- // error to display
- return allChildren; // nothing to sort or cache - just show the error
- }
-
- if (nestedFilterReferences != null)
- {
- int nbrNestedFilters = 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 cancelled 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
-
- return checkForEmptyList(children, element, true);
- }
- }
- }
-
- /**
- * Return true if this object has children.
- * That is, if the referenced filter has nested filters or filter strings.
- */
- public boolean hasChildren(IAdaptable 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(ISystemPropertyConstants.P_PARENT_FILTERPOOL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP);
- // parent filter
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PARENT_FILTER, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP);
- // number filter strings
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_FILTERSTRINGS_COUNT, SystemViewResources.RESID_PROPERTY_FILTERSTRINGS_COUNT_LABEL, SystemViewResources.RESID_PROPERTY_FILTERSTRINGS_COUNT_TOOLTIP);
- // Related connection
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.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, IProgressMonitor monitor) 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 element 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;
- String[] 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();
- }
- 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);
- ISubSystemConfiguration ssParentFactory = getSubSystemConfiguration(filter);
- return !filter.isPromptable() && !ssParentFactory.supportsCommands();
- }
-
-
- /**
- * 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() && !filter.isPromptable() && !ssParentFactory.supportsCommands();
- }
-
- /**
- * 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() && !filter.isPromptable() && !ssParentFactory.supportsCommands();
- }
-
- // ------------------------------------------------------------
- // 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 = SystemAdapterHelpers.getViewAdapter(parent, getViewer());
- boolean showFPs = SystemPreferencesManager.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 = SystemAdapterHelpers.getViewAdapter(parent, getViewer()); // 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.
- * Defer to the subsystem configuration.
- */
- public boolean supportsDeferredQueries(ISubSystem subSys)
- {
- return subSys.getSubSystemConfiguration().supportsDeferredQueries();
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterStringAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterStringAdapter.java
deleted file mode 100644
index d6b170e2d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewFilterStringAdapter.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David Dykstal (IBM) - [226761] fix NPE in team view when expanding items
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-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
-{
- //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;
- }
-
- 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
- * @return the desired image descriptor
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- ImageDescriptor filterImage = null;
- ISystemFilterString filterString = getFilterString(element);
- if (filterString.getProvider() != null) {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) filterString.getProvider().getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter != null) {
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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(IAdaptable element, IProgressMonitor monitor)
- {
- return null;
- }
-
-
- /**
- * Return true if this object has children. We return false;
- */
- public boolean hasChildren(IAdaptable element)
- {
- return false;
- }
-
- /**
- * Return our unique property descriptors
- */
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- if (propertyDescriptorArray == null)
- {
- propertyDescriptorArray = new PropertyDescriptor[3];
- // parent filter pool
- propertyDescriptorArray[0] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PARENT_FILTERPOOL,SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTPOOL_TOOLTIP);
- // parent filter
- propertyDescriptorArray[1] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_PARENT_FILTER,SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_LABEL, SystemViewResources.RESID_PROPERTY_FILTERPARENTFILTER_TOOLTIP);
- // filter string
- propertyDescriptorArray[2] = createSimplePropertyDescriptor(ISystemPropertyConstants.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();
- String[] oldStrings = filter.getFilterStrings();
- List workingStrings = new ArrayList(oldStrings.length);
- for (int i = 0; i < oldStrings.length; i++) {
- String oldString = oldStrings[i];
- if (!filterString.equals(oldStrings[i])) {
- workingStrings.add(oldString);
- }
- }
- String[] newStrings = new String[workingStrings.size()];
- workingStrings.toArray(newStrings);
- fpMgr.updateSystemFilter(filter, filter.getName(), newStrings);
- 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, IProgressMonitor monitor) 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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewForm.java
deleted file mode 100644
index 9c8cfbb40..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewForm.java
+++ /dev/null
@@ -1,546 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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:
- * Kevin Doyle (IBM) - [187553] - Removed code and related methods for toolbar/button bar.
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [187711] select SystemView APIs exposed by the ISystemTree interface
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [257721] Doubleclick doing special handling and expanding
- *******************************************************************************/
-package org.eclipse.rse.internal.ui.view;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-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.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.ISystemLongRunningRequestListener;
-import org.eclipse.rse.ui.view.ISystemTree;
-import org.eclipse.rse.ui.view.SystemLongRunningRequestEvent;
-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.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;
-import org.eclipse.swt.widgets.TreeItem;
-
-
-/**
- * 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);
-
- // set viewer filters
- this.initViewerFilters = initViewerFilters;
-
- createSystemView(shell, inputProvider, singleSelectionMode);
-
- }
-
- /**
- * Return the toolbar widget manager
- */
- public ToolBarManager getToolBarManager()
- {
- return toolbarMgr;
- }
- /**
- * Return the system view tree viewer
- */
- public ISystemTree getSystemTree()
- {
- 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);
- }
- 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);
-
- // for bug 257721, when using system view from a dialog, by default, we don't let adapter handle double-click
- tree.allowAdapterToHandleDoubleClick(false);
- }
-
- protected void addOurMouseListener()
- {
- MouseListener mouseListener = new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- //requestActivation();
- }
- };
- toolbar.addMouseListener(mouseListener);
- }
-
- /**
- * 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);
- }
- }
-
-
-
- /**
- * wrapper method to satisfy the ISystemTree interface
- */
- public void createTreeItems(TreeItem widget, Object[] children)
- {
- tree.createTreeItems(widget, children);
- }
-
- /**
- * wrapper method to satisfy the ISystemTree interface
- */
- public List findAllRemoteItemReferences(Object element,
- Object elementObject, List matches) {
- return tree.findAllRemoteItemReferences(element, elementObject, matches);
- }
-
- /**
- * wrapper method to satisfy the ISystemTree interface
- */
- public Item findFirstRemoteItemReference(Object remoteObject,
- Item parentItem) {
- return tree.findFirstRemoteItemReference(remoteObject, parentItem);
- }
-
- /**
- * wrapper method to satisfy the ISystemTree interface
- */
- public Tree getTree() {
- return tree.getTree();
- }
-
- /**
- * wrapper method to satisfy the ISystemTree interface
- */
- public ISystemFilterReference revealAndExpand(ISubSystem parentSubSystem,
- ISystemFilter filter) {
- return tree.revealAndExpand(parentSubSystem, filter);
- }
- public void addDoubleClickListener(IDoubleClickListener listener) {
- tree.addDoubleClickListener(listener);
- }
- public void addFilter(ViewerFilter filter) {
- tree.addFilter(filter);
-
- }
- public void expandTo(Object parentObject, Object remoteObject) {
- tree.expandTo(parentObject, remoteObject);
-
- }
- public void expandTo(String filterString) {
- tree.expandTo(filterString);
-
- }
- public boolean isExpandable(Object elementOrTreePath) {
- return tree.isExpandable(elementOrTreePath);
- }
- public void setAutoExpandLevel(int level) {
- tree.setAutoExpandLevel(level);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewLabelAndContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewLabelAndContentProvider.java
deleted file mode 100644
index 6d065e6a7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewLabelAndContentProvider.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [197550] Fix NPE when refreshing Pending items
- * David McKnight (IBM) - [236505] Remote systems dialog not working
- * Martin Oberhuber (Wind River) - [238519][api] Support styled label decorations
- * David McKnight (IBM) - [238288] use ImageRegistry to store/retrieve images for RSE label providers
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-
-import java.util.Hashtable;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-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.StyledString;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.operations.SystemDeferredTreeContentManager;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-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 flavor, which is used in most cases, and also has
- * a specialized flavor 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 filter string.
- */
-public class SystemViewLabelAndContentProvider extends LabelProvider
- implements ITreeContentProvider, ILabelProvider, ITableLabelProvider, IStyledLabelProvider
- // ,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 boolean _enableDeferredQueries = true;
- private SystemDeferredTreeContentManager manager;
-
- /**
- * 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);
- }
- }
- }
- }
-
-
- /**
- * 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 getViewAdapter(Object o)
- {
- if (o instanceof IContextObject)
- {
- o = ((IContextObject)o).getModelObject();
- }
- 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 ISystemShellProvider)
- shell = ((ISystemShellProvider)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
- return _enableDeferredQueries;
- }
-
- public void setEnableDeferredQueries(boolean enable)
- {
- _enableDeferredQueries = enable;
- }
-
-
- /**
- * @see ITreeContentProvider
- */
- public Object[] getChildren(Object object)
- {
- Object element = object;
- if (object instanceof IContextObject)
- {
- element = ((IContextObject)object).getModelObject();
- }
- ISystemViewElementAdapter adapter = getViewAdapter(element);
- if (supportsDeferredQueries())
- {
- // The adapter needs to be checked to be not null, otherwise
- // we run into an NPE here.
- if (manager != null && adapter != null)
- {
- ISubSystem ss = null;
- if (object instanceof IContextObject)
- {
- ss = ((IContextObject)object).getSubSystem();
- }
- else
- {
- ss = adapter.getSubSystem(object);
- }
- if (ss != null && adapter.supportsDeferredQueries(ss))
- {
- // if (ss.isConnected())
- {
-
- Object[] children = manager.getChildren(object, getViewer());
- 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
- }
-
- if (object instanceof IContextObject)
- {
- children = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
- }
- else
- {
- children = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
- }
-
-
- 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 = getViewAdapter(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)
- {
- ISystemViewElementAdapter adapter = getViewAdapter(element);
- if (adapter!=null) {
- if (element instanceof IContextObject)
- {
- return adapter.hasChildren((IContextObject)element);
- }
- else
- {
- return adapter.hasChildren((IAdaptable)element);
- }
- }
- else
- {
- if (element instanceof IContextObject) {
- element = ((IContextObject)element).getModelObject();
- }
- if (manager != null && 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 SystemDeferredTreeContentManager(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 = getViewAdapter(element);
- if (adapter == null)
- return null;
-
- ImageDescriptor descriptor = adapter.getImageDescriptor(element);
-
- if (descriptor == null)
- return null;
-
- //add any annotations to the image descriptor
- descriptor = decorateImage(descriptor, element);
-
- ImageRegistry imageRegistry = RSEUIPlugin.getDefault().getImageRegistry();
- Image image = imageRegistry.get(descriptor.toString());
-
- //obtain the cached image corresponding to the descriptor
- if (image == null){
- image = descriptor.createImage();
- imageRegistry.put(descriptor.toString(), image);
- }
-
- return image;
- }
- /**
- * Returns the label text for the given object.
- */
- public String getText(Object element)
- {
- ISystemViewElementAdapter adapter = getViewAdapter(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;
- }
-
- /**
- * @InheritDoc
- * @since 3.1
- * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText(java.lang.Object)
- */
- public StyledString getStyledText(Object element) {
- return new StyledString(getText(element));
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMenuListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMenuListener.java
deleted file mode 100644
index fb4a2ce7c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMenuListener.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.events.ArmEvent;
-import org.eclipse.swt.events.MenuEvent;
-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 ISystemViewMenuListener
-{
-
-
- 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();
- Menu menu = (Menu)event.getSource();
- m.setMnemonics(menu);
- if (armListeners) {
- setArmListener(menu);
- }
- menuMnemonicsAdded = true;
- if (doOnce)
- ((Menu)event.getSource()).removeMenuListener(this);
- }
- }
-
- private void setArmListener(Menu menu) {
- MenuItem[] items = menu.getItems();
- for (int i = 0; i < items.length; i++) {
- MenuItem menuItem = items[i];
- setArmListener(menuItem);
- }
- }
-
- private void setArmListener(MenuItem item) {
- item.addArmListener(this);
- Menu menu = item.getMenu();
- if (menu != null) {
- setArmListener(menu);
- }
- }
-
- // --------------------
- // 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);
- }
- }
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMessageAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMessageAdapter.java
deleted file mode 100644
index ddcf5cdc9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewMessageAdapter.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.rse.ui.view.AbstractSystemViewAdapter;
-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
-{
-
- /**
- * 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- 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(IAdaptable element, IProgressMonitor monitor)
- {
- return null;
- }
-
- /**
- * Return true if this object has children. Always false for us.
- */
- public boolean hasChildren(IAdaptable 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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewNewConnectionPromptAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewNewConnectionPromptAdapter.java
deleted file mode 100644
index 8b84716ce..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewNewConnectionPromptAdapter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.view;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemRunAction;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Adapter class for new connection prompt objects.
- */
-public class SystemViewNewConnectionPromptAdapter extends SystemViewPromptableAdapter {
-
- /**
- * @see org.eclipse.rse.internal.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));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
deleted file mode 100644
index 1f660aa15..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPart.java
+++ /dev/null
@@ -1,2038 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * Kevin Doyle (IBM) - [180875] - Added double click listener that handles opening of files
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - Replace SystemRegistry by ISystemRegistry
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * Martin Oberhuber (Wind River) - [190195] Cannot enable new connection prompt in system view
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David Dykstal (IBM) - [191311] enable global properties action
- * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
- * Martin Oberhuber (Wind River) - [197025] Wait for model complete before restoring initial state
- * Martin Oberhuber (Wind River) - [197025][197167] Improved wait for model complete
- * David McKnight (IBM) - [199424] restoring memento state asynchronously
- * David McKnight (IBM) - [187711] Link with Editor handled by extension
- * David Dykstal (IBM) - [226728] NPE during init with clean workspace
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David Dykstal (IBM) - [216858] Need the ability to Import/Export RSE connections for sharing
- * Kevin Doyle (IBM) - [186769] Enable Contributions to Drop Down menu of Remote Systems view -> Preferences
- * David McKnight (IBM) - [244807] System view does not handle restore from cache
- * David McKnight (IBM) - [247544] [performance] Restoring Selection on Restart can cause the UI to freeze
- * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
- * Li Ding (IBM) - [256135] Subsystem not restored in system view tree if subsystem configuration does not support filter
- * David McKnight (IBM) - [257721] Doubleclick doing special handling and expanding
- * David McKnight (IBM) - [250417] Restore from memento flag set to false during restore on startup
- * Martin Oberhuber (Wind River) - [286122] Avoid NPE when restoring memento
- * David McKnight (IBM) - [286670] TVT35:TCT586: CHS: English Strings Found
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.core.runtime.jobs.Job;
-import org.eclipse.jface.action.GroupMarker;
-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.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.jface.window.IShellProvider;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvent;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeEvents;
-import org.eclipse.rse.core.events.ISystemPreferenceChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.core.RSEInitJob;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCollapseAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemImportConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemPreferenceQualifyConnectionNamesAction;
-import org.eclipse.rse.internal.ui.actions.SystemPreferenceRestoreStateAction;
-import org.eclipse.rse.internal.ui.actions.SystemPreferenceShowFilterPoolsAction;
-import org.eclipse.rse.internal.ui.actions.SystemShowPreferencesPageAction;
-import org.eclipse.rse.internal.ui.actions.SystemWorkWithProfilesAction;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-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.SystemRefreshAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAllAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.view.ContextObject;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.IViewLinker;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-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.IEditorPart;
-import org.eclipse.ui.IElementFactory;
-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.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, IShellProvider, ISystemMessageLine, IElementFactory, IPersistableElement, IAdapterFactory, ISystemPreferenceChangeListener, ISelectionChangedListener, IRSEViewPart
-{
-
-
-
- protected SystemView systemView;
- protected ISystemViewInputProvider input = null;
- protected String message, errorMessage;
- protected SystemMessage sysErrorMessage;
- protected IStatusLineManager statusLine = null;
- protected boolean inputIsRoot = true;
-
-
- protected FrameList frameList;
- protected SystemViewPartGotoActionGroup gotoActionGroup;
-
- // link with editor stuff
- protected boolean _isLinkingEnabled = false;
-
- // view linker is used when a link with editor is required
- protected IViewLinker _viewLinker;
-
- // 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 boolean isLinkingEnabled()
- {
- return _isLinkingEnabled;
- }
-
- public void setLinkingEnabled(boolean flag, IViewLinker viewLinker)
- {
- _isLinkingEnabled = flag;
- if (_isLinkingEnabled)
- {
- _viewLinker = viewLinker;
- 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;
-
- if (_viewLinker != null){
- _viewLinker.linkEditorToView(editor, systemView);
- }
- }
- /**
- * 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$
-
- {
- 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 = RSECorePlugin.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());
- actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), systemView.getSelectAllAction());
- actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), systemView.getPropertyDialogAction());
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), systemView.getRefreshAction());
- actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), systemView.getRenameAction());
-
- statusLine = actionBars.getStatusLineManager();
- }
-
- // register global edit actions
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().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);
- getSite().registerContextMenu(ISystemContextMenuConstants.RSE_CONTEXT_MENU, 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
- // ----------------------
- final RSEInitJob initRSEJob = RSEInitJob.getInstance();
- if (initRSEJob == null) {
- //Already initialized - Profiles are loaded, we can restore state right away without blocking
- restoreInitialState();
- } else {
- //Wait until model fully restored, then fire a callback to restore state.
- //Remember current display, since we're definitely on the display thread here
- final Display display = Display.getCurrent();
- Job waitForRestoreCompleteJob = new Job("WaitForRestoreComplete") { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
- try {
- //Wait for initRSEJob.
- initRSEJob.waitForCompletion();
- //callback
- display.asyncExec(new Runnable() {
- public void run() {
- restoreInitialState();
- }
- });
- } catch(InterruptedException e) {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
- };
- waitForRestoreCompleteJob.setSystem(true);
- waitForRestoreCompleteJob.schedule();
- }
- }
-
- /**
- * Restore initial state of the SystemView. Can only be done
- * once the RSE Model has been fully restored, so this may
- * need to run in a callback.
- */
- private void restoreInitialState() {
- if ((fMemento != null) && (input instanceof ISystemRegistry))
- restoreState(fMemento);
- //fMemento = null;
-
- // Register for preference change events
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- 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 == RSECorePlugin.getTheSystemRegistry()) && (RSECorePlugin.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)
- {
- if (_viewLinker != null)
- {
- Object obj = selection.getFirstElement();
- IWorkbenchPage page = getSite().getPage();
- _viewLinker.linkViewToEditor(obj, page);
- }
- }
-
-
- /**
- * Fills the local tool bar with actions.
- */
- protected void fillLocalToolBar(boolean showConnectionActions)
- {
- IActionBars actionBars = getViewSite().getActionBars();
- SystemRefreshAction refreshAction = new SystemRefreshAction(getShell());
- refreshAction.setId(ActionFactory.REFRESH.getId());
- refreshAction.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
- refreshAction.setSelectionProvider(systemView);
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
-
- // Note: Keep the group marker and separators in place! ISV's needs
- // them to find their places within the toolbar. Re-use as
- // much constants from the remote system view context menu as possible.
- // This in particular makes orientating and contributing via plugin.xml
- // much easier.
-
- IToolBarManager toolBarMgr = actionBars.getToolBarManager();
- if (showConnectionActions)
- {
- toolBarMgr.add(new GroupMarker(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING));
- SystemNewConnectionAction newConnAction = new SystemNewConnectionAction(getShell(), false, systemView); // false implies not from popup menu
- toolBarMgr.add(newConnAction);
- }
-
- toolBarMgr.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BUILD));
- refreshAction.setSelectionProvider(systemView);
- toolBarMgr.add(refreshAction);
-
- toolBarMgr.add(new Separator(ISystemContextMenuConstants.GROUP_GOTO));
- SystemViewPartGotoActionGroup gotoActions = new SystemViewPartGotoActionGroup(this);
- gotoActions.fillActionBars(actionBars);
-
- // defect 41203
- toolBarMgr.add(new Separator(ISystemContextMenuConstants.GROUP_EXPAND));
- SystemCollapseAllAction collapseAllAction = new SystemCollapseAllAction(getShell());
- collapseAllAction.setSelectionProvider(systemView);
- toolBarMgr.add(collapseAllAction);
-
- IMenuManager menuMgr = actionBars.getMenuManager();
- populateSystemViewPulldownMenu(menuMgr, getShell(), showConnectionActions, this, systemView);
-
- // [179181] [api] Dynamic system type provider need a hook to add dynamic system type specific toolbar groups.
- IRSESystemType[] systemTypes = SystemWidgetHelpers.getValidSystemTypes(null);
- for (int i = 0; i < systemTypes.length; i++) {
- IRSESystemType systemType = systemTypes[i];
- Object adapter = systemType.getAdapter(RSESystemTypeAdapter.class);
- if (adapter instanceof RSESystemTypeAdapter) {
- ((RSESystemTypeAdapter)adapter).addCustomToolbarGroups(this);
- }
- }
- }
-
- /**
- * 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);
- SystemImportConnectionAction importConnectionAction = new SystemImportConnectionAction();
- importConnectionAction.setShell(shell);
- importConnectionAction.setText(SystemResources.RESID_IMPORT_CONNECTION_LABEL_LONG);
- SystemWorkWithProfilesAction wwProfilesAction = new SystemWorkWithProfilesAction(shell);
- menuMgr.add(newConnectionAction);
- menuMgr.add(importConnectionAction);
- 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 display any contributed action shortcuts for bringing up
- // a particular preference page...
- MenuManager subMenu = new MenuManager(SystemResources.ACTION_CASCADING_PREFERENCES_LABEL, ISystemContextMenuConstants.MENU_PREFERENCES);
- menuMgr.add(subMenu);
-
- // The initial "RSE" Preference page action is added hardcoded.
- // This comes from the former SystemCascadingPreferencesAction.
- // FIXME will be moved to using command/hander extension point as per
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=186769
- SystemShowPreferencesPageAction action = new SystemShowPreferencesPageAction();
- action.setPreferencePageID("org.eclipse.rse.ui.preferences.RemoteSystemsPreferencePage"); //$NON-NLS-1$
- action.setText(SystemResources.ACTION_SHOW_PREFERENCEPAGE_LABEL);
- action.setToolTipText(SystemResources.ACTION_SHOW_PREFERENCEPAGE_TOOLTIP);
- action.setHelp("org.eclipse.rse.ui.aprefrse"); //$NON-NLS-1$
- subMenu.add(action);
- subMenu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_ADDITIONS));
-
- 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);
- RSECorePlugin.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 = RSECorePlugin.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.getQualifyConnectionNames());
- else if ((event.getType() == ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS) && (showFilterPoolsAction != null))
- showFilterPoolsAction.setChecked(SystemPreferencesManager.getShowFilterPools());
- else if ((event.getType() == ISystemPreferenceChangeEvents.EVENT_RESTORESTATE) && (restoreStateAction != null))
- restoreStateAction.setChecked(SystemPreferencesManager.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.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, RSECorePlugin.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.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.getViewAdapter(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))
- {
- int MAX_SELECTION = 1;
- IMemento selectionMem = memento.createChild(TAG_SELECTION);
- for (int i = 0; i < elements.length && i < MAX_SELECTION; i++)
- {
- Object o = elements[i];
- ISystemViewElementAdapter adapter = systemView.getViewAdapter(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.getViewAdapter(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(RSECorePlugin.getTheSystemRegistry());
- restoreAction.schedule();
-
- /* DKM - Moved to RestoreStateRunnable
- * - resolves invalid shell problem at startup
- * *
- //System.out.println("SYSTEMVIEWPART: restoreState");
- if (!SystemPreferencesManager.getPreferencesManager().getRememberState())
- return;
-
- // 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);
- //event = new SystemResourceChangeEvent(ro.name,ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE,
- // SystemViewDummyObject.getInstance()); // This tells SystemView to expand this remote object, but don't select a child
- //systemView.systemResourceChanged(event);
- systemView.refreshRemoteObject(ro.name, SystemViewDummyObject.getInstance(), true);
- }
- }
- }
-
- // 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);
- }
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(v,ISystemResourceChangeEvents.EVENT_SELECT_REMOTE,null);
- systemView.systemResourceChanged(event);
- }
- }
- 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 = RSECorePlugin.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 = index != -1 ? token.substring(0, index) : null;
- 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 (subsystem != null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
- remoteObject = new RemoteObject(token, subsystem, null, null);
- break;
- }
-
- 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 (subsystem != null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
- remoteObject = new RemoteObject(token, subsystem, null, null);
- break;
- }
-
- 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 (subsystem!=null && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
- remoteObject = new RemoteObject(token, subsystem, null, null);
- break;
- }
-
- 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 && !(subsystem.getSubSystemConfiguration().supportsFilters())) {
- remoteObject = new RemoteObject(token, subsystem, null, null);
- break;
- }
-
- 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 ShowRestoredRemoteObject implements Runnable
- {
- private Object _restoredObject;
- private Object[] _children;
- public ShowRestoredRemoteObject(Object restoredObject, Object[] children)
- {
- _restoredObject = restoredObject;
- _children = children;
- }
-
- public void run()
- {
- Vector matches = new Vector();
- systemView.findAllRemoteItemReferences(_restoredObject, _restoredObject, matches);
- if (matches.size() > 0){
- TreeItem item = (TreeItem)matches.get(0);
- systemView.createTreeItems(item, _children);
- item.setExpanded(true);
- }
-
- }
- }
-
-
- protected class RestoreRemoteObjects extends Job
- {
- private Vector _remoteObjectsToRestore;
- private Vector _remoteObjectsToSelect;
-
- public RestoreRemoteObjects(Vector remoteObjects, Vector remoteObjectsToSelect)
- {
- super("Restore Remote Objects"); //$NON-NLS-1$
- setSystem(true);
- _remoteObjectsToRestore = remoteObjects;
- _remoteObjectsToSelect = remoteObjectsToSelect;
- }
-
- protected IStatus run(IProgressMonitor monitor)
- {
- IStatus status = doRestore(monitor);
- if (status.isOK()){
- status = doSelect(monitor);
- }
- return status;
- }
-
- protected IStatus doSelect(IProgressMonitor monitor)
- {
- Vector v = new Vector();
- int MAX_SELECT = 1;
- for (int i = 0; i < _remoteObjectsToSelect.size() && i < MAX_SELECT; i++){
-
- Object object = _remoteObjectsToSelect.get(i);
- if (object instanceof RemoteObject)
- {
- RemoteObject robject = (RemoteObject)object;
- v.addElement(robject.name);
- }
- }
- SystemResourceChangeEvent event = new SystemResourceChangeEvent(v, ISystemResourceChangeEvents.EVENT_SELECT_REMOTE, null);
- systemView.systemResourceChanged(event);
-
- return Status.OK_STATUS;
- }
-
-
- protected IStatus doRestore(IProgressMonitor monitor)
- {
- boolean restoreFromCache = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE);
-
- for (int i = 0; i < _remoteObjectsToRestore.size(); i++){
-
- if (monitor.isCanceled()){
- return Status.CANCEL_STATUS;
- }
-
- Object object = _remoteObjectsToRestore.get(i);
- if (object instanceof RemoteObject)
- {
- RemoteObject robject = (RemoteObject)object;
-
- ISubSystem ss = robject.subsystem;
-
- // yantzi: artemis 6.0: notify subsystems that this is a restore from memento so they
- // can optionally use the cache if desired
- if (ss != null && restoreFromCache && ss.supportsCaching()){
- ss.getCacheManager().setRestoreFromMemento(true);
- }
-
- if (!ss.isOffline()){
- String path = robject.name;
- ISystemFilterReference fref = robject.fRef;
-
- try
- {
- Object actualObject = ss.getObjectWithAbsoluteName(path, monitor);
-
- if (actualObject instanceof IAdaptable)
- {
- // get the adapter
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)actualObject).getAdapter(ISystemViewElementAdapter.class);
-
- // get the context
- ContextObject contextObject = new ContextObject(actualObject, ss, fref);
-
- // get the children
- Object[] children = adapter.getChildren(contextObject, monitor);
-
- ShowRestoredRemoteObject showRunnable = new ShowRestoredRemoteObject(actualObject, children);
- Display.getDefault().asyncExec(showRunnable);
- }
-
- }
- catch (Exception e){
- // unexpected
- }
- }
-
- // yantzi: artemis 6.0: reset restore from memento flag
- if (ss != null && restoreFromCache && ss.supportsCaching()){
- ss.getCacheManager().setRestoreFromMemento(false);
- }
- }
- else if (object instanceof ISystemFilterReference)
- {
-
- ISystemFilterReference fref = (ISystemFilterReference)object;
- ISubSystem ss = fref.getSubSystem();
-
- // yantzi: artemis 6.0: notify subsystems that this is a restore from memento so they
- // can optionally use the cache if desired
- if (ss != null && restoreFromCache && ss.supportsCaching()){
- ss.getCacheManager().setRestoreFromMemento(true);
- }
- boolean isRestoringCache = ss.getCacheManager() != null && ss.getCacheManager().isRestoreFromMemento();
-
- if (!ss.isOffline()){
- if (!ss.isConnected() && !isRestoringCache){
- try
- {
- ss.connect(monitor, false);
- }
- catch (Exception e){
- return Status.CANCEL_STATUS;
- }
- }
- if (ss.isConnected() || isRestoringCache)
- {
- // get the adapter
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)object).getAdapter(ISystemViewElementAdapter.class);
-
- // get the context
- ContextObject contextObject = new ContextObject(fref, ss, fref);
-
- // get the children
- Object[] children = adapter.getChildren(contextObject, monitor);
-
- ShowRestoredRemoteObject showRunnable = new ShowRestoredRemoteObject(fref, children);
- Display.getDefault().asyncExec(showRunnable);
- }
- }
-
- // yantzi: artemis 6.0: reset restore from memento flag
- if (ss != null && restoreFromCache && ss.supportsCaching()){
- ss.getCacheManager().setRestoreFromMemento(false);
- }
- }
- }
-
-
- return Status.OK_STATUS;
- }
- }
-
- 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$
- }
-
- public boolean equals(RemoteObject compared)
- {
- if (name.equals(compared.name) &&
- subsystem == compared.subsystem &&
- fRef == compared.fRef)
- return true;
-
- return false;
- }
- }
-
- 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.getRememberState())
- return Status.CANCEL_STATUS;
-
- // 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.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);
- Vector remoteElementsToRestore = new Vector();
- List cacheSubSystemList = new ArrayList();
- if (childMem != null)
- {
- ArrayList elements = new ArrayList();
-
- 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)
-
- 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
- {
- remoteElementsToRestore.add(element);
- //System.out.println("Added to remote expansion list: " + element);
- }
- else if (element instanceof ISystemFilterReference)
- {
- remoteElementsToRestore.add(element); // filters trigger asynchronous queries, so best to expand this with remote items
-
- 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());
- }
-
- // restoreSelection
- childMem = memento.getChild(TAG_SELECTION);
-
- Vector remoteElementsToSelect = new Vector();
- if (childMem != null)
- {
- ArrayList list = new ArrayList();
-
- 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
- remoteElementsToSelect.add(element);
- else
- list.add(element);
- //System.out.println("Added to selection list: " + element);
- }
- if (list.size()>0) {
- systemView.setSelection(new StructuredSelection(list));
- }
- }
-
- if (remoteElementsToRestore.size() > 0)
- {
- RestoreRemoteObjects restoreRemoteJob = new RestoreRemoteObjects(remoteElementsToRestore, remoteElementsToSelect);
- restoreRemoteJob.schedule();
- }
-
- 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)
- {
- }
- }
-
-
- String linkWithEditor = memento.getString(TAG_LINKWITHEDITOR);
- if (linkWithEditor != null)
- {
- if (linkWithEditor.equals("t")) //$NON-NLS-1$
- _isLinkingEnabled = true;
- else
- _isLinkingEnabled = false;
- }
- else
- {
- _isLinkingEnabled = false;
- }
-
-
-
- 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.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.getViewAdapter(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.getRememberState())
- return null;
- else
- return this;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartFrameSource.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartFrameSource.java
deleted file mode 100644
index 0650836d7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartFrameSource.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartGotoActionGroup.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartGotoActionGroup.java
deleted file mode 100644
index afc81cf81..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPartGotoActionGroup.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.view;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.rse.internal.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPromptableAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPromptableAdapter.java
deleted file mode 100644
index 8e413ef34..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPromptableAdapter.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.actions.SystemRunAction;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.model.ISystemPromptableObject;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-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
-{
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- 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(IAdaptable element, IProgressMonitor monitor)
- {
- // Note: Do _not_ call promptable.run(getShell()) here. It leads only to
- // senseless invocations of the new connection wizard dialog on refreshs!
- // It cannot be a desirable effect of refreshing the system view to create
- // new connections. We leave the invocation of the dialog to the double
- // click handler and the context menu.
- ISystemPromptableObject promptable = (ISystemPromptableObject)element;
- 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(IAdaptable element)
- {
- ISystemPromptableObject promptable = (ISystemPromptableObject)element;
- return promptable.hasChildren();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#handleDoubleClick(java.lang.Object)
- */
- public boolean handleDoubleClick(Object element) {
- ISystemPromptableObject promptable = (ISystemPromptableObject)element;
- promptable.run(getShell());
- 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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPropertyTester.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPropertyTester.java
deleted file mode 100644
index 0a476b5c1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewPropertyTester.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.internal.ui.view;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-/**
- * Default RSE System View property tester to support org.eclipse.ui.menu extension
- * point contributions.
- */
-public class SystemViewPropertyTester extends PropertyTester {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- // The receiver must be the real object and not the adapter itself. Otherwise
- // most of the property testings will fail and will evaluate to false.
- //
- // Therefor, do not use the property tester within an <adapt> expression
- // where the target adapter type is ISystemViewElementAdapter.
- //
- // Example where the testing will fail:
- // ...
- // <adapt type="org.eclipse.rse.ui.view.ISystemViewElementAdapter">
- // <test property=org.eclipse.rse.ui.systemTypeId" value="org.eclipse.rse.systemtype.local"/>
- // </adapt>
- // ...
- //
- assert !(receiver instanceof AbstractSystemViewAdapter);
-
- ISystemViewElementAdapter adapter = null;
- // Try to adapt the receiver to an ISystemViewElement adapter.
- if (receiver instanceof IAdaptable) {
- // Use IAdaptable#getAdapter(...) instead of Platform.getAdapterManager().getAdapter(...) to
- // give element contributors the chance to provide custom adapter implementations even if there
- // is an adapter factory registered providing element adaptation to ISystemViewElementAdapter.
- // This way we can take away a lot of pain from contributors otherwise struggeling with adapter factories.
- adapter = (ISystemViewElementAdapter)((IAdaptable)receiver).getAdapter(ISystemViewElementAdapter.class);
- } else {
- // Fallback to the adapter manager
- adapter = (ISystemViewElementAdapter)Platform.getAdapterManager().getAdapter(receiver, ISystemViewElementAdapter.class);
- }
-
- // If we succeeded to adapt to ISystemViewElementAdapter and the expected value is
- // of string type (IActionFilter#test(...) supports string testing only, we can
- // forward the property test to the original IActionFilter test implementation.
- if (adapter != null && expectedValue instanceof String) {
- return adapter.testAttribute(receiver, property, (String)expectedValue);
- }
-
- // Return false in any case the adaptation fails or if the expected
- // value is not of String type.
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.java
deleted file mode 100644
index 37718f4c2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.internal.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;
-
- // 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_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_FILTERSTRING_LABEL;
- public static String RESID_PROPERTY_FILTERSTRING_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;
-
- // files - still needed outside of files.ui
- 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_FILE_PATH_LABEL;
- public static String RESID_PROPERTY_FILE_PATH_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_PROPERTYSET_TYPE_VALUE;
-
- // Miscellaneous / common
- 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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.properties
deleted file mode 100644
index f8babdf3d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewResources.properties
+++ /dev/null
@@ -1,117 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 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:
-# David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
-# David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
-# Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
-###############################################################################
-
-# 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
-
-#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_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_FILTERSTRING_LABEL=Filter string
-RESID_PROPERTY_FILTERSTRING_TOOLTIP=Filter string used to get this resource
-
-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
-
-# generic files - needed outside of files.ui
-RESID_PROPERTY_FILE_TYPE_FILE_VALUE=File
-RESID_PROPERTY_FILE_TYPE_FOLDER_VALUE=Folder
-RESID_PROPERTY_FILE_TYPE_ROOT_VALUE=Root
-RESID_PROPERTY_FILE_PATH_LABEL=Location
-RESID_PROPERTY_FILE_PATH_TOOLTIP=Path containing this file or folder
-
-#MESSAGE PROPERTIES
-RESID_PROPERTY_MESSAGE_TYPE_VALUE=Message
-
-#TEAM VIEW PROPERTIES
-RESID_PROPERTY_TEAM_CATEGORY_TYPE_VALUE=Category
-RESID_PROPERTY_TEAM_SSFACTORY_TYPE_VALUE=SubSystem factory
-RESID_PROPERTY_TEAM_PROPERTYSET_TYPE_VALUE=Property set
-
-
-RESID_SCRATCHPAD=Scratchpad
-RESID_REMOTE_SCRATCHPAD=Remote Scratchpad
-
-RESID_FETCHING = Fetching Remote Resources
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewRootInputAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewRootInputAdapter.java
deleted file mode 100644
index 96cafe7cb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewRootInputAdapter.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [190195] Cannot enable new connection prompt in system view
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.internal.model.SystemNewConnectionPromptObject;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Adapter for the root-providing object of the SystemView tree viewer.
- */
-public class SystemViewRootInputAdapter extends AbstractSystemViewAdapter
-{
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- 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(IAdaptable element, IProgressMonitor monitor)
- {
- 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(IAdaptable 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()
- {
- return SystemPreferencesManager.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";
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewScratchpadAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewScratchpadAdapter.java
deleted file mode 100644
index 5097b8b62..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewScratchpadAdapter.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.internal.model.SystemScratchpad;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * Adapter for the root-providing object of the SystemView tree viewer.
- */
-public class SystemViewScratchpadAdapter extends AbstractSystemViewAdapter implements 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.getTheSystemRegistryUI().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 SystemViewResources.RESID_REMOTE_SCRATCHPAD;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- 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(IAdaptable element, IProgressMonitor monitor)
- {
- SystemScratchpad pad = (SystemScratchpad)element;
- return pad.getChildren();
- }
-
- /**
- * Return true if this object has children
- */
- public boolean hasChildren(IAdaptable 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) throws Exception
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean validateDrop(Object src, Object target, boolean sameSystem)
- {
- return true;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java
deleted file mode 100644
index 5546b573a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java
+++ /dev/null
@@ -1,818 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [195399] Improve String display for default port 0
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-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.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.subsystems.SubSystemConfigurationProxyAdapter;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorPortInput;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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
-{
- 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)
- {
- // does not make sense adding unique actions per multi-selection
- if (selection.size() == 1) {
- Object element = selection.getFirstElement();
- ISubSystem ss = (ISubSystem)element;
- ISubSystemConfiguration ssFactory = ss.getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter == null) {
- // FIXME Fallback to default SubSystemConfigurationAdapter, such
- // that we get at least the "connect" and other common actions
- // for subsystems before their adapter is loaded. Note that this
- // means that the popular "launch Shell" action will not be
- // available before the rse.shells.ui plugin is loaded; but that
- // should be fixed by contributing that action via plugin.xml,
- // rather than forcing full bundle activation here from the
- // menu. See
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=226550
- // //adapter = new SubSystemConfigurationAdapter();
- Platform.getAdapterManager().loadAdapter(ssFactory, ISubSystemConfigurationAdapter.class.getName());
- adapter = (ISubSystemConfigurationAdapter) ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- // if (adapter == null) {
- // //TODO is this right? It deprives clients from the ability
- // //to get rid of the standard actions contributed by the
- // //default adapter. We shouldn't do that.
- // adapter = new SubSystemConfigurationAdapter();
- // }
- }
- if (adapter != null) {
- // Lazy Loading: Dynamic contributed subsystem actions will be
- // provided only once the corresponding plugin is activated
- // (adapter factory loaded). This means, that by default,
- // dynamic actions are only shown after connecting a subsystem.
- // If a subsystem needs to show these earlier, it needs to
- // provision for eager bundle activation to ensure that its
- // ISubSystemConfigurationAdapter is loaded -- or, provide these
- // actions by static plugin.xml markup.
- IAction[] actions = adapter.getSubSystemActions(menu, selection, shell, menuGroup, ssFactory, ss);
- if (actions != null)
- {
- for (int idx = 0; idx < actions.length; idx++) {
- IAction action = actions[idx];
- menu.add(menuGroup, action);
- }
- }
- }
- }
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_NEW, new GroupMarker(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING));// user or BP/ISV additions
- }
-
- /**
- * 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 = ss.getSubSystemConfiguration();
- if (ssFactory != null)
- {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)ssFactory.getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter != null) {
- if (ss.isConnected())
- return adapter.getLiveImage(ssFactory);
- else
- return adapter.getImage(ssFactory);
- } else {
- // get image from proxy
- ISubSystemConfigurationProxy proxy = ssFactory.getSubSystemConfigurationProxy();
- SubSystemConfigurationProxyAdapter proxyAdapter = (SubSystemConfigurationProxyAdapter) Platform.getAdapterManager().getAdapter(proxy,
- SubSystemConfigurationProxyAdapter.class);
- if (proxyAdapter != null) {
- if (ss.isConnected())
- return proxyAdapter.getLiveImageDescriptor();
- else
- return proxyAdapter.getImageDescriptor();
- } else {
- SystemBasePlugin.logWarning("Unexpected error: SubSystemConfiguration has no adapter and no proxyAdapter: " + ss.getName()); //$NON-NLS-1$
- return null;
- }
- }
- }
- else
- {
- SystemBasePlugin.logWarning("Unexpected error: SubSystemConfiguration 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- ISubSystem ss = (ISubSystem)element;
- String suffix = ss.getName();
- Class serviceType = ss.getServiceType();
- if (serviceType != null) {
- suffix = serviceType.toString();
- }
- return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + suffix; //$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 RSECorePlugin.getTheSystemRegistry().getHost(ss.getSystemProfile(),ss.getHostAliasName());
- }
-
- /**
- * Return the children of this object
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- //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(IAdaptable 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.setDescription(SystemViewResources.RESID_PROPERTY_PORT_TOOLTIP);
- propertyPortDescriptor.setValidator(new ValidatorPortInput());
- propertyDescriptorArray[++idx] = propertyPortDescriptor;
- //propertyDescriptorArray[++idx] = getPortDescriptor();
-
- // connected
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_CONNECTED, SystemViewResources.RESID_PROPERTY_CONNECTED_LABEL, SystemViewResources.RESID_PROPERTY_CONNECTED_TOOLTIP);
-
- // vrm
- propertyDescriptorArray[++idx] = createSimplePropertyDescriptor(ISystemPropertyConstants.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(NLS.bind(SystemPropertyResources.RESID_PORT_DYNAMICSELECT, "0")); //$NON-NLS-1$
- 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(ISystemPropertyConstants.P_USERID))
- return setUserIdPropertyData(userIdData, ss);
- else if (name.equals(ISystemPropertyConstants.P_PORT))
- return getPortString(ss);
- else if (name.equals(ISystemPropertyConstants.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(ISystemPropertyConstants.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 (adapter != null) {
- // Lazy Loading: Since this is called from opening a context
- // menu, Dynamic Validator will only be available once the
- // ISubSystemConfigurationAdapter is loaded, i.e. after
- // connecting.
- // If a subsystem wants to provision for having the validator
- // available earlier, it needs to eagerly load the bundle that
- // declares its ISubSystemConfigurationAdapter.
- 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(ISystemPropertyConstants.P_USERID))
- changed = changed_userId;
- else if (property.equals(ISystemPropertyConstants.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(ISystemPropertyConstants.P_USERID))
- {
- updateUserId(ss, original_userIdData);
- changed_userId = false;
- }
- else if (property.equals(ISystemPropertyConstants.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(ISystemPropertyConstants.P_USERID))
- {
- updateUserId(ss, (SystemInheritablePropertyData)value);
- changed_userId = true;
- }
- else if (name.equals(ISystemPropertyConstants.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(org.eclipse.rse.core.model.IHost)} 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 = RSECorePlugin.getTheSystemRegistry();
- 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, IProgressMonitor monitor)
- {
- 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 SystemAdapterHelpers.getViewAdapter(parent, getViewer()).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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/BrowseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/BrowseAction.java
deleted file mode 100644
index 250581ae1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/BrowseAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.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()
- {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearAction.java
deleted file mode 100644
index 87b800b27..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.monitor;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-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));
-
- setToolTipText(SystemResources.ACTION_CLEAR_ALL_TOOLTIP);
- // 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearSelectedAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearSelectedAction.java
deleted file mode 100644
index a30f9f804..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/ClearSelectedAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.monitor;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-
-
-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));
-
- setToolTipText(SystemResources.ACTION_CLEAR_SELECTED_TOOLTIP);
- // 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());
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java
deleted file mode 100644
index 775c5e63d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java
+++ /dev/null
@@ -1,587 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562] dont implement ISystemThemeConstants
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [177587] changed wrapped selection provider in setFocus()
- * Kevin Doyle (IBM) - [212940] Duplicate Help Context Identifiers
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.internal.ui.SystemResources;
-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.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.SystemTableView;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-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.Table;
-import org.eclipse.swt.widgets.Text;
-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, 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;
-
-
- public PollingThread()
- {
- _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((IAdaptable)_inputObject, monitor);
- if (children != null)
- {
- SystemTableViewProvider provider = (SystemTableViewProvider)_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()
- {
- ISystemRegistry registry = RSECorePlugin.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()
- {
- SystemTableView view = _viewer;
- view.getTable().selectAll();
- view.setSelection(view.getSelection());
- }
- }
-
-
- private SystemTableView _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);
-
- // global actions
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().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()
- {
- if (_viewPart != null)
- _viewPart.setActiveViewerSelectionProvider(_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)
- {
- Table table = _viewer.getTable();
-
- Color bgcolour = _tabFolderPage.getBackground();
-
- table.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.addDoubleClickListener(new IDoubleClickListener()
- {
- public void doubleClick(DoubleClickEvent event)
- {
- handleDoubleClick(event);
- }
- });
-
- //TableLayout layout = new TableLayout();
- //tree.setLayout(layout);
- //tree.setLayout(new GridLayout())
- table.setHeaderVisible(false);
- table.setLinesVisible(false);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- table.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 SystemTableView 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/internal/ui/view/monitor/MonitorViewWorkbook.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java
deleted file mode 100644
index ee99afab0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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.
- * Kevin Doyle (IBM) - [177587] createTabItem sets the wrapped selection provider
- * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
- * Zhou Renjian (Kortide) - [282239] Monitor view does not update icon according to connection status
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.monitor;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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 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 SystemTableView 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);
-
- SystemTableView viewer = monitorViewPage.getViewer();
- if (_viewPart != null)
- {
- _viewPart.setActiveViewerSelectionProvider(viewer);
- _viewPart.getSite().registerContextMenu(viewer.getContextMenuManager(), viewer);
- _viewPart.getSite().registerContextMenu(ISystemContextMenuConstants.RSE_CONTEXT_MENU, 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();
- }
- }
- }
- }
-
- // Fix bug#282239: Monitor view does not update icon according to connection status
- public void updateTitleIcon(IAdaptable 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 && page.getInput() == root)
- {
- setTabTitle(root, item);
- break;
- }
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorUI.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorUI.java
deleted file mode 100644
index 1c349f000..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorUI.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.monitor;
-
-import org.eclipse.rse.ui.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/internal/ui/view/monitor/SystemMonitorViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java
deleted file mode 100644
index bf95fb1e9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java
+++ /dev/null
@@ -1,1142 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - 146339 Added refresh action graphic.
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [177587] Made MonitorViewPart a SelectionProvider
- * Kevin Doyle (IBM) - [160378] Subset action should be disabled when there are no tabs in Monitor
- * Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste
- * Kevin Doyle (IBM) - [212940] Duplicate Help Context Identifiers
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Zhou Renjian (Kortide) - [282239] Monitor view does not update icon according to connection status
- * David McKnight (IBM) - [294663] bad cast in monitor view part refresh action
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.ISelectionProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.IRSEViewPart;
-import org.eclipse.rse.ui.view.ISystemTableViewColumnManager;
-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.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,
- ISystemShellProvider,
- ISystemRemoteChangeListener,
- ISystemMessageLine,
- IRSEViewPart,
- ISelectionProvider
-{
-
-
- 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);
- }
- ((SystemTableViewProvider) getViewer().getContentProvider()).flushCache();
- getViewer().refresh();
-
- // refresh layout too
- //_viewer.computeLayout(true);
-
- }
- }
- private class SelectColumnsAction extends BrowseAction
- {
-
- class SelectColumnsDialog extends SystemPromptDialog
- {
- private ISystemViewElementAdapter _adapter;
- private ISystemTableViewColumnManager _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, ISystemTableViewColumnManager columnManager)
- {
- super(shell, SystemResources.RESID_TABLE_SELECT_COLUMNS_LABEL);
- setToolTipText(SystemResources.RESID_TABLE_SELECT_COLUMNS_TOOLTIP);
- _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()
- {
- SystemTableView viewer = getViewer();
- ISystemTableViewColumnManager 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;
-
- private ISelectionProvider viewerProvider = null;
- private ArrayList selectionListeners = new ArrayList();
-
- private ISelectionChangedListener selectionListener = 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 SystemTableView 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 + "mntr0000"); //$NON-NLS-1$
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.addSystemResourceChangeListener(this);
- registry.addSystemRemoteChangeListener(this);
-
-
- RestoreStateRunnable restore = new RestoreStateRunnable();
- Display.getCurrent().asyncExec(restore);
-
- getSite().setSelectionProvider(this);
- selectionListener = new ISelectionChangedListener() {
- public void selectionChanged (SelectionChangedEvent event)
- {
- for (int i = 0; i < selectionListeners.size(); i++)
- {
- if (selectionListeners.get(i) instanceof ISelectionChangedListener)
- {
- ((ISelectionChangedListener) selectionListeners.get(i)).selectionChanged(event);
- }
- }
- }
- };
-
-
- fillLocalToolBar();
-
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _folder.dispose();
-
- ISystemRegistry registry = RSECorePlugin.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();
- _subsetAction.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 addSelectionChangedListener(ISelectionChangedListener listener)
- {
- if (selectionListeners != null)
- selectionListeners.add(listener);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener)
- {
- if (selectionListeners != null)
- selectionListeners.remove(listener);
- }
-
- public ISelection getSelection()
- {
- if (viewerProvider == null)
- return null;
- else
- return viewerProvider.getSelection();
- }
-
- /**
- * Sets the wrapped selection provider.
- * This method should only be called when the viewer changes.
- * @param newProvider The new wrapped selection provider.
- */
- public void setActiveViewerSelectionProvider(ISelectionProvider newProvider)
- {
- if (viewerProvider != null)
- viewerProvider.removeSelectionChangedListener(selectionListener);
-
- viewerProvider = newProvider;
-
- if (newProvider != null)
- {
- newProvider.addSelectionChangedListener(selectionListener);
-
- // Create a new event and tell all listeners about it, so that the properties
- // view is updated to show the new viewers selected object
- SelectionChangedEvent event = new SelectionChangedEvent(newProvider, newProvider.getSelection());
- for (int i = 0; i < selectionListeners.size(); i++)
- {
- if (selectionListeners.get(i) instanceof ISelectionChangedListener)
- {
- ((ISelectionChangedListener) selectionListeners.get(i)).selectionChanged(event);
- }
- }
- }
- }
-
- public void setSelection(ISelection selection)
- {
- if (viewerProvider != null)
- viewerProvider.setSelection(selection);
- }
-
- 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();
- SystemTableView viewer = getViewer();
- if (viewer != null)
- {
- Object input = viewer.getInput();
- switch (event.getType())
- {
- case ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE:
- {
- _folder.removeDisconnected();
- updateActionStates();
- }
- break;
-
- // Fix bug#282239: Monitor view does not update icon according to connection status
- case ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
- {
- _folder.updateTitleIcon((IAdaptable)child);
- }
- 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.core.events.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
- Object remoteResource = event.getResource();
-
- java.util.List remoteResourceNames = null;
- if (remoteResource instanceof java.util.List)
- {
- remoteResourceNames = (java.util.List) remoteResource;
- remoteResource = remoteResourceNames.get(0);
- }
-
- Object child = event.getResource();
-
- SystemTableView 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;
- Widget item = e.item;
- Object data = item.getData();
- MonitorViewPage page = null;
-
- if (data instanceof MonitorViewPage)
- page = (MonitorViewPage) data;
-
- // Set the wrapped viewer to be the viewer of the new selected tab
- if (page != null)
- {
- SystemTableView viewer = page.getViewer();
- setActiveViewerSelectionProvider(viewer);
- }
-
- 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/internal/ui/view/monitor/TabFolderLayout.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/TabFolderLayout.java
deleted file mode 100644
index 3328c9879..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/TabFolderLayout.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/BrowseAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/BrowseAction.java
deleted file mode 100644
index 2b390b576..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/BrowseAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split SystemRegistryUI from SystemRegistry implementation
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.scratchpad;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.internal.model.SystemRegistryUI;
-import org.eclipse.rse.ui.internal.model.SystemScratchpad;
-
-
-
-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 = SystemRegistryUI.getInstance().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/internal/ui/view/scratchpad/ClearAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java
deleted file mode 100644
index aefbac41f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearAction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [189150] setSelection(null) added to clear()
- * Kevin Doyle (IBM) - [194899] Remove All should do a full reset of the scratchpad
- *******************************************************************************/
-
-
-package org.eclipse.rse.internal.ui.view.scratchpad;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-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));
-
- setToolTipText(SystemResources.ACTION_CLEAR_ALL_TOOLTIP);
- // 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()
- {
- // Reset the SystemScratchpad
- _scratchPad.clearChildren();
- // Set the input of the view to SystemScratchpad if it has changed
- if (_view.getInput() != _scratchPad) {
- _view.setInput(_scratchPad);
- }
- // Refresh the Scratchpad and update action states
- RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad));
- _view.setSelection(null);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java
deleted file mode 100644
index f4f717c8d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/ClearSelectedAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [189150] setSelection(null) added to clear()
- * Kevin Doyle (IBM) - [193148] Clear Selected Action enabled when not on a root element
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.scratchpad;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-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));
-
- setToolTipText(SystemResources.ACTION_CLEAR_SELECTED_TOOLTIP);
- // 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;
- }
- else
- {
- if (selection instanceof TreeSelection)
- {
- TreeSelection treeSelection = (TreeSelection) selection;
- TreePath[] paths = treeSelection.getPathsFor(obj);
- // if paths[0].getSegmentCount is not 1 then it's not a root
- if (paths.length > 0 && paths[0].getSegmentCount() != 1)
- {
- 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());
- }
- RSECorePlugin.getTheSystemRegistry().fireEvent(new SystemResourceChangeEvent(_scratchPad, ISystemResourceChangeEvents.EVENT_REFRESH, _scratchPad));
- _view.setSelection(null);
- //_view.updateActionStates();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java
deleted file mode 100644
index 7eaa5aeae..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java
+++ /dev/null
@@ -1,1976 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [192278] Removed handleKeyPressed
- * Kevin Doyle (IBM) - [189150] _selectionFlagsUpdated reset after clear action performed
- * Kevin Doyle (IBM) - [195537] Use Hashlookup and ElementComparer
- * Kevin Doyle (IBM) - [189423] Scratchpad not completely updated after Delete.
- * Kevin Doyle (IBM) - [193151] Scratchpad not updated on Move
- * Kevin Doyle (IBM) - [189421] Scratchpad not updated after Rename
- * David McKnight (IBM) - [197860] drag and drop consistency - no text transfer
- * Kevin Doyle (IBM) - [197841] "Terminate and Remove" should remove the shell from Scratchpad
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.scratchpad;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Assert;
-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.IBasicPropertyConstants;
-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.window.SameShellProvider;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-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.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
-import org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.internal.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.internal.ui.view.ElementComparer;
-import org.eclipse.rse.internal.ui.view.SafeTreeViewer;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewDataDragAdapter;
-import org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.internal.model.SystemRegistryUI;
-import org.eclipse.rse.ui.internal.model.SystemScratchpad;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ContextObject;
-import org.eclipse.rse.ui.view.IContextObject;
-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.SystemAdapterHelpers;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Item;
-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.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 SafeTreeViewer
- implements IMenuListener, ISystemDeleteTarget,
- ISystemRenameTarget, ISystemSelectAllTarget, ISystemShellProvider,
- 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 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 ISystemMessageLine _messageLine;
- protected boolean menuListenerAdded = false;
-
- private static final int LEFT_BUTTON = 1;
- private int mouseButtonPressed = LEFT_BUTTON;
-
- public boolean debugRemote = false;
-
- /**
- * 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);
-
- setUseHashlookup(true);
- setComparer(new ElementComparer());
-
- 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);
-
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.addSystemResourceChangeListener(this);
- sr.addSystemRemoteChangeListener(this);
-
- initDragAndDrop();
-
- tableTree.setVisible(false);
- getControl().addMouseListener(new MouseAdapter()
- {
- public void mouseDown(MouseEvent e)
- {
- mouseButtonPressed = e.button; //d40615
- }
- });
- }
-
- public Layout getLayout()
- {
- return _layout;
- }
-
-
- /**
- * 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;
-
-
- 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 getViewAdapter(Object obj)
- {
- return SystemAdapterHelpers.getViewAdapter(obj);
- }
-
-
-
- /**
- * Initialize drag and drop support for this view.
- *
- */
- protected void initDragAndDrop()
- {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] dragtransfers = new Transfer[]
- { PluginTransfer.getInstance(),
- EditorInputTransfer.getInstance()
- };
-
- Transfer[] droptransfers = new Transfer[]
- { PluginTransfer.getInstance(),
- FileTransfer.getInstance(),
- EditorInputTransfer.getInstance()
- };
-
- addDragSupport(ops | DND.DROP_DEFAULT, dragtransfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, droptransfers, 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:
- case ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE:
- {
- internalRefresh(child);
- }
- 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_COMMAND_SHELL_REMOVED:
- {
- deleteObject(child);
- }
- break;
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- {
- Object[] multiSrc = event.getMultiSource();
- if (multiSrc != null) {
- for (int i = 0; i < multiSrc.length; i++) {
- deleteObject(multiSrc[i]);
- }
- }
- }
- 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.core.events.ISystemRemoteChangeEvent
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- //boolean originatedHere = (event.getOriginatingViewer() == this);
- List remoteResourceNames = null;
- if (remoteResource instanceof List)
- {
- remoteResourceNames = (List) remoteResource;
- remoteResource = remoteResourceNames.get(0);
- }
- String remoteResourceName = getRemoteResourceAbsoluteName(remoteResource);
- if (remoteResourceName == null)
- 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 :
- {
- // Since all creation operations can only be done on the same parent
- // we only need to handle refreshing of the parent
- // Must handle String's as Move operation create event passes us Strings
- if (remoteResourceParent instanceof String)
- {
- Item item = findFirstRemoteItemReference((String) remoteResourceParent, null, null);
- if (item != null)
- internalRefresh(item.getData());
- }
- else
- {
- internalRefresh(remoteResourceParent);
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- if (remoteResourceNames != null)
- {
- for (int i = 0; i < remoteResourceNames.size(); i++)
- {
- deleteObject(remoteResourceNames.get(i));
- }
- }
- else
- {
- deleteObject(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 :
- {
- renameRemoteObject(remoteResource, event.getOldNames()[0]);
- }
-
- 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
- {
- ISystemViewElementAdapter ra = getViewAdapter(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)
- {
-
- // Set _selectionFlagsUpdate to false, so the next time the context menu
- // is requested we rescan the selections to determine which actions
- // to show and enable/disable.
- // Setting this to false will force a rescan because in fillContextMenu()
- // if this is false it will call scanSelections();
- _selectionFlagsUpdated = false;
- IStructuredSelection sel = (IStructuredSelection)event.getSelection();
- Object firstSelection = sel.getFirstElement();
- if (firstSelection == null)
- return;
-
- ISystemViewElementAdapter adapter = getViewAdapter(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);
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.removeSystemResourceChangeListener(this);
- sr.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;
- }
-
-
- /**
- * 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)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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 = getViewAdapter(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.core.events.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)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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 = getViewAdapter(element);
- Object parentElement = getParentForContent(element);
-
- remoteAdapter = getRemoteAdapter(element);
- if (remoteAdapter != null)
- oldFullName = remoteAdapter.getAbsoluteName(element);
- // pre-rename
- ok = adapter.doRename(getShell(), element, newNames[nameIdx++], null);
- if (ok)
- {
- if (remoteAdapter != null) {
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), new String[]{oldFullName}, this);
- }
- else {
- sr.fireEvent(new org.eclipse.rse.core.events.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 = getViewAdapter(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);
-
-
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- {
-
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
- // OPEN IN NEW PERSPECTIVE ACTION... if (fromSystemViewPart && showOpenViewActions())
- if (!_selectionIsRemoteObject)
- {
- //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);
-
- }
-
-
-
- }
- }
-
-
- /**
- * Decides whether to even show the refresh menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showRefresh()
- {
- if (!_selectionFlagsUpdated)
- scanSelections();
- 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 = getViewAdapter(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);
- }
- }
-
- }
-
- /**
- * Overridden so that we can pass a wrapper IContextObject into the provider to get children instead
- * of the model object, itself
- */
- protected void createChildren(final Widget widget)
- {
- if (widget instanceof TreeItem)
- {
- final Item[] tis = getChildren(widget);
- if (tis != null && tis.length > 0) {
- Object data = tis[0].getData();
- if (data != null) {
- return; // children already there!
- }
- }
-
- BusyIndicator.showWhile(widget.getDisplay(), new Runnable() {
- public void run() {
- // fix for PR 1FW89L7:
- // don't complain and remove all "dummies" ...
- if (tis != null) {
- for (int i = 0; i < tis.length; i++) {
- if (tis[i].getData() != null) {
- disassociate(tis[i]);
- Assert.isTrue(tis[i].getData() == null,
- "Second or later child is non -null");//$NON-NLS-1$
-
- }
- tis[i].dispose();
- }
- }
- Object d = widget.getData();
- if (d != null)
- {
- Object parentElement = getContextObject((TreeItem)widget);
- Object[] children = getSortedChildren(parentElement);
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- createTreeItem(widget, children[i], -1);
- }
- }
- }
- }
-
- });
- }
- else
- {
- super.createChildren(widget);
- }
- }
-
-
- /**
- * Get the containing filter reference for an item
- * @param item the item to get the filter reference for
- * @return the filter reference
- */
- public ISystemFilterReference getContainingFilterReference(TreeItem item)
- {
- Object data = item.getData();
- if (data instanceof ISystemFilterReference)
- {
- return (ISystemFilterReference)data;
- }
- else
- {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- {
- return getContainingFilterReference(parent);
- }
- else
- {
- Object input = getInput();
- if (input instanceof ISystemFilterReference)
- {
- return (ISystemFilterReference)input;
- }
- else
- {
- return null;
- }
- }
- }
- }
-
- /**
- * Get the containing subsystem from an item
- * @param item the item to get the subsystem for
- * @return the subsystem
- */
- public ISubSystem getContainingSubSystem(TreeItem item)
- {
- Object data = item.getData();
- if (data instanceof ISubSystem)
- {
- return (ISubSystem)data;
- }
- else
- {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- {
- return getContainingSubSystem(parent);
- }
- else
- {
- Object input = getInput();
- if (input instanceof ISubSystem)
- {
- return (ISubSystem)input;
- }
- else
- {
- return null;
- }
- }
- }
- }
-
- /**
- * Get the context object from a tree item
- * @param item the item to get the context for
- * @return the context object
- */
- public IContextObject getContextObject(TreeItem item)
- {
- Object data = item.getData();
- ISystemFilterReference filterReference = getContainingFilterReference(item);
- if (filterReference != null)
- {
- return new ContextObject(data, filterReference.getSubSystem(), filterReference);
- }
- else
- {
- ISubSystem subSystem = getContainingSubSystem(item);
- if (subSystem != null)
- {
- return new ContextObject(data, subSystem);
- }
- else
- {
- return new ContextObject(data);
- }
- }
- }
-
- /**
- * Overrides the standard viewer method to get the model object from the context object
- */
- public void add(Object parentElementOrTreePath, Object[] childElements) {
- Assert.isNotNull(parentElementOrTreePath);
- assertElementsNotNull(childElements);
-
- if (parentElementOrTreePath instanceof IContextObject)
- {
- parentElementOrTreePath = ((IContextObject)parentElementOrTreePath).getModelObject();
- }
- super.add(parentElementOrTreePath, childElements);
- }
-
- /**
- * Delete all occurrences of a given remote object
- */
- protected void deleteObject(Object deleteObject)
- {
- // If deleteObject is a string find it's tree item and get it's data as thats what's
- // stored inside the SystemScratchpad
- if (deleteObject instanceof String)
- {
- Item item = findFirstRemoteItemReference((String) deleteObject,null,null);
- if (item == null)
- return;
- else
- deleteObject = item.getData();
- }
-
- // check if remoteResource is a root in Scratchpad and if so remove it
- SystemScratchpad scratchpad = SystemRegistryUI.getInstance().getSystemScratchPad();
- if (scratchpad.contains(deleteObject))
- scratchpad.removeChild(deleteObject);
-
- // find all references to the remote resource and remove them
- Widget[] widgets = findItems(deleteObject);
- for (int i = 0; i < widgets.length; i++)
- {
- if (widgets[i] instanceof TreeItem)
- {
- remove(getTreePathFromItem((TreeItem) widgets[i]));
- }
- }
-
- }
-
- /**
- * Rename a remote object.
- */
- protected void renameRemoteObject(Object renameObject, String oldElementName) {
- String[] properties = new String[1];
- properties[0] = IBasicPropertyConstants.P_TEXT;
- List matches = new Vector();
- ISubSystem subsystem = null;
- String newElementName = ""; //$NON-NLS-1$
- Object refreshObject = null;
-
- // Try to determine the new element name/subsystem to help improve performance when searching for objects
- if (renameObject instanceof String) {
- newElementName = (String) renameObject;
- } else {
- ISystemViewElementAdapter rmtAdapter = getViewAdapter(renameObject);
- if (rmtAdapter != null) {
- subsystem = rmtAdapter.getSubSystem(renameObject);
- newElementName = rmtAdapter.getName(renameObject);
- }
- }
-
- findAllRemoteItemReferences(oldElementName, renameObject, subsystem, matches);
-
- // Go through all the matches and update the properties
- for (int i = 0; i < matches.size(); i++) {
- Item item = (Item) matches.get(i);
- if (item != null && !item.isDisposed()) {
- Object data = item.getData();
-
- if (data != null) {
- ISystemRemoteElementAdapter remoteAdapter = (ISystemRemoteElementAdapter)((IAdaptable)data).getAdapter(ISystemRemoteElementAdapter.class);
-
- if (remoteAdapter != null && data != renameObject)
- {
- remoteAdapter.refreshRemoteObject(data, renameObject);
- }
- item.setText(newElementName);
- internalUpdate(item, data, properties);
-
- if (refreshObject == null) {
- refreshObject = data;
- }
-
- }
- }
- }
-
- if (refreshObject != null) {
- // Update the Scratchpad Model
- SystemRegistryUI.getInstance().getSystemScratchPad().replace(oldElementName, refreshObject);
-
- // FTP/SSH require a new listing of files otherwise they will
- // display the old file names.
- // We can't depend on SystemView to do the refresh as it does it in a
- // deferred job and we don't know when that is done or what
- // order the listeners are in.
- if (refreshObject instanceof ISystemContainer) {
- ((ISystemContainer) refreshObject).markStale(true);
- }
- internalRefresh(refreshObject);
- }
- }
-
- //TODO:
- // ----------------------------------------------------------------
- // Functions Below are pure copies of the ones from SystemView
- // and as such should be moved to a common location
- // or with 3.0 remove all need for Recursive methods - Preferred
- // ----------------------------------------------------------------
-
- /**
- * 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) {
- //List 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 (matches.size() > 0)
- // return (Item)matches.elementAt(0);
- //else
- // return null;
- return match;
- }
-
- /**
- * 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;
-
- // use map first
- Item match = mappedFindFirstRemoteItemReference(elementObject);
-
- for (int idx = 0; (match == null) && (idx < roots.length); idx++) {
- //System.out.println("recursiveFindFirstRemoteItemReference(parentItem, remoteObjectName, remoteObject, subsystem)");
- match = recursiveFindFirstRemoteItemReference(roots[idx], searchString, elementObject, subsystem);
- }
-
- return match;
- }
-
- protected Item mappedFindFirstRemoteItemReference(Object elementObject)
- {
- return (Item)findItem(elementObject);
- }
-
- /**
- * 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();
- ISystemViewElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getViewAdapter(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 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>
- * TODO: This method should not return any invalid matches, i.e. remote objects
- * that do match the String identifier but have been deleted already. Because the
- * same remote object can appear in multiple contexts in the RSE Tree, a single
- * remote object identifier String may evaluate to multiple different matches
- * to fill into the matches argument. All those context object matches, however,
- * reference the same real-world model objects due to the constraint that
- * {@link IRemoteObjectIdentifier} uniquely identifies a remote object.
- * <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 List to populate with hits (TreeItem objects),
- * or <code>null</code> to get a new List created and returned
- * @return the List populated with hits, or <code>null</code> if
- * <code>null</code> was passed as matches to populate and no matches
- * were found.
- */
- protected List findAllRemoteItemReferences(String searchString, Object elementObject, ISubSystem subsystem, List matches) {
- Tree tree = getTree();
- Item[] roots = tree.getItems();
- if (roots == null) return matches;
- if (matches == null)
- matches = new Vector();
-
- boolean foundExact = false;
- for (int idx = 0; idx < roots.length; idx++){
- if (recursiveFindExactMatches((TreeItem)roots[idx], elementObject, subsystem, matches)){
- foundExact = true;
- }
- }
-
- if (!foundExact)
- {
- for (int idx = 0; idx < roots.length; idx++){
- matches = recursiveFindAllRemoteItemReferences(roots[idx], searchString, elementObject, subsystem, matches);
- }
- }
-
- return matches;
- }
-
- private boolean recursiveFindExactMatches(TreeItem root, Object elementObject, ISubSystem subsystem, List matches)
- {
- boolean foundSomething = false;
- Object data = root.getData();
- if (data == elementObject)
- {
- matches.add(root);
- foundSomething = true;
- }
- if (subsystem != null){
- if (data instanceof ISubSystem){
- if (data != subsystem)
- return false;
- }
- else if (data instanceof IHost){
- if (subsystem.getHost() != data)
- return false;
- }
- }
-
- TreeItem[] children = root.getItems();
- for (int i = 0; i < children.length; i++)
- {
- if (recursiveFindExactMatches(children[i], elementObject, subsystem, matches))
- {
- foundSomething = true;
- }
- }
- return foundSomething;
- }
-
- protected boolean mappedFindAllRemoteItemReferences(Object elementObject, List occurrences)
- {
- Widget[] items = findItems(elementObject);
- if (items.length > 0)
- {
- for (int i = 0; i < items.length; i++)
- {
- occurrences.add(items[i]);
- }
- return true;
- }
-
- return false;
- }
-
- /**
- * 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 List to populate with hits. Must not be <code>null</code>
- * @return the given List populated with hits
- */
- protected List recursiveFindAllRemoteItemReferences(Item parent, String elementName, Object elementObject, ISubSystem subsystem, List occurrences) {
- Object rawData = parent.getData();
- ISystemViewElementAdapter remoteAdapter = null;
- // ----------------------------
- // what are we looking at here?
- // ----------------------------
- if (rawData != null) remoteAdapter = getViewAdapter(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.add(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.add(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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java
deleted file mode 100644
index 3ed88d110..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [182403] Double Click on an object that can be expanded
- * Kevin Doyle (IBM) - [195543] Double Clicking expands wrong folder when duplicate elements shown
- * Kevin Doyle (IBM) - [193155] Double Clicking on a String in Scratchpad Errors
- * Kevin Doyle (IBM) - [194867] Remote Scratchpad should have Refresh Action on toolbar
- * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.ITreeSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-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.SystemWidgetHelpers;
-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.internal.model.SystemRegistryUI;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-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, ISystemShellProvider,
- 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;
- private SystemRefreshAction _refreshAction;
-
- // 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);
-
- 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
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().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(SystemRegistryUI.getInstance().getSystemScratchPad());
-
- getSite().registerContextMenu(_viewer.getContextMenuManager(), _viewer);
- getSite().registerContextMenu(ISystemContextMenuConstants.RSE_CONTEXT_MENU, _viewer.getContextMenuManager(), _viewer);
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel)
- {
- }
-
- public void dispose()
- {
- ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
- selectionService.removeSelectionListener(this);
- _viewer.removeSelectionChangedListener(this);
-
- RSECorePlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
-
- if (_viewer != null)
- {
- _viewer.dispose();
- }
-
- super.dispose();
- }
-
- private void handleDoubleClick(DoubleClickEvent event)
- {
- ITreeSelection s = (ITreeSelection) event.getSelection();
- Object element = s.getFirstElement();
-
- if (element == null || !(element instanceof IAdaptable))
- return;
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
-
- if (adapter != null)
- {
- if (adapter.hasChildren((IAdaptable)element))
- {
- // Get the path for the element and use it for setting expanded state,
- // so the proper TreeItem is expanded/collapsed
- TreePath[] paths = s.getPathsFor(element);
- if (paths == null || paths.length == 0 || paths[0] == null) return;
- TreePath elementPath = paths[0];
- if (_viewer.getExpandedState(elementPath))
- {
- _viewer.collapseToLevel(elementPath, 1);
- }
- else
- {
- _viewer.expandToLevel(elementPath, 1);
- }
- }
- else
- {
- adapter.handleDoubleClick(element);
- }
- }
- }
-
- public void updateActionStates()
- {
- if (_clearAction == null)
- fillLocalToolBar();
-
- _clearAction.checkEnabledState();
- _clearSelectionAction.checkEnabledState();
- }
-
- public void fillLocalToolBar()
- {
- IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolBarManager = actionBars.getToolBarManager();
- IMenuManager menuMgr = actionBars.getMenuManager();
-
- if (_clearAction == null) {
- _clearAction = new ClearAction(_viewer);
- _clearSelectionAction = new ClearSelectedAction(_viewer);
- }
-
- if (_refreshAction == null) {
- _refreshAction = new SystemRefreshAction(getShell());
- _refreshAction.setId(ActionFactory.REFRESH.getId());
- _refreshAction.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
- _refreshAction.setSelectionProvider(_viewer);
- }
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), _refreshAction);
-
- updateActionStates();
-
- _statusLine = actionBars.getStatusLineManager();
-
- addToolBarItems(toolBarManager);
- addToolBarMenuItems(menuMgr);
- }
-
- private void addToolBarMenuItems(IMenuManager menuManager)
- {
- menuManager.removeAll();
- menuManager.add(_refreshAction);
- menuManager.add(new Separator());
- menuManager.add(_clearSelectionAction);
- menuManager.add(_clearAction);
- }
-
- private void addToolBarItems(IToolBarManager toolBarManager)
- {
- toolBarManager.removeAll();
- toolBarManager.add(_refreshAction);
- toolBarManager.add(new Separator());
- toolBarManager.add(_clearSelectionAction);
- 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/internal/ui/view/scratchpad/SystemScratchpadViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewProvider.java
deleted file mode 100644
index c1fc1bcf1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewProvider.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.scratchpad;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-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.IContextObject;
-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)
- {
- if (object instanceof IContextObject)
- {
- return adapter.hasChildren((IContextObject)object);
- }
- else
- {
- return adapter.hasChildren((IAdaptable)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 IContextObject)
- {
- object = ((IContextObject)object).getModelObject();
- }
- 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;
-
- Object element = object;
- if (object instanceof IContextObject)
- {
- element = ((IContextObject)object).getModelObject();
- }
- if (element instanceof IAdaptable)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(element);
- if (adapter != null && adapter.hasChildren((IAdaptable)element))
- {
- if (object instanceof IContextObject)
- {
- results = adapter.getChildren((IContextObject)object, new NullProgressMonitor());
- }
- else
- {
- results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
- }
- }
- 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/internal/ui/view/search/SystemSearchClearHistoryAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchClearHistoryAction.java
deleted file mode 100644
index 2377e924c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchClearHistoryAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.view.search;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-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;
-
-
-/**
- * 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchCopyToClipboardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchCopyToClipboardAction.java
deleted file mode 100644
index d1af839ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchCopyToClipboardAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchHistoryAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchHistoryAction.java
deleted file mode 100644
index 9f22ce89e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchHistoryAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveAllMatchesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveAllMatchesAction.java
deleted file mode 100644
index d103744c7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveAllMatchesAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.view.search;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-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;
-
-
-/**
- * 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java
deleted file mode 100644
index 6edb8c691..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchRemoveSelectedMatchesAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.view.search;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-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;
-
-
-/**
- * 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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableView.java
deleted file mode 100644
index 5c319d7d3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableView.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Kevin Doyle (IBM) - [192725] Deleting Files doesn't remove them from Search view
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.search;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.view.SystemDecoratingLabelProvider;
-import org.eclipse.rse.internal.ui.view.SystemTableTreeView;
-import org.eclipse.rse.internal.ui.view.SystemTableTreeViewProvider;
-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.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();
- List remoteResourceNames = null;
-
- if (remoteResource instanceof List)
- {
- remoteResourceNames = (List) remoteResource;
- remoteResource = remoteResourceNames.get(0);
- }
- else
- {
- remoteResourceNames = new Vector();
- remoteResourceNames.add(remoteResource);
- }
-
- for (int d = 0; d < remoteResourceNames.size(); d++)
- {
- Object dchild = remoteResourceNames.get(d);
-
- ISystemViewElementAdapter dadapt = getViewAdapter(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 = getViewAdapter(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);
- }
- }
- }
- }
-
- // If the deleted object is part of an archive it might be
- // visible in the search view, but not part of the result set
- Widget widget = findItem(dchild);
- if (widget != null)
- {
- Object data = widget.getData();
- remove(data);
- }
- }
- }
-
- }
- 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 getViewAdapter(element).getParent(element);
- }
-
-
- /**
- * Does nothing.
- * @see org.eclipse.rse.internal.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/internal/ui/view/search/SystemSearchTableViewProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableViewProvider.java
deleted file mode 100644
index 6b70eda66..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchTableViewProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.ui.view.search;
-
-import org.eclipse.rse.internal.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.internal.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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchUI.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchUI.java
deleted file mode 100644
index 31f9bd1e6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchUI.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.search;
-
-import org.eclipse.rse.ui.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/internal/ui/view/search/SystemSearchViewContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewContentProvider.java
deleted file mode 100644
index eb3485087..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewContentProvider.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [186128] Move IProgressMonitor last in all API
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.search;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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 = getViewAdapter(parentElement);
-
- if (adapter == null) {
- return null;
- }
- else {
- return adapter.getChildren((IAdaptable)parentElement, new NullProgressMonitor());
- }
- }
-
- 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 = getViewAdapter(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 = getViewAdapter(element);
-
- if (adapter == null) {
- return false;
- }
- else {
- return adapter.hasChildren((IAdaptable)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 = getViewAdapter(inputElement);
-
- if (adapter == null) {
- return null;
- }
- else {
- return adapter.getChildren((IAdaptable)inputElement, new NullProgressMonitor());
- }
- }
-
- 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 = getViewAdapter(newInput);
-
- if (adapter != null) {
- viewer.refresh();
- }
- }
- }
-
- /**
- * Get the adapter for the given object.
- * @param the object
- * @return the adapter
- */
- public ISystemViewElementAdapter getViewAdapter(Object element)
- {
- return SystemAdapterHelpers.getViewAdapter(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/internal/ui/view/search/SystemSearchViewLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewLabelProvider.java
deleted file mode 100644
index 470ce1792..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewLabelProvider.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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 = getViewAdapter(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 = getViewAdapter(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 getViewAdapter(Object element)
- {
- return SystemAdapterHelpers.getViewAdapter(element);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java
deleted file mode 100644
index 4e8a2bf30..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java
+++ /dev/null
@@ -1,1324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
- * David McKnight (IBM) - [250169] Problems with extending the menu's of results in Remote Search View
- * David McKnight (IBM) - [214395] Properties View not updated when clicking on Search Results
- * David McKnight (IBM) - [190015] [performance] Remove All Match's from Search Results Takes a while
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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.ISelectionProvider;
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemTableTreeViewProvider;
-import org.eclipse.rse.internal.ui.view.SystemView;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-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.SystemAdapterHelpers;
-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, ISystemShellProvider,
- 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 = getViewAdapter(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();
- }
-
- /**
- * Creates a dummy selection provider.
- * @return a dummy selection provider.
- */
- private ISelectionProvider createDummySelectionProvider() {
-
- ISelectionProvider provider = new ISelectionProvider() {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- }
-
- public ISelection getSelection() {
- if (currentViewer != null){
- return currentViewer.getSelection();
- }
- return null;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- }
-
- public void setSelection(ISelection selection) {
- if (currentViewer != null){
- currentViewer.setSelection(selection);
- }
- }
- };
-
- return provider;
- }
-
- /**
- * @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
- // because when the view is first created we don't have any real viewers (i.e. currentViewer)
- // after addSearchResult() is called, the provider should defer to the selection from the
- // current viewer
- site.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
- RSECorePlugin.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);
-
- // clipboard
- Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().getSystemClipboard();
- Shell shell = RSEUIPlugin.getTheSystemRegistryUI().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 = getViewAdapter(input);
-
- if (adapter == null) {
- return false;
- }
- else {
- return adapter.hasChildren(input);
- }
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- if (currentViewer != null){
- getSite().setSelectionProvider(currentViewer);
- }
- }
-
- /**
- * @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 = getViewAdapter(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);
-
- getSite().registerContextMenu(viewer.getContextMenuManager(), viewer);
- getSite().registerContextMenu(ISystemContextMenuConstants.RSE_CONTEXT_MENU, viewer.getContextMenuManager(), viewer);
- return viewer;
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
-
- // remove as resource change listener
- RSECorePlugin.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 = getViewAdapter(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 = getViewAdapter(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 = getViewAdapter(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 = getViewAdapter(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();
- Tree tree = tableView.getTree();
- tree.removeAll();
- }
- // 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 = null;
- if (adapter != null)
- 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 getViewAdapter(Object element) {
- return SystemAdapterHelpers.getViewAdapter(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 = getViewAdapter(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 = getViewAdapter(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 = getViewAdapter(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/internal/ui/view/team/SystemResourceAdaptableProfile.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemResourceAdaptableProfile.java
deleted file mode 100644
index 02629c149..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemResourceAdaptableProfile.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamView.java
deleted file mode 100644
index c6cdae4eb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamView.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.ISystemSelectAllTarget;
-import org.eclipse.swt.SWT;
-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,
- ISystemShellProvider
-{
- private SystemTeamViewPart teamViewPart;
-
- /**
- * @param parent
- */
- public SystemTeamView(Composite parent, SystemTeamViewPart teamViewPart)
- {
- super(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); // DKM - putting style here to avoid SWT.BORDER (defect 168972)
- 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/internal/ui/view/team/SystemTeamViewCategoryAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryAdapter.java
deleted file mode 100644
index bf79f15a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryAdapter.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [197036] rewrote getSubSystemConfigurationNodes to get filter pools
- * in a way that delays the loading of subsystem configurations
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertySetContainer;
-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.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-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 {
-
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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(IAdaptable element, IProgressMonitor monitor)
- {
- SystemTeamViewCategoryNode category = (SystemTeamViewCategoryNode)element;
- ISystemProfile profile = category.getProfile();
- String categoryType = category.getMementoHandle();
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_CONNECTIONS))
- {
- return profile.getHosts();
- }
- else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_PROPERTYSETS))
- {
- return createSystemTeamViewPropertySetNodes(profile, category);
- }
- else
- return createSubSystemConfigurationNodes(profile, category);
- }
-
-
- /**
- * Create subsystem configuration child nodes for expanded category node.
- */
- private SystemTeamViewSubSystemConfigurationNode[] createSubSystemConfigurationNodes(ISystemProfile profile, SystemTeamViewCategoryNode category) {
- // create a sorted set to hold the subsystem configurations based on the proxy ordering
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- final List proxies = Arrays.asList(sr.getSubSystemConfigurationProxies());
- Comparator comparator = new Comparator() {
- public int compare(Object o1, Object o2) {
- ISubSystemConfiguration c1 = (SubSystemConfiguration) o1;
- ISubSystemConfiguration c2 = (SubSystemConfiguration) o2;
- ISubSystemConfigurationProxy proxy1 = c1.getSubSystemConfigurationProxy();
- ISubSystemConfigurationProxy proxy2 = c2.getSubSystemConfigurationProxy();
- Integer p1 = new Integer(proxies.indexOf(proxy1));
- Integer p2 = new Integer(proxies.indexOf(proxy2));
- int result = p1.compareTo(p2);
- return result;
- }
- };
- SortedSet activeSubsystemConfigurations = new TreeSet(comparator);
- // find the active subsystem configurations
- for (Iterator z = proxies.iterator(); z.hasNext();) {
- ISubSystemConfigurationProxy proxy = (ISubSystemConfigurationProxy) z.next();
- if (proxy.isSubSystemConfigurationActive()) {
- ISubSystemConfiguration config = proxy.getSubSystemConfiguration();
- activeSubsystemConfigurations.add(config);
- }
- }
- // construct the nodes for the view based on these configurations
- List nodes = new ArrayList();
- String categoryType = category.getMementoHandle();
- for (Iterator z = activeSubsystemConfigurations.iterator(); z.hasNext();) {
- ISubSystemConfiguration ssf = (ISubSystemConfiguration) z.next();
- boolean createNode = false;
- if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS)) {
- createNode = ssf.supportsFilters() && (profile.getFilterPools(ssf).length > 0);
- } else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_TARGETS)) {
- createNode = ssf.supportsTargets(); // && profile.getTargets(ssf).length > 0;
- }
- if (createNode) {
- nodes.add(new SystemTeamViewSubSystemConfigurationNode(profile, category, ssf));
- }
- }
- SystemTeamViewSubSystemConfigurationNode[] result = new SystemTeamViewSubSystemConfigurationNode[nodes.size()];
- nodes.toArray(result);
- return result;
- }
-
- /**
- * Create subsystem configuration child nodes for expanded category node.
- */
- private SystemTeamViewPropertySetNode[] createSystemTeamViewPropertySetNodes(IPropertySetContainer profile, SystemTeamViewCategoryNode category) {
-
- IPropertySet[] propertySets = profile.getPropertySets();
- if (null == propertySets || propertySets.length == 0)
- {
- return new SystemTeamViewPropertySetNode[0];
- }
- // construct the nodes for the view based on these configurations
- List nodes = new ArrayList();
- //String categoryType = category.getMementoHandle();
- for (int i = 0; i < propertySets.length; i++) {
- nodes.add(new SystemTeamViewPropertySetNode(profile, propertySets[i]));
- }
- SystemTeamViewPropertySetNode[] result = new SystemTeamViewPropertySetNode[nodes.size()];
- nodes.toArray(result);
- return result;
- }
-
- /**
- * Return true if this profile has children. We return true.
- */
- public boolean hasChildren(IAdaptable 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 = RSECorePlugin.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$
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryNode.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryNode.java
deleted file mode 100644
index 4448293d7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewCategoryNode.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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_PROPERTYSETS = "propertysets"; //$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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewContentProvider.java
deleted file mode 100644
index b220e3d4a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewContentProvider.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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 = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfiles();
- children = profiles;
- //return profiles;
- }
- else
- {
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- children = adapter.getChildren((IAdaptable)element, new NullProgressMonitor());
- 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();
- return null;
- 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)
- {
- if (element instanceof IContextObject)
- {
- element = ((IContextObject)element).getModelObject();
- }
- boolean children = false;
- if (element instanceof IProject)
- children = (getChildren(element).length > 0);
- else
- {
- ISystemViewElementAdapter adapter = getSystemViewAdapter(element);
- if (adapter != null)
- children = adapter.hasChildren((IAdaptable)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 ISystemShellProvider)
- shell = ((ISystemShellProvider)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/internal/ui/view/team/SystemTeamViewInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewInputProvider.java
deleted file mode 100644
index c4c7a0eb8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewInputProvider.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-
-
-/**
- * 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 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()
- {
- ISystemProfile[] roots = SystemProfileManager.getDefault().getSystemProfiles();
- 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.ui.model.IHost)
- */
- public Object[] getConnectionChildren(IHost selectedConnection)
- {
- IPropertySet[] propertySets = selectedConnection.getPropertySets();
- if (null == propertySets || propertySets.length == 0)
- {
- return new SystemTeamViewPropertySetNode[0];
- }
- List nodes = new ArrayList();
- for (int i = 0; i < propertySets.length; i++) {
- nodes.add(new SystemTeamViewPropertySetNode(selectedConnection, propertySets[i]));
- }
- SystemTeamViewPropertySetNode[] result = new SystemTeamViewPropertySetNode[nodes.size()];
- nodes.toArray(result);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#hasConnectionChildren(org.eclipse.rse.ui.model.IHost)
- */
- public boolean hasConnectionChildren(IHost selectedConnection)
- {
- IPropertySet[] sets = selectedConnection.getPropertySets();
- if (sets == null || sets.length == 0){
- return false;
- }
- else {
- return true;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(org.eclipse.jface.viewers.Viewer)
- */
- public void setViewer(Object viewer)
- {
- this.viewer = (Viewer)viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getViewer()
- */
- public Object getViewer()
- {
- return viewer;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewLabelProvider.java
deleted file mode 100644
index 1659eeccc..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewLabelProvider.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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 (RSECorePlugin.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 ISystemShellProvider)
- shell = ((ISystemShellProvider)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/internal/ui/view/team/SystemTeamViewMakeActiveProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeActiveProfileAction.java
deleted file mode 100644
index bfc311051..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeActiveProfileAction.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-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.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-/**
- * 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) {
- ISystemProfileManager manager = SystemProfileManager.getDefault();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
- boolean enabled = false;
- if (!getSelection().isEmpty()) {
- enabled = true;
- Object currsel = getFirstSelection();
- while (currsel != null && enabled) {
- if (currsel instanceof ISystemProfile) {
- ISystemProfile profile = (ISystemProfile) currsel;
- if (profile.isActive() || profile == defaultProfile) {
- enabled = false;
- }
- } else {
- enabled = false;
- }
- currsel = getNextSelection();
- }
- }
- return enabled;
- }
-
- /**
- * 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 = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = (ISystemProfile) getFirstSelection();
- while (profile != null) {
- sr.setSystemProfileActive(profile, true);
- profile = (ISystemProfile) getNextSelection();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java
deleted file mode 100644
index 6f25c2603..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewMakeInActiveProfileAction.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-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.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-/**
- * 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) {
- ISystemProfileManager manager = SystemProfileManager.getDefault();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
- boolean enabled = false;
- if (!getSelection().isEmpty()) {
- enabled = true;
- Object currsel = getFirstSelection();
- while (currsel != null && enabled) {
- if (currsel instanceof ISystemProfile) {
- ISystemProfile profile = (ISystemProfile) currsel;
- if (!profile.isActive() || profile == defaultProfile) {
- enabled = false;
- }
- } else {
- enabled = false;
- }
- currsel = getNextSelection();
- }
- }
- return enabled;
- }
-
- /**
- * 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() {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = (ISystemProfile) getFirstSelection();
- while (profile != null) {
- sr.setSystemProfileActive(profile, false);
- profile = (ISystemProfile) getNextSelection();
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java
deleted file mode 100644
index 021778706..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java
+++ /dev/null
@@ -1,1585 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Rupen Mardirossian (IBM) - [187741] Implemented the handleDoubleClick method
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.IAdapterFactory;
-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.ITreeSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.events.ISystemModelChangeListener;
-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.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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCollapseAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemNewProfileAction;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.internal.ui.actions.SystemTeamReloadAction;
-import org.eclipse.rse.internal.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-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.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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;
-
-
- // 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);
-
- RSECorePlugin.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-click in viewer. It is responsible for expanding
- * and collapsing nodes in the tree.
- * @param event the double click event to handle.
- * Contains the selection on which to operate.
- */
- private void handleDoubleClick(DoubleClickEvent event) {
- ITreeSelection s = (ITreeSelection) event.getSelection();
- Object element = s.getFirstElement(); // double-click only has 0 or 1 elements
- if (element != null) {
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) element).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null) {
- if (adapter.hasChildren((IAdaptable) element)) {
- // Get the path for the element and use it for setting expanded state,
- // so the proper TreeItem is expanded/collapsed
- TreePath[] paths = s.getPathsFor(element);
- if (paths != null && paths.length > 0 && paths[0] != null) {
- TreePath elementPath = paths[0];
- if (treeViewer.getExpandedState(elementPath)) {
- treeViewer.collapseSelected();
- } else {
- treeViewer.expandSelected();
- }
- }
- } else {
- adapter.handleDoubleClick(element);
- }
- }
- }
- }
-
- /**
- * 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();
- /*
- * DKM - taking this out since the delete key should be handled by the retargetable action
- *
- 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.getViewAdapter(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 ourMenu the menu for the team view
- * @param selection the current selection in the view
- */
- 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.getViewAdapter(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 = (RSECorePlugin.getTheSystemProfileManager().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 profile adapter for a given profile
- */
- private SystemTeamViewProfileAdapter getProfileAdapter(ISystemProfile profile) {
- RSEUIPlugin plugin = RSEUIPlugin.getDefault();
-
- IAdapterFactory factory = plugin.getSystemViewAdapterFactory();
- SystemTeamViewProfileAdapter adapter = (SystemTeamViewProfileAdapter) factory.getAdapter(profile, SystemTeamViewProfileAdapter.class);
- return adapter;
- }
-
- /**
- * Get the New Profile action
- */
- 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 = (RSECorePlugin.getTheSystemProfileManager().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()
- {
- RSECorePlugin.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 = false;
- IStructuredSelection selection = getStructuredSelection();
- if (!selection.isEmpty()) {
- ok = true;
- ISystemProfileManager manager = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
- for (Iterator z = selection.iterator(); z.hasNext() && ok;) {
- Object object = z.next();
- if (object instanceof ISystemProfile) {
- ISystemProfile profile = (ISystemProfile) object;
- if (profile == defaultProfile) {
- ok = false;
- }
- } else {
- ok = false;
- }
- }
- }
- 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();
- while (ok && elements.hasNext()) {
- ISystemProfile profile = (ISystemProfile) elements.next();
- try {
- SystemTeamViewProfileAdapter profileAdapter = getProfileAdapter(profile);
- ok = profileAdapter.doDelete(getShell(), profile, monitor);
- } catch (Exception exc) {
- String msg = "Exception deleting profile " + profile.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();
- int idx = 0;
- while (ok && elements.hasNext()) {
- ISystemProfile profile = (ISystemProfile) elements.next();
- try {
- SystemTeamViewProfileAdapter profileAdapter = getProfileAdapter(profile);
- profileAdapter.doRename(getShell(), profile, newNames[idx++], null);
- } catch (SystemMessageException exc) {
- SystemMessageDialog.displayMessage(getShell(), exc);
- ok = false;
- } catch (Exception exc) {
- String msg = "Exception renaming profile "; //$NON-NLS-1$
- SystemBasePlugin.logError(msg, exc);
- 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, RSECorePlugin.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.getViewAdapter(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.getViewAdapter(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 = RSECorePlugin.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(false);
- break;
- case 2:
- profile = sr.getSystemProfile(token);
- break;
- case 3:
- if (profile != null) {
-
-
- SystemTeamViewProfileAdapter profileAdapter = (SystemTeamViewProfileAdapter)((IAdaptable)profile).getAdapter(ISystemViewElementAdapter.class);
- 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.getViewAdapter(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/internal/ui/view/team/SystemTeamViewProfileAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java
deleted file mode 100644
index ac796fde5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [191130] use new getRemoteSystemsProject(boolean) call
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
- * David Dykstal (IBM) - [cleanup] formatted
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View
- ********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemProfileNameCopyAction;
-import org.eclipse.rse.internal.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-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.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorProfileName;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.rse.ui.view.ISystemPropertyConstants;
-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 {
-
- private boolean actionsCreated = false;
- private Hashtable categoriesByProfile = new Hashtable();
- // context menu actions for profiles...
- 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();
- }
- copyProfileAction.setProfile((ISystemProfile) selection.getFirstElement());
- 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() {
- 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.setMultiSelectVerbiage(SystemResources.RESID_MULTI_RENAME_PROFILE_VERBIAGE);
-
- 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 (RSECorePlugin.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();
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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 = RSECorePlugin.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(false);
- }
-
- /**
- * Return the children of this profile.
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
- 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[3]; //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_PROPERTYSET_LABEL);
- children[2].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_PROPERTYSET_TOOLTIP);
- children[2].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROPERTIES_ID));
- children[2].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_PROPERTYSETS);
-/*
- 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(IAdaptable 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(ISystemPropertyConstants.P_IS_ACTIVE)) {
- boolean active = RSECorePlugin.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;
- } else {
- ISystemProfile profile = (ISystemProfile) element;
- ISystemProfileManager manager = RSECorePlugin.getTheSystemProfileManager();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
- if (profile == defaultProfile) {
- ok = false;
- }
- }
- return ok;
- }
-
- /**
- * Perform the delete action.
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception {
- boolean ok = true;
- RSECorePlugin.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, IProgressMonitor monitor) throws Exception {
- boolean ok = true;
- RSECorePlugin.getTheSystemRegistry().renameSystemProfile((ISystemProfile) element, newName);
- return ok;
- }
-
- /**
- * Return a validator for verifying the new name is correct.
- */
- public ISystemValidator getNameValidator(Object element) {
- String[] nameArray = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNames();
- Vector names = new Vector(nameArray.length);
- names.addAll(Arrays.asList(nameArray));
- ISystemValidator validator = new ValidatorProfileName(names);
- return validator;
- }
-
- /**
- * 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;
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java
deleted file mode 100644
index a31f768fe..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetAdapter.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222263] initial contribution.
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API type
- *********************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-
-/**
- * Adapter for displaying and processing SystemTeamViewSubSystemConfigurationNode objects in tree views, such as
- * the Team view.
- */
-public class SystemTeamViewPropertySetAdapter
- extends AbstractSystemViewAdapter
-{
- 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();
- }
- 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)
- {
- return ((SystemTeamViewPropertySetNode)element).getImageDescriptor();
- }
-
- /**
- * Return the label for this object
- */
- public String getText(Object element)
- {
- return ((SystemTeamViewPropertySetNode)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 ((SystemTeamViewPropertySetNode)element).getLabel();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element)
- {
- SystemTeamViewPropertySetNode factory = (SystemTeamViewPropertySetNode)element;
- return factory.getLabel();
- }
-
- /**
- * Return the type label for this object
- */
- public String getType(Object element)
- {
- return SystemViewResources.RESID_PROPERTY_TEAM_PROPERTYSET_TYPE_VALUE;
- }
-
- /**
- * Return the string to display in the status line when the given object is selected.
- */
- public String getStatusLineText(Object element)
- {
- SystemTeamViewPropertySetNode factory = (SystemTeamViewPropertySetNode)element;
- return SystemResources.RESID_TEAMVIEW_PROPERTYSET_VALUE + ": " + factory.getLabel(); //$NON-NLS-1$
- }
-
- /**
- * Return the parent of this object. We return the RemoteSystemsConnections project
- */
- public Object getParent(Object element)
- {
- SystemTeamViewPropertySetNode factory = (SystemTeamViewPropertySetNode)element;
- return factory.getParent();
- }
-
- /**
- * Return the children of this profile.
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
- {
- SystemTeamViewPropertySetNode propertySetNode = (SystemTeamViewPropertySetNode)element;
- IPropertySet propertySet = propertySetNode.getPropertySet();
- IPropertySet[] children = propertySet.getPropertySets();
- if (null == children || children.length == 0)
- {
- return new Object[0];
- }
-
- // construct the nodes for the view based on these configurations
- SystemTeamViewPropertySetNode[] nodes = new SystemTeamViewPropertySetNode[children.length];
- //String categoryType = category.getMementoHandle();
- for (int i = 0; i < children.length; i++)
- {
- nodes[i] = new SystemTeamViewPropertySetNode(propertySet, children[i]);
- }
- return nodes;
-
- }
-
- /**
- * Return true if this profile has children. We return true.
- */
- public boolean hasChildren(IAdaptable element)
- {
- SystemTeamViewPropertySetNode propertySetNode = (SystemTeamViewPropertySetNode)element;
- IPropertySet propertySet = propertySetNode.getPropertySet();
- IPropertySet[] children = propertySet.getPropertySets();
- if (null == children || children.length == 0)
- {
- return false;
- }
-
- return true;
-
- }
-
- /**
- * For PropertySet Node Adapter, we need to override this method since we don't want to display "name" and "type" twice.
- *
- * @return an array containing all descriptors.
- *
- * @see #internalGetPropertyDescriptors()
- */
- public IPropertyDescriptor[] getPropertyDescriptors()
- {
- return internalGetPropertyDescriptors();
- }
-
- protected IPropertyDescriptor[] internalGetPropertyDescriptors()
- {
- SystemTeamViewPropertySetNode propertySetNode = (SystemTeamViewPropertySetNode)propertySourceInput;
- IPropertySet propertySet = propertySetNode.getPropertySet();
-
- String[] propertyKeys = propertySet.getPropertyKeys();
-
- int size = propertyKeys.length;
-
- IProperty nameProperty = propertySet.getProperty(SystemTeamViewPropertySetNode.NAME_PROPERTY);
- if (null == nameProperty)
- {
- nameProperty = propertySet.getProperty(SystemTeamViewPropertySetNode.NAME_PROPERTY1);
- }
- int startingIndex = 0;
- if (nameProperty == null)
- {
- size++;
- }
-
- propertyDescriptorArray = new PropertyDescriptor[size];
-
- if (nameProperty == null)
- {
- propertyDescriptorArray[startingIndex++] = createSimplePropertyDescriptor(SystemTeamViewPropertySetNode.NAME_PROPERTY, SystemTeamViewPropertySetNode.NAME_PROPERTY, propertySet.getName());
- }
-
- for (int i = startingIndex, j = 0; i < size; i++, j++)
- {
- propertyDescriptorArray[i] = createSimplePropertyDescriptor(propertyKeys[j], propertyKeys[j], propertySet.getPropertyValue(propertyKeys[j]));
- }
-
-
- 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)
- {
- SystemTeamViewPropertySetNode propertySetNode = (SystemTeamViewPropertySetNode)propertySourceInput;
- IPropertySet propertySet = propertySetNode.getPropertySet();
- return propertySet.getPropertyValue((String)key);
- }
-
-
- // ------------------------------------------------------------
- // 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)
- {
- SystemTeamViewPropertySetNode factory = (SystemTeamViewPropertySetNode)element;
- return factory.getMementoHandle();
- }
- /**
- * Return a short string to uniquely identify the type of resource.
- */
- public String getMementoHandleKey(Object element)
- {
- SystemTeamViewPropertySetNode factory = (SystemTeamViewPropertySetNode)element;
- return factory.getLabel();
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetNode.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetNode.java
deleted file mode 100644
index 7efd45f45..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPropertySetNode.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222263] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.internal.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.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertySetContainer;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * 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 SystemTeamViewPropertySetNode implements IAdaptable
-{
- private String mementoHandle;
- private IPropertySetContainer parent;
- private IPropertySet propertySet;
- static public final String NAME_PROPERTY = "name"; //$NON-NLS-1$
- static public final String NAME_PROPERTY1 = "Name"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemTeamViewPropertySetNode(IPropertySetContainer parent, IPropertySet propertySet)
- {
- super();
- this.parent = parent;
- this.propertySet = propertySet;
- }
-
- /**
- * 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 SystemTeamViewPropertySetNode)
- {
- /*
- SystemTeamViewPropertySetNode other = (SystemTeamViewPropertySetNode)o;
- if ((ssf == other.getSubSystemConfiguration()) &&
- (parentCategory == other.getParentCategory()) &&
- (profile == other.getProfile()))
- return true;
- else
- return false;
- */
- return super.equals(o);
- }
- else
- return super.equals(o);
- }
-
- /**
- * Return this node's image
- * @return the image to show in the tree, for this node
- */
- public ImageDescriptor getImageDescriptor()
- {
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROPERTIES_ID);
- }
-
- public Object getParent()
- {
- return parent;
- }
-
- /**
- * Return this node's label
- * @return the translated label to show in the tree, for this node
- */
- public String getLabel()
- {
- String label = null;
- //First, check if this PropertySet has a property called "name"
- IProperty nameProperty = propertySet.getProperty(NAME_PROPERTY);
- if (null != nameProperty)
- {
- label = nameProperty.getValue();
- }
- else
- {
- label = propertySet.getName();
- }
- return label;
- }
-
- /**
- * Convert to string. We call getLabel()
- */
- public String toString()
- {
- return getLabel();
- }
-
-
-
- /**
- * @return PropertySet this node is associated with
- */
- public IPropertySet getPropertySet()
- {
- return propertySet;
- }
-
- /**
- * @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;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewRefreshAllAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewRefreshAllAction.java
deleted file mode 100644
index 72d5b74af..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewRefreshAllAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - 146339 Added refresh action graphic.
- * David Dykstal (IBM) - [191130] use new getRemoteSystemsProject(boolean) method
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-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;
-
-
-/**
- * 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 {
- IProject connectionsProject = SystemResourceManager.getRemoteSystemsProject(false);
- if (connectionsProject.isAccessible()) {
- connectionsProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- } catch (Exception exc) {}
- SystemTeamView teamViewer = (SystemTeamView)teamView.getTreeViewer();
- teamViewer.refresh();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewResourceAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewResourceAdapterFactory.java
deleted file mode 100644
index 145c0be62..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewResourceAdapterFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David Dykstal (IBM) - [191130] fix unnecessary creation of the remote systems project
- *******************************************************************************/
-
-package org.eclipse.rse.internal.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;
- // [191130] do not force the creation of the project, just return its handle
- adapter = SystemResourceManager.getRemoteSystemsProject(false);
- }
- /* deferred
- else if (adaptableObject instanceof SystemProfile)
- {
- SystemProfile profile = (SystemProfile)adaptableObject;
- adapter = SystemResourceManager.getProfileFolder(profile);
- }*/
- return adapter;
- }
-
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java
deleted file mode 100644
index a83646c7d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.ui.view.team;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemFilterWorkWithFilterPoolsAction;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
-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
-{
- 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();
-
- 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();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.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(IAdaptable element, IProgressMonitor monitor)
- {
- 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(IAdaptable 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 = RSECorePlugin.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$
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java
deleted file mode 100644
index 3bd2f032a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewSubSystemConfigurationNode.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- ********************************************************************************/
-
-package org.eclipse.rse.internal.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.IRSESystemType;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.subsystems.SubSystemConfigurationProxyAdapter;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-
-/**
- * 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);
- if (adapter != null) {
- return adapter.getImage(ssf);
- } else {
- // Fall back to using the Proxy -- see also
- // SystemViewSubSystemAdapter.getImageDescriptor()
- ISubSystemConfigurationProxy proxy = ssf.getSubSystemConfigurationProxy();
- SubSystemConfigurationProxyAdapter proxyAdapter = (SubSystemConfigurationProxyAdapter) Platform.getAdapterManager().getAdapter(proxy,
- SubSystemConfigurationProxyAdapter.class);
- if (proxyAdapter != null) {
- return proxyAdapter.getImageDescriptor();
- } else {
- SystemBasePlugin.logWarning("Unexpected error: SubSystemConfiguration has no adapter and no proxyAdapter: " + ssf.getId()); //$NON-NLS-1$
- return null;
- }
- }
- }
-
- /**
- * Return this node's label
- * @return the translated label to show in the tree, for this node
- */
- public String getLabel()
- {
- if (name == null)
- {
- StringBuffer buf = new StringBuffer();
- buf.append(ssf.getName());
- buf.append(" ("); //$NON-NLS-1$
- if (ssf.getSubSystemConfigurationProxy().supportsAllSystemTypes())
- {
- buf.append(SystemResources.TERM_ALL);
- }
- else
- {
- IRSESystemType[] types = ssf.getSystemTypes();
- for (int idx=0; idx<types.length; idx++)
- {
- if (idx>0) buf.append(", "); //$NON-NLS-1$
- buf.append(types[idx].getLabel());
- }
- }
- buf.append(")"); //$NON-NLS-1$
- name = buf.toString();
- }
- 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/internal/ui/widgets/SSLForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/SSLForm.java
deleted file mode 100644
index b5a7f6d5d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/SSLForm.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.ui.widgets;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.SystemBaseForm;
-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 whether ssl alert is checked
- */
- 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 whether non ssl alert is checked
- */
- 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)
- {
-
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/ServerConnectionSecurityForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/ServerConnectionSecurityForm.java
deleted file mode 100644
index e144ad588..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/widgets/ServerConnectionSecurityForm.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.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();
- }
-}
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 3b58a954a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/IRSEAdapter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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);
-}
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 0f10a2488..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemConnectionFormCaller.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-import org.eclipse.rse.core.IRSESystemType;
-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(IRSESystemType 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 dcea469b2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemContextMenuConstants.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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:
- * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-
-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>
- * &lt;code&gt;
- * // 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-&gt;
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_GOTO)); // goto into, go-&gt;
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_EXPANDTO)); // expand to-&gt;
- * 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-&gt;
- * menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_BROWSEWITH)); // open with-&gt;
- * menu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH)); // work with-&gt;
- * 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
- * &lt;/code&gt;
- * </pre>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemContextMenuConstants
-{
-
- /**
- * Context menu id used by all RSE views, such that menu's can be contributed
- * to all views.
- *
- * RSE Views: Remote Systems, Remote System Details, Remote Monitor, Remote Search, and Remote Scratchpad
- * Note: This does does not work with dialog's which have the SystemView
- * embedded in them.
- * @since 3.1
- */
- public static final String RSE_CONTEXT_MENU = "org.eclipse.rse.views.common"; //$NON-NLS-1$
-
- /**
- * 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 2ad95882c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2009 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) - 146339 Added refresh action graphic.
- * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- ********************************************************************************/
-
-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_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_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_LINKTOEDITOR_ID = "elcl16/synced.gif"; //$NON-NLS-1$
- public static final String ICON_IDE_FILTER_ID = "elcl16/filter_ps.gif"; //$NON-NLS-1$
-
- /**
- * @deprecated use {@link org.eclipse.ui.ISharedImages} via
- * PlatformUI.getWorkbench().getSharedImages()
- */
- public static final String ICON_IDE_COLLAPSEALL_ID = "elcl16/collapseall.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_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_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_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_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 62ccfd048..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Kevin Doyle (IBM) - [160769] Added FILEMSG_MOVE_FILTER_NOT_VALID
- * Kevin Doyle (IBM) - [199324] Added FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SRC
- * Xuan Chen (IBM) - [160775] Added MSG_RENAMEGENERIC_PROGRESS, FILEMSG_MOVE_INTERRUPTED
- * FILEMSG_RENAME_INTERRUPTED, FILEMSG_DELETE_INTERRUPTED
- * FILEMSG_COPY_INTERRUPTED
- * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
- * David McKnight (IBM) - [216252] removing unused messages and ids
- *******************************************************************************/
-
-package org.eclipse.rse.ui;
-
-/**
- * Message IDs
- */
-public interface ISystemMessages
-{
- public static final String MSG_WIZARD_PAGE_ERROR = "RSEG1240"; //$NON-NLS-1$
-
-
- public static final String MSG_CONFIRM_RELOADRSE = "RSEG1002"; //$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_NOTUNIQUE= "RSEG1010"; //MSG_VALIDATE_PREFIX + "ReName.NotUnique"; //$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_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_FILTERNAME_EMPTY = "RSEG1042"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_FILTERNAME_NOTUNIQUE= "RSEG1043"; //$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_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_CHANGES = "RSEG1201"; //$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_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_QUERY_PREFIX = MSG_PREFIX + "Query.";
- public static final String MSG_QUERY_PROGRESS = "RSEG1095"; //$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_COPYFILTERPOOL_COMPLETE = "RSEG1082"; //$NON-NLS-1$
-
- //public static final String MSG_MOVE_PREFIX = MSG_PREFIX + "Move.";
- 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$
- /**
- * @since 3.0
- */
- public static final String MSG_RENAMEGENERIC_PROGRESS = "RSEG1142"; //$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_ARCHIVE_NAME = "RSEG1120"; //$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_HOSTNAME_NOTFOUND = "RSEG1220"; //$NON-NLS-1$
- public static final String MSG_HOSTNAME_VERIFYING = "RSEG1221"; //$NON-NLS-1$
-
-
- public static final String MSG_ENCODING_NOT_SUPPORTED = "RSEG1244"; //$NON-NLS-1$
-
-
- // --------------------------
- // UNIVERSAL FILE MESSAGES...
- // --------------------------
- /** @since 3.0 */
- public static final String FILEMSG_RENAME_INTERRUPTED = "RSEG1246"; //$NON-NLS-1$
- /** @since 3.0 */
- public static final String FILEMSG_DELETE_INTERRUPTED = "RSEG1247"; //$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_FILE_NOTFOUND = "RSEG1106"; //$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$
-
-
- // ----------------------------------
- // COMMUNICATIONS ERROR CHECKING MESSAGES...
- // ----------------------------------
-
- 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_PORT_WARNING = "RSEC2306"; //$NON-NLS-1$
-
-
- // Unexpected error message
- public static final String MSG_ERROR_UNEXPECTED = "RSEF8002"; //$NON-NLS-1$
-
- // file transfer message
- public static final String MSG_TRANSFER_INVALID = "RSEG1270"; //$NON-NLS-1$
-
-}
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 e2d54eecf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemPreferencesConstants.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui;
-
-/**
- * Keys into preferences bundle.
- */
-public interface ISystemPreferencesConstants {
- /*
- * root
- */
- public static final String ROOT = "org.eclipse.rse.preferences."; //$NON-NLS-1$
- /*
- * uda preference keys
- */
- public static final String CASCADE_UDAS_BYPROFILE = ROOT + "uda.cascade"; //$NON-NLS-1$
- /*
- * uda preference default values
- */
- public static final boolean DEFAULT_CASCADE_UDAS_BYPROFILE = false;
- /*
- * ui preference keys
- */
- public static final String RESTORE_STATE_FROM_CACHE = ROOT + "restoreStateFromCache"; //$NON-NLS-1$
- public static final String SYSTEMTYPE_VALUES = ROOT + "systemtype.info"; //$NON-NLS-1$
- public static final String SHOWFILTERPOOLS = ROOT + "filterpools.show"; //$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 SHOWNEWCONNECTIONPROMPT = ROOT + "shownewconnection"; //$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$
- 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 REMEMBER_STATE = ROOT + "rememberState"; //$NON-NLS-1$
-
- /**
- * The SHOW_EMPTY_LISTS preference. Value is "SHOW_EMPTY_LISTS".
- * The default value is true.
- * This may be used in the product's plug-in initialization.
- * Example:
- * <code>
- * org.eclipse.rse.ui/SHOW_EMPTY_LISTS=false
- * </code>
- * To use this preference in code do the following:
- * <code>
- * Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- * boolean showLists = store.getBoolean(ISystemPreferencesConstants.SHOW_EMPTY_LISTS);
- * </code>
- */
- public static final String SHOW_EMPTY_LISTS = "SHOW_EMPTY_LISTS"; //$NON-NLS-1$
- /*
- * ui preference default values
- */
- public static final boolean DEFAULT_RESTORE_STATE_FROM_CACHE = true; // yantzi: artemis 6.0
- public static final boolean DEFAULT_SHOWFILTERPOOLS = false;
- public static final boolean DEFAULT_QUALIFY_CONNECTION_NAMES = false;
- public static final String DEFAULT_ORDER_CONNECTIONS = ""; //$NON-NLS-1$
- public static final boolean DEFAULT_SHOWNEWCONNECTIONPROMPT = false;
- 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;
- public static final String DEFAULT_HISTORY_FOLDER = ""; //$NON-NLS-1$
- public static final boolean DEFAULT_REMEMBER_STATE = true; // changed in R2. Phil
- public static final boolean DEFAULT_SHOW_EMPTY_LISTS = true;
-}
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/ISystemViewSupplier.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemViewSupplier.java
deleted file mode 100644
index e05ab6c99..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemViewSupplier.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-/**
- * 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/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 9c6df7561..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerAddQuotes.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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();
- }
-
-
-
-}
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 564d0051e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCase.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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();
- }
-}
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 94e56760c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseOutsideQuotes.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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;
- }
-}
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 ba4095e3c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerFoldCaseUnlessQuoted.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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
- }
-}
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 4113604a4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/MassagerRemoveQuotes.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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;
- }
-
-}
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 a6b2fc670..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/Mnemonics.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2008 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) - [187860] review for adding foreign lang support
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * Kevin Doyle (IBM) - [242250] Using Mnemonics twice as fast as we should be
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.rse.ui.widgets.InheritableEntryField;
-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;
-
-import com.ibm.icu.lang.UCharacter;
-import com.ibm.icu.lang.UCharacter.UnicodeBlock;
-import com.ibm.icu.util.ULocale;
-
-/**
- * Instances of this class may be used to supply mnemonics to the
- * text for controls.
- * There are preferences which can be set by products to control how
- * these mnemonics are generated and applied.
- * <p>
- * There are two types of mnemonics which can be added to a label:
- * embedded mnemonics and appended mnemonics. An embedded mnemonic uses
- * an existing letter in the label for the mnemonic. An appended mnemonic
- * is added to the end of the label (but prior to any punctuation or accelerators)
- * and is of the form (X).
- * <p>
- * The org.eclipse.rse.ui/MNEMONICS_POLICY preference establishes the
- * desire to generated embedded mnemonics using letters that already
- * exist in the text of the controls and/or to generate appended mnemonics
- * if an embedded mnemonic cannot be found or is not desired.
- * The policy is composed of bit flags.
- * See {@link #EMBED_MNEMONICS} and {@link #APPEND_MNEMONICS} for the flag values.
- * See {@link #POLICY_DEFAULT} for the default policy value.
- * A policy value of 0 will disable the generation of all mnemonics.
- * <p>
- * The org.eclipse.rse.ui/APPEND_MNEMONICS_PATTERN preference is used to
- * further qualify the appending behavior by the current locale. If the
- * current locale name matches this pattern then appending can be performed.
- * See {@link #APPEND_MNEMONICS_PATTERN_DEFAULT} for the default pattern.
- * <p>
- * Mnemonics on menus are allowed to have duplicates. Attempts are made to find the
- * least used mnemonic when finding a duplicate.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class Mnemonics {
-
- /**
- * An option bit mask - value 1.
- * If on, specifies whether or not to insert mnemonic indications into
- * the current text of a label.
- * If off, all other options are ignored.
- */
- public static final int EMBED_MNEMONICS = 1;
-
- /**
- * An option bit mask - value 2.
- * If on, specifies to generate mnemonics of the form (X) at the end of labels for
- * those languages matching the locale pattern.
- * If off, then only characters from the label will be used as mnemonics.
- */
- public static final int APPEND_MNEMONICS = 2;
-
- /**
- * The simple name of the preference that holds the pattern to be used for matching
- * against the locale to determine if APPEND_MNEMONICS option applies.
- */
- public static final String APPEND_MNEMONICS_PATTERN_PREFERENCE = "APPEND_MNEMONICS_PATTERN"; //$NON-NLS-1$
-
- /**
- * Some products will to append mnemonics only for certain locales.
- * The following provides the default pattern for matching the locale.
- * The default pattern matches Chinese, Japanese, and Korean.
- */
- public static final String APPEND_MNEMONICS_PATTERN_DEFAULT = "zh.*|ja.*|ko.*"; //$NON-NLS-1$
-
- /**
- * The simple name of the preference that determines the policy to be used when applying mnemonics to menus and composites.
- */
- public static final String POLICY_PREFERENCE = "MNEMONICS_POLICY"; //$NON-NLS-1$
-
- /**
- * The default mnemonics policy. If no policy is specified in a call to generate
- * mnemonics this policy will be used. Can be overridden by the
- * org.eclipse.rse.ui/MNEMONICS_POLICY preference.
- */
- public static final int POLICY_DEFAULT = EMBED_MNEMONICS | APPEND_MNEMONICS;
-
- private static final char MNEMONIC_CHAR = '&';
-
- /*
- * Interesting ISO 639-1 language codes.
- */
- private static final String LC_GREEK = "el"; //$NON-NLS-1$
- private static final String LC_RUSSIAN = "ru"; //$NON-NLS-1$
-
- /*
- * Known valid mnemonic candidates
- */
- private static final String GREEK_MNEMONICS = "\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9"; //$NON-NLS-1$
- private static final String RUSSIAN_MNEMONICS = "\u0410\u0411\u0412\u0413\u0414\u0145\u0401\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f"; //$NON-NLS-1$
- private static final String LATIN_MNEMONICS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //$NON-NLS-1$
-
- private final static Pattern TRANSPARENT_ENDING_PATTERN = Pattern.compile("(\\s|\\.\\.\\.|>|<|:|\uff0e\uff0e\uff0e|\uff1e|\uff1c|\uff1a|\\t.*)+$"); //$NON-NLS-1$
- private boolean applyMnemonicsToPrecedingLabels = true;
-
- private Map usedCharacters = new HashMap();
-
- /**
- * 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.
- * @param text the label from which to extract the mnemonic
- * @return the mnemonic if assigned, else a blank character.
- */
- public static char getMnemonic(String text) {
- int idx = text.indexOf(MNEMONIC_CHAR);
- if (idx >= 0 && idx < (text.length() - 1))
- return text.charAt(idx + 1);
- else
- return ' ';
- }
-
- /**
- * 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,
- * or with "(c)" appended to the label at a proper position in case the
- * character c is not part of the label.
- */
- public static String applyMnemonic(String label, char mnemonicChar) {
- int labelLen = label.length();
- if (labelLen == 0) return label;
- StringBuffer newLabel = new StringBuffer(label);
- int mcharPos = label.indexOf(mnemonicChar);
- if (mcharPos != -1)
- newLabel.insert(mcharPos, MNEMONIC_CHAR);
- else {
- String addedMnemonic = new String("(" + MNEMONIC_CHAR + mnemonicChar + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- int p = getEndingPosition(label);
- newLabel.insert(p, addedMnemonic);
- }
- return newLabel.toString();
- }
-
- /**
- * Helper method to strip the mnemonic from a string.
- * Useful if using Eclipse supplied labels.
- * @param text the label from which to strip the mnemonic
- * @return the label with the mnemonic stripped
- */
- public static String removeMnemonic(String text) {
- String[] parts = text.split("\\(\\&.\\)", 2); //$NON-NLS-1$
- if (parts.length == 1) {
- parts = text.split("\\&", 2); //$NON-NLS-1$
- }
- if (parts.length == 2) {
- text = parts[0] + parts[1];
- }
- return text;
- }
-
- /**
- * Finds the point at which to insert a mnemonic of the form (&X).
- * Checks for transparent endings.
- * @param label the label to check
- * @return the position at which a mnemonic of the form (&X) can be inserted.
- */
- private static int getEndingPosition(String label) {
- Matcher m = TRANSPARENT_ENDING_PATTERN.matcher(label);
- int result = m.find() ? m.start() : label.length();
- return result;
- }
-
- /**
- * Clear the list of used mnemonic characters
- */
- public void clear() {
- usedCharacters.clear();
- }
-
- /**
- * Resets the list of used mnemonic characters to those in the string.
- *
- * @param usedMnemonics A String listing the characters to mark used as
- * mnemonics. Each character will be considered in a case
- * insensitive manner.
- */
- public void clear(String usedMnemonics) {
- clear();
- makeUsed(usedMnemonics);
- }
-
- /**
- * Sets a mnemonic in the given string and returns the result.
- * Functions according to the default policy as specified in
- * Sets the mnemonic according to the org.eclipse.rse.ui/MNEMONICS_POLICY preference.
- * Not normally called from other classes, but rather by the setMnemonic
- * methods in this class.
- * @param label The string to which to apply the mnemonic
- * @return the result string with the mnemonic embedded or appended
- */
- public String setUniqueMnemonic(String label) {
- Plugin plugin = RSEUIPlugin.getDefault();
- Preferences preferences = plugin.getPluginPreferences();
- int flags = preferences.getInt(POLICY_PREFERENCE);
- String localePattern = preferences.getString(APPEND_MNEMONICS_PATTERN_PREFERENCE);
- String result = setUniqueMnemonic(label, flags, localePattern, false);
- return result;
- }
-
- /**
- * Given a string, this starts at the first character and iterates until
- * it finds a character not already used as a mnemonic.
- * Not normally called from other classes, but rather by the setMnemonic
- * methods in this class.
- * If the label already has a mnemonic it is not touched.
- * @param label String to which to apply a mnemonic
- * @param flags The policy bit field composed of the following options
- * EMBED_MNEMONICS and APPEND_MNEMONICS
- * @param allowDuplicates true if duplicates can be allowed. Typically used only
- * when assigning mnemonics to menu items. If true, it will attempt to assign the
- * least used duplicate mnemonic for the string from the context established so far.
- * @return input String with '&' inserted in front of the mnemonic character
- */
- private String setUniqueMnemonic(String label, int flags, String localePattern, boolean allowDuplicates) {
- // determine the cases where the label does not need a mnemonic
- if (flags == 0 || label == null || label.trim().length() == 0 || label.equals("?")) { //$NON-NLS-1$
- return label;
- }
- StringBuffer buffer = new StringBuffer(label);
- char mn = getMnemonic(label);
- if (mn == ' ' && ((flags & EMBED_MNEMONICS) > 0)) { // no mnemonic exists, try embedding
- int p = findUniqueMnemonic(label);
- if (p >= 0) { // a character in the label can be used as the mnemonic
- mn = label.charAt(p);
- buffer.insert(p, MNEMONIC_CHAR);
- }
- }
- if (mn == ' ' && allowDuplicates) { // no mnemonic exists, try a duplicate
- int n = getEndingPosition(label);
- int m = 999;
- int p = -1;
- for (int i = 0; i < n; i++) {
- char ch = label.charAt(i);
- if (isAcceptable(ch) && timesUsed(ch) < m) {
- m = timesUsed(ch);
- p = i;
- }
- }
- if (p >= 0) {
- mn = label.charAt(p);
- buffer.insert(p, MNEMONIC_CHAR);
- }
- }
- if (mn == ' ' && ((flags & APPEND_MNEMONICS) > 0)) { // no mnemonic exists, try appending a mnemonic
- String localeName = ULocale.getDefault().getName();
- if (localeName.matches(localePattern)) {
- String candidates = getCandidates();
- int p = findUniqueMnemonic(candidates);
- if (p >= 0) {
- mn = candidates.charAt(p);
- String mnemonicString = "(" + MNEMONIC_CHAR + mn + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- p = getEndingPosition(label);
- buffer.insert(p, mnemonicString);
- }
- }
- }
- makeUsed(mn);
- return buffer.toString();
- }
-
- /**
- * Determine if given char is a unique mnemonic.
- * @param ch the character to test.
- * @return true if the character has not yet been used.
- */
- public boolean isUniqueMnemonic(char ch) {
- return timesUsed(ch) == 0;
- }
-
- private Preferences getPreferences() {
- return RSEUIPlugin.getDefault().getPluginPreferences();
- }
-
- private String getLocalePattern() {
- return getPreferences().getString(APPEND_MNEMONICS_PATTERN_PREFERENCE);
- }
-
- private int getPolicy() {
- return getPreferences().getInt(POLICY_PREFERENCE);
- }
-
- private boolean isEmbedding() {
- return (getPolicy() & EMBED_MNEMONICS) > 0;
- }
-
- private boolean isAppending() {
- return (getPolicy() & APPEND_MNEMONICS) > 0;
- }
-
- /**
- * @return a string of acceptable mnemonic candidates for the language
- * of the current locale.
- */
- private String getCandidates() {
- /*
- * This is a coarse-grained approach and uses the 2-letter language codes from ISO 639-1.
- * This should be quite sufficient for mnemonic generation.
- */
- String language = ULocale.getDefault().getLanguage();
- if (language.equals(LC_GREEK)) return GREEK_MNEMONICS;
- if (language.equals(LC_RUSSIAN)) return RUSSIAN_MNEMONICS;
- return LATIN_MNEMONICS;
- }
-
- /**
- * Find a unique mnemonic char in given string.
- * @param label the string in which to search for the best mnemonic character
- * @return index position of unique character in input string, or -1 if none found.
- */
- private int findUniqueMnemonic(String label) {
- int uniqueIndex = -1;
- char ch = label.charAt(0);
- for (int i = 0; (i < label.length()) && (uniqueIndex == -1); i++) {
- ch = label.charAt(i);
- if (ch == '\t') { // stop at accelerators too
- break;
- }
- if (timesUsed(ch) == 0 && isAcceptable(ch)) {
- uniqueIndex = i;
- }
- }
- return uniqueIndex;
- }
-
- private boolean isAcceptable(char ch) {
- UnicodeBlock block = UnicodeBlock.of(ch);
- boolean result = (isAcceptable(block) && UCharacter.isLetter(ch)); // the character is a letter
- return result;
- }
-
- private boolean isAcceptable(UnicodeBlock block) {
- if (block == UnicodeBlock.BASIC_LATIN) return true;
- if (block == UnicodeBlock.LATIN_1_SUPPLEMENT) return true;
- if (block == UnicodeBlock.LATIN_EXTENDED_A) return true;
- if (block == UnicodeBlock.LATIN_EXTENDED_B) return true;
- if (block == UnicodeBlock.LATIN_EXTENDED_C) return true;
- if (block == UnicodeBlock.LATIN_EXTENDED_D) return true;
- if (block == UnicodeBlock.GREEK) return true;
- if (block == UnicodeBlock.CYRILLIC) return true;
- if (block == UnicodeBlock.HEBREW) return true;
- if (block == UnicodeBlock.ARABIC) return true;
- return false;
- }
-
- /**
- * Returns the number of times a given character is used as a mnemonic in this
- * context.
- * @param ch the character to examine
- * @return the number of times it has been reported as being used.
- */
- private int timesUsed(char ch) {
- // TODO if we are guaranteed java 1.5 we can use Character.valueOf(ch)
- int result = 0;
- Integer count = (Integer) usedCharacters.get(new Character(ch));
- if (count != null) {
- result = count.intValue();
- }
- return result;
- }
-
- private void makeUsed(char ch) {
- // TODO if we are guaranteed java 1.5 we can use Character.valueOf(ch)
- if (ch != ' ') {
- makeUsed(new Character(Character.toLowerCase(ch)));
- makeUsed(new Character(Character.toUpperCase(ch)));
- }
- }
-
- private void makeUsed(Character ch) {
- Integer count = (Integer) usedCharacters.get(ch);
- if (count == null) {
- count = new Integer(1);
- }
- usedCharacters.put(ch, count);
- }
-
- private void makeUsed(String s) {
- for (int i = 0; i < s.length(); i++) {
- makeUsed(s.charAt(i));
- }
- }
-
- /**
- * 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();
- }
-
- /**
- * 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;
- }
-
- /**
- * 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.
- * @param button the button to equip with a mnemonic
- * @return <code>true</code> if the button was actually changed
- */
- public boolean setMnemonic(Button button) {
- boolean changed = false;
- String text = button.getText();
- if ((text != null) && (text.trim().length() > 0)) {
- String newText = setUniqueMnemonic(text);
- if (!text.equals(newText)) {
- button.setText(newText);
- changed = true;
- }
- }
- return changed;
- }
-
- /**
- * Given a menu, this method walks all the items and assigns each a mnemonic.
- * Note that menu item mnemonics do not have to be unique.
- * The mnemonics used on cascaded menus are independent of those of the parent.
- * Handles cascading menus.
- * Call this after populating the menu.
- * @param menu the menu to examine
- */
- public void setMnemonics(Menu menu) {
- // this set will contain menu items without mnemonics in order of length of their text
- Collection embeddingItems = new TreeSet(new Comparator() {
- public int compare(Object o1, Object o2) {
- String t1 = ((MenuItem) o1).getText();
- String t2 = ((MenuItem) o2).getText();
- int l1 = getEndingPosition(t1);
- int l2 = getEndingPosition(t2);
- if (l1 < l2) return -1;
- if (l1 > l2) return 1;
- return t1.compareTo(t2);
- }
- });
- Collection appendingItems = new ArrayList(10);
- // handle cascades, populate the set, record existing mnemonics
- MenuItem[] menuItems = menu.getItems();
- for (int i = 0; i < menuItems.length; i++) {
- MenuItem menuItem = menuItems[i];
- Menu cascade = menuItem.getMenu();
- if (cascade != null) {
- Mnemonics context = new Mnemonics();
- context.setMnemonics(cascade);
- }
- String text = menuItem.getText();
- if (text.length() > 0) {
- char ch = getMnemonic(text);
- if (ch == ' ') {
- embeddingItems.add(menuItem);
- appendingItems.add(menuItem);
- } else {
- makeUsed(ch);
- }
- }
- }
- // assign mnemonics to the items of the set
- String localePattern = getLocalePattern();
- if (isEmbedding()) {
- processMenuItems(embeddingItems, EMBED_MNEMONICS, localePattern);
- }
- if (isAppending()) {
- processMenuItems(appendingItems, APPEND_MNEMONICS, localePattern);
- }
- }
-
- private void processMenuItems(Collection collection, int flags, String localePattern) {
- for (Iterator z = collection.iterator(); z.hasNext();) {
- MenuItem menuItem = (MenuItem) z.next();
- String text = menuItem.getText();
- String newText = setUniqueMnemonic(text, flags, localePattern, true);
- if (!text.equals(newText)) {
- Image image = menuItem.getImage();
- menuItem.setText(newText);
- if (image != null) {
- menuItem.setImage(image);
- }
- }
- }
- }
-
- /**
- * 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.
- * @param parent the parent control to examine.
- */
- public void setMnemonics(Composite parent) {
- setMnemonics(parent, new HashSet());
- }
-
- /**
- * 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 (for example, 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.
- * @param parent the parent control to examine.
- * @param ignoredControls the set of controls in which to not set mnemonics.
- * If the controls are composites, their children are also not examined.
- */
- public void setMnemonics(Composite parent, Set ignoredControls) {
- gatherCompositeMnemonics(parent);
- boolean mustLayout = setCompositeMnemonics(parent, ignoredControls);
- if (mustLayout) {
- parent.layout(true);
- }
- }
-
- private boolean setCompositeMnemonics(Composite parent, Set ignoredControls) {
- Control children[] = parent.getChildren();
- Control currentChild = null;
- boolean mustLayout = false;
- for (int i = 0; i < children.length; i++) {
- Control previousChild = currentChild;
- currentChild = children[i];
- if (!ignoredControls.contains(currentChild)) {
- if (currentChild instanceof Combo || currentChild instanceof InheritableEntryField) {
- if (applyMnemonicsToPrecedingLabels && previousChild instanceof Label) {
- Label label = (Label) previousChild;
- String text = label.getText();
- if ((text != null) && (text.trim().length() > 0)) {
- String newText = setUniqueMnemonic(text);
- if (!text.equals(newText)) {
- label.setText(newText);
- mustLayout = true;
- }
- }
- }
- } else if (currentChild instanceof Button) {
- mustLayout |= setMnemonic((Button)currentChild);
- } else if (currentChild instanceof Composite) {
- /*
- * d54732: (KM) we test Composites last since we don't want to 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.
- */
- mustLayout |= setCompositeMnemonics((Composite) currentChild, ignoredControls);
- } // ignore other controls
- }
- }
- return mustLayout;
- }
-
- private void gatherCompositeMnemonics(Composite parent) {
- Control children[] = parent.getChildren();
- Control currentChild = null;
- for (int i = 0; i < children.length; i++) {
- Control previousChild = currentChild;
- currentChild = children[i];
- String childText = null;
- if (currentChild instanceof Combo || currentChild instanceof InheritableEntryField || currentChild instanceof Text) {
- if (applyMnemonicsToPrecedingLabels && previousChild instanceof Label) {
- Label label = (Label) previousChild;
- childText = label.getText();
- }
- } else if (currentChild instanceof Button) {
- childText = ((Button)currentChild).getText();
- } else if (currentChild instanceof Composite) {
- gatherCompositeMnemonics((Composite) currentChild);
- } // ignore other controls
- if (childText != null) {
- char ch = getMnemonic(childText);
- makeUsed(ch);
- }
- }
- }
-
- /**
- * 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) {
- if (page) {
- String[] labels = JFaceResources.getStrings(new String[] { "defaults", "apply" }); //$NON-NLS-1$ //$NON-NLS-2$
- String used = getMnemonicsFromStrings(labels).toUpperCase();
- makeUsed(used);
- }
- 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) {
- if (page) {
- String[] labels = new String[] { IDialogConstants.BACK_LABEL, IDialogConstants.NEXT_LABEL, IDialogConstants.FINISH_LABEL };
- String used = getMnemonicsFromStrings(labels).toUpperCase();
- makeUsed(used);
- }
- 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 8f9c31289..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [225506][api] make RSEAdapter API
- *******************************************************************************/
-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.
- *
- * @since org.eclipse.rse.ui 3.0
- */
-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$
- }
-}
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 0aa6dc1d1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * - created and used RSEPreferencesManager
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [181939] avoid subsystem plugin activation just for enablement checking
- * Uwe Stieber (Wind River) - [199032] [api] Remove method acceptContextMenuActionContribution(...) from RSESystemTypeAdapter
- * Martin Oberhuber (Wind River) - [218655][api] Provide SystemType enablement info in non-UI
- ********************************************************************************/
-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.jface.action.IMenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.IRSESystemTypeConstants;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardDescriptor;
-import org.eclipse.ui.IViewPart;
-import org.osgi.framework.Bundle;
-
-/**
- * Adapter for RSE system types.
- */
-public class RSESystemTypeAdapter extends RSEAdapter {
-
- 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, IRSESystemTypeConstants.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, IRSESystemTypeConstants.ICON_LIVE);
- 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).getLabel();
- }
- 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 instanceof IRSESystemType) {
- String property = ((IRSESystemType)object).getProperty(IRSESystemTypeConstants.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.
- * @deprecated Clients should use {@link IRSESystemType#isEnabled()}, which is
- * available without UI dependencies, in order to guarantee consistent
- * availability of system types.
- * Providers of custom RSESystemTypeAdapter implementations, which override
- * this method, should move their code to their IRSESystemType implementations.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218655#c1 for details.
- */
- public final boolean isEnabled(Object object) {
- IRSESystemType systemType = getSystemType(object);
- if (systemType != null) {
- return systemType.isEnabled();
- }
- return false;
- }
-
- /**
- * Sets the enabled state of a particular system type.
- * <p>
- * Note that system types which are provided by extenders via the dynamic
- * sytemTypeProviders extension point may have their own logic to determine
- * whether they are enabled or not, so changing the enabled setting may not
- * work for them.
- *
- * @param object The system type being adapted.
- * @param isEnabled true if the system type is enabled. false if it is not.
- * @deprecated Use
- * {@link RSEPreferencesManager#setIsSystemTypeEnabled(IRSESystemType, boolean)}
- */
- public void setIsEnabled(Object object, boolean isEnabled) {
- IRSESystemType systemType = getSystemType(object);
- if ( systemType != null) {
- RSEPreferencesManager.setIsSystemTypeEnabled(systemType, isEnabled);
- }
- }
-
- /**
- * 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) {
- result = RSEPreferencesManager.getDefaultUserId(systemType);
- }
- 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
- * @deprecated Use
- * {@link RSEPreferencesManager#setDefaultUserId(IRSESystemType, String)}
- */
- public void setDefaultUserId(Object object, String defaultUserId) {
- IRSESystemType systemType = getSystemType(object);
- if ( systemType != null) {
- RSEPreferencesManager.setDefaultUserId(systemType, defaultUserId);
- }
- }
-
- private static IRSESystemType getSystemType(Object systemTypeCandidate) {
- IRSESystemType result = null;
- if (systemTypeCandidate instanceof IRSESystemType) {
- result = (IRSESystemType) systemTypeCandidate;
- }
- return result;
- }
-
- /**
- * Called from <code>SystemViewPart#fillLocalToolBar(boolean)</code> to allow dynamic system
- * type providers to customize the RSE standard toolbar structure regarding their needs.
- * <p>
- * <b>Note:</b> This method is called for each system type. If a single system type adapter
- * is associated with multiple system types, this method is called multiple times.
- * Overriders must check if the required groups are added to the toolbar already
- * and must avoid to add them multiple times!
- *
- * @param view The view to customize. Must be not <code>null</code>.
- */
- public void addCustomToolbarGroups(IViewPart view) {
- // The static standard RSE system types have no custom toolbar groups.
- }
-
- /**
- * Called from {@link org.eclipse.rse.internal.ui.view.SystemView#createStandardGroups(IMenuManager)} to allow dynamic system
- * type providers to customize the RSE standard menu structure regarding their needs.
- * <p>
- * <b>Note:</b> This method is called for each system type. If a single system type adapter
- * is associated with multiple system types, this method is called multiple times.
- * Overriders must check if the required groups are added to the menu already
- * and must avoid to add them multiple times!
- *
- * @param menu The menu manager. Must be not <code>null</code>.
- */
- public void addCustomMenuGroups(IMenuManager menu) {
- // The static standard RSE system types have no custom menu groups.
- }
-
- /**
- * Checks if the given wizard descriptor is accepted for the system types the
- * adapter is covering.
- *
- * @param wizardConfigurationElementName The wizard configuration element name. Must be not <code>null</code>.
- * @param descriptor The wizard descriptor. Must be not <code>null</code>.
- *
- * @return <code>True</code> is accepted, <code>false</code> otherwise.
- */
- public boolean acceptWizardDescriptor(String wizardConfigurationElementName, IRSEWizardDescriptor descriptor) {
- assert wizardConfigurationElementName != null && descriptor != null;
-
- // We always accept the default RSE new connection wizard
- if ("org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard".equals(descriptor.getId())) { //$NON-NLS-1$
- return true;
- }
-
- return false;
- }
-
-} \ 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 98daf13a0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
+++ /dev/null
@@ -1,721 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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:
- * David Dykstal (IBM) - moved methods to SystemPreferencesManager.
- * Uwe Stieber (Wind River) - bugfixing.
- * David Dykstal (IBM) - 168870: move core function from UI to core
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [185554] Remove dynamicPopupMenuExtensions extension point
- * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
- * Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
- * Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
- * Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * David Dykstal (IBM) - [189858] Delay the creation of the remote systems project
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David Dykstal (IBM) - [191038] initialize SystemRegistryUI without a log file, it was not used
- * David McKnight (IBM) - [196838] Don't recreate local after it has been deleted
- * David Dykstal (IBM) - [197036] formatted the initialize job to be able to read it
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [236505] Remote systems dialog not working
- * David McKnight (IBM) - [238288] use ImageRegistry to store/retrieve images for RSE label providers
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import java.net.URL;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.core.model.SystemRegistry;
-import org.eclipse.rse.internal.ui.RSESystemTypeAdapterFactory;
-import org.eclipse.rse.internal.ui.RSEUIInitJob;
-import org.eclipse.rse.internal.ui.subsystems.SubSystemConfigurationProxyAdapterFactory;
-import org.eclipse.rse.internal.ui.view.SubSystemConfigurationAdapterFactory;
-import org.eclipse.rse.internal.ui.view.SystemViewAdapterFactory;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewResourceAdapterFactory;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageFile;
-import org.eclipse.rse.ui.internal.model.SystemRegistryUI;
-import org.eclipse.rse.ui.model.ISystemRegistryUI;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * Plugin for the core remote systems support.
- */
-public class RSEUIPlugin extends SystemBasePlugin
-{
-
- 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 Vector viewSuppliers = new Vector();
- private SystemViewAdapterFactory svaf; // for fastpath access
- private SystemTeamViewResourceAdapterFactory svraf; // for fastpath
- 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 preferences.
- */
- public void initializeDefaultPreferences() {
- SystemPreferencesManager.initDefaults();
- }
-
- /**
- * 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_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
-
-
-
-
-
-
-
- // 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_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
- {
- super.start(context);
-
- messageFile = getMessageFile("systemmessages.xml"); //$NON-NLS-1$
- defaultMessageFile = getDefaultMessageFile("systemmessages.xml"); //$NON-NLS-1$
-
- //Force load the SystemRegistry - TODO Is this really necessary?
- RSECorePlugin.getTheSystemRegistry();
-
- IAdapterManager manager = Platform.getAdapterManager();
-
- // DKM
- // for subsystem factories
- SubSystemConfigurationAdapterFactory ssfaf = new SubSystemConfigurationAdapterFactory();
- ssfaf.registerWithManager(manager);
-
- RSESystemTypeAdapterFactory rseSysTypeFactory = new RSESystemTypeAdapterFactory();
- rseSysTypeFactory.registerWithManager(manager);
-
- manager.registerAdapters(new SubSystemConfigurationProxyAdapterFactory(), ISubSystemConfigurationProxy.class);
-
- svaf = new SystemViewAdapterFactory();
- svaf.registerWithManager(manager);
-
- svraf = new SystemTeamViewResourceAdapterFactory();
- svraf.registerWithManager(manager);
-
- Job initJob = new RSEUIInitJob();
- initJob.schedule();
- }
-
- /**
- * For fastpath access to our adapters for non-local objects in our model.
- * Exploits the knowledge we use singleton adapters.
- *
- * @since 3.0 returning IAdapterFactory rather than SystemViewAdapterFactory
- */
- public IAdapterFactory getSystemViewAdapterFactory()
- {
- return svaf;
- }
-
- /**
- * Restart the whole thing after a team synchronization
- */
- public void restart()
- {
- if (RSECorePlugin.isTheSystemRegistryActive()) {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- // disconnect all active connections
- disconnectAll(false); // don't save ?
- // collapse and flush all nodes in all views
- sr.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 = sr.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
- RSECorePlugin.getTheSystemProfileManager(); // create folders per profile
- // clear in-memory settings for all connections, then restore from disk
- ((SystemRegistry)sr).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
- sr.fireEvent(new SystemResourceChangeEvent(sr, 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)
- {
- }
- }
- }
-
- /**
- * @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();
-
- // call this last
- super.stop(context);
- }
-
- /**
- * Disconnect all subsystems
- */
- protected void disconnectAll(boolean doSave)
- {
- if (RSECorePlugin.isTheSystemRegistryActive())
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfigurationProxy[] proxies = sr.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$
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * Test 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.
- * @return <code>true</code> if the System Registry has been instantiated already.
- * @deprecated use {@link RSECorePlugin#isTheSystemRegistryActive()}
- */
- public boolean isSystemRegistryActive()
- {
- return RSECorePlugin.isTheSystemRegistryActive();
- }
-
- /**
- * Return the persistence manager used for persisting RSE profiles.
- * @return the persistence manager used for persisting RSE profiles
- * @deprecated use {@link RSECorePlugin#getThePersistenceManager()}
- */
- public IRSEPersistenceManager getPersistenceManager()
- {
- return RSECorePlugin.getThePersistenceManager();
- }
-
- /**
- * Return the SystemRegistryUI singleton.
- * @return the SystemRegistryUI singleton.
- */
- public static ISystemRegistryUI getTheSystemRegistryUI()
- {
- return SystemRegistryUI.getInstance();
- }
-
- /**
- * Return the master profile manager singleton.
- * @return the RSE Profile Manager Singleton.
- * @deprecated use {@link RSECorePlugin#getTheSystemProfileManager()}
- */
- public static ISystemProfileManager getTheSystemProfileManager()
- {
- return RSECorePlugin.getTheSystemProfileManager();
- }
-
- /**
- * Check 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.
- * @return <code>true</code> if the System Registry has been instantiated already.
- * @deprecated use {@link RSECorePlugin#isTheSystemRegistryActive()}
- */
- public static boolean isTheSystemRegistryActive() {
- return RSECorePlugin.isTheSystemRegistryActive();
- }
-
- /**
- * @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);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemActionViewerFilter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemActionViewerFilter.java
deleted file mode 100644
index 38aa50464..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemActionViewerFilter.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [190442] Moved from org.eclipse.rse.internal.ui.view
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-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;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-/**
- * 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));
- if (adapter == null)
- {
- // might be deferred stuff
- return true;
- }
-
-
- // 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/SystemBaseForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java
deleted file mode 100644
index a8382152c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBaseForm.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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 #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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java
deleted file mode 100644
index 8f97034d0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java
+++ /dev/null
@@ -1,819 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [243263] NPE on expanding a filter
- * David McKnight (IBM) - [244454] SystemBasePlugin.getWorkBench() incorrectly returns null when called during Eclipse startup
- * David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup
- * Martin Oberhuber (Wind River) - [246406] Timeout waiting when loading RSE
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-
-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.IWindowListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchListener;
-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.
- *
- * @deprecated do not use use this directly, use {@link #getLogger()}
- * instead for lazy loading of the Logger. We do not guarantee
- * that this variable is ever initialized.
- */
- protected static Logger log = null;
-
- /**
- * Active workbench window
- */
- private static volatile IWorkbenchWindow activeWindow = null;
- private static volatile IWorkbenchWindow previousActiveWindow = null;
- private static IWindowListener windowListener = null;
- private static IWorkbenchListener workbenchListener = null;
-
- // instance variables
- private Hashtable imageDescriptorRegistry = null;
-
- /**
- * 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();
- }
- Display d = Display.getCurrent();
- if (d!=null) return d.getActiveShell();
- d = Display.getDefault();
- if (d!=null) return d.getActiveShell();
- 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 try to guess which one is right
- // KM: why do we need this??
- else {
- // for bug 244454, this ends up returning the wrong window
- // the correct solution involves:
- // - returning null when called from a non-UI thread
- // - making sure that callers handle and understand that
- // - null may be returned
- //
- // but for now (in 3.0.1) we're leaving this because
- // there are several callers that don't expect null and
- // will fail if we make the change now
- //
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- if (windows != null && windows.length > 0) {
- if (windows.length == 1) {
- return windows[0];
- } else {
- IWorkbenchWindow bestCandidate = windows[0];
- int candidateRank = 0;
- for (int i = 0; i < windows.length; i++) {
- if (windows[i] == activeWindow) {
- return activeWindow;
- } else if (windows[i] == previousActiveWindow) {
- //Windows get deactivated when a sub-dialog is opened or user switches
- //to another application. Such action still makes the previous window
- //the best candidate for the active one.
- bestCandidate = previousActiveWindow;
- candidateRank=10;
- } else if (windows[i].getActivePage()!= null && candidateRank==0) {
- bestCandidate = windows[i];
- candidateRank = 1;
- }
- }
- return bestCandidate;
- }
- }
- }
- }
- return null;
- }
-
- private static class WindowListener implements IWindowListener {
- public void windowActivated(IWorkbenchWindow window) {
- activeWindow = window;
- previousActiveWindow = null; // not needed any more, allow gc
- }
-
- public void windowDeactivated(IWorkbenchWindow window) {
- if (window == activeWindow) {
- previousActiveWindow = activeWindow;
- activeWindow = null;
- }
- }
-
- public void windowClosed(IWorkbenchWindow window) {
- windowDeactivated(window);
- }
-
- public void windowOpened(IWorkbenchWindow window) {
- }
- }
-
- private static class WorkbenchListener implements IWorkbenchListener {
- public boolean preShutdown(IWorkbench workbench, boolean forced) {
- return true;
- }
-
- public void postShutdown(IWorkbench workbench) {
- synchronized (WindowListener.class) {
- assert windowListener != null;
- workbench.removeWindowListener(windowListener);
- workbench.removeWorkbenchListener(workbenchListener);
- workbenchListener = null;
- windowListener = null;
- }
- }
- }
-
- private static void addWindowListener() {
- synchronized (WindowListener.class) {
- if (windowListener == null) {
- try {
- IWorkbench wb = PlatformUI.getWorkbench();
- windowListener = new WindowListener();
- wb.addWindowListener(windowListener);
- workbenchListener = new WorkbenchListener();
- wb.addWorkbenchListener(workbenchListener);
- } catch (IllegalStateException e) {
- /* will try again later when workbench becomes available */
- System.out.println("Workbench not yet available"); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * 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;
- }
-
- // ------------------
- // 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("/nl/" + language + "/" + name); //$NON-NLS-1$ //$NON-NLS-2$
- if (country.length() > 0) {
- candidates.push("/nl/" + language + "/" + country + "/" + name); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- while (!candidates.isEmpty() && result == null) {
- String candidate = (String) candidates.pop();
- result = bundle.getResource(candidate);
- }
- return result;
- }
-
- /**
- * Parse the given message file into memory, into a SystemMessageFile
- * object.
- *
- * @param bundle -
- * 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) {
- mf = SystemUIMessageFile.getMessageFile(fileName, url);
- 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 bundle -
- * 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) {
- mf = SystemUIMessageFile.getMessageFile(fileName, url);
- 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 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 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:
- getBaseDefault().getLogger().logError(message.toString(), ex);
- break;
- case SystemMessage.WARNING:
- getBaseDefault().getLogger().logWarning(message.toString(), ex);
- break;
- case SystemMessage.INFORMATION:
- case SystemMessage.COMPLETION:
- getBaseDefault().getLogger().logInfo(message.toString(), ex);
- break;
- case SystemMessage.INQUIRY:
- case SystemMessage.UNEXPECTED:
- default:
- getBaseDefault().getLogger().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)
- {
- getBaseDefault().getLogger().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)
- {
- getBaseDefault().getLogger().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)
- {
- getBaseDefault().getLogger().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)
- {
- getBaseDefault().getLogger().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 prefix - 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)
- {
- getBaseDefault().getLogger().logDebugMessage(prefix, message);
- }
-
- /**
- * Constructor.
- */
- public SystemBasePlugin() {
- super();
-
- if (baseInst == null) {
- baseInst = this;
- }
- }
-
- // ------------------------
- // 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);
-
- // // bug 246406: initialize the logger lazily
- // getLogger();
-
- addWindowListener();
- }
-
- /**
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- if (Logger.DEBUG) {
- 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;
- try {
- wb = PlatformUI.getWorkbench();
- if (windowListener == null)
- addWindowListener();
- }
- catch (Exception exc)
- {
- // workbench not created yet
- }
- 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.
- */
- 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.
- *
- * @deprecated use {@link org.eclipse.ui.ISharedImages} via
- * PlatformUI.getWorkbench().getSharedImages()
- */
- public ImageDescriptor getImageDescriptorFromIDE(String relativePath)
- {
- // This code is from
- // org.eclipse.ui.views.navigator.ResourceNavigatorActionGroup#getImageDescriptor(java.lang.String)
- 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()
- {
- // logger
- if (log == null) {
- log = LoggerFactory.getLogger(this);
- log.logInfo("Loading " + this.getClass()); //$NON-NLS-1$
- }
- 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.
- *
- * @deprecated this method is useless right now because SystemBasePlugin is part of
- * the rse.ui plugin which depends on workbench and therefore we can never load this
- * class while actually being in headless mode. Normally this should return false
- * however, because the javadoc says we "equate this to mean that the workbench is not running",
- * it's possible early on that the method may return true if the workbench has not
- * yet been instantiated - although it will later return false.
- */
- public boolean isHeadless()
- {
- if (getWorkbench() == null){
- return true;
- }
- return false;
- }
-} \ 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 9a366e755..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java
+++ /dev/null
@@ -1,1543 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * - created and used RSEPreferencesManager
- * Uwe Stieber (Wind River) - bugfixing and reworked new connection wizard
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
- * David McKnight (IBM) - [238314] Default user ID on host properties page not disabled
- *******************************************************************************/
-
-package org.eclipse.rse.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.InetAddress;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.util.Arrays;
-import java.util.List;
-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.resource.JFaceResources;
-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.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.dialogs.ISystemPromptDialog;
-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.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.newconnection.RSEAbstractNewConnectionWizard;
-import org.eclipse.swt.SWT;
-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.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.Control;
-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.Text;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.ide.IDEEncoding;
-
-/**
- * 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, SelectionListener, Runnable, IRunnableWithProgress {
-
- public static final boolean CREATE_MODE = false;
- public static final boolean UPDATE_MODE = true;
- public static IRSESystemType lastSystemType = null;
- protected IHost conn;
- protected IRSESystemType defaultSystemType;
- protected IRSESystemType[] validSystemTypes;
-
- // 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;
- protected Group encodingGroup;
- protected Button remoteEncodingButton, otherEncodingButton;
- protected Combo otherEncodingCombo;
-
- // 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 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 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;
-
- // encoding fields
- protected boolean addEncodingFields = false;
- protected String defaultEncoding = null;
- protected boolean isRemoteEncoding = false;
- protected boolean isValidBefore = true;
-
- /**
- * 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 = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getActiveSystemProfileNames();
- callerInstanceOfWizardPage = caller instanceof IWizardPage;
- callerInstanceOfSystemPromptDialog = caller instanceof ISystemPromptDialog;
- callerInstanceOfPropertyPage = caller instanceof IWorkbenchPropertyPage;
-
- 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.
- * Must be called before the widgets are created in
- * {@link #createContents(Composite, boolean, String)}.
- *
- * @param systemType the only IRSESystemType allowed, or
- * <code>null</code> to show all allowed system types.
- */
- public void restrictSystemType(IRSESystemType systemType) {
- if (systemType==null) {
- restrictSystemTypes(null);
- } else {
- IRSESystemType[] types = new IRSESystemType[] { systemType };
- restrictSystemTypes (types);
- }
- }
-
- /**
- * Call this to restrict the system types that the user is allowed to choose.
- *
- * @param systemTypes the list of allowed system types, or
- * <code>null</code> to not restrict the allowed system types.
- */
- public void restrictSystemTypes(IRSESystemType[] systemTypes) {
- //Remember the old selection before changing the data
- IRSESystemType oldSelection = getSystemType();
-
- //Update the known list of valid system types
- if (systemTypes == null) {
- validSystemTypes = SystemWidgetHelpers.getValidSystemTypes(null);
- } else {
- validSystemTypes = new IRSESystemType[systemTypes.length];
- System.arraycopy(systemTypes, 0, validSystemTypes, 0, systemTypes.length);
- SystemWidgetHelpers.sortSystemTypesByLabel(validSystemTypes);
- }
-
- //Restore the default system type based on the new list
- List systemTypesAsList = Arrays.asList(validSystemTypes);
- if (defaultSystemType == null || !systemTypesAsList.contains(defaultSystemType)) {
- defaultSystemType = validSystemTypes[0];
- }
-
- //Set items in Combo and restore the previous selection
- if (textSystemType!=null) {
- textSystemType.setItems(SystemWidgetHelpers.getSystemTypeLabels(validSystemTypes));
- if (oldSelection!=null && Arrays.asList(validSystemTypes).contains(oldSelection)) {
- textSystemType.select(systemTypesAsList.indexOf(oldSelection));
- } else {
- textSystemType.select(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;
- this.conn = conn;
- defaultSystemType = conn.getSystemType();
- defaultConnectionName = conn.getAliasName();
- defaultHostName = conn.getHostName();
- defaultUserId = conn.getLocalDefaultUserId();
- defaultDescription = conn.getDescription();
- defaultProfile = conn.getSystemProfile().getName();
- defaultWorkOffline = conn.isOffline();
- defaultEncoding = conn.getDefaultEncoding(false);
-
- if (defaultEncoding == null) {
- defaultEncoding = conn.getDefaultEncoding(true);
- isRemoteEncoding = true;
- }
- else {
- isRemoteEncoding = false;
- }
-
- if (updateMode) {
- defaultProfileNames = new String[1];
- defaultProfileNames[0] = defaultProfile;
- }
-
- if (contentsCreated) doInitializeFields();
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name) {
- defaultConnectionName = name;
- if (contentsCreated) {
- textConnectionName.setText(name != null ? name : ""); //$NON-NLS-1$
- verify(false);
- }
- }
-
- /**
- * Preset the host name
- */
- public void setHostName(String name) {
- defaultHostName = name;
- if (contentsCreated) {
- textHostName.setText(name != null ? name : ""); //$NON-NLS-1$
- verify(false);
- }
- }
-
- /**
- * 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 cancelled
- ok = false;
- controlInError = textHostName;
- } catch (InvocationTargetException e) {
- // error found
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_HOSTNAME_NOTFOUND);
- errorMessage.makeSubstitution(currentHostName);
- controlInError = textHostName;
- }
- }
- }
-
- // validate host name...
- if ((errorMessage == null) && addEncodingFields) {
- errorMessage = validateEncoding();
-
- if (errorMessage != null) {
- controlInError = otherEncodingCombo;
- }
- }
-
- // 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 != null)
- 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.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;
- }
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(defaultSystemType.getAdapter(RSESystemTypeAdapter.class));
- return sysTypeAdapter.isEnableOffline(defaultSystemType);
- }
-
- /**
- * Return user-entered System Type.
- * Call this after finish ends successfully.
- */
- public IRSESystemType getSystemType() {
- if (textSystemType != null) {
- int idx = textSystemType.getSelectionIndex();
- if (idx >= 0) {
- return validSystemTypes[idx];
- }
- }
- 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
- * IRSEUserIdConstants.
- * @return the user id location
- * @see IRSEUserIdConstants
- */
- 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) {
- 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 || ((validSystemTypes != null) && (validSystemTypes.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$
-
- // 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 = lastSystemType;
- if (defaultSystemType == null) {
- defaultSystemType = validSystemTypes[0];
- }
- }
-
- textHostName = SystemWidgetHelpers.createHostNameCombo(composite_prompts, null, defaultSystemType);
- textHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP);
- SystemWidgetHelpers.setHelp(textHostName, RSEUIPlugin.HELPPREFIX + "ccon0004"); //$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);
- if (validSystemTypes==null) {
- validSystemTypes = SystemWidgetHelpers.getValidSystemTypes(null);
- } else {
- SystemWidgetHelpers.sortSystemTypesByLabel(validSystemTypes);
- }
- textSystemType = SystemWidgetHelpers.createSystemTypeCombo(composite_prompts, null, validSystemTypes);
- textSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
- SystemWidgetHelpers.setHelp(textSystemType, RSEUIPlugin.HELPPREFIX + "ccon0003"); //$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.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$
- }
-
- 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.getSelectionIndex()>=0))
- caller.systemTypeSelected(validSystemTypes[textSystemType.getSelectionIndex()], true);
- else if ((validSystemTypes != null) && (validSystemTypes.length == 1))
- caller.systemTypeSelected(validSystemTypes[0], true);
-
- if (textUserId == null)
- userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET;
-
- // check if an encodings field should be added
- if (addEncodingFields) {
-
- SystemWidgetHelpers.createLabel(composite_prompts, "", 2); //$NON-NLS-1$
-
- // encoding field
- encodingGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, SystemResources.RESID_HOST_ENCODING_GROUP_LABEL);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = SWT.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = SWT.BEGINNING;
- data.grabExcessVerticalSpace = false;
- encodingGroup.setLayoutData(data);
-
- Composite messageComposite = new Composite(encodingGroup, SWT.NONE);
- GridLayout messageLayout = new GridLayout();
- messageLayout.numColumns = 2;
- messageLayout.marginWidth = 0;
- messageLayout.marginHeight = 0;
- messageComposite.setLayout(messageLayout);
- messageComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Label noteLabel = new Label(messageComposite, SWT.BOLD);
- noteLabel.setText(SystemResources.RESID_HOST_ENCODING_SETTING_NOTE);
- noteLabel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
- data = new GridData();
- data.grabExcessHorizontalSpace = false;
- noteLabel.setLayoutData(data);
-
- Label messageLabel = new Label(messageComposite, SWT.NULL);
- messageLabel.setText(SystemResources.RESID_HOST_ENCODING_SETTING_MSG);
- data = new GridData();
- data.horizontalAlignment = SWT.BEGINNING;
- data.grabExcessHorizontalSpace = true;
- data.horizontalIndent = 0;
- messageLabel.setLayoutData(data);
-
- SystemWidgetHelpers.createLabel(encodingGroup, ""); //$NON-NLS-1$
-
- // remote encoding field
- String defaultEncodingLabel = SystemResources.RESID_HOST_ENCODING_REMOTE_LABEL;
-
- // check if user set encoding
- // if so, we leave default encoding label as is
- // if not, we check if remote encoding is set, and if it is, include the encoding in the label
- if (conn.getDefaultEncoding(false) == null) {
-
- String remoteEncoding = conn.getDefaultEncoding(true);
-
- if (remoteEncoding != null) {
- defaultEncodingLabel = SystemResources.RESID_HOST_ENCODING_REMOTE_ENCODING_LABEL;
-
- int idx = defaultEncodingLabel.indexOf('%');
-
- if (idx != -1) {
- defaultEncodingLabel = defaultEncodingLabel.substring(0, idx) + remoteEncoding + defaultEncodingLabel.substring(idx+2);
- }
- }
- }
-
- remoteEncodingButton = SystemWidgetHelpers.createRadioButton(encodingGroup, null, defaultEncodingLabel, SystemResources.RESID_HOST_ENCODING_REMOTE_TOOLTIP);
- data = new GridData();
- data.horizontalSpan = 2;
- data.grabExcessHorizontalSpace = true;
- remoteEncodingButton.setLayoutData(data);
-
- SelectionAdapter remoteButtonSelectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEncodingGroupState(remoteEncodingButton.getSelection());
- validateEncoding();
- }
- };
-
- remoteEncodingButton.addSelectionListener(remoteButtonSelectionListener);
-
- Composite otherComposite = new Composite(encodingGroup, SWT.NONE);
- GridLayout otherLayout = new GridLayout();
- otherLayout.numColumns = 2;
- otherLayout.marginWidth = 0;
- otherLayout.marginHeight = 0;
- otherComposite.setLayout(otherLayout);
- otherComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- // other encoding field
- otherEncodingButton = SystemWidgetHelpers.createRadioButton(otherComposite, null, SystemResources.RESID_HOST_ENCODING_OTHER_LABEL, SystemResources.RESID_HOST_ENCODING_OTHER_TOOLTIP);
- data = new GridData();
- data.grabExcessHorizontalSpace = false;
- otherEncodingButton.setLayoutData(data);
-
- SelectionAdapter otherButtonSelectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateEncodingGroupState(!otherEncodingButton.getSelection());
- validateEncoding();
- }
- };
-
- otherEncodingButton.addSelectionListener(otherButtonSelectionListener);
-
- // other encoding combo
- otherEncodingCombo = SystemWidgetHelpers.createCombo(otherComposite, null, SystemResources.RESID_HOST_ENCODING_ENTER_TOOLTIP);
- data = new GridData();
- data.horizontalAlignment = SWT.BEGINNING;
- data.grabExcessHorizontalSpace = true;
- data.horizontalIndent = 0;
- otherEncodingCombo.setLayoutData(data);
-
- otherEncodingCombo.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- validateEncoding();
- }
- });
-
- otherEncodingCombo.addKeyListener(new KeyAdapter(){
- public void keyReleased(KeyEvent e) {
- validateEncoding();
- }
- });
-
- SystemWidgetHelpers.createLabel(encodingGroup, ""); //$NON-NLS-1$
-
- SystemWidgetHelpers.createLabel(composite_prompts, "", 2); //$NON-NLS-1$
- }
-
- doInitializeFields();
-
- contentsCreated = true;
-
- return composite_prompts; // composite;
- }
-
- /**
- * Update the encoding group state.
- * @param useDefault whether to update the state with default option on. <code>true</code> if the default option
- * should be on, <code>false</code> if it should be off.
- */
- private void updateEncodingGroupState(boolean useDefault) {
- remoteEncodingButton.setSelection(useDefault);
- otherEncodingButton.setSelection(!useDefault);
-
- if (useDefault) {
-
- if (defaultEncoding != null) {
- otherEncodingCombo.setText(defaultEncoding);
- }
- else {
- String workspaceDefault = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
- otherEncodingCombo.setText(workspaceDefault); //$NON-NLS-1$
- }
- }
-
- validateEncoding();
- }
-
- /**
- * Updates the valid state of the encoding group.
- */
- private SystemMessage validateEncoding() {
- boolean isValid = isEncodingValid();
-
- errorMessage = null;
-
- if (!isValid) {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ENCODING_NOT_SUPPORTED);
- }
-
- showErrorMessage(errorMessage);
- setPageComplete();
- return errorMessage;
- }
-
- /**
- * Returns whether the encoding is valid.
- * @return <code>true</code> if the encoding is valid, <code>false</code> otherwise.
- */
- private boolean isEncodingValid() {
- return remoteEncodingButton.getSelection() || isEncodingValid(otherEncodingCombo.getText());
- }
-
- /**
- * Returns whether or not the given encoding is valid.
- * @param encoding the encoding.
- * @return <code>true</code> if the encoding is valid, <code>false</code> otherwise.
- */
- private boolean isEncodingValid(String encoding) {
- try {
- return Charset.isSupported(encoding);
- }
- catch (IllegalCharsetNameException e) {
- return false;
- }
- }
-
- /**
- * 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);
- IRSESystemType currSystemType = getSystemType();
- textHostName.setItems(RSECorePlugin.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 RSEAbstractNewConnectionWizard) {
- RSEAbstractNewConnectionWizard connWizard = (RSEAbstractNewConnectionWizard)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 (validSystemTypes != null) {
- if (textSystemTypeReadOnly != null)
- textSystemTypeReadOnly.setText(validSystemTypes[0].getLabel());
- if (defaultSystemType == null)
- defaultSystemType = validSystemTypes[0];
- } else if (defaultSystemType != null) {
- if (textSystemTypeReadOnly != null)
- textSystemTypeReadOnly.setText(defaultSystemType.getLabel());
- }
- }
- // ...selectable:
- else {
- if (defaultSystemType == null) {
- defaultSystemType = lastSystemType;
- }
- if (defaultSystemType != null) {
- int selIdx = Arrays.asList(validSystemTypes).indexOf(defaultSystemType);
- if (selIdx >= 0) {
- textSystemType.select(selIdx);
- } else {
- textSystemType.select(0);
- }
- } else {
- textSystemType.select(0);
- }
- defaultSystemType = getSystemType();
- }
-
- // ---------------------------------------------------
- // connection name
- // ---------------------------------------------------
- if (defaultConnectionName != null)
- textConnectionName.setText(defaultConnectionName);
- textConnectionName.setTextLimit(connectionNameLength);
-
- // -----------
- // host name (address)
- // -----------
- 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);
- }
-
- // the file encoding group
- if (addEncodingFields) {
- List encodings = IDEEncoding.getIDEEncodings();
- String[] encodingStrings = new String[encodings.size()];
- encodings.toArray(encodingStrings);
- otherEncodingCombo.setItems(encodingStrings);
-
- // if the encoding is the same as the default encoding, then we want to choose the default encoding option
- if (isRemoteEncoding) {
- updateEncodingGroupState(true);
- }
- // otherwise choose the other encoding option
- else {
- otherEncodingCombo.setText(defaultEncoding);
- updateEncodingGroupState(false);
- }
-
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- // disable if any subsystem is connected
- if (!conn.getSystemType().getId().equalsIgnoreCase(IRSESystemType.SYSTEMTYPE_LOCAL_ID) && sr.isAnySubSystemConnected(conn)) {
- encodingGroup.setEnabled(false);
- remoteEncodingButton.setEnabled(false);
- otherEncodingButton.setEnabled(false);
- otherEncodingCombo.setEnabled(false);
- }
- }
-
- verify(false);
- }
-
- /**
- * Initialize userId values.
- * We have to reset after user changes the system type
- */
- private void initializeUserIdField(IRSESystemType systemType, String currentUserId) {
- // ---------------
- // default user id
- // ---------------
- String parentUserId = RSEPreferencesManager.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() {
- final String hostName = textHostName.getText().trim();
-
- // d43191
- if (connectionNameEmpty && contentsCreated) 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 = getSystemType();
- 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 = RSECorePlugin.getTheSystemRegistry().getHostAliasNames(profile);
- 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 = RSECorePlugin.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 = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile[] profiles = sr.getSystemProfileManager().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();
- }
-
- /**
- * Add fields to enable encoding for the host to be set. This form will not have any encoding fields unless this is called.
- */
- public void addDefaultEncodingFields() {
- addEncodingFields = true;
- }
-
- /**
- * Returns the encoding that was specified. Only applies if encoding fields were added to this form.
- * @return the encoding that was specified. This will return <code>null</code> if the selection is to use the encoding from the remote system
- * but that encoding has not been obtained yet.
- * @see #addDefaultEncodingFields()
- */
- public String getDefaultEncoding() {
-
- if (addEncodingFields) {
- return getSelectedEncoding();
- }
- else {
- return null;
- }
- }
-
- /**
- * Returns the currently selected encoding.
- * @return the currently selected encoding.
- */
- private String getSelectedEncoding() {
- if (remoteEncodingButton.getSelection()) {
- return defaultEncoding;
- }
-
- return otherEncodingCombo.getText();
- }
-
- /**
- * Returns whether the encoding option is to use the encoding of the remote system. Only applies if encoding fields were added to this form.
- * @return <code>true</code> if the encoding option is to use the encoding of the remote system, <code>false</code> if the user specified the encoding.
- * @see #addDefaultEncodingFields()
- */
- public boolean isEncodingRemoteDefault() {
-
- if (addEncodingFields) {
- return remoteEncodingButton.getSelection();
- }
- else {
- return false;
- }
- }
-} \ 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 0b271adc7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemMenuManager.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * Tobias Schwarz (Wind River) - [187312] Fix duplicate submenus contributed through plugin.xml
- ********************************************************************************/
-
-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.internal.ui.actions.SystemCascadingBrowseWithAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingCompareWithAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingExpandToAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingNewAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingOpenWithAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingRemoteServersAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingReplaceWithAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingViewAction;
-import org.eclipse.rse.internal.ui.actions.SystemCascadingWorkWithAction;
-import org.eclipse.rse.internal.ui.actions.SystemSeparatorAction;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-
-/**
- * Override/wrapper of JFace MenuManager so we can redirect any
- * menu additions to specific menu groups to go into
- * predefined submenus.
- * <p>
- * Only exposes core set of MenuManager methods. Rest can be
- * accessed by calling getMenuManger().
- */
-public class SystemMenuManager
-{
- 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 ISystemContextMenuConstants.GROUP EACH ACTION SHOULD BE ADDED TO, SO WE FORCE
- * YOU TO CALL APPENDTOISystemContextMenuConstants.GROUP!
- *
- 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 menuOrSeparator menu or separator 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 ISystemContextMenuConstants.GROUPS AND DECIDING PER ISystemContextMenuConstants.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;
- }
-
- /**
- * Return the given subMenu if already instantiated locally, or
- * find it with the given subMenuId in the nested IMenuManager
- * if not yet instantiated locally.
- *
- * This is necessary in order to make sure the given submenu
- * is not created twice when it (or an item of it) has been
- * contributed by a client through plugin.xml already.
- *
- * @param subMenu existing local submenu instance, or
- * <code>null</code> if not yet instantiated locally.
- * @param subMenuId submenu ID by which to find it in IMenuManager.
- * @return existing instantiated, or newly found submenu instance,
- * or <code>null</code> if the subMenu does not exist yet.
- */
- private IMenuManager findSpecialSubMenu(IMenuManager subMenu, String subMenuId) {
- if (subMenu == null) {
- IContributionItem item = mgr.find(subMenuId);
- if (item instanceof IMenuManager) {
- subMenu = (IMenuManager)item;
- }
- }
- return subMenu;
- }
-
- private IMenuManager getSpecialSubMenu(String groupName)
- {
- IMenuManager subMenu = null;
- menuCreated = false;
- if (groupName!=null)
- {
- if (groupName.equals(ISystemContextMenuConstants.GROUP_NEW))
- {
- // first of all try to find the subMenu.
- // the submenu can already exist, when any adapter created it to allow the
- // contribution of actions via plugin.xml
- // RSE creates the submenus only, when they are needed within the code,
- // so it is possible that submenus doesn'texist for plugin.xml contributions
- // and so an error log entry is generated.
- newSubMenu = findSpecialSubMenu(newSubMenu, ISystemContextMenuConstants.MENU_NEW);
- if (newSubMenu == null)
- {
- newSubMenu = (new SystemCascadingNewAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_NEW, newSubMenu);
- menuCreated = true;
- }
- subMenu = newSubMenu;
- }
- /*
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_GOTO))
- {
- if (gotoSubMenu == null)
- {
- gotoSubMenu = (new SystemCascadingGoToAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_GOTO, gotoSubMenu);
- menuCreated = true;
- }
- subMenu = gotoSubMenu;
- }
- */
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_EXPANDTO))
- {
- expandtoSubMenu = findSpecialSubMenu(expandtoSubMenu, ISystemContextMenuConstants.MENU_EXPANDTO);
- if (expandtoSubMenu == null)
- {
- expandtoSubMenu = (new SystemCascadingExpandToAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_EXPANDTO, expandtoSubMenu);
- menuCreated = true;
- }
- subMenu = expandtoSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_OPENWITH))
- {
- openwithSubMenu = findSpecialSubMenu(openwithSubMenu, ISystemContextMenuConstants.MENU_OPENWITH);
- if (openwithSubMenu == null)
- {
- openwithSubMenu = (new SystemCascadingOpenWithAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_OPENWITH, openwithSubMenu);
- menuCreated = true;
- }
- subMenu = openwithSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_BROWSEWITH))
- {
- browsewithSubMenu = findSpecialSubMenu(browsewithSubMenu, ISystemContextMenuConstants.MENU_BROWSEWITH);
- if (browsewithSubMenu == null)
- {
- browsewithSubMenu = (new SystemCascadingBrowseWithAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_BROWSEWITH, browsewithSubMenu);
- menuCreated = true;
- }
- subMenu = browsewithSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_COMPAREWITH))
- {
- comparewithSubMenu = findSpecialSubMenu(comparewithSubMenu, ISystemContextMenuConstants.MENU_COMPAREWITH);
- if (comparewithSubMenu == null)
- {
- comparewithSubMenu = (new SystemCascadingCompareWithAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_COMPAREWITH, comparewithSubMenu);
- menuCreated = true;
- }
- subMenu = comparewithSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_REPLACEWITH))
- {
- replacewithSubMenu = findSpecialSubMenu(replacewithSubMenu, ISystemContextMenuConstants.MENU_REPLACEWITH);
- if (replacewithSubMenu == null)
- {
- replacewithSubMenu = (new SystemCascadingReplaceWithAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_REPLACEWITH, replacewithSubMenu);
- menuCreated = true;
- }
- subMenu = replacewithSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_WORKWITH))
- {
- workwithSubMenu = findSpecialSubMenu(workwithSubMenu, ISystemContextMenuConstants.MENU_WORKWITH);
- if (workwithSubMenu == null)
- {
- workwithSubMenu = (new SystemCascadingWorkWithAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_WORKWITH, workwithSubMenu);
- menuCreated = true;
- }
- subMenu = workwithSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_VIEWER_SETUP))
- {
- if (viewSubMenu == null)
- {
- viewSubMenu = (new SystemCascadingViewAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.GROUP_VIEWER_SETUP, viewSubMenu);
- menuCreated = true;
- }
- subMenu = viewSubMenu;
- }
- else if (groupName.equals(ISystemContextMenuConstants.GROUP_STARTSERVER))
- {
- serverSubMenu = findSpecialSubMenu(serverSubMenu, ISystemContextMenuConstants.MENU_STARTSERVER);
- if (serverSubMenu == null)
- {
- serverSubMenu = (new SystemCascadingRemoteServersAction()).getSubMenu();
- mgr.appendToGroup(ISystemContextMenuConstants.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(ISystemContextMenuConstants.MENU_NEW))
- groupName = ISystemContextMenuConstants.GROUP_NEW;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_GOTO))
- groupName = ISystemContextMenuConstants.GROUP_GOTO;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_EXPANDTO))
- groupName = ISystemContextMenuConstants.GROUP_EXPANDTO;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_OPENWITH))
- groupName = ISystemContextMenuConstants.GROUP_OPENWITH;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_BROWSEWITH))
- groupName = ISystemContextMenuConstants.GROUP_BROWSEWITH;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_COMPAREWITH))
- groupName = ISystemContextMenuConstants.GROUP_COMPAREWITH;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_REPLACEWITH))
- groupName = ISystemContextMenuConstants.GROUP_REPLACEWITH;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_WORKWITH))
- groupName = ISystemContextMenuConstants.GROUP_WORKWITH;
- else if (menuID.equals(ISystemContextMenuConstants.MENU_STARTSERVER))
- groupName = ISystemContextMenuConstants.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/SystemPreferencesManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java
deleted file mode 100644
index ca5cb5e15..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemPreferencesManager.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a this package, was in
- * the org.eclipse.rse.core package of the UI plugin.
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David McKnight (IBM) - [237300] Problem with setDefaultHistory for SystemHistoryCombo.
- * David McKnight (IBM) - [240991] RSE startup creates display on worker thread before workbench.
- * David McKnight (IBM) - [240991] Avoiding calling SystemBasePluging.getWorkbench()
- * Martin Oberhuber (Wind River) - [246406] Timeout waiting when loading RSE
- ********************************************************************************/
-package org.eclipse.rse.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.rse.core.IRSEPreferenceNames;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.events.ISystemModelChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleListener;
-
-/**
- * A utility class that encapsulates all global preferences for the remote system framework
- * for both core and UI preferences.
- * <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>
- * This class should not be subclassed.
- */
-public class SystemPreferencesManager {
-
- /*
- * The following are preferences that may be set from the
- * system properties.
- */
- private static boolean showLocalConnection;
- private static boolean showProfilePage; // This is not a persistent preference
- private static boolean showNewConnectionPrompt; // This is not a persistent preference
-
- /*
- * Singleton instance to support listening to model change events
- */
- private static SystemPreferencesManager fInstance = new SystemPreferencesManager();
- private int fModelChangeListeners = 0;
- private ISystemModelChangeListener fModelChangeListener = null;
-
- /*
- * Private Constructor to discourage instance creation other than by ourselves.
- */
- private SystemPreferencesManager() {
- }
-
- /**
- * Migrate Preferences from UI Preference Store into Core Preference store
- */
- private static void migrateCorePreferences() {
- String[] keys = {
- IRSEPreferenceNames.ACTIVEUSERPROFILES,
- IRSEPreferenceNames.USE_DEFERRED_QUERIES,
- IRSEPreferenceNames.USERIDPERKEY
- };
- for (int i = 0; i < keys.length; i++) {
- migrateCorePreference(keys[i]);
- }
- }
-
- private static void migrateCorePreference(String preferenceName) {
- String name = ISystemPreferencesConstants.ROOT + preferenceName;
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- if (store.contains(name) && !store.isDefault(name)) {
- String value = store.getString(name);
- store.setToDefault(name);
- store.setDefault(name, "*migrated*"); //$NON-NLS-1$
- store = RSECorePlugin.getDefault().getPluginPreferences();
- store.setValue(preferenceName, value);
- }
- }
-
- /**
- * Initialize our preference store with our defaults.
- * This is called once at plugin startup.
- */
- public static void initDefaults() {
- migrateCorePreferences();
- initDefaultsUI();
- savePreferences();
- fInstance.startModelChangeListening();
- }
-
- private static void initDefaultsUI() {
-
- //String showProp = System.getProperty("rse.showNewConnectionPrompt");
- RSEUIPlugin ui = RSEUIPlugin.getDefault();
- Preferences store = ui.getPluginPreferences();
- showNewConnectionPrompt= getBooleanProperty("rse.showNewConnectionPrompt", ISystemPreferencesConstants.DEFAULT_SHOWNEWCONNECTIONPROMPT); //$NON-NLS-1$
- showLocalConnection = getBooleanProperty("rse.showLocalConnection", true); //$NON-NLS-1$
- showProfilePage = getBooleanProperty("rse.showProfilePage", false); //$NON-NLS-1$
- store.setDefault(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE, ISystemPreferencesConstants.DEFAULT_RESTORE_STATE_FROM_CACHE);
- store.setDefault(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES, ISystemPreferencesConstants.DEFAULT_QUALIFY_CONNECTION_NAMES);
- store.setDefault(ISystemPreferencesConstants.SHOWFILTERPOOLS, ISystemPreferencesConstants.DEFAULT_SHOWFILTERPOOLS);
- 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.CASCADE_UDAS_BYPROFILE, ISystemPreferencesConstants.DEFAULT_CASCADE_UDAS_BYPROFILE);
- store.setDefault(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT, showNewConnectionPrompt);
- store.setDefault(Mnemonics.POLICY_PREFERENCE, Mnemonics.POLICY_DEFAULT);
- store.setDefault(Mnemonics.APPEND_MNEMONICS_PATTERN_PREFERENCE, Mnemonics.APPEND_MNEMONICS_PATTERN_DEFAULT);
- store.setDefault(ISystemPreferencesConstants.SHOW_EMPTY_LISTS, ISystemPreferencesConstants.DEFAULT_SHOW_EMPTY_LISTS);
- savePreferences();
- }
-
- private static boolean getBooleanProperty(String propertyName, boolean defaultValue) {
- String property = System.getProperty(propertyName);
- boolean value = (property == null) ? defaultValue : property.equals(Boolean.toString(true));
- return value;
- }
-
- public static boolean getShowLocalConnection() {
- return showLocalConnection;
- }
-
- public static boolean getShowProfilePage() {
- return showProfilePage;
- }
-
- /**
- * @return true if the user has elected to show user defined actions cascaded by profile
- */
- public static boolean getCascadeUserActions() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- return store.getBoolean(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE);
- }
-
- /**
- * Sets if the user has elected to show user defined actions cascaded by profile.
- * Does not save the preferences. This must be done by the caller.
- * @see #savePreferences()
- * @param cascade whether or not to cascade user action menus
- */
- public static void setCascadeUserActions(boolean cascade) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE, cascade);
- }
-
- /**
- * @return the ordered list of connection names.
- * This is how user arranged his connections in the system view.
- */
- public static String[] getConnectionNamesOrder() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- return parseStrings(store.getString(ISystemPreferencesConstants.ORDER_CONNECTIONS));
- }
-
- /**
- * Gets the user's preference for the order of the connection names within a given profile
- * @param profileName the name of the profile to return the connection names for.
- * @return an array of connection names for this profile in the order preferred by the user.
- */
- public static String[] getConnectionNamesOrder(String profileName) {
- String[] allConnectionNamesOrder = SystemPreferencesManager.getConnectionNamesOrder();
- profileName = profileName + "."; //$NON-NLS-1$
- int profileNameLength = profileName.length();
- List l = new ArrayList();
- for (int idx = 0; idx < allConnectionNamesOrder.length; idx++)
- if (allConnectionNamesOrder[idx].startsWith(profileName)) {
- l.add(allConnectionNamesOrder[idx].substring(profileNameLength));
- }
- String[] names = new String[l.size()];
- l.toArray(names);
- return names;
- }
-
- /**
- * Gets the user's preference for the order of a given list of connections,
- * after resolving it against the actual list of connection names contained within
- * a specified profile.
- * Connections not in the given profile will be ignored.
- * @param realityConnectionList The list of connections that will be reordered according to
- * the user's preferred ordering.
- * @param profileName the name of the profile that we will search for these connections.
- * @return the list of connection names from the given list and profile in the order
- * preferred by the user.
- */
- public static 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));
- return names;
- }
-
- /**
- * Sets user's preference for the order of the connection names according to the
- * list kept in the system registry.
- * This resets any user-specified ordering of profiles since the SystemRegistry
- * has no concept of ordered profiles. The hosts inside a profile, though,
- * will be ordered according to user preference.
- */
- public static void setConnectionNamesOrder() {
- ISystemRegistry sr = RSECorePlugin.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);
- }
-
- /**
- * Sets the ordered list of connection names.
- * This is how user arranged connections in the system view.
- * @param connectionNames an array of connection names in the order they are to be presented.
- */
- public static void setConnectionNamesOrder(String[] connectionNames) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.ORDER_CONNECTIONS, makeString(connectionNames));
- savePreferences();
- }
-
- /**
- * Determines if a string (the needle) is present in an array of strings (the haystack)
- * @param haystack an array of strings to search
- * @param needle the string for which to search
- * @return true if the needle was found
- */
- private static boolean find(String[] haystack, String needle) {
- for (int idx = 0; idx < haystack.length; idx++) {
- if (haystack[idx].equals(needle)) return true;
- }
- return false;
- }
-
- /**
- * Resolves differences between two ordered name lists.
- * Used when there are differences between the actual list of names and
- * a restored ordered list of names.
- */
- private static String[] resolveOrderPreferenceVersusReality(String[] reality, String[] ordered) {
- List finalList = new ArrayList();
- // step 1: include all names from preferences list which do exist in reality...
- for (int idx = 0; idx < ordered.length; idx++) {
- if (SystemPreferencesManager.find(reality, ordered[idx])) finalList.add(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 (!SystemPreferencesManager.find(ordered, reality[idx])) finalList.add(reality[idx]);
- }
- String[] resolved = new String[finalList.size()];
- finalList.toArray(resolved);
- return resolved;
- }
-
- /**
- * @return the history for the folder combo box widget
- */
- public static String[] getFolderHistory() {
- return getWidgetHistory(ISystemPreferencesConstants.HISTORY_FOLDER);
- }
-
- /**
- * Sets the history for the folder combo box widget.
- * Does not save the preferences. This must be done by the caller.
- * @see #savePreferences()
- * @param newHistory the names of the folders to be saved in the folder history
- */
- public static void setFolderHistory(String[] newHistory) {
- setWidgetHistory(ISystemPreferencesConstants.HISTORY_FOLDER, newHistory);
- }
-
- /**
- * @return true if the user has elected to show connection names qualified by profile
- */
- public static boolean getQualifyConnectionNames() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- return store.getBoolean(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES);
- }
-
- /**
- * Sets if the user has elected to show connection names qualified by profile.
- * @param qualify whether or not to qualify the connection names in the UI.
- */
- public static void setQualifyConnectionNames(boolean qualify) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES, qualify);
- savePreferences();
- }
-
- /**
- * @return true if the user has elected to remember the state of the Remote Systems View
- */
- public static boolean getRememberState() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- return store.getBoolean(ISystemPreferencesConstants.REMEMBER_STATE);
- }
-
- /**
- * Sets if the user has elected to remember the state of RSE.
- * @param remember true if the state should be remembered.
- */
- public static void setRememberState(boolean remember) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.REMEMBER_STATE, remember);
- savePreferences();
- }
-
- /**
- * Return true if the user has elected to restore the state of the Remote Systems view from cached information
- */
- public static boolean getRestoreStateFromCache() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- 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
- * @param restore whether or not to restore the state of RSE from cached information.
- */
- public static void setRestoreStateFromCache(boolean restore) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE, restore);
- savePreferences();
- }
-
- /**
- * Return true if the user has elected to show filter pools in the Remote System Explorer view
- */
- public static boolean getShowFilterPools() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- return store.getBoolean(ISystemPreferencesConstants.SHOWFILTERPOOLS);
- }
-
- /**
- * Sets whether or not to show filter pools.
- * @param show true if we want to show the filter pools
- */
- public static void setShowFilterPools(boolean show) {
- boolean prevValue = getShowFilterPools();
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.SHOWFILTERPOOLS, show);
- savePreferences();
- if (show != prevValue) {
- RSEUIPlugin.getTheSystemRegistryUI().setShowFilterPools(show);
- }
- }
-
- /**
- * @return true if the user has elected to show the "New Connection..." prompt
- * in the Remote Systems View
- */
- public static boolean getShowNewConnectionPrompt() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- boolean value = store.getBoolean(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT);
- return value;
- }
-
- /**
- * Sets whether to show the new connection... prompt in the Remote System Explorer view.
- * @param show true if we want to show the filter pools
- */
- public static void setShowNewConnectionPrompt(boolean show) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT, show);
- savePreferences();
- }
-
- /**
- * @return whether to turn on "Verify connection" checkbox on the New Connection wizard
- */
- public static boolean getVerifyConnection() {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setDefault(ISystemPreferencesConstants.VERIFY_CONNECTION, ISystemPreferencesConstants.DEFAULT_VERIFY_CONNECTION);
- return store.getBoolean(ISystemPreferencesConstants.VERIFY_CONNECTION);
- }
-
- /**
- * Sets whether connections should be verified by the New Connection wizard.
- * @param verify true if the connection should be verified
- */
- public static void setVerifyConnection(boolean verify) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(ISystemPreferencesConstants.VERIFY_CONNECTION, verify);
- savePreferences();
- }
-
- /**
- * Return the history for a widget given an arbitrary key uniquely identifying it
- */
- public static String[] getWidgetHistory(String key) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- String result = store.getString(key);
-
- // bug 237300
- // don't parse strings if we have ""
- if (result == null || result.length() == 0){
- return null;
- }
- else {
- return parseStrings(result);
- }
- }
-
- /**
- * Sets the history for a widget given an arbitrary key uniquely identifying it.
- * Does not save the preferences. This must be done by the caller.
- * @see #savePreferences()
- */
- public static void setWidgetHistory(String key, String[] newHistory) {
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- store.setValue(key, makeString(newHistory));
- }
-
- /**
- * Make a single string out of an array of strings. A semi-colon is
- * used as a delimiter between the separate values. No value in the
- * array can contain a semi-colon.
- * @param values the array of strings to condense into a single one
- * @return the condensed string
- */
- private static String makeString(String[] values) {
- StringBuffer allValues = new StringBuffer(20 * values.length);
- for (int idx = 0; idx < values.length; idx++) {
- if (values[idx] != null) {
- if (idx > 0) {
- allValues = allValues.append(';');
- }
- allValues.append(values[idx]);
- }
- }
- return allValues.toString();
- }
-
- /**
- * Parse out list of multiple values into a string array per value.
- * This is the inverse of the {@link #makeString(String[])} operation.
- * @param allvalues the string holding the condensed value
- * @return the reconstituted array of strings.
- */
- private static String[] parseStrings(String allvalues) {
- if (allvalues == null) return new String[0];
- String[] tokens = allvalues.split(";"); //$NON-NLS-1$
- return tokens;
- }
-
- /**
- * Save the preference stores.
- */
- public static void savePreferences() {
- RSEUIPlugin.getDefault().savePluginPreferences();
- RSECorePlugin.getDefault().savePluginPreferences();
- }
-
- /*
- * Start listening to SystemRegistry model change events
- */
- private void startModelChangeListening() {
- //TODO Register a listener for shutdown, to stop model change listening
- boolean alreadyListening;
- synchronized(this) {
- alreadyListening = (fModelChangeListeners>0);
- fModelChangeListeners++;
- }
-
- if (!alreadyListening) {
- // FIXME bug 240991: With the current workaround, we might miss events
- // Instead of adding the listener deferred, the SystemRegistry
- // should send events via the IRSEInteractionProvider
- Bundle bnd = RSEUIPlugin.getDefault().getBundle();
- if (bnd.getState() == Bundle.ACTIVE) {
- // addListenerJob.schedule();
- fModelChangeListener = new ModelChangeListener();
- RSECorePlugin.getTheSystemRegistry().addSystemModelChangeListener(fModelChangeListener);
- } else {
- final BundleContext ctx = bnd.getBundleContext();
- ctx.addBundleListener(new BundleListener() {
- public void bundleChanged(BundleEvent event) {
- if (event.getType() == BundleEvent.STARTED) {
- // addListenerJob.schedule();
- fModelChangeListener = new ModelChangeListener();
- RSECorePlugin.getTheSystemRegistry().addSystemModelChangeListener(fModelChangeListener);
- ctx.removeBundleListener(this);
- }
- }
- });
- }
- }
- }
-
- /*
- * A listener for SystemRegistry Model Change events
- */
- private static class ModelChangeListener implements ISystemModelChangeListener, ISystemResourceChangeListener {
-
- public void systemModelResourceChanged(ISystemModelChangeEvent event) {
- int rt = event.getResourceType();
- if (rt==ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION) {
- switch(event.getEventType()) {
- case ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED:
- case ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED:
- case ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED:
- //TODO Change order of hosts from affected profile only?
- SystemPreferencesManager.setConnectionNamesOrder();
- break;
- }
- } else if (rt==ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE) {
- switch (event.getEventType()) {
- case ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED:
- case ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED:
- case ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED:
- //TODO Change order of hosts from affected profile only?
- SystemPreferencesManager.setConnectionNamesOrder();
- break;
- }
- if (event.getEventType()==ISystemModelChangeEvents.SYSTEM_RESOURCE_RENAMED) {
- boolean namesQualified = SystemPreferencesManager.getQualifyConnectionNames();
- RSEUIPlugin.getTheSystemRegistryUI().setQualifiedHostNames(namesQualified); // causes refresh events to be fired
- }
- }
- }
-
- public void systemResourceChanged(ISystemResourceChangeEvent event) {
- if (event.getType()==ISystemResourceChangeEvents.EVENT_MOVE_MANY
- && (event.getSource() instanceof IHost[])
- ) {
- //TODO Change order of hosts from affected profile only?
- SystemPreferencesManager.setConnectionNamesOrder();
- }
- }
-
- }
-
-} \ 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 1baad893b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemWidgetHelpers.java
+++ /dev/null
@@ -1,1534 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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: New Connection first page should use a Listbox for systemtype
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [181939] avoid subsystem plugin activation just for enablement checking
- * David Dykstal (IBM) - [231666] special colon processing for french locales
- * Zhou Renjian (Kortide) - [282242] "LOCALHOST" as host name for first time connection creation
- ********************************************************************************/
-
-package org.eclipse.rse.ui;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Locale;
-
-import org.eclipse.jface.action.IAction;
-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.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.ui.SystemResources;
-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;
-
-import com.ibm.icu.text.Collator;
-
-/**
- * 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 verbiage (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 verbiage
- * @param widthHint number of pixels to limit width to before wrapping. 200 is a reasonable number
- * @return Label created.
- */
- public static Label createLabeledVerbiage(Composite parent, String labelText, String tooltip, int span, boolean border, int widthHint) {
- previousLabel = createLabel(parent, appendColon(labelText));
- Label verbiage = createVerbiage(parent, labelText, span, border, widthHint);
- setToolTipText(previousLabel, tooltip);
- setToolTipText(verbiage, tooltip);
- return verbiage;
- }
-
- /**
- * 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 tooltip the 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 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, IRSESystemType[] 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 != null)
- combo.addSelectionListener(listener);
-
- boolean hasGridData = false;
- if (combo != null)
- 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;
- if (combo != null)
- combo.setLayoutData(data);
- } else {
- if (combo != null)
- {
- ((GridData) combo.getLayoutData()).horizontalSpan = horizontalSpan;
- ((GridData) combo.getLayoutData()).horizontalAlignment = GridData.FILL;
- ((GridData) combo.getLayoutData()).grabExcessHorizontalSpace = true;
- ((GridData) combo.getLayoutData()).widthHint = minwidth;
- }
- }
- return combo;
- }
-
- private static IRSESystemType[] validSystemTypes = null;
-
- /**
- * Return the list of all registered valid system types.
- *
- * A system type is considered valid, if at least one subsystem
- * configuration is registered against it, and the system type
- * is enabled in the Preferences.
- * The list is ordered alphabetically by system type label
- * according to international unicode rules, in the current Locale.
- *
- * @param restrictIds An array of system type IDs to restrict the
- * returned list of valid system types to only those requested,
- * or <code>null</code> to return all valid system types.
- * @return an ordered list of all registered valid system types.
- */
- public static IRSESystemType[] getValidSystemTypes(String[] restrictIds) {
- // Step 1: Get all static configured valid system types,
- // According to what subsystem configurations are registered.
- if (validSystemTypes==null) {
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- ArrayList list = new ArrayList(systemTypes.length);
- //TODO check if we shouldn't better get the IRSESystemTypeAdapter and check for isEnabled()
- //This would do more than checking validity but also enablement
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfigurationProxy[] ssfProxies = sr.getSubSystemConfigurationProxies();
- for (int i=0; i<systemTypes.length; i++) {
- for (int j=0; j<ssfProxies.length; j++) {
- if (ssfProxies[j].appliesToSystemType(systemTypes[i])) {
- list.add(systemTypes[i]);
- break;
- }
- }
- }
- systemTypes = (IRSESystemType[])list.toArray(new IRSESystemType[list.size()]);
- sortSystemTypesByLabel(systemTypes);
- validSystemTypes = systemTypes;
- }
- // Step 2: Restrict the list if requested
- boolean filtered = false;
- java.util.List result = new ArrayList(validSystemTypes.length);
- java.util.List restrictList = (restrictIds==null) ? null : Arrays.asList(restrictIds);
- for(int i=0; i<validSystemTypes.length; i++) {
- IRSESystemType systemType = validSystemTypes[i];
- if (restrictList==null || restrictList.contains(systemType)) {
- // Step 3: check enablement in Preferences
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
- if (adapter != null && adapter.isEnabled(systemType)) {
- result.add(systemType);
- } else {
- filtered = true;
- }
- }
- }
- if (filtered) {
- return (IRSESystemType[])result.toArray(new IRSESystemType[result.size()]);
- } else {
- return validSystemTypes;
- }
- }
-
- /**
- * Sorts the given array of systemTypes in ascending order by system
- * type label.
- *
- * Note that this method sorts the array in place, so clients are
- * responsible for creating a copy of the array when needed.
- * Labels are sorted with a Collator according to international
- * unicode rules, in the current Locale.
- *
- * @param systemTypes list of system types to sort
- */
- public static void sortSystemTypesByLabel(IRSESystemType[] systemTypes) {
- Arrays.sort(systemTypes, new Comparator() {
- private Collator collator = Collator.getInstance();
- public int compare(Object o1, Object o2) {
- IRSESystemType t1 = (IRSESystemType)o1;
- IRSESystemType t2 = (IRSESystemType)o2;
- return collator.compare(t1.getLabel(), t2.getLabel());
- }
- });
- }
-
- /**
- * Return the labels for the given list of system types.
- * @param systemTypes an array of system types
- * @return the String labels for the system types.
- */
- public static String[] getSystemTypeLabels(IRSESystemType[] systemTypes) {
- String[] labels = new String[systemTypes.length];
- for (int i=0; i<systemTypes.length; i++) {
- labels[i] = systemTypes[i].getLabel();
- }
- return labels;
- }
-
- /**
- * Creates a readonly system type combination box with the given system types.
- *
- * Does NOT create the leading prompt or anything except the combo.
- * In order to find out what system type was selected, clients need to
- * use {@link Combo#getSelectionIndex()} and use the return value as
- * an index into the array of system types they provided.
- *
- * @param parent the parent composite to embed this widget in.
- * @param listener a listener for selection events.
- * @param systemTypes an array of system types to show in this Combo.
- * Must not be <code>null</code>.
- * Fill this with the result of {@link #getValidSystemTypes(String[])}
- * with a null argument in order to get a combo box with all valid
- * system types.
- * @return a Combo box displaying the given system types.
- */
- public static Combo createSystemTypeCombo(Composite parent, Listener listener, IRSESystemType[] systemTypes) {
- Combo combo = createReadonlyCombo(parent, listener, SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP);
- combo.setItems(getSystemTypeLabels(systemTypes));
- 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, IRSESystemType systemType) {
- //System.out.println("TipId: " + ISystemConstants.RESID_HOSTNAME_TIP);
- Combo combo = createCombo(parent, listener, SystemResources.RESID_CONNECTION_HOSTNAME_TIP);
-
- // Fix bug#282242: No default host names if no connection has been created.
- String[] hostNames = RSECorePlugin.getTheSystemRegistry().getHostNames(systemType);
- if (hostNames.length == 0) {
- hostNames = new String[] { "LOCALHOST" }; //$NON-NLS-1$
- }
- combo.setItems(hostNames);
- //System.out.println("Tip : " + combo.getToolTipText());
- 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 final static char STANDARD_COLON = ':';
- private final 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 the label which to examine for a colon
- * @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) {
- // special processing for french, a space is required before a colon
- if (language.equals("fr") && result.length() > 0) { //$NON-NLS-1$
- result += " "; //$NON-NLS-1$
- }
- 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/DisplayHidableSystemMessageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java
deleted file mode 100644
index 68fe4f615..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Michael Berger (IBM) - Initial API and implementation
- * David McKnight (IBM) - [216596] determine whether to show yes/no or just okay
- *******************************************************************************/
-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;
- /**
- * @since 3.0
- */
- protected boolean _showYesNo = true;
-
- public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID)
- {
- super(message);
- _store = prefStore;
- _prefID = prefID;
- }
-
- /**
- * @since 3.0
- */
- public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID, boolean showYesNo)
- {
- super(message);
- _store = prefStore;
- _prefID = prefID;
- _showYesNo = showYesNo;
- }
-
- /**
- * @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(_showYesNo);
- 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/ISystemViewMenuListener.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemViewMenuListener.java
deleted file mode 100644
index 3506319a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/ISystemViewMenuListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-package org.eclipse.rse.ui.actions;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.swt.events.ArmListener;
-import org.eclipse.swt.events.MenuListener;
-
-/**
- * An interface to be implemented for listening for menu show events for the
- * purpose of applying mnemonics to the menu items.
- *
- * @since 3.0
- */
-public interface ISystemViewMenuListener extends IMenuListener, MenuListener, ArmListener
-{
-}
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/LazyDownloadJob.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/LazyDownloadJob.java
deleted file mode 100644
index 504bd700b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/LazyDownloadJob.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-package org.eclipse.rse.ui.actions;
-
-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.ui.view.ISystemEditableRemoteObject;
-
-public class LazyDownloadJob extends Job
-{
- private ISystemEditableRemoteObject _editable;
- public LazyDownloadJob(ISystemEditableRemoteObject editable)
- {
- // TODO Auto-generated constructor stub
- super("Downloading " + editable.getAbsolutePath());
- _editable = editable;
- }
-
- public IStatus run(IProgressMonitor monitor)
- {
- try
- {
- _editable.download(monitor);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return Status.OK_STATUS;
- }
-} \ 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 804aaf7fd..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, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-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.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.rse.ui.view.SystemAdapterHelpers;
-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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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)
- {
- 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 59463ba4b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- *******************************************************************************/
-
-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.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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);
- setToolTipText(mode==MODE_COPY ? SystemResources.ACTION_COPY_TOOLTIP : SystemResources.ACTION_MOVE_TOOLTIP);
- }
-
- /**
- * 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.getDefault();
- sr = RSECorePlugin.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 verbiage 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()
- {
- IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().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
- * @since 3.0 taking String argument
- */
- public void copyComplete(String operation) {}
-
- // ----------------------------------
- // 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(targetContainer, oldObject, newName, monitor);
- 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(null);
- }
-
- 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(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
- 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();
- }
-
-
-}
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 22ada1dc6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseDialogAction.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.ui.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 c12b4604a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-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.internal.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManagerForTesting;
-import org.eclipse.rse.internal.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
-
-{
-
- private 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
- * @since 3.0 replaced SystemViewMenuListener by ISystemViewMenuListener
- */
- protected ISystemViewMenuListener 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);
- }
- }
-}
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 8382d7054..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseWizardAction.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.actions.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(boolean) 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 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.actions.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 final 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);
- }
-
- return doCreateWizardDialog(shell, newWizard);
- }
-
- /**
- * Creates the dialog instance. Called from <code>createDialog(...)</code>.
- * Gives overrides the chance to plug-in their own specialized wizard dialog
- * implementations.
- *
- * @param shell The shell to create the dialog in. Must be not <code>null</code>.
- * @param wizard The wizard to create the wizard dialog for. Must be not <code>null</code>.
- *
- * @return The wizard dialog instance. Must be never <code>null</code>.
- */
- protected WizardDialog doCreateWizardDialog(Shell shell, IWizard wizard) {
- assert shell != null && wizard != null;
-
- 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);
-
- } 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();
- }
-}
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 945b87356..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * David McKnight (IBM) - [248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
- *******************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-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.NullProgressMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-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.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemDropActionDelegate;
-import org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter;
-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.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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;
-import org.eclipse.ui.part.ResourceTransfer;
-
-
-/**
- * Copy selected objects to clipboard action.
- */
-public class SystemCopyToClipboardAction extends SystemBaseAction implements IValidatorRemoteSelection
-{
- private IStructuredSelection _selection;
- private Clipboard _clipboard;
- private boolean _doResourceTransfer = false; // determines whether or not to download on copy
-
- /**
- * Constructor
- */
- public SystemCopyToClipboardAction(Shell shell, Clipboard clipboard)
- {
- super(SystemResources.ACTION_COPY_LABEL,
- PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY),
- shell);
-
- _clipboard = clipboard;
- setToolTipText(SystemResources.ACTION_COPY_TOOLTIP);
- allowOnMultipleSelection(true);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX+"actn0116"); //$NON-NLS-1$
- }
-
- public void run()
- {
- if (_selection != null)
- {
- copySelectionToClipboard(_selection);
- }
- }
-
- private IResource getResource(IAdaptable dragObject)
- {
- IResource resource = null;
- ISystemViewElementAdapter viewAdapter = (ISystemViewElementAdapter) dragObject.getAdapter(ISystemViewElementAdapter.class);
- ISystemRemoteElementAdapter remoteAdapter = (ISystemRemoteElementAdapter)dragObject.getAdapter(ISystemRemoteElementAdapter.class);
-
- if (remoteAdapter != null)
- {
- if (remoteAdapter.canEdit(dragObject))
- {
- ISystemEditableRemoteObject editable = remoteAdapter.getEditableRemoteObject(dragObject);
- // corresponds to a file
- IFile file = editable.getLocalResource();
- if (!file.exists())
- {
- LazyDownloadJob job = new LazyDownloadJob(editable);
- job.schedule();
- }
- resource = file;
- }
- else if (viewAdapter != null)
- {
- if (viewAdapter.hasChildren(dragObject))
- {
- IContainer parentFolder = null;
- // corresponds to a folder
- Object[] children = viewAdapter.getChildren(dragObject, new NullProgressMonitor());
- for (int i = 0; i < children.length; i++)
- {
- IAdaptable child = (IAdaptable)children[i];
- IResource childResource = getResource(child);
- if (childResource != null)
- {
- parentFolder = childResource.getParent();
- if (!parentFolder.exists())
- {
- try
- {
- parentFolder.touch(new NullProgressMonitor());
- }
- catch (Exception e)
- {
-
- }
-
- }
- }
- }
-
-
- resource = parentFolder;
- }
- }
- }
- return resource;
- }
-
-
- 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();
- ArrayList resources = new ArrayList();
-
- ISystemRegistry registry = RSECorePlugin.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))
- {
- ISubSystem subSystem = null;
- if (dragObject instanceof ISubSystem)
- {
- subSystem = (ISubSystem)dragObject;
- String subSystemId = RSECorePlugin.getTheSystemRegistry().getAbsoluteNameForSubSystem(subSystem);
- dataStream.append(subSystemId);
- }
- else if (dragObject instanceof IHost)
- {
- IHost connection = (IHost)dragObject;
- String connectionId = RSECorePlugin.getTheSystemRegistry().getAbsoluteNameForConnection(connection);
- dataStream.append(connectionId);
- }
- else
- {
- // get the subsystem id
- 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);
- }
-
- if (_doResourceTransfer)
- {
- IResource resource = getResource((IAdaptable)dragObject);
- if (resource != null)
- {
- resources.add(resource);
-
- String fileName = resource.getLocation().toOSString();
- fileNames.add(fileName);
- }
- }
- }
- }
- }
- }
- }
-
- byte[] bytes = null;
- try {
- bytes = dataStream.toString().getBytes("UTF-8"); //$NON-NLS-1$
- }
- catch (UnsupportedEncodingException e){
- bytes = dataStream.toString().getBytes();
- }
- PluginTransferData data = new PluginTransferData(SystemDropActionDelegate.ID, bytes);
-
- // put data in clipboard
- if (_doResourceTransfer && resources.size() > 0)
- {
- IResource[] ft = new IResource[resources.size()];
- for (int i = 0; i < ft.length; i++)
- {
- ft[i] = (IResource) resources.get(i);
- }
-
- String[] fn = new String[fileNames.size()];
- for (int j = 0; j < fn.length; j++)
- {
- fn[j] = (String)fileNames.get(j);
- }
-
- _clipboard.setContents(new Object[] { data, ft, fn, textStream.toString() }, new Transfer[] { PluginTransfer.getInstance(), ResourceTransfer.getInstance(), FileTransfer.getInstance(), TextTransfer.getInstance()});
-
- }
- else
- {
- String[] ft = new String[fileNames.size()];
- for (int i = 0; i < ft.length; i++)
- {
- ft[i] = (String) fileNames.get(i);
- }
-
- if (ft.length > 0)
- {
- _clipboard.setContents(new Object[] { data, ft, textStream.toString() }, new Transfer[] { PluginTransfer.getInstance(), FileTransfer.getInstance(), TextTransfer.getInstance()});
- }
- else
- {
- _clipboard.setContents(new Object[] { data, textStream.toString() }, new Transfer[] { PluginTransfer.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;
- }
-
-}
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 19a575f8a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemNewConnectionAction.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * Uwe Stieber (Wind River) - Set action id for identification from plugin.xml menu extensions.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Uwe Stieber (Wind River) - [192202] Default RSE new connection wizard does not allow to query created host instance anymore
- * Uwe Stieber (Wind River) - [189426] System File/Folder Dialogs - New Connection Not Added to Drop Down
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import org.eclipse.jface.dialogs.Dialog;
-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.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.core.IRSESystemType;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard;
-import org.eclipse.rse.ui.wizards.newconnection.RSEMainNewConnectionWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * The action that displays the New Connection wizard
- */
-public class SystemNewConnectionAction extends SystemBaseWizardAction {
-
- private boolean fromPopupMenu = true;
- private ISelectionProvider sp;
- private IRSESystemType[] restrictSystemTypesTo;
-
- // The current selection the action is knowing of. Just pass on
- // to the wizards. Do not interpret here!
- private ISelection selectedContext;
- // The associated connection object of the selected context if
- // determinable from the selected context
- private IHost connectionContext;
-
- /**
- * Constructor.
- *
- * @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 <code>RSEMainNewConnectionWizard</code>.
- */
- protected IWizard createWizard() {
- // reset the output value
- setValue(null);
-
- // create the new connection wizard instance.
- RSEMainNewConnectionWizard newConnWizard = new RSEMainNewConnectionWizard();
-
- // simulate a selection changed event if the action is not called from
- // a popup menu and a selection provider is set
- if (!fromPopupMenu && sp != null) setSelection(sp.getSelection());
-
- // First, restrict the wizard in the system types to show if this is
- // requested.
- if (restrictSystemTypesTo != null) {
- newConnWizard.restrictToSystemTypes(restrictSystemTypesTo);
- }
-
- // If there is an remembered selection, we pass on the selected context
- // totally untranslated to the wizards. The specific wizards have to
- // interpret the selection themself. We simple cannot know here what is
- // necessary and what not. Wizard providers may want to get selections
- // we have no idea from. Only chance to do so, pass the selection on.
- newConnWizard.setSelectedContext(selectedContext);
-
- // if we had determined the connection context of the selected context, pass
- // on as well to the new connection wizard.
- newConnWizard.setConnectionContext(connectionContext);
-
- // If the wizard is restricted to only one system type, the main wizard has to be skipped
- // and the dialog needs to be initialized directly with the selected wizard.
- if (newConnWizard.isRestrictedToSingleSystemType()) {
- IWizard wizard = newConnWizard.getSelectedWizard();
- if (wizard instanceof ISelectionChangedListener) {
- ((ISelectionChangedListener)wizard).selectionChanged(new SelectionChangedEvent(newConnWizard, newConnWizard.getSelection()));
- }
- return wizard;
- }
-
- return newConnWizard;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseWizardAction#doCreateWizardDialog(org.eclipse.swt.widgets.Shell, org.eclipse.jface.wizard.IWizard)
- */
- protected WizardDialog doCreateWizardDialog(Shell shell, IWizard wizard) {
- // The new connection action is always using the standard Eclipse WizardDialog!!!
- return new WizardDialog(getShell(), wizard);
- }
-
- /**
- * Call this to restrict the system types that the user is allowed to choose
- */
- public void restrictSystemTypes(IRSESystemType[] systemTypes) {
- this.restrictSystemTypesTo = systemTypes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseWizardAction#postProcessWizard(org.eclipse.jface.wizard.IWizard)
- */
- protected void postProcessWizard(IWizard wizard) {
- if (wizard instanceof RSEMainNewConnectionWizard) wizard = ((RSEMainNewConnectionWizard)wizard).getSelectedWizard();
- if (wizard instanceof RSEDefaultNewConnectionWizard) {
- setValue(((RSEDefaultNewConnectionWizard)wizard).getCreatedHost());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseWizardAction#getDialogValue(org.eclipse.jface.dialogs.Dialog)
- */
- protected Object getDialogValue(Dialog dlg) {
- // We have to trick the super implementation a little bit because otherwise
- // we do not get access to the current wizard instance. The postProcessWizard
- // implementation will use setValue() for pushing the created host instance,
- // which in turn we query here again in case the super implementation does
- // return null to us (which is the case if the wizard does not implement ISystemWizard,
- // what is what we do not want to do in case of RSEDefaultNewConnectionWizard anymore).
- Object value = super.getDialogValue(dlg);
- if (value == null && getValue() != null) value = getValue();
- return value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.actions.SystemBaseAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public boolean updateSelection(IStructuredSelection selection) {
- boolean enabled = super.updateSelection(selection);
- // store the selection. The wizard contributor may want to analyse
- // the current selection by themself.
- selectedContext = selection;
-
- // and try to determine the connection context from the selection
- if (enabled) {
- 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();
- }
- }
-
- connectionContext = conn;
- }
-
- return enabled;
- }
-} \ 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 0efc9c4cb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPasteFromClipboardAction.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Kenya Ishimoto (IBM) - [241197] Paste action causes IllegalArgumentException at Resource.copy
- * Zhou Renjian (Kortide) - [282241] "Paste" is enabled on file system when text is in clipboard
- ********************************************************************************/
-
-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.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemDNDTransferRunnable;
-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.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-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.getTheSystemRegistryUI().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();
-
- if (target instanceof ISchedulingRule) {
- rulesList.add(target);
- }
-
- 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);
- }
- */
- if (rulesList.size() > 0)
- {
- ISchedulingRule[] rules = (ISchedulingRule[])rulesList.toArray(new ISchedulingRule[rulesList.size()]);
- MultiRule rule = new MultiRule(rules);
- runnable.setRule(rule);
- }
- }
- }
- runnable.schedule();
- RSEUIPlugin.getTheSystemRegistryUI().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);
-
- // Fix bug#282241: Copy anything, for example, text string, will enable "Paste" menu item
- if (enable) {
- enable = _srcType != SystemDNDTransferRunnable.SRC_TYPE_TEXT && _srcType != SystemDNDTransferRunnable.SRC_TYPE_UNKNOWN;
- }
-
- /* 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.getTheSystemRegistryUI().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.getTheSystemRegistryUI().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/SystemRefreshAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java
deleted file mode 100644
index 6ff274188..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAction.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - 146339 Added refresh action graphic.
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [188160] avoid parent refresh if not doing deferred queries
- * Patrick Tasse (Ericsson) - [285047] SystemRefreshAction not disabled when showRefresh returns false
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewFilterReferenceAdapter;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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;
- Iterator iter = _selection.iterator();
- while (enable && iter.hasNext()) {
- Object obj = iter.next();
- ISystemViewElementAdapter adapter = getViewAdapter(obj);
- if (adapter != null && !adapter.showRefresh(obj)) {
- 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 = RSECorePlugin.getTheSystemRegistry();
- if (_selection != null)
- {
- Set localItems = new HashSet();
- Set remoteItems = new HashSet();
- Vector namesToSelect = 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 = getViewAdapter(obj);
- if (adapter != null) {
- // choose the item to refresh -- use parent in case of leaf node.
- //
- // This is because subsystems with deferred queries do not have an
- // adapter call for deferred query of properties for a non-container.
- //
- // The problem with this code is, that we cannot know here whether it
- // actually is a leaf node that can never have children, or a container
- // that just happens not to have children right now. Also, this code
- // adds overhead that may be an unnecessary performance hit.
- Object itemToRefresh = obj;
- ISubSystem subsys = adapter.getSubSystem(obj);
- if (subsys!=null && adapter.supportsDeferredQueries(subsys) && !(adapter instanceof SystemViewFilterReferenceAdapter)) {
- //if deferred queries are not supported, hasChildren() goes right to the remote.
- //If deferred queries are supported, it is expected to be cached.
- if (!adapter.hasChildren((IAdaptable)obj)) {
- Object parent = adapter.getParent(obj);
- if (parent!=null) {
- itemToRefresh = parent;
- }
- }
- }
-
- // If we can REFRESH_REMOTE, add the absolute name to reselect
- String absoluteName = adapter.getAbsoluteName(obj);
- if (absoluteName!=null) {
- //Remote items will be refreshed later
- remoteItems.add(itemToRefresh);
- namesToSelect.add(absoluteName);
- } else if (!localItems.contains(obj)) {
- localItems.add(obj);
- sr.fireEvent(new SystemResourceChangeEvent(obj, ISystemResourceChangeEvents.EVENT_REFRESH, obj));
- }
- }
- else {
- sr.fireEvent(new SystemResourceChangeEvent(obj, ISystemResourceChangeEvents.EVENT_REFRESH, obj));
- }
- }
- //Free objects
- localItems.clear();
- //Deferred refresh of remote items: Try to optimize refresh by reducing the number of parents
- boolean itemsChanged = true;
- while (remoteItems.size()>1 && itemsChanged) {
- itemsChanged = false;
- Iterator it = remoteItems.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- ISystemViewElementAdapter adapter = getViewAdapter(obj);
- Object parent = adapter.getParent(obj);
- if (remoteItems.contains(parent)) {
- it.remove();
- itemsChanged = true;
- }
- }
- }
- //Fire events
- Iterator it = remoteItems.iterator();
- while (it.hasNext()) {
- Object obj = it.next();
- ISubSystem subsys = getViewAdapter(obj).getSubSystem(obj);
- if (subsys!=null) {
- //Remote refresh works properly inside the subsystem only. Outside, we need to do local refresh.
- sr.fireEvent(new SystemResourceChangeEvent(obj, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, namesToSelect));
- } else {
- sr.fireEvent(new SystemResourceChangeEvent(obj, ISystemResourceChangeEvents.EVENT_REFRESH, obj));
- sr.fireEvent(new SystemResourceChangeEvent(namesToSelect, ISystemResourceChangeEvents.EVENT_SELECT_REMOTE, null));
- }
- }
- }
- else
- {
- //TODO Check if this is dead code?
- 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 836d0287e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemRefreshAllAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.ui.actions;
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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);
- }
- }
- ISystemRegistry sr = RSECorePlugin.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/SystemTablePrintAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java
deleted file mode 100644
index bbaed8f65..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemTablePrintAction.java
+++ /dev/null
@@ -1,525 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.actions;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.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();
- }
-}
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 0d7e04c16..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, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * David Dykstal (IBM) - [231856] making dialog a bit wider
- *******************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.SystemWidgetHelpers;
-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.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, invalidNameChars;
- private IRSESystemType systemType;
- private boolean change; // Is this dialog for add or change
- private String[] existingNames;
-
- /**
- * Constructor for EnvironmentVariablesPromptDialog.
- * @param shell the parent shell
- * @param title the title of the dialog
- */
- public EnvironmentVariablesPromptDialog(Shell shell, String title, IRSESystemType 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 the parent shell
- * @param title the dialog title
- * @param inputObject the object providing values for this dialog
- */
- 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);
- ((GridData)nameTextField.getLayoutData()).widthHint = 500; // hint of this size allows more message text to be displayed
- 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);
- ((GridData)valueTextField.getLayoutData()).widthHint = 500;
- 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.getId().equals(IRSESystemType.SYSTEMTYPE_ISERIES_ID))
- {
- nameTextField.setTextLimit(128);
- valueTextField.setTextLimit(1024);
- }
- else if (systemType.isWindows())
- {
- 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/ICredentialsValidator.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ICredentialsValidator.java
deleted file mode 100644
index a4ea9a35d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ICredentialsValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - Changed from ISignonValidator to generalize the concept and
- * remove the UI dependencies.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import org.eclipse.rse.core.subsystems.ICredentials;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-
-
-/**
- * Interface for providing a credentials validator. This will be used when
- * credentials are acquired or when they are about to be used. Can check
- * credentials for expiration or for validity.
- * <p>
- * Any context will need to be set in the implementations of this interface
- * prior to its validation.
- */
-public interface ICredentialsValidator {
-
- /**
- * Verify if credentials are valid.
- *
- * @param credentials The credentials to be validated.
- *
- * @return null if the credentials are valid, a SystemMessage describing the
- * type of problem if invalid.
- */
- public SystemMessage validate(ICredentials credentials);
-
-} \ 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 b99223fcb..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, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- ********************************************************************************/
-
-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(ICredentialsValidator 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 0612638ff..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/ISystemPromptDialog.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * {Uwe Stieber} (Wind River) - API consistency.
- ********************************************************************************/
-
-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();
-
- /**
- * For explicitly setting output object after wizard is dismissed. Called in the
- * wizard's processFinish method, typically.
- */
- public void setOutputObject(Object outputObject);
-
- /**
- * 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 7448d121d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemChangePasswordDialog.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.ui.dialogs;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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 _oldPassword = ""; //$NON-NLS-1$
- private String _newPassword = ""; //$NON-NLS-1$
-
- private Text _txtOldPassword;
- private Text _txtNewPassword;
- private Text _txtConfirmPassword;
-
- private boolean savePassword = false;
- protected Button _chkBoxSavePassword;
-
- private boolean newPasswordModified = false;
- private boolean confirmModified = false;
-
- private boolean _promptForOldPassword = 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);
- }
-
- public void promptForOldPassword(boolean flag)
- {
- _promptForOldPassword = flag;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl()
- {
- if (_promptForOldPassword)
- {
- return _txtOldPassword;
- }
- 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;
-
- if (_promptForOldPassword)
- {
- // Old password
- label = new Label(c, SWT.NONE);
- label.setText(SystemResources.RESID_CHANGE_PASSWORD_OLD_LABEL);
- _txtOldPassword = SystemWidgetHelpers.createTextField(c, null);
- _txtOldPassword.setEchoChar('*');
- _txtOldPassword.setToolTipText(SystemResources.RESID_CHANGE_PASSWORD_OLD_TOOLTIP);
- ((GridData) _txtOldPassword.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 (_promptForOldPassword)
- {
- _oldPassword = _txtOldPassword.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 old password set by the user or null if the
- * cancel button was pressed or if no old password prompt is displayed.
- */
- public String getOldPassword()
- {
- return _oldPassword;
- }
-
- /**
- * @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/SystemPasswordPersistencePrompt.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java
deleted file mode 100644
index 28a84f5a6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPersistencePrompt.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- * David Dykstal (IBM) - [232066] Adjusted width of dialog for translation
- *******************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import java.util.List;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-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 IRSESystemType[] systemTypes;
- private SystemSignonInformation signonInfo;
- private boolean change;
- private String originalHostname, originalUserid;
- private IRSESystemType originalSystemType;
-
- private List existingEntries;
-
- /**
- * Constructor for SystemPasswordPersistencePrompt.
- * @param shell the parent shell
- * @param title the dialog 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);
- Layout parentLayout = parent.getLayout();
- if (parentLayout instanceof GridLayout) {
- GridData gd = new GridData(SWT.BEGINNING, SWT.TOP, true, true);
- gd.widthHint = 400;
- page.setLayoutData(gd);
- }
-
- // 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
- systemTypes = PasswordPersistenceManager.getInstance().getRegisteredSystemTypes();
- String[] systemTypeLabels = new String[systemTypes.length];
- for (int i=0; i<systemTypes.length; i++) {
- systemTypeLabels[i] = systemTypes[i].getLabel();
- }
- SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_SYSTYPE_LABEL, SystemResources.RESID_PREF_SIGNON_SYSTYPE_TOOLTIP);
- systemType = SystemWidgetHelpers.createReadonlyCombo(page, null);
- systemType.setItems(systemTypeLabels);
- if (originalSystemType != null)
- systemType.setText(originalSystemType.getLabel());
- 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_VERIFY_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;
- }
-
- int systemTypeIndex = systemType.getSelectionIndex();
- if (systemTypeIndex<0)
- {
- 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;
- }
-
- IRSESystemType systemType = systemTypes[systemTypeIndex];
- signonInfo = new SystemSignonInformation(hostname.getText(), userid.getText(), password.getText(), systemType);
-
- 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, IRSESystemType 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(IRSESystemType 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();
- }
-
-}
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 78aeab584..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional
- * Richie Yu (IBM) - [241716] Handle change expired password
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ICredentials;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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 boolean requiresPassword;
- private boolean requiresUserId;
- private ISystemValidator userIdValidator;
- private ISystemValidator passwordValidator;
- private ICredentialsValidator signonValidator;
- private IConnectorService connectorService = null;
-
- /**
- * Constructor for SystemPasswordPromptDialog
- * @param shell The shell in which to base this dialog.
- * @param requiresUserId true if the userid field of the dialog must not be empty.
- * Used only if there is no validator specified for
- * {@link #setUserIdValidator(ISystemValidator)}.
- * @param requiresPassword true if the password field of the dialog must not be empty.
- * Used only if there is no password validator specified using
- * {@link #setPasswordValidator(ISystemValidator)}.
- */
- public SystemPasswordPromptDialog(Shell shell, boolean requiresUserId, boolean requiresPassword) {
- super(shell, SystemResources.RESID_PASSWORD_TITLE);
- setHelp(RSEUIPlugin.HELPPREFIX + "pwdp0000"); //$NON-NLS-1$
- this.requiresPassword = requiresPassword;
- this.requiresUserId = requiresUserId;
- }
-
- /**
- * 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(ICredentialsValidator 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.getHost().getSystemType().getLabel());
- 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()) {
- String passwordLabel = SystemResources.RESID_PASSWORD_LABEL_OPTIONAL;
- if (connectorService.requiresPassword()) {
- passwordLabel = SystemResources.RESID_PASSWORD_LABEL;
- }
- textPassword = SystemWidgetHelpers.createLabeledTextField(composite_prompts, this, passwordLabel, 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() && !connectorService.getDenyPasswordSave()) {
- 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 = RSEPreferencesManager.getUserId(connectorService.getHost().getSystemType().getId());
- }
- 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 (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(!(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 (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)) {
- String hostName = connectorService.getHostName();
- IRSESystemType systemType = connectorService.getHost().getSystemType();
- ICredentials credentials = new SystemSignonInformation(hostName, userId, password, systemType);
- SystemMessage m = signonValidator.validate(credentials);
- // update the password in case an expired password was changed in validate - ry
- password = credentials.getPassword();
- 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 a268db818..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, 2008 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:
- * Uwe Stieber (Wind River) - API consistency.
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- ********************************************************************************/
-
-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.core.RSECorePlugin;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemControlEnableState;
-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.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, 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);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#setInputObject(java.lang.Object)
- */
- public void setInputObject(Object inputObject)
- {
- this.inputObject = inputObject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#getInputObject()
- */
- public Object getInputObject()
- {
- return inputObject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#getOutputObject()
- */
- public Object getOutputObject()
- {
- return outputObject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#wasCancelled()
- */
- 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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#setOutputObject(java.lang.Object)
- * <p>
- * Note: Signature has changed to ensure overall API consistency!!! If used with return
- * value in specific product code (open source code does not reference this method!),
- * replace the old code:<pre>
- *
- * String xyz = "output object";
- * SystemMessage message = systemPromptDialog.setOutputObject(xyz);
- *
- * </pre>with the new code:<pre>
- *
- * String xyz = "output object";
- * systemPromptDialog.setOutputObject(xyz);
- * if (systemPromptDialog.getOutputObjectValidator() != null)
- * SystemMessage message = systemPromptDialog.getOutputObjectValidator().validate((String)systemPromptDialog.getOutputObject());
- * </pre>
- *
- */
- public void setOutputObject(Object outputObject) {
- this.outputObject = outputObject;
- }
-
- /**
- * 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 show if the Details button is to be shown
- * @param hideMode 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);
- }
- }
- }
- }
- }
-
- /**
- * 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 == IDialogConstants.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(IDialogConstants.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 (RSECorePlugin.isTheSystemRegistryActive())
- {
- RSEUIPlugin.getTheSystemRegistryUI().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.getTheSystemRegistryUI().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 cancelled 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 85a1137e8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRemoteResourceDialog.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [190442] made SystemActionViewerFilter API
- * Kevin Doyle (IBM) - [198114] Allowed to move file into existing folder/archive on first attempt
- * Xuan Chen (IBM) - [220999] [api] Need to change class SystemSelectRemoteFileAction to use SystemRemoteFileDialog
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [267061] resource dialog/form to allow custom host combo label
- *******************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.ui.view.SystemResourceSelectionForm;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.validators.IValidatorRemoteSelection;
-import org.eclipse.rse.ui.view.ISystemResourceSelectionInputProvider;
-import org.eclipse.rse.ui.view.ISystemTree;
-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 ISystemResourceSelectionInputProvider _inputProvider;
- private Object _preSelection;
- private IValidatorRemoteSelection _selectionValidator;
- private boolean _multipleSelectionMode;
- private boolean _showPropertySheet = false;
- //private IHost _outputConnection;
- private SystemActionViewerFilter _customViewerFilter;
- private String _message, _tip;
-
- /**
- * @since 3.0 replaced SystemResourceSelectionInputProvider by
- * ISystemResourceSelectionInputProvider
- */
- public SystemRemoteResourceDialog(Shell shell, String title,
- ISystemResourceSelectionInputProvider inputProvider)
- {
- super(shell, title);
- _inputProvider = inputProvider;
- }
-
- protected Control createInner(Composite parent)
- {
- _form = new SystemResourceSelectionForm(getShell(), parent, this, _inputProvider, getVerbiage(), _multipleSelectionMode, getMessageLine());
- initForm();
- _form.setPreSelection(_preSelection);
- 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()
- {
-
- if (_customViewerFilter != null)
- {
- _form.applyViewerFilter(_customViewerFilter);
- }
- else
- {
- _form.applyViewerFilter(getViewerFilter());
- }
- _form.setSelectionValidator(_selectionValidator);
- _form.setPreSelection(_preSelection);
- _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(IRSESystemType[] 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;
- }
-
- /** @since 3.0 */
- public void setShowNewConnectionPrompt(boolean showNewConnectionPrompt)
- {
- _inputProvider.setAllowNewConnection(showNewConnectionPrompt);
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the system tree
- *
- * @return the system tree
- * @since 3.0
- */
- public ISystemTree getSystemTree()
- {
- return _form.getSystemTree();
- }
-
- /**
- * Indicates whether the page for the form is complete or not.
- *
- * @return true if the page associated with the form is complete
- * @since 3.0
- */
- public boolean isPageComplete()
- {
- return _form.isPageComplete();
- }
-
- /**
- * Sets the label for the connection combo in the form
- *
- * @since 3.1
- */
- public void setConnectionComboLabel(String label){
- _form.setConnectionComboLabel(label);
- }
-
-
- public abstract SystemActionViewerFilter getViewerFilter();
- public abstract String getVerbiage();
- public abstract String getTreeTip();
-}
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 fd27ee3f5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java
+++ /dev/null
@@ -1,757 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Rupen Mardirossian (IBM) - [208435] When validating name, check for previously used names for multiple renaming instances
- * David Dykstal (IBM) - [231828] make rename dialog a bit wider
- * David McKnight (IBM) - [251148] {0} appears in Collision Dialog
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-import java.util.ArrayList;
-import java.util.List;
-
-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.osgi.util.NLS;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReference;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-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.SystemBasePlugin;
-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.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.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.internal.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.internal.ui.actions.SystemCommonRenameAction
- */
-public class SystemRenameSingleDialog extends SystemPromptDialog
- implements
- 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;
- private String promptTip;
- private String newNameString;
- private String inputName = ""; //$NON-NLS-1$
- private Label resourceTypePrompt, resourceTypeValue, verbiageLabel, 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;
- private List _namesInUse = new ArrayList();
-
- /**
- * 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);
-
- }
- /**
- * 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
- * @param nameInUse the List of names that have been previously selected for
- * other files that are to be renamed for multiple file renaming.
- * @since 3.0 added nameInUse argument
- */
- public SystemRenameSingleDialog(Shell shell, boolean copyCollisionMode, Object inputObject, ISystemValidator nameValidator, List nameInUse)
- {
- this(shell);
- setInputObject(inputObject);
- setCopyCollisionMode(copyCollisionMode);
- setNameValidator(nameValidator);
- _namesInUse = nameInUse;
-
- }
- /**
- * 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, verbiage 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, verbiage 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)
- {
- // VERBIAGE
- verbiageLabel = SystemWidgetHelpers.createLabel(composite, " ", nbrColumns); //$NON-NLS-1$
- SystemWidgetHelpers.createLabel(composite, " ", nbrColumns); //filler //$NON-NLS-1$
- }
- else if (description != null)
- {
- // VERBIAGE
- verbiageLabel = 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);
- }
- else
- {
- renameLabel = SystemWidgetHelpers.createLabel(renameGroup, promptLabel);
- }
- newName = SystemWidgetHelpers.createTextField(renameGroup, null);
- ((GridData)newName.getLayoutData()).widthHint = 300; // make this wider than usual so error messages are not truncated
- 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 = getViewAdapter(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)
- {
- String msg = NLS.bind(SystemResources.RESID_COLLISION_RENAME_VERBIAGE, inputName);
- verbiageLabel.setText(msg);
- }
-
-
-
- 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 = getViewAdapter(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.getTheSystemRegistryUI().getRunnableContext();
- RSEUIPlugin.getTheSystemRegistryUI().clearRunnableContext();
- names = ra.getRemoteParentNamesInUse(inputElement, null);
- RSEUIPlugin.getTheSystemRegistryUI().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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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(_namesInUse != null && _namesInUse.size()>0)
- {
- for(int i=0;i<_namesInUse.size();i++)
- {
- if(theNewName.equals(_namesInUse.get(i)))
- {
- errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_ENTRY_NOTUNIQUE);
- }
- }
- }
- 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/SystemSelectAnythingDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java
deleted file mode 100644
index 0e2ed8ea9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [187543] added setViewerFilter() method
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.internal.ui.view.SystemViewForm;
-import org.eclipse.rse.ui.SystemActionViewerFilter;
-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 ISelectionChangedListener
-{
- private SystemViewForm _view = null;
- private Object _selected = null;
- private SystemActionViewerFilter _filter = 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.getSystemTree().addSelectionChangedListener(this);
-
- if (_filter != null){
- _view.getSystemTree().addFilter(_filter);
- }
-
- 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 = RSECorePlugin.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();
- }
-
-
- /**
- * Use this method to limit the objects that are seen in the view of this
- * dialog.
- *
- * @param filter the filter that limits the visible objects
- * @since 3.0
- */
- public void setViewerFilter(SystemActionViewerFilter filter)
- {
- _filter = filter;
- if (_view != null)
- {
- _view.getSystemTree().addFilter(filter);
- }
-
- }
-} \ 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 aeaf56e9a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectFileTypesDialog.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.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.internal.ui.GenericMessages;
-import org.eclipse.rse.internal.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 cancelled
- 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 composite 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 cancelled.
- *
- * @param newResult 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 cancelled.
- *
- * @return the array of selected elements, or <code>null</code> if Cancel was
- * pressed
- */
- public Object[] getResult()
- {
- return result;
- }
-}
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 330472d25..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSimpleCopyDialog.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-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.internal.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);
-
- //RSECorePlugin.getTheSystemRegistry().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()
- {
- //RSECorePlugin.getTheSystemRegistry().removeSystemResourceChangeListener(this);
- return super.close();
- }
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify()
- {
-
- clearErrorMessage();
-/*
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- */
- return true;
- }
-
- /**
- * 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 31dc8f31d..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, 2007 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.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.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 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()
- {
-
- clearErrorMessage();
-/*
- if (errMsg != null)
- controlInError.setFocus();
- return (errMsg == null);
- */
- return true;
- }
-
- /**
- * 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());
- }
-
-}
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 7df9ba5ec..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemWizardDialog.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Uwe Stieber (Wind River) - API consistency.
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- ********************************************************************************/
-
-package org.eclipse.rse.ui.dialogs;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.core.RSECorePlugin;
-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 String helpId;
-
- /**
- * Constructor
- */
- public SystemWizardDialog(Shell shell, IWizard wizard) {
- this(shell, wizard, null);
- }
-
- /**
- * Constructor two. Use when you have an input object at instantiation time.
- */
- public SystemWizardDialog(Shell shell, IWizard wizard, Object inputObject) {
- super(shell, wizard);
- if (wizard instanceof ISystemWizard) {
- ((ISystemWizard)wizard).setSystemWizardDialog(this);
- if (inputObject != null)
- setInputObject(inputObject);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#setInputObject(java.lang.Object)
- */
- public void setInputObject(Object inputObject) {
- if (getWizard() instanceof ISystemWizard) ((ISystemWizard)getWizard()).setInputObject(inputObject);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#getInputObject()
- */
- public Object getInputObject() {
- return getWizard() instanceof ISystemWizard ? ((ISystemWizard)getWizard()).getInputObject() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#getOutputObject()
- */
- public Object getOutputObject() {
- return getWizard() instanceof ISystemWizard ? ((ISystemWizard)getWizard()).getOutputObject() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#setOutputObject(java.lang.Object)
- */
- public void setOutputObject(Object outputObject) {
- if (getWizard() instanceof ISystemWizard) ((ISystemWizard)getWizard()).setOutputObject(outputObject);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.dialogs.ISystemPromptDialog#wasCancelled()
- */
- public boolean wasCancelled() {
- //System.out.println("Inside wasCancelled of SystemWizardDialog: " + wizard.wasCancelled());
- return getWizard() instanceof ISystemWizard ? ((ISystemWizard)getWizard()).wasCancelled() : false;
- }
-
- /**
- * Set the help context id for this wizard dialog
- */
- public void setHelp(String id) {
- helpId = id;
- if (getWizard() instanceof ISystemWizard) ((ISystemWizard)getWizard()).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 = getWizard().needsProgressMonitor();
- Control ctrl = super.createDialogArea(parent);
- if (!needsMonitor) {
- IProgressMonitor pm = getProgressMonitor();
- ((ProgressMonitorPart)pm).dispose();
- }
- if (needsMonitor && RSECorePlugin.isTheSystemRegistryActive()) {
- RSEUIPlugin.getTheSystemRegistryUI().setRunnableContext(getShell(), this);
- // add a dispose listener
- getShell().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- RSEUIPlugin.getTheSystemRegistryUI().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/filters/ISystemChangeFilterPaneEditPaneSupplier.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java
deleted file mode 100644
index d40058dbe..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/ISystemChangeFilterPaneEditPaneSupplier.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2009 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:
- * David Dykstal (IBM) - [226561] add API markup to javadoc
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-
-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.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients. The
- * standard implementations are included in the framework.
- */
-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 961e67563..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemChangeFilterPane.java
+++ /dev/null
@@ -1,1459 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [226561] add API markup to javadoc
- * David McKnight(IBM) - [239257] Tooltip for Filter Pool label is incorrect
- * Kevin Doyle (IBM) - [235223] Duplicate Filter Strings
- * David McKnight (IBM) - [252708] Saving Profile Job happens when not changing Property Values on Connections
- *******************************************************************************/
-
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemChangeFilterActionCopyString;
-import org.eclipse.rse.internal.ui.actions.SystemChangeFilterActionDeleteString;
-import org.eclipse.rse.internal.ui.actions.SystemChangeFilterActionMoveStringDown;
-import org.eclipse.rse.internal.ui.actions.SystemChangeFilterActionMoveStringUp;
-import org.eclipse.rse.internal.ui.actions.SystemChangeFilterActionPasteString;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.ISystemAction;
-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.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.
- * @noextend This class is not intended to be subclassed by clients.
- * This class is complete and should be used as is.
- */
-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(poolPromptTip);
- 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 {
- // before committing, make sure there has been a change
- boolean hasChanged = false;
- String[] originalFilterStrings = inputFilter.getFilterStrings();
- if (originalFilterStrings.length != filterStrings.length){
- hasChanged = true;
- }
- else {
- for (int i = 0; i < originalFilterStrings.length && !hasChanged; i++){
- String originalFilterString = originalFilterStrings[i];
- String filterString = filterStrings[i];
- if (!originalFilterString.equals(filterString)){
- hasChanged = true;
- }
- }
- }
-
- if (hasChanged){ // for bug 252708 - don't update unless there really is a change
- 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();
-
- applyPressed();
-
- // if error, do not change selection and we keep pending changes state
- if (getMessageLine().getErrorMessage() != 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;
- }
- }
- 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);
- }
-
-}
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 3e04df627..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInputs.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [226561] add API markup to javadoc
- *******************************************************************************/
-
-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;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogInputs;
-
-
-
-/**
- * A class capturing the attributes commonly needed by dialogs that work with
- * filter pools.
- *
- * @noextend This class is not intended to be subclassed by clients. This class
- * is complete and should be used as is.
- * @since 3.0
- */
-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;
-}
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 7efb415fa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogInterface.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-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.
- *
- * @since 3.0
- */
-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);
-}
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 be581baab..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterPoolDialogOutputs.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [226561] add API markup to javadoc
- *******************************************************************************/
-
-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.
- *
- * @noextend This class is not intended to be subclassed by clients. This class
- * is complete and should be used as is.
- * @since 3.0
- */
-public class SystemFilterPoolDialogOutputs
-{
-
-
- public String filterPoolName;
- public String filterPoolManagerName;
- public SystemSimpleContentElement filterPoolTreeRoot;
- public ISystemFilterPool newPool;
-}
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 3c7ea50c0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterStringEditPane.java
+++ /dev/null
@@ -1,730 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [175680] Deprecate obsolete ISystemRegistry methods
- ********************************************************************************/
-
-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.internal.ui.SystemResources;
-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.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 subsystem configuration) that
- * this was launched from. Will be null if not launched from a subsystem configuration, 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$
- }
-
- /**
- * Sets whether or not the edit pane is not to be editable. May be invoked
- * atany time prior or after the creation of the controls.
- * Subclasses should override and enable their own controls appropriately.
- * <p>
- * Subclasses should call super to ensure that the "editable" flag is
- * set properly. Controls which are not instantiated in this call will be ignored.
- * @param editable true if the controls in this pane are to be editable.
- * Usually set to true, but if the filter is not modifiable it will be
- * set to false.
- */
- public void setEditable(boolean editable) {
- this.editable = editable;
- enable(labelString, editable);
- enable(textString, editable);
- enable(dlgTestButton, editable);
- }
-
- /**
- * Set the enabled state of a particular control.
- * @param control the control of which to set the state
- * @param enabled the enabled state
- */
- protected void enable(Control control, boolean enabled) {
- if (!(control == null || control.isDisposed())) {
- control.setEnabled(enabled);
- }
- }
-
- /*
- * 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();
- }
- }
- );
- setEditable(editable);
- 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 d4d500142..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/SystemFilterUIHelpers.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * David Dykstal (IBM) - [226561] add API markup to javadoc
- ********************************************************************************/
-
-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.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.SystemSimpleContentElement;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-
-/**
- * A set of utility methods for dealing with filter pools, models, etc.
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-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/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 bd66f46c4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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;
- }
-}
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 9308bbb1f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterAction.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.filters.actions;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogInputs;
-import org.eclipse.rse.ui.filters.dialogs.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);
-
-}
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 4cb8ea012..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolAction.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-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.jface.viewers.SelectionChangedEvent;
-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();
- 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
- * @since 3.0
- */
- 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);
-
-}
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 79d92a702..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterPoolWizardAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.ui.filters.actions;
-
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterPoolWizardDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.filters.SystemFilterPoolDialogInterface;
-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.
- * @since 3.0
- */
- public abstract SystemFilterPoolWizardInterface getFilterPoolWizard();
-
-}
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 eeda326be..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemFilterAbstractFilterWizardAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.filters.actions;
-
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.internal.ui.filters.dialogs.SystemFilterWizardDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.filters.dialogs.ISystemFilterWizard;
-import org.eclipse.rse.ui.filters.dialogs.SystemFilterDialogInterface;
-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();
-
-}
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 89464d842..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.java
+++ /dev/null
@@ -1,493 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-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.internal.ui.SystemResources;
-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.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 verbiage = 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_NEWFILTER_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 verbiage 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 #setVerbiage(String)
- */
- public void setShowInfoPage(boolean show)
- {
- showInfoPage = show;
- }
- /**
- * <i>Configuration method. Do not override.</i><br>
- * Set the verbiage 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 setVerbiage(String verbiage)
- {
- this.verbiage = verbiage;
- }
- /**
- * <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 (verbiage != null)
- wizard.setVerbiage(verbiage);
- 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 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;
- }
-}
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 54f5a89e2..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, 2007 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.ui.filters.dialogs;
-
-import org.eclipse.rse.ui.wizards.ISystemWizard;
-
-
-public interface ISystemFilterWizard
- extends ISystemWizard, SystemFilterDialogInterface
-{
-}
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 7cedebf9c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/ISystemNewFilterWizardConfigurator.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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 verbiage for the name prompt on page 2
- */
- public String getPage2NameVerbiage();
- /**
- * Return the verbiage for the pool prompt on page 3
- */
- public String getPage2PoolVerbiage();
- /**
- * Return the verbiage tooltip for the name prompt on page 2
- */
- public String getPage2PoolVerbiageTip();
- /**
- * 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();
-
-
-}
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 472e03bf5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.filters.dialogs;
-
-import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInputs.java
deleted file mode 100644
index 33c5c0e18..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInputs.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.filters.dialogs;
-/**
- * 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;
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInterface.java
deleted file mode 100644
index 5f3a2c490..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogInterface.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.filters.dialogs;
-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();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogOutputs.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogOutputs.java
deleted file mode 100644
index cb47fcde2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterDialogOutputs.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.filters.dialogs;
-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;
-}
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 9369fe32c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-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
- *
- * @since 3.0 moved from "internal" to API
- */
-public interface SystemFilterPoolWizardInterface
- extends ISystemWizard, SystemFilterPoolDialogInterface
-{
-}
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 fbe3974a3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java
+++ /dev/null
@@ -1,676 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [226948] [api][regression] SystemNewFilterWizard.createNamePage() is no longer available
- *******************************************************************************/
-
-package org.eclipse.rse.ui.filters.dialogs;
-
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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.internal.ui.SystemResources;
-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.SystemBasePlugin;
-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;
- private SystemNewFilterWizardNamePage namePage;
- protected SystemNewFilterWizardInfoPage infoPage;
- protected ISystemFilterContainer filterContainer;
- protected ISystemFilterPool parentPool;
- protected ISystemFilterPool[] poolsToSelectFrom;
- protected String type;
- protected String[] defaultFilterStrings;
- //protected String verbiage;
- //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 verbiage 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 verbiage 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 setVerbiage(String verbiage)
- {
- if (configurator instanceof SystemNewFilterWizardConfigurator)
- ((SystemNewFilterWizardConfigurator)configurator).setPage3Tip1(verbiage);
- }
- /**
- * 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;
- }
- /**
- * 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
- * @since 3.0 moved SystemNewFilterWizardNamePage from internal to API
- */
- 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 container 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.
- * @param filter the filter whose name should be removed from the validation list. May be null if the list from the container
- * should be used intact.
- * @return a name validator
- */
- public static ISystemValidator getFilterNameValidator(ISystemFilterContainer container, ISystemFilter filter) {
- String[] names = container.getSystemFilterNames();
- Vector v = new Vector(names.length);
- v.addAll(Arrays.asList(names));
- 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 filterStringsVector 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 filterStringsVector, String type) throws Exception {
- ISystemFilter newFilter = null;
- ISystemFilterPoolManager fpMgr = filterParent.getSystemFilterPoolManager();
- if (type == null)
- newFilter = fpMgr.createSystemFilter(filterParent, aliasName, filterStringsVector);
- else
- newFilter = fpMgr.createSystemFilter(filterParent, aliasName, filterStringsVector, 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
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 d0404f4c0..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, 2007 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.ui.filters.dialogs;
-
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * 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
-{
- // 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_VERBIAGE;
- this.page3Tip2 = SystemResources.RESID_NEWFILTER_PAGE3_POOLS_VERBIAGE;
- 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 verbiage for the name prompt on page 2
- */
- public String getPage2NameVerbiage()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_NAME_VERBIAGE;
- }
- /**
- * Return the verbiage for the name prompt on page 2
- */
- public String getPage2PoolVerbiage()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_POOL_VERBIAGE;
- }
- /**
- * Return the verbiage tooltip for the name prompt on page 2
- */
- public String getPage2PoolVerbiageTip()
- {
- return SystemResources.RESID_NEWFILTER_PAGE2_POOL_VERBIAGE_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;
- }
-
-}
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 f122a5e36..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java
+++ /dev/null
@@ -1,556 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [160403] filters should be connection private by default
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [226948] [api][regression] SystemNewFilterWizard.createNamePage() is no longer available
- * David McKnight (IBM) - [249482] Duplicate Filters can be created if changing the filter pool
- *******************************************************************************/
-
-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.
- *
- * @since 3.0 moved from internal to API
- */
-public class SystemNewFilterWizardNamePage
- extends AbstractSystemWizardPage
- implements SelectionListener
-{
-
- protected Text nameText;
- protected Button uniqueCB;
- protected Label poolVerbiage;
- 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 verbiage 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.getPage2NameVerbiage(), 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);
- uniqueCB.setSelection(true); // [160403] filters should be connection private by default
- }
-
- addFillerLine(composite_prompts, nbrColumns);
-
- if (poolsToSelectFrom != null)
- {
- poolVerbiage = SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2PoolVerbiage(), nbrColumns, false, 200);
- poolVerbiage.setToolTipText(configurator.getPage2PoolVerbiageTip());
- 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())
- {
- poolVerbiage.setEnabled(false);
- poolComboLabel.setEnabled(false);
- poolCombo.setEnabled(false);
- }
- }
- else if (poolWrapperInformation != null)
- {
- poolVerbiage = SystemWidgetHelpers.createVerbiage(composite_prompts, poolWrapperInformation.getVerbiageLabel(), nbrColumns, false, 200);
- 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())
- {
- poolVerbiage.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];
-
- ISystemFilterPool currentPool = poolsToSelectFrom[selection];
- if (currentPool == parentPool){ // if this is the connection-unique filter pool, set the uniqueCB
- uniqueCB.setSelection(true);
- poolCombo.setEnabled(false);
- }
- }
- }
- else if (src == poolWrapperCombo)
- {
- int selection = poolWrapperCombo.getSelectionIndex();
-
- if ((selection >= 0) && (nameValidators!=null)){
- nameValidator = nameValidators[selection];
-
- ISystemFilterPoolWrapper currentPool = poolWrappers[selection];
- if (currentPool == poolWrapperInformation.getPreSelectWrapper()){ // if this is the connection-unique filter pool, set the uniqueCB
- uniqueCB.setSelection(true);
- poolWrapperCombo.setEnabled(false);
- }
- }
- }
- else if (src == uniqueCB)
- {
- boolean selected = uniqueCB.getSelection();
- if (poolVerbiage != null)
- poolVerbiage.setEnabled(!selected);
- if (poolCombo != null){
- poolCombo.setEnabled(!selected);
-
-
- // if unique to connection then only connection-private filter pool can be used
- // if it's not unique to connection, then the connection-private filter pool should not be selected
- boolean foundPool = false;
- int filterPoolSelectionIndex = 0;
- if (poolsToSelectFrom != null){
-
- int currentIndex = poolCombo.getSelectionIndex();
- ISystemFilterPool currentPool = poolsToSelectFrom[currentIndex];
- if (currentPool != parentPool && !selected){
- // then the current pool is okay
- filterPoolSelectionIndex = currentIndex;
- }
- else {
- for (int idx=0; idx<poolsToSelectFrom.length && !foundPool; idx++){
- ISystemFilterPool pool = poolsToSelectFrom[idx];
-
- boolean isConnectionUnique = pool == parentPool;
-
- if ((isConnectionUnique && selected) || (!isConnectionUnique && !selected)){
- filterPoolSelectionIndex = idx;
- foundPool = true;
- }
- }
- poolCombo.select(filterPoolSelectionIndex);
- }
- }
- else if (poolWrappers != null){
- int currentIndex = poolWrapperCombo.getSelectionIndex();
- ISystemFilterPoolWrapper currentPoolWrapper = poolWrappers[currentIndex];
- if (currentPoolWrapper == poolWrapperInformation.getPreSelectWrapper()){
- // then the current pool is okay
- filterPoolSelectionIndex = currentIndex;
- }
- else {
- for (int idx=0; idx<poolWrappers.length && !foundPool; idx++){
-
- boolean isConnectionUnique = poolWrapperInformation.getPreSelectWrapper() == poolWrappers[idx];
- if ((isConnectionUnique && selected) || (!isConnectionUnique && !selected)){
- filterPoolSelectionIndex = idx;
- foundPool = true;
- }
- }
- poolWrapperCombo.select(filterPoolSelectionIndex);
- }
- }
-
- if (nameValidators != null){
- nameValidator = nameValidators[filterPoolSelectionIndex];
- }
-
- }
- 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.
- // --------------------------------------------------------------
-
-}
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/SystemMessageDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java
deleted file mode 100644
index 5ace4a52a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java
+++ /dev/null
@@ -1,914 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
- * Martin Oberhuber (Wind River) - [187115] force SystemMessageDialog always into Display thread
- * Martin Oberhuber (Wind River) - [189272] exception when canceling ssh connect
- * David McKnight (IBM) - [216596] determine whether to show yes/no or just okay
- * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Martin Oberhuber (Wind River) - Adding Javadoc
- * David McKnight (IBM) - [232670] SystemMessageDialog should not throw IndicatorExceptions
- * David McKnight (IBM) - [238585] SystemMessageDialog's details area is always scrolled to the bottom
- * David McKnight (IBM) - [253042] SystemMessageDialog.displayHostErrorMessage(shell, string, string) is broken
- *******************************************************************************/
-
-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.jface.window.Window;
-import org.eclipse.rse.internal.ui.GenericMessages;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.SystemBasePlugin;
-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.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * A dialog for showing SystemMessages and optionally asking the user for Yes /
- * No / Ok / Cancel type of response.
- *
- * The client may choose to construct and open the dialog itself, or use one of
- * the provided static factory methods, which construct the dialog and
- * synchronously open it without thread switch (must be called on the UI
- * thread):
- * <ul>
- * <li>{@link #openError(Shell, String, String, IStatus)}</li>
- * <li>{@link #openError(Shell, String, String, IStatus, int)}</li>
- * </ul>
- * or one of the convenience static factory methods which also switch to the UI
- * thread automatically to synchronously open the dialog there if needed:
- * <ul>
- * <li>{@link #show(Shell, SystemMessage)}</li>
- * <li>{@link #showExceptionMessage(Shell, String, Exception)}</li>
- * <li>{@link #displayErrorMessage(Shell, String)}</li>
- * <li>{@link #displayErrorMessage(Shell, SystemMessage)}</li>
- * <li>{@link #displayErrorMessage(Shell, SystemMessage, Throwable)}</li>
- * <li>... and many more displayXXX() static methods.</li>
- * </ul>
- *
- * @noextend This class is not intended to be subclassed by clients, because we
- * want a uniform appearance of message dialogs.
- */
-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 static String getStatusTitle(SystemMessage message) {
- String title = null;
- // setup image
- if (message.getIndicator()==SystemMessage.INFORMATION ||
- message.getIndicator()==SystemMessage.COMPLETION)
- title = GenericMessages.Information;
- else if (message.getIndicator()==SystemMessage.INQUIRY)
- //imageName=DLG_IMG_QUESTION;
- title = GenericMessages.Question;
- else if (message.getIndicator()==SystemMessage.ERROR ||
- message.getIndicator()==SystemMessage.UNEXPECTED)
- title = GenericMessages.Error;
- else if (message.getIndicator()==SystemMessage.WARNING)
- title = GenericMessages.Warning;
- return title;
- }
-
-
- 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);
- list.setTopIndex(0);
-
- 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();
- }
-
- /**
- * Open the dialog with Yes, No, Details button for an Inquiry/Question
- * message.
- *
- * @return <code>true</code> if Yes was pressed, <code>false</code> if
- * No was pressed.
- */
- public boolean openQuestion()
- {
- yesNoButtons=true;
- open();
- return (buttonIdPressed==IDialogConstants.YES_ID);
- }
-
- /**
- * Open the dialog with Yes/No, Details button for an Inquiry/Question
- * message.
- *
- * @return <code>true</code> if Yes was pressed, <code>false</code> if
- * No was pressed.
- */
- public boolean openQuestionNoException()
- {
- return openQuestionNoException(true);
- }
-
- /**
- * opens the dialog with an optional Yes/No or OK, Details button for an
- * Inquiry/Question message.
- *
- * Before RSE 3.0, this method had no arguments. Since RSE 3.0, it is taking
- * a boolean argument.
- *
- * @since org.eclipse.rse.ui 3.0
- */
- public boolean openQuestionNoException(boolean showYesNo)
- {
- yesNoButtons=showYesNo;
- open();
- return (buttonIdPressed==IDialogConstants.YES_ID);
- }
-
- /**
- * opens the dialog with Yes, No, Cancel Details for an Inquiry/Question message
- * @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 SystemBasePlugin.getActiveWorkbenchShell();
- }
-
- private static void runInUIThread(final Runnable r) {
- Display d = Display.getCurrent();
- if (d!=null) {
- r.run();
- }
- else {
- d = Display.getDefault();
- d.syncExec(r);
- }
- }
-
- private static int openInUIThread(final Window dlg) {
- Display d = Display.getCurrent();
- if (d!=null) {
- return dlg.open();
- }
- else {
- d = Display.getDefault();
- final int[] rv = new int[1];
- d.syncExec(new Runnable() {
- public void run() {
- rv[0] = dlg.open();
- }
- });
- return rv[0];
- }
- }
-
- /**
- * 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);
- openInUIThread(msgDlg);
- }
-
- /**
- * For ease of use for simple messages which are the result of an exception
- */
- public static void displayErrorMessage(Shell shell, SystemMessage msg, Throwable exc)
- {
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- msgDlg.setException(exc);
- openInUIThread(msgDlg);
- }
-
- /**
- * 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(Shell shell, SystemMessageException msgEx)
- {
- if (msgEx != null)
- SystemMessageDialog.displayErrorMessage(shell, msgEx.getSystemMessage());
- }
-
- /**
- * Display this wrapped system message to the user
- */
- public static void displayMessage(SystemMessageException msgEx)
- {
- if (msgEx != null)
- SystemMessageDialog.displayErrorMessage(getDefaultShell(), 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 = new SimpleSystemMessage(RSEUIPlugin.PLUGIN_ID, ISystemMessages.MSG_GENERIC_E, IStatus.ERROR, hostMsg);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- openInUIThread(msgDlg);
- }
-
- /**
- * 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 = new SimpleSystemMessage(RSEUIPlugin.PLUGIN_ID, ISystemMessages.MSG_GENERIC_E, IStatus.ERROR, hostMsg, levelTwo);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- openInUIThread(msgDlg);
- }
-
- /**
- * For ease of use for simple host warning messages that are xlated already.
- */
- public static void displayHostWarningMessage(Shell shell, String hostMsg)
- {
- SystemMessage msg = new SimpleSystemMessage(RSEUIPlugin.PLUGIN_ID, ISystemMessages.MSG_GENERIC_W, IStatus.WARNING, hostMsg);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- openInUIThread(msgDlg);
- }
-
- /**
- * 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 = new SimpleSystemMessage(RSEUIPlugin.PLUGIN_ID, ISystemMessages.MSG_GENERIC_W_HELP, IStatus.WARNING, hostMsg, levelTwo);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- openInUIThread(msgDlg);
- }
-
- /**
- * For displaying a generic error message when an unexpected exception happens.
- */
- public static void displayExceptionMessage(Shell shell, Throwable 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);
- openInUIThread(msgDlg);
- }
-
-
- /**
- * When an exception occurs and you want to turn it into a SystemMessage,
- * call this...
- */
- public static SystemMessage getExceptionMessage(Shell shell, Throwable exc)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
- msg.makeSubstitution(exc);
- return msg;
- }
-
- /**
- * Put up an error message when the error message framework itself doesn't
- * work, and also log the error.
- */
- public static void showExceptionMessage(Shell shell, String msg, Exception exc)
- {
- final MessageBox mb = new MessageBox(null);
- //mb.setTitle("Remote Systems Programming Error");
- mb.setMessage(msg);
- runInUIThread(new Runnable() {
- public void run() {
- 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;
- final SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
-
- if (msg.getIndicator() != SystemMessage.INQUIRY)
- openInUIThread(msgDlg);
- else {
- final boolean[] rv = new boolean[1];
- runInUIThread(new Runnable() {
- public void run() {
- rv[0] = msgDlg.openQuestionNoException();
- }
- });
- yes = rv[0];
- }
- 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);
- }
- }
- }
- }
- }
-}
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 c8f2ddc7b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemMessageLine.java
+++ /dev/null
@@ -1,642 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.ui.messages;
-
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.SystemBasePlugin;
-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) {
- if (message != null)
- {
- infoMessage = new MyImpromptuMessage(INFO, message);
- }
- else
- {
- infoMessage = null;
- }
- showCurrentMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.String)
- */
- public void setErrorMessage(String message) {
- if (message != null)
- {
- errorMessage = new MyImpromptuMessage(ERROR, message);
- }
- else
- {
- errorMessage = null;
- }
-
- 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() != null ? message.getText() : "";
- toolTip = message.getTooltip() != null ? 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 726c38a8b..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, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.ui.messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-
-/**
- * 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 a5b3b3d7b..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, 2008 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) - [219975] Fix SystemMessage#clone()
- ********************************************************************************/
-
-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 98e47976e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2004, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup
- ********************************************************************************/
-
-package org.eclipse.rse.ui.messages;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-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;
-import org.eclipse.rse.ui.SystemBasePlugin;
-
-/**
- * A SystemUIMessageFile extends SystemMessageFile and makes it more compatible
- * with Eclipse
- */
-public class SystemUIMessageFile extends SystemMessageFile {
-
- /**
- * Factory method for constructing a SystemUIMessageFile that loads the message file synchronously.
- * 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;
- }
-
- /**
- * Factory method for constructing a SystemUIMessageFile that loads the message file in a thread.
- *
- * The difference between {@link #getMessageFile(String,InputStream)} and this method
- * is that the former calls the constructor that loads the message file synchronously
- * while this one loads the message file in a worker thread. The message file URL is
- * passed in here so that the opening of it's input stream can be deferred until the
- * time when the worker thread is started and able to load the message file.
- *
- * @param messageFileName The name of the message file to load.
- * @param messageFileURL The URL to the message file.
- * @return The message file that was constructed.
- *
- * @since 3.1
- */
- public static SystemUIMessageFile getMessageFile(String messageFileName,
- URL messageFileURL) {
- SystemUIMessageFile result = null;
- URL dtdURL = RSEUIPlugin.getDefault().getMessageFileDTD();
- if (dtdURL != null) {
- result = new SystemUIMessageFile(messageFileName,messageFileURL, dtdURL);
- } else {
- SystemBasePlugin.logError("Could not find mesage file DTD."); //$NON-NLS-1$
- }
- return result;
- }
-
-
- /**
- * Constructor for synchronous loading of the message file.
- *
- * This is private because this is not to be called directly, but rather
- * from {@link #getMessageFile(String, InputStream)}.
- */
- private SystemUIMessageFile(String messageFileName,
- InputStream messageFileStream, InputStream dtdStream) {
- super(messageFileName, messageFileStream, dtdStream);
- }
-
- /**
- * Constructor for lazy loading of the message file.
- *
- * This is private because this is not to be called directly, but rather
- * from {@link #getMessageFile(String, URL)}.
- */
- private SystemUIMessageFile(String messageFileName,
- URL messageFileURL, URL dtdURL) {
- super(messageFileName, messageFileURL, dtdURL);
- }
-
- /**
- * 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 ac032443b..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, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-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.ui.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 6aa5194fb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenDialog.java
+++ /dev/null
@@ -1,802 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [216252] canceled --> cancelled in comments
- *******************************************************************************/
-
-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 cancelled 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 2ccd16259..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, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-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.ui.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().getNamespaceIdentifier();
- 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 ed7b168db..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/open/SystemQuickOpenUI.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-package org.eclipse.rse.ui.open;
-
-import org.eclipse.rse.ui.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 4a1cbd18f..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,2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- ********************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-
-
-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;
-import org.eclipse.osgi.util.NLS;
-
-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 NLS.bind(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/SystemDeferredTreeContentManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemDeferredTreeContentManager.java
deleted file mode 100644
index ff85a76f6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemDeferredTreeContentManager.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - [181145] restore selection after deferred query
- ********************************************************************************/
-package org.eclipse.rse.ui.operations;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.ui.progress.DeferredTreeContentManager;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.PendingUpdateAdapter;
-
-public class SystemDeferredTreeContentManager extends
- DeferredTreeContentManager {
-
- private List _pendingQueries;
-
- public SystemDeferredTreeContentManager(ITreeContentProvider provider,
- AbstractTreeViewer viewer)
- {
- super(provider, viewer);
- _pendingQueries = new ArrayList();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.progress.DeferredTreeContentManager#getAdapter(java.lang.Object)
- */
- protected IDeferredWorkbenchAdapter getAdapter(Object element)
- {
-
- if (element instanceof IContextObject)
- {
- element = ((IContextObject)element).getModelObject();
- }
- return super.getAdapter(element);
- }
-
- /**
- * Returns the child elements of the given element, or in the case of a
- * deferred element, returns a placeholder. If a deferred element is used, a
- * job is created to fetch the children in the background.
- *
- * When the job for fetching the children is finished and the placeholder
- * removed, the original selection is restored.
- *
- * @param parent
- * The parent object.
- * @param viewer
- * The viewer
- * @return Object[] or <code>null</code> if parent is not an instance of
- * IDeferredWorkbenchAdapter.
- */
- public Object[] getChildren(final Object parent, final Viewer viewer) {
- final ISelection selection = viewer.getSelection();
- IDeferredWorkbenchAdapter element = getAdapter(parent);
- if (element == null) {
- return null;
- }
- PendingUpdateAdapter placeholder = new PendingUpdateAdapter() {
- protected void setRemoved(boolean removedValue) {
- super.setRemoved(removedValue);
- ISelection curSel = viewer.getSelection();
- //Only restore selection if the user has not changed it manually.
- //TODO in some cases we might need to send an EVENT_SELECT_REMOTE
- //listing the absolute paths of the original selection, in order
- //to properly find the items that should be selected.
- if (isSelectionContainedIn(curSel, selection)) {
- viewer.setSelection(selection);
- }
- }
- };
-
- if (!_pendingQueries.contains(parent))
- {
- startFetchingDeferredChildren(parent, element, placeholder);
- _pendingQueries.add(parent);
- return new Object[] { placeholder };
- }
- return null;
- }
-
- /**
- * Test whether a given selection is a subset of another (parent) selection.
- * @param sel Selection to check
- * @param parent Parent selection
- * @return <code>true</code> if the given selection is a subset.
- */
- private boolean isSelectionContainedIn(ISelection sel, ISelection parent) {
- if (sel.isEmpty())
- return true;
- if (sel.equals(parent))
- return false;
- if ((sel instanceof IStructuredSelection) && (parent instanceof IStructuredSelection)) {
- IStructuredSelection ssel = (IStructuredSelection)sel;
- List spar = ((IStructuredSelection)parent).toList();
- Iterator it = ssel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!spar.contains(o))
- return false;
- }
- return true;
- }
- return false;
- }
-
- protected void addChildren(final Object parent, final Object[] children,
- IProgressMonitor monitor)
- {
- super.addChildren(parent, children, monitor);
- _pendingQueries.remove(parent);
- }
-}
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 3fd7d7263..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/operations/SystemFetchOperation.java
+++ /dev/null
@@ -1,643 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189272] exception when canceling ssh connect
- * David Dykstal (IBM) - [189483] add notification when canceling password prompting
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [231964] [ssh] SSH login dialog appears twice after cancel, when doing Refresh on a node
- * David McKnight (IBM) - [235164] SystemView should allow to create filter in disconnected mode
- * David McKnight (IBM) - [239368] Expand to action ignores the filter string
- * David McKnight (IBM) - [244270] Explicit check for isOffline and just returning block implementing a cache for Work Offline
- * David McKnight (IBM) - [233160] [dstore] SSL/non-SSL alert are not appropriate
- * David McKnight (IBM) - [243263] NPE on expanding a filter
- * David McKnight (IBM) - [260777] [ssh] Deadlock when changing selection after multiple hibernate/resume cycles
- * David McKnight (IBM) - [283793] [dstore] Expansion indicator(+) does not reset after no connect
- *******************************************************************************/
-
-package org.eclipse.rse.ui.operations;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-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.RSECorePlugin;
-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.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystem.DisplayErrorMessageJob;
-import org.eclipse.rse.internal.ui.GenericMessages;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.IContextObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.progress.IElementCollector;
-
-
-/**
- * A SystemFetchOperation is used to perform a query of a remote system on behalf of a subsystem. The operation
- * has some knowledge of the containing user interface, e.g. the workbench part which is responsible for
- * issuing the query. It is created with a "collector" that will contain the results of the query.
- * <p>
- * This class may be subclassed but usually is used directly.
- */
-public class SystemFetchOperation extends JobChangeAdapter implements IRunnableWithProgress
-{
- private static class ConnectorServicePool {
-
- private static List _connectingConnectorServices = new ArrayList();
-
- public synchronized void add(IConnectorService cs) {
- _connectingConnectorServices.add(cs);
- }
-
- public synchronized void remove(IConnectorService cs) {
- _connectingConnectorServices.remove(cs);
- notifyAll();
- }
-
- public synchronized boolean contains(IConnectorService cs) {
- return _connectingConnectorServices.contains(cs);
- }
-
- public synchronized void waitUntilNotContained(IConnectorService cs) {
- while (contains(cs)){ // wait until the connector service is no longer in the list
- try {
- wait();
- }
- catch (InterruptedException e){
- e.printStackTrace();
- }
- catch (Exception e){
- e.printStackTrace();
- }
- }
- }
- }
-
- protected IWorkbenchPart _part;
- protected Object _remoteObject;
- protected IElementCollector _collector;
- private IRunnableContext context;
- protected ISystemViewElementAdapter _adapter;
- protected boolean _canRunAsJob;
- protected InvocationTargetException _exc;
-
- private static ConnectorServicePool _connectorServicePool = new ConnectorServicePool();
-
- /**
- * Creates an instance of this fetch operation. This instance cannot be run in a job, but must be invoked directly.
- * @param part the workbench part associated with this fetch.
- * @param remoteObject the remote object that provides the context for this fetch
- * @param adapter the adapter that can be used to extract information from the remote objects that will be retrieved by this fetch.
- * @param collector the collector for the fetch results.
- */
- public SystemFetchOperation(IWorkbenchPart part, Object remoteObject, ISystemViewElementAdapter adapter, IElementCollector collector)
- {
- _part = part;
- _remoteObject = remoteObject;
- _collector = collector;
- _adapter = adapter;
- _canRunAsJob = false;
- }
-
- /**
- * Creates an instance of this fetch operation.
- * @param part the workbench part associated with this fetch.
- * @param remoteObject the remote object that provides the context for this fetch
- * @param adapter the adapter that can be used to extract information from the remote objects that will be retrieved by this fetch.
- * @param collector the collector for the fetch results.
- * @param canRunAsJob true if this fetch operation can be run in a job of its own, false otherwise
- */
- public SystemFetchOperation(IWorkbenchPart part, Object 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 (InterruptedException e) { // operation was cancelled
- endOperation();
- monitor.setCanceled(true);
- throw e;
- } 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()]));
- }
-
-
- /**
- * An action that prompts the user for credentials to connect the subsystem that is issued the fetch.
- * <p>
- * This class is listed as public, but should not be used/referenced by others.
- */
- public class PromptForPassword implements Runnable
- {
- public SubSystem _ss;
- private volatile boolean isCancelled = false;
- public PromptForPassword(SubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- try
- {
- isCancelled = false;
- _ss.promptForPassword();
- }
- catch (InterruptedException e) {
- isCancelled = true;
- }
- catch (OperationCanceledException e) {
- isCancelled = true;
- }
- catch (Exception e)
- {
-
- }
- }
-
- /**
- * Test whether this operation is cancelled.
- *
- * This method was renamed from isCanceled to isCancelled in RSE 3.0.
- *
- * @since org.eclipse.rse.ui 3.0
- * @return true if cancelled
- */
- public boolean isCancelled() {
- return isCancelled;
- }
- }
-
- /**
- * A sub-operation that broadcasts any connection status change.
- * <p>
- * Listed as public, but should not be used or referenced by others.
- */
- public class UpdateRegistry implements Runnable
- {
- private SubSystem _ss;
- public UpdateRegistry(SubSystem ss)
- {
- _ss = ss;
- }
-
- public void run()
- {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.connectedStatusChange(_ss, true, false);
- }
- }
-
-
- private boolean ensureConnected(SubSystem ss, IProgressMonitor monitor) throws InterruptedException {
- if (!ss.isConnected() &&
- !ss.isOffline()) // skip the connect if offline, but still follow through because we need to follow through in the subsystem
- {
- IConnectorService connectorService = ss.getConnectorService();
-
- boolean alreadyConnecting = false;
-
- // is this connector service already connecting?
- alreadyConnecting = _connectorServicePool.contains(connectorService);
-
- if (alreadyConnecting){
- // connector service already attempting connect
- // need to wait for it to complete
- // before we can return out of this method
- _connectorServicePool.waitUntilNotContained(connectorService);
- }
- else {
- final Display dis = Display.getDefault();
- _connectorServicePool.add(connectorService);
- try
- {
- PromptForPassword prompter = new PromptForPassword(ss);
- dis.syncExec(prompter);
- if (prompter.isCancelled()) {
- SystemMessage cancelledMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED);
- SystemMessageObject cancelledMessageObject = new SystemMessageObject(cancelledMessage, ISystemMessageObject.MSGTYPE_CANCEL,
- _remoteObject);
- _collector.add(cancelledMessageObject, monitor);
- throw new InterruptedException();
- }
- connectorService.connect(monitor);
- if (_exc != null)
- {
- showOperationErrorMessage(null, _exc, ss);
- }
- }
- catch (InvocationTargetException exc)
- {
- showOperationErrorMessage(null, exc, ss);
- return false;
- }
- catch (Exception e)
- {
- showOperationErrorMessage(null, e, ss);
- return false;
- }
- finally {
- _connectorServicePool.remove(connectorService);
- }
-
- dis.asyncExec(new UpdateRegistry(ss));
- }
- }
- return ss.isConnected();
-
- }
-
- /**
- * 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 = null;
- Object actualRemoteObj = _remoteObject;
- if (_remoteObject instanceof IContextObject)
- {
- ss = (SubSystem)((IContextObject)_remoteObject).getSubSystem();
- actualRemoteObj = ((IContextObject)_remoteObject).getModelObject();
- }
- else
- {
- ss = (SubSystem)_adapter.getSubSystem(_remoteObject);
- }
-
-
- boolean isPromptable = false;
-
- if (actualRemoteObj instanceof IAdaptable){
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)actualRemoteObj).getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null){
- isPromptable = adapter.isPromptable(actualRemoteObj);
- }
- }
-
- Object[] children = null;
- if (!isPromptable){
- if (!ensureConnected(ss, monitor)){
- children = new Object[0];
- _collector.add(children, monitor);
- return;
- }
- }
-
-
-
- // we first test to see if this is an expand-to filter in effect for this
- // object, and if so use it...
- if ((_part==null || _part instanceof SystemViewPart) && _adapter instanceof ISystemRemoteElementAdapter)
- {
- class GetExpandToFilter implements Runnable
- {
- private String expandToFilter = null;
- public void run()
- {
- // fetching part here ourselves, because the correct part can not always be determined from a background Thread
- // see bug 244454 for details
- IWorkbenchPart activePart = _part;
- if (activePart==null) {
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
- if (win != null){
- IWorkbenchPage page = win.getActivePage();
- if (page != null){
- activePart = page.getActivePart();
- if (activePart != null){
- _part = activePart;
- }
- }
- }
- }
-
- if (activePart instanceof SystemViewPart){
- SystemView viewer = ((SystemViewPart)activePart).getSystemView();
- if (_remoteObject instanceof IContextObject){
- expandToFilter = viewer.getExpandToFilter(((IContextObject)_remoteObject).getModelObject());
- }
- else {
- expandToFilter = viewer.getExpandToFilter(_remoteObject);
- }
- }
- }
-
- public String getExpandToFilter()
- {
- return expandToFilter;
- }
- }
-
- Display dis = Display.getDefault();
- GetExpandToFilter getExpandTo = new GetExpandToFilter();
- dis.syncExec(getExpandTo);
- String expandToFilter = getExpandTo.getExpandToFilter();
-
- if (expandToFilter != null){
- if (_remoteObject instanceof IContextObject){
- children = _adapter.getChildrenUsingExpandToFilter(((IContextObject)_remoteObject).getModelObject(), expandToFilter);
- }
- else {
- children = _adapter.getChildrenUsingExpandToFilter(_remoteObject, expandToFilter);
- }
- }
- }
- if (children == null){
- if (_remoteObject instanceof IContextObject)
- {
- children = _adapter.getChildren((IContextObject)_remoteObject, monitor);
- }
- else
- {
- children = _adapter.getChildren((IAdaptable)_remoteObject, monitor);
- }
- }
- _collector.add(children, monitor);
- monitor.done();
- }
-
- /**
- * Show an error message as a result of running this operation.
- * Uses the user interface knowledge of this operation to show the message.
- * <p>
- * May be overridden by subclasses but it usually used directly.
- * @param shell The parent shell for a message dialog box.
- * @param exc the exception that was recieved and should be shown
- * @param ss the subsystem that this operation is being issued for
- */
- protected void showOperationErrorMessage(Shell shell, Throwable exc, SubSystem ss)
- {
- if (exc instanceof InvocationTargetException) {
- exc = ((InvocationTargetException)exc).getTargetException();
- }
- if (exc instanceof OperationCanceledException) {
- return; //don't log or display user cancellation
- }
- 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))
- exc.getClass().getName();
- else
- excMsg = exc.getClass().getName() + ": " + excMsg; //$NON-NLS-1$
- sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED);
- sysMsg.makeSubstitution(excMsg);
-
- SystemMessageDialog.displayErrorMessage(shell, sysMsg, exc);
- }
-
- }
-
- /**
- * 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.jobs.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;
- }
-}
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 c718edb6c..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, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-
-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.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 8af6597aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/AbstractSystemSubSystemPropertyPageCoreForm.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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();
-
-}
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/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/ServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
deleted file mode 100644
index 0fe735ba1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David Dykstal (IBM) - [231630] add help for services property page
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import org.eclipse.rse.core.IRSESystemType;
-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.SystemWidgetHelpers;
-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 IRSESystemType _hosttype;
- protected ServiceElement _rootElement;
-
- protected Control createContentArea(Composite parent)
- {
- _form = new ServicesForm(parent.getShell(), getMessageLine());
- _form.createContents(parent);
-
- // init services
- initServices();
- SystemWidgetHelpers.setCompositeHelp(parent, "org.eclipse.rse.ui.ServicesPropertyPage"); //$NON-NLS-1$
- return parent;
- }
-
-
- protected boolean verifyPageContents()
- {
- return _form.verify();
- }
-
- protected void initServices()
- {
- ServiceElement[] elements = getServiceElements();
- _rootElement = new RootServiceElement(elements);
- _form.init(_rootElement);
- }
-
- /**
- * @since 3.0 returning ISubSystem rather than IServiceSubSystem
- * @return
- */
- protected ISubSystem getServiceSubSystem()
- {
- return (ISubSystem)getElement();
- }
-
- protected abstract ServiceElement[] getServiceElements();
-
- /**
- * @since 3.0
- */
- protected abstract ISubSystemConfiguration getCurrentSubSystemConfiguration();
-
- 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();
- ISubSystemConfiguration factory = selectedService.getFactory();
- ISubSystemConfiguration currentFactory = getCurrentSubSystemConfiguration();
- if (factory != currentFactory)
- {
- getServiceSubSystem().switchServiceFactory(factory);
- }
- return true;
- }
-
- public void setHostname(String hostname)
- {
- _hostname = hostname;
- }
-
- public void setSystemType(IRSESystemType systemType)
- {
- _hosttype = systemType;
- }
-
- public String getHostname()
- {
- return _hostname;
- }
-
- public IRSESystemType 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 321fdc2a9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-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.RSECorePlugin;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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().getLabel();
-
- 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 = RSECorePlugin.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.clearPassword(false, true);
- }
- }
- }
- }
- }
- }
- }
- 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/SystemBasePropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java
deleted file mode 100644
index 1387e7bb9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemBasePropertyPage.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.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.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 verbiage 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 createLabeledVerbiage(Composite c, String label, String tooltip)
- {
- Label verbiage = SystemWidgetHelpers.createLabeledVerbiage(c, label, tooltip, 1, false, 200);
- GridData gd = (GridData)verbiage.getLayoutData();
- if (gd != null)
- {
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalIndent = 10;
- }
- return verbiage;
- }
- // -----------------------------
- // 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)
- ((SystemMessageLine)msgLine).setErrorMessage(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)
- ((SystemMessageLine)msgLine).setMessage(message);
- }
-
-}
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 9928aee40..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemChangeFilterPropertyPage.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [252011] NPE On Promptable Filter's Filter Strings Property Page when Clicking Okay
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-
-import org.eclipse.core.runtime.Platform;
-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.internal.ui.SystemPropertyResources;
-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.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.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.view.SubSystemConfigurationAdapter;
-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 SubSystemConfigurationAdapter#customizeChangeFilterPropertyPage(ISubSystemConfiguration, 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())
- {
- changeFilterPane.setEditable(false); // for bug 252011 - we don't verify promptable filters
- 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);
- if (adapter == null) {
- // lazy loading: load adapter if necessary
- Platform.getAdapterManager().loadAdapter(ssf, ISubSystemConfigurationAdapter.class.getName());
- 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/SystemFilterStringPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java
deleted file mode 100644
index 015f6ffa8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemFilterStringPropertyPage.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- *******************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-import java.util.Arrays;
-import java.util.ResourceBundle;
-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.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.internal.ui.SystemResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.subsystems.ISubSystemConfigurationAdapter;
-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)
- {
- this.editable = editable;
- }
-
- // 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)
- {
- String[] filterStrings = filter.getFilterStrings();
- Vector existingStrings = new Vector(filterStrings.length);
- existingStrings.addAll(Arrays.asList(filterStrings));
- 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()
- {
- }
-
-}
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 ee585ef6e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemKeyValueFieldEditor.java
+++ /dev/null
@@ -1,641 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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.internal.ui.SystemResources;
-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.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);
- }*/
-}
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 830cac5d1..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, 2007 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- ********************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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 12d810175..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [195399] Improve String display for default port 0
- ********************************************************************************/
-
-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.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-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(NLS.bind(SystemPropertyResources.RESID_PORT_DYNAMICSELECT, new Integer(0)));
- 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()) {
- 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);
- 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;
- if (controlInError != null)
- 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)
- {
- 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 f74f69c12..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTeamViewCategoryPropertyPage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) [225506][api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.ui.propertypages;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryNode;
-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 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
- */
- private 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());
- }
-
-}
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 a4dfee58c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemTypeFieldEditor.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * - created and used RSEPreferencesManager
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- * Martin Oberhuber (Wind River) - [196963][181939] avoid subsystem plugin activation just for enablement checking
- * David Dykstal (IBM) - [231943] make "true" and "false" translatable
- ********************************************************************************/
-
-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.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.RSEPreferencesManager;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-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 = {SystemResources.SystemTypeFieldEditor_true, SystemResources.SystemTypeFieldEditor_false};
-
- /**
- * Constructor
- *
- * @param name the name 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 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 = RSEPreferencesManager.getSystemTypeValues();
- 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) {
- RSEPreferencesManager.setSystemTypeValues(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.getTheCoreRegistry().getSystemTypes();
- ArrayList list = new ArrayList();
- if (systemTypes == null || restoreDefaults) {
- //Only get system types with at least one configuration registered.
- //Do not consider enabled state according to the system type
- //adapter, because this field editor is used for the preference
- //page where enablement is made.
- ISubSystemConfigurationProxy[] proxies = RSECorePlugin.getTheSystemRegistry().getSubSystemConfigurationProxies();
- for (int i = 0; i < types.length; i++) {
- for (int j=0; j<proxies.length; j++) {
- if (proxies[j].appliesToSystemType(types[i])) {
- list.add(types[i]);
- break;
- }
- }
- }
- }
- 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(RSESystemTypeAdapter.class));
- Object value = ""; //$NON-NLS-1$
-
- if (property.equals(P_NAME))
- value = row.getLabel();
- else if (property.equals(P_ENABLED))
- value = (row.isEnabled() ? 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());
-
- if (property.equals(P_ENABLED))
- {
- Integer val = (Integer)value;
- RSEPreferencesManager.setIsSystemTypeEnabled(row, enabledStates[val.intValue()]);
- enabledStateChanged = true;
- }
- else if (property.equals(P_USERID))
- {
- RSEPreferencesManager.setDefaultUserId(row, (String) value);
- }
- else
- return;
-
- keyValues.put(row.getId(), ""); //$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;
-
- if (columnIndex == COLUMN_NAME)
- return currType.getLabel();
- else if (columnIndex == COLUMN_ENABLED) {
- int n = 0;
- if (currType.isEnabled() == enabledStates[1]) {
- n = 1;
- }
- return enabledStateStrings[n];
- } else if (columnIndex == COLUMN_USERID) {
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter) (currType.getAdapter(RSESystemTypeAdapter.class));
- 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)
-// {
-// /* this must stay in synch with the SystemPreferencesManager */
-// 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.getTheCoreRegistry().getSystemType(key);
-// RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(matchingType.getAdapter(RSESystemTypeAdapter.class));
-//
-// // update this system type's attributes as per preferences...
-// {
-// 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 780e5e894..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-
-import java.util.Collection;
-
-/**
- * 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.
- * The collection used here is to be treated as
- * read-only by any implementer of this interface.
- */
- public void setExistingNamesList(Collection existingList);
- /**
- * Return the existing names list.
- * This will be a case-normalized and sorted list.
- */
- public String[] getExistingNamesList();
-}
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 b49ed0201..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.ui.validators;
-import java.util.Collection;
-
-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(Collection 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;
- }
-}
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 e7edf557f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [cleanup] Avoid using SystemStartHere in production code
- * David McKnight (IBM) - [275970] Subsystems were created but not the containing connection
- *******************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-import java.util.Collection;
-
-import org.eclipse.rse.core.RSECorePlugin;
-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 ValidatorUniqueString implements ISystemValidator
-{
- public static final int MAX_CONNECTIONNAME_LENGTH = 100; // arbitrary restriction due to defects
-
- /**
- * Constructor.
- * @param existingNameList list of existing names (strings) in owning profile. Can be null if not a rename operation.
- */
- public ValidatorConnectionName(Collection existingNameList)
- {
- super(existingNameList, false); // connections should always be case-insensitive
- setErrorMessages(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_CONNECTIONNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE)
- );
- }
-
- /**
- * 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;
- String[] names = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNames();
- String profileName = null;
- for (int idx = 0; (msg == null) && (idx < names.length); idx++)
- {
- profileName = names[idx];
- IHost[] conns = RSECorePlugin.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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java
deleted file mode 100644
index 6bf1d0316..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFactory.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 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 API and implementation
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- ********************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfileManager;
-
-/**
- * This class constructs validators for various bits of the user interface.
- */
-public class ValidatorFactory {
-
- /**
- * 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 static ISystemValidator getProfileNameValidator(String profileName) {
- ISystemProfileManager manager = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager();
- String[] nameArray = manager.getSystemProfileNames();
- Collection names = Arrays.asList(nameArray);
- if (profileName != null) names.remove(profileName);
- ISystemValidator nameValidator = new ValidatorProfileName(names);
- return nameValidator;
- }
-
-}
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 ddcd1b02c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFileName.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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.
- * @param existingNameList a collection of existing names to compare against.
- * This will not be modified by the validator.
- */
- public ValidatorFileName(Collection 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;
- }
-
-}
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 21d79c344..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterName.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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.
- * <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 ValidatorUniqueString 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 Collection.
- * @param existingList a collection of existing filter names to compare against.
- * The collection will not be modified by the validator.
- * Note that toString() is used to get the string from each item.
- */
- public ValidatorFilterName(Collection existingList)
- {
- super(existingList, CASE_SENSITIVE);
- init();
- }
- /**
- * Constructor accepting an Array.
- * @param existingList array containing list of existing strings to compare against.
- */
- public ValidatorFilterName(String[] existingList)
- {
- super(existingList, CASE_SENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERNAME_NOTUNIQUE)
- );
- }
-
- 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;
- }
-
-}
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 ebffe6f2f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterPoolName.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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 ValidatorUniqueString implements ISystemValidator
-{
- public static final int MAX_FILTERPOOLNAME_LENGTH = 50;
-
- /**
- * Constructor accepting a Collection.
- * @param existingList a collection of existing filter names to compare against.
- * This will not be modified by the validator.
- * Note that toString() is used to get the string from each item.
- */
- public ValidatorFilterPoolName(Collection existingList)
- {
- super(existingList, CASE_SENSITIVE);
- init();
- }
- /**
- * Constructor accepting an Array.
- * @param existingList An array containing a list of existing strings to compare against.
- */
- public ValidatorFilterPoolName(String[] existingList)
- {
- super(existingList, CASE_SENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERPOOLNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILTERPOOLNAME_NOTUNIQUE)
- );
- }
-
-
- 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;
- }
-}
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 89eda3d60..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFilterString.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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 collection of existing strings, as simple strings.
- * @param existingList A collection of strings to compare against.
- * This will not be modified by the validator.
- * @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
- */
- public ValidatorFilterString(Collection 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;
- }
-
-}
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 d62df8e43..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorFolderName.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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
- * @param existingNameList a collection of existing names to compare against.
- * This will not be modified by the validator.
- */
- public ValidatorFolderName(Collection 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
- * constructor 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;
- }
-
-
-}
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 deec46ec3..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorLocalPath.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.io.File;
-import java.util.Collection;
-
-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(Collection 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;
- }
-
-}
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 69eff5bcf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorPathName.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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.
- * @param existingNameList a collection of existing names to compare against.
- * This will not be modified by the validator.
- */
- public ValidatorPathName(Collection existingNameList)
- {
- super(existingNameList, CASE_INSENSITIVE); // case insensitive uniqueness
- init();
- }
- /**
- * Use this constructor when the name must be unique. Give the
- * constructor 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$
- }
-}
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 8de515031..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorProfileName.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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;
-
- /**
- * The collection of existing names can be null if this is not a rename operation.
- * @param existingNameList the collection of names to compare against.
- * This will not be modified by the validator.
- */
- public ValidatorProfileName(Collection 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;
- }
-
-}
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 9b9a53f0e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorServerPortInput.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-
-import org.eclipse.rse.core.subsystems.RemoteServerLauncherConstants;
-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 == RemoteServerLauncherConstants.DEFAULT_DAEMON_PORT)
- {
- currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING);
- currentMessage.makeSubstitution("4075", "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 == RemoteServerLauncherConstants.DEFAULT_DAEMON_PORT)
- {
- currentMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_PORT_WARNING);
- currentMessage.makeSubstitution("4075", "RSE daemon"); //$NON-NLS-1$ //$NON-NLS-2$
- msg = currentMessage.getLevelOneText();
- }
- }
- return msg;
- }
-
-}
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 3af44fd05..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorSystemName.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.ui.validators;
-import java.util.Collection;
-
-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.
- * @param existingNameList a collection of existing names to compare against.
- * This collection will not be modified by the validator.
- */
- public ValidatorSystemName(Collection 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;
- }
-
-}
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 b52162686..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUniqueString.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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:
- * David Dykstal (IBM) - generalized Vector argumnents to Collections
- * Kevin Doyle (IBM) - 174776: perform required sorting of Collection arguments
- * David Dykstal (IBM) - 174776: disallowed sorting of input arguments, used copies
- *******************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-import java.util.Arrays;
-import java.util.Collection;
-
-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 implemented 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 = '\"';
- private static final String[] EMPTY_LIST = new String[0];
-
- protected ISystemValidator syntaxValidator;
- protected boolean caseSensitive;
- protected boolean useUpperCase;
- protected String existingList[];
- protected SystemMessage msg_Empty;
- protected SystemMessage msg_NonUnique;
- protected SystemMessage currentMessage;
-
- /**
- * @param existingList a collection 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(Collection 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 collection and another validator to use for the syntax checking.
- * @param existingList A collection 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(Collection 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 collection of existing names.
- * The collection will not be modified by the validator.
- */
- public void setExistingNamesList(Collection newList)
- {
- if (newList == null)
- existingList = null;
- else
- {
- existingList = new String[newList.size()];
- newList.toArray(existingList);
- init(existingList, caseSensitive);
- }
- }
- /**
- * 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 names[], boolean caseSensitive) {
- if (names == null) {
- existingList = EMPTY_LIST;
- } else {
- existingList = new String[names.length];
- System.arraycopy(names, 0, existingList, 0, names.length);
- // TODO (dwd 20070530) this should be using ICU4J to fold case.
- if (!caseSensitive) { // speed up comparison by converting to all lowercase
- for (int idx = 0; idx < existingList.length; idx++) {
- String string = existingList[idx];
- boolean quoted = (string.indexOf(QUOTE) != -1);
- if (!quoted) {
- existingList[idx] = string.toLowerCase();
- } else {
- existingList[idx] = quotedToLowerCase(string);
- }
- }
- }
- Arrays.sort(existingList); // Arrays is a utility class in java.util. New in JDK 1.2
- }
- }
-
- /**
- * 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;
- }
-}
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/view/AbstractSystemRemoteAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java
deleted file mode 100644
index ed28f957d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemRemoteAdapterFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2003, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-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 4fc39d13b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java
+++ /dev/null
@@ -1,2344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Uwe Stieber (Wind River) - Allow to extend action filter by dynamic system type providers.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [189163] Update IActionFilter constants from subsystemFactory to subsystemConfiguration
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [208803] add exists() method
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * Martin Oberhuber (Wind River) - [234215] improve API documentation for doDelete and doDeleteBatch
- * David McKnight (IBM) - [239368] Expand to action ignores the filter string
- * David McKnight (IBM) - [243263] NPE on expanding a filter - null pointer checks
- *******************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.IRSESystemType;
-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.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-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.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.ISystemMementoConstants;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.internal.ui.view.SystemViewResources;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.model.ISystemPromptableObject;
-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.subsystems.ISubSystemConfigurationAdapter;
-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.IActionFilter;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-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.PropertyDescriptor;
-
-
-/**
- * Base class for adapters needed for the SystemView viewer.
- * It implements the ISystemViewElementAdapter interface.
- * @see AbstractSystemRemoteAdapterFactory
- */
-public abstract class AbstractSystemViewAdapter implements ISystemViewElementAdapter, IWorkbenchAdapter,
- IDeferredWorkbenchAdapter
-{
- // Static action filter per system type cache. Filled from testAttribute.
- private final static Map ACTION_FILTER_CACHE = new HashMap();
-
- // Internal helper class to cache system type -> no action filter relation ships.
- // Used from testAttribute.
- private final static class NULL_ACTION_FILTER implements IActionFilter {
- public boolean testAttribute(Object target, String name, String value) {
- return false;
- }
- }
-
- //protected boolean isEditable = false;
-
- private String filterString = null;
-
- /**
- * Current viewer. Set by content provider.
- *
- * @deprecated use {@link #getViewer()} and {@link #setViewer(Viewer)}
- */
- protected Viewer viewer = null;
-
- /**
- * Current input provider. Set by content provider.
- */
- protected Object propertySourceInput = null;
-
- /**
- * Current shell, set by the content provider.
- *
- * @deprecated Use {@link #getShell()} and {@link #setShell(Shell)}
- */
- 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;
-
- /**
- * An empty object list instance, for returning an empty list from
- * getChildren: new Object[0].
- *
- * @deprecated Do not use directly. Use {@link #checkForEmptyList(Object[],
- * Object, boolean)} when needed.
- */
- protected Object[] emptyList = new Object[0];
-
- /**
- * For returning a message object from getChildren. Will be an array with
- * one item, one of nullObject, cancelledObject or errorObject.
- *
- * @deprecated Do not use directly. Use {@link #getCancelledMessageObject()}
- * or {@link #getFailedMessageObject()} or {@link
- * #checkForEmptyList(Object[], Object, boolean)} when needed.
- */
- protected Object[] msgList = new Object[1];
-
- /**
- * Frequently returned message object from getChildren: "empty list"
- *
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)}
- * instead.
- */
- protected SystemMessageObject nullObject = null;
-
- /**
- * Frequently returned message object from getChildren: "operation
- * cancelled".
- *
- * This field was renamed from "canceledObject" in RSE 3.0.
- *
- * @since org.eclipse.rse.ui 3.0
- * @deprecated Use {@link #getCancelledMessageObject()} instead.
- */
- protected SystemMessageObject cancelledObject = null;
-
- /**
- * Frequently returned message object from getChildren: "operation ended in
- * error"
- *
- * @deprecated Use {@link #getFailedMessageObject()} instead.
- */
- protected SystemMessageObject errorObject = null;
-
- /**
- * Message substitution prefix: "&"
- *
- * @deprecated use Eclipse NLS or Java Messageformat for String
- * substitution.
- */
- protected static final String MSG_SUB_PREFIX = "&"; //$NON-NLS-1$
-
- /**
- * Message substitution variable 1: "&1"
- *
- * @deprecated use Eclipse NLS or Java Messageformat for String
- * substitution.
- */
- protected static final String MSG_SUB1 = MSG_SUB_PREFIX+"1"; //$NON-NLS-1$
-
- /**
- * Message substitution variable 2: "&2"
- *
- * @deprecated use Eclipse NLS or Java Messageformat for String
- * substitution.
- */
- 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;
-
- private Preferences fPrefStore = null;
-
- /**
- * Static constructor.
- */
- static {
- ACTION_FILTER_CACHE.clear();
- }
-
- // ------------------------------------------------------------------
- // Configuration methods, called by the label and content provider...
- // ------------------------------------------------------------------
-
- /**
- * Set the viewer that is driving this adapter Called by label and content
- * provider.
- * <p>
- * <i>Configuration method. Typically called by content provider, viewer or
- * action. Do not override.</i>
- */
- public final void setViewer(Viewer viewer)
- {
- this.viewer = viewer;
- }
-
- /**
- * Set the shell to be used by any method that requires it.
- * <p>
- * <i>Configuration method. Typically called by content provider, viewer or
- * action. Do not override.</i>
- */
- public final void setShell(Shell shell)
- {
- this.shell = shell;
- }
-
- /**
- * 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.
- * <p>
- * <i>Configuration method. Typically called by content provider, viewer or
- * action. Do not override.</i>
- */
- public final void setInput(ISystemViewInputProvider input)
- {
- this.input = input;
- }
-
- // ------------------------------------------------------------------
- // Getter methods, for use by subclasses and actions...
- // ------------------------------------------------------------------
-
- /**
- * Get the shell currently hosting the objects in this adapter.
- * <p>
- * <i>Getter method. Callable by subclasses. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public Shell getShell()
- {
- if (shell == null || shell.isDisposed() || !shell.isVisible() || !shell.isEnabled())
- {
- // get a new shell
- // FIXME it looks like actions could be contributed into a wrong shell with this.
- 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;
- }
-
- /**
- * Return the current viewer, as set via setViewer or its deduced from the
- * setInput input object if set. May be null so test it.
- * <p>
- * <i>Getter method. Callable by subclasses. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public Viewer getViewer()
- {
- if (viewer == null)
- {
- ISystemViewInputProvider ip = getInput();
- if (ip != null)
- {
- return (Viewer)ip.getViewer();
- }
- else
- {
- IWorkbenchPart currentPart = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage().getActivePart();
- if (currentPart instanceof IRSEViewPart)
- {
- return ((IRSEViewPart)currentPart).getRSEViewer();
- }
- }
-
- }
- return viewer;
- }
-
- /**
- * Return the current viewer as an ISystemTree if it is one, or null
- * otherwise.
- * <p>
- * <i>Getter method. Callable by subclasses. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected ISystemTree getCurrentTreeView()
- {
- Viewer v = getViewer();
- if (v instanceof ISystemTree)
- return (ISystemTree)v;
- else
- return null;
- }
-
- /**
- * Get the input object used to populate the viewer with the roots. May be
- * used by an adapter to retrieve context-sensitive information.
- * <p>
- * <i>Getter method. Callable by subclasses. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public ISystemViewInputProvider getInput()
- {
- return input;
- }
-
- /**
- * Returns the subsystem that contains this object. By default, if the given
- * element is an instance of {@link
- * org.eclipse.rse.core.subsystems.AbstractResource AbstractResource}, it
- * calls getSubSystem on it, else returns null.
- * <p>
- * <i><b>Overridable</b> by subclasses. You should override if not using
- * AbstractResource.</i> <br>
- */
- public ISubSystem getSubSystem(Object element)
- {
- if (element instanceof AbstractResource)
- return ((AbstractResource)element).getSubSystem();
- else if (element instanceof IContextObject)
- return ((IContextObject)element).getSubSystem();
- else
- return null;
- }
-
- /**
- * 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.
- * <p>
- * <i>Called by SystemView viewer. No need to override or call.</i><br>
- *
- * @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);
- }
- }
-
- }
-
- /**
- * Add or remove custom actions dynamically to a context menu.
- *
- * This method is called by the system viewers. Extenders may
- * override this method in order to modify the context menu
- * shown for elements of the type they adapt to.
- * 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)
- {
- // empty by default, extenders may override.
- // these extensions are independent of subsystem factories and are contributed via extension point
- }
-
- /**
- * 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 predefined 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);
-
- /**
- * {@inheritDoc} <i><b>Abstract</b>. Must be overridden by subclasses.</i>
- * <br>
- */
- public abstract ImageDescriptor getImageDescriptor(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);
- }
-
- /**
- * {@inheritDoc} 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but rarely needs to be.</i> <br>
- *
- * @see #getText(Object)
- * @see #getAbsoluteName(Object)
- */
- public String getName(Object element)
- {
- return getText(element);
- }
-
- /**
- * {inheritDoc} We map to <samp>getText(element)</samp>.
- * <p>
- * <i>Internal use. Can be safely ignored.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public String getLabel(Object element)
- {
- if (element instanceof IContextObject)
- {
- element = ((IContextObject)element).getModelObject();
- }
- return getText(element);
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * <i><b>Abstract</b>. Must be overridden by subclasses.</i> <br>
- */
- public abstract String getType(Object element);
-
- /**
- * {@inheritDoc} The default is:
- * <pre>
- * getType(): getName()
- * </pre>
- * <p>
- * <i><b>Overridable</b> by subclasses, but rarely needs to be.</i> <br>
- */
- public String getStatusLineText(Object element)
- {
- return getType(element) + ": " + getName(element); //$NON-NLS-1$
- }
-
- /**
- * {inheritDoc} By default, this method returns true - override this method
- * to customize the behavior.
- *
- * @param element the element to check
- * @return true if the element exists
- * @since 3.0
- */
- public boolean exists(Object element)
- {
- return true;
- }
-
- /**
- * {@inheritDoc} <i><b>Abstract</b>. Must be overridden by subclasses.</i>
- * <br>
- */
- public abstract Object getParent(Object element);
-
- /**
- * {@inheritDoc} <i><b>Abstract</b>. Must be overridden by subclasses.</i>
- * <br>
- *
- * @param element the element to check
- * @return <code>true</code> if this element can have children.
- */
- public abstract boolean hasChildren(IAdaptable element);
-
- /**
- * {@inheritDoc} Override this to provide context-specific support.
- *
- * @param element the context object
- * @return whether the context has children
- */
- public boolean hasChildren(IContextObject element)
- {
- return hasChildren(element.getModelObject());
- }
-
- /**
- * {@inheritDoc} Rather than overriding this, adapter implementors should
- * override the getChildren() methods that take a progress monitor.
- */
- public final Object[] getChildren(Object object)
- {
- return getChildren((IAdaptable)object, new NullProgressMonitor());
- }
-
- /**
- * {@inheritDoc} 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.
- *
- * @param element the model object to get children from
- * @param monitor the progress monitor
- * @return the children of element
- */
- public abstract Object[] getChildren(IAdaptable element, IProgressMonitor monitor);
-
- /**
- * {@inheritDoc} This should be overridden by subclasses in order to provide
- * deferred query support via the Eclipse Jobs mechanism, if your adapter
- * supports context objects. If not, this will fall back to the model object
- * version of the method.
- *
- * The context object is passed in in place of the model object. By default,
- * we just fall back to the original mechanism Return the children of this
- * object. Return null if children not supported.
- *
- * @param element the context object that wrappers a model object, it's
- * subsystem and filter reference
- * @param monitor the progress monitor
- * @return the children of the model object within the context object that
- * matches the containing filter reference criteria.
- */
- public Object[] getChildren(IContextObject element, IProgressMonitor monitor)
- {
- return getChildren(element.getModelObject(), monitor);
- }
-
- /**
- * 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but rarely needs to be.</i> <br>
- */
- public Object[] getChildrenUsingExpandToFilter(Object element, String expandToFilter)
- {
- return getChildren(element);
- }
-
- /**
- * Return the default descriptors for all system elements. <i>Callable by
- * subclasses.</i><br>
- */
- 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(ISystemPropertyConstants.P_TYPE, SystemPropertyResources.RESID_PROPERTY_TYPE_LABEL, SystemPropertyResources.RESID_PROPERTY_TYPE_TOOLTIP);
- // resource name
- propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(IBasicPropertyConstants.P_TEXT, SystemPropertyResources.RESID_PROPERTY_NAME_LABEL, SystemPropertyResources.RESID_PROPERTY_NAME_TOOLTIP);
- // number of children in tree currently
- propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_NBRCHILDREN, SystemViewResources.RESID_PROPERTY_NBRCHILDREN_LABEL, SystemViewResources.RESID_PROPERTY_NBRCHILDREN_TOOLTIP);
-
- }
- //System.out.println("In getDefaultDescriptors() in AbstractSystemViewAdapter");
- return propertyDescriptorArray;
- }
-
- /**
- * Create and return a simple string read-only property descriptor.
- * <i>Callable by subclasses.</i><br>
- *
- * @param propertyKey Key for this property, sent back in getPropertyValue.
- * @param label A user-readable translated label for the Property.
- * @param description A description for the Property (to be displayed as a
- * tooltip).
- */
- protected static PropertyDescriptor createSimplePropertyDescriptor(String propertyKey, String label, String description)
- {
- PropertyDescriptor pd = new PropertyDescriptor(propertyKey, label);
- pd.setDescription(description);
- return pd;
- }
-
- /**
- * Returns a value for this object that can be edited in a property sheet.
- * <i>Needed by framework for property sheet. No need to call or
- * override.</i><br>
- *
- * @return a value that can be edited.
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public Object getEditableValue()
- {
- return this;
- }
-
- /**
- * 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().
- * <p>
- * <i>Implemented. Do not override typically. See {@link
- * #internalGetPropertyDescriptors()}.</i> <br>
- *
- * @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;
- }
- }
-
- /**
- * 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 read-only 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();
-
- /**
- * 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. This is called by the table views like
- * {@link org.eclipse.rse.ui.view.SystemTableView}.
- * </p>
- * <i>Callable by subclasses. Do not override.</i><br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- 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;
- }
-
- /**
- * 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i> <br>
- *
- * @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);
- }
-
- /**
- * 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.
- * <p>
- * <i>Implemented. Do not override typically. See {@link
- * #internalGetPropertyValue(Object)}.</i> <br>
- *
- * @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(IBasicPropertyConstants.P_TEXT))
- //return getText(propertySourceInput);
- return getName(propertySourceInput);
- else if (name.equals(ISystemPropertyConstants.P_TYPE))
- return getType(propertySourceInput);
- else if (name.equals(ISystemPropertyConstants.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);
- }
-
- /**
- * 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
- * @deprecated this should be done in the SystemView only
- */
- 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;
- }
-
- /** @deprecated this should be done in the SystemView only */
- 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;
- }
-
- /** @deprecated this should be done in the SystemView only */
- 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;
- }
-
- /** @deprecated this should be done in the SystemView only */
- private Item[] getChildren(Widget o)
- {
- if (o instanceof TreeItem)
- return ((TreeItem) o).getItems();
- if (o instanceof Tree)
- return ((Tree) o).getItems();
- return null;
- }
-
- /**
- * Returns whether the property value has changed from the default. Only
- * applicable for editable properties.
- * <p>
- * <i><b>Overridable</b> by subclasses. Must be overridden only if editable
- * properties are supported.</i><br>
- * <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;
- }
-
- /**
- * Resets the specified property's value to its default value. Called on
- * editable property when user presses reset button in property sheet
- * viewer.
- * <p>
- * <i><b>Overridable</b> by subclasses. Must be overridden only if editable
- * properties are supported.</i><br>
- * DOES NOTHING BY DEFAULT.
- *
- * @param key the key identifying property to reset
- */
- public void resetPropertyValue(Object key)
- {
- }
-
- /**
- * Sets the named property to the given value. Called after an editable
- * property is changed by the user.
- * <p>
- * <i><b>Overridable</b> by subclasses. Must be overridden only if editable
- * properties are supported.</i><br>
- * 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)
- {
- }
-
- /**
- * Set input object for property source queries. This <b>must</b> be called
- * by your XXXAdaptorFactory before returning this adapter object.
- * <p>
- * <i>Called from adapter factories. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public void setPropertySourceInput(Object propertySourceInput)
- {
- this.propertySourceInput = 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i> <br>
- */
- public boolean handleDoubleClick(Object element)
- {
- return false;
- }
-
- // ------------------------------------------
- // 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * By default, returns true.
- *
- * @see #canDelete(Object)
- */
- public boolean showDelete(Object element)
- {
- return true;
- }
-
- /**
- * Return true if this object is deletable by the user. If so, when
- * selected, the Edit->Delete menu item will be enabled.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * By default, returns false. Override if your object is deletable.
- *
- * @see #showDelete(Object)
- */
- public boolean canDelete(Object element)
- {
- return false;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * 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
- * message. Throw an exception if it failed and you want to use the generic
- * message. In case of cancellation, either return <code>false</code> or
- * throw a {@link SystemOperationCancelledException}.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is.</i> <br>
- *
- * @see #showDelete(Object)
- * @see #canDelete(Object)
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception
- {
- return false;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * 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 operation failed and a message was issued. Throw an exception
- * if ANY failed and you want to use the generic message.
- * <p>
- * In case of cancellation, either return <code>false</code> or throw a
- * {@link SystemOperationCancelledException}.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is.</i> <br>
- */
- 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;
- }
-
- // ------------------------------------------
- // 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * 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, IProgressMonitor)
- */
- public boolean showRename(Object element)
- {
- return true;
- }
-
- /**
- * Return true if this object is renameable by the user. If so, when
- * selected, the Rename popup menu item will be enabled.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * By default, returns false. Override if your object can be renamed.
- *
- * @return true if this object is renameable by the user
- * @see #showRename(Object)
- * @see #doRename(Shell,Object,String,IProgressMonitor)
- * @see #getNameValidator(Object)
- * @see #getCanonicalNewName(Object,String)
- * @see #namesAreEqual(Object,String)
- */
- public boolean canRename(Object element)
- {
- return false;
- }
-
- /**
- * Perform the rename action. By default does nothing.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Override if your object can be renamed. Return true if this was
- * successful. Return false if it failed and you issued a message. Throw an
- * exception if it failed and you want to use the generic message.
- *
- * @return true if the rename was successful
- * @see #showRename(Object)
- * @see #canRename(Object)
- * @since 3.0
- */
- public boolean doRename(Shell shell, Object element, String name, IProgressMonitor monitor) throws Exception
- {
- //org.eclipse.rse.core.ui.SystemMessage.displayErrorMessage("INSIDE DORENAME");
- return false;
- }
-
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, and usually is if canRename is.</i>
- * <br>
- * 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;
- }
-
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, and usually is if canRename is.</i>
- * <br>
- * 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;
- }
-
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * 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...
- // ------------------------------------------
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Default is true.
- */
- public boolean showRefresh(Object element)
- {
- return true;
- }
-
- // ----------------------------------------------
- // METHODS TO SUPPORT COMMON PROPERTIES ACTION...
- // ----------------------------------------------
- /**
- * Return true if we should show the properties action in the popup for the
- * given element. Note the actual work to show the properties dialog is
- * handled for you.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is.</i><br>
- * Default is true.
- */
- public boolean showProperties(Object element)
- {
- return true;
- }
-
- // ------------------------------------------------------------
- // METHODS TO SUPPORT COMMON OPEN-IN-NEW-PERSPECTIVE ACTIONS...
- // ------------------------------------------------------------
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, and usually is NOT.</i><br>
- * Only applicable for non-remote resources. Remote always show <b>Go To</b>
- * only.
- */
- public boolean showOpenViewActions(Object element)
- {
- if (element instanceof IAdaptable)
- return hasChildren((IAdaptable)element);
- return false;
- }
-
- /**
- * Return true if we should show the generic show in table action in the
- * popup for the given element.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is NOT.</i> <br>
- */
- public boolean showGenericShowInTableAction(Object element)
- {
- return true;
- }
-
- // ------------------------------------------
- // METHODS TO SUPPORT COMMON DRAG AND DROP FUNCTION...
- // ------------------------------------------
- /**
- * Return true if this object can be copied to another location.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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;
- }
-
- /**
- * Return true if this object can be copied to another location.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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;
- }
-
- /**
- * Perform the drag on the given object.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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;
- }
-
- /**
- * Return true if another object can be copied into this object.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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;
- }
-
- /**
- * Perform the drag on the given objects.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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;
- }
-
- /**
- * Perform drop from the "fromSet" of objects to the "to" object.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i> <br>
- *
- * @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;
- }
-
- /**
- * Perform drop from the "from" object to the "to" object.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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 compatibility
- return doDrop(from, to, sameSystemType, sameSystem, monitor);
- }
-
- /**
- * Perform drop from the "from" object to the "to" object.
- * <p>
- * <i><b>Overridable</b> by subclasses, and is only if drag and drop
- * supported.</i><br>
- * 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;
- }
-
- /**
- * Return true if it is valid for the src object to be dropped in the
- * target.
- * <p>
- * <i><b>Overridable</b> by subclasses, and usually is only if drag and drop
- * supported.</i><br>
- * 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...
- // ------------------------------------------------------------
- /**
- * Return what to save to disk to identify this element in the persisted
- * list of expanded elements.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * 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);
- }
-
- /**
- * Return what to save to disk to identify this element when it is the input
- * object to a secondary Remote System Explorer perspective.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Defaults to getMementoHandle(element).
- */
- public String getInputMementoHandle(Object element)
- {
- return getMementoHandle(element);
- }
-
- /**
- * Return a short string to uniquely identify the type of resource. Eg
- * "conn" for connection.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * 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);
- }
-
- /**
- * Sometimes 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>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i> <br>
- */
- public boolean saveExpansionState(Object element)
- {
- return true;
- }
-
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Default is false unless element implements ISystemPromptable object.
- * Override as appropriate.
- */
- public boolean isPromptable(Object element)
- {
- return (element instanceof ISystemPromptableObject);
- }
-
- /**
- * Return true if this object is remote. In this case, the default is true.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i> <br>
- */
- public boolean isRemote(Object element)
- {
- return true;
- }
-
- /**
- * 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.
- * <p>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i> <br>
- *
- * @param element - first selected object
- */
- public void selectionChanged(Object element) // d40615
- {
- }
-
- /**
- * 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="subsystemConfigurationId". 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="subsystemConfigurationCategory". 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>
- * <i><b>Overridable</b> by subclasses, typically if additional properties are supported.</i><br>
- * 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((IAdaptable)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().getName();
- 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().getName().equals(values[idx]))
- return true;
- }
- return false;
- }
- else if (name.equalsIgnoreCase("systemTypeId")) //$NON-NLS-1$
- {
- ISubSystem ss = getSubSystem(target);
- String[] values = tokenize(value);
- if (ss == null)
- {
- if (!(target instanceof IHost))
- return false;
- String connSysTypeId = ((IHost)target).getSystemType().getId();
- for (int idx=0; idx<values.length; idx++)
- {
- if (connSysTypeId.equals(values[idx]))
- return true;
- }
- return false;
- }
- for (int idx=0; idx<values.length; idx++)
- {
- if (ss.getHost().getSystemType().getId().equals(values[idx]))
- return true;
- }
- return false;
- }
- else if (name.equalsIgnoreCase("subsystemConfigurationId")) //$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("subsystemConfigurationCategory")) //$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;
- }
- else if (name.equalsIgnoreCase("isRemote")) //$NON-NLS-1$
- {
- return isRemote(target) ? value.equals("true") : value.equals("false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Give the ISV's as the element owners/contributors the chance to extend the standard RSE action
- // filters for their specific needs. We do this by trying to determine the system type from the
- // target object and try to adapt the system type to an IActionFilter.
- //
- // Note: Everything we do here is performance critical to the menu to show up. Therefore
- // we cache as much as possible here. The cache is static to all AbstractSystemViewAdapter
- // instances throughout the whole hierarchy.
- IHost conn = null;
- if (target instanceof IHost) {
- conn = (IHost)target;
- } else if (target instanceof ISubSystem) {
- conn = ((ISubSystem)target).getHost();
- } else if (target instanceof ISystemFilterPoolReference) {
- ISystemFilterPoolReference modelObject = (ISystemFilterPoolReference)target;
- if (modelObject.getProvider() != null) conn = ((ISubSystem)modelObject.getProvider()).getHost();
- } else if (target instanceof ISystemFilterReference) {
- ISystemFilterReference modelObject = (ISystemFilterReference)target;
- if (modelObject.getProvider() != null) conn = ((ISubSystem)modelObject.getProvider()).getHost();
- } else if (target instanceof ISystemFilterStringReference) {
- ISystemFilterStringReference modelObject = (ISystemFilterStringReference)target;
- if (modelObject.getProvider() != null) conn = ((ISubSystem)modelObject.getProvider()).getHost();
- }
-
- if (conn != null) {
- IRSESystemType systemType = conn.getSystemType();
- if (systemType != null) {
- IActionFilter actionFilter = (IActionFilter)ACTION_FILTER_CACHE.get(systemType);
- if (actionFilter == null) {
- Object adapter = systemType.getAdapter(IActionFilter.class);
- if (adapter instanceof IActionFilter && !adapter.equals(this)) {
- // put the association in the cache
- ACTION_FILTER_CACHE.put(systemType, adapter);
- actionFilter = (IActionFilter)adapter;
- } else if (!(adapter instanceof IActionFilter)) {
- // put the association in the cache
- ACTION_FILTER_CACHE.put(systemType, new NULL_ACTION_FILTER());
- }
- }
- if (actionFilter instanceof NULL_ACTION_FILTER) actionFilter = null;
- if (actionFilter != null) return actionFilter.testAttribute(target, name, value);
- }
- }
-
- 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.
- // --------------------------------------
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * 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.
- }
-
- /**
- * 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>
- * <i><b>Overridable</b> by subclasses, but usually is not.</i><br>
- * Returns null. Override if the remote resource is compilable.
- */
- public String getRemoteSourceType(Object element)
- {
- return null;
- }
-
- /**
- * Return the remote edit wrapper for this object.
- * <p>
- * <i><b>Overridable</b> by subclasses, and must be for editable
- * objects.</i> <br>
- *
- * @param object the object to edit
- * @return the editor wrapper for this object
- */
- public ISystemEditableRemoteObject getEditableRemoteObject(Object object)
- {
- return null;
- }
-
- /**
- * Indicates whether the specified object can be edited or not.
- * <i><b>Overridable</b> by subclasses, and must be for editable
- * objects.</i><br>
- *
- * @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...
- // ------------------
- /**
- * Returns the implementation of ISystemViewElement for the given object.
- * Returns null if the adapter is not defined or the object is not
- * adaptable.
- * <p>
- * <i>Callable by subclasses.</i><br>
- * Just a convenient shortcut to {@link
- * org.eclipse.rse.ui.view.SystemAdapterHelpers#getViewAdapter(Object,
- * Viewer)} <p/> Should we allow clients to override this in order to
- * provide an optimized implementation for their models? But it's being
- * called by subclasses only anyways...
- *
- * @deprecated use SystemAdapterHelpers.getViewAdapter(o, getViewer())
- * instead
- */
- protected ISystemViewElementAdapter getSystemViewElementAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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;
- */
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given object.
- * Returns null if this object does not adaptable to this.
- * <p>
- * <i>Callable by subclasses.</i><br>
- * Just a convenient shortcut to {@link
- * org.eclipse.rse.ui.view.SystemAdapterHelpers#getRemoteAdapter(Object,
- * Viewer)} <p/> Should we allow clients to override this in order to
- * provide an optimized implementation for their models? But it's being
- * called by subclasses only anyways...
- *
- * @deprecated use SystemAdapterHelpers.getRemoteAdapter(o, getViewer())
- * instead
- */
- 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;
- */
- }
-
- /**
- * Substitute all occurrences of a given String with another String.
- *
- * <i>Callable by subclasses.</i> This method does 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.
- *
- * @deprecated Clients should use Eclipse {@link org.eclipse.osgi.util.NLS}
- * or Java {@link java.text.MessageFormat} or
- * {@link java.lang.String#replaceAll(String, String)} to do
- * substring replacement and variable substitution.
- */
- 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();
- }
-
- /**
- * 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.
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected ISystemTree getSystemTree()
- {
- Viewer v = getViewer();
- if ((v != null) && (v instanceof ISystemTree))
- return (ISystemTree)v;
- else
- return null;
- }
-
- /**
- * Return "Yes" translated. <i>Callable by subclasses. Do not override</i>
- * <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- public String getTranslatedYes()
- {
- if (xlatedYes == null)
- xlatedYes = SystemResources.TERM_YES;
- return xlatedYes;
- }
-
- /**
- * Return "No" translated. <i>Callable by subclasses. Do not override.</i>
- * <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected String getTranslatedNo()
- {
- if (xlatedNo == null)
- xlatedNo = SystemResources.TERM_NO;
- return xlatedNo;
- }
-
- /**
- * Return "True" translated. <i>Callable by subclasses. Do not override.</i>
- * <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected String getTranslatedTrue()
- {
- if (xlatedTrue == null)
- xlatedTrue = SystemResources.TERM_TRUE;
- return xlatedTrue;
- }
-
- /**
- * Return "False" translated. <i>Callable by subclasses. Do not
- * override.</i><br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected String getTranslatedFalse()
- {
- if (xlatedFalse == null)
- xlatedFalse = SystemResources.TERM_FALSE;
- return xlatedFalse;
- }
-
- /**
- * Return "Not applicable" translated. <i>Callable by subclasses. Do not
- * override.</i><br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected String getTranslatedNotApplicable()
- {
- if (xlatedNotApplicable == null)
- xlatedNotApplicable = SystemPropertyResources.RESID_TERM_NOTAPPLICABLE;
- return xlatedNotApplicable;
- }
-
- /**
- * Return "Not available" translated. <i>Callable by subclasses. Do not
- * override.</i><br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected String getTranslatedNotAvailable()
- {
- if (xlatedNotAvailable == null)
- xlatedNotAvailable = SystemPropertyResources.RESID_TERM_NOTAVAILABLE;
- return xlatedNotAvailable;
- }
-
- /**
- * Initialize Message Objects. <i>Internal use. Do not call or override.</i>
- *
- * @deprecated Internal use. Do not call this method.
- */
- protected final void initMsgObjects()
- {
- nullObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null);
- cancelledObject = 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 <samp>checkForEmptyList(children, parent,
- * 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.
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- *
- * @param children The list of children.
- * @param parent The parent for the children.
- * @param returnNullMsg <code>true</code> if an "Empty List" message should
- * be returned.
- * @return The list of children, a list with the "Empty List" message object
- * or an empty list.
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) {
- if ((children == null) || (children.length == 0)) {
- if (fPrefStore == null) {
- fPrefStore = RSEUIPlugin.getDefault().getPluginPreferences();
- }
- if (!returnNullMsg
- || (fPrefStore != null && !fPrefStore
- .getBoolean(ISystemPreferencesConstants.SHOW_EMPTY_LISTS))) {
- return emptyList;
- } else {
- return new Object[] {
- new SystemMessageObject(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY,
- parent)};
- }
- }
- return children;
- }
-
- /**
- * 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.
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- *
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)}
- * instead.
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- 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" message as an object array so
- * can be used to answer getChildren().
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- */
- protected final Object[] getCancelledMessageObject()
- {
- if (cancelledObject == null)
- initMsgObjects();
- msgList[0] = cancelledObject;
- return msgList;
- }
-
- /**
- * Return the "Operation failed" message as an object array so can be used
- * to answer getChildren().
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- */
- protected final Object[] getFailedMessageObject()
- {
- if (errorObject == null)
- initMsgObjects();
- msgList[0] = errorObject;
- return msgList;
- }
-
- /**
- * Return the "Empty list" message as an object array so can be used to
- * answer getChildren().
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- *
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)}
- * instead.
- */
- protected final Object[] getEmptyMessageObject()
- {
- if (nullObject == null)
- initMsgObjects();
- msgList[0] = nullObject;
- return msgList;
- }
-
- /**
- * Get the first selected object of the given selection.
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- 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
- * ---------------------------------------------------
- */
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#supportsDeferredQueries(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- public boolean supportsDeferredQueries(ISubSystem subSys)
- {
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
- */
- 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)
- {
- IWorkbenchWindow win = SystemBasePlugin.getActiveWorkbenchWindow();
- IWorkbenchPart currentPart = null;
- if (win != null){
- IWorkbenchPage page = win.getActivePage();
- if (page != null){
- currentPart = page.getActivePart();
- }
- }
- return new SystemFetchOperation(currentPart, o, this, collector);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
- */
- public boolean isContainer()
- {
- return true;
- }
-
- public ISchedulingRule getRule(Object element)
- {
- if (element instanceof IContextObject)
- {
- element = ((IContextObject)element).getModelObject();
- }
- IAdaptable location = (IAdaptable)element;
- return new SystemSchedulingRule(location);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ContextObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ContextObject.java
deleted file mode 100644
index ede02ccf5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ContextObject.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- *******************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-
-/**
- * This class is used by tree views to pass context information from the views to
- * the view providers and model adapters for queries. The context information consists of
- * a model object and it may optionally contain the associated filter reference a subsystem.
- *
- * Context objects are created transiently and are only used to aid in providing filter information
- * during a query.
- *
- */
-public class ContextObject implements IContextObject
-{
- private ISubSystem _subSystem = null;
- private ISystemFilterReference _filterReference = null;
- private Object _modelObject = null;
-
- public ContextObject(Object modelObject, ISubSystem subSystem, ISystemFilterReference filterReference)
- {
- _subSystem = subSystem;
- _filterReference = filterReference;
- _modelObject = modelObject;
- }
-
- public ContextObject(Object modelObject, ISubSystem subSystem)
- {
- _modelObject = modelObject;
- _subSystem = subSystem;
- }
-
- public ContextObject(Object modelObject)
- {
- _modelObject = modelObject;
- }
-
- public ISystemFilterReference getFilterReference()
- {
- return _filterReference;
- }
-
- public ISubSystem getSubSystem()
- {
- return _subSystem;
- }
-
- public IAdaptable getModelObject()
- {
- return (IAdaptable)_modelObject;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IContextObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IContextObject.java
deleted file mode 100644
index 6ee7804d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IContextObject.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.
- *
- * Contributors:
- * David McKnight (IBM) - [187739] [refresh] Sub Directories are collapsed when Parent Directory is Refreshed on Remote Systems
- * David Dykstal (IBM) - [261486][api] add noextend to interfaces that require it
- *******************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-
-/**
- * This class is used by tree views to pass context information from the views
- * to the view providers and model adapters for queries. The context information
- * consists of a model object and it may optionally contain the associated
- * filter reference a subsystem.
- *
- * Context objects are created transiently and are only used to aid in providing
- * filter information during a query.
- *
- * @noimplement This interface is not intended to be implemented by clients
- * (this message added in RSE 3.0.1).
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IContextObject
-{
- /**
- * Gets the associated filter reference for the corresponding model object
- * @return the associated filter reference
- */
- public ISystemFilterReference getFilterReference();
-
- /**
- * Gets the model object for which this context applies
- * @return the model object
- */
- public IAdaptable getModelObject();
-
- /**
- * Gets the associated subsystem for the corresponding model object
- * @return the associated subsystem
- */
- public ISubSystem getSubSystem();
-}
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/ISystemEditableRemoteObject.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemEditableRemoteObject.java
deleted file mode 100644
index e05843158..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, 2007 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) - [186128][refactoring] Move IProgressMonitor last in public base classes
- ********************************************************************************/
-
-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(boolean readOnly, IProgressMonitor monitor);
-
- /**
- * 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 895b7d855..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemLongRunningRequestListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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);
-}
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 160ae4188..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemPropertyConstants.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
- * Martin Oberhuber (Wind River) - [230298][api][breaking] ISystemPropertyConstants should not extend IBasicPropertyConstants
- *******************************************************************************/
-
-package org.eclipse.rse.ui.view;
-/**
- * Constants that are the key values used to identify properties that populate the
- * Property Sheet viewer.
- */
-public interface ISystemPropertyConstants
-{
- public static final String P_PREFIX = "org.eclipse.rse.ui."; //$NON-NLS-1$
- // 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$
- /**
- * @since 3.0
- */
- public static final String P_FILE_EXTENSION = P_PREFIX+"file.extension"; //$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$
-
- /**
- * @since 3.0
- */
- public static final String P_FILE_PERMISSIONS = P_PREFIX+"file.permissions"; //$NON-NLS-1$
- /**
- * @since 3.0
- */
- public static final String P_FILE_OWNER = P_PREFIX+"file.owner"; //$NON-NLS-1$
- /**
- * @since 3.0
- */
- public static final String P_FILE_GROUP = P_PREFIX+"file.group"; //$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$
-}
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 9bf8af3d2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemRemoteElementAdapter.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.ISystemRemoteObjectMatchProvider;
-
-/**
- * This is an interface that only remote system objects supply adapters for.
- * <p>
- * This interface is designed to support integration of remote objects
- * into RSE's subsystems, filters and queries.
- */
-public interface ISystemRemoteElementAdapter extends ISystemRemoteObjectMatchProvider
-{
- /**
- * Return fully qualified name that uniquely identifies this remote object's
- * remote parent within its subsystem.
- * <p>
- * This is used when deleting a remote resource for example, all occurrences of
- * its parent are found and refreshed in the RSE views.
- * </p><p>
- * Note that when using filters, there is no unique parent since the same object
- * may be found in multiple contexts, below multiple filters. Still, returning
- * the parent absolute name here may help finding potentially affected parents
- * more easily.
- * </p>
- * @see #getAbsoluteName(Object)
- *
- * @return a String uniquely identifying the parent of this remote object,
- * if it is known and exists. May also return <code>null</code> if the
- * parent can not be determined or is not unique.
- */
- public String getAbsoluteParentName(Object element);
-
- /**
- * Update a visible remote object with fresh data from a new object.
- * <p>
- * Short answer: treat this like clone(), and just copy any important
- * instance variables. This allows keeping TreeItem references intact
- * but refreshing the data shown, such that selections and expand state
- * in the tree remain intact.
- * </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><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><p>
- * This is called by viewers like SystemView in response to rename and property change events.
- * </p><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.
- * <p>
- * For instance, given a file, return the folder it is contained in.
- * Not all subsystems support a unique parent-child relationship.
- * Therefore, it is acceptable to return <code>null</code>.
- * </p>
- * @param element The element for which to get the parent
- * @param monitor Optional progress monitor for long-running operation.
- * May be <code>null</code>.
- * @see #getAbsoluteParentName(Object)
- *
- * @return the parent element, or <code>null</code> if not applicable.
- */
- public Object getRemoteParent(Object element, IProgressMonitor monitor) throws Exception;
-
- /**
- * Given a remote object, return the unqualified names of the objects
- * <i>contained</i> in that parent.
- * <p>
- * 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.
- * </p>
- * @param element The element for which to get names in use
- * @param monitor Optional progress monitor for long-running operation.
- * May be <code>null</code>.
- * @return a list of unqualified names contained in this folder to check
- * for uniqueness, or <code>null</code> if not applicable or
- * no such names were found.
- */
- public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception;
-
-}
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/ISystemResourceSelectionInputProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java
deleted file mode 100644
index cc8f106d6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemResourceSelectionInputProvider.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-
-/**
- * Public interface for the system resource selection input provider that is
- * used in the SystemRemoteResourceDialog and the SystemResourceSelectionForm
- *
- * @since 3.0
- */
-public interface ISystemResourceSelectionInputProvider
- extends ISystemViewInputProvider
-{
- /**
- * Gets the associated system connection
- * @return the system connection
- */
- public IHost getSystemConnection();
-
- /**
- * Indicates whether the input provider should allow new connections
- * to be created.
- * @param flag whether new connections should be allowed
- */
- public void setAllowNewConnection(boolean flag);
-
- /**
- * Returns whether multiple connections can be displayed via the
- * input provider
- * @return true if multiple connections are allowed
- */
- public boolean allowMultipleConnections();
-
- /**
- * Returns whether new connections can be created from the view
- * using this input provider.
- * @return true if new connections are allowed.
- */
- public boolean allowNewConnection();
-
- /**
- * Returns the category for the view using the input provider (i.e. "files")
- * @return the category
- */
- public String getCategory();
-
- /**
- * Sets the system types allowed for this input provider
- * @param types the types of systems
- */
- public void setSystemTypes(IRSESystemType[] types);
-
- /**
- * Gets the system types allowed for the associated control
- * @return the system types
- */
- public IRSESystemType[] getSystemTypes();
-
- /**
- * Sets the associated system connection for the input provider
- * @param connection the connection
- * @param onlyConnection whether other connections are allowed
- */
- public void setSystemConnection(IHost connection, boolean onlyConnection);
-}
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/ISystemSelectRemoteObjectAPIProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java
deleted file mode 100644
index 744b160f4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemSelectRemoteObjectAPIProvider.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-
-/**
- * @since 3.0
- */
-public interface ISystemSelectRemoteObjectAPIProvider
- extends ISystemViewInputProvider
-{
- /**
- * 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);
-
- /**
- * Get the name of the item to select when the first filter is expanded.
- * Called by the filter adapter.
- */
- public String getPreSelectFilterChild();
-
- /**
- * 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();
-
- /**
- * 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);
-
- /**
- * 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);
-
- /**
- * Set child of the first filter to preselect
- */
- public void setPreSelectFilterChild(String name);
-
- /**
- * 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.core.filters.SystemFilterSimple
- */
- public void setQuickFilters(ISystemFilter[] filters);
-
-
- /**
- * Specify whether the user should see the "New Connection..." special connection prompt
- */
- public void setShowNewConnectionPrompt(boolean show);
-
-
- /**
- * 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);
-
-
- /**
- * Specify system types to restrict what types of connections
- * the user can create, and see.
- * This will override subsystemConfigurationId,if that has been set!
- *
- * @param systemTypes An array of system types, or
- * <code>null</code> to allow all registered valid system types.
- * A system type is valid if at least one subsystem configuration
- * is registered against it.
- */
- public void setSystemTypes(IRSESystemType[] systemTypes);
-}
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/ISystemTableViewColumnManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java
deleted file mode 100644
index acf9b0db9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTableViewColumnManager.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight.
- *
- * Contributors:
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * @since 3.0
- */
-public interface ISystemTableViewColumnManager {
-
- public IPropertyDescriptor[] getVisibleDescriptors(ISystemViewElementAdapter adapter);
-
- public void setCustomDescriptors(ISystemViewElementAdapter adapter, IPropertyDescriptor[] descriptors);
-}
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 560a29dea..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemTree.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David McKnight (IBM) - [187711] Select SystemView APIs exposed by the ISystemTree interface
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * 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();
-
- /**
- * 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
- * @since 3.0
- */
- public Item findFirstRemoteItemReference(Object remoteObject, Item parentItem);
-
- /**
- * 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.
- * @since 3.0
- */
- public ISystemFilterReference revealAndExpand(ISubSystem parentSubSystem, ISystemFilter filter);
-
- /**
- * Return the Tree widget
- * @return tree widget
- * @since 3.0
- */
- public Tree getTree();
-
- /**
- * Create tree items for the specified children
- *
- * @param widget the parent item for the items to create
- * @param children the children to create items for
- * @since 3.0
- */
- public void createTreeItems(TreeItem widget, Object[] children);
-
- /**
- * 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 List to populate with hits, or <code>null</code> to
- * get a new List created and returned with the hits.
- * @return the List populated with hits, or <code>null</code> if <code>null</code>
- * was passed in as the List to populate and no hits were found.
- * @since 3.0
- */
- public List findAllRemoteItemReferences(Object element, Object elementObject, List matches);
-
- /**
- * Sets the auto expand level for the corresponding tree
- * @param level the level to expand
- * @since 3.0
- */
- public void setAutoExpandLevel(int level);
-
- /**
- * Adds a double-click listener
- * @param listener the listener to add
- * @since 3.0
- */
- public void addDoubleClickListener(IDoubleClickListener listener);
-
- /**
- * Checks whether the element is expandable or not
- * @param elementOrTreePath the object to expand
- * @return whether the item is expandable
- * @since 3.0
- */
- public boolean isExpandable(Object elementOrTreePath);
-
- /**
- * Expands the parent object down to the remote object
- * @param parentObject the parent object
- * @param remoteObject the child object
- * @since 3.0
- */
- public void expandTo(Object parentObject, Object remoteObject);
-
- /**
- * Expand to the object specified by the filter string
- * @param filterString the string represending the object to expand to
- * @since 3.0
- */
- public void expandTo(String filterString);
-
- /**
- * Adds a view filter
- * @param filter the view filter
- * @since 3.0
- */
- public void addFilter(ViewerFilter filter);
-
-
- /**
- * Adds a selection changed listener
- * @param listener the listener
- * @since 3.0
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener);
-
-}
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 a11ee2862..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/ISystemViewElementAdapter.java
+++ /dev/null
@@ -1,482 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [208803] add exists() method
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David Dykstal (IBM) - [234215] improve API documentation for doDelete and doDeleteBatch
- *******************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.List;
-
-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.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-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.IActionFilter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-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.internal.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, IActionFilter
-{
- 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.
- *
- * @param element The element to be identified. May be of type
- * {@link IContextObject} (including the context of the element),
- * {@link String} (giving the absolute path of a remote object),
- * or the actual remote data element itself.
- */
- 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. Implements {@link IWorkbenchAdapter#getImageDescriptor(Object)
- * }.
- *
- * @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);
-
-
- /**
- * Returns whether the specified element is represented as existing. Note that
- * it's possible that the represented element will been seen to exist when on
- * a remote host it may not - that is because this call does not query the host.
- *
- * @param element the element to check
- * @return true if the element exists
- * @since 3.0
- */
- public boolean exists(Object element);
-
- /**
- * 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 you can return a parent, why not, go
- * for it.
- */
- public Object getParent(Object element);
-
-
-
- /**
- * Return the children of this model object.
- *
- * When {@link #supportsDeferredQueries(ISubSystem)} returns false,
- * this query will be called in the dispatch thread, so the implementation
- * needs to make sure that SWT thread exceptions are avoided.
- *
- * @param element the model object to query
- * @param monitor the progress monitor
- * @return the children of element
- */
- public Object[] getChildren(IAdaptable element, IProgressMonitor monitor);
-
- /**
- * Return the children of this object.
- *
- * When a contextObject is passed in instead of an adaptable model
- * object, the adapter needs handle both the model object as well
- * as the associated filter.
- *
- * When {@link #supportsDeferredQueries(ISubSystem)} returns false,
- * this query will be called in the dispatch thread, so the implementation
- * needs to make sure that SWT thread exceptions are avoided.
- *
- * @param contextObject a wrapper object that contains the model object plus context information
- * @param monitor the progress monitor
- * @return the children of the model object in contextObject that matches the filter in contextObject
- */
- public Object[] getChildren(IContextObject contextObject, IProgressMonitor monitor);
-
- /**
- * 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.
- * <p>
- * In case this adapter returns true for {@link #supportsDeferredQueries(ISubSystem)},
- * it is expected that the underlying subsystem caches the hasChildren() attribute
- * such that it does not necessarily perform a server round trip. In this case, it
- * has more the semantics of "can have children". In that case,
- * a deferred {@link #getChildren(IAdaptable, IProgressMonitor)}
- * call is still allowed to return an empty array indicating no children.
- * </p>
- * @param element the element to check
- * @return <code>true</code> if this element can have children.
- */
- public boolean hasChildren(IAdaptable element);
-
- /**
- * Return true if this object has children.
- * @see #hasChildren(IAdaptable)
- * @param element the element to check
- * @return <code>true</code> if this element can have children.
- */
- public boolean hasChildren(IContextObject 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);
-
-
- /**
- * Return true if this object is a "remote" object. A remote object is defined as an object
- * that is not part of the base RSE artifacts (hosts, subsystems, filters). This method is used
- * to decide whether certain actions will be available from views, and how views should handle refreshing
- * such objects. Remote objects can appear more than once in the same view, while non-remote objects
- * are more confined and can be handled very clearly by the RSE UI framework.
- * @param element the object to check
- * @return true if the object is remote
- */
- public boolean isRemote(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 action on single item. Implement if the object is
- * deletable.
- * <p>
- * Implementers have two choices of dealing with error conditions:
- * handle the error themselves (for example, by showing an error dialog) and returning
- * <code>false</code>; or by throwing an Exception and having the framework
- * handle the error.
- * <p>
- * If the operation is cancelled, the implementation is free to either
- * return <code>false</code> or throw a
- * {@link SystemOperationCancelledException}, since in both cases the
- * framework will refresh the element to see whether it has
- * actually been deleted or not, but not show any other message.
- *
- * @param shell The shell that can act as a parent for an adapter-issued
- * message dialog.
- * @param element The element that should be deleted.
- * @param monitor The progress monitor for progress and cancellation. May be
- * <code>null</code>.
- * @return <code>true</code> indicates that the deletion succeeded,
- * <code>false</code> indicates that the deletion failed but no user
- * feedback is required by the framework because the implementation
- * has already handled the error or cancellation.
- * @throws Exception if the deletion failed and the adapter did not show a
- * message dialog.
- * @see #showDelete(Object)
- * @see #canDelete(Object)
- */
- public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception;
-
- /**
- * Perform the delete on the given set of items.
- * <p>
- * See {@link #doDelete(Shell, Object, IProgressMonitor)} for semantics of
- * error handling and cancellation.
- *
- * @param shell the shell that can act as a parent for an adapter-issued
- * message dialog.
- * @param resourceSet a list of resources that should be deleted.
- * @param monitor The progress monitor for progress and cancellation. May be
- * <code>null</code>.
- * @return <code>true</code> if all deletions were successful,
- * <code>false</code> if any deletion was not successful but proper
- * error reporting has been done by the adapter already. The
- * framework will only refresh the items to see which ones have
- * actually been deleted.
- * @throws Exception if any deletion was not successful and the adapter did
- * not perform any error reporting. If this is a
- * {@link SystemMessageException} then the caller should examine
- * the results and fire any necessary events.
- */
- 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.
- * @since 3.0
- */
- public boolean doRename(Shell shell, Object element, String name, IProgressMonitor monitor)
- 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 PROPERTIES ACTION...
- // ----------------------------------------------
- /**
- * Return true if we should show the properties action in the popup for the given element.
- */
- public boolean showProperties(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.
- * @param subSys subsystem to use for deferred queries.
- * @return <code>true</code> if it supports deferred queries, <code>false</code> otherwise.
- */
- public boolean supportsDeferredQueries(ISubSystem subSys);
-}
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/IViewLinker.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java
deleted file mode 100644
index c9746f8c2..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- *
- * Contributors:
- * David McKnight (IBM) - [187711] IViewLinker to be API that system view part calls when link with editor
- *******************************************************************************/
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * @since 3.0
- */
-public interface IViewLinker {
-
- /**
- * System View part calls link when using Link With Editor. Provider of action supplies this implementation.
- * @param editor the active editor
- * @param systemTree the view to link
- */
- public void linkEditorToView(IEditorPart editor, ISystemTree systemTree);
-
-
- /**
- * System View part calls link when using Link With Editor. Provider of action supplies this implementation.
- * @param editor the active editor
- * @param page the active workbench page
- */
- public void linkViewToEditor(Object remoteObject, IWorkbenchPage page);
-}
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 4df0f80d4..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,1234 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * Martin Oberhuber (Wind River) - [190231] Remove UI-only code from SubSystemConfiguration
- * Martin Oberhuber (Wind River) - [174789] [performance] Don't contribute Property Pages to Wizard automatically
- * David McKnight (IBM) - [197129] Removing obsolete ISystemConnectionWizardPropertyPage and SystemSubSystemsPropertiesWizardPage
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * David McKnight (IBM) - [238158] Can create duplicate filters
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-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.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.ISystemFilterPoolReference;
-import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManager;
-import org.eclipse.rse.core.filters.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.core.filters.ISystemFilterReference;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.ISubSystemConfigurator;
-import org.eclipse.rse.core.model.ISystemProfile;
-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.SubSystem;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.internal.core.filters.SystemFilterPoolWrapperInformation;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemClearPasswordAction;
-import org.eclipse.rse.internal.ui.actions.SystemConnectAction;
-import org.eclipse.rse.internal.ui.actions.SystemDisconnectAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterCascadingNewFilterPoolReferenceAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterCopyFilterAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterCopyFilterPoolAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveDownFilterAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveDownFilterPoolReferenceAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveFilterAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveFilterPoolAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveUpFilterAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterMoveUpFilterPoolReferenceAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterNewFilterPoolAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterRemoveFilterPoolReferenceAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterSelectFilterPoolsAction;
-import org.eclipse.rse.internal.ui.actions.SystemFilterWorkWithFilterPoolsAction;
-import org.eclipse.rse.internal.ui.subsystems.SubSystemConfigurationProxyAdapter;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-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.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.subsystems.ISubSystemConfigurationAdapter;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorPortInput;
-import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
-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.newconnection.ISystemNewConnectionWizardPage;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-
-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
- * configuration 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 config, SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystem subsystem)
- {
- /** FIXME - UDAs should not be coupled to subsystem configuration adapter
- SystemCompileManager mgr = config.getCompileManager();
-
- if (config.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 (config.supportsUserDefinedActions() && config.supportsUserDefinedActions(selection))
- {
- addUserDefinedActions(config, shell, selection, menu, menuGroup, getActionSubSystem(config, 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 configuration 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 SubSystemConfiguration#createSubSystem(org.eclipse.rse.core.model.IHost,boolean, ISubSystemConfigurator[])} 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.
- *
- * @since 3.0 ISystemNewConnectionWizardPage moved from Core to UI
- */
- public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration config, IWizard wizard)
- {
- if (config.getServiceType() != null)
- {
- SubSystemServiceWizardPage page = new SubSystemServiceWizardPage(wizard, config);
- return new ISystemNewConnectionWizardPage[] {page};
- }
- //MOB Removed due to performance issue -- see Eclipse Bugzilla bug 174789
-// else
-// {
-// List pages = getSubSystemPropertyPages(config);
-// if (pages != null && pages.size() > 0)
-// {
-// SystemSubSystemsPropertiesWizardPage page = new SystemSubSystemsPropertiesWizardPage(wizard, config, pages);
-// return new ISystemNewConnectionWizardPage[] {page};
-// }
-// }
- return new ISystemNewConnectionWizardPage[0];
- }
-
- /*
- * Return the form used in the subsystem property page. This default implementation returns Syste
- */
- public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISubSystemConfiguration config, ISystemMessageLine msgLine, Object caller)
- {
- return new SystemSubSystemPropertyPageCoreForm(msgLine, caller);
- }
-
-
-
- // FIXME - UDAs no longer coupled with config 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 config, ISubSystem subsystem)
-// {
-// if (udas == null)
-// udas = createActionSubSystem(config);
-// if (udas != null)
-// {
-// udas.setSubsystem(subsystem);
-// udas.setSubSystemConfiguration(config);
-// }
-// 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 config)
-// {
-// 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 config, 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...
- // ---------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter#getImage(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- public ImageDescriptor getImage(ISubSystemConfiguration config)
- {
- ISubSystemConfigurationProxy proxy = config.getSubSystemConfigurationProxy();
- Object adapterCandidate = Platform.getAdapterManager().getAdapter(proxy, SubSystemConfigurationProxyAdapter.class);
- SubSystemConfigurationProxyAdapter adapter = (SubSystemConfigurationProxyAdapter) adapterCandidate;
- ImageDescriptor result = adapter.getImageDescriptor();
- return result;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter#getGraphicsImage(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- public Image getGraphicsImage(ISubSystemConfiguration config)
- {
- ImageDescriptor id = getImage(config);
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter#getLiveImage(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- public ImageDescriptor getLiveImage(ISubSystemConfiguration config)
- {
- ISubSystemConfigurationProxy proxy = config.getSubSystemConfigurationProxy();
- Object adapterCandidate = Platform.getAdapterManager().getAdapter(proxy, SubSystemConfigurationProxyAdapter.class);
- SubSystemConfigurationProxyAdapter adapter = (SubSystemConfigurationProxyAdapter) adapterCandidate;
- ImageDescriptor result = adapter.getLiveImageDescriptor();
- return result;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter#getGraphicsLiveImage(org.eclipse.rse.core.subsystems.ISubSystemConfiguration)
- */
- public Image getGraphicsLiveImage(ISubSystemConfiguration config)
- {
- ImageDescriptor id = getLiveImage(config);
- 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 subsystem configuration.
- * <p>
- * Override if additional actions needs to be contributed.
- * <p>
- * @see #getSubSystemNewFilterPoolActions(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystemConfiguration, ISubSystem)
- *
- * @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(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISubSystem selectedSubSystem)
- {
- Vector childActions = new Vector();
- if (config.supportsFilters())
- {
- boolean showFilterPools = config.showFilterPools();
- // if showing filter pools, we have to add a "new filter pool" action here...
- if (showFilterPools)
- {
- IAction[] newFPActions = getSubSystemNewFilterPoolActions(menu, selection, shell, menuGroup, config, selectedSubSystem);
- 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(config);
- }
- 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)
- {
- ISystemFilterPool defaultPool = null;
- if (selectedSubSystem != null){
- defaultPool = ((SubSystem)selectedSubSystem).getConnectionPrivateFilterPool(true);
- }
-
- IAction[] newFilterActions = getNewFilterPoolFilterActions(menu, selection, shell, menuGroup, config, defaultPool);
- 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
- {
- }
- }
- // 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 (config.supportsUserDefinedActions())
-// childActions.addElement(new SystemWorkWithUDAsAction(shell, (ISubSystem)null));
-// // if named file types are supported, add an action to work with them...
-// if (config.supportsFileTypes())
-// childActions.addElement(new SystemWorkWithFileTypesAction(shell, null));
-// // if compile actions are supported, add an action to work with them...
-// if (config.supportsCompileActions())
-// childActions.addElement(new SystemWorkWithCompileCommandsAction(shell, false));
-
-
-
- if (config.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 (config.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 (config.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;
- }
-
- /**
- * Overridable method to add the connect or disconnect action.
- *
- * @param actions The list of child actions. Add the connect/disconnect action to this vector is applicable.
- * @param shell The shell.
- * @param selectedSS The selected subsystem.
- */
- protected 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 config, SystemNewFilterAction newFilterAction, Object callerData)
- {
- //System.out.println("Inside configureNewFilterAction! It worked!");
- newFilterAction.setFromRSE(true);
- boolean showFilterPools = config.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;
- ISystemFilterPoolWrapperInformation poolWrapperInfo = getNewFilterWizardPoolWrapperInformation();
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ISystemProfile activeProfile = selectedSubSystem.getHost().getSystemProfile();
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- //ISystemFilterPool defaultPool = getDefaultSystemFilterPool(config, activeProfiles[idx]);
-
- // bug 238158 - now the default pool will be the connection private one
- ISystemFilterPool defaultPool = null;
- if (selectedSubSystem != null){
- defaultPool = ((SubSystem)selectedSubSystem).getConnectionPrivateFilterPool(true);
- }
- else {
- defaultPool = getDefaultSystemFilterPool(config, 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 config, ISystemProfile profile)
- {
- ISystemFilterPool pool = null;
- ISystemFilterPoolManager mgr = config.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.
- * @since 3.0 replaced SystemFilterPoolWrapperInformation by ISystemFilterPoolWrapperInformation
- */
- protected ISystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
- {
- return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP,
- SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_VERBIAGE);
- }
- /**
- * 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(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISubSystem selectedSubSystem)
- {
- 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;
- }
-
- /**
- * 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 filter pool references. This implementation
- * just gets the referenced filter pool and calls the method
- * getSystemFilterPoolImage(ISystemFilterPool) on it.
- * Override this method to provide custom images for filter pool references.
- */
- public ImageDescriptor getSystemFilterPoolImage(ISystemFilterPoolReference filterPoolRef)
- {
- return getSystemFilterPoolImage(filterPoolRef.getReferencedFilterPool());
- }
-
- /**
- * Supply the image to be used for filter references. This implementation
- * just gets the referenced filter and calls the method
- * getSystemFilterImage(ISystemFile) on it.
- * Override this method to provide custom images for filter references.
- */
- public ImageDescriptor getSystemFilterImage(ISystemFilterReference filterRef)
- {
- return getSystemFilterImage(filterRef.getReferencedFilter());
- }
-
-
- /*
- * 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 subsystem configuration.
- * 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>
- *
- * @param selectedPool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterPoolActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterPool selectedPool)
- {
- Vector childActions = new Vector();
- IAction[] newActions = getNewFilterPoolFilterActions(menu, selection, shell, menuGroup, config, selectedPool);
- 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 method to return the actions for creating a new filter in a filter pool.
- * By default returns one action created by calling {@link #getNewFilterPoolFilterAction(ISubSystemConfiguration, 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 selectedPool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction[] getNewFilterPoolFilterActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterPool selectedPool)
- {
- IAction[] actions = new IAction[1];
- actions[0] = getNewFilterPoolFilterAction(config, 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 selectedPool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getNewFilterPoolFilterAction(ISubSystemConfiguration config, 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 selectedFilter the currently selected filter
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getNewNestedFilterAction(ISubSystemConfiguration config, ISystemFilter selectedFilter, Shell shell)
- {
- return getNewFilterPoolFilterAction(config, 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 config, 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(ISubSystemConfiguration, 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 config, 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(config, 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(ISubSystemConfiguration, 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 config, 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(config, 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 subsystem configuration. Note,
- * these are added to the list returned by getFilterPoolActions().
- * Only supported by subsystems that support filters.
- * @param selectedPoolReference the currently selected pool reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterPoolReferenceActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterPoolReference selectedPoolReference)
- {
- ISystemFilterPool selectedPool = selectedPoolReference.getReferencedFilterPool();
- if (filterPoolReferenceActions == null)
- {
- filterPoolReferenceActions = new IAction[3];
- filterPoolReferenceActions[0] = getRemoveFilterPoolReferenceAction(config, selectedPool, shell);
- filterPoolReferenceActions[1] = new SystemFilterMoveUpFilterPoolReferenceAction(shell);
- ((ISystemAction) filterPoolReferenceActions[1]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0063"); //$NON-NLS-1$
- filterPoolReferenceActions[2] = new SystemFilterMoveDownFilterPoolReferenceAction(shell);
- ((ISystemAction) filterPoolReferenceActions[2]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0064"); //$NON-NLS-1$
- }
-
- return filterPoolReferenceActions;
- }
-
- /**
- * Overridable method to return the action for removing a filter pool reference.
- * By default returns new SystemRemoveFilterPoolReferenceAction.
- * @param selectedPool the currently selected pool
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- protected IAction getRemoveFilterPoolReferenceAction(ISubSystemConfiguration config, 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 config, ISystemFilterReference referenceToPromptableFilter, Shell shell) throws Exception
- {
- ISystemFilter filterPrompt = referenceToPromptableFilter.getReferencedFilter();
- ISystemFilterPool selectedPool = filterPrompt.getParentFilterPool();
-
- SystemNewFilterAction action = new SystemNewFilterAction(shell, selectedPool);
- Object simulatedSelectedParent = null;
- if (!config.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(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilter selectedFilter)
- {
- Vector childActions = new Vector();
- Vector ourChildActions = getAdditionalFilterActions(config, 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 && ourChildActions != null)
- {
- 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 (config.supportsNestedFilters())
- {
- IAction newNestedFilterAction = getNewNestedFilterAction(config, selectedFilter, shell);
- if (newNestedFilterAction != null)
- childActions.addElement(newNestedFilterAction);
- }
-
- // IAction chgFilterAction = getChangeFilterAction(config, 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;
-
- 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(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystemConfiguration, ISystemFilter)
- */
- protected Vector getAdditionalFilterActions(ISubSystemConfiguration config, 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 subsystem configuration.
- * 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>
- *
- * @param selectedFilterRef the currently selected filter reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterReferenceActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterReference selectedFilterRef)
- {
- return null;
- }
-
- // -------------------------
- // SERVER LAUNCH SUPPORT ...
- // -------------------------
-
- /**
- * Return the form used in the property page, etc for this server launcher.
- * Only called if {@link ISubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)} returns true.
- * <p>
- * Override if appropriate.
- * @return the UI form for the server launcher.
- */
- public IServerLauncherForm getServerLauncherForm(ISubSystemConfiguration config, Shell shell, ISystemMessageLine msgLine)
- {
- return new RemoteServerLauncherForm(shell, msgLine);
- }
-
- /**
- * 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) {
- 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;
- }
-
- /**
- * The default implementation does not filter and simply returns the children passed in.
- * Subclasses should override if they want to filter objects.
- * @param parent the parent context.
- * @param children the children to filter.
- * @return the children after filtering.
- */
- public Object[] applyViewFilters(IContextObject parent, Object[] children) {
- return children;
- }
-} \ 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 30a3475d5..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAbstractAPIProvider.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemMessageObject;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.model.SystemMessageObject;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-
-/**
- * This is a base class that a provider of root nodes to the remote systems tree
- * viewer part can use as a parent class.
- *
- * This class existed in RSE 1.0, was made "internal" for RSE 2.0 and restored
- * as API for RSE 3.0.
- *
- * @since 3.0
- */
-public abstract class SystemAbstractAPIProvider
- implements ISystemViewInputProvider
-{
- protected Viewer viewer;
- /**
- * @deprecated don't use this field
- */
- protected ISystemRegistry sr;
-
- /**
- * @deprecated don't use this field
- */
- protected Object[] emptyList = new Object[0];
- /**
- * @deprecated don't use this field
- */
- protected Object[] msgList = new Object[1];
- /**
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
- */
- protected SystemMessageObject nullObject = null;
- /**
- * This field was renamed from canceledObject in RSE 3.0.
- *
- * @since org.eclipse.rse.ui 3.0
- * @deprecated don't use this field
- */
- protected SystemMessageObject cancelledObject = null;
- /**
- * @deprecated don't use this field
- */
- protected SystemMessageObject errorObject = null;
-
- private Preferences fPrefStore = null;
-
- /**
- * Constructor
- */
- public SystemAbstractAPIProvider()
- {
- super();
- sr = RSECorePlugin.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);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#setViewer(java.lang.Object)
- */
- public void setViewer(Object viewer)
- {
- this.viewer = (Viewer)viewer;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.view.ISystemViewInputProvider#getViewer()
- */
- public Object getViewer()
- {
- return viewer;
- }
-
- protected final void initMsgObjects()
- {
- nullObject = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),ISystemMessageObject.MSGTYPE_EMPTY, null);
- cancelledObject = 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 <samp>checkForEmptyList(children, parent,
- * 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.
- * <p>
- * <i>Callable by subclasses. Do not override.</i> <br>
- *
- * @param children The list of children.
- * @param parent The parent for the children.
- * @param returnNullMsg <code>true</code> if an "Empty List" message should
- * be returned.
- * @return The list of children, a list with the "Empty List" message object
- * or an empty list.
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients.
- */
- protected Object[] checkForEmptyList(Object[] children, Object parent, boolean returnNullMsg) {
- if ((children == null) || (children.length == 0)) {
- if (fPrefStore == null) {
- fPrefStore = RSEUIPlugin.getDefault().getPluginPreferences();
- }
- if (!returnNullMsg
- || (fPrefStore != null && !fPrefStore
- .getBoolean(ISystemPreferencesConstants.SHOW_EMPTY_LISTS))) {
- return emptyList;
- } else {
- return new Object[] {
- new SystemMessageObject(
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_EMPTY),
- ISystemMessageObject.MSGTYPE_EMPTY,
- parent)};
- }
- }
- return children;
- }
-
- /**
- * 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
- *
- * @deprecated Use {@link #checkForEmptyList(Object[], Object, boolean)} instead.
- */
- 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 (cancelledObject == null)
- initMsgObjects();
- msgList[0] = cancelledObject;
- 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 getViewAdapter(Object o)
- {
- return SystemAdapterHelpers.getViewAdapter(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/SystemAdapterHelpers.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAdapterHelpers.java
deleted file mode 100644
index 9d321f7a7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemAdapterHelpers.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Uwe Stieber (Wind River) - [174418] SystemAdapterHelpers.getViewAdapter(Object) try to find adapter twice
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-
-package org.eclipse.rse.ui.view;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-
-
-/**
- * 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 getViewAdapter(Object o) {
- ISystemViewElementAdapter adapter = null;
-
- // In case the object itself is an adaptable, call the objects getAdapter() method
- if (o instanceof IAdaptable) {
- adapter = (ISystemViewElementAdapter)((IAdaptable)o).getAdapter(ISystemViewElementAdapter.class);
- } else if (o != null) {
- // object is not an adaptable itself, call the adapter manager
- 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 getViewAdapter(Object o, Viewer viewer) {
- ISystemViewElementAdapter adapter = getViewAdapter(o);
- if (adapter != null) {
- //FIXME This is not thread-safe.
- 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 getViewAdapter(Object o, Viewer viewer, ISystemViewInputProvider inputProvider) {
- ISystemViewElementAdapter adapter = getViewAdapter(o, viewer);
-
- if (adapter != null) {
- //FIXME This is not thread-safe.
- 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;
-
- // In case the object itself is an adaptable, call the objects getAdapter() method
- if (o instanceof IAdaptable) {
- adapter = (ISystemRemoteElementAdapter)((IAdaptable)o).getAdapter(ISystemRemoteElementAdapter.class);
- } else if (o != null) {
- // object is not an adaptable itself, call the adapter manager
- adapter = (ISystemRemoteElementAdapter)Platform.getAdapterManager().getAdapter(o, 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;
- }
-}
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 59c91d1a7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemLongRunningRequestEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.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();
- }
-
-}
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 4c50d59bb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java
+++ /dev/null
@@ -1,2145 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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:
- * Kevin Doyle (IBM) - [187736] Marked _objectInput stale when new resource created
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Xuan Chen (IBM) - [187016] [menus] Remote Systems Details View should have Refresh on context menu
- * David McKnight (IBM) - [193329] using "Resource" instead of "Name" in the label column
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * Martin Oberhuber (Wind River) - [227516] [regression] Fix ArrayIndexOutOfBoundsException in TableView
- * David McKnight (IBM) - [187058] Incorrect Right Click Menu in Remote System Details View with no selection
- * David McKnight (IBM) - [260346] RSE view for jobs does not remember resized columns
- * Martin Oberhuber (Wind River) - [289533] NPE on "Show in Table"
- ********************************************************************************/
-
-package org.eclipse.rse.ui.view;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.core.resources.WorkspaceJob;
-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.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.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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvent;
-import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
-import org.eclipse.rse.core.events.ISystemRemoteChangeListener;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-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.IRemoteObjectIdentifier;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
-import org.eclipse.rse.internal.ui.actions.SystemCommonSelectAllAction;
-import org.eclipse.rse.internal.ui.actions.SystemImportConnectionAction;
-import org.eclipse.rse.internal.ui.actions.SystemOpenExplorerPerspectiveAction;
-import org.eclipse.rse.internal.ui.actions.SystemShowInTableAction;
-import org.eclipse.rse.internal.ui.actions.SystemSubMenuManager;
-import org.eclipse.rse.internal.ui.view.SystemDecoratingLabelProvider;
-import org.eclipse.rse.internal.ui.view.SystemInheritableTextCellEditor;
-import org.eclipse.rse.internal.ui.view.SystemTableViewColumnManager;
-import org.eclipse.rse.internal.ui.view.SystemTableViewFilter;
-import org.eclipse.rse.internal.ui.view.SystemTableViewSorter;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewDataDragAdapter;
-import org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.services.clientserver.StringCompare;
-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.ISystemIconConstants;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.ISystemRenameTarget;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.actions.SystemRefreshAction;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-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.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.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,
- ISystemShellProvider, ISelectionChangedListener, ISelectionProvider
-{
-
-
- // inner class to support cell editing
- private ICellModifier cellModifier = new ICellModifier()
- {
- public Object getValue(Object element, String property)
- {
- ISystemViewElementAdapter adapter = getViewAdapter(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 = getViewAdapter(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.
- private SystemNewConnectionAction _newConnectionAction;
- private SystemImportConnectionAction _importConnectionAction;
- protected SystemRefreshAction _refreshAction;
- protected PropertyDialogAction _propertyDialogAction;
- private SystemOpenExplorerPerspectiveAction _openToPerspectiveAction;
- private SystemShowInTableAction _showInTableAction;
-
- // global actions
- // Note the Edit menu actions are set in SystemViewPart. Here we use these
- // actions from our own popup menu actions.
- private SystemCommonDeleteAction _deleteAction;
- // for global delete menu item
- private SystemCommonRenameAction _renameAction;
- // for common rename menu item
- private SystemCommonSelectAllAction _selectAllAction;
- // for common Ctrl+A select-all
-
- protected boolean _selectionShowRefreshAction;
- protected boolean _selectionShowOpenViewActions;
- protected boolean _selectionShowDeleteAction;
- protected boolean _selectionShowRenameAction;
- protected boolean _selectionShowPropertiesAction;
- protected boolean _selectionEnableDeleteAction;
- protected boolean _selectionEnableRenameAction;
-
-
- protected boolean _selectionIsRemoteObject = true;
- protected boolean _selectionFlagsUpdated = false;
-
- 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;
-
- // for bug 260346 - to maintain list of cached column widths
- private Map _cachedColumnWidths;
-
-
- /**
- * 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);
-
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.addSystemResourceChangeListener(this);
- sr.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);
-
- _cachedColumnWidths = new HashMap();
- }
-
- /**
- * @since 3.0 Moved SystemTableViewProvider from internal to API
- * @return
- */
- 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 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);
-
- // columns may change so we want to keep track of the current ones
- int[] lastWidths = getCurrentColumnWidths();
- if (lastWidths.length > 0){
- ISystemViewElementAdapter contentsAdapter = getAdapterForContents();
- if (contentsAdapter != null) {
- // no use caching anything when there were no children
- String adapterName = contentsAdapter.getClass().getName();
-
- // associate the last contents adapter with the last widths
- _cachedColumnWidths.put(adapterName, lastWidths);
- }
- }
-
- _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 getViewAdapter(Object obj)
- {
- ISystemViewElementAdapter adapter = SystemAdapterHelpers.getViewAdapter(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 getViewAdapter(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(getViewAdapter(child));
- }
-
- return new IPropertyDescriptor[0];
- }
-
- /**
- * @since 3.0 replaced SystemTableViewColumnManager by
- * ISystemTableViewColumnManager
- * @return the column manager
- */
- public ISystemTableViewColumnManager 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 getViewAdapter(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);
- if (propertyValue != null) {
- // FIXME Since we're only checking the FIRST element
- // in the list of elements for its descriptor, we
- // might get null here if the first element is
- // invalid - although other elements might be valid.
- // This issue is tracked in
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=193329#c5
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=187571
- results.add(propertyValue.getClass());
- } else {
- // FIXME Fallback: Display property value as String,
- // is this always possible?
- results.add(String.class);
- }
- }
- 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;
- name = SystemResources.RESID_RENAME_COLHDG_OLDNAME;
- if (nameDescriptor != null)
- {
- 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)
- {
- ISystemViewElementAdapter adapter = getAdapterForContents();
- String adapterName = adapter.getClass().getName();
- int[] cachedWidths = (int[])_cachedColumnWidths.get(adapterName);
-
- // if there are already cached widths, use them
- if (cachedWidths != null){
- setCurrentColumnWidths(cachedWidths);
- }
- // check if previous widths can be used
- else 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;
- }
-
- /**
- * Initialize drag and drop support for this view.
- *
- */
- protected void initDragAndDrop()
- {
- int ops = DND.DROP_COPY | DND.DROP_MOVE;
- Transfer[] dragtransfers = new Transfer[]
- { PluginTransfer.getInstance(),
- EditorInputTransfer.getInstance()
- };
-
- Transfer[] droptransfers = new Transfer[]
- { PluginTransfer.getInstance(),
- FileTransfer.getInstance(),
- EditorInputTransfer.getInstance()
- };
-
- addDragSupport(ops | DND.DROP_DEFAULT, dragtransfers, new SystemViewDataDragAdapter(this));
- addDropSupport(ops | DND.DROP_DEFAULT, droptransfers, new SystemViewDataDropAdapter(this));
- }
-
- /**
- * Used to asynchronously update the view whenever properties change.
- * @see org.eclipse.rse.core.events.ISystemResourceChangeListener#systemResourceChanged(org.eclipse.rse.core.events.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:
- case ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE:
- {
- if (child == RSECorePlugin.getTheSystemRegistry())
- {
- // treat this as refresh all
- child = _objectInput;
- break;
- }
- try
- {
- Widget w = findItem(child);
- if (w != null && w.getData() != _objectInput)
- {
- //child is the children of this table input.
- //Need to refresh the whole view to handler
- //And we need to make _objectInput to stale, otherwise deleted object
- //could not be removed from the table.
- if (_objectInput instanceof ISystemContainer)
- {
- ((ISystemContainer)_objectInput).markStale(true);
- }
- child = _objectInput;
- }
- }
- catch (Exception e)
- {
- SystemBasePlugin.logError(e.getMessage());
- }
-
- }
- 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.core.events.ISystemRemoteChangeListener#systemRemoteResourceChanged(org.eclipse.rse.core.events.ISystemRemoteChangeEvent)
- */
- public void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
- {
- boolean madeChange = false;
- int eventType = event.getEventType();
- Object remoteResourceParent = event.getResourceParent();
- Object remoteResource = event.getResource();
- List remoteResourceNames = null;
- if (remoteResource instanceof List) {
- remoteResourceNames = (List) remoteResource;
- remoteResource = remoteResourceNames.get(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)
- {
- if (_objectInput instanceof ISystemContainer)
- {
- ((ISystemContainer)_objectInput).markStale(true);
- }
- provider.flushCache();
- madeChange = true;
- }
-
- refresh();
- }
- }
- break;
-
- // --------------------------
- // REMOTE RESOURCE DELETED...
- // --------------------------
- case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED :
- {
- {
- Object dchild = remoteResource;
-
- ISystemViewElementAdapter dadapt = getViewAdapter(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 = getViewAdapter(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.getOldNames()[0]; // assuming only one resource
- 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 = getViewAdapter(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
- {
- IRemoteObjectIdentifier ra = getViewAdapter(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 = getViewAdapter(firstSelection);
- if (adapter != null)
- {
- displayMessage(adapter.getStatusLineText(firstSelection));
- if ((mouseButtonPressed == LEFT_BUTTON))
- adapter.selectionChanged(firstSelection);
- }
- else
- clearMessage();
- }
-
- public void dispose()
- {
- removeSelectionChangedListener(this);
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.removeSystemResourceChangeListener(this);
- sr.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;
- }
-
- /**
- * 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;
- }
-
-
- /**
- * Rather than pre-defining this common action we wait until it is first
- * needed, for performance reasons.
- *
- * @since 3.0
- */
- public IAction getNewConnectionAction() {
- if (_newConnectionAction == null) _newConnectionAction = new SystemNewConnectionAction(getShell(), true, this); // true=>from popup menu
- return _newConnectionAction;
- }
-
- /**
- * Rather than pre-defining this common action we wait until it is first needed,
- * for performance reasons.
- */
- private IAction getImportConnectionAction() {
- if (_importConnectionAction == null) {
- _importConnectionAction = new SystemImportConnectionAction(); // true=>from popup menu
- _importConnectionAction.setShell(getShell());
- _importConnectionAction.setText(SystemResources.RESID_IMPORT_CONNECTION_LABEL_LONG);
- }
- return _importConnectionAction;
- }
-
-
- /*
- * 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.
- */
- private SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction()
- {
- if (_openToPerspectiveAction == null)
- {
- IWorkbench desktop = PlatformUI.getWorkbench();
- IWorkbenchWindow win = desktop.getActiveWorkbenchWindow();
-
- _openToPerspectiveAction = new SystemOpenExplorerPerspectiveAction(getShell(), win);
- }
- //getWorkbenchWindow());
- return _openToPerspectiveAction;
- }
-
- private 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)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- 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 = getViewAdapter(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.core.events.SystemResourceChangeEvent(deleted, ISystemResourceChangeEvents.EVENT_DELETE_MANY, getInput()));
- }
- return ok;
- }
-
-
- /**
- * Decides whether to even show the properties menu item.
- * Assumes scanSelections() has already been called
- */
- protected boolean showProperties() {
- return _selectionShowPropertiesAction;
- }
-
- // ---------------------------
- // ISYSTEMRENAMETARGET METHODS
- // ---------------------------
-
- private class RenameJob extends WorkspaceJob
- {
- String[] newNames = null;
- Object[] elements = null;
- Object[] elementAdapters = null;
- Object parentElement = null;
- String renameMessage = null;
- /**
- * RenameJob job.
- * @param newNames array of new names of all the elements need to be renamed
- * @param elements array of all the elements need to be renamed
- * @param elementAdapters array of all the view adapters of the elements need to be renamed
- * @param renameMessage the title of the Rename job.
- */
- public RenameJob(String[] newNames, Object[] elements, Object[] elementAdapters, String renameMessage)
- {
- super(renameMessage);
- this.newNames = newNames;
- this.elements = elements;
- this.elementAdapters = elementAdapters;
- setUser(true);
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor)
- {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- Object element = null;
- ISystemViewElementAdapter adapter = null;
- ISystemRemoteElementAdapter remoteAdapter = null;
- String oldFullName = null;
- String oldName = null;
- Vector fileNamesRenamed = new Vector();
- boolean ok = true;
-
- try {
- int steps = elements.length;
- monitor.beginTask(renameMessage, steps);
- for (int i=0; i < elements.length; i++)
- {
- element = elements[i];
- adapter = (ISystemViewElementAdapter)elementAdapters[i];
- remoteAdapter = getRemoteAdapter(element);
- Object parentElement = getParentForContent(element);
- if (remoteAdapter != null)
- {
- oldName = remoteAdapter.getName(element);
- oldFullName = remoteAdapter.getAbsoluteName(element); // pre-rename
- monitor.subTask(getRenamingMessage(oldName).getLevelOneText());
- }
- ok = adapter.doRename(null, element, newNames[i], monitor);
- if (ok)
- {
- fileNamesRenamed.add(oldName);
- if (remoteAdapter != null)
- {
- // Don't think we need to do findItem and updateItem here.
- sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, adapter.getSubSystem(element), new String[]{oldFullName}, this);
-
- }
-
- else
- sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));
- }
- monitor.worked(1);
- }
- }
- catch (SystemMessageException exc) {
- ok = false;
- //If this operation is cancelled, need to display a proper message to the user.
- if (monitor.isCanceled() && fileNamesRenamed.size() > 0)
- {
- //Get the renamed file names
- String renamedFileNames = (String)(fileNamesRenamed.get(0));
- for (int i=1; i<(fileNamesRenamed.size()); i++)
- {
- renamedFileNames = renamedFileNames + "\n" + fileNamesRenamed.get(i); //$NON-NLS-1$
- }
- //getMessage("RSEG1125").makeSubstitution(movedFileName));
- SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_RENAME_INTERRUPTED);
- thisMessage.makeSubstitution(renamedFileNames);
- SystemMessageDialog.displayErrorMessage(null, thisMessage);
- }
- else
- {
- SystemMessageDialog.displayErrorMessage(null, exc.getSystemMessage());
- }
- } catch (Exception exc) {
- exc.printStackTrace();
- SystemMessageDialog.displayErrorMessage(null, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(element, exc), //msg),
- exc);
- ok = false;
- }
-
- return Status.OK_STATUS;
- }
- }
- /**
- * 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;
- }
-
- /**
- * Get the specific "Renaming %1..."
- *
- * @since 3.0
- */
- protected SystemMessage getRenamingMessage(String oldName)
- {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_RENAMEGENERIC_PROGRESS);
- msg.makeSubstitution(oldName);
- return msg;
- }
-
- /**
- * Required method from ISystemRenameTarget
- */
- public boolean doRename(String[] newNames)
- {
-
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- Iterator elements = selection.iterator();
-
-
- Object[] renameElements = new Object[newNames.length];
- Object[] elementAdapters = new Object[newNames.length];
- int i = 0;
- while (elements.hasNext()) {
- renameElements[i] = elements.next();
- elementAdapters[i] = getViewAdapter(renameElements[i]);
- i++;
- //remoteAdapter = getRemoteAdapter(element);
- }
- SystemMessage renameMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_RENAMEGENERIC_PROGRESS);
- renameMessage.makeSubstitution(""); //$NON-NLS-1$
- String renameMessageText = renameMessage.getLevelOneText();
- RenameJob renameJob = new RenameJob(newNames, renameElements, elementAdapters, renameMessageText);
- renameJob.schedule();
- return true;
-
- }
-
- /**
- * 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)
- {
- 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();
- Object firstIn = selection.getFirstElement();
- if (firstIn instanceof ISystemRegistry)
- {
- menu.add(getNewConnectionAction());
- menu.add(getImportConnectionAction());
- menu.add(new GroupMarker(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- }
- else
- {
- SystemView.createStandardGroups(menu);
- // 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 = getViewAdapter(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 (showProperties())
- {
- PropertyDialogAction pdAction = getPropertyDialogAction();
- if (pdAction.isApplicableForSelection())
- {
- menu.appendToGroup(ISystemContextMenuConstants.GROUP_PROPERTIES, pdAction);
- }
- }
-
- // OPEN IN NEW PERSPECTIVE ACTION... if (fromSystemViewPart && showOpenViewActions())
- if (!_selectionIsRemoteObject)
- {
- //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);
-
- }
-
-
- }
- }
-
- /**
- * --------------------------------------------------------------------------------
- * 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;
- _selectionShowPropertiesAction = 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 = getViewAdapter(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 (_selectionShowPropertiesAction)
- _selectionShowPropertiesAction = adapter.showProperties(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 = adapter.isRemote(element);
- }
-
- }
-
- 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 = getViewAdapter(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();
- }
-
- /**
- * Returns the column widths associated with this view.
- *
- * @return the map of column widths associated with this view
- *
- * @since 3.1
- */
- public Map getCachedColumnWidths()
- {
- return _cachedColumnWidths;
- }
-
- /**
- * Sets the map of column widths associated with this view
- *
- * @param cachedColumnWidths the column widths map
- *
- * @since 3.1
- */
- public void setCachedColumnWidths(Map cachedColumnWidths)
- {
- _cachedColumnWidths = cachedColumnWidths;
- }
-
-} \ 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 fe3819f74..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableViewProvider.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2009 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) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [216161] table view needs to handle context when filter reference is input
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David McKnight (IBM) - [278848] NPE in Remote System Details view
- * David McKnight (IBM) - [284917] Deleting a folder in a fresh workspace throws NPE
- *******************************************************************************/
-
-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.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-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.filters.ISystemFilterReference;
-import org.eclipse.rse.core.model.ISystemContainer;
-import org.eclipse.rse.core.model.ISystemViewInputProvider;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.view.SystemViewPromptableAdapter;
-import org.eclipse.rse.internal.ui.view.SystemViewRootInputAdapter;
-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.
- *
- * @since 3.0 Moved from internal to API
- */
-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 ISystemTableViewColumnManager _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(ISystemTableViewColumnManager 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.
- */
- 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)
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- return adapter.getParent(object);
- return null;
- }
-
- 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.getViewAdapter(object, _viewer);
- }
- else
- {
- result = SystemAdapterHelpers.getViewAdapter(object);
- }
- if (result != null)
- result.setPropertySourceInput(object);
-
- // for bug 278848
- if (_viewer != null && _viewer.getInput() instanceof ISystemViewInputProvider)
- {
- ISystemViewInputProvider inputProvider = (ISystemViewInputProvider)_viewer.getInput();
- result.setInput(inputProvider);
- }
-
- return result;
- }
-
- public Object[] getElements(Object object)
- {
- Object[] results = null;
- /*
- if (object == _lastObject && (_lastResults != null && _lastResults.length > 0)
- {
- return _lastResults;
- }
- else
- if (object instanceof IAdaptable)
- */
- {
- ISystemViewElementAdapter adapter = getAdapterFor(object);
- if (adapter != null)
- {
- adapter.setViewer(_viewer);
-
- // do we have context?
- if (object instanceof ISystemFilterReference) {
- ISubSystem ss = adapter.getSubSystem(object);
-
- ContextObject context = new ContextObject(object, ss, (ISystemFilterReference)object);
- results = adapter.getChildren(context, new NullProgressMonitor());
- }
- else {
- results = adapter.getChildren((IAdaptable)object, new NullProgressMonitor());
-
- }
- 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
-
- }
-}
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 1195c003f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/EnvironmentVariablesForm.java
+++ /dev/null
@@ -1,609 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Justin Lin (IBM) - [244051] JJ: Environment Variables property page allows duplicates...
- *******************************************************************************/
-
-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.IRSESystemType;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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 IRSESystemType 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
- 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);
- }
- }
- }
- if (msg == null) {
- // next check for duplicate env var names
- int itemCount = envVarTable.getItemCount();
- for (int i = 0; i < itemCount; i++) {
- TableItem item = envVarTable.getItem(i);
- String itemName = item.getText(0);
- if (itemName.equals(name) && i != envVarTable.getSelectionIndex()) {
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_DUPLICATE);
- msg.makeSubstitution(name);
- break;
- }
- }
- }
- }
-
- 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 2083d9ea8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritButton.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- ********************************************************************************/
-
-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.
- * @noextend This class is not intended to be subclassed by clients.
- */
-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 the composite owning this button
- */
- 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 9c637ad7f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteBaseServerLauncherForm.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - refactoring IConnectorService and ServerLauncher hierarchies
- * Martin Oberhuber (Wind River) - [226364][api][breaking] RemoteBaseServerLauncherForm should not implement RemoteServerLauncherConstants.
- *******************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ServerLaunchType;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBaseForm;
-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, 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 796f19458..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/RemoteServerLauncherForm.java
+++ /dev/null
@@ -1,661 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [226364][api][breaking] RemoteBaseServerLauncherForm should not implement RemoteServerLauncherConstants.
- * David McKnight (IBM) - [235577] [dstore][launcher] Number 0 is accepted as valid port number
- *******************************************************************************/
-
-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.RemoteServerLauncherConstants;
-import org.eclipse.rse.core.subsystems.ServerLaunchType;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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(RemoteServerLauncherConstants.DEFAULT_DAEMON_PORT));
- _fieldRexecPath.setText(RemoteServerLauncherConstants.DEFAULT_REXEC_PATH);
- _fieldRexecInvocation.setText(RemoteServerLauncherConstants.DEFAULT_REXEC_SCRIPT);
- _fieldRexecPort.setText(String.valueOf(RemoteServerLauncherConstants.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();
-
- int portAsInt = 0;
- if (port != null && port.length() > 0){
- try {
- portAsInt = Integer.parseInt(port);
- }
- catch (Exception e){
- portAsInt = 0;
- }
- }
-
- msg = _rexecPortValidator.validate(port);
-
- // for daemons we don't allow 0
- if (msg == null && portAsInt == 0)
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID);
-
- 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();
-
- int portAsInt = 0;
- if (port != null && port.length() > 0){
- try {
- portAsInt = Integer.parseInt(port);
- }
- catch (Exception e){
- portAsInt = 0;
- }
- }
-
- msg = _daemonPortValidator.validate(port);
-
- // for daemons we don't allow 0
- if (msg == null && portAsInt == 0)
- msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PORT_NOTVALID);
-
-
- 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);
- }
-}
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 309496f9e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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) - [183165] Do not implement constant interfaces
- * David Dykstal (IBM) - [232318] force layout and repaint after changing labels
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * This class encapsulates 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
-{
- // 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, ISystemEditPaneStates.MODE_NEW);
- setMode(ISystemEditPaneStates.MODE_NEW);
- setState(ISystemEditPaneStates.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, ISystemEditPaneStates.MODE_EDIT);
- setMode(ISystemEditPaneStates.MODE_EDIT);
- setState(ISystemEditPaneStates.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, ISystemEditPaneStates.MODE_UNSET);
- setMode(ISystemEditPaneStates.MODE_UNSET);
- setState(ISystemEditPaneStates.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(ISystemEditPaneStates.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(ISystemEditPaneStates.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(ISystemEditPaneStates.STATE_APPLIED);
- enableButtons();
- }
- /**
- * User has successfully pressed Reset (that is, no errors found)
- */
- public void resetPressed()
- {
- setState(ISystemEditPaneStates.STATE_INITIAL);
- enableButtons();
- }
-
- /**
- * Are any changes pending?
- */
- public boolean areChangesPending()
- {
- return (state == ISystemEditPaneStates.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 ISystemEditPaneStates.STATE_INITIAL:
- enableApply = false;
- enableReset = false;
- break;
- case ISystemEditPaneStates.STATE_APPLIED:
- enableApply = false;
- enableReset = false; // true; only true if reset returns to pre-applied values. Not usually the case
- break;
- case ISystemEditPaneStates.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 == ISystemEditPaneStates.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 == ISystemEditPaneStates.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);
- //}
- }
- }
- Composite parent = applyButton.getParent();
- parent.layout();
- parent.update();
- }
- }
-
- /**
- * 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 ISystemEditPaneStates.MODE_UNSET:
- setUnsetMode();
- break;
- case ISystemEditPaneStates.MODE_NEW:
- setNewMode();
- break;
- case ISystemEditPaneStates.MODE_EDIT:
- setEditMode();
- break;
- }
- switch(backupState)
- {
- case ISystemEditPaneStates.STATE_PENDING:
- setChangesMade();
- break;
- case ISystemEditPaneStates.STATE_INITIAL:
- break;
- case ISystemEditPaneStates.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 839734679..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHistoryCombo.java
+++ /dev/null
@@ -1,718 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
- * David McKnight (IBM) - [240414] NPE in SystemHistoryCombo
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.dialogs.SystemWorkWithHistoryDialog;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-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()
- * @noextend This class is not intended to be subclassed by clients.
- */
-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 != null && 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.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.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 != null && 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.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.setWidgetHistory(historyKey, newHistory);
- }
- }
- else
- {
- newHistory =new String[1];
- newHistory[0] = textValue;
- SystemPreferencesManager.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.setWidgetHistory(historyKey, newHistory);
- }
-
- // -----------------------
- // 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();
- // 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.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 c85b5c068..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemHostCombo.java
+++ /dev/null
@@ -1,1188 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2007 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:
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
- ********************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-import java.util.ArrayList;
-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.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.model.ISystemShellProvider;
-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, ISystemResourceChangeListener, ISystemShellProvider,
- 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 IRSESystemType[] 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 IRSESystemType populateSystemType = null; /* used as criteria when refresh is done */
- private IRSESystemType[] 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, IRSESystemType systemType, IHost defaultConnection, boolean showNewButton)
- {
- super(parent, style);
- restrictSystemTypesTo = new IRSESystemType[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, IRSESystemType[] 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 = RSECorePlugin.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 ssConfigCategory 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 ssConfigCategory, boolean showLabel) {
- super(parent, style);
- if (showNewButton) // this is expensive, so only need to do this if New is enabled
- {
- ISubSystemConfigurationProxy[] ssfProxies = RSECorePlugin.getTheSystemRegistry().getSubSystemConfigurationProxiesByCategory(ssConfigCategory);
- Vector vTypes = new Vector();
- for (int idx = 0; idx < ssfProxies.length; idx++) {
- // Do not call ISubSystemConfigurationProxy.getSystemTypes() directly. If
- // some one has overriden ISubSystemConfiguration.getSystemTypes(), the
- // proxy cannot return the correct list anymore. This is especially important
- // if the systemType <--> subsystemConfiguration association is dynamic!
-
- // FIXME MOB: This should be reviewed for lazy plugin loading, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=196942
- IRSESystemType[] types = ssfProxies[idx].getSubSystemConfiguration().getSystemTypes();
- for (int jdx = 0; jdx < types.length; jdx++) {
- IRSESystemType systemType = types[jdx];
- if (!vTypes.contains(systemType)) {
- RSESystemTypeAdapter a = (RSESystemTypeAdapter)systemType.getAdapter(RSESystemTypeAdapter.class);
- if (a!=null && a.isEnabled(systemType)) {
- vTypes.addElement(systemType);
- }
- }
- }
- }
- restrictSystemTypesTo = (IRSESystemType[])vTypes.toArray(new IRSESystemType[vTypes.size()]);
- }
- init(parent, showNewButton, showLabel);
- populateSSFactoryCategory = ssConfigCategory;
- populateConnectionCombo(connectionCombo, defaultConnection, ssConfigCategory);
- 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.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 numColumns 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 read-only 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 read-only 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 combo 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, IRSESystemType systemType,
- IHost defaultConnection, boolean preSelectIfNoMatch)
- {
- return populateConnectionCombo(combo, systemType, defaultConnection, preSelectIfNoMatch, false);
- }
-
- /**
- * Populates a read-only 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 combo composite to populate
- * @param systemType the system type to restrict the connection list to. Pass null 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, IRSESystemType systemType, IHost defaultConnection,
- boolean preSelectIfNoMatch, boolean appendToCombo)
- {
- boolean matchFound = false;
- IHost[] additionalConnections = null;
- if (systemType == null) {
- additionalConnections = RSECorePlugin.getTheSystemRegistry().getHosts();
- if (additionalConnections!=null) {
- boolean filtered = false;
- List validHosts = new ArrayList(additionalConnections.length);
- for (int i=0; i<additionalConnections.length; i++) {
- IRSESystemType curSysType = additionalConnections[i].getSystemType();
- RSESystemTypeAdapter a = (RSESystemTypeAdapter)curSysType.getAdapter(RSESystemTypeAdapter.class);
- if (a.isEnabled(curSysType)) {
- validHosts.add(additionalConnections[i]);
- } else {
- filtered = true;
- }
- }
- if (filtered) {
- if (validHosts.size()==0) {
- additionalConnections = null;
- } else {
- additionalConnections = (IHost[])validHosts.toArray(new IHost[validHosts.size()]);
- }
- }
- }
- }
- else {
- RSESystemTypeAdapter a = (RSESystemTypeAdapter)systemType.getAdapter(RSESystemTypeAdapter.class);
- if (a.isEnabled(systemType)) {
- additionalConnections = RSECorePlugin.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 read-only connection combobox instance with system connections for the given
- * array of system types.
- * @param combo 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, IRSESystemType[] systemTypes, IHost defaultConnection)
- {
- boolean match = false;
- boolean anyMatch = false;
- for (int idx=0; idx<systemTypes.length; idx++)
- {
- IRSESystemType systemType = systemTypes[idx];
- RSESystemTypeAdapter a = (RSESystemTypeAdapter)systemType.getAdapter(RSESystemTypeAdapter.class);
- if (a.isEnabled(systemType)) {
- match = populateConnectionCombo(combo, systemType, defaultConnection, false, true);
- if (match)
- anyMatch = true;
- }
- }
- if (!anyMatch && (combo.getItemCount()>0))
- //combo.select(0);
- select(0);
- }
- /**
- * Populates a read-only connection combobox instance with system connections which have subsystems
- * owned by the given subsystem factory.
- * <p>
- * @param combo composite to populate
- * @param ssConfig 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 ssConfig, IHost defaultConnection)
- {
- connections = RSECorePlugin.getTheSystemRegistry().getHostsBySubSystemConfiguration(ssConfig);
- return addConnections(combo, connections, defaultConnection);
- }
- /**
- * Populates a read-only connection combobox instance with system connections which have subsystems
- * owned by a subsystem factory of the given subsystem factory id.
- * <p>
- * @param combo composite to populate
- * @param defaultConnection the default system connection to preselect.
- * @param ssConfigId 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 ssConfigId, IHost defaultConnection)
- {
- org.eclipse.rse.core.model.ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration config = sr.getSubSystemConfiguration(ssConfigId);
- connections = sr.getHostsBySubSystemConfiguration(config);
- return addConnections(combo, connections, defaultConnection);
- }
-
- /**
- * Populates a read-only connection combobox instance with system connections which have subsystems
- * owned by a subsystem factory of the given subsystem factory category.
- * <p>
- * @param combo composite to populate
- * @param defaultConnection the default system connection to preselect.
- * @param ssConfigCategory 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 ssConfigCategory)
- {
- connections = RSECorePlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory(ssConfigCategory);
- return addConnections(combo, connections, defaultConnection);
- }
-
- /**
- * An attempt to get some abstraction
- */
- private boolean addConnections(Combo combo, IHost[] connections, IHost defaultConnection)
- {
- //bug 196936: filter connections for valid system types only
- boolean filtered = false;
- List filteredConnections = new ArrayList(connections.length);
- for (int i=0; i<connections.length; i++) {
- IRSESystemType systemType = connections[i].getSystemType();
- RSESystemTypeAdapter a = (RSESystemTypeAdapter)systemType.getAdapter(RSESystemTypeAdapter.class);
- if (a!=null && a.isEnabled(systemType)) {
- filteredConnections.add(connections[i]);
- } else {
- filtered = true;
- }
-
- }
- if (filtered) {
- connections = (IHost[])filteredConnections.toArray(new IHost[filteredConnections.size()]);
- this.connections = connections;
- }
- 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 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.
- */
- 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 ISystemResourceChangeEvents.EVENT_ADD:
- case ISystemResourceChangeEvents.EVENT_ADD_RELATIVE:
- case ISystemResourceChangeEvents.EVENT_DELETE_MANY:
- case ISystemResourceChangeEvents.EVENT_RENAME:
- if ( src instanceof IHost )
- {
- // if RENAME, update showQualifiedNames in case it changed
- if ( type == ISystemResourceChangeEvents.EVENT_RENAME )
- showQualifiedNames = SystemPreferencesManager.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;
- RSECorePlugin.getTheSystemRegistry().addSystemResourceChangeListener(this);
- }
- else
- {
- // ----------------------------------------
- // remove register with system registry for events
- // ----------------------------------------
- listeningForConnectionEvents = false;
- RSECorePlugin.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;
- RSECorePlugin.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 e07ab5961..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [195399] Improve String display for default port 0
- *******************************************************************************/
-
-package org.eclipse.rse.ui.widgets;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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(NLS.bind(SystemPropertyResources.RESID_PORT_DYNAMICSELECT, new Integer(0)));
- 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
- }
- }
-
-}
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 590b8bb39..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServiceElement.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [252708] Saving Profile Job happens when not changing Property Values on Connections
- *******************************************************************************/
-
-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()
- {
- // for bug 252708 - should only be doing a commit if a child has changed
- if (_childChanged){
- 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 0e5469c11..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ConnectorServicesForm.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-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 _descriptionVerbiage;
-
- 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);
- propertiesLabel.setToolTipText(SystemResources.RESID_PROPERTIES_PROPERTIES_TOOLTIP);
- 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);
- _descriptionVerbiage = new Text(descriptionComposite, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
- _descriptionVerbiage.setText(getCurrentVerbiage());
- _descriptionVerbiage.setEditable(false);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.widthHint = 150;
- gridData.verticalAlignment = GridData.BEGINNING;
- _descriptionVerbiage.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);
- _descriptionVerbiage.setText(getCurrentVerbiage());
- }
- });
-
- 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 getCurrentVerbiage()
- {
- 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$
- }
- }
- }
-}
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 00c520dfa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/FactoryServiceElement.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David Dykstal (IBM) - [217556] remove service subsystem types
- *******************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.core.model.DummyHost;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IDelegatingConnectorService;
-import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.services.IService;
-
-
-
-
-public class FactoryServiceElement extends ServiceElement
-{
-
- private ISubSystemConfiguration _factory;
- private ServiceElement[] _children;
-
-
- /**
- * Constructor. Used to accept an IServiceSubSystemConfiguration before RSE
- * 3.0
- *
- * @since 3.0
- */
- public FactoryServiceElement(IHost host, ISubSystemConfiguration factory)
- {
- super(host, null);
- _factory = factory;
- }
-
- public String getName()
- {
- return _factory.getId();
- }
-
- public String getDescription()
- {
- return _factory.getDescription();
- }
-
- /**
- * Return the subsystem configuration related to this service element. Used
- * to return an IServiceSubSystemConfiguration before RSE 3.0.
- *
- * @since 3.0
- */
- public ISubSystemConfiguration 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();
-
- ServiceServiceElement serviceElement = new ServiceServiceElement(host, this, getService());
-
- IConnectorService connectorService = getConnectorService();
- if (connectorService != null && !(connectorService instanceof IDelegatingConnectorService))
- {
- _children = new ServiceElement[2];
- _children[0] = serviceElement;
- _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);
- }
- }
- }
- else
- {
- _children = new ServiceElement[1];
- _children[0] = serviceElement;
- }
- }
- 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()
- {
- if (_isSelected)
- {
- ServiceElement[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- //if (children[i].isSelected())
- children[i].commit();
- }
- }
- }
-
- public void revert()
- {
- ServiceElement[] children = getChildren();
- for (int i = 0; i < children.length; i++)
- {
- children[i].revert();
- }
- }
-
-}
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 66f3b3396..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertyElement.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.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.internal.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());
- }
- }
-}
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 f38643fd6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/PropertySetServiceElement.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.ui.widgets.services;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ILabeledObject;
-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()
- {
- if (_propertySet instanceof ILabeledObject) {
- ILabeledObject ps = (ILabeledObject) _propertySet;
- return ps.getLabel();
- }
- 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();
- }
- }
-
-}
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 39ced1656..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/RootServiceElement.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [252708] Saving Profile Job happens when not changing Property Values on Connections
- *******************************************************************************/
-
-package org.eclipse.rse.ui.widgets.services;
-
-import org.eclipse.rse.internal.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()
- {
- // for bug 252708 - should only be doing a commit if a child has changed
- if (_childChanged){
- 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();
- }
- }
-
-}
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 c91653d7e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServerLauncherPropertiesServiceElement.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.ui.widgets.services;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ILabeledObject;
-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;
- private boolean _userModified = false;
-
- public ServerLauncherPropertiesServiceElement(IHost host, ServiceElement parent, IServerLauncherProperties launcherProperties)
- {
- super(host, parent, launcherProperties);
- _launcherProperties = launcherProperties;
- }
-
- public String getName()
- {
- if (_launcherProperties instanceof ILabeledObject) {
- ILabeledObject lp = (ILabeledObject) _launcherProperties;
- return lp.getLabel();
- }
- 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)
- {
- _userModified = true;
- _launcherProperties.restoreFromProperties();
- _launcherProperties.commit();
- getParent().childChanged(element);
- }
-
- public boolean userModified()
- {
- return _userModified;
- }
-
- public void commit()
- {
- super.commit();
-
- }
-
- public void revert()
- {
- super.revert();
- }
-
- public IServerLauncherProperties getServerLauncherProperties()
- {
- return _launcherProperties;
- }
-}
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 047b94a1d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceElement.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * David McKnight (IBM) - [252708] Saving Profile Job happens when not changing Property Values on Connections
- *******************************************************************************/
-
-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;
-
- /**
- * Indicates whether a child of this element has changed
- * this is used to determine whether or not a commit is required
- *
- * @since 3.1
- */
- protected boolean _childChanged = 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)
- {
- _childChanged = true;
- 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 b39a6481d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServiceTableContentProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.ui.widgets.services;
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-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;
- }
-}
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 5a0357e8c..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, 2008 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:
- * David McKnight (IBM) [196632] make sure selected element is marked selected
- * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
- *******************************************************************************/
-
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemPropertySheetForm;
-import org.eclipse.rse.ui.SystemBaseForm;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-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.Shell;
-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 _descriptionVerbiage;
-
- public ServicesForm(Shell shell, ISystemMessageLine msgLine)
- {
- super(shell, 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);
- factoryLabel.setToolTipText(SystemResources.RESID_PROPERTIES_FACTORIES_TOOLTIP);
- 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);
- _descriptionVerbiage = new Text(parent, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
- _descriptionVerbiage.setText(getCurrentVerbiage());
- _descriptionVerbiage.setEditable(false);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.widthHint = 150;
- _descriptionVerbiage.setLayoutData(gridData);
-
- _factoryViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- ISelection selection = event.getSelection();
- if (selection instanceof StructuredSelection)
- {
- StructuredSelection ss = (StructuredSelection)selection;
-
- ServiceElement firstElement = (ServiceElement)ss.getFirstElement();
- if (firstElement != null)
- {
- _factoryViewer.setChecked(firstElement, true);
- unCheckOthers(firstElement);
- if (!firstElement.isSelected())
- firstElement.setSelected(true);
- _serviceViewer.setInput(firstElement);
- _descriptionVerbiage.setText(getCurrentVerbiage());
- }
- }
- }
- });
-
- _serviceViewer.addSelectionChangedListener(new ISelectionChangedListener()
- {
- public void selectionChanged(SelectionChangedEvent event)
- {
- ISelection selection = event.getSelection();
- _propertiesViewer.selectionChanged(selection);
- _descriptionVerbiage.setText(getCurrentVerbiage());
- }
- });
-
- 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);
-
-
- _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());
- _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);
- _descriptionVerbiage.setText(getCurrentVerbiage());
- }
-
- 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 getCurrentVerbiage()
- {
- 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$
- }
-
-}
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 d5550f30d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemNewConnectionWizardPage.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.wizards.newconnection.ISystemNewConnectionWizardPage;
-import org.eclipse.rse.ui.wizards.newconnection.RSEAbstractNewConnectionWizard;
-import org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizardMainPage;
-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.ui.subsystems.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 RSEAbstractNewConnectionWizard
- */
- public RSEAbstractNewConnectionWizard getNewConnectionWizard()
- {
- if (getWizard() instanceof RSEAbstractNewConnectionWizard)
- return (RSEAbstractNewConnectionWizard)getWizard();
-
- return null;
- }
-
- /**
- * Get the main page of RSEDefaultNewConnectionWizard, which contains all user enter connection attributes
- */
- public RSEDefaultNewConnectionWizardMainPage getMainPage() {
- RSEAbstractNewConnectionWizard ourWizard = getNewConnectionWizard();
- if (ourWizard != null) {
- IWizardPage wizardPage = ourWizard.getStartingPage();
- if (wizardPage instanceof RSEDefaultNewConnectionWizardMainPage) {
- return (RSEDefaultNewConnectionWizardMainPage)wizardPage;
- }
- }
- return null;
- }
-
- /**
- * Get the SystemConnectionForm of the main page of SystemNewConnectionWizard, which contains all user enter
- * connection attributes
- */
- public SystemConnectionForm getMainPageForm()
- {
- RSEAbstractNewConnectionWizard ourWizard = getNewConnectionWizard();
- if (ourWizard != null) {
- //String[] systemTypes = parentFactory.getSystemTypes();
- //IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemType(systemTypes[0]);
- IWizardPage wizardPage = ourWizard.getStartingPage();
-
- if (wizardPage instanceof RSEDefaultNewConnectionWizardMainPage) {
- return ((RSEDefaultNewConnectionWizardMainPage)wizardPage).getSystemConnectionForm();
- }
- 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 5c036b70d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizard.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- ********************************************************************************/
-
-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.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.
- * </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;
-
- /**
- * 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;
- }
-
- // ----------------------------
- // 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 fbd27f830..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/AbstractSystemWizardPage.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [216252] canceled --> cancelled in comments
- *******************************************************************************/
-
-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.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.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},
- * propagating 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)}.
- * </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 ISystemMessageLine msgLine;
- private String helpId;
- private Composite parentComposite;
- private SystemMessage pendingMessage, pendingErrorMessage;
-
- /**
- * 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(IWizard 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.
- */
- 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 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
- // -----------------------
-
- public void dispose() {
- super.dispose();
-
- // Once the page is disposed, the widgets are not longer accessible
- msgLine = null;
- input = null;
- parentComposite = null;
- pendingMessage = null;
- pendingErrorMessage = null;
- }
-
- /**
- * 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);
- }
-
- msgLine = new RSEDialogPageMessageLine(this);
- if (pendingMessage != null) setMessage(pendingMessage);
- if (pendingErrorMessage != null) setErrorMessage(pendingErrorMessage);
-
- 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...
- // -----------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearErrorMessage()
- */
- public void clearErrorMessage()
- {
- if (msgLine != null && getControl() != null && !getControl().isDisposed())
- msgLine.clearErrorMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearMessage()
- */
- public void clearMessage()
- {
- if (msgLine != null && getControl() != null && !getControl().isDisposed())
- msgLine.clearMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getSystemErrorMessage()
- */
- public SystemMessage getSystemErrorMessage()
- {
- if (msgLine!=null)
- return msgLine.getSystemErrorMessage();
- else
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public void setErrorMessage(SystemMessage message)
- {
- if (msgLine!=null)
- {
- if (message != null)
- msgLine.setErrorMessage(message);
- else
- msgLine.clearErrorMessage();
- }
- else // not configured yet
- pendingErrorMessage = message;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.Throwable)
- */
- 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;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public void setMessage(SystemMessage message)
- {
- if (msgLine!=null)
- msgLine.setMessage(message);
- else // not configured yet
- pendingMessage = message;
- }
-
- /**
- * <b>Note:</b> Never override this method as long the {@link ISystemMessageLine}
- * construct is not eliminated from RSE! Overriding does lead easely to {@link StackOverflowError}s
- * if the subclass implementation does call the wrong methods!
- *
- * @see org.eclipse.jface.wizard.WizardPage#setErrorMessage(java.lang.String)
- */
- public void setErrorMessage(String message) {
- super.setErrorMessage(message);
- }
-
- /**
- * <b>Note:</b> Never override this method as long the {@link ISystemMessageLine}
- * construct is not eliminated from RSE! Overriding does lead easily to {@link StackOverflowError}s
- * if the subclass implementation does call the wrong methods!
- *
- * @see org.eclipse.jface.wizard.WizardPage#setMessage(java.lang.String, int)
- */
- public void setMessage(String newMessage, int newType) {
- super.setMessage(newMessage, newType);
- }
-
- /**
- * <b>Note:</b> Never override this method as long the {@link ISystemMessageLine}
- * construct is not eliminated from RSE! Overriding does lead easily to {@link StackOverflowError}s
- * if the subclass implementation does call the wrong methods!
- *
- * @see org.eclipse.jface.dialogs.DialogPage#setMessage(java.lang.String)
- */
- public void setMessage(String message) {
- super.setMessage(message);
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
-
- /**
- * 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>
- * 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/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/RSEDialogPageMessageLine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java
deleted file mode 100644
index 45c2b4095..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDialogPageMessageLine.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.ui.wizards;
-
-import org.eclipse.jface.dialogs.DialogPage;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-
-/**
- * Message line interface implementation which forwards the calls
- * to the associated parent dialog page.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RSEDialogPageMessageLine implements ISystemMessageLine {
- private final DialogPage page;
- private SystemMessage errorSystemMessage;
-
- /**
- * Constructor.
- *
- * @param dialogPage The parent dialog page. Must be not <code>null</code>.
- */
- public RSEDialogPageMessageLine(DialogPage dialogPage) {
- assert dialogPage != null;
- page = dialogPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearErrorMessage()
- */
- public void clearErrorMessage() {
- assert page != null;
- if (page.getErrorMessage() != null) page.setErrorMessage(null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#clearMessage()
- */
- public void clearMessage() {
- assert page != null;
- page.setMessage(null, IMessageProvider.NONE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getErrorMessage()
- */
- public String getErrorMessage() {
- assert page != null;
- return page.getErrorMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getMessage()
- */
- public String getMessage() {
- assert page != null;
- return page.getMessage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#getSystemErrorMessage()
- */
- public SystemMessage getSystemErrorMessage() {
- return errorSystemMessage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.String)
- */
- public void setErrorMessage(String message) {
- assert page != null;
- page.setErrorMessage(message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public void setErrorMessage(SystemMessage message) {
- errorSystemMessage = message;
- if (errorSystemMessage != null) setErrorMessage(errorSystemMessage.getLevelOneText());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.Throwable)
- */
- public void setErrorMessage(Throwable exception) {
- if (exception != null) setErrorMessage(exception.getLocalizedMessage());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setMessage(java.lang.String)
- */
- public void setMessage(String message) {
- assert page != null;
- page.setMessage(message, IMessageProvider.INFORMATION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.messages.ISystemMessageLine#setMessage(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public void setMessage(SystemMessage message) {
- if (message != null) setMessage(message.getLevelOneText());
- }
-
-}
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 0b0261b12..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Javier Montalvo Orus (Symbian) - [188146] Incorrect "FTP Settings" node in Property Sheet for Linux connection
- * Martin Oberhuber (Wind River) - [190231] Move ISubSystemPropertiesWizardPage from UI to Core
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * David Dykstal (IBM) - [232585] adding help for new subsystem wizard page
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.DummyHost;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-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.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.widgets.services.ConnectorServiceElement;
-import org.eclipse.rse.ui.widgets.services.FactoryServiceElement;
-import org.eclipse.rse.ui.widgets.services.PropertySetServiceElement;
-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.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard;
-import org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizardMainPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-
-public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizardPage
-{
- private ServicesForm _form;
- private ISubSystemConfiguration _selectedConfiguration;
- 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)
- {
- SystemWidgetHelpers.setHelp(parent, "org.eclipse.rse.ui.ServiceSubsystemWizardPage"); //$NON-NLS-1$
- _form = new ServicesForm(parent.getShell(), getMessageLine());
- Control control = _form.createContents(parent);
-
- ServiceElement[] elements = getServiceElements();
- _root = new RootServiceElement(elements);
- _form.init(_root);
-
- return control;
- }
-
-
- protected ServiceElement[] getServiceElements()
- {
- if (_serviceElements == null)
- {
-
-
- ISubSystemConfiguration currentFactory = getSubSystemConfiguration();
-
- IRSESystemType systemType = getMainPage() != null && getMainPage().getWizard() instanceof RSEDefaultNewConnectionWizard ? ((RSEDefaultNewConnectionWizard)getMainPage().getWizard()).getSystemType() : null;
- ISubSystemConfiguration[] factories = getServiceSubSystemConfigurations(systemType, currentFactory.getServiceType());
-
- IHost dummyHost = null;
- if (getWizard() instanceof RSEDefaultNewConnectionWizard)
- {
- RSEDefaultNewConnectionWizard wizard = (RSEDefaultNewConnectionWizard)getWizard();
- if (wizard.getStartingPage() instanceof RSEDefaultNewConnectionWizardMainPage) {
- dummyHost = new DummyHost(((RSEDefaultNewConnectionWizardMainPage)wizard.getStartingPage()).getSystemConnectionForm().getHostName(),
- wizard.getSystemType());
- }
- }
-
- // create elements for each
- _serviceElements = new ServiceElement[factories.length];
- for (int i = 0; i < factories.length; i++)
- {
- ISubSystemConfiguration factory = factories[i];
- _serviceElements[i] = new FactoryServiceElement(dummyHost, factory);
-
-
- //if (factory == currentFactory)
- if (i == 0) // use first
- {
- _serviceElements[i].setSelected(true);
- }
-
- }
- }
- return _serviceElements;
- }
-
- /**
- * @param systemType
- * @param serviceType
- * @return
- * @since 3.0 returning ISubSystemConfiguration instead of
- * IServiceSubSystemConfiguration
- */
- protected ISubSystemConfiguration[] getServiceSubSystemConfigurations(IRSESystemType systemType, Class serviceType)
- {
- List results = new ArrayList();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] configs = sr.getSubSystemConfigurationsBySystemType(systemType, false);
-
- for (int i = 0; i < configs.length; i++)
- {
- ISubSystemConfiguration config = configs[i];
- if (config.getServiceType() == serviceType)
- {
- results.add(config);
- }
- }
-
- return (ISubSystemConfiguration[])results.toArray(new ISubSystemConfiguration[results.size()]);
- }
-
- public boolean isPageComplete()
- {
- return true;
- }
-
- public boolean performFinish()
- {
- if (_root != null)
- {
- _root.commit();
-
- _selectedConfiguration = ((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];
- if(el.isSelected())
- {
- 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)
- {
- if(cch[0] instanceof ServerLauncherPropertiesServiceElement)
- {
- ServerLauncherPropertiesServiceElement result = (ServerLauncherPropertiesServiceElement)cch[0];
- results.add(result);
- }
- }
- }
- }
- }
- }
- }
- }
- return (ServerLauncherPropertiesServiceElement[])results.toArray(new ServerLauncherPropertiesServiceElement[results.size()]);
- }
-
- public boolean applyValues(ISubSystem ss) {
- if (_selectedConfiguration != null) {
- ISubSystemConfiguration currentConfiguration = ss.getSubSystemConfiguration();
- if (currentConfiguration != null) {
- if (_selectedConfiguration != currentConfiguration) {
- ss.switchServiceFactory(_selectedConfiguration);
- }
- if (_root != null) {
- IConnectorService connectorService = ss.getConnectorService();
- // process server launcher properties
- ServerLauncherPropertiesServiceElement[] elements = getPropertiesServiceElement();
- if (elements.length > 0) {
- ServerLauncherPropertiesServiceElement element = elements[0];
- if (element.userModified()) {
- IServerLauncherProperties properties = element.getServerLauncherProperties();
- properties.saveToProperties();
- connectorService.setRemoteServerLauncherProperties(properties);
- }
- }
- /*
- * Process connector service property sets
- * The connector service element (there should be only one) is attached to a dummy host.
- * Therefore the property sets containing the new values can me moved from the (dummy)
- * connector service to the real connector service.
- */
- List connectorServiceElements = getConnectorServiceElements(_root);
- for (Iterator z = connectorServiceElements.iterator(); z.hasNext();) {
- ConnectorServiceElement element = (ConnectorServiceElement) z.next();
- PropertySetServiceElement[] psElements = element.getPropertySets();
- for (int i = 0; i < psElements.length; i++) {
- PropertySetServiceElement psElement = psElements[i];
- IPropertySet set = psElement.getPropertySet();
- connectorService.addPropertySet(set); // moves the property set, replacing the old one
- }
- }
- }
- }
- }
- return true;
- }
-
- /**
- * Returns the list of connector service elements from a given service element.
- * @param root The root element from which to search
- * @return A list of all found connector service elements. The list will be empty if non
- * are found.
- */
- private List getConnectorServiceElements(ServiceElement root) {
- List result = new ArrayList(10);
- if (!(root instanceof FactoryServiceElement) || root.isSelected())
- {
- if (root instanceof ConnectorServiceElement) {
- result.add(root);
- }
-
- ServiceElement[] children = root.getChildren();
- if (children != null) {
- for (int i = 0; i < children.length; i++) {
- ServiceElement child = children[i];
- result.addAll(getConnectorServiceElements(child));
- }
- }
- }
- return result;
- }
-
- /**
- * @since 3.0 taking ISubSystemConfiguration instead of
- * IServiceSubSystemConfiguration
- */
- protected IConnectorService getCustomConnectorService(ISubSystemConfiguration 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/SystemNewProfileWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java
deleted file mode 100644
index 4eb6063a8..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizard.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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 = RSECorePlugin.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 635618b0f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewProfileWizardMainPage.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards;
-import java.util.Vector;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.ui.SystemResources;
-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.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);
- ISystemProfile[] profiles = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfiles();
- Vector profileNames = new Vector(profiles.length);
- for (int i=0; i<profiles.length; i++) {
- profileNames.add(profiles[i].getName());
- }
- nameValidator = new ValidatorProfileName(profileNames);
- 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$
-
- // Verbiage
- addGrowableFillerLine(composite_prompts, nbrColumns);
- addSeparatorLine(composite_prompts, nbrColumns);
- SystemWidgetHelpers.createVerbiage(composite_prompts, SystemResources.RESID_NEWPROFILE_VERBIAGE, 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/newconnection/IRSEDynamicNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSEDynamicNewConnectionWizard.java
deleted file mode 100644
index cf2eb98f9..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSEDynamicNewConnectionWizard.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.newconnection;
-
-import org.eclipse.rse.core.IRSESystemType;
-
-/**
- * Interface to be implemented from dynamic RSE new connection
- * wizards in order to influence attributes and behaviour of the
- * wizard based on the current system state.
- */
-public interface IRSEDynamicNewConnectionWizard {
-
- /**
- * Validate the catgory id the wizard is proposed to be associated with.
- * Dependent on the specified system type, the wizard may change the category
- * id or just return the proposed category id.
- *
- * @param systemType The system type. Must be not <code>null</code>.
- * @param proposedCategoryId The proposed category id. Might be <code>null</code>.
- * @return The category id or <code>null</code>.
- */
- public String validateCategoryId(IRSESystemType systemType, String proposedCategoryId);
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSENewConnectionWizardDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSENewConnectionWizardDescriptor.java
deleted file mode 100644
index 79c6285bb..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/IRSENewConnectionWizardDescriptor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.newconnection;
-
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardDescriptor;
-
-/**
- * RSE new connection wizard descriptor.
- */
-public interface IRSENewConnectionWizardDescriptor extends IRSEWizardDescriptor {
-
- /**
- * Returns a semicolon separated list of system type id's this
- * wizard is used for. The system type id's might contain wildcards
- * ('*' or '?'). The method will return <code>null</code> if the
- * attribute is not set.
- *
- * @return The list of system type id's or <code>null</code>.
- */
- public String getDeclaredSystemTypeIds();
-
- /**
- * Returns the list of system type ids the wizard is supporting.
- * The list is combined from the list of currently registered
- * system types cleaned up by the ones not matching the declared
- * system type ids.
- *
- * @return The list of supported system type ids. May be empty,
- * but never <code>null</code>.
- */
- public String[] getSystemTypeIds();
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/ISystemNewConnectionWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/ISystemNewConnectionWizardPage.java
deleted file mode 100644
index dd90c40aa..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/ISystemNewConnectionWizardPage.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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.
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- *********************************************************************************/
-
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import org.eclipse.rse.core.model.ISubSystemConfigurator;
-
-
-/**
- * Interface that all subsystem configuration supplied pages contributed to the
- * New Connection wizard must implement. Moved from Core to UI in RSE 3.0
- *
- * @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)
- * @since 3.0 moved from Core to UI and extends ISubSystemConfigurator
- */
-public interface ISystemNewConnectionWizardPage extends ISubSystemConfigurator {
-
- /**
- * This is called when the users presses Finish. All that should be done here is validation
- * of the input.
- * @return 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();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEAbstractNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEAbstractNewConnectionWizard.java
deleted file mode 100644
index 26d1940b6..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEAbstractNewConnectionWizard.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2007 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Abstract base implementation of the RSE new connection wizard.
- */
-public abstract class RSEAbstractNewConnectionWizard extends Wizard implements ISelectionChangedListener {
- private IRSESystemType systemType;
- private boolean isBusy;
-
- /**
- * Constructor.
- */
- public RSEAbstractNewConnectionWizard() {
- systemType = null;
- isBusy = false;
-
- setNeedsProgressMonitor(true);
- setForcePreviousAndNextButtons(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#dispose()
- */
- public void dispose() {
- super.dispose();
- systemType = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.IRSENewConnectionWizardDelegate#getSystemType()
- */
- public IRSESystemType getSystemType() {
- return systemType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (event != null && event.getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- Object candidate = selection.getFirstElement();
- if (candidate instanceof IRSESystemType) systemType = (IRSESystemType)candidate;
- }
- }
-
- /**
- * Sets the system cursor to a wait cursor. This method can be called in
- * a display thread only!
- *
- * @param busy <code>True</code> if to show the wait cursor, <code>false</code> otherwise.
- */
- protected void setBusyCursor(boolean busy) {
- assert Display.findDisplay(Thread.currentThread()) != null;
-
- Shell shell = getShell();
- if (isBusy != busy) {
- if (shell != null) {
- shell.setCursor(busy ? shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT) : null);
- }
- isBusy = busy;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java
deleted file mode 100644
index be0479b86..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2000, 2008 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
- * Uwe Stieber (Wind River) - [192202] Default RSE new connection wizard does not allow to query created host instance anymore
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [243332] Removing wizard page caused subsystem to be removed
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-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.ISubSystemConfigurator;
-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.internal.ui.SystemResources;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveHelpers;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter;
-
-/**
- * Standard RSE new connection wizard implementation.
- */
-public class RSEDefaultNewConnectionWizard extends RSEAbstractNewConnectionWizard {
-
- private RSEDefaultNewConnectionWizardMainPage mainPage;
- private ISystemNewConnectionWizardPage[] subsystemConfigurationSuppliedWizardPages;
-
- private Map 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 selectedContext = null;
- private static String lastProfile = null;
- private IHost createdHost = null;
-
- /**
- * Constructor.
- */
- public RSEDefaultNewConnectionWizard() {
- String[] profiles = RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfileNames();
- // normalize the profiles by sorting our null or empty profile names
- List normalized = new LinkedList();
- for (int i = 0; i < profiles.length; i++) {
- if (profiles[i] != null && !"".equals(profiles[i].trim())) normalized.add(profiles[i]); //$NON-NLS-1$
- }
- activeProfileNames = (String[])normalized.toArray(new String[normalized.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#dispose()
- */
- public void dispose() {
- super.dispose();
-
- mainPage = null;
- subsystemConfigurationSuppliedWizardPages = null;
- ssfWizardPagesPerSystemType.clear();
- defaultUserId = null;
- defaultHostName = null;
- defaultConnectionName = null;
- activeProfileNames = null;
- privateProfileIndex = -1;
- privateProfile = null;
- selectedContext = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.AbstractNewConnectionWizard#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- super.selectionChanged(event);
- if (mainPage != null && getSystemType() != null) {
- IRSESystemType systemType = getSystemType();
- mainPage.setTitle(getPageTitle());
- mainPage.setSystemType(systemType);
- subsystemConfigurationSuppliedWizardPages = getAdditionalWizardPages(systemType);
- }
- }
-
- /**
- * Creates the wizard pages. This method is an override from the parent Wizard class.
- */
- public void addPages() {
- try {
- // reset the remembered created host instance
- createdHost = null;
-
- mainPage = createMainPage(getSystemType());
-
- SystemConnectionForm form = mainPage.getSystemConnectionForm();
- if (form != null) {
- form.setCurrentlySelectedConnection(selectedContext);
-
- if (defaultUserId != null) form.setUserId(defaultUserId);
-
- // bugzilla#175153: setCurrentlySelectedConnection is filling in the name from the selected
- // connection. As this is not wanted, set the connection name field always to be empty, except
- // there had been a default connection name explicitly set from outside.
- if (defaultConnectionName != null) form.setConnectionName(defaultConnectionName);
- else form.setConnectionName(""); //$NON-NLS-1$
-
- if (defaultHostName != null) form.setHostName(defaultHostName);
- }
-
- if (mainPage != null && getSystemType() != null) mainPage.setSystemType(getSystemType());
-
- updateDefaultSelectedProfile();
-
- addPage(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 RSEDefaultNewConnectionWizardMainPage createMainPage(IRSESystemType systemType) {
- if (mainPage == null) {
- mainPage = new RSEDefaultNewConnectionWizardMainPage(this, getPageTitle(), SystemResources.RESID_NEWCONN_PAGE1_DESCRIPTION);
- mainPage.setTitle(getPageTitle());
- mainPage.setSystemType(systemType);
- subsystemConfigurationSuppliedWizardPages = systemType != null ? getAdditionalWizardPages(systemType) : null;
- }
-
- return mainPage;
- }
-
- public String getPageTitle() {
-
- String pageTitle = null;
-
- if (getSystemType() == null) {
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_TITLE;
- } else {
- IRSESystemType onlySystemType = getSystemType();
-
- if (onlySystemType.isLocal()) {
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_LOCAL_TITLE;
- } else {
- pageTitle = SystemResources.RESID_NEWCONN_PAGE1_REMOTE_TITLE;
- pageTitle = SystemMessage.sub(pageTitle, "&1", onlySystemType.getLabel()); //$NON-NLS-1$
- }
- }
-
- return pageTitle;
- }
-
- /**
- * Calculates the default profile name to propose on the default new
- * connection wizard main page.
- *
- * <pre>
- * Expected order of default profile selection:
- * 1. If a connection is selected, the default profile is the one from the connection.
- * 2. If the wizard remembered the last profile and this last remembered profile is still
- * available and active, the remembered last profile is the default profile.
- * 3. If the default private system profile is availabe and active, the default private system profile
- * is the default profile.
- * 4. The first non-empty profile from the list of active profiles is the default profile.
- *
- * In case a profile name is not in the list of currently active profiles, the logic will
- * fall trough to the next lower level.
- * </pre>
- */
- protected void updateDefaultSelectedProfile() {
- if (mainPage == null) return;
-
- List profileNames = activeProfileNames != null ? Arrays.asList(activeProfileNames) : new ArrayList();
- mainPage.getSystemConnectionForm().setProfileNames(activeProfileNames);
-
- // 1. If a connection is selected, the default profile is the one from the connection.
- String defaultProfileName = selectedContext != null ? selectedContext.getSystemProfileName() : null;
- if (defaultProfileName == null || !profileNames.contains(defaultProfileName)) {
- // 3. If the wizard is invoked the 2nd time and a last profile is remembered, the last
- // profile is the default profile.
- if (lastProfile != null && "".equals(lastProfile)) lastProfile = null; //$NON-NLS-1$
- defaultProfileName = lastProfile;
- if (defaultProfileName == null || !profileNames.contains(defaultProfileName)) {
- // 2. If the wizard is invoked the 1st time, the default private system profile is the
- // default profile.
- ISystemProfile defaultPrivateProfile = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getDefaultPrivateSystemProfile();
- if (defaultPrivateProfile != null) defaultProfileName = defaultPrivateProfile.getName();
- if (defaultProfileName == null || !profileNames.contains(defaultProfileName)) {
- // 4. The first non-empty profile from the list of active profiles is the default profile.
- // Note: The profile names get normalized within the constructor.
- if (profileNames.size() > 0) defaultProfileName = (String)profileNames.get(0);
- }
- }
- }
-
- // set the default profile to the page and remember it.
- if (defaultProfileName != null) {
- mainPage.getSystemConnectionForm().setProfileNamePreSelection(defaultProfileName);
- // do not update the last selected profile marker if the default profile
- // name came for the selected context.
- if (selectedContext == null || !defaultProfileName.equals(selectedContext.getSystemProfileName()))
- lastProfile = defaultProfileName;
- }
-
- }
-
- /**
- * Set the currently selected context. Used to better default entry fields.
- */
- public void setSelectedContext(IHost selectedContext) {
- this.selectedContext = selectedContext;
- updateDefaultSelectedProfile();
- }
-
- /**
- * 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.getSystemConnectionForm().setUserId(userId);
- }
-
- /**
- * Preset the connection name
- */
- public void setConnectionName(String name) {
- defaultConnectionName = name;
- if (mainPage != null) mainPage.getSystemConnectionForm().setConnectionName(name);
- }
-
- /**
- * Preset the host name
- */
- public void setHostName(String name) {
- defaultHostName = name;
- if (mainPage != null) mainPage.getSystemConnectionForm().setHostName(name);
- }
-
- /**
- * Set's an error message to the wizard if a page, which is not the current page
- * is having a page error.
- */
- private void setPageError(IWizardPage page) {
- IWizardPage currentPage = getContainer().getCurrentPage();
- if (currentPage != page) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_WIZARD_PAGE_ERROR);
- if (currentPage instanceof WizardPage)
- ((WizardPage)currentPage).setErrorMessage(msg.getLevelOneText());
- }
- }
-
- private ISubSystemConfigurator[] getSubSystemConfigurators()
- {
- // what kind of subsystems do we have here?
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- IRSESystemType systemType = getSystemType();
- ISubSystemConfiguration[] configurations = sr.getSubSystemConfigurationsBySystemType(systemType, true);
-
- ArrayList configList = new ArrayList();
- for (int i = 0; i < configurations.length; i++){
- ISubSystemConfiguration configuration = configurations[i];
- ISubSystemConfigurator firstMatch = null;
- for (int j = 0; j < subsystemConfigurationSuppliedWizardPages.length; j++){
- ISystemNewConnectionWizardPage page = subsystemConfigurationSuppliedWizardPages[j];
- ISubSystemConfiguration pageConfiguration = page.getSubSystemConfiguration();
- if (configuration == pageConfiguration){ // found a match
- configList.add(page); // could be more than one
- if (firstMatch == null){
- firstMatch = page;
- }
- }
- }
- if (firstMatch == null){ // no match found so need to provide alternative
- class DefaultConfigurator implements ISubSystemConfigurator {
- private ISubSystemConfiguration _configuration;
- public DefaultConfigurator(ISubSystemConfiguration configuration){
- _configuration = configuration;
- }
-
- public boolean applyValues(ISubSystem ss) {
- return true;
- }
-
- public ISubSystemConfiguration getSubSystemConfiguration() {
- return _configuration;
- }
- }
- configList.add(new DefaultConfigurator(configuration));
- }
- }
- return (ISubSystemConfigurator[])configList.toArray(new ISubSystemConfigurator[configList.size()]);
-
- }
-
- /**
- * 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.getSystemConnectionForm().verify(true);
- if (!ok)
- setPageError(mainPage);
- else if (ok && hasAdditionalPages()) {
- for (int idx = 0; ok && (idx < subsystemConfigurationSuppliedWizardPages.length); idx++) {
- ok = subsystemConfigurationSuppliedWizardPages[idx].performFinish();
- if (!ok)
- setPageError((IWizardPage)subsystemConfigurationSuppliedWizardPages[idx]);
- }
- }
- if (ok) {
- boolean cursorSet = true;
- setBusyCursor(true);
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
-
- // 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 {
-
- ISubSystemConfigurator[] configurators = getSubSystemConfigurators();
-
- IRSESystemType systemType = getSystemType();
- SystemConnectionForm form = mainPage.getSystemConnectionForm();
- createdHost = sr.createHost(form.getProfileName(), systemType, form.getConnectionName(), form.getHostName(),
- form.getConnectionDescription(), form.getDefaultUserId(), form.getUserIdLocation(),
- configurators);
-
- setBusyCursor(false);
- cursorSet = false;
-
- // a tweak that is the result of UCD feedback. Phil
- if ((createdHost != null) && SystemPerspectiveHelpers.isRSEPerspectiveActive()) {
- if (systemType.getId().equals(IRSESystemType.SYSTEMTYPE_ISERIES_ID)) {
- ISubSystem[] objSubSystems = sr.getSubSystemsBySubSystemConfigurationCategory("nativefiles", createdHost); //$NON-NLS-1$
- if ((objSubSystems != null) && (objSubSystems.length > 0))// might be in product that doesn't have iSeries plugins
- RSEUIPlugin.getTheSystemRegistryUI().expandSubSystem(objSubSystems[0]);
- else
- RSEUIPlugin.getTheSystemRegistryUI().expandHost(createdHost);
- } else
- RSEUIPlugin.getTheSystemRegistryUI().expandHost(createdHost);
- }
-
- lastProfile = form.getProfileName();
- } 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;
- }
-
- /**
- * Returns the create host instance once the user pressed finished. The created
- * host instance will be reset to <code>null</code> once the wizard got disposed.
- *
- * @return The created host instance or <code>null</code>.
- */
- public IHost getCreatedHost() {
- return createdHost;
- }
-
- /**
- * Private method to get all the wizard pages from all the subsystem factories, given a
- * system type.
- *
- * @param systemType The system type to query the additional subsystem service pages for. Must be not <code>null</code>.
- */
- private ISystemNewConnectionWizardPage[] getAdditionalWizardPages(IRSESystemType systemType) {
- assert systemType != null;
- // this query is expensive, so only do it once...
- subsystemConfigurationSuppliedWizardPages = (ISystemNewConnectionWizardPage[])ssfWizardPagesPerSystemType.get(systemType);
- if (subsystemConfigurationSuppliedWizardPages == null) {
- // query all affected subsystems for their list of additional wizard pages...
- Vector additionalPages = new Vector();
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, true);
- for (int idx = 0; idx < factories.length; idx++) {
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factories[idx].getAdapter(ISubSystemConfigurationAdapter.class);
- if (adapter == null) {
- // try to activate bundle - FIXME should perhaps be done
- // earlier in the action that shows the wizard dialog?
- // And, is it really necessary to get the wizard pages that
- // early already?
- Platform.getAdapterManager().loadAdapter(factories[idx], ISubSystemConfigurationAdapter.class.getName());
- 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++) {
- if (pages[widx] instanceof IWizardPage){
- ((IWizardPage)pages[widx]).setWizard(this);
- }
-
- additionalPages.addElement(pages[widx]);
- }
- }
- }
-
- subsystemConfigurationSuppliedWizardPages = (ISystemNewConnectionWizardPage[])additionalPages.toArray(new ISystemNewConnectionWizardPage[additionalPages.size()]);
-
- ssfWizardPagesPerSystemType.put(systemType, subsystemConfigurationSuppliedWizardPages);
- }
- return subsystemConfigurationSuppliedWizardPages;
- }
-
- /**
- * Return true if there are additional pages. This decides whether to enable the Next button
- * on the main page
- */
- protected boolean hasAdditionalPages() {
- return (subsystemConfigurationSuppliedWizardPages != null) && (subsystemConfigurationSuppliedWizardPages.length > 0);
- }
-
- /**
- * Return the first additional page to show when user presses Next on the
- * main page. In RSE 3.0, the ISystemNewConnectionWizardPage return type was
- * moved from org.eclipse.rse.core into a UI plugin.
- *
- * @since 3.0
- */
- protected ISystemNewConnectionWizardPage getFirstAdditionalPage() {
- if ((subsystemConfigurationSuppliedWizardPages != null) && (subsystemConfigurationSuppliedWizardPages.length > 0)) {
- IWizardPage previousPage = mainPage;
- for (int idx = 0; idx < subsystemConfigurationSuppliedWizardPages.length; idx++) {
- ((IWizardPage)subsystemConfigurationSuppliedWizardPages[idx]).setPreviousPage(previousPage);
- previousPage = (IWizardPage)subsystemConfigurationSuppliedWizardPages[idx];
- }
- return subsystemConfigurationSuppliedWizardPages[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())
- return null;
- else {
- int index = getAdditionalPageIndex(page);
- if ((index == (subsystemConfigurationSuppliedWizardPages.length - 1)))
- // last page or page not found
- return null;
- return (IWizardPage)subsystemConfigurationSuppliedWizardPages[index + 1];
- }
- }
-
- /**
- * @see org.eclipse.rse.ui.wizards.newconnection.RSEAbstractNewConnectionWizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
- return null;
- }
-
- private int getAdditionalPageIndex(IWizardPage page) {
- for (int idx = 0; idx < subsystemConfigurationSuppliedWizardPages.length; idx++) {
- if (page == subsystemConfigurationSuppliedWizardPages[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 < subsystemConfigurationSuppliedWizardPages.length); idx++)
- ok = subsystemConfigurationSuppliedWizardPages[idx].isPageComplete();
- }
- return ok;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java
deleted file mode 100644
index 2b21e11f7..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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:
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- ********************************************************************************/
-
-package org.eclipse.rse.ui.wizards.newconnection;
-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.ui.ISystemConnectionFormCaller;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
-import org.eclipse.rse.ui.wizards.RSEDialogPageMessageLine;
-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.ui.PlatformUI;
-
-
-
-/**
- * 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 RSEDefaultNewConnectionWizardMainPage extends WizardPage implements ISystemConnectionFormCaller {
- private final String parentHelpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$;
-
- private SystemConnectionForm form;
- private final RSEDialogPageMessageLine messageLine;
-
- /**
- * Constructor. Use this when you want to supply your own title and
- * description strings.
- */
- public RSEDefaultNewConnectionWizardMainPage(IWizard wizard, String title, String description) {
- super(RSEDefaultNewConnectionWizardMainPage.class.getName());
-
- if (wizard != null) setWizard(wizard);
- if (title != null) setTitle(title);
- if (description != null) setDescription(description);
-
- messageLine = new RSEDialogPageMessageLine(this);
- }
-
- /**
- * Set the system type the page is working with.
- *
- * @param systemType The system type.
- */
- public void setSystemType(IRSESystemType systemType) {
- if (systemType != null) {
- // The page _always_ restrict the system connection form
- // to only one system type.
- getSystemConnectionForm().restrictSystemType(systemType);
- }
- }
-
- /**
- * Returns the associated system connection form instance. Override to
- * return custom system connection forms. As the system connection form
- * is accessed directly to set and query the managed data of this form,
- * this method must return always the same instance once the instance has
- * been created for each subsequent call, until the page is disposed!
- *
- * @see org.eclipse.rse.ui.SystemConnectionForm
- * @return The associated system connection form. Must be never <code>null</code>.
- */
- public SystemConnectionForm getSystemConnectionForm() {
- if (form == null) {
- form = new SystemConnectionForm(messageLine, this);
- form.setConnectionNameValidators(SystemConnectionForm.getConnectionNameValidators());
- }
- return form;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible && getSystemConnectionForm() != null && getSystemConnectionForm().getInitialFocusControl() != null) {
- getSystemConnectionForm().getInitialFocusControl().setFocus();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizardPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- getSystemConnectionForm().createContents(composite, SystemConnectionForm.CREATE_MODE, parentHelpId);
-
- setControl(composite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), parentHelpId);
- }
-
- /**
- * 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 (getSystemConnectionForm() != null)
- return getSystemConnectionForm().isPageComplete() && getSystemConnectionForm().isConnectionUnique();
-
- return false;
- }
-
- /**
- * Intercept of WizardPage so we know when Next is pressed
- */
- public IWizardPage getNextPage() {
- // 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
- if (!getSystemConnectionForm().verify(true)) return null;
-
- RSEDefaultNewConnectionWizard newConnWizard = getWizard() instanceof RSEDefaultNewConnectionWizard ? (RSEDefaultNewConnectionWizard)getWizard() : null;
- if (newConnWizard != null) {
- return (IWizardPage)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;
-
- RSEDefaultNewConnectionWizard newConnWizard = getWizard() instanceof RSEDefaultNewConnectionWizard ? (RSEDefaultNewConnectionWizard)getWizard() : null;
- if (newConnWizard != null) {
- return (isPageComplete() && newConnWizard.hasAdditionalPages());
- }
-
- return super.canFlipToNextPage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.ISystemConnectionFormCaller#systemTypeSelected(java.lang.String, boolean)
- */
- public void systemTypeSelected(IRSESystemType systemType, boolean duringInitialization) {
- // Not applicable: The Page is driving the system connection form and not the way around!!!
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
deleted file mode 100644
index 6f42a1d42..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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 158555 - newConnectionWizardDelegates can only be used once
- * Uwe Stieber (Wind River) - Reworked new connection wizard extension point.
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Uwe Stieber (Wind River) - [189426] System File/Folder Dialogs - New Connection Not Added to Drop Down
- * Martin Oberhuber (Wind River) - [235197][api] Unusable wizard after cancelling on first page
- * Uwe Stieber (Wind River) - [237816][api] restrictToSystemType does not work for RSEMainNewConnectionWizard
- * Uwe Stieber (Wind River) - [235084] New connection wizard can create connections of disabled type
- * Uwe Stieber (Wind River) - [248685] new connection wizard does not check the default selection against the restricted system type list
- *******************************************************************************/
-
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-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.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * The New Connection wizard. This wizard allows users to create new RSE connections.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, ISelectionProvider {
- /**
- * Dialog settings slot id: Last selected system type id within the wizard.
- * @since 3.0 made protected String public
- */
- public static final String LAST_SELECTED_SYSTEM_TYPE_ID = "lastSelectedSystemTypeId"; //$NON-NLS-1$
-
- // The selected context as passed in from the invoking class.
- // Just pass on to the wizards. Do not interpret here!
- // @see #setSelectedContext(ISelection).
- private ISelection selectedContext;
- // The connection context as determined from the invoking class
- // @see #setConnectionContext(IHost)
- private IHost connectionContext;
-
- private RSENewConnectionWizardRegistry wizardRegistry;
- private IWizard selectedWizard;
- private IRSESystemType selectedSystemType;
- private boolean selectedWizardCanFinishEarly;
-
- private RSENewConnectionWizardSelectionPage mainPage;
- private final List initializedWizards = new LinkedList();
- private final List selectionChangedListener = new LinkedList();
-
- private IRSESystemType[] restrictedSystemTypes;
- private boolean onlySystemType;
-
- /**
- * Constructor.
- */
- public RSEMainNewConnectionWizard() {
- super();
- setWindowTitle(SystemResources.RESID_NEWCONN_TITLE);
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
-
- // Initialize the dialog settings for this wizard
- IDialogSettings settings = RSEUIPlugin.getDefault().getDialogSettings();
- String sectionName = this.getClass().getName();
- if (settings.getSection(sectionName) == null) settings.addNewSection(sectionName);
- setDialogSettings(settings.getSection(sectionName));
-
- wizardRegistry = new RSENewConnectionWizardRegistry();
- selectedContext = null;
- selectedWizard = null;
- mainPage = new RSENewConnectionWizardSelectionPage(wizardRegistry);
- initializedWizards.clear();
- selectionChangedListener.clear();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#dispose()
- */
- public void dispose() {
- super.dispose();
-
- selectedContext = null;
- selectedSystemType = null;
- selectedWizardCanFinishEarly = false;
- mainPage = null;
- initializedWizards.clear();
- selectionChangedListener.clear();
- restrictedSystemTypes = null;
- onlySystemType = false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getDefaultPageImage()
- */
- public Image getDefaultPageImage() {
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD_ID);
- }
-
- /**
- * 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) {
- restrictToSystemTypes(new IRSESystemType[] { systemType });
- }
-
- /**
- * 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) {
- assert systemTypes != null;
-
- restrictedSystemTypes = systemTypes;
- onlySystemType = restrictedSystemTypes.length == 1;
- mainPage.restrictToSystemTypes(restrictedSystemTypes);
-
- if (onlySystemType && !restrictedSystemTypes[0].equals(selectedSystemType))
- selectedSystemType = restrictedSystemTypes[0];
- else if (restrictedSystemTypes.length > 0 && !Arrays.asList(restrictedSystemTypes).contains(selectedSystemType))
- selectedSystemType = null;
- else if (restrictedSystemTypes.length == 0)
- selectedSystemType = null;
-
- onSelectedSystemTypeChanged();
- }
-
- /**
- * Returns if or if not the main new connection wizard has been restricted to only
- * one system type.
- *
- * @return <code>True</code> if the wizard is restricted to only one system type, <code>false</code> otherwise.
- */
- public final boolean isRestrictedToSingleSystemType() {
- return onlySystemType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- assert listener != null;
- if (!selectionChangedListener.contains(listener)) selectionChangedListener.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- assert listener != null;
- selectionChangedListener.remove(listener);
- }
-
- /**
- * Notify the registered selection changed listener about a changed selection.
- */
- private void fireSelectionChanged() {
- if (getSelection() == null) return;
-
- SelectionChangedEvent event = new SelectionChangedEvent(this, getSelection());
- Iterator iterator = selectionChangedListener.iterator();
- while (iterator.hasNext()) {
- ISelectionChangedListener listener = (ISelectionChangedListener)iterator.next();
- listener.selectionChanged(event);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
- public ISelection getSelection() {
- ISelection selection = null;
-
- // The system type must be available to construct the selection as
- // the system type is per contract always the first element
- IRSESystemType selected = isRestrictedToSingleSystemType() ? restrictedSystemTypes[0] : selectedSystemType;
- if (selected != null) {
- List selectionElements = new ArrayList();
- selectionElements.add(selected);
- // The second element in the selection is the selected context of the
- // called as passed in to us (if available).
- if (selectedContext != null) {
- selectionElements.add(selectedContext);
- }
-
- // construct the selection now
- selection = new StructuredSelection(selectionElements);
- }
-
- return selection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
- public void setSelection(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sel = (IStructuredSelection)selection;
- // Reset previous selected system type
- selectedSystemType = null;
- // Only if the first element of the selection is of type IRSESystemType,
- // we re-new the selected system type from the selection
- if (sel.getFirstElement() instanceof IRSESystemType) {
- // Get the system type candidate from the selection.
- IRSESystemType candidate = (IRSESystemType)((IStructuredSelection)selection).getFirstElement();
- // Accept only system types as selection which are enabled or if
- // the wizard has a restricted list of system types, is within the list
- // of restricted system types
- if (candidate.isEnabled() &&
- (restrictedSystemTypes == null ||
- restrictedSystemTypes.length == 0 ||
- Arrays.asList(restrictedSystemTypes).contains(candidate))) {
- selectedSystemType = candidate;
- }
- }
-
- // signal the system type change
- onSelectedSystemTypeChanged();
- }
- }
-
- /**
- * Sets the currently selected context for the wizard as know by the caller
- * of this method. The selected context is not interpreted by the main wizard,
- * the selection is passed on as is to the nested wizards.
- *
- * @param selectedContext The selected context or <code>null</code>.
- */
- public void setSelectedContext(ISelection selectedContext) {
- this.selectedContext = selectedContext;
- }
-
- /**
- * Set the connection context for the wizard as determinded from
- * the caller of this method. If non-null, the method will query
- * the connections context system type and invoke <code>
- * setSelection(...)</code> to apply the system type as the selected
- * one.
- *
- * @param connectionContext The connection context or <code>null</code>.
- */
- public void setConnectionContext(IHost connectionContext) {
- this.connectionContext = connectionContext;
- // If there is an connection context, extract the connections
- // system type from the connection context as use as default
- if (connectionContext != null && connectionContext.getSystemType() != null) {
- IRSESystemType systemType = connectionContext.getSystemType();
- // if we have found the system type object, pass on to setSelection(...)!
- if (systemType != null) setSelection(new StructuredSelection(systemType));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setSelection(selection);
- }
-
- /**
- * Returns the wizard for the currently selected system type.
- *
- * @return The wizard for the currently selected system type. Must be never <code>null</code>.
- */
- public IWizard getSelectedWizard() {
- return selectedWizard;
- }
-
- /**
- * Called either by <code>restrictToSystemTypes(...)</code> or <code>
- * setSelectedSystemType(...)</code> to notify that the selected system
- * type has changed.
- */
- protected void onSelectedSystemTypeChanged() {
- // unregister the previous selected wizard as selection changed listener
- if (selectedWizard instanceof ISelectionChangedListener) removeSelectionChangedListener((ISelectionChangedListener)selectedWizard);
-
- // Check if a wizard is registered for the selected system type
- IRSENewConnectionWizardDescriptor descriptor = getSelection() != null ?
- wizardRegistry.getWizardForSelection((IStructuredSelection) getSelection())
- : null;
- if (descriptor != null) {
- selectedWizard = descriptor.getWizard();
- selectedWizardCanFinishEarly = descriptor.canFinishEarly();
- } else {
- selectedWizard = null;
- selectedWizardCanFinishEarly = false;
- }
-
- // Check on the container association of the selected wizard.
- if (getContainer() != null && selectedWizard != null && !getContainer().equals(selectedWizard.getContainer())) {
- selectedWizard.setContainer(getContainer());
- }
-
- // Check if the wizard defines it's own window title. If not, make sure to pass the
- // main wizards window title.
- if (selectedWizard instanceof Wizard
- && (selectedWizard.getWindowTitle() == null || "".equals(selectedWizard.getWindowTitle()))) { //$NON-NLS-1$
- ((Wizard)selectedWizard).setWindowTitle(getWindowTitle());
- }
-
- // if the newly selected wizard is the default RSE new connection wizard
- // and the selected context is non-null, set the selected context to the
- // default RSE new connection wizard.
- if (selectedWizard instanceof RSEDefaultNewConnectionWizard) {
- ((RSEDefaultNewConnectionWizard)selectedWizard).setSelectedContext(connectionContext);
- }
-
- // register the newly selected wizard as selection changed listener
- if (selectedWizard instanceof ISelectionChangedListener) {
- addSelectionChangedListener((ISelectionChangedListener)selectedWizard);
- }
-
- // Initialize the wizard pages and remember which wizard we have initialized already.
- // Note: Do not call IWizard.addPages() here in case the main wizard is restricted to
- // a single system type. The IWizard.addPages() method will be called from the
- // enclosing wizard dialog directly instead!
- if ((!onlySystemType || mainPage.getPreviousPage() != null) && selectedWizard != null && !initializedWizards.contains(selectedWizard)) {
- selectedWizard.addPages();
- initializedWizards.add(selectedWizard);
- }
-
- // notify the selection changed event to the listeners
- fireSelectionChanged();
-
- // Update the wizard container UI elements
- IWizardContainer container = getContainer();
- if (container != null && container.getCurrentPage() != null) {
- container.updateWindowTitle();
- container.updateTitleBar();
- container.updateButtons();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- addPage(mainPage);
- // and restore the wizard's selection state from last session
- restoreWidgetValues();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- IWizardPage nextPage = null;
- if (page != null && page == mainPage) {
- // Save the last selected system type on page transition.
- // But only if it is the main page.
- saveWidgetValues();
- if (getSelectedWizard() != null) nextPage = getSelectedWizard().getStartingPage();
- }
-
- if (nextPage == null) super.getNextPage(page);
- if (nextPage != null) nextPage.setPreviousPage(page);
-
- return nextPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#canFinish()
- */
- public boolean canFinish() {
- // We can finish from the main new connection wizard only if the selected
- // wizard can finish early
- return selectedWizardCanFinishEarly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.AbstractSystemWizard#performFinish()
- */
- public boolean performFinish() {
- // Save the current selection to the dialog settings
- saveWidgetValues();
-
- if (mainPage != null) mainPage.saveWidgetValues();
-
- return true;
- }
-
- /**
- * Save the last selected system type id to the dialog settings.
- * Called from <code>onSelectedSystemTypeChanged</code> and <code>
- * performFinish</code>.
- */
- protected void saveWidgetValues() {
- IDialogSettings dialogSettings = getDialogSettings();
- if (dialogSettings != null && getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection)getSelection();
- if (selection.getFirstElement() instanceof IRSESystemType) {
- dialogSettings.put(LAST_SELECTED_SYSTEM_TYPE_ID, ((IRSESystemType)selection.getFirstElement()).getId());
- }
- }
- }
-
- /**
- * Restore the persistent saved wizard state. This method
- * is called from the wizards constructor.
- */
- protected void restoreWidgetValues() {
- IDialogSettings dialogSettings = getDialogSettings();
- if (dialogSettings != null) {
- // Note: Current mode is that the remembered last selected system type id
- // has priority over the type of a host selection within the remote
- // systems view. We are leaving it that way for now out of consistency
- // reason. If the host selection within the remote system view should
- // get ever the priority, check for 'selectedSystemType == null' additional
- // to the check for 'systemTypeId != null'.
- String systemTypeId = dialogSettings.get(LAST_SELECTED_SYSTEM_TYPE_ID);
- if (systemTypeId != null) {
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
- if (systemType != null && systemType.isEnabled()) {
- setSelection(new StructuredSelection(systemType));
- }
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java
deleted file mode 100644
index f9ae8b811..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardDescriptor.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- *******************************************************************************/
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemTypeMatcher;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.wizards.registries.RSEAbstractWizardRegistry;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardDescriptor;
-
-
-/**
- * RSE new connection wizard descriptor implementation
- */
-public class RSENewConnectionWizardDescriptor extends RSEWizardDescriptor implements IRSENewConnectionWizardDescriptor {
- private final SystemTypeMatcher systemTypeMatcher;
-
- // The list of resolved system type ids supported by this wizard.
- private List resolvedSystemTypeIds;
-
- /**
- * Constructor
- *
- * @param wizardRegistry The parent wizard registry this element belongs to. Must be not <code>null</code>.
- * @param element The configuration element which is declaring a wizard. Must be not <code>null</code>.
- */
- public RSENewConnectionWizardDescriptor(RSEAbstractWizardRegistry wizardRegistry, IConfigurationElement element) {
- super(wizardRegistry, element);
- systemTypeMatcher = new SystemTypeMatcher(getDeclaredSystemTypeIds());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.newconnection.INewConnectionWizardDescriptor#getDeclaredSystemTypeIds()
- */
- public String getDeclaredSystemTypeIds() {
- return getConfigurationElement().getAttribute("systemTypeIds"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.newconnection.INewConnectionWizardDescriptor#getSystemTypeIds()
- */
- public String[] getSystemTypeIds() {
- if (resolvedSystemTypeIds == null) {
- resolvedSystemTypeIds = new LinkedList();
-
- // If the subsystem configuration supports all system types, just add all
- // currently registered system types to th resolved list
- if (systemTypeMatcher.supportsAllSystemTypes()) {
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- for (int i = 0; i < systemTypes.length; i++) resolvedSystemTypeIds.add(systemTypes[i].getId());
- } else {
- // We have to match the given lists of system type ids against
- // the list of available system types. As the list of system types cannot
- // change ones it has been initialized, we filter out the not matching ones
- // here directly.
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- for (int i = 0; i < systemTypes.length; i++) {
- IRSESystemType systemType = systemTypes[i];
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
- if (systemTypeMatcher.matches(systemType)
- || (adapter != null
- && adapter.acceptWizardDescriptor(getConfigurationElement().getName(), this))) {
- if (!resolvedSystemTypeIds.contains(systemType.getId())) {
- resolvedSystemTypeIds.add(systemType.getId());
- }
- }
- }
- }
- }
-
- return (String[])resolvedSystemTypeIds.toArray(new String[resolvedSystemTypeIds.size()]);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardRegistry.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardRegistry.java
deleted file mode 100644
index 968bf306e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardRegistry.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- * Javier Montalvo Orus (Symbian) - [174992] default wizard hides special ones
- * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
- * Martin Oberhuber (Wind River) - [235148] get rid of dead code for caching
- * Martin Oberhuber (Wind River) - [235197][api] Unusable wizard after cancelling on first page
- *******************************************************************************/
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement;
-import org.eclipse.rse.ui.wizards.registries.RSEAbstractWizardRegistry;
-
-/**
- * RSE New connection wizard registry implementation.
- *
- * Gives access to the new connection wizards contributed by users, by looking
- * up and creating wizard instances based on search criteria like system type or
- * wizard id. Clients should create a new wizard registry instance for each UI
- * "session" using the registry. For instance, an invocation of the new
- * connection wizard (which delegates to sub-wizards) should always create a new
- * registry instance.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class RSENewConnectionWizardRegistry extends RSEAbstractWizardRegistry {
-
- // Initialize-On-Demand Holder Class idiom:
- // Lazy initialization and thread-safe single instance.
- // See http://www-106.ibm.com/developerworks/java/library/j-jtp03304/
- private static class LazyInstanceHolder {
- public static RSENewConnectionWizardRegistry instance = new RSENewConnectionWizardRegistry();
- }
-
- /**
- * Return the global new connection wizard registry instance. Note that
- * using a global registry is problematic because sub-wizard state (and thus
- * wizard instances) should not be re-used between separate invocations of a
- * wizard by the user.
- *
- * @deprecated Instantiate a wizard registry yourself using
- * {@link #RSENewConnectionWizardRegistry()} in order to control
- * the lifetime of your wizard registry. Lifetime should be
- * limited to the time a wizard is active. Each new wizard
- * invocation should create a new wizard registry.
- */
- public static RSENewConnectionWizardRegistry getInstance() {
- return LazyInstanceHolder.instance;
- }
-
- /**
- * Constructor.
- *
- * @since org.eclipse.rse.ui 3.0
- */
- public RSENewConnectionWizardRegistry() {
- super();
- }
-
- protected IRSEWizardRegistryElement createWizardRegistryElementFor(IConfigurationElement element) {
- IRSEWizardRegistryElement wizardElement = null;
-
- if ("newConnectionWizard".equals(element.getName())) wizardElement = new RSENewConnectionWizardDescriptor(this, element); //$NON-NLS-1$
-
- return wizardElement != null ? wizardElement : super.createWizardRegistryElementFor(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.RSEAbstractWizardRegistry#getExtensionPointId()
- */
- protected String getExtensionPointId() {
- return RSEUIPlugin.getDefault().getBundle().getSymbolicName() + ".newConnectionWizards"; //$NON-NLS-1$
- }
-
- /**
- * Returns the new connection wizard descriptor to use for the specified selection.
- * The selection is expected to contain the selected system type as first element.
- *
- * @see #getWizardForSystemType(IRSESystemType) for more information.
- *
- * @param selection A structure selection containing the selected system type as first element. Must be not <code>null</code>.
- * @return A registered new connection wizard descriptor or <code>null</code>.
- */
- public IRSENewConnectionWizardDescriptor getWizardForSelection(IStructuredSelection selection) {
- assert selection != null && selection.getFirstElement() instanceof IRSESystemType;
- return getWizardForSystemType((IRSESystemType)selection.getFirstElement());
- }
-
- /**
- * Returns the new connection wizard to use for the specified system type.
- * Once queried for a specific system type, the method returns always the same wizard
- * instance. If there are multiple wizards registered for a specific system type,
- * the first wizard found will be taken and the other wizards will be dropped. If
- * this case is happening, a corresponding warning message is send to the error log.
- *
- * @param systemType The selected system type to query the wizard for. Must be not <code>null</code>.
- * @return A registered new connection wizard or the default RSE new connection wizard. Can be only <code>null</code>
- * if the default RSE new connection wizard contribution has been removed from plugin.xml!
- */
- public IRSENewConnectionWizardDescriptor getWizardForSystemType(IRSESystemType systemType) {
- assert systemType != null;
-
- IRSENewConnectionWizardDescriptor defaultDescriptor = (IRSENewConnectionWizardDescriptor)findElementById("org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"); //$NON-NLS-1$
- IRSENewConnectionWizardDescriptor descriptor = null;
- String id = systemType.getId();
-
- // check if there is any wizard explicitly registered for the given system type
- // Get the list of all wizards and always walk through _all_ of them
- // to find possible duplicates (which will be notified as warnings to
- // the user)
- IRSEWizardRegistryElement[] elements = getElements();
- for (int i = 0; i < elements.length; i++) {
- IRSEWizardRegistryElement element = elements[i];
- if (element instanceof IRSENewConnectionWizardDescriptor) {
- IRSENewConnectionWizardDescriptor candidate = (IRSENewConnectionWizardDescriptor) element;
- if (candidate != defaultDescriptor) {
- String[] systemTypeIds = candidate.getSystemTypeIds();
- if (Arrays.asList(systemTypeIds).contains(id)) {
- if (descriptor == null) {
- descriptor = candidate;
- } else {
- String message = "Duplicated new connection wizard registration for system type ''{0}'' (wizard id = {1})."; //$NON-NLS-1$
- message = NLS.bind(message, id, candidate.getId());
- RSECorePlugin.getDefault().getLogger().logWarning(message);
- }
- }
- }
- }
- }
-
- // if the descriptor here is still null, always return the default RSE
- // new connection wizard descriptor
- if (descriptor == null) {
- descriptor = defaultDescriptor;
- }
-
- return descriptor;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java
deleted file mode 100644
index d20cf3b4e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionPage.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [186779] Fix IRSESystemType.getAdapter()
- * Uwe Stieber (Wind River) - [209193] RSE new connection wizard shows empty categories if typing something into the filter
- * Martin Oberhuber (Wind River) - [235197][api] Unusable wizard after cancelling on first page
- * Uwe Stieber (Wind River) - [237816][api] restrictToSystemType does not work for RSEMainNewConnectionWizard
- *******************************************************************************/
-
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-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.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-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.viewers.ViewerComparator;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardCategory;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreeContentProvider;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreeElement;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreeLabelProvider;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreePatternFilter;
-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.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-/**
- * The New Connection Wizard main page that allows selection of system type.
- * <p>
- * <b>Note:</b> The page allows filtering of the presented wizard list by adapting
- * the associated system type to<br>
- * <ul>
- * <li><code>org.eclipse.jface.viewers.ViewerFilter</code>: calling <code>ViewerFilter.select(...)</code> and double-check via.</li>
- * <li><code>org.eclipse.rse.ui.RSESystemTypeAdapter</code>: calling <code>RSESystemTypeAdapter.isEnabled(...)</code>.</li>
- * </ul>
- */
-public class RSENewConnectionWizardSelectionPage extends WizardPage {
- private final String helpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$;
-
- private static final String EXPANDED_CATEGORIES_SETTINGS_ID = "filteredTree.expandedCatogryIds"; //$NON-NLS-1$
- private static final String[] DEFAULT_EXPANDED_CATEGORY_IDS = new String[] { "org.eclipse.rse.ui.wizards.newconnection.default.category" }; //$NON-NLS-1$
-
- private IRSESystemType[] restrictedSystemTypes;
-
- private RSENewConnectionWizardRegistry wizardRegistry;
- private FilteredTree filteredTree;
- private PatternFilter filteredTreeFilter;
- private ViewerFilter filteredTreeWizardStateFilter;
- private RSENewConnectionWizardSelectionTreeDataManager filteredTreeDataManager;
-
- /**
- * Internal class. The wizard state filter is responsible to filter
- * out any not enabled or filtered wizard from the tree.
- */
- private class NewConnectionWizardStateFilter extends ViewerFilter {
-
- /* (non-Javadoc)
- * @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) {
- Object[] children = ((ITreeContentProvider) ((AbstractTreeViewer) viewer).getContentProvider()).getChildren(element);
- if (children.length > 0) {
- return filter(viewer, element, children).length > 0;
- }
-
- if (element instanceof RSENewConnectionWizardSelectionTreeElement) {
- // the system type must be enabled, otherwise it is filtered out
- IRSESystemType systemType = ((RSENewConnectionWizardSelectionTreeElement)element).getSystemType();
- if (systemType == null) return false;
-
- // if the page is restricted to a set of system types, check on them first
- IRSESystemType[] restricted = getRestrictToSystemTypes();
- if (restricted != null && restricted.length > 0) {
- if (!Arrays.asList(restricted).contains(systemType)) return false;
- }
-
- // First, adapt the system type to a viewer filter and pass on the select request
- // to the viewer filter adapter if available
- ViewerFilter filter = (ViewerFilter)(systemType.getAdapter(ViewerFilter.class));
- if (filter != null && !filter.select(viewer, parentElement, element)) {
- return false;
- }
-
- // Second, double check if the system type passed the viewer filter but is disabled.
- if (!systemType.isEnabled()) return false;
- }
-
- // In all other cases, the element passes the filter
- return true;
- }
- }
-
- /**
- * Internal class. The wizard viewer comparator is responsible for
- * the sorting in the tree. Current implementation is not prioritizing
- * categories.
- */
- private class NewConnectionWizardViewerComparator extends ViewerComparator {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerComparator#isSorterProperty(java.lang.Object, java.lang.String)
- */
- public boolean isSorterProperty(Object element, String property) {
- // The comparator is affected if the label of the elements should change.
- return property.equals(IBasicPropertyConstants.P_TEXT);
- }
- }
-
- /**
- * Constructor.
- * @since org.eclipse.rse.ui 3.0
- */
- public RSENewConnectionWizardSelectionPage(RSENewConnectionWizardRegistry wizardRegistry) {
- super("RSENewConnectionWizardSelectionPage"); //$NON-NLS-1$
- setTitle(getDefaultTitle());
- setDescription(getDefaultDescription());
- this.wizardRegistry = wizardRegistry;
- }
-
- /**
- * Constructor.
- *
- * @deprecated Use
- * {@link #RSENewConnectionWizardSelectionPage(RSENewConnectionWizardRegistry)}
- * to control the lifetime of the wizard registry
- */
- public RSENewConnectionWizardSelectionPage() {
- this(RSENewConnectionWizardRegistry.getInstance());
- }
-
- /**
- * Returns the default page title.
- *
- * @return The default page title. Must be never <code>null</code>.
- */
- protected String getDefaultTitle() {
- return SystemResources.RESID_NEWCONN_MAIN_PAGE_TITLE;
- }
-
- /**
- * Returns the default page description.
- *
- * @return The default page description. Must be never <code>null</code>.
- */
- protected String getDefaultDescription() {
- return SystemResources.RESID_NEWCONN_MAIN_PAGE_DESCRIPTION;
- }
-
- /**
- * Restrict the selectable wizards to the given set of system types.
- *
- * @param systemTypes The list of the system types to restrict the page to or <code>null</code>.
- */
- public void restrictToSystemTypes(IRSESystemType[] systemTypes) {
- this.restrictedSystemTypes = systemTypes;
- }
-
- /**
- * Returns the list of system types the page is restricted to.
- *
- * @return The list of system types the page is restricted to or <code>null</code>.
- * @since 3.0 made protected method public
- */
- public IRSESystemType[] getRestrictToSystemTypes() {
- return restrictedSystemTypes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- label.setText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL + ":"); //$NON-NLS-1$
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- filteredTreeFilter = new RSEWizardSelectionTreePatternFilter();
- filteredTree = new FilteredTree(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filteredTreeFilter);
- filteredTree.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- GridData layoutData = new GridData(GridData.FILL_BOTH);
- layoutData.heightHint = 325; layoutData.widthHint = 450;
- filteredTree.setLayoutData(layoutData);
-
- final TreeViewer treeViewer = filteredTree.getViewer();
- treeViewer.setContentProvider(new RSEWizardSelectionTreeContentProvider());
- // Explicitly allow the tree items to get decorated!!!
- treeViewer.setLabelProvider(new DecoratingLabelProvider(new RSEWizardSelectionTreeLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- treeViewer.setComparator(new NewConnectionWizardViewerComparator());
-
- filteredTreeWizardStateFilter = new NewConnectionWizardStateFilter();
- treeViewer.addFilter(filteredTreeWizardStateFilter);
-
- treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- onSelectionChanged();
- }
- });
- treeViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- // Double-click on a connection type is triggering the sub wizard
- if (event.getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- // The tree is single selection, so look for the first element only.
- Object element = selection.getFirstElement();
- if (element instanceof RSENewConnectionWizardSelectionTreeElement) {
- // Double-click on a connection type is triggering the sub wizard
- if (canFlipToNextPage()) getWizard().getContainer().showPage(getNextPage());
- } else if (event.getViewer() instanceof TreeViewer) {
- TreeViewer viewer = (TreeViewer)event.getViewer();
- if (viewer.isExpandable(element)) {
- viewer.setExpandedState(element, !viewer.getExpandedState(element));
- }
- }
- }
- }
- });
-
- filteredTreeDataManager = new RSENewConnectionWizardSelectionTreeDataManager(wizardRegistry);
- treeViewer.setInput(filteredTreeDataManager);
-
- // apply the standard dialog font
- Dialog.applyDialogFont(composite);
-
- setControl(composite);
-
- // Restore the expanded state of the category items within the tree
- // before initializing the selection.
- restoreWidgetValues();
-
- // Initialize the tree selection
- initializeSelection(treeViewer);
-
- // Initialize the selection in the tree
- filteredTree.getFilterControl().setFocus();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), helpId);
-
- }
-
- /**
- * Set the initial tree selection for the given tree viewer instance.
- *
- * @param treeViewer The tree viewer instance.
- *
- * @since 3.1
- */
- protected void initializeSelection(TreeViewer treeViewer) {
- if (treeViewer == null) return;
-
- if (getWizard() instanceof ISelectionProvider) {
- ISelectionProvider selectionProvider = (ISelectionProvider)getWizard();
- if (selectionProvider.getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection();
- if (selection.getFirstElement() instanceof IRSESystemType) {
- IRSESystemType systemType = (IRSESystemType)selection.getFirstElement();
- RSENewConnectionWizardSelectionTreeElement treeElement = filteredTreeDataManager.getTreeElementForSystemType(systemType);
- if (treeElement != null) treeViewer.setSelection(new StructuredSelection(treeElement), true);
- }
- }
- }
-
- }
-
- /**
- * Called from the selection listener to propage the current
- * system type selection to the underlaying wizard.
- */
- protected void onSelectionChanged() {
- IWizard wizard = getWizard();
- if (wizard instanceof ISelectionProvider && filteredTree.getViewer().getSelection() instanceof IStructuredSelection) {
- ISelectionProvider selectionProvider = (ISelectionProvider)wizard;
- IStructuredSelection filteredTreeSelection = (IStructuredSelection)filteredTree.getViewer().getSelection();
- if (filteredTreeSelection.getFirstElement() instanceof RSENewConnectionWizardSelectionTreeElement) {
- RSENewConnectionWizardSelectionTreeElement element = (RSENewConnectionWizardSelectionTreeElement)filteredTreeSelection.getFirstElement();
- selectionProvider.setSelection(new StructuredSelection(element.getSystemType()));
- if (element.getDescription() != null) {
- setDescription(element.getDescription());
- } else {
- if (!getDefaultDescription().equals(getDescription())) setDescription(getDefaultDescription());
- }
- } else {
- selectionProvider.setSelection(null);
- }
- }
-
- // Update the wizard container UI elements
- IWizardContainer container = getContainer();
- if (container != null && container.getCurrentPage() != null) {
- container.updateWindowTitle();
- container.updateTitleBar();
- container.updateButtons();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getDialogSettings()
- */
- protected IDialogSettings getDialogSettings() {
- // If the wizard is set and returns dialog settings, we re-use them here
- IDialogSettings settings = super.getDialogSettings();
- // If the dialog settings could not set from the wizard, fallback to the plugins
- // dialog settings store.
- if (settings == null) settings = RSEUIPlugin.getDefault().getDialogSettings();
- String sectionName = this.getClass().getName();
- if (settings.getSection(sectionName) == null) settings.addNewSection(sectionName);
- settings = settings.getSection(sectionName);
-
- return settings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- // if the page will become hidden, save the expansion state of
- // the tree elements.
- if (!visible) saveWidgetValues();
- // If the page will become visible, refresh the viewer
- // content -> The listed system types might have changed.
- else if (filteredTree != null && filteredTree.getViewer() != null) {
- filteredTree.getViewer().refresh();
- initializeSelection(filteredTree.getViewer());
- }
- }
-
- /**
- * Restore the tree state from the dialog settings.
- */
- public void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] expandedCategories = settings.getArray(EXPANDED_CATEGORIES_SETTINGS_ID);
- // by default we expand always the "General" category.
- if (expandedCategories == null) expandedCategories = DEFAULT_EXPANDED_CATEGORY_IDS;
- if (expandedCategories != null) {
- List expanded = new ArrayList();
- for (int i = 0; i < expandedCategories.length; i++) {
- String categoryId = expandedCategories[i];
- if (categoryId != null && !"".equals(categoryId.trim())) { //$NON-NLS-1$
- IRSEWizardRegistryElement registryElement = wizardRegistry.findElementById(categoryId);
- if (registryElement instanceof IRSEWizardCategory) {
- RSEWizardSelectionTreeElement treeElement = filteredTreeDataManager.getTreeElementForCategory((IRSEWizardCategory)registryElement);
- if (treeElement != null) expanded.add(treeElement);
- }
- }
- }
-
- if (expanded.size() > 0) filteredTree.getViewer().setExpandedElements(expanded.toArray());
- }
- }
- }
-
- /**
- * Saves the tree state to the dialog settings.
- */
- public void saveWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- List expandedCategories = new ArrayList();
- Object[] expanded = filteredTree.getViewer().getVisibleExpandedElements();
- for (int i = 0; i < expanded.length; i++) {
- if (expanded[i] instanceof RSEWizardSelectionTreeElement) {
- IRSEWizardRegistryElement registryElement = ((RSEWizardSelectionTreeElement)expanded[i]).getWizardRegistryElement();
- if (registryElement instanceof IRSEWizardCategory) {
- expandedCategories.add(((IRSEWizardCategory)registryElement).getId());
- }
- }
- }
- settings.put(EXPANDED_CATEGORIES_SETTINGS_ID, (String[])expandedCategories.toArray(new String[expandedCategories.size()]));
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java
deleted file mode 100644
index a0789348c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeDataManager.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [235197][api] Unusable wizard after cancelling on first page
- *******************************************************************************/
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardCategory;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement;
-import org.eclipse.rse.ui.wizards.registries.RSEAbstractWizardSelectionTreeDataManager;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreeElement;
-
-/**
- * New connection wizard selection tree data manager.
- */
-public class RSENewConnectionWizardSelectionTreeDataManager extends RSEAbstractWizardSelectionTreeDataManager {
- // The element map is required to translate from IRSESystemType object instance
- // into RSENewConnectionWizardSelectionTreeElement object instances as the tree
- // and the wizard using these different object instances in their selections!
- private Map elementMap;
-
- // The category map is doing the same as the element but for categories.
- private Map categoryMap;
-
- /**
- * Constructor.
- * @since org.eclipse.rse.ui 3.0
- */
- public RSENewConnectionWizardSelectionTreeDataManager(RSENewConnectionWizardRegistry wizardRegistry) {
- super(wizardRegistry);
- }
-
- /**
- * Constructor.
- *
- * @deprecated Use
- * {@link #RSENewConnectionWizardSelectionTreeDataManager(RSENewConnectionWizardRegistry)}
- * to control the lifetime of the wizard registry
- */
- public RSENewConnectionWizardSelectionTreeDataManager() {
- this(RSENewConnectionWizardRegistry.getInstance());
- }
-
- /**
- * Returns the corresponding wizard selection tree element for the specified
- * system type.
- *
- * @param systemType The system type. Must be not <code>null</code>.
- * @return The wizard selection tree element or <code>null</code>.
- */
- public RSENewConnectionWizardSelectionTreeElement getTreeElementForSystemType(IRSESystemType systemType) {
- assert systemType != null;
- return (RSENewConnectionWizardSelectionTreeElement)elementMap.get(systemType);
- }
-
- /**
- * Returns the corresponding wizard selection tree element for the specified category.
- *
- * @param category The category. Must be not <code>null</code>.
- * @return The wizard selection tree element or <code>null</code>.
- */
- public RSEWizardSelectionTreeElement getTreeElementForCategory(IRSEWizardCategory category) {
- assert category != null;
- return (RSEWizardSelectionTreeElement)categoryMap.get(category);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.internal.wizards.newconnection.RSEAbstractWizardSelectionTreeDataManager#initialize(java.util.Set)
- */
- protected void initialize(Set rootElement) {
- // we must check the elementMap here for null as the static
- // constructors may not have called yet as this method is called
- // from the base classes constructor!
- if (elementMap == null) elementMap = new HashMap();
- elementMap.clear();
-
- if (categoryMap == null) categoryMap = new HashMap();
- categoryMap.clear();
-
- // The new connection wizard selection is combining system types
- // with registered new connection wizard.
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- for (int i = 0; i < systemTypes.length; i++) {
- IRSESystemType systemType = systemTypes[i];
- // for the system type, lookup the corresponding wizard descriptor
- IRSENewConnectionWizardDescriptor descriptor = ((RSENewConnectionWizardRegistry)getWizardRegistry()).getWizardForSystemType(systemType);
- if (descriptor == null) {
- // a system type without even the default RSE new connection wizard associated
- // is bad and should never happen. Drop a warning and skip the system type.
- String message = "System type " + systemType.getId() + " has no new connection wizard associated!"; //$NON-NLS-1$ //$NON-NLS-2$
- RSEUIPlugin.getDefault().getLogger().logWarning(message);
- continue;
- }
-
- // ok, we have wizard for the current system type. Create the wizard selection tree element
- // and categorise the wizard.
- RSENewConnectionWizardSelectionTreeElement wizardElement = new RSENewConnectionWizardSelectionTreeElement(systemType, descriptor);
- wizardElement.setParentElement(null);
- elementMap.put(systemType, wizardElement);
-
- String categoryId = descriptor.getCategoryId();
- // if the wizard is of type IRSEDynamicNewConnectionWizard, call validateCategoryId!
- if (descriptor.getWizard() instanceof IRSEDynamicNewConnectionWizard) {
- categoryId = ((IRSEDynamicNewConnectionWizard)descriptor.getWizard()).validateCategoryId(systemType, categoryId);
- }
-
- // if the category id is null, the wizard will be sorted in as root element
- if (categoryId == null) {
- rootElement.add(wizardElement);
- continue;
- }
-
- // get the category. If failing, the wizard will end up as root element
- IRSEWizardRegistryElement candidate = getWizardRegistry().findElementById(categoryId);
- if (!(candidate instanceof IRSEWizardCategory)) {
- rootElement.add(wizardElement);
- continue;
- }
-
- IRSEWizardCategory category = (IRSEWizardCategory)candidate;
-
- // if the category id is not null, check if we have accessed the category
- // already once.
- RSEWizardSelectionTreeElement categoryElement = (RSEWizardSelectionTreeElement)categoryMap.get(category);
- if (categoryElement == null) {
- categoryElement = new RSEWizardSelectionTreeElement(category);
- categoryElement.setParentElement(null);
- categoryMap.put(category, categoryElement);
- }
- categoryElement.add(wizardElement);
- wizardElement.setParentElement(categoryElement);
-
- // The category itself does not have a parent category, the category is a root element
- String parentCategoryId = category.getParentCategoryId();
- if (parentCategoryId == null) {
- rootElement.add(categoryElement);
- continue;
- }
-
- while (parentCategoryId != null) {
- candidate = getWizardRegistry().findElementById(parentCategoryId);
- if (!(candidate instanceof IRSEWizardCategory)) {
- rootElement.add(categoryElement);
- break;
- }
-
- category = (IRSEWizardCategory)candidate;
-
- RSEWizardSelectionTreeElement parentElement = (RSEWizardSelectionTreeElement)categoryMap.get(category);
- if (parentElement == null) {
- parentElement = new RSEWizardSelectionTreeElement(category);
- parentElement.setParentElement(null);
- categoryMap.put(category, parentElement);
- }
- parentElement.add(categoryElement);
- categoryElement.setParentElement(parentElement);
-
- categoryElement = parentElement;
- parentCategoryId = category.getParentCategoryId();
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeElement.java
deleted file mode 100644
index 96dbac467..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSENewConnectionWizardSelectionTreeElement.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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) - [186779] Fix IRSESystemType.getAdapter()
- *******************************************************************************/
-package org.eclipse.rse.ui.wizards.newconnection;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement;
-import org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreeElement;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * New connection wizard selection tree data element.
- */
-public class RSENewConnectionWizardSelectionTreeElement extends RSEWizardSelectionTreeElement {
- private static final long serialVersionUID = -6061418626602868827L;
-
- private final IRSESystemType systemType;
-
- /**
- * Constructor.
- *
- * @param element The wizard registry element to associate. Must be not <code>null</code>.
- */
- public RSENewConnectionWizardSelectionTreeElement(IRSESystemType systemType, IRSEWizardRegistryElement element) {
- super(element);
- assert systemType != null;
- this.systemType = systemType;
- }
-
- /**
- * Returns the associated system type instance.
- *
- * @return The associated system type instance. Must be never <code>null</code>.
- */
- public IRSESystemType getSystemType() {
- return systemType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.internal.wizards.newconnection.RSEWizardSelectionTreeElement#getLabel()
- */
- public String getLabel() {
- return getSystemType().getLabel();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.internal.wizards.newconnection.RSEWizardSelectionTreeElement#getImage()
- */
- public Image getImage() {
- ImageRegistry imageRegistry = RSEUIPlugin.getDefault().getImageRegistry();
- String key = getSystemType().getId() + "::" + getWizardRegistryElement().getId(); //$NON-NLS-1$
- Image image = imageRegistry.get(key);
- if (image == null) {
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(getSystemType().getAdapter(RSESystemTypeAdapter.class));
- if (adapter != null) {
- ImageDescriptor descriptor = adapter.getImageDescriptor(getSystemType());
- image = descriptor.createImage();
- imageRegistry.put(key, image);
- }
- }
-
- return image;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.RSEWizardSelectionTreeElement#getDescription()
- */
- public String getDescription() {
- // Check the system type adapter for the description in case the wizard descriptor does
- // not come up with a description itself.
- String description = super.getDescription();
- if (description == null) {
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(getSystemType().getAdapter(RSESystemTypeAdapter.class));
- if (adapter != null) {
- description = adapter.getDescription(getSystemType());
- }
- }
- return description;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof RSENewConnectionWizardSelectionTreeElement) {
- return getSystemType().equals(((RSENewConnectionWizardSelectionTreeElement)obj).getSystemType())
- && getWizardRegistryElement().equals(((RSENewConnectionWizardSelectionTreeElement)obj).getWizardRegistryElement());
- }
- return super.equals(obj);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return super.hashCode() + getSystemType().hashCode();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardCategory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardCategory.java
deleted file mode 100644
index 7baf874a0..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardCategory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.ui.wizards.registries;
-
-/**
- * Common wizard category descriptor used by the <code>RSEAbstractWizardRegistry</code>
- * to handle wizard categories contributed via a wizard extension point.
- */
-public interface IRSEWizardCategory extends IRSEWizardRegistryElement {
-
- /**
- * Returns the fully qualified parent category id or <code>null</code>
- * if this wizard category is itself a root category.
- *
- * @return The parent category id or <code>null</code>.
- */
- public String getParentCategoryId();
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardDescriptor.java
deleted file mode 100644
index 34fab0638..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardDescriptor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.ui.wizards.registries;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Common wizard descriptor used by the <code>RSEAbstractWizardRegistry</code>
- * to handle wizards contributed via a wizard extension point.
- */
-public interface IRSEWizardDescriptor extends IRSEWizardRegistryElement {
-
- /**
- * The wizard implementation object instance.
- *
- * @return The wizard instance. Must be never <code>null</code>.
- */
- public IWizard getWizard();
-
- /**
- * Returns a optional short description of the wizards purpose.
- *
- * @return The short wizard description or <code>null</code>.
- */
- public String getDescription();
-
- /**
- * Returns the fully qualified category id if the wizard belongs
- * to a category. If empty or <code>null</code> or the returned
- * category id does not exist, the wizard will be sorted in as
- * root element.
- *
- * @return The category id or <code>null</code>.
- */
- public String getCategoryId();
-
- /**
- * Returns if the wizard can be finished without ever showing
- * a specific page to the user.
- *
- * @return <code>True</code> if the wizard can finish without any page presentation, <code>false</code> otherwise.
- */
- public boolean canFinishEarly();
-
- /**
- * Returns if the wizard has pages to show to the user.
- *
- * @return <code>True</code> if the wizard has presentable pages, <code>false</code> otherwise.
- */
- public boolean hasPages();
-
- /**
- * Returns a optional image for representing the wizard within the UI besides
- * the wizard name. The default wizard descriptor implementation returns always
- * <code>null</code>.
- *
- * @return The wizard image or <code>null</code> if none.
- */
- public Image getImage();
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardRegistryElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardRegistryElement.java
deleted file mode 100644
index 053de6665..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/IRSEWizardRegistryElement.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-/**
- * Basic interface of elements which can be handled by
- * the <code>RSEAbstractWizardRegistry</code>.
- */
-public interface IRSEWizardRegistryElement {
-
- /**
- * Returns the full qualified unique id of the wizard registry element.
- *
- * @return The unique wizard registry element id. Must be never <code>null</code>.
- */
- public String getId();
-
- /**
- * Returns the UI name of the wizard registry element.
- *
- * @return The UI name of the wizard registry element. Must be never <code>null</code>.
- */
- public String getName();
-
- /**
- * Validates the wizard registry element. This method should return <code>false</code>
- * if any required wizard registry element attribute is missing. Subclasses should
- * override this method to validate additional required attribtes.
- *
- * @return <code>True</code> if the wizard registry element is valid, <code>false</code> otherwise.
- */
- public boolean isValid();
-
- /**
- * Returns the parent wizard registry element if any or <code>null</code>
- * if this element is a root element.
- *
- * @return The parent wizard registry element or <code>null</code>.
- */
- public IRSEWizardRegistryElement getParent();
-
- /**
- * Returns the list of children if this element or an empty list if
- * the element does not have children.
- *
- * @return The list of children wizard registry elements. May be empty but never <code>null</code>.
- */
- public IRSEWizardRegistryElement[] getChildren();
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardRegistry.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardRegistry.java
deleted file mode 100644
index cab3d6e5a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardRegistry.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-import java.text.MessageFormat;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.RSECorePlugin;
-
-/**
- * Abstract core implementation of a wizard registry.
- */
-public abstract class RSEAbstractWizardRegistry {
- private final Map elements = new LinkedHashMap();
- private boolean isInitialized = false;
-
- /**
- * Constructor.
- */
- public RSEAbstractWizardRegistry() {
- }
-
- /**
- * Initialize the wizard registry by reading the associated wizard
- * extension point.
- */
- protected void initialize() {
- elements.clear();
-
- IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(getExtensionPointId());
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
- if (element == null) continue;
- internalCreateRegistryElementFor(element);
- }
-
- isInitialized = true;
- }
-
- // Internal handle the creation of wizard registry elements.
- private void internalCreateRegistryElementFor(IConfigurationElement element) {
- assert element != null;
- IRSEWizardRegistryElement wizardElement = createWizardRegistryElementFor(element);
- if (wizardElement != null && wizardElement.isValid() && !elements.containsKey(wizardElement.getId())) {
- elements.put(wizardElement.getId(), wizardElement);
- } else if (wizardElement != null && wizardElement.isValid()){
- String message = "Wizard element contribution skipped. Non-unique element id (plugin: {0}, extension point: {1}, id: {2}, element name: {3})."; //$NON-NLS-1$
- message = MessageFormat.format(message, new Object[] { element.getContributor().getName(), getExtensionPointId(), wizardElement.getId(), element.getName()});
- RSECorePlugin.getDefault().getLogger().logWarning(message);
- } else if (wizardElement != null) {
- String message = "Wizard element contribution skipped. Invalid or incomplete (plugin: {0}, extension point: {1}, id: {2}, element name: {3})."; //$NON-NLS-1$
- message = MessageFormat.format(message, new Object[] { element.getContributor().getName(), getExtensionPointId(), wizardElement.getId(), element.getName()});
- RSECorePlugin.getDefault().getLogger().logWarning(message);
- } else {
- String message = "Wizard contribution skipped. Failed to create wizard descriptor (plugin: {0}, extension point: {1}, extension: {2})."; //$NON-NLS-1$
- message = MessageFormat.format(message, new Object[] { element.getContributor().getName(), getExtensionPointId(), element.getDeclaringExtension().getLabel()});
- RSECorePlugin.getDefault().getLogger().logWarning(message);
- }
- }
-
- /**
- * Returns if or if not the wizard registry has been initialized already.
- * The initialized state of a wizard registry can be set only by calling
- * the method <code>RSEAbstractWizardRegistry.initialize()</code>.
- *
- * @return <code>true</code> if the wizard registry is initialized, <code>false</code> otherwise.
- */
- protected final boolean isInitialized() {
- return isInitialized;
- }
-
- /**
- * Returns the fully qualified id of the wizard extension point.
- *
- * @return The fully qualified wizard extension point id. Must be never <code>null</code>.
- */
- protected abstract String getExtensionPointId();
-
- /**
- * Creates a wizard registry element instance for the specified configuration element.
- * The method may return null if the creation of the wizard registry element instance fails.
- *
- * @param element The configuration element. Must be not <code>null</code>.
- * @return The wizard registry element instance or <code>null</code>.
- */
- protected IRSEWizardRegistryElement createWizardRegistryElementFor(IConfigurationElement element) {
- IRSEWizardRegistryElement wizardElement = null;
-
- if ("category".equals(element.getName())) wizardElement = new RSEWizardCategory(this, element); //$NON-NLS-1$
- if (wizardElement == null) new RSEWizardRegistryElement(this, element);
-
- return wizardElement;
- }
-
- /**
- * Returns the list of registered wizard registry elements.
- *
- * @return The list of registered wizard registry elements. May be empty but never <code>null</code>.
- */
- public IRSEWizardRegistryElement[] getElements() {
- if (!isInitialized()) initialize();
- return (IRSEWizardRegistryElement[])elements.values().toArray(new IRSEWizardRegistryElement[elements.values().size()]);
- }
-
-
- /**
- * Look up a registered wizard registry element by the specified id. If no wizard
- * registry element has been registered under this id, the method will return
- * <code>null</code>.
- *
- * @param id The fully qualified wizard registry element id. Must be not <code>null</code>.
- * @return The wizard or <code>null</code>.
- */
- public IRSEWizardRegistryElement findElementById(String id) {
- assert id != null;
- IRSEWizardRegistryElement[] elements = getElements();
- for (int i = 0; i < elements.length; i++) {
- if (id.equals(elements[i].getId())) return elements[i];
- }
- return null;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardSelectionTreeDataManager.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardSelectionTreeDataManager.java
deleted file mode 100644
index e4f8958a1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEAbstractWizardSelectionTreeDataManager.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [235197][api] Unusable wizard after cancelling on first page
- *******************************************************************************/
-package org.eclipse.rse.ui.wizards.registries;
-
-import java.util.HashSet;
-import java.util.Set;
-
-
-/**
- * Data manager for RSE wizard selection tree's.
- */
-public abstract class RSEAbstractWizardSelectionTreeDataManager {
- private final Set rootElement = new HashSet();
- private RSEAbstractWizardRegistry wizardRegistry;
-
- /**
- * Constructor.
- * @since org.eclipse.rse.ui 3.0
- */
- public RSEAbstractWizardSelectionTreeDataManager(RSEAbstractWizardRegistry wizardRegistry) {
- this.wizardRegistry = wizardRegistry;
- rootElement.clear();
-
- // start the initialization of the data tree.
- initialize(rootElement);
- }
-
- /**
- * Constructor.
- *
- * @deprecated Use
- * {@link #RSEAbstractWizardSelectionTreeDataManager(RSEAbstractWizardRegistry)}
- * to control the lifetime of the wizard registry
- */
- public RSEAbstractWizardSelectionTreeDataManager() {
- this(null);
- }
-
- /**
- * Returns the currently active wizard registry, which allows looking up
- * wizard instances by various search keys. The wizard registry is valid as
- * long as a particular wizard is open.
- *
- * @return the current wizard registry
- * @since org.eclipse.rse.ui 3.0
- */
- protected RSEAbstractWizardRegistry getWizardRegistry() {
- return wizardRegistry;
- }
-
- /**
- * Returns the children of this wizard selection tree element.
- *
- * @return The list of children, May be empty but never <code>null</code>.
- */
- public RSEWizardSelectionTreeElement[] getChildren() {
- return (RSEWizardSelectionTreeElement[])rootElement.toArray(new RSEWizardSelectionTreeElement[rootElement.size()]);
- }
-
- /**
- * Initialize the data tree.
- *
- * @param rootElement The root element which is the container for all user visible tree root elements. Must be not <code>null</code>.
- */
- protected abstract void initialize(Set rootElement);
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardCategory.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardCategory.java
deleted file mode 100644
index 84f946948..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardCategory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-/**
- * Default implementation of the <code>IRSEWizardCategory</code> interface.
- */
-public class RSEWizardCategory extends RSEWizardRegistryElement implements IRSEWizardCategory {
-
- /**
- * Constructor
- *
- * @param wizardRegistry The parent wizard registry this element belongs to. Must be not <code>null</code>.
- * @param element The configuration element which is declaring a wizard category. Must be not <code>null</code>.
- */
- public RSEWizardCategory(RSEAbstractWizardRegistry wizardRegistry, IConfigurationElement element) {
- super(wizardRegistry, element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardCategory#getParentCategoryId()
- */
- public String getParentCategoryId() {
- return getConfigurationElement().getAttribute("parentCategoryId"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.RSEWizardRegistryElement#getParent()
- */
- public IRSEWizardRegistryElement getParent() {
- String parentCategoryId = getParentCategoryId();
- if (parentCategoryId != null && !"".equals(parentCategoryId.trim())) { //$NON-NLS-1$
- // Try to get the corresponding wizard category element for this id
- return getWizardRegistry().findElementById(parentCategoryId);
- }
- return super.getParent();
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardDescriptor.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardDescriptor.java
deleted file mode 100644
index 14c748261..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardDescriptor.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Default implementation of the <code>IRSEWizardDescriptor</code> interfaces.
- */
-public class RSEWizardDescriptor extends RSEWizardRegistryElement implements IRSEWizardDescriptor {
-
- private IWizard wizard;
-
- /**
- * Constructor
- *
- * @param wizardRegistry The parent wizard registry this element belongs to. Must be not <code>null</code>.
- * @param element The configuration element which is declaring a wizard. Must be not <code>null</code>.
- */
- public RSEWizardDescriptor(RSEAbstractWizardRegistry wizardRegistry, IConfigurationElement element) {
- super(wizardRegistry, element);
- internalGetWizard();
- }
-
- /**
- * Internal method. Returns the wizard instance or create a new one
- * if the wizard had been disposed before.
- *
- * @return The wizard instance to use.
- */
- private IWizard internalGetWizard() {
- if (wizard == null
- || (wizard != null && wizard.getStartingPage() != null
- && wizard.getStartingPage().getControl() != null
- && wizard.getStartingPage().getControl().isDisposed())) {
- // Try to instanciate the wizard.
- IConfigurationElement element = getConfigurationElement();
- try {
- wizard = (IWizard)element.createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- String message = "RSE new connection wizard failed creation (plugin: {0}, id: {1})."; //$NON-NLS-1$
- message = MessageFormat.format(message, new Object[] { element.getContributor().getName(), element.getAttribute("id")}); //$NON-NLS-1$
- RSECorePlugin.getDefault().getLogger().logError(message, e);
- }
- }
-
- return wizard;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#isValid()
- */
- public boolean isValid() {
- return super.isValid() && wizard != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#getWizard()
- */
- public IWizard getWizard() {
- return internalGetWizard();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#canFinishEarly()
- */
- public boolean canFinishEarly() {
- String canFinishEarly = getConfigurationElement().getAttribute("canFinishEarly"); //$NON-NLS-1$
- if (canFinishEarly != null) return Boolean.TRUE.equals(Boolean.valueOf(canFinishEarly));
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#getCategoryId()
- */
- public String getCategoryId() {
- return getConfigurationElement().getAttribute("categoryId"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#getDescription()
- */
- public String getDescription() {
- return getConfigurationElement().getAttribute("description"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#hasPages()
- */
- public boolean hasPages() {
- String hasPages = getConfigurationElement().getAttribute("hasPages"); //$NON-NLS-1$
- if (hasPages != null) return Boolean.TRUE.equals(Boolean.valueOf(hasPages));
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardDescriptor#getImage()
- */
- public Image getImage() {
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardRegistryElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardRegistryElement.java
deleted file mode 100644
index 942776a98..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardRegistryElement.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-/**
- * Default implementation of the <code>IRSEWizardRegistryElement</code> interface
- */
-public class RSEWizardRegistryElement implements IRSEWizardRegistryElement {
- protected final static IRSEWizardRegistryElement[] NO_ELEMENTS = new IRSEWizardRegistryElement[0];
-
- private final IConfigurationElement element;
- private final RSEAbstractWizardRegistry wizardRegistry;
-
- private String id;
- private String name;
-
- /**
- * Constructor.
- *
- * @param wizardRegistry The parent wizard registry this element belongs to. Must be not <code>null</code>.
- * @param element The configuration element which is declaring a wizard category. Must be not <code>null</code>.
- */
- public RSEWizardRegistryElement(RSEAbstractWizardRegistry wizardRegistry, IConfigurationElement element) {
- assert wizardRegistry != null && element != null;
-
- // Store the wizard registry reference
- this.wizardRegistry = wizardRegistry;
-
- // Store the configuration element reference
- this.element = element;
-
- // Read the required attributes from the configuration element and
- // check that these attributes are really set.
- id = element.getAttribute("id"); //$NON-NLS-1$
- name = element.getAttribute("name"); //$NON-NLS-1$
- }
-
- /**
- * Returns the parent wizard registry of this element.
- *
- * @return The parent wizard registry. Must be never <code>null</code>.
- */
- protected final RSEAbstractWizardRegistry getWizardRegistry() {
- return wizardRegistry;
- }
-
- /**
- * Returns the associated configuration element.
- *
- * @return The configration element. Must be never <code>null</code>.
- */
- protected final IConfigurationElement getConfigurationElement() {
- assert element != null;
- return element;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardCategory#getId()
- */
- public String getId() {
- return id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardCategory#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IWizardCategory#isValid()
- */
- public boolean isValid() {
- return id != null && name != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement#getChildren()
- */
- public IRSEWizardRegistryElement[] getChildren() {
- return NO_ELEMENTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.wizards.registries.IRSEWizardRegistryElement#getParent()
- */
- public IRSEWizardRegistryElement getParent() {
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeContentProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeContentProvider.java
deleted file mode 100644
index eccfde31b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeContentProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Standard RSE wizard selection tree label provider.
- */
-public class RSEWizardSelectionTreeContentProvider implements ITreeContentProvider {
- private final static Object[] NO_ELEMENTS = new Object[0];
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof RSEAbstractWizardSelectionTreeDataManager) {
- return ((RSEAbstractWizardSelectionTreeDataManager)parentElement).getChildren();
- } else if (parentElement instanceof RSEWizardSelectionTreeElement) {
- return ((RSEWizardSelectionTreeElement)parentElement).getChildren();
- }
- return NO_ELEMENTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object element) {
- if (element instanceof RSEWizardSelectionTreeElement) {
- return ((RSEWizardSelectionTreeElement)element).getParentElement();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /* (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) {
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java
deleted file mode 100644
index 13bacd01f..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeElement.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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.ui.wizards.registries;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Data element for RSE wizard selection tree's.
- */
-public class RSEWizardSelectionTreeElement {
- private final List children = new ArrayList();
- private final IRSEWizardRegistryElement wizardRegistryElement;
- private RSEWizardSelectionTreeElement parent;
-
- /**
- * Constructor.
- *
- * @param element The wizard registry element to associate. Must be not <code>null</code>.
- */
- public RSEWizardSelectionTreeElement(IRSEWizardRegistryElement element) {
- assert element != null;
- wizardRegistryElement = element;
- children.clear();
- }
-
- /**
- * Returns the associated wizard registry element
- *
- * @return The wizard registry element. Must be never <code>null</code>.
- */
- public IRSEWizardRegistryElement getWizardRegistryElement() {
- return wizardRegistryElement;
- }
-
- /**
- * Adds a new child to this RSE wizard selection tree element. If
- * the child had been added already before, the method will do nothing.
- *
- * @param child The child to add. Must be not <code>null</code>.
- */
- public void add(RSEWizardSelectionTreeElement child) {
- assert child != null;
- if (!children.contains(child)) {
- children.add(child);
- }
- }
-
- /**
- * Removes the given child from the list of children. If the child
- * has not been added before, the method will do nothing.
- *
- * @param child The child to remove. Must be not <code>null</code>.
- */
- public void remove(RSEWizardSelectionTreeElement child) {
- assert child != null;
- children.remove(child);
- }
-
- /**
- * Returns the children of this wizard selection tree element.
- *
- * @return The list of children, May be empty but never <code>null</code>.
- */
- public RSEWizardSelectionTreeElement[] getChildren() {
- return (RSEWizardSelectionTreeElement[])children.toArray(new RSEWizardSelectionTreeElement[children.size()]);
- }
-
- /**
- * Associate a parent element to this wizard selection tree element.
- *
- * @param parent The parent element to associate or <code>null</code>.
- */
- public void setParentElement(RSEWizardSelectionTreeElement parent) {
- this.parent = parent;
- }
-
- /**
- * Returns the associated parent element of this wizard selection tree element.
- *
- * @return The parent element or <code>null</code>.
- */
- public RSEWizardSelectionTreeElement getParentElement() {
- return this.parent;
- }
-
- /**
- * Returns the description to show in the wizards message area.
- *
- * @return The description to show in the wizards message are or <code>null</code>.
- */
- public String getDescription() {
- if (getWizardRegistryElement() instanceof IRSEWizardDescriptor) {
- return ((IRSEWizardDescriptor)getWizardRegistryElement()).getDescription();
- }
- return null;
- }
-
- /**
- * Returns the label to show in the tree.
- *
- * @return The label to use for the tree node or <code>null</code>.
- */
- public String getLabel() {
- return getWizardRegistryElement().getName();
- }
-
- /**
- * Returns the image to show in the tree.
- *
- * @return The image to use for the tree node or <code>null</code>.
- */
- public Image getImage() {
- if (getWizardRegistryElement() instanceof IRSEWizardDescriptor) {
- return ((IRSEWizardDescriptor)getWizardRegistryElement()).getImage();
- } else if (getWizardRegistryElement() instanceof IRSEWizardCategory) {
- ImageRegistry imageRegistry = RSEUIPlugin.getDefault().getImageRegistry();
- String key = "category::" + getWizardRegistryElement().getId(); //$NON-NLS-1$
- Image image = imageRegistry.get(key);
- if (image == null) {
- //ImageDescriptor descriptor = RSEUIPlugin.getDefault().getImageDescriptorFromIDE("obj16/fldr_obj.gif"); //$NON-NLS-1$
- ImageDescriptor descriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- if (descriptor != null) {
- image = descriptor.createImage();
- imageRegistry.put(key, image);
- }
- }
- return image;
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof RSEWizardSelectionTreeElement) {
- return getWizardRegistryElement().equals(((RSEWizardSelectionTreeElement)obj).getWizardRegistryElement());
- }
- return super.equals(obj);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getWizardRegistryElement().hashCode();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeLabelProvider.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeLabelProvider.java
deleted file mode 100644
index 41c9a5e71..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreeLabelProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.ui.wizards.registries;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Standard RSE wizard selection tree label provider.
- */
-public class RSEWizardSelectionTreeLabelProvider extends LabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- Image image = null;
-
- if (element instanceof RSEWizardSelectionTreeElement) {
- image = ((RSEWizardSelectionTreeElement)element).getImage();
- }
-
- return image;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- String text = super.getText(element);
-
- if (element instanceof RSEWizardSelectionTreeElement) {
- text = ((RSEWizardSelectionTreeElement)element).getLabel();
- }
-
- return text;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreePatternFilter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreePatternFilter.java
deleted file mode 100644
index b37b5c97a..000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/registries/RSEWizardSelectionTreePatternFilter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.
- * Uwe Stieber (Wind River) - [209193] RSE new connection wizard shows empty categories if typing something into the filter
- *******************************************************************************/
-package org.eclipse.rse.ui.wizards.registries;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.ui.wizards.newconnection.RSENewConnectionWizardSelectionPage;
-import org.eclipse.rse.ui.wizards.newconnection.RSENewConnectionWizardSelectionTreeElement;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-/**
- * Standard RSE wizard selection tree pattern filter.
- */
-public class RSEWizardSelectionTreePatternFilter extends PatternFilter {
- private final WizardPage parentPage;
-
- /**
- * Constructor.<br>
- * Creates a new pattern filter instance which is not associated
- * with a parent wizard page.
- */
- public RSEWizardSelectionTreePatternFilter() {
- this(null);
- }
-
- /**
- * Constructor.<br>
- * Creates a new pattern filter instance with the passed in wizard page
- * associated as parent.
- *
- * @param page The parent wizard page or <code>null</code>.
- * @since 3.0
- */
- public RSEWizardSelectionTreePatternFilter(WizardPage page) {
- parentPage = page;
- }
-
-
- /**
- * Returns the associated parent wizard parent.
- *
- * @return The parent wizard page or <code>null</code> if none.
- * @since 3.0
- */
- protected WizardPage getParentWizardPage() {
- return parentPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isElementVisible(org.eclipse.jface.viewers.Viewer, java.lang.Object)
- */
- public boolean isElementVisible(Viewer viewer, Object element) {
- // If the element is a new connection wizard selection tree element,
- // we have to check if the associated system type is enabled and/or
- // if the system type itself may filter it out from the visible elements.
- if (element instanceof RSENewConnectionWizardSelectionTreeElement) {
- // A system type must be associated with such tree element, otherwise it is filtered out
- IRSESystemType systemType = ((RSENewConnectionWizardSelectionTreeElement)element).getSystemType();
- if (systemType == null) return false;
-
- // if the page is restricted to a set of system types, check on them first
- WizardPage wizardPage = getParentWizardPage();
- if (wizardPage instanceof RSENewConnectionWizardSelectionPage) {
- IRSESystemType[] restricted = ((RSENewConnectionWizardSelectionPage)wizardPage).getRestrictToSystemTypes();
- if (restricted != null && restricted.length > 0) {
- if (!Arrays.asList(restricted).contains(systemType)) return false;
- }
- }
-
- // First, adapt the system type to a viewer filter and pass on the select request
- // to the viewer filter adapter if available
- ViewerFilter filter = (ViewerFilter)(systemType.getAdapter(ViewerFilter.class));
- // We don't know what the parent of the passed in element is.
- // So, we can pass on only null here.
- if (filter != null && !filter.select(viewer, null, element)) return false;
-
- // Second, double check if the system type passed the viewer filter but is disabled.
- if (!systemType.isEnabled()) return false;
- }
-
- return super.isElementVisible(viewer, element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isElementSelectable(java.lang.Object)
- */
- public boolean isElementSelectable(Object element) {
- if (element instanceof RSEWizardSelectionTreeElement) {
- return !(((RSEWizardSelectionTreeElement)element).getWizardRegistryElement() instanceof IRSEWizardCategory);
- }
- return super.isElementSelectable(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isLeafMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
- */
- protected boolean isLeafMatch(Viewer viewer, Object element) {
- if (element instanceof RSEWizardSelectionTreeElement) {
- RSEWizardSelectionTreeElement treeElement = (RSEWizardSelectionTreeElement)element;
- // we filter only the wizard nodes
- if (treeElement.getWizardRegistryElement() instanceof IRSEWizardDescriptor) {
- return wordMatches(treeElement.getLabel());
- }
-
- }
-
- return super.isLeafMatch(viewer, element);
- }
-
-}
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 d4cc693f9..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 5, 2007</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 4e4064995..000000000
--- a/rse/plugins/org.eclipse.rse.ui/build.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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/
-output.. = bin/
-source.. = model/,\
- subsystems/,\
- UI/
-
-javacSource=1.4
-javacTarget=1.4
-src.includes = about.html,\
- schema/,\
- .settings/,\
- .options,\
- build.properties
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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/ui/internal/model/SystemNewConnectionPromptObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java
deleted file mode 100644
index d692ace8b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemNewConnectionPromptObject.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
- *******************************************************************************/
-
-package org.eclipse.rse.ui.internal.model;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ViewerFilter;
-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.internal.ui.SystemResources;
-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.actions.SystemNewConnectionAction;
-import org.eclipse.rse.ui.model.ISystemPromptableObject;
-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 IRSESystemType[] systemTypes;
- private ISystemPromptableObject[] children;
- private SystemNewConnectionAction action = null;
- private boolean systemTypesSet = false;
- private String newConnText;
- private boolean isRootPrompt = false;
-
- /**
- * Constructor
- */
- public SystemNewConnectionPromptObject() {
- setSystemTypes(RSECorePlugin.getTheCoreRegistry().getSystemTypes());
- isRootPrompt = true;
- }
-
- /**
- * Constructor for child instances
- */
- public SystemNewConnectionPromptObject(SystemNewConnectionPromptObject parent, IRSESystemType systemType) {
- this.parent = parent;
- setSystemTypes(new IRSESystemType[] { systemType });
- }
-
- // ----------------------------------------------------
- // METHODS FOR CONFIGURING THIS OBJECT
- // ----------------------------------------------------
-
- /**
- * Set the system types to restrict the New Connection wizard to
- */
- public void setSystemTypes(IRSESystemType[] systemTypes) {
- this.systemTypes = systemTypes;
- this.systemTypesSet = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemPromptableObject#getSystemTypes()
- */
- public IRSESystemType[] getSystemTypes() {
- IRSESystemType[] types = systemTypes;
- if (types == null || !systemTypesSet)
- types = new IRSESystemType[0];
- return types;
- }
-
- /**
- * 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;
-
- if (children == null) {
- // Basically, once initialized, the list of system types cannot change, but
- // it doesn't hurt to check this in case it changes because of future extensions.
- if (isRootPrompt) {
- systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- }
-
- // Note: Do not filter out the disabled system types here. The system
- // type enabling is dynamic, so we have to filter them dynamic. Here
- // we build a static list of _all_ available system types.
- if (systemTypes != null) {
- children = new ISystemPromptableObject[systemTypes.length];
- for (int idx = 0; idx < children.length; idx++) {
- children[idx] = new SystemNewConnectionPromptObject(this, systemTypes[idx]);
- }
- }
- }
-
- return getChildrenFiltered(children);
- }
-
- private static class RSESystemTypeSorter implements Comparator {
-
- public int compare(Object o1, Object o2) {
- if (o1 instanceof IRSESystemType && o2 instanceof IRSESystemType) {
- return ((IRSESystemType)o1).getLabel().compareTo(((IRSESystemType)o2).getLabel());
- } else if (o1 instanceof ISystemPromptableObject && o2 instanceof ISystemPromptableObject) {
- return ((ISystemPromptableObject)o1).getText().compareTo(((ISystemPromptableObject)o2).getText());
- }
- return 0;
- }
- }
-
- protected final static Comparator SYSTEM_TYPE_SORTER = new RSESystemTypeSorter();
-
- /**
- * Filter the list of children to return and remove the disabled children.
- *
- * @param children The list of children to filter.
- * @return The filtered list of children or <code>null</code> if the passed in list of children had been <code>null</code>.
- */
- private ISystemPromptableObject[] getChildrenFiltered(ISystemPromptableObject[] children) {
- if (children == null) return null;
-
- List filtered = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- ISystemPromptableObject promptObject = children[i];
- if (promptObject instanceof SystemNewConnectionPromptObject) {
- IRSESystemType[] systemTypes = ((SystemNewConnectionPromptObject)promptObject).getSystemTypes();
- boolean enabled = true;
- for (int j = 0; j < systemTypes.length && enabled; j++) {
- IRSESystemType systemType = systemTypes[j];
-
- // As we should consistently show the same new connection wizards list
- // within the new connection wizard itself and this new connection prompt
- // object, we have to do the same here as what the wizard is doing for
- // filtering the selectable list of new connection wizards.
- ViewerFilter filter = (ViewerFilter)(systemType.getAdapter(ViewerFilter.class));
- if (filter != null && !filter.select(null, null, systemType)) {
- enabled = false;
- }
-
- if (enabled) {
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemType.getAdapter(RSESystemTypeAdapter.class));
- if (adapter != null && !adapter.isEnabled(systemType)) {
- enabled = false;
- }
- }
- }
-
- if (enabled) filtered.add(promptObject);
- } else {
- // it's a ISystemPromptableObject but not a SystemNewConnectionPromptObject?
- filtered.add(promptObject);
- }
- }
-
- if (!filtered.isEmpty()) Collections.sort(filtered, SYSTEM_TYPE_SORTER);
- return (ISystemPromptableObject[])filtered.toArray(new ISystemPromptableObject[filtered.size()]);
- }
-
- /**
- * 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 == null || (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 {
- RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(systemTypes[0].getAdapter(RSESystemTypeAdapter.class));
- return adapter.getImageDescriptor(systemTypes[0]);
- }
- }
-
- /**
- * Return the label for this object
- */
- public String getText() {
- if (newConnText == null) {
- if (isRootPrompt || getSystemTypes().length == 0) {
- if (hasChildren())
- newConnText = SystemResources.RESID_NEWCONN_PROMPT_LABEL;
- else
- newConnText = SystemResources.RESID_NEWCONN_PROMPT_LABEL + " ..."; //$NON-NLS-1$
- } else if (getSystemTypes().length > 0) {
- newConnText = systemTypes[0].getLabel() + " ..."; //$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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java
deleted file mode 100644
index d3297ae64..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistryUI.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186773] split SystemRegistryUI from SystemRegistry implementation
- * Martin Oberhuber (Wind River) - [189123] Prepare ISystemRegistry for move into non-UI
- * David Dykstal (IBM) - [191038] remove getInstance(logFilePath) log file was not used
- * initialize correctly in getInstance()
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [] Move SystemRegistry impl into Core
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * David McKnight (IBM) - [248339] [dnd][encodings] Cannot drag&drop / copy&paste files or folders with turkish or arabic names
- ********************************************************************************/
-package org.eclipse.rse.ui.internal.model;
-
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.internal.core.model.SystemPostableEventNotifier;
-import org.eclipse.rse.internal.core.model.SystemRegistry;
-import org.eclipse.rse.internal.ui.view.SystemDNDTransferRunnable;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveHelpers;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter;
-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.SystemPreferencesManager;
-import org.eclipse.rse.ui.model.ISystemRegistryUI;
-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 and control center for RSE UI related operations.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class SystemRegistryUI implements ISystemRegistryUI {
-
- private static SystemRegistryUI _instance = null;
- private SystemRegistry registry = 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 @link{#getInstance()}.
- */
- protected SystemRegistryUI()
- {
- super();
- registry = SystemRegistry.getInstance();
- }
-
- // ----------------------------
- // PUBLIC STATIC METHODS...
- // ----------------------------
-
- /**
- * @return the singleton SystemRegistryUI instance.
- */
- public static SystemRegistryUI getInstance()
- {
- if (_instance == null) {
- _instance = new SystemRegistryUI();
- }
- return _instance;
- }
-
- // ----------------------------------
- // UI METHODS...
- // ----------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#showRSEPerspective()
- */
- public void showRSEPerspective()
- {
- SystemPerspectiveHelpers.openRSEPerspective();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#expandHost(org.eclipse.rse.core.model.IHost)
- */
- 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));
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#expandSubSystem(org.eclipse.rse.core.subsystems.ISubSystem)
- */
- 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));
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemShellProvider#getShell()
- */
- public Shell getShell()
- {
- // thread safe shell
- 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;
- }
-
- // ----------------------------------
- // ACTIVE PROGRESS MONITOR METHODS...
- // ----------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#setRunnableContext(org.eclipse.swt.widgets.Shell, org.eclipse.jface.operation.IRunnableContext)
- */
- public void setRunnableContext(Shell shell, IRunnableContext context)
- {
- //this.currentRunnableContext = context;
- //this.currentRunnableContextShell = shell;
- pushRunnableContext(shell, context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#clearRunnableContext()
- */
- public void clearRunnableContext()
- {
- //this.currentRunnableContext = null;
- //this.currentRunnableContextShell = null;
- popRunnableContext();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#getRunnableContext()
- */
- 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#getSystemClipboard()
- */
- 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$
- 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$
-
- String subSystemId = str.substring(0, subsystemDelim);
- String srcKey = str.substring(subsystemDelim + 1, str.length());
-
- ISystemRegistry registry = RSECorePlugin.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;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.model.ISystemRegistry#getSystemClipboardObjects(int)
- */
- 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();
-
- // get the sources
- String str = null;
- try {
- str = new String(result, "UTF-8"); //$NON-NLS-1$
- }
- catch (UnsupportedEncodingException e)
- {
- str = new String(result);
- }
-
- //StringTokenizer tokenizer = new StringTokenizer(new String(result), SystemViewDataDropAdapter.RESOURCE_SEPARATOR);
- String[] tokens = str.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;
- {
- 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;
- srcObjects.add(textData);
- }
- }
- return srcObjects;
- }
-
- /**
- * Returns the remote systems scratchpad root
- */
- public SystemScratchpad getSystemScratchPad()
- {
- if (scratchpad == null)
- {
- scratchpad = new SystemScratchpad();
- }
- return scratchpad;
- }
-
-
- // ----------------------------
- // USER PREFERENCE METHODS...
- // ----------------------------
- /**
- * Are connection names to be qualified by profile name?
- */
- public boolean getQualifiedHostNames()
- {
- return SystemPreferencesManager.getQualifyConnectionNames();
- }
- /**
- * Set if connection names are to be qualified by profile name
- */
- public void setQualifiedHostNames(boolean set)
- {
- SystemPreferencesManager.setQualifyConnectionNames(set);
- IHost[] conns = registry.getHosts();
- if (conns != null)
- {
- for (int idx = 0; idx < conns.length; idx++)
- {
- //FIXME it seems wrong to fire a RENAME event just because a user preference changed.
- //Showing qualified host names or not should be a view-only setting!
- registry.fireEvent(new SystemResourceChangeEvent(conns[idx], ISystemResourceChangeEvents.EVENT_RENAME, registry));
- }
- }
- if (SystemPreferencesManager.getShowFilterPools())
- {
- registry.fireEvent(new SystemResourceChangeEvent(registry, ISystemResourceChangeEvents.EVENT_REFRESH, registry));
- }
- }
-
- /**
- * Reflect the user changing the preference for showing filter pools.
- */
- public void setShowFilterPools(boolean show)
- {
- ISubSystemConfigurationProxy[] proxies = registry.getSubSystemConfigurationProxies();
- if (proxies != null)
- {
- for (int idx = 0; idx < proxies.length; idx++)
- {
- if (proxies[idx].isSubSystemConfigurationActive())
- {
- ISubSystemConfiguration factory = proxies[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)
- {
- ISubSystemConfigurationProxy[] proxies = registry.getSubSystemConfigurationProxies();
- if (proxies != null)
- {
- for (int idx = 0; idx < proxies.length; idx++)
- {
- if (proxies[idx].isSubSystemConfigurationActive())
- {
- SubSystemConfiguration factory = proxies[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)
- {
- registry.fireEvent(new SystemResourceChangeEvent(this, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- }
-
- // ----------------------------
- // RESOURCE EVENT METHODS...
- // ----------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#postEvent(org.eclipse.rse.core.events.ISystemResourceChangeEvent)
- */
- public void postEvent(ISystemResourceChangeEvent event)
- {
- registry.getResourceChangeManager().postNotify(event);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.model.ISystemRegistryUI#postEvent(org.eclipse.rse.core.events.ISystemResourceChangeListener, org.eclipse.rse.core.events.ISystemResourceChangeEvent)
- */
- public void postEvent(ISystemResourceChangeListener listener, ISystemResourceChangeEvent event)
- {
- new SystemPostableEventNotifier(listener, event); // create and run the notifier
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRunnableContextWrapper.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRunnableContextWrapper.java
deleted file mode 100644
index 30671e44e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRunnableContextWrapper.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.ui.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/ui/internal/model/SystemScratchpad.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemScratchpad.java
deleted file mode 100644
index c0bb44e5b..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemScratchpad.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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) - [168975] Move RSE Events API to Core
- * Kevin Doyle (IBM) - [160280] Added a check to see if the item to be added already exists
- * Kevin Doyle (IBM) - [189421] Scratchpad not updated after Rename
- ********************************************************************************/
-
-package org.eclipse.rse.ui.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.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.internal.ui.view.SystemViewScratchpadAdapter;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-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)
- {
- if (!contains(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);
- }
-
- public void replace(String oldName, Object newItem) {
- int index = -1;
- Object adapterObj = Platform.getAdapterManager().getAdapter(newItem, ISystemDragDropAdapter.class);
- ISystemDragDropAdapter adapter;
- ISubSystem subSystemNewItem;
- if (adapterObj != null && adapterObj instanceof ISystemDragDropAdapter) {
- adapter = (ISystemDragDropAdapter) adapterObj;
- subSystemNewItem = adapter.getSubSystem(newItem);
-
- // try to find the old item by oldName
- for (int i = 0; i < _children.size() && index == -1; i++) {
- Object element = _children.get(i);
- if (adapter.getSubSystem(element) == subSystemNewItem) {
- if (adapter.getAbsoluteName(element).equals(oldName)) {
- index = i;
- }
- }
- }
- // We found the old item remove it and replace with new one
- if (index != -1) {
- _children.remove(index);
- _children.add(index, newItem);
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemPromptableObject.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemPromptableObject.java
deleted file mode 100644
index eac3ada97..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemPromptableObject.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-
-package org.eclipse.rse.ui.model;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.IRSESystemType;
-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 {
- /**
- * Returns the list of system types this promptable object
- * is associated with. This is important to implement label
- * and icon decorators for promptable objects.
- *
- * @return The list of associated system types or an empty list.
- */
- public IRSESystemType[] getSystemTypes();
-
- /**
- * 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/ui/model/ISystemRegistryUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemRegistryUI.java
deleted file mode 100644
index 545786dc1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemRegistryUI.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189123] Prepare ISystemRegistry for move into non-UI
- * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
- * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- ********************************************************************************/
-package org.eclipse.rse.ui.model;
-
-import java.util.List;
-
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvent;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Registry and control center for RSE UI related operations.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISystemRegistryUI extends ISystemShellProvider {
-
- // ----------------------------------
- // UI METHODS...
- // ----------------------------------
-
- /**
- * Show the RSE perspective if it is not already showing
- */
- public void showRSEPerspective();
-
- /**
- * Select and expand the given connection in the RSE, if the RSE is the active perspective.
- * @param conn the host connection to expand
- */
- public void expandHost(IHost conn);
-
- /**
- * Select and expand the given subsystem in the RSE, if the RSE is the active perspective.
- * @param subsystem the subsystem to expand
- */
- public void expandSubSystem(ISubSystem subsystem);
-
- /**
- * Returns the clipboard used for copy actions
- */
- public Clipboard getSystemClipboard();
-
- /**
- * Returns the list of objects on the system clipboard
- * @param srcType the transfer type
- * @return the list of clipboard objects
- */
- public List getSystemClipboardObjects(int srcType);
-
- // ----------------------------
- // USER PREFERENCE METHODS...
- // ----------------------------
- /**
- * Are connection names to be qualified by profile name?
- * @since 3.0
- */
- public boolean getQualifiedHostNames();
-
- /**
- * Set if connection names are to be qualified by profile name
- * @since 3.0
- */
- public void setQualifiedHostNames(boolean set);
-
- /**
- * Reflect the user changing the preference for showing filter pools.
- * @since 3.0
- */
- 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
- * @since 3.0
- */
- public void setShowNewHostPrompt(boolean show);
-
- // ----------------------------------
- // 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);
-
- /**
- * Clear the current active runnable context to be used for a progress monitor.
- * Be sure to call this from you dispose method.
- */
- public void clearRunnableContext();
-
- /**
- * Return the current registered runnable context, or null if none registered. Use this
- * for long running operations instead of an intrusive progress monitor dialog as it is
- * more user friendly. Many dialogs/wizards have these built in so it behooves us to use it.
- */
- public IRunnableContext getRunnableContext();
-
- // ----------------------------
- // RESOURCE EVENT METHODS...
- // ----------------------------
-
- /**
- * 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);
-
- /**
- * 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);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemShellProvider.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemShellProvider.java
deleted file mode 100644
index c6402753d..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/ISystemShellProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- ********************************************************************************/
-package org.eclipse.rse.ui.model;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Interface that viewers implement in order to give RSE actions
- * access to the Shell in which they are embedded.
- */
-public interface ISystemShellProvider {
-
- /**
- * This method will be called to return the shell for your viewer.
- * @return the shell for your viewer.
- */
- public Shell getShell();
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemRemoteElementResourceSet.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemRemoteElementResourceSet.java
deleted file mode 100644
index 93614dd32..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemRemoteElementResourceSet.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [226561] supply API markup in the javadoc
- *******************************************************************************/
-
-package org.eclipse.rse.ui.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;
-
-/**
- * A SystemRemoteElementResourceSet is used to gather objects together for operations
- * that work on multiple objects.
- * @noextend This class is not intended to be subclassed by clients.
- * Extend {@link AbstractSystemResourceSet} instead.
- */
-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 getViewAdapter()
- {
- 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/ui/model/SystemResourceChangeEventUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemResourceChangeEventUI.java
deleted file mode 100644
index 25e232ef1..000000000
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/model/SystemResourceChangeEventUI.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [226561] supply API markup in the javadoc
- *******************************************************************************/
-
-package org.eclipse.rse.ui.model;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.swt.widgets.Item;
-
-/**
- * Event object sent to SystemResourceChangeListeners when a
- * remote system object is created, changed, removed, etc.
- * This extends the base event object to include a reference to an
- * orginating viewer.
- * @noextend This class is not intended to be subclassed by clients.
- * The class is complete as is.
- * @see org.eclipse.rse.core.events.ISystemResourceChangeEvents
- */
-public class SystemResourceChangeEventUI extends SystemResourceChangeEvent {
-
- private static final long serialVersionUID = 1;
- private Viewer originatingViewer;
- private Item item;
-
- /**
- * Constructor for SystemResourceChangeEvent.
- * @see org.eclipse.rse.core.events.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 SystemResourceChangeEventUI(Object source, int type, Object parent)
- {
- super(source, type, parent);
- }
-
- /**
- * Constructor for SystemResourceChangeEvent when the source is multipe resources.
- * @see org.eclipse.rse.core.events.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 SystemResourceChangeEventUI(Object[] source, int type, Object parent)
- {
- super(source, type, parent);
- }
-
- /**
- * Set the originating viewer.
- * For some events, this allows responding viewers to decide
- * if the event applies to them.
- * @param viewer the originating Viewer.
- */
- 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.
- * @return the originating Viewer.
- */
- public Viewer getOriginatingViewer()
- {
- return originatingViewer;
- }
-
- /**
- * 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.
- * @param item the viewer item of the selected object.
- */
- public void setViewerItem(Item item)
- {
- this.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.
- * @return the viewer item of the selected object.
- */
- public Item getViewerItem()
- {
- return item;
- }
-
-}
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 de63685ea..000000000
--- a/rse/plugins/org.eclipse.rse.ui/plugin.properties
+++ /dev/null
@@ -1,109 +0,0 @@
-################################################################################
-# Copyright (c) 2000, 2009 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:
-# Uwe Stieber (Wind River) - [174966] IRSESystemType should have a getLabel()
-# method for translatable label.
-# Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
-# Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
-# Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
-# David McKnight (IBM) - [160105] [usability] Universal action needed to locate a resource in the Remote Systems View
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = RSE UI
-providerName = Eclipse.org - DSDP
-
-extPoint.newConnectionWizards = New Connection Wizards
-#extPoint.compile = Remote Compile Commands
-extPoint.mountPathMappers = Mount Path Mappers
-
-#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
-
-View.Category.RemoteSystems = Remote Systems
-View.RemoteSystems = Remote Systems
-View.RemoteSystemsDetails = Remote System Details
-
-View.Team = Team
-
-Perspective.Explorer = Remote System Explorer
-
-PreferencePage.Logging = Logging
-PreferencePage.RemoteSystems = Remote Systems
-PreferencePage.Signon = Passwords
-
-Nature.RemoteSystemsNature = Remote System Nature
-Nature.RemoteSystemsTempNature = Remote System Temp Nature
-
-View.Search = Remote Search
-
-View.Scratchpad = Remote Scratchpad
-
-View.Monitor = Remote Monitor
-
-# 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.
-ProjectFilter.label=RSE Internal Projects
-ProjectFilter.description=Hides RSE internal projects
-
-# Creation wizard
-Creation.category.name = Remote System Explorer
-Creation.connection.name = Connection
-Creation.connection.description = Create a new connection to a remote system
-
-Connection.default.category.name=General
-DefaultRSENewConnectionWizard.name=RSE Default New Connection Wizard
-
-# Show in RSE View
-ShowInRSEView.label = Show in Remote Systems view
-ShowInRSEView.tooltip = Display the selected object in the Remote Systems view if applicable
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 08f1255ba..000000000
--- a/rse/plugins/org.eclipse.rse.ui/plugin.xml
+++ /dev/null
@@ -1,579 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006, 2009 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) - [185554] Remove dynamicPopupMenuExtensions extension point
-Martin Oberhuber (Wind River) - [186525] Move keystoreProviders to core
-Martin Oberhuber (Wind River) - [186523] Move subsystemConfigurations from UI to core
-Martin Oberhuber (Wind River) - [185552] Remove remoteSystemsViewPreferencesActions extension point
-Anna Dushistova (MontaVista) - [227535] [rseterminal][api] terminals.ui should not depend on files.core
-Anna Dushistova (MontaVista) - [234274][api] Launch Shell / Terminal commands menu placement and category
-David McKnight (IBM) - [160105] [usability] Universal action needed to locate a resource in the Remote Systems View
-David McKnight (IBM) - [260792] Default prompt text color/background color for Remote Shell view is difficult to see
-Uwe Stieber (Wind River) - [245039] [contributions][api] Provide property tester implementations in parallel to the older action filters
--->
-<?eclipse version="3.1"?>
-<plugin>
-<!-- ============================================ -->
-<!-- Define a RemoteSystems project nature -->
-<!-- ============================================ -->
- <extension
- id="remotesystemsnature"
- name="%Nature.RemoteSystemsNature"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.rse.internal.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.internal.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.internal.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>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.rse.internal.ui.propertypages.SystemPreferenceInitializer"/>
- </extension>
-
-<!-- ============================================ -->
-<!-- Define Workbench Properties Pages -->
-<!-- ============================================ -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%PropertyPage.SubSystem"
- class="org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCore"
- id="org.eclipse.rse.SubSystemsPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.subsystems.ISubSystem"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.Connection"
- class="org.eclipse.rse.internal.ui.propertypages.SystemConnectionPropertyPage"
- id="org.eclipse.rse.SystemPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.model.IHost"/>
- </enabledWhen>
- </page>
- <!-- with move to services this should disappear
- <page
- objectClass="org.eclipse.rse.ui.model.IHost"
- name="%PropertyPage.Connection.SubSystems"
- class="org.eclipse.rse.ui.propertypages.SystemConnectionSubSystemsPropertyPage"
- id="org.eclipse.rse.SystemConnectionSubSystemsPropertyPage">
- </page>
- -->
- <page
- name="%PropertyPage.Connection.ConnectorServices"
- class="org.eclipse.rse.internal.ui.propertypages.SystemConnectorServicesPropertyPage"
- id="org.eclipse.rse.ui.propertypages.SystemConnectorServicesPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.model.IHost"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.FilterPool"
- class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPoolPropertyPage"
- id="org.eclipse.rse.SystemFilterPoolPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilterPool"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.Reference"
- class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPoolReferencePropertyPage"
- id="org.eclipse.rse.SystemFilterPoolReferencePropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilterPoolReference"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.ReferencedFilterPool"
- class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPoolPropertyPage"
- id="org.eclipse.rse.SystemFilterPoolReferencePropertyPage2">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilterPoolReference"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.Filter"
- class="org.eclipse.rse.internal.ui.propertypages.SystemFilterPropertyPage"
- id="org.eclipse.rse.SystemFilterPropertyPage">
- <enabledWhen>
- <or>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilter"/>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilterReference"/>
- </or>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.ChangeFilter"
- class="org.eclipse.rse.ui.propertypages.SystemChangeFilterPropertyPage"
- id="org.eclipse.rse.SystemChangeFilterPropertyPage">
- <filter name="showChangeFilterStringPropertyPage" value="true"/>
- <enabledWhen>
- <or>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilter"/>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilterReference"/>
- </or>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.FilterString"
- class="org.eclipse.rse.ui.propertypages.SystemFilterStringPropertyPage"
- id="org.eclipse.rse.SystemFilterStringPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.filters.ISystemFilterString"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.TeamViewCategoryNode"
- class="org.eclipse.rse.ui.propertypages.SystemTeamViewCategoryPropertyPage"
- id="org.eclipse.rse.SystemTeamViewCategoryPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.internal.ui.view.team.SystemTeamViewCategoryNode"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.Profile"
- class="org.eclipse.rse.internal.ui.propertypages.SystemTeamViewProfilePropertyPage"
- id="org.eclipse.rse.SystemProfilePropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.core.model.ISystemProfile"/>
- </enabledWhen>
- </page>
- <page
- name="%PropertyPage.TeamViewSubSystemFactoryNode"
- class="org.eclipse.rse.internal.ui.propertypages.SystemTeamViewSubSystemConfigurationPropertyPage"
- id="org.eclipse.rse.SystemTeamViewSubSystemFactoryPropertyPage">
- <enabledWhen>
- <instanceof value="org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode"/>
- </enabledWhen>
- </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.internal.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.internal.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.internal.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.internal.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.internal.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.internal.ui.view.monitor.SystemMonitorViewPart"
- id="org.eclipse.rse.ui.view.monitorView">
- </view>
-
- </extension>
-
-<!-- ================================================================================= -->
-<!-- Define Remote System Explorer view pulldown menu submenu for preferences actions -->
-<!-- ================================================================================= -->
-<!-- FIXME this is hardcoded for now, but will be migrated to command/handler -->
-<!-- Clients can add their actions already if they create their own handler -->
-<!-- See the patch on https://bugs.eclipse.org/bugs/show_bug.cgi?id=186769 -->
-<!--
- <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"
- preferencePageCategory=""
- icon=""
- 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.internal.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.internal.ui.view.SystemViewPart"
- id="org.eclipse.rse.systemview.elementfactory">
- </factory>
- </extension>
-
-<!-- ================================================================= -->
-<!-- Define Mount Path Mappers extension point -->
-<!-- ================================================================= -->
- <extension-point id="mountPathMappers" name="%extPoint.mountPathMappers" schema="schema/mountPathMappers.exsd"/>
-
-<!-- ================================================================= -->
-<!-- Define newConnectionWizards extension point -->
-<!-- ================================================================= -->
- <extension-point id="newConnectionWizards" name="%extPoint.newConnectionWizards" schema="schema/newConnectionWizards.exsd"/>
-
-<!-- ================================================================= -->
-<!-- Define the Drop Actions -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.ui.dropActions">
- <action
- id="org.eclipse.rse.ui.view.DropActions"
- class="org.eclipse.rse.internal.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_DARK_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>
- <extension
- point="org.eclipse.rse.ui.newConnectionWizards">
- <category id="org.eclipse.rse.ui.wizards.newconnection.default.category"
- name="%Connection.default.category.name"/>
- <newConnectionWizard
- id="org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"
- class="org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard"
- name="%DefaultRSENewConnectionWizard.name"
- canFinishEarly="false"
- categoryId="org.eclipse.rse.ui.wizards.newconnection.default.category"
- hasPages="true">
- </newConnectionWizard>
- </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.newconnection.RSEMainNewConnectionWizard"
- 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>
-
- <extension point="org.eclipse.ui.navigator.navigatorContent">
- <commonFilter
- id="org.eclipse.rse.project.filters.RemoteSystemsProjects"
- name="%ProjectFilter.label"
- description="%ProjectFilter.description"
- activeByDefault="true">
- <filterExpression>
- <and>
- <instanceof value="org.eclipse.core.resources.IProject"/>
- <test property="org.eclipse.core.resources.name" value="RemoteSystems*"/>
- </and>
- </filterExpression>
- </commonFilter>
- </extension>
-
- <extension point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.rse.project.filters.*"/>
- </includes>
- </viewerContentBinding>
- </extension>
-
-<!-- ================================================================= -->
-<!-- RSE Property Tester contributions -->
-<!-- ================================================================= -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- id="org.eclipse.rse.ui.SubSystemPropertyTester"
- type="org.eclipse.core.runtime.IAdaptable"
- namespace="org.eclipse.rse.core"
- properties="hasSubSystemCategory, isOffline"
- class="org.eclipse.rse.internal.ui.subsystems.SubSystemPropertyTester">
- </propertyTester>
- <propertyTester
- class="org.eclipse.rse.internal.ui.view.SystemViewPropertyTester"
- id="org.eclipse.rse.internal.ui.view.SystemViewPropertyTester"
- namespace="org.eclipse.rse.ui"
- properties="name,type,hasChildren,connected,offline,systemType,systemTypeId,subsystemConfigurationId,subsystemConfigurationCategory,isRemote"
- type="org.eclipse.rse.ui.view.ISystemViewElementAdapter">
- </propertyTester>
- </extension>
-
- <extension point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.rse.ui.commands.category"
- name="%View.Category.RemoteSystems">
- </category>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <!-- from details view -->
- <viewerContribution
- id="org.eclipse.rse.ui.showInRemoteSystemsView"
- targetID="org.eclipse.rse.ui.view.systemTableView">
- <action id="org.eclipse.rse.ui.showInRemoteSystemsViewAction"
- label="%ShowInRSEView.label"
- tooltip="%ShowInRSEView.tooltip"
- icon="icons/full/cview16/system_view.gif"
- menubarPath="group.goto"
- class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">
- </action>
- </viewerContribution>
- <!-- from search view -->
- <viewerContribution
- id="org.eclipse.rse.ui.showInRemoteSystemsView"
- targetID="org.eclipse.rse.ui.view.SystemSearchView">
- <action id="org.eclipse.rse.ui.showInRemoteSystemsViewAction"
- label="%ShowInRSEView.label"
- tooltip="%ShowInRSEView.tooltip"
- icon="icons/full/cview16/system_view.gif"
- menubarPath="group.goto"
- class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">
- </action>
- </viewerContribution>
- <!-- from scratchpad view -->
- <viewerContribution
- id="org.eclipse.rse.ui.showInRemoteSystemsView"
- targetID="org.eclipse.rse.ui.view.scratchpad.SystemScratchpadViewPart">
- <action id="org.eclipse.rse.ui.showInRemoteSystemsViewAction"
- label="%ShowInRSEView.label"
- tooltip="%ShowInRSEView.tooltip"
- icon="icons/full/cview16/system_view.gif"
- menubarPath="group.goto"
- class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">
- </action>
- </viewerContribution>
- <!-- from monitor view -->
- <viewerContribution
- id="org.eclipse.rse.ui.showInRemoteSystemsView"
- targetID="org.eclipse.rse.ui.view.monitorView">
- <action id="org.eclipse.rse.ui.view.monitorView"
- label="%ShowInRSEView.label"
- tooltip="%ShowInRSEView.tooltip"
- icon="icons/full/cview16/system_view.gif"
- menubarPath="group.goto"
- class="org.eclipse.rse.internal.ui.actions.ShowInSystemsViewDelegate">
- </action>
- </viewerContribution>
- </extension>
-</plugin>
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/newConnectionWizards.exsd b/rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizards.exsd
deleted file mode 100644
index 617409c97..000000000
--- a/rse/plugins/org.eclipse.rse.ui/schema/newConnectionWizards.exsd
+++ /dev/null
@@ -1,234 +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="newConnectionWizards" name="New Connection Wizards"/>
- </appInfo>
- <documentation>
- This extension point is used to register new connection creation wizard extensions. New connection creation wizards appear as choices within the &quot;New Connection&quot; dialog, and are used to create connections from the registered system types. New connection creation wizards can be organized in categories. Uncategorized wizards or wizards with invalid category paths will be sorted in as non-categorized root element.
-&lt;p&gt;
-Each system type must have exactly one new connection wizard associated. In case multiple new connection wizard contributions would match the same system type, the new connection wizard which matched the system type first, will be used.
-&lt;p&gt;
-One new connection wizard may be registered for multiple system types. Such wizards should implement the &lt;code&gt;org.eclipse.jface.viewers.ISelectionChangedListener&lt;/code&gt; interface. to get notified about the currently selected system type within the new connection system type selection page.
-&lt;p&gt;
-&lt;b&gt;Note:&lt;/b&gt; The main RSE new connection wizard is using the &lt;code&gt;selectionChanged(SelectionChangedEvent)&lt;/code&gt; to notify the nested wizards about
- &lt;ul&gt;
- &lt;li&gt; system type selection changes in the RSE new connection wizard selection page and&lt;/li&gt;
- &lt;li&gt; the selected context of a view or toolbar or menu the caller of the main RSE new connection wizard is passing in.&lt;/li&gt;
- &lt;/ul&gt;&lt;br&gt;
- If the caller of the main RSE new connection wizard has passed in a selected context, the structured selection given via the &lt;code&gt;selectionChanged&lt;/code&gt; call has two elements. The first element is always the selected system type (instance of type &lt;code&gt;IRSESystemType&lt;/code&gt;) and the second one, if present, is the selected context from the caller (instance of type &lt;code&gt;ISelection&lt;/code&gt;).
-&lt;p&gt;
-New connection wizard may have the need of contributing different attribute values for the same attribute dependent on the current system type selection. These wizards should implement the &lt;code&gt;org.eclipse.rse.ui.wizards.newconnection.IRSEDynamicNewConnectionWizard&lt;/code&gt;.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="newConnectionWizard" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="category" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <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="newConnectionWizard">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique identifier.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- A translatable name that will be used in the UI.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- A translatable short description of the wizard.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="systemTypeIds" type="string">
- <annotation>
- <documentation>
- A semicolon separated list of RSE system type id&apos;s this wizard will be registered for. RSE system type id&apos;s which have already a new connection creation wizard registered are ignored. Wildcards &apos;*&apos; and &apos;?&apos; are allowed. If empty, all registered RSE system types will be queried if accepting this new connection creation wizard by id.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A fully qualified name of the Java class implementing &lt;code&gt;org.eclipse.jface.wizard.IWizard&lt;/code&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.wizard.IWizard"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="categoryId" type="string">
- <annotation>
- <documentation>
- A fully qualified valid category id previously defined by this or some other plug-in. If omitted or if the specified category id is invalid, the wizard will be added as non-categorized root element.
-&lt;p&gt;
-The default RSE wizard category id is &quot;org.eclipse.rse.ui.wizards.newconnection.default.category&quot;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="canFinishEarly" type="boolean" use="default" value="false">
- <annotation>
- <documentation>
- Whether the wizard is capable of finishing without ever showing pages to the user.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="hasPages" type="boolean" use="default" value="true">
- <annotation>
- <documentation>
- Whether the wizard provides any pages.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="category">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique identifier.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- A translatable name that will be used in the UI.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="parentCategoryId" type="string">
- <annotation>
- <documentation>
- The fully qualified id of the parent category or empty if it is a root category.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- RSE 2.0
- </documentation>
- </annotation>
-
- <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.newConnectionWizards&quot;&gt;
- &lt;category id=&quot;org.eclipse.rse.ui.wizards.newconnection.default.category&quot;
- name=&quot;%Creation.category.name&quot;/&gt;
- &lt;newConnectionWizard
- id=&quot;org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard&quot;
- class=&quot;org.eclipse.rse.ui.wizards.newconnection.RSEDefaultNewConnectionWizard&quot;
- name=&quot;%DefaultRSENewConnectionWizard.name&quot;
- canFinishEarly=&quot;false&quot;
- categoryId=&quot;org.eclipse.rse.ui.wizards.newconnection.default.category&quot;
- hasPages=&quot;true&quot;&gt;
- &lt;/newConnectionWizard&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 creation wizard for a certain system type must implement &lt;samp&gt;org.eclipse.jface.wizard.IWizard&lt;/samp&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The default RSE new connection wizard as contributed from &lt;code&gt;org.eclipse.rse.ui&lt;/code&gt; plug-in.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006, 2007 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 to take standard Eclipse IWizard&apos;s
- </documentation>
- </annotation>
-
-</schema>
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 59d9d64de..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java
+++ /dev/null
@@ -1,3473 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2009 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) - 141803: Fix cpu usage 100% while connecting
- * David Dykstal (IBM) - 168870: moved SystemPreferencesManager to a new package
- * David Dykstal (IBM) - 168870: created and used RSEPreferencesManager
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
- * Xuan Chen (IBM) - [187342] Open in New Window expand failed error when not connected
- * David McKnight (IBM) - [186363] remove deprecated calls in checkIsConnected
- * David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
- * David McKnight (IBM) - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
- * David McKnight (IBM) - [212403] [apidoc][breaking] Fixing docs of SubSystem#getConnectorService() and making internalConnect() private
- * David Dykstal (IBM) - [197036] pulled up subsystem configuration switching logic from the service subsystem layer
- * implemented IServiceSubSystem here so that subsystem configuration switching can be
- * made common among all service subsystems.
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * Martin Oberhuber (Wind River) - [190231] Prepare API for UI/Non-UI Splitting
- * David McKnight (IBM) - [225747] [dstore] Trying to connect to an "Offline" system throws an NPE
- * David McKnight (IBM) - [233435] SubSystem.resolveFilterStrings(*) does not prompt for a connection when the subsystem is not connected
- * David Dykstal (IBM) - [233876] filters lost after restart
- * David McKnight (IBM) - [238609] Substitution value missing for disconnect failed message
- * David McKnight (IBM) - [237970] Subsystem.connect( ) fails for substituting host name when isOffline( ) is true
- * David McKnight (IBM) - [244270] Explicit check for isOffline and just returning block implementing a cache for Work Offline
- * Don Yantzi (IBM) - [244807] Delay connecting if resolving filters while restoring from cache
- * David McKnight (IBM) - [226787] [services] Dstore processes subsystem is empty after switching from shell processes
- * David McKnight (IBM) - [262930] Remote System Details view not restoring filter memento input
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- * David McKnight (IBM) - [284018] concurrent SubSystem.connect() calls can result in double login-prompt
- * ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-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.OperationCanceledException;
-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.osgi.util.NLS;
-import org.eclipse.rse.core.IRSEInteractionProvider;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.events.ISystemModelChangeEvent;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.IRSECallback;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-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.internal.core.RSECoreMessages;
-import org.eclipse.rse.internal.core.SystemResourceConstants;
-import org.eclipse.rse.internal.core.filters.HostOwnedFilterPoolPattern;
-import org.eclipse.rse.internal.core.model.ISystemProfileOperation;
-import org.eclipse.rse.internal.core.model.SystemModelChangeEvent;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-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.SystemBasePlugin;
-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.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 handful 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(String filterString, IProgressMonitor monitor)}
- * <li>{@link #internalResolveFilterString(Object parent, String filterString, IProgressMonitor monitor)}
- * <li>{@link #internalGetProperty(Object subject, String key, IProgressMonitor monitor)}
- * <li>{@link #internalSetProperty(Object subject, String key, String value, IProgressMonitor monitor)}
- * <li>{@link #internalGetProperties(Object subject, String[] keys, IProgressMonitor monitor)}
- * <li>{@link #internalSetProperties(Object subject, String[] keys, String[] values, IProgressMonitor monitor)}
- * </ul>
- *
- */
-
-public abstract class SubSystem extends RSEModelObject
-implements IAdaptable, ISubSystem, ISystemFilterPoolReferenceManagerProvider
-{
- 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;
- private IRSEInteractionProvider _interactionProvider = null;
- 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;
- private boolean _isInitialized = false;
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected ISystemFilterPoolReferenceManager filterPoolReferenceManager = null;
-
- private Map poolReferencesMap = new HashMap();
-
- 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);
- }
-
- /**
- * Set an Interaction Provider specific for this subsystem.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work
- * or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target
- * Management</a> team.
- * </p>
- *
- * @param p the new interaction provider to use, or <code>null</code> to
- * fall back to the default interaction provider (from
- * RSECorePlugin).
- * @since 3.0
- */
- public void setInteractionProvider(IRSEInteractionProvider p) {
- synchronized (this) {
- _interactionProvider = p;
- }
- }
-
- /**
- * Get the current Interaction Provider. Returns a specific one for this
- * subsystem if it has been set, or falls back to the default one from
- * RSECorePlugin otherwise.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work
- * or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target
- * Management</a> team.
- * </p>
- *
- * @return the interaction provider to use.
- * @since 3.0
- */
- public IRSEInteractionProvider getInteractionProvider() {
- synchronized (this) {
- if (_interactionProvider != null) {
- return _interactionProvider;
- }
- }
- return RSECorePlugin.getDefault().getDefaultInteractionProvider();
- }
-
- /**
- * 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))
- {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- RSEPreferencesManager.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))
- {
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- RSEPreferencesManager.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)
- {
- RSEPreferencesManager.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 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))
- {
- uid = RSEPreferencesManager.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)
- RSEPreferencesManager.clearUserId(previousUserIdKey);
- IConnectorService system = getConnectorService();
- if (system != null)
- system.clearCredentials();
- }
-
- /**
- * @{inheritDoc
- * @since 3.0
- */
- public void checkIsConnected(IProgressMonitor monitor) throws SystemMessageException
- {
- // for 244270, don't connect when offline
- // or when restoring from memento
- if (!isConnected() && !isOffline() && !((getCacheManager() != null) && getCacheManager().isRestoreFromMemento()))
- {
- try
- {
- if (monitor != null)
- {
- connect(monitor, false);
- }
- else
- {
- Display display = Display.getCurrent();
- if (display != null)
- {
- connect(false, null);
- }
- else
- {
- // Not on UI-thread
- connect(new NullProgressMonitor(), false);
- }
- }
- }
- catch (Exception e)
- {
- if (e instanceof SystemMessageException)
- {
- throw (SystemMessageException) e;
- }
- else
- if (e instanceof OperationCanceledException)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELLED, getHost().getAliasName());
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_CANCELLED,
- IStatus.CANCEL, msgTxt);
- throw new SystemMessageException(msg);
- }
- else
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, getHostName());
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_FAILED,
- IStatus.ERROR, msgTxt);
- 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++) {
- ISystemFilterPool currentPool = allPoolsInProfile[idx];
- String poolOwnerName = currentPool.getOwningParentName();
- if (poolOwnerName == null) {
- HostOwnedFilterPoolPattern pattern = new HostOwnedFilterPoolPattern(config.getId());
- if (pattern.matches(currentPool.getName())) {
- currentPool.setOwningParentName(hostName); // TODO these pools should have been created with the owner set properly
- poolOwnerName = hostName;
- }
- }
- if (hostName.equals(poolOwnerName)) {
- pool = currentPool;
- }
- }
- }
- 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.
- */
- HostOwnedFilterPoolPattern pattern = new HostOwnedFilterPoolPattern(getConfigurationId());
- String name = pattern.make(connectionName);
- 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
- // --------------------------------------------------------------------------------------
-
-
- // --------------
- // Methods for encoding and decoding remote objects for drag and drop, and
- // clipboard copy
- // ------------------------------------------------------------------------
- // --------------
-
- /**
- * Return the remote object that corresponds to the specified unique ID.
- * <p>
- * Since the abstract subsystem implementation does not know anything about
- * the specific kinds of resources managed by concrete implementations, this
- * method can only resolve filter references.
- * </p>
- * <p>
- * <strong>subsystem implementations must override this method in order to
- * resolve IDs for the remote objects they manage, to support drag and drop,
- * clipboard copy and other remote object resolving schemes.</strong>
- * Extenders that want to support filters should call
- * <code>super.getObjectWithAbsoluteName(key)</code> when they do not find a
- * reference for the key themselves.
- * </p>
- *
- * @see org.eclipse.rse.core.subsystems.IRemoteObjectResolver#
- * getObjectWithAbsoluteName(String, IProgressMonitor)
- *
- * @param key the unique id of the remote object. Must not be
- * <code>null</code>.
- * @param monitor the progress monitor
- * @return the remote object instance, or <code>null</code> if no object is
- * found with the given id.
- * @throws Exception in case an error occurs contacting the remote system
- * while retrieving the requested remote object. Extenders are
- * encouraged to throw {@link SystemMessageException} in order to
- * support good user feedback in case of errors. Since exceptions
- * should only occur while retrieving new remote objects during
- * startup, clients are typically allowed to ignore these exceptions
- * and treat them as if the remote object were simply not there.
- * @since 3.0
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception
- {
- // by default, the subsystem will attempt to find a filter reference for the key.
- // Return null when no such filter is found.
- return getFilterReferenceWithAbsoluteName(key);
- }
-
- /**
- * @deprecated use getObjectWithAbsoluteName(String key, IProgressMonitor monitor)
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception
- {
- return getObjectWithAbsoluteName(key, new NullProgressMonitor());
- }
-
- /**
- * Return the filter reference that corresponds to the specified key. If there
- * @param key the absolute name for an object.
- * @return a filter reference if there is one matching the key,
- * or <code>null</code> if no such filter is found.
- */
- protected Object getFilterReferenceWithAbsoluteName(String key)
- {
- // figure out if there is a filter
- String filterID = key;
- try
- {
- ISystemFilterPoolReferenceManager filterMgr = getFilterPoolReferenceManager();
- String modString = filterID.replace('.', ',');
-
- String[] segments = modString.split(",");
-
- if (segments.length > 0)
- {
- // this is the profile
- String mgrName = segments[0];
-
- // this is the filter pool manager for the profile
- ISystemFilterPoolManager mgr = parentSubSystemConfiguration.getSystemFilterPoolManager(mgrName);
-
- if (mgr != null && segments.length > 1){
- // name of the filter is the last segment
- String filterName = segments[segments.length - 1];
-
- // filter pool name is the 3rd and 2nd to last segment
- //String filterPoolName =
- // segments[segments.length - 3] + '.' +
- // segments[segments.length - 2];
-
-
- ISystemFilterPool filterPool = null;
- ISystemFilterPool[] filterPools = mgr.getSystemFilterPools();
- for (int p = 0; p < filterPools.length && filterPool == null; p++){
- ISystemFilterPool pool = filterPools[p];
- String realPoolName = pool.getName();
-
- // check for match
- String filterPoolName = segments[segments.length - 2];
- for (int s = 3; s < segments.length && filterPool == null; s++){
- if (filterPoolName.equals(realPoolName)){
- filterPool = pool;
- }
- else if (realPoolName.endsWith(filterPoolName)){
- filterPoolName = segments[segments.length - s] + '.' + filterPoolName;
- }
- else {
- // no match
- break;
- }
- }
- }
-
-
- 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 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)
- {
- RSECorePlugin.getTheSystemRegistry().fireEvent(event);
- }
- /*
- * Helper method to fire a reference event...
- */
- protected void fireEvent(SystemResourceChangeEvent event, Object grandParent)
- {
- event.setGrandParent(grandParent);
- RSECorePlugin.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, ISystemResourceChangeEvents.EVENT_ADD, this);
- fireEvent(newPoolRef, ISystemResourceChangeEvents.EVENT_REVEAL_AND_SELECT, this);
- } else {
- ISystemFilterPool pool = newPoolRef.getReferencedFilterPool();
- if (pool != null && pool.getSystemFilterCount() > 0) {
- ISystemFilterReference[] filterRefs = newPoolRef.getSystemFilterReferences(this);
- fireEvent(filterRefs, ISystemResourceChangeEvents.EVENT_ADD_MANY, this, -1); // -1 means append to end
- }
- }
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- RSECorePlugin.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, ISystemResourceChangeEvents.EVENT_DELETE, this);
- }
- else if (filterPoolRef.getReferencedFilterPool().getSystemFilterCount()>0)
- {
- ISystemFilterReference[] filterRefs = filterPoolRef.getSystemFilterReferences(this);
- fireEvent(filterRefs, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
- }
-
- try {
- getSubSystemConfiguration().saveSubSystem(this);
- // fire model change event in case any BP code is listening...
- RSECorePlugin.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, ISystemResourceChangeEvents.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...
- RSECorePlugin.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, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN, this);
- try
- {
- getSubSystemConfiguration().saveSubSystem(this);
- ISystemFilterPoolReference[] poolRefs = getFilterPoolReferenceManager().getSystemFilterPoolReferences();
- for (int idx=0; idx<poolRefs.length; idx++)
- RSECorePlugin.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, ISystemResourceChangeEvents.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, ISystemResourceChangeEvents.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++)
- RSECorePlugin.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, ISystemResourceChangeEvents.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, ISystemResourceChangeEvents.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 + " (" + RSECoreMessages.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$
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
-
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, msgTxt, 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(OperationCanceledException exc)
- {
- monitor.done();
- return Status.CANCEL_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$
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
- return new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, IStatus.OK, msgTxt, 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = internalResolveFilterString(_filterString, mon);
- }
- }
-
- /**
- * 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = internalResolveFilterStrings(_filterStrings, mon);
- }
- }
-
- /**
- * 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = internalResolveFilterString(_parent, _filterString, mon);
- }
- }
-
- /**
- * 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputStrings = new String[] {internalGetProperty(_subject, _key, mon)};
- }
- }
-
- /**
- * 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = new Object[] {internalSetProperty(_subject, _key, _value, mon)};
- }
- }
-
- /**
- * 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputStrings = internalGetProperties(_subject, _keys, mon);
- }
- }
-
- /**
- * 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(RSECoreMessages.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)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- runOutputs = new Object[] {internalSetProperties(_subject, _keys, _values, mon)};
- }
- }
-
- /**
- * Represents the subsystem operation of connecting the subsystem to the remote machine.
- */
- public class ConnectJob extends SubSystemOperationJob
- {
- private SubSystem _ss;
- private IRSECallback _callback;
-
- public ConnectJob(SubSystem ss, IRSECallback callback)
- {
- super(RSECoreMessages.RSESubSystemOperation_Connect_message);
- _ss = ss;
- _callback = callback;
- }
-
- public IStatus run(IProgressMonitor monitor) {
- IStatus status = super.run(monitor);
- if (_callback != null)
- {
- _callback.done(status, null);
- }
- return status;
- }
-
- 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 (!isOffline()){
- if (!implicitConnect(true, mon, msg, totalWorkUnits)){
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, getHostName());
- throw new Exception(msgTxt);
- }
- internalConnect(mon);
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.connectedStatusChange(_ss, true, false);
- }
- }
- }
-
- /**
- * 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 = RSECorePlugin.getTheSystemRegistry();
- sr.connectedStatusChange(_subsystem, false, true, _collapseTree);
- }
-
- }
-
- private boolean _collapseTree;
- private SubSystem _subsystem;
- public DisconnectJob(boolean collapseTree, SubSystem subsystem)
- {
- super(RSECoreMessages.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(RSECoreMessages.RSESubSystemOperation_Notifying_registry_message);
- _subsystem = ss;
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor)
- {
- final ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- sr.connectedStatusChange(_subsystem, true, false);
- return Status.OK_STATUS;
- }
- }
-
- protected boolean implicitConnect(boolean isConnectOperation, IProgressMonitor mon, String msg, int totalWorkUnits) throws SystemMessageException, InvocationTargetException, OperationCanceledException
- {
- 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
- String msgTxt = NLS.bind(RSECoreMessages.MSG_OFFLINE_CANT_CONNECT,getHost().getAliasName());
- String msgDetails = NLS.bind(RSECoreMessages.MSG_OFFLINE_CANT_CONNECT_DETAILS, getHost().getAliasName());
- SystemMessage sMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- SystemResourceConstants.MSG_OFFLINE_CANT_CONNECT,
- IStatus.INFO, msgTxt, msgDetails);
- 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$
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_UNKNOWNHOST, hostName);
- msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_UNKNOWNHOST,
- IStatus.ERROR, msgTxt, exc);
- }
- else
- {
- SystemBasePlugin.logError("Connection error", exc); //$NON-NLS-1$
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, hostName);
- msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_FAILED,
- IStatus.ERROR, msgTxt, 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)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELLED, hostName);
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_CONNECT_CANCELLED,
- IStatus.CANCEL, msgTxt);
- 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)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName);
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_FAILED,
- IStatus.CANCEL, msgTxt, exc);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- 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)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELLED, hostName);
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_DISCONNECT_CANCELLED,
- IStatus.CANCEL, msgTxt);
-
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
- msgDlg.open();
- }
-
-
- /**
- * Helper method to return the message "Resolving to &1..."
- */
- protected static String getResolvingMessage(String filterString)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_RESOLVE_PROGRESS, filterString);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Running command &1..."
- */
- protected static String getRunningMessage(String cmd)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_RUN_PROGRESS, cmd);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Querying &1..."
- */
- protected static String getQueryingMessage(String key)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_QUERY_PROGRESS, key);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Setting &1..."
- */
- protected static String getSettingMessage(String key)
- {
- String msgTxt = NLS.bind(CommonMessages.MSG_SET_PROGRESS, key);
- return msgTxt;
- }
- /**
- * Helper method to return the message "Querying properties..."
- */
- protected static String getQueryingMessage()
- {
- return CommonMessages.MSG_QUERY_PROPERTIES_PROGRESS;
- }
- /**
- * Helper method to return the message "Setting properties..."
- */
- protected static String getSettingMessage()
- {
- return CommonMessages.MSG_SET_PROPERTIES_PROGRESS;
- }
-
- /**
- * 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$
-
- String msgTxt = NLS.bind(CommonMessages.MSG_OPERATION_FAILED, excMsg);
-
- sysMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_FAILED,
- IStatus.ERROR, msgTxt, exc);
-
-
- 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)
- {
- String msgTxt = CommonMessages.MSG_OPERATION_CANCELLED;
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- ICommonMessageIds.MSG_OPERATION_CANCELLED,
- IStatus.CANCEL, msgTxt);
- SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
- 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.
- *
- * Lazy Loading: Note that if your subsystem does not support connecting,
- * and you do not support filters, here is a good point to ensure that the
- * bundles which declare your UI adapters get loaded, since the default code
- * which overriders usually place in
- * {@link #initializeSubSystem(IProgressMonitor)} is not called in that
- * case. Similarly, if your subsystem declares custom images for filters or
- * filter pools, overriding the getChildren() call here to first load your
- * filter adapters and THEN super.getChildren() is a good idea.
- */
- 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;
- }
-
- protected void scheduleJob(SubSystemOperationJob job, ISchedulingRule rule) 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;
- }
- job.setPriority(Job.INTERACTIVE);
- //job.setUser(true);
- if (rule != null)
- {
- job.setRule(rule);
- }
- job.schedule();
- }
-
- /**
- * 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;
- }
-
-
- /**
- * 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.internal.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.
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(String filterString, IProgressMonitor monitor) throws Exception
- {
- // for bug 233435, implicit connect if the connection is not connected
- checkIsConnected(monitor);
-
- if (isConnected() || isOffline() || (getCacheManager() != null && getCacheManager().isRestoreFromMemento()))
- {
- if (!supportsConnecting && !_isInitialized) {
- // Lazy Loading: Load adapters (e.g. Local Subsystem)
- initializeSubSystem(monitor);
- }
- Object[] results = internalResolveFilterString(filterString, monitor);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- 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, IProgressMonitor)} but takes an array of
- * filter strings versus a single filter string.
- * <p>
- * The default implementation of this simply calls {@link #internalResolveFilterStrings(String[], IProgressMonitor)}.
- * <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.
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
- throws Exception
- {
- // for bug 233435, implicit connect if the connection is not connected
- checkIsConnected(monitor);
-
- if ((filterStrings == null) || (filterStrings.length == 0)) {
- SystemBasePlugin.logInfo("Filter strings are null"); //$NON-NLS-1$
- return null;
- }
- if (isConnected() || isOffline() || (getCacheManager() != null && getCacheManager().isRestoreFromMemento()))
- {
- if (!supportsConnecting && !_isInitialized) {
- // Lazy Loading: Load adapters (e.g. Local Subsystem)
- initializeSubSystem(monitor);
- }
- Object[] results = internalResolveFilterStrings(filterStrings, monitor);
- 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.internal.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 "*".
- * @param monitor the process monitor associated with this operation
- *
- * @return Array of objects that are the result of this filter string
- */
- public Object[] resolveFilterString(Object parent, String filterString, IProgressMonitor monitor)
- throws Exception
- {
-
- // for bug 237970, can't connect when we're in offline mode
- if (!isOffline()){
- // for bug 233435, implicit connect if the connection is not connected
- checkIsConnected(monitor);
- }
-
- if (isConnected() || isOffline() || (getCacheManager() != null && getCacheManager().isRestoreFromMemento()))
- {
- if (!supportsConnecting && !_isInitialized) {
- // Lazy Loading: Load adapters (e.g. Local Subsystem)
- initializeSubSystem(monitor);
- }
- Object[] results= internalResolveFilterString(parent, filterString, monitor);
- if (sortResults && (results!=null))
- results = sortResolvedFilterStringObjects(results);
- return results;
- }
- else
- {
- 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.
- *
- * @deprecated this shouldn't be used
- */
- public Object setProperty(Object subject, String key, String value)
- throws Exception
- {
- 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.
- *
- * @deprecated this shouldn't be used
- */
- public String getProperty(Object subject, String key)
- throws Exception
- {
- 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.
- *
- * @deprecated this shouldn't be used
- */
- public Object setProperties(Object subject, String[] keys, String[] values)
- throws Exception
- {
- 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 before doing any other work.
- *
- * @param monitor a progress monitor that can be used to show progress
- * during long-running operation. Cancellation is typically not
- * supported since it might leave the system in an inconsistent
- * state.
- * @throws SystemMessageException if an error occurs during initialization.
- */
- public void initializeSubSystem(IProgressMonitor monitor) throws SystemMessageException {
- _isInitialized = true;
- }
-
- /**
- * Uninitialize this subsystem just after disconnect. The default
- * implementation currently does nothing. Overriding methods should call
- * super after doing their own work.
- *
- * @param monitor a progress monitor that can be used to show progress
- * during long-running operation. Cancellation is typically not
- * supported since it might leave the system in an inconsistent
- * state.
- */
- public void uninitializeSubSystem(IProgressMonitor monitor) {
- _isInitialized = false;
- }
-
-
- private static class ConnectorServicePool {
-
- private static List _connectingConnectorServices = new ArrayList();
-
- public synchronized void add(IConnectorService cs) {
- _connectingConnectorServices.add(cs);
- }
-
- public synchronized void remove(IConnectorService cs) {
- _connectingConnectorServices.remove(cs);
- notifyAll();
- }
-
- public synchronized boolean contains(IConnectorService cs) {
- return _connectingConnectorServices.contains(cs);
- }
-
- public synchronized void waitUntilNotContained(IConnectorService cs) {
- while (contains(cs)){ // wait until the connector service is no longer in the list
- try {
- wait();
- }
- catch (InterruptedException e){
- e.printStackTrace();
- }
- catch (Exception e){
- e.printStackTrace();
- }
- }
- }
- }
-
- private static ConnectorServicePool _connectorServicePool = new ConnectorServicePool();
-
- /*
- * Connect to a remote system with a monitor.
- * Required for Bug 176603
- * @see org.eclipse.rse.core.subsystems.ISubSystem#connect(org.eclipse.core.runtime.IProgressMonitor, boolean)
- */
- public void connect(IProgressMonitor monitor, boolean forcePrompt) throws Exception
- {
- if (!isConnected())
- {
- String msg = null;
-
- msg = SubSystemConfiguration.getConnectingMessage(getHostName(), getConnectorService().getPort());
- SystemBasePlugin.logInfo(msg);
- monitor.beginTask(msg, 10);
- final boolean promptForPassword = forcePrompt;
-
- final Exception[] exception=new Exception[1];
- exception[0]=null;
-
- IConnectorService connectorService = getConnectorService();
- // is this connector service already connecting?
- boolean alreadyConnecting = _connectorServicePool.contains(connectorService);
-
- if (alreadyConnecting){
- // connector service already attempting connect
- // need to wait for it to complete
- // before we can return out of this method
- _connectorServicePool.waitUntilNotContained(connectorService);
- }
- else {
- _connectorServicePool.add(connectorService);
-
- try {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try
- {
- promptForPassword(promptForPassword);
- } catch(Exception e) {
- exception[0]=e;
- }
- }
- });
-
- Exception e = exception[0];
- if (e == null) {
- getConnectorService().connect(monitor);
- if (isConnected()) {
- final SubSystem ss = this;
- //Notify connect status change
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- RSECorePlugin.getTheSystemRegistry().connectedStatusChange(ss, true, false);
- }
- });
- }
- } else {
- throw e;
- }
- } finally {
- _connectorServicePool.remove(connectorService);
- monitor.done();
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystem#connect(boolean, org.eclipse.rse.core.model.IRSECallback)
- */
- public void connect(boolean forcePrompt, IRSECallback callback) 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 = RSECorePlugin.getTheSystemRegistry();
- IHost host = getHost();
- String hostName = host.getAliasName();
- ISystemProfile profile = getSystemProfile();
- if (registry.getHost(profile, hostName) == null) { // connection no longer exists
- String msgTxt = NLS.bind(RSECoreMessages.MSG_CONNECTION_DELETED, hostName);
-
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- SystemResourceConstants.MSG_CONNECTION_DELETED,
- IStatus.ERROR, msgTxt);
- throw new SystemMessageException(msg);
- }
- // yantzi: artemis 6.0, offline support
- if (isOffline()) {
- String msgTxt = NLS.bind(RSECoreMessages.MSG_OFFLINE_CANT_CONNECT, hostName);
- String msgDetails = NLS.bind(RSECoreMessages.MSG_OFFLINE_CANT_CONNECT_DETAILS, hostName);
-
- SystemMessage msg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- SystemResourceConstants.MSG_OFFLINE_CANT_CONNECT,
- IStatus.ERROR, msgTxt, msgDetails);
-
- 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().acquireCredentials(forcePrompt); // prompt for userid and password
- //FIXME Error reporting from the ConnectJob? How is the exception thrown?
- ConnectJob job = new ConnectJob(this, callback);
- scheduleJob(job, null);
- }
- }
-
- /**
- * 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;
- }
-
- try
- {
- getConnectorService().acquireCredentials(force); // prompt for password
- doConnection = true;
- ok = true;
- }
- catch (OperationCanceledException 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 = RSECorePlugin.getTheSystemRegistry();
- 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.
- *
- * @deprecated this shouldn't be used
- */
- public String[] getProperties(Object subject, String[] keys)
- throws Exception
- {
- return null;
- }
-
-
- /**
- * 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}.
- *
- * The connector service gets passed in to the constructor for the subsystem so there's normally no reason
- * to override this method.
- *
- */
- public IConnectorService getConnectorService()
- {
- return _connectorService;
- }
-
- /**
- * Sets the {@link org.eclipse.rse.core.subsystems.IConnectorService IConnectorService} object that represents the live connection for this system.
- *
- * @param connectorService the connector service
- */
- public void setConnectorService(IConnectorService connectorService)
- {
- if (_connectorService != connectorService)
- {
- _connectorService = connectorService;
- _connectorService.registerSubSystem(this);
- setDirty(true);
- }
- else
- {
- // register the subsystem
- _connectorService.registerSubSystem(this);
- }
- }
-
- // ----------------------------------
- // METHODS THAT MUST BE OVERRIDDEN...
- // ----------------------------------
-
-
- /**
- * 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 implicitConnect(boolean, IProgressMonitor, String, int) method.
- * 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 OperationCanceledException()
- * <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>
- *
- */
- private void internalConnect(IProgressMonitor monitor)
- throws InvocationTargetException, OperationCanceledException
- {
- try
- {
- getConnectorService().connect(monitor);
- }
- catch(InvocationTargetException exc) {
- throw exc;
- }
- catch (OperationCanceledException 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.internal.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(String filterString, IProgressMonitor monitor)
- 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(Object, String, IProgressMonitor)} but takes an array of
- * filter strings versus a single filter string.
- * <p>
- * The default implementation of this simply calls {@link #internalResolveFilterString(String, IProgressMonitor)}
- * 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 filterStrings array of filter patterns for objects to return.
- * @param monitor the progress monitor we are running under
- * @return Array of objects that are the result of resolving all the filter strings
- */
- public Object[] internalResolveFilterStrings(String[] filterStrings, IProgressMonitor monitor)
- 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(filterStrings[idx], monitor);
- //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.internal.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(Object parent, String filterString, IProgressMonitor monitor)
- 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(Object subject, String key, IProgressMonitor monitor)
- 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(Object subject, String key, String value, IProgressMonitor monitor)
- 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(Object subject, String[] keys, IProgressMonitor monitor)
- 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(Object subject, String[] keys, String[] values, IProgressMonitor monitor)
- 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.
- * @deprecated this is scheduled to be removed since we want to
- * avoid UI components in SubSystem.
- */
- 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.getTheSystemRegistryUI().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 = SystemBasePlugin.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;
- }
-
- /**
- * <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;
- }
-
-
-
-
- public boolean isPrimarySubSystem()
- {
- return false;
- }
-
- /*
- * Returns the first subsystem associated with the connection
- */
- public ISubSystem getPrimarySubSystem()
- {
- ISubSystem firstSS = null;
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISubSystem[] sses = registry.getSubSystems(getHost());
- 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()
- {
- ISystemProfile profile = getSystemProfile();
- boolean result = profile.commit();
- return result;
- }
-
- public IRSEPersistableContainer getPersistableParent() {
- return _host;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- List children = new ArrayList(10);
- ISystemFilterPoolReferenceManager manager = getSystemFilterPoolReferenceManager();
- if (manager != null) {
- children.addAll(Arrays.asList(manager.getSystemFilterPoolReferences()));
- }
- children.addAll(Arrays.asList(getPropertySets()));
- IRSEPersistableContainer[] result = new IRSEPersistableContainer[children.size()];
- children.toArray(result);
- return result;
- }
-
- /* Service Subsystem support */
-
- /**
- * Perform the subsystem specific processing required to complete a
- * subsystem configuration switch for a service subsystem. The subsystem
- * will typically query this configuration for interesting properties or
- * policies. It should also reset any state to a fresh start. This supplied
- * implementation does nothing. Subclasses may override if they implement a
- * service subsystem.
- *
- * @param newConfiguration the configuration this subsystem should use from
- * this point.
- * @since 3.0
- */
- protected void internalSwitchSubSystemConfiguration(ISubSystemConfiguration newConfiguration) {
- }
-
- /**
- * Determine if a service subsystem is capable of switching to this new
- * configuration. This is usually a test of this configuration's type
- * against the type expected by this subsystem. This supplied implementation
- * returns false. Subclasses should override if they implement a service
- * subsystem.
- *
- * @param configuration the configuration to which this subsystem may switch
- * @return true if this subsystem is capable of switching to this
- * configuration, false otherwise. This implementation returns false.
- * @see ISubSystem#canSwitchTo(ISubSystemConfiguration)
- * @since 3.0
- */
- public boolean canSwitchTo(ISubSystemConfiguration configuration) {
- return false;
- }
-
- /**
- * Switch to use another subsystem configuration. This default
- * implementation will test if the subsystem is a service subsystem and if
- * the subsystem is compatible with the suggested configuration. If it is
- * the switch will be performed and internalSwitchSubSystemConfiguration
- * will be called.
- *
- * @see ISubSystem#switchServiceFactory(ISubSystemConfiguration)
- * @see #internalSwitchSubSystemConfiguration(ISubSystemConfiguration)
- * @since 3.0
- */
- public void switchServiceFactory(final ISubSystemConfiguration config) {
- if (config != getSubSystemConfiguration() && canSwitchTo(config)) {
- // define the operation to be executed
- ISystemProfileOperation op = new ISystemProfileOperation() {
- public IStatus run() {
- doSwitchServiceConfiguration(config);
- return Status.OK_STATUS;
- }
- };
- // execute the operation in a commit guard
- SystemProfileManager.run(op);
- }
- }
-
- /**
- * Return the service type for this subsystem.
- *
- * @return the default implementation returns null. Subclasses that
- * implement service subsystems should return a type as specified in the
- * interface.
- * @see ISubSystem#getServiceType()
- * @since 3.0
- */
- public Class getServiceType() {
- return null;
- }
-
- /**
- * Actually perform the switch inside the commit guard
- * @param newConfig
- */
- private void doSwitchServiceConfiguration(ISubSystemConfiguration newConfig) {
-
- // only disconnect the connector service if there are no only services that use it
- IConnectorService oldConnectorService = getConnectorService();
- if (oldConnectorService.isConnected()){
- ISubSystem[] associatedSubSystems = oldConnectorService.getSubSystems();
- if (associatedSubSystems != null && associatedSubSystems.length > 1){
- // at least one other subsystem still using this connector service so don't disconnect
- // instead uninitialize this subsystem
- uninitializeSubSystem(new NullProgressMonitor());
- }
- else {
- // no more associated subsystems
- try {
- disconnect();
- } catch (Exception e) {
- }
- }
- }
-
-
-
- IHost host = getHost();
- // remove the old references and store them for later use
- ISubSystemConfiguration oldConfig = getSubSystemConfiguration();
- if (oldConfig.supportsFilters()) {
- ISystemFilterPoolReferenceManager fprm = getSystemFilterPoolReferenceManager();
- List poolReferences = Arrays.asList(fprm.getSystemFilterPoolReferences());
- poolReferencesMap.put(oldConfig, poolReferences);
- for (Iterator z = poolReferences.iterator(); z.hasNext();) {
- ISystemFilterPoolReference poolReference = (ISystemFilterPoolReference) z.next();
- fprm.removeSystemFilterPoolReference(poolReference, true);
- }
- fprm.setSystemFilterPoolManagerProvider(null);
- }
- setSubSystemConfiguration(newConfig);
- setConfigurationId(newConfig.getId());
- setName(newConfig.getName());
- // add the new pools to the manager
- if (newConfig.supportsFilters()) {
- ISystemFilterPoolReferenceManager fprm = getSystemFilterPoolReferenceManager();
- fprm.setSystemFilterPoolManagerProvider(newConfig);
- List poolReferences = (List) poolReferencesMap.get(newConfig);
- if (poolReferences == null) {
- // create default pools
- ISystemProfile profile = host.getSystemProfile();
- ISystemFilterPoolManager poolManager = newConfig.getFilterPoolManager(profile, true); // get and initialize the new filter pool manager
- int eventType = ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED;
- int resourceType = ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_CONNECTION;
- ISystemModelChangeEvent event = new SystemModelChangeEvent(eventType, resourceType, host);
- RSECorePlugin.getTheSystemRegistry().fireEvent(event); // signal a model change event as well
- // create references to those pools
- fprm.setDefaultSystemFilterPoolManager(poolManager);
- ISystemFilterPool[] pools = poolManager.getSystemFilterPools();
- for (int i = 0; i < pools.length; i++) {
- ISystemFilterPool pool = pools[i];
- fprm.addReferenceToSystemFilterPool(pool);
- }
- } else { // use the found pools
- for (Iterator z = poolReferences.iterator(); z.hasNext();) {
- ISystemFilterPoolReference poolReference = (ISystemFilterPoolReference) z.next();
- fprm.addSystemFilterPoolReference(poolReference);
- }
- }
- filterEventFilterPoolReferencesReset(); // signal a resource change event
- }
-
- // switch the connector service
-
-
- oldConnectorService.deregisterSubSystem(this);
- IConnectorService newConnectorService = newConfig.getConnectorService(host);
- setConnectorService(newConnectorService);
- oldConnectorService.commit();
- newConnectorService.commit();
-
- // call the subsystem specfic switching support
- internalSwitchSubSystemConfiguration(newConfig);
-
- if (newConnectorService.isConnected()){
- // make sure that the new service is initialized properly
- // since we're already connected and normally it's done as part of connect
- try {
- initializeSubSystem(new NullProgressMonitor());
- }
- catch (SystemMessageException e){
- SystemBasePlugin.logError(e.getMessage(), e);
- }
- }
-
-
- // commit the subsystem
- setDirty(true);
- commit();
- }
-
-} \ 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 68a521d72..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java
+++ /dev/null
@@ -1,2883 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - 168870: moved SystemPreferencesManager to a new package
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- * David Dykstal (IBM) - 168870: made use of adapters on the SubSystemConfigurationProxy
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * David Dykstal (IBM) - 142806: refactoring persistence framework
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * Martin Oberhuber (Wind River) - [190231] Remove UI-only code from SubSystemConfiguration
- * Rupen Mardirossian (IBM) - [189434] Move Up/Down on Filters Error
- * Kevin Doyle (IBM) - [190445] Set Position of cloned event in cloneEvent()
- * Martin Oberhuber (Wind River) - [195392] Avoid setting port 0 in initializeSubSystem()
- * David Dykstal (IBM) - [197036] rewrote getFilterPoolManager to delay the creation of default filter pools until the corresponding
- * a subsystem configuration is actually used for a host.
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- * Martin Oberhuber (Wind River) - [226574][api] Add ISubSystemConfiguration#supportsEncoding()
- * David Dykstal (IBM) - [236516] Bug in user code causes failure in RSE initialization
- * Martin Oberhuber (Wind River) - [218309] ConcurrentModificationException during workbench startup
- ********************************************************************************/
-
-package org.eclipse.rse.core.subsystems;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ISystemFilterPoolWrapperInformation;
-import org.eclipse.rse.core.filters.ISystemFilterString;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ILabeledObject;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISubSystemConfigurator;
-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.internal.core.RSECoreMessages;
-import org.eclipse.rse.internal.core.SystemResourceConstants;
-import org.eclipse.rse.internal.core.filters.SystemFilterPoolManager;
-import org.eclipse.rse.internal.core.filters.SystemFilterPoolWrapperInformation;
-import org.eclipse.rse.internal.core.filters.SystemFilterStartHere;
-import org.eclipse.rse.internal.core.model.SystemProfileManager;
-import org.eclipse.rse.internal.ui.SystemPropertyResources;
-import org.eclipse.rse.internal.ui.SystemResources;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.clientserver.messages.CommonMessages;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-
-/**
- * Abstract base class for subsystem configuration 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 subsystem configuration
- * <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#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 subsystem configuration 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 subsystem configuration.
- * <li>CreateDefaultFilterPool() to create any default filter pool when a new profile is created.
- * <li>#initializeSubSystem(SubSystem ss, configurarators[])
- * </ul>
- * <p>
- * A subsystem configuration will maintain in memory a list of all subsystem
- * objects it has. This list should be initialized 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 List 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 ISystemFilterPoolManager[] filterPoolManagers = null;
- protected Hashtable filterPoolManagersPerProfile = new Hashtable();
-
- // other stuff...
- private String translatedFilterType = null;
- private static Hashtable brokenReferenceWarningsIssued = new Hashtable();
- protected IHost currentlySelectedConnection;
- protected Object[] currentlySelected;
-
- // support for default subclasses for non-mof users
- protected static IHost currentlyProcessingConnection;
- protected static SubSystemConfiguration currentlyProcessingSubSystemConfiguration;
-
- /**
- * Internal list of subsystems. Must always be accessed in synchronized
- * blocks to protect against concurrent modification. For API compliance,
- * clients should always call {@link #getSubSystemList()} instead of
- * accessing this field directly.
- *
- * @noreference This field is not intended to be referenced by clients.
- */
- protected List subSystemList = new ArrayList();
-
- /**
- * Internal list of filter pool managers. Must always be accessed in
- * synchronized blocks. For API compliance, clients should always call
- * {@link #getFilterPoolManagerList()} instead of accessing this field
- * directly.
- *
- * @noreference This field is not intended to be referenced by clients.
- */
- protected List filterPoolManagerList = new ArrayList();
-
-// 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...
- // ---------------------------------
-
- /**
- * Test whether this subsystem configuration supports custom encodings. We
- * fall back to the setting provided by the host, or its underlying system
- * type by default.
- *
- * @see ISubSystemConfiguration#supportsEncoding(IHost)
- * @since org.eclipse.rse.core 3.0
- */
- public boolean supportsEncoding(IHost host) {
- // support encodings by default
- boolean rv = true;
- if (host.getSystemType().testProperty(IRSESystemType.PROPERTY_SUPPORTS_ENCODING, false)) {
- // switched off on system type level
- rv = false;
- }
- return rv;
- }
-
- /**
- * Return true if instance of this subsystem configuration'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 subsystem configuration support user-editable
- * port numbers.
- */
- public boolean isPortEditable()
- {
- return true;
- }
- /**
- * Return true if subsystem instances from this subsystem configuration support remote command execution
- * <p>RETURNS FALSE BY DEFAULT.
- */
- public boolean supportsCommands()
- {
- return false;
- }
- /**
- * Return true if subsystem instances from this subsystem configuration support getting and setting properties
- * <p>RETURNS FALSE BY DEFAULT.
- *
- * @return <code>false</code> to indicate that Properties are not supported 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.
- *
- * @return <code>true</code> to indicate that Filters are supported by default.
- */
- 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 configuration 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 configuration 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 configuration 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 configuration support dropping into.
- * Override this method to provide drop support for filters.
- */
- public boolean supportsDropInFilters()
- {
- return false;
- }
-
- /**
- * Return true if filters of this subsystem configuration 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/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 configuration 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 configuration 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
- */
- public boolean supportsServerLaunchType(ServerLaunchType serverLaunchType)
- {
- return true;
- }
-
- /**
- * Determines whether this subsystem configuration is responsible for the
- * creation of subsystems of the specified type Subsystem factories should
- * override this to indicate which subsystems they support.
- *
- * @param subSystemType type of subsystem
- * @return whether this subsystem configuration is for the specified
- * subsystem type
- */
- public boolean isFactoryFor(Class subSystemType)
- {
- //return SubSystem.class.isAssignableFrom(subSystemType);
- return false;
- }
-
- // ---------------------------------
- // 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.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];
- RSECorePlugin.getTheSystemRegistry().fireEvent(new org.eclipse.rse.core.events.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 subsystem configuration. This comes from the xml
- * "vendor" attribute of the extension point.
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients. It will likely be declared <tt>final</tt> in the next
- * release in order to ensure consistency with static xml markup in the
- * extension.
- */
- public String getVendor()
- {
- return proxy.getVendor();
- }
-
- /**
- * Return name of this subsystem configuration. This comes from the xml
- * "name" attribute of the extension point.
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients. It will likely be declared <tt>final</tt> in the next
- * release in order to ensure consistency with static xml markup in the
- * extension.
- */
- public String getName()
- {
- return proxy.getName();
- }
-
- /**
- * Return name of this subsystem configuration. This comes from the xml
- * "description" attribute of the extension point.
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients. It will likely be declared <tt>final</tt> in the next
- * release in order to ensure consistency with static xml markup in the
- * extension.
- */
- public String getDescription()
- {
- return proxy.getDescription();
- }
-
- /**
- * Return unique id of this subsystem configuration. This comes from the xml
- * "id" attribute of the extension point.
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients. It will likely be declared <tt>final</tt> in the next
- * release in order to ensure consistency with static xml markup in the
- * extension.
- */
- public String getId()
- {
- return proxy.getId();
- }
-
- /**
- * Return the category this subsystem configuration subscribes to. This
- * comes from the xml "category" attribute of the extension point.
- *
- * @see org.eclipse.rse.core.model.ISubSystemConfigurationCategories
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients. It will likely be declared <tt>final</tt> in the next
- * release in order to ensure consistency with static xml markup in the
- * extension.
- */
- public String getCategory()
- {
- return proxy.getCategory();
- }
-
- /**
- * Return the system types this subsystem configuration supports. These come
- * from static declaration in the
- * <tt>org.eclipse.rse.core.subsystemConfigurations</tt> and
- * <tt>org.eclipse.rse.core.systemTypes</tt> extension points.
- *
- * @nooverride This method is not intended to be re-implemented or extended
- * by clients. It will likely be declared <tt>final</tt> in the next
- * release in order to ensure consistency with static xml markup in the
- * extension.
- */
- public IRSESystemType[] getSystemTypes()
- {
- return proxy.getSystemTypes();
- }
-
- // ---------------------------------
- // PROFILE METHODS...
- // ---------------------------------
-
- // private methods...
-
- /**
- * Get a profile object given its name
- */
- public ISystemProfile getSystemProfile(String name)
- {
- return SystemProfileManager.getDefault().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
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#renameSubSystemProfile(java.lang.String, java.lang.String)
- */
- public void renameSubSystemProfile(String oldProfileName, String newProfileName)
- {
- //RSEUIPlugin.logDebugMessage(this.getClass().getName(), "Inside renameSubSystemProfile. newProfileName = "+newProfileName);
- ISystemProfile profile = getSystemProfile(newProfileName);
- 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 = getDefaultFilterPool(profile, oldProfileName);
- if (defaultPoolForThisProfile != null)
- try
- {
- getFilterPoolManager(profile).renameSystemFilterPool(defaultPoolForThisProfile, SubSystemConfiguration.getDefaultFilterPoolName(newProfileName, getId()));
- }
- catch (Exception exc)
- {
- SystemBasePlugin.logError("Unexpected error renaming default filter pool " + SubSystemConfiguration.getDefaultFilterPoolName(newProfileName, getId()), exc); //$NON-NLS-1$
- System.out.println("Unexpected error renaming default filter pool " + SubSystemConfiguration.getDefaultFilterPoolName(newProfileName, getId()) + ": " + exc); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- // ---------------------------------
- // SUBSYSTEM METHODS...
- // ---------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#renameSubSystemProfile(org.eclipse.rse.core.subsystems.ISubSystem, java.lang.String, java.lang.String)
- */
- public void renameSubSystemProfile(ISubSystem subsystem, String oldProfileName, String newProfileName) {
- subsystem.renamingProfile(oldProfileName, newProfileName);
- ISystemFilterPoolReferenceManager sfprm = subsystem.getSystemFilterPoolReferenceManager();
- if (sfprm != null) {
- sfprm.regenerateReferencedSystemFilterPoolNames(); // ask it to re-ask each pool for its reference name
- }
- try {
- saveSubSystem(subsystem);
- } catch (Exception exc) {
- RSECorePlugin.getDefault().getLogger().logError("Unexpected error saving subsystem.", exc); //$NON-NLS-1$
- }
- }
-
- /**
- * 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);
- if (subsystems != null)
- {
- for (int idx = 0; idx < subsystems.length; idx++)
- {
- subsystems[idx].renamingConnection(newConnectionName);
- }
- }
- else
- {
- // strange situation..log this
- SystemBasePlugin.logInfo("renameSubSystemsByConnection for " + conn.getAliasName() + " has no subsystems" ); //$NON-NLS-1$ //$NON-NLS-2$
- }
- 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 = RSECorePlugin.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
- }
- // compute cache in local variable in order to avoid modification by other Thread
- ISubSystem[] result = subsystems;
- List subSysList = getSubSystemList();
- synchronized (subSysList) {
- if ((result == null) || (result.length != subSysList.size()))
- {
- // TODO Huh? I do not understand this...
- if (SystemProfileManager.getDefault().getSize() <= 0) // 42913
- return EMPTY_SUBSYSTEM_ARRAY;
- result = (ISubSystem[]) subSysList.toArray(new ISubSystem[subSysList.size()]);
- subsystems = result;
- }
- }
- return result;
- }
-
- /**
- * 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)
- {
- SystemBasePlugin.logInfo("in SubSystemConfiguration.getSubSystems(conn, force) - not restored"); //$NON-NLS-1$
- /*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)
- {
- SystemBasePlugin.logInfo("in SubSystemConfiguration.getSubSytems(conn, force) - returning empty array"); //$NON-NLS-1$
- 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)
- {
- List subSysList = getSubSystemList();
- synchronized (subSysList) {
- List result = new ArrayList();
- for (Iterator i = subSysList.iterator(); i.hasNext();) {
- ISubSystem subsys = (ISubSystem) i.next();
- // TODO why == and not equals() here?
- if (subsys.getHost() == conn)
- result.add(subsys);
- }
- return (ISubSystem[]) result.toArray(new ISubSystem[result.size()]);
- }
- }
- /**
- * 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);
- List l = new ArrayList();
- for (int idx = 0; idx < allSubSystems.length; idx++)
- {
- ISubSystem ss = allSubSystems[idx];
- // TODO why == and not equals() here?
- if (ss.getSystemProfile() == profile)
- l.add(ss);
- }
- ISubSystem[] subsystems = (ISubSystem[]) l.toArray(new ISubSystem[l.size()]);
- 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
- List l = new ArrayList();
- for (int idx = 0; idx < allSubSystems.length; idx++)
- {
- ISystemFilterPoolReferenceManager mgr = allSubSystems[idx].getSystemFilterPoolReferenceManager();
- if ((mgr != null) && (mgr.isSystemFilterPoolReferenced(pool)))
- {
- l.add(allSubSystems[idx]);
- }
- }
- ISubSystem[] subsystems = (ISubSystem[]) l.toArray(new ISubSystem[l.size()]);
- 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)
- {
- List subSysList = getSubSystemList();
- synchronized (subSysList) {
- subSysList.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)
- {
- List subSysList = getSubSystemList();
- synchronized (subSysList) {
- subSysList.remove(subsys);
- }
- }
-
- /**
- * Creates a new subsystem instance that is associated with the given
- * connection object. SystemRegistry calls this when a new connection is
- * created, and appliesToSystemType returns true.
- * <p>
- * This method does the 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.}.
- * <li>calls {@link #initializeSubSystem(ISubSystem,
- * ISubSystemConfigurator[])} 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 configurators configurators that inject properties into this new
- * subsystem or null if there are none. Used to take
- * ISystemNewConnectionWizardPage[] before RSE 3.0.
- * @return the created subsystem or null if none has been created.
- * @since 3.0
- */
- public ISubSystem createSubSystem(IHost conn, boolean creatingConnection, ISubSystemConfigurator[] configurators)
- {
- 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 = null;
- try {
- subsys = createSubSystemInternal(conn);
- } catch (RuntimeException e) {
- RSECorePlugin.getDefault().getLogger().logError("Error creating subsystem", e); //$NON-NLS-1$
- }
- 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.getInstance().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName());
- 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, configurators);
- try
- {
- saveSubSystem(subsys);
- RSECorePlugin.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 = null;
- if (oldConnectorService != null)
- sl = oldConnectorService.getRemoteServerLauncherProperties();
- if ((sl != null) && supportsServerLaunchProperties(newConnection))
- {
- IServerLauncherProperties newSL = createServerLauncher(newConnectorService);
- if (newSL != null && newConnectorService != 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.getInstance().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName());
- 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...
- RSECorePlugin.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
- * subsystem configuration 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);
-
- /**
- * Initialize subsystems after creation (<i>Overridable</i>). The default
- * behavior is to add a reference to the default filter pool for this
- * subsystem configuration, if there is one. Typically subclasses call
- * <samp>super().initializeSubSystem(...)</samp> to get this default
- * behavior, then extend it.
- *
- * @param ss - The subsystem that was created via createSubSystemInternal
- * @param configurators an array of {@link ISubSystemConfigurator} used to
- * inject values into this subsystem or null if there are none. Used to
- * take ISystemNewConnectionWizardPage[] before RSE 3.0
- * @since 3.0
- */
- protected void initializeSubSystem(ISubSystem ss, ISubSystemConfigurator[] configurators) {
- 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 from the configurators to the subsystem
- if (configurators != null) {
- ISubSystemConfigurator ourPage = null;
- for (int idx = 0; (ourPage == null) && (idx < configurators.length); idx++) {
- ourPage = configurators[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...
- RSECorePlugin.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(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(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 subsystem configuration 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 subsystem configuration.
- * 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 subsystem configuration 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...
- RSECorePlugin.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)
- {
- }
- }
-
- /**
- * Overridable entry for child classes to supply their own flavor of
- * ISystemFilterPoolWrapperInformation for the new filter wizards.
- *
- * @return an ISystemFilterPoolWrapperInformation instead of a
- * SystemFilterPoolWrapperInformation since 3.0
- * @since 3.0
- */
- protected ISystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation()
- {
- return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP,
- SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_VERBIAGE);
- }
-
- /**
- * 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 configuration 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 configuration 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 configuration",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)
- {
- ISystemProfile profile = mgr.getSystemProfile();
- boolean result = profile.isDefaultPrivate() || mgr.getName().equalsIgnoreCase("private"); //$NON-NLS-1$
- return result;
- }
-
- /**
- * 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 configuration.
- * 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()
- {
- List fpManagers = getFilterPoolManagerList();
- synchronized (fpManagers) {
- if ((filterPoolManagers == null) || (filterPoolManagers.length != fpManagers.size())) {
- filterPoolManagers = (ISystemFilterPoolManager[]) fpManagers.toArray(new ISystemFilterPoolManager[fpManagers.size()]);
- }
- }
- return filterPoolManagers;
- }
-
- /**
- * Get the filter pool managers for the active profiles.
- */
- public ISystemFilterPoolManager[] getActiveFilterPoolManagers()
- {
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- ISystemFilterPoolManager[] activeManagers = new ISystemFilterPoolManager[activeProfiles.length];
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- activeManagers[idx] = getFilterPoolManager(activeProfiles[idx]);
- }
- return activeManagers;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getFilterPoolManager(org.eclipse.rse.core.model.ISystemProfile)
- */
- public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile) {
- return getFilterPoolManager(profile, false);
- }
-
- /**
- * {@inheritDoc}
- * @since 3.0 added boolean argument
- */
- public ISystemFilterPoolManager getFilterPoolManager(ISystemProfile profile, boolean force) {
- // 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);
- if (mgr == null) {
- try {
- Logger logger = RSECorePlugin.getDefault().getLogger();
- String managerName = getFilterPoolManagerName(profile);
- boolean supportsNested = supportsNestedFilters();
- mgr = SystemFilterPoolManager.createSystemFilterPoolManager(profile, logger, this, managerName, supportsNested);// the filter pool manager name
- mgr.setSingleFilterStringOnly(!supportsMultipleFilterStrings());
- mgr.setWasRestored(false); // not yet initialized
- } 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 happened!
- }
- addFilterPoolManager(profile, mgr);
- }
- boolean initialized = mgr.wasRestored();
- if (force && !initialized) {
- String defaultPoolName = getDefaultFilterPoolName(profile.getName(), getId());
- ISystemFilterPool defaultPool = mgr.getSystemFilterPool(defaultPoolName);
- if (defaultPool == null) {
- // allow subclasses to create default filter pool...
- defaultPool = createDefaultFilterPool(mgr); // createDefaultFilterPool(mgr) is typically overridden by subclasses
- }
- if (defaultPool != null) {
- defaultPool.setDefault(true);
- defaultPool.commit();
- }
- if (supportsDuplicateFilterStrings()) mgr.setSupportsDuplicateFilterStrings(true);
- if (isCaseSensitive()) mgr.setStringsCaseSensitive(true);
- mgr.setWasRestored(true);
- }
- 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, RSECorePlugin.getDefault().getLogger(), this, getFilterPoolManagerName(newProfile), supportsNestedFilters());
- 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 = RSECorePlugin.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$
-
- String msgTxt = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED, missingPoolMgrName, connectionName);
- SystemMessage sysMsg = new SimpleSystemMessage(RSECorePlugin.PLUGIN_ID,
- SystemResourceConstants.MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED,
- IStatus.ERROR, msgTxt);
- 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)
- {
- List fpManagers = getFilterPoolManagerList();
- synchronized (fpManagers) {
- filterPoolManagersPerProfile.put(profile, mgr);
- fpManagers.add(mgr);
- }
- 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
- List fpManagers = getFilterPoolManagerList();
- synchronized (fpManagers) {
- filterPoolManagersPerProfile.remove(profile);
- fpManagers.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)
- {
- RSECorePlugin.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;
- if(event.getMultiSource()!=null)
- {
- result = new SystemResourceChangeEvent(event.getMultiSource(), event.getType(), parent);
- }
- else
- {
- result = new SystemResourceChangeEvent(event.getSource(), event.getType(), parent);
- }
- result.setPosition(event.getPosition());
- 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...
- RSECorePlugin.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...
- RSECorePlugin.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...
- RSECorePlugin.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++)
- RSECorePlugin.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...
- RSECorePlugin.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...
- RSECorePlugin.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...
- RSECorePlugin.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...
- RSECorePlugin.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++)
- RSECorePlugin.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...
- RSECorePlugin.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...
- RSECorePlugin.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...
- RSECorePlugin.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))
- RSECorePlugin.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)
- {
- List l = new ArrayList();
- ISystemProfileManager profileMgr = SystemProfileManager.getDefault();
- 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)))
- {
- l.add(subsystem);
- }
- }
- }
- }
- }
- }
- }
-
- ISubSystem[] referencingSubSystems = null;
- if (l.size() > 0)
- {
- referencingSubSystems = (ISubSystem[]) l.toArray(new ISubSystem[l.size()]);
- }
-
- 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$
- if (sl instanceof ILabeledObject) {
- ((ILabeledObject)sl).setLabel(RSECoreMessages.RESID_PROPERTYSET_REMOTE_SERVER_LAUNCHER);
- }
-
- IRSESystemType systemType = connectorService.getHost().getSystemType();
- String systemTypeId = systemType.getId();
-
- if (systemTypeId.equals(IRSESystemType.SYSTEMTYPE_LINUX_ID)
- || systemTypeId.equals(IRSESystemType.SYSTEMTYPE_POWER_LINUX_ID)
- || systemTypeId.equals(IRSESystemType.SYSTEMTYPE_ZSERIES_LINUX_ID)
- ) {
- sl.setServerScript(RemoteServerLauncherConstants.LINUX_REXEC_SCRIPT);
- }
- else if (systemTypeId.equals(IRSESystemType.SYSTEMTYPE_UNIX_ID)
- || systemTypeId.equals(IRSESystemType.SYSTEMTYPE_AIX_ID)
- ) {
- sl.setServerScript(RemoteServerLauncherConstants.UNIX_REXEC_SCRIPT);
- }
-
- sl.saveToProperties();
- return sl;
- }
-
- // ------------------------------------------
- // 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 = null;
- try {
- subsys = createSubSystemInternal(conn);
- } catch (RuntimeException e) {
- RSECorePlugin.getDefault().getLogger().logError("Error creating subsystem", e); //$NON-NLS-1$
- }
- 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.getInstance().createSystemFilterPoolReferenceManager(subsys, this, subsys.getName());
- 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.
- * This allows cross references from
- * one subsystem in one profile to filter pools in any other profile.
- */
- public ISystemFilterPoolManager[] getAllSystemFilterPoolManagers()
- {
- ISystemProfile[] profiles = RSECorePlugin.getTheSystemProfileManager().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)
- {
- String msgTxt = null;
- if (port > 0)
- {
- msgTxt = NLS.bind(CommonMessages.MSG_CONNECTWITHPORT_PROGRESS, hostName, Integer.toString(port));
- }
- else
- { msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_PROGRESS, hostName);
- }
- return msgTxt;
- }
- /**
- * Helper method to return the message "Disconnecting from &1..."
- */
- public static String getDisconnectingMessage(String hostName, int port)
- {
- String msgTxt = null;
- if (port > 0)
- {
- msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECTWITHPORT_PROGRESS, hostName, Integer.toString(port));
- }
- else
- {
- msgTxt = NLS.bind(CommonMessages.MSG_DISCONNECT_PROGRESS, hostName);
-
- }
- return msgTxt;
- }
-
- /**
- * 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();
- }
-
- public List getSubSystemList()
- {
- return subSystemList;
- }
-
- public List getFilterPoolManagerList()
- {
- return filterPoolManagerList;
- }
-
- public Object getAdapter(Class adapterType)
- {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Subsystem configurations are never persisted.
- * @return false
- */
- public boolean isDirty()
- {
- return false;
- }
-
- /**
- * Subsystem configurations are never marked dirty. This does nothing.
- */
- public void setDirty(boolean flag)
- {
- }
-
- /**
- * Subsystem configurations are never persisted.
- * @return false
- */
- public boolean isTainted()
- {
- return false;
- }
-
- /**
- * Subsystem configurations are never marked dirty. This does nothing.
- */
- public void setTainted(boolean flag)
- {
- }
-
- /**
- * Subsystem configurations are never restored since they are not persisted.
- * @return false
- */
- public boolean wasRestored()
- {
- return false;
- }
-
- /**
- * Subsystem configurations are never restored. This does nothing.
- */
- public void setWasRestored(boolean flag)
- {
- }
-
- public void beginRestore() {
- }
-
- public void endRestore() {
- }
-
- /**
- * Subsystem configurations are not persisted.
- * @return null
- */
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- /**
- * Return true if deferred queries are supported. By default, they are
- * supported. Override for different behavior.
- *
- * @return <code>true</code> if deferred queries are supported.
- * @see ISubSystemConfiguration#supportsDeferredQueries()
- */
- public boolean supportsDeferredQueries()
- {
- return true;
- }
-
- /*
- * Service Subsystem Configuration methods - default implementations
- */
-
- /**
- * {@inheritDoc}
- * <p>
- * This default implementation does nothing. Service subsystems must
- * override as defined in the interface.
- *
- * @see ISubSystemConfiguration#setConnectorService(IHost,
- * IConnectorService)
- * @since org.eclipse.rse.core 3.0
- */
- public void setConnectorService(IHost host, IConnectorService connectorService) {
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This default implementation returns <code>null</code>. Service subsystem
- * configurations must override as defined in the interface.
- *
- * @see ISubSystemConfiguration#getConnectorService(IHost)
- * @since org.eclipse.rse.core 3.0
- */
- public IConnectorService getConnectorService(IHost host) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This default implementation returns <code>null</code>. Service subsystem
- * configurations must override as defined in the interface.
- *
- * @see ISubSystemConfiguration#getServiceType()
- * @since org.eclipse.rse.core 3.0
- */
- public Class getServiceType() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This default implementation returns <code>null</code>. Service subsystem
- * configurations must override as defined in the interface.
- *
- * @see ISubSystemConfiguration#getServiceImplType()
- * @since org.eclipse.rse.core 3.0
- */
- public Class getServiceImplType() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This default implementation returns <code>null</code>. Service subsystem
- * configurations must override as defined in the interface.
- *
- * @see ISubSystemConfiguration#getService(IHost)
- * @since org.eclipse.rse.core 3.0
- */
- public IService getService(IHost host) {
- return null;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapter.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapter.java
deleted file mode 100644
index dc611440c..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - 168870: created adapter for ui portions of SubSystemConfigurationProxy
- ********************************************************************************/
-package org.eclipse.rse.internal.ui.subsystems;
-
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-public class SubSystemConfigurationProxyAdapter {
-
- private static final ImageDescriptor defaultNormalDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID);
- private static final ImageDescriptor defaultLiveDescriptor = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID);
- private ISubSystemConfigurationProxy proxy = null;
-
- /**
- * Create the adapter. This should be done only by the adapter factory.
- * @param proxy The {@link ISubSystemConfigurationProxy} for which to create this adapter.
- */
- public SubSystemConfigurationProxyAdapter(ISubSystemConfigurationProxy proxy) {
- this.proxy = proxy;
- }
-
- /**
- * Get an image descriptor given an image location
- * @param url the location of the image
- * @param defaultDescriptor the descriptor to use if a resource at this location is not found
- * @return an image descriptor
- */
- private ImageDescriptor getDescriptor(URL url, ImageDescriptor defaultDescriptor) {
- ImageDescriptor result = null;
- if (url != null) {
- result = ImageDescriptor.createFromURL(url);
- }
- if (result == null) {
- result = defaultDescriptor;
- }
- return result;
- }
-
- /**
- * @return the image descriptor representing the non-connected state of this particular subsystem
- */
- public ImageDescriptor getImageDescriptor() {
- URL url = proxy.getImageLocation();
- ImageDescriptor result = getDescriptor(url, defaultNormalDescriptor);
- return result;
- }
-
- /**
- * @return the image descriptor representing the connected state of the particular subsystem
- */
- public ImageDescriptor getLiveImageDescriptor() {
- URL url = proxy.getLiveImageLocation();
- ImageDescriptor result = getDescriptor(url, defaultLiveDescriptor);
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapterFactory.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapterFactory.java
deleted file mode 100644
index bac1e5437..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemConfigurationProxyAdapterFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - 168870: created adapter for ui portions of SubSystemConfigurationProxy
- ********************************************************************************/
-package org.eclipse.rse.internal.ui.subsystems;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-
-/**
- * This class is used to create the adapater for a SubSystemConfigurationProxy.
- * It is meant to be used in the AdapterManager framework of the platform.
- * Internal Use Only.
- */
-public class SubSystemConfigurationProxyAdapterFactory implements IAdapterFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- Object result = null;
- if (adaptableObject instanceof ISubSystemConfigurationProxy) {
- if (adapterType == SubSystemConfigurationProxyAdapter.class) {
- ISubSystemConfigurationProxy proxy = (ISubSystemConfigurationProxy) adaptableObject;
- result = new SubSystemConfigurationProxyAdapter(proxy);
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] {SubSystemConfigurationProxyAdapter.class};
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemPropertyTester.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemPropertyTester.java
deleted file mode 100644
index f9d0aba0e..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/internal/ui/subsystems/SubSystemPropertyTester.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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
- *
- * Contributors:
- * Anna Dushistova (MontaVista) - [227535] [rseterminal][api] terminals.ui should not depend on files.core
- * Anna Dushistova (MontaVista) - [251492] Launch Shell Action is enabled in Offline mode
- ********************************************************************************/
-package org.eclipse.rse.internal.ui.subsystems;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.RSECorePlugin;
-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.ISubSystemConfigurationProxy;
-import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
-
-public class SubSystemPropertyTester extends PropertyTester {
-
- public boolean test(Object receiver, String property, Object[] args,
- Object expectedValue) {
- if (property.toLowerCase().equals("hassubsystemcategory")) { //$NON-NLS-1$
-
- boolean test = ((Boolean) expectedValue).booleanValue();
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) receiver)
- .getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null) {
- ISubSystem subsystem = adapter.getSubSystem(receiver);
- if (subsystem != null) {
- IHost host = subsystem.getHost();
- ISystemRegistry registry = RSECorePlugin
- .getTheSystemRegistry();
- String category = (String) args[0];
- ISubSystemConfigurationProxy[] proxies = registry
- .getSubSystemConfigurationProxiesByCategory(category);
- for (int i = 0; i < proxies.length; i++) {
- if (proxies[i]
- .appliesToSystemType(host.getSystemType())) {
- return test;
- }
- }
- }
- return !test;
- } else {
- return !test;
- }
- }else if (property.toLowerCase().equals("isoffline")){ //$NON-NLS-1$
- boolean test = ((Boolean) expectedValue).booleanValue();
-
- ISystemViewElementAdapter adapter = (ISystemViewElementAdapter) ((IAdaptable) receiver)
- .getAdapter(ISystemViewElementAdapter.class);
- if (adapter != null) {
- ISubSystem subsystem = adapter.getSubSystem(receiver);
- if (subsystem != null) {
- if(subsystem.isOffline()){
- return test;
- }
- }
- return !test;
- } else {
- return !test;
- }
- }
- return false;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/ISubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/ISubSystemConfigurationAdapter.java
deleted file mode 100644
index 5b8ffedfd..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/ISubSystemConfigurationAdapter.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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) - [186748] Move from UI/org.eclipse.rse.core.subsystems.util
- * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
- * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
- ********************************************************************************/
-
-package org.eclipse.rse.ui.subsystems;
-
-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.IHost;
-import org.eclipse.rse.core.model.ISubSystemConfigurator;
-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.view.IContextObject;
-import org.eclipse.rse.ui.widgets.IServerLauncherForm;
-import org.eclipse.rse.ui.wizards.newconnection.ISystemNewConnectionWizardPage;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * Defines the interface that must be implemented for adapters of for subsystem configurations.
- * 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 config, 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 configuration 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 ISubSystemConfiguration#createSubSystem(IHost,boolean, ISubSystemConfigurator[])} 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.
- * @since 3.0
- */
- public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration config, 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
- * configuration of the selected objects to determine if these actions are appropriate to add.
- *
- * @param config The subsystem configuration to work on
- * @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 config, 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 subsystem configuration.
- * Only supported by subsystems that support filters.
- */
- public IAction[] getFilterPoolActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterPool selectedPool);
-
-
- // ---------------------------------
- // 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 subsystem
- * configuration. Note, these are added to the list returned by
- * getFilterPoolActions().
- * <p>
- * Only supported by subsystems that support filters.
- */
- public IAction[] getFilterPoolReferenceActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterPoolReference selectedPoolReference);
-
-
- // ---------------------------------
- // 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(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilter selectedFilter);
-
- /**
- * 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 config, 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 config, 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 config, 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 subsystem configuration.
- * 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(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystemConfiguration, ISystemFilterReference)}.
- *
- * @param selectedFilterRef the currently selected filter reference
- * @param shell parent shell of viewer where the popup menu is being constructed
- */
- public IAction[] getFilterReferenceActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISystemFilterReference selectedFilterRef);
-
- /**
- * Returns a list of actions for the popup menu when user right clicks on a
- * subsystem object from this subsystem configuration.
- */
- public IAction[] getSubSystemActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, ISubSystemConfiguration config, ISubSystem selectedSubSystem);
-
-
- // --------------------------
- // SERVER LAUNCHER METHODS...
- // --------------------------
-
- /**
- * Return the form used in the property page, etc for this server launcher.
- * Only called if {@link ISubSystemConfiguration#supportsServerLaunchProperties(IHost)} returns true.
- */
- public IServerLauncherForm getServerLauncherForm(ISubSystemConfiguration config, Shell shell, ISystemMessageLine msgLine);
-
-
- // --------------------------
- // SUBSYSTEM PROPERTY PAGE METHOD...
- // --------------------------
- /**
- * Return the form used in the subsystem property page.
- * @return the form used in the subsystem property page.
- */
- public ISystemSubSystemPropertyPageCoreForm getSubSystemPropertyPageCoreFrom(ISubSystemConfiguration config, ISystemMessageLine msgLine, Object caller);
-
- /**
- * Return image descriptor for subsystems created by this
- * subsystem configuration.
- * Comes from icon attribute in extension point xml.
- * @param config the subsystem configuration
- * @return the image descriptor for the given subsystem configuration.
- */
- public ImageDescriptor getImage(ISubSystemConfiguration config);
-
- /**
- * Return actual graphics Image of this subsystem configuration.
- * This is the same as calling getImage().createImage(),
- * but the resulting image is cached.
- * @param config the subsystem configuration
- * @return the cached image for the given subsystem configuration.
- */
- public Image getGraphicsImage(ISubSystemConfiguration config);
-
- /**
- * Return image to use when this subsystem is connected.
- * Comes from icon attribute in extension point xml.
- * @param config the subsystem configuration
- * @return the image descriptor for the given subsystem configuration.
- */
- public ImageDescriptor getLiveImage(ISubSystemConfiguration config);
-
- /**
- * Return actual graphics LiveImage of this subsystem configuration.
- * This is the same as calling getLiveImage().createImage(),
- * but the resulting image is cached.
- * @param config the subsystem configuration
- * @return the cached image for the given subsystem configuration.
- */
- public Image getGraphicsLiveImage(ISubSystemConfiguration config);
-
- /**
- * 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 filter pool references
- */
- public ImageDescriptor getSystemFilterPoolImage(ISystemFilterPoolReference filterPool);
-
- /**
- * Supply the image to be used for filter references
- */
- public ImageDescriptor getSystemFilterImage(ISystemFilterReference 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);
-
- /**
- * 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);
-
- /**
- * Filters an array of children and returns the results. The default implementation does not filter
- * and simply returns the children passed in. Subclasses should override if they want to filter objects.
- * @param parent the parent context.
- * @param children the children to filter.
- * @return the children after filtering.
- */
- public Object[] applyViewFilters(IContextObject parent, Object[] children);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardConnectorService.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardConnectorService.java
deleted file mode 100644
index b1cc0ea37..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardConnectorService.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- ********************************************************************************/
-package org.eclipse.rse.ui.subsystems;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.core.subsystems.AuthenticatingConnectorService;
-import org.eclipse.rse.core.subsystems.ICredentials;
-
-
-/**
- * A standard connector service is an authenticating connector service
- * (see {@link AuthenticatingConnectorService}) that understand and prompts for
- * user ids and passwords. It uses a standard credentials provider
- * (see {@link StandardCredentialsProvider}) to do so.
- */
-public abstract class StandardConnectorService extends AuthenticatingConnectorService {
-
- /**
- * Construct a standard connector service. This also constructs
- * and uses a standard credentials provider.
- * @param name the name of the connector service
- * @param description the description of the connector service
- * @param host the host associated with this connector service
- * @param port the port used by this connector service, if IP based
- */
- public StandardConnectorService(String name, String description, IHost host, int port) {
- super(name, description, host, port);
- setCredentialsProvider(new StandardCredentialsProvider(this));
- }
-
- /**
- * Determines if this connector service understand the concept of a password.
- * This implementation always returns true.
- * Override if necessary.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsPassword()
- * @return true
- */
- public boolean supportsPassword() {
- return true;
- }
-
- /**
- * Test if this connector service requires a password.
- * This implementation always returns true.
- * Override if necessary.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresPassword()
- * @return true
- */
- public boolean requiresPassword() {
- return true;
- }
-
- /**
- * Reports if this connector service can use a user identifier.
- * This implementation always returns true.
- * Override if necessary.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#supportsUserId()
- * @return true
- */
- public boolean supportsUserId() {
- return true;
- }
-
- /**
- * Test if this connector service requires a user id.
- * This implementation always returns true.
- * Override if necessary.
- * @see org.eclipse.rse.core.subsystems.IConnectorService#requiresUserId()
- * @return true
- */
- public boolean requiresUserId() {
- return true;
- }
-
- /**
- * @return the SystemSignonInformation constructed from the
- * credentials provider.
- */
- protected final SystemSignonInformation getSignonInformation() {
- SystemSignonInformation result = null;
- ICredentials credentials = credentialsProvider.getCredentials();
- result = (SystemSignonInformation) credentials;
- return result;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardCredentialsProvider.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardCredentialsProvider.java
deleted file mode 100644
index b896655ad..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/StandardCredentialsProvider.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2009 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) - 168977: refactoring IConnectorService
- * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * Richie Yu (IBM) - [241716] Handle change expired password
- * Don Yantzi (IBM) - [233970] Handle messages provided by ICredentialsValidator
- * David Dykstal (IBM) - [261047] StandardCredentialsProvider does not cause a reacquire of a password when validation fails in a background thread
- ********************************************************************************/
-package org.eclipse.rse.ui.subsystems;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.IRSESystemType;
-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.AbstractCredentialsProvider;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ICredentials;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.logging.Logger;
-import org.eclipse.rse.logging.LoggerFactory;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.dialogs.ICredentialsValidator;
-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.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The {@link StandardCredentialsProvider} is an extension of
- * {@link AbstractCredentialsProvider} that provides for the prompting of a userid
- * and password.
- * <p>
- * It uses a {@link PasswordPersistenceManager} to store the passwords in the
- * keychain keyed by {@link IHost} and possibly by {@link ISubSystemConfiguration}.
- * <p>
- * This is suitable for use by subclasses of {@link StandardConnectorService}
- * that wish to provide prompting and persistence for userids and passwords when
- * connecting.
- * <p>
- * This class is may be subclassed. Typically to provide connector service
- * specific prompting.
- */
-public class StandardCredentialsProvider extends AbstractCredentialsProvider {
- /**
- * A runnable that will actually perform the prompting.
- */
- private class PromptForCredentials implements Runnable {
- private boolean cancelled = false;
-
- /**
- * @return true if prompting was cancelled.
- */
- public boolean isCancelled() {
- return cancelled;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- public void run() {
- Shell shell = getShell();
- if (shell != null) {
- ISystemPasswordPromptDialog dialog = getPasswordPromptDialog(shell);
- dialog.setSystemInput(getConnectorService());
- dialog.setForceToUpperCase(forcePasswordToUpperCase());
- dialog.setSignonValidator(getSignonValidator());
- if (supportsUserId()) {
- dialog.setUserIdValidator(getUserIdValidator());
- }
- if (supportsPassword()) {
- dialog.setSavePassword(savePassword);
- dialog.setPassword(password);
- dialog.setPasswordValidator(getPasswordValidator());
- }
- try {
- dialog.open();
- } catch (Exception e) {
- logException(e);
- }
- cancelled = dialog.wasCancelled();
- if (!cancelled) {
- userId = dialog.getUserId();
- password = dialog.getPassword();
- saveUserId = dialog.getIsUserIdChangePermanent();
- savePassword = dialog.getIsSavePassword();
- }
- } else {
- cancelled = true;
- }
- }
- }
-
- /**
- * A runnable that will prompt for a new password. Typically used when
- * a password has expired.
- */
- private class PromptForNewPassword implements Runnable {
- private SystemMessage message;
- private boolean cancelled = false;
-
- public PromptForNewPassword(SystemMessage message) {
- this.message = message;
- }
-
- public boolean isCancelled() {
- return cancelled;
- }
-
- public void run() {
- Shell shell = getShell();
- if (shell != null) {
- SystemChangePasswordDialog dlg = new SystemChangePasswordDialog(shell, getConnectorService().getHostName(), getUserId(), message);
- dlg.setSavePassword(savePassword);
- dlg.open();
- cancelled = dlg.wasCancelled();
- if (!cancelled) {
- password = dlg.getNewPassword();
- savePassword = dlg.getIsSavePassword();
- }
- } else {
- cancelled = true;
- }
- }
- }
-
- private String userId = null;
- private String password = null;
- private boolean savePassword = false;
- private boolean saveUserId = false;
- private boolean acquiring = false;
-
- /**
- * Creates a standard credentials provider for a connector service.
- * @param connectorService the connector service associated with this
- * provider.
- * @see IConnectorService
- */
- public StandardCredentialsProvider(IConnectorService connectorService) {
- super(connectorService);
- }
-
- /**
- * Acquires the credentials (userid and password) 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 or is to be re-acquired then prompt
- * the user
- * </ol>
- *
- * @param reacquire if true then present the prompt even if the password was
- * found and is valid.
- * @throws OperationCanceledException if user is prompted and user cancels
- * that prompt or if {@link #isSuppressed()} is true. Before RSE 3.0,
- * the method would have thrown {@link InterruptedException} in that
- * case.
- * @since 3.0
- */
- public final void acquireCredentials(boolean reacquire) throws OperationCanceledException {
- if (isSuppressed()) {
- throw new OperationCanceledException();
- }
- ISubSystem subsystem = getPrimarySubSystem();
- IHost host = subsystem.getHost();
- String hostName = host.getHostName();
- IRSESystemType systemType = host.getSystemType();
- savePassword = false;
- if (supportsUserId()) {
- boolean sameHost = hostName.equalsIgnoreCase(getConnectorService().getHostName());
- if (!sameHost) {
- clearCredentials();
- }
- getUserId();
- }
- if (supportsPassword()) {
- if (password == null) {
- PasswordPersistenceManager ppm = PasswordPersistenceManager.getInstance();
- SystemSignonInformation savedSignonInformation = ppm.find(systemType, hostName, userId);
- if (savedSignonInformation != null) {
- password = savedSignonInformation.getPassword();
- savePassword = true;
- }
- }
- }
- ICredentialsValidator validator = getSignonValidator();
- ICredentials credentials = getCredentials();
- if (validator != null) {
- SystemMessage m = validator.validate(credentials);
- // update the password in case an expired password was changed in validate - ry
- password = credentials.getPassword();
- if (m != null) { // If we ran into an invalid stored password we need to tell the user and force reaquire
- Shell shell = getShell();
- if (shell != null) {
- SystemMessageDialog dialog = new SystemMessageDialog(shell, m);
- dialog.open();
- }
- reacquire = true;
- }
- }
- if (supportsPassword() || supportsUserId()) {
- boolean passwordNeeded = supportsPassword() && password == null;
- boolean userIdNeeded = supportsUserId() && userId == null;
- if (passwordNeeded || userIdNeeded || reacquire) {
- promptForCredentials();
- acquiring = true;
- if (savePassword) {
- getConnectorService().savePassword();
- } else {
- getConnectorService().removePassword();
- }
- if (saveUserId) {
- getConnectorService().saveUserId();
- }
- acquiring = false;
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#clearCredentials()
- */
- public final void clearCredentials() {
- if (!acquiring) {
- password = null;
- userId = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#clearPassword()
- */
- final public void clearPassword() {
- if (!acquiring) {
- password = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#getCredentials()
- */
- public final ICredentials getCredentials() {
- IHost host = getConnectorService().getHost();
- String hostName = host.getHostName();
- IRSESystemType systemType = host.getSystemType();
- SystemSignonInformation result = new SystemSignonInformation(hostName, userId, password, systemType);
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#getUserId()
- */
- final public String getUserId() {
- if (supportsUserId()) {
- if (userId == null) {
- userId = getSubSystemUserId();
- }
- }
- return userId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#repairCredentials(org.eclipse.rse.services.clientserver.messages.SystemMessage)
- */
- public final void repairCredentials(SystemMessage prompt) throws OperationCanceledException {
- promptForNewPassword(prompt);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICredentialsProvider#setPassword(java.lang.String)
- */
- public final void setPassword(String password) {
- this.password = password;
- }
-
- /**
- * <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 final void setPassword(String matchingUserId, String password, boolean persist) {
- if (getPrimarySubSystem().forceUserIdToUpperCase()) {
- matchingUserId = matchingUserId.toUpperCase();
- }
- IConnectorService cs = getConnectorService();
- IRSESystemType systemType = cs.getHost().getSystemType();
- String hostName = cs.getHostName();
- SystemSignonInformation signonInformation = new SystemSignonInformation(hostName, matchingUserId, password, systemType);
- setSignonInformation(signonInformation);
- if (persist) { // if password should be persisted, then add to disk
- PasswordPersistenceManager.getInstance().add(signonInformation, true, false);
- } else { // otherwise, remove from both memory and disk
- PasswordPersistenceManager.getInstance().remove(systemType, hostName, userId);
- }
- }
-
- /* (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;
- }
- }
-
- /**
- * <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.
- * @return An instance of a dialog class that implements {@link ISystemPasswordPromptDialog}
- */
- protected ISystemPasswordPromptDialog getPasswordPromptDialog(Shell shell) {
- ISystemPasswordPromptDialog dlg = new SystemPasswordPromptDialog(shell, requiresUserId(), requiresPassword());
- return dlg;
- }
-
- /**
- * <i>Optionally overridable, not implemented by default.</i><br>
- * Get the credentials validator to use to validate the credentials as entered
- * in the dialog. This should only do a local validation.
- * @return null indicating that no signon validator exists.
- */
- protected ICredentialsValidator getSignonValidator() {
- return null;
- }
-
- private boolean forcePasswordToUpperCase() {
- return getPrimarySubSystem().forceUserIdToUpperCase();
- }
-
- private ISystemValidator getPasswordValidator() {
- ISubSystemConfiguration subsystemConfiguration = getPrimarySubSystem().getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) Platform.getAdapterManager().getAdapter(subsystemConfiguration, ISubSystemConfigurationAdapter.class);
- return adapter.getPasswordValidator(subsystemConfiguration);
- }
-
- private ISubSystem getPrimarySubSystem() {
- return getConnectorService().getPrimarySubSystem();
- }
-
- private Shell getShell() {
- Shell shell = null;
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null) {
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window != null) {
- shell = window.getShell();
- }
- }
- return shell;
- }
-
- private String getSubSystemUserId() {
- ISubSystem ss = getPrimarySubSystem();
- String result = ss.getUserId();
- return result;
- }
-
- private ISystemValidator getUserIdValidator() {
- ISubSystemConfiguration subsystemConfiguration = getPrimarySubSystem().getSubSystemConfiguration();
- ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) subsystemConfiguration.getAdapter(ISubSystemConfigurationAdapter.class);
- // TODO This typically runs in the UI thread. It should probably be
- // moved into the promptForCredentials() method which typically runs in
- // a Job, or even into {@link SubSystem#promptForPassword()}. See
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=218304
- if (adapter == null) {
- Platform.getAdapterManager().loadAdapter(subsystemConfiguration, ISubSystemConfigurationAdapter.class.getName());
- adapter = (ISubSystemConfigurationAdapter) subsystemConfiguration.getAdapter(ISubSystemConfigurationAdapter.class);
- }
- ISystemValidator validator = adapter.getUserIdValidator(subsystemConfiguration);
- return validator;
- }
-
- private void logException(Throwable t) {
- Logger log = LoggerFactory.getLogger(RSEUIPlugin.getDefault());
- log.logError("Unexpected exception", t); //$NON-NLS-1$
- }
-
- private void promptForCredentials() throws OperationCanceledException {
- PromptForCredentials runnable = new PromptForCredentials();
- Display.getDefault().syncExec(runnable);
- if (runnable.isCancelled()) {
- throw new OperationCanceledException();
- }
- }
-
- private void promptForNewPassword(SystemMessage prompt) throws OperationCanceledException {
- PromptForNewPassword runnable = new PromptForNewPassword(prompt);
- Display.getDefault().syncExec(runnable);
- if (runnable.isCancelled()) {
- throw new OperationCanceledException();
- }
- }
-
- private void setSignonInformation(SystemSignonInformation signonInfo) {
- password = signonInfo.getPassword();
- userId = signonInfo.getUserId();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/package.html b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/package.html
deleted file mode 100644
index 5648d71bf..000000000
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/ui/subsystems/package.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=iso-8859-1">
- <meta name="Author" content="David Dykstal (IBM)">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Application programming interface for managing the user interface for subsystem
-actions.
-<h2>Package Specification</h2>
-<p>The package provides utility class support for subsystems, connector services, and
-credentials providers.</p>
-<p>Classes that can be used "as is".</p>
-<ul>
-<li>StandardCredentialsProvider - provides support for userid and password prompting.</p>
-</ul>
-<p>Classes that should be used as base classes.</p>
-<ul>
-<li>TBD</li>
-</ul>
-</body>
-</html>
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 4e5861528..000000000
--- a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml
+++ /dev/null
@@ -1,626 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-Copyright (c) 2006, 2008 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) - Rename Remote Systems Explorer to Remote System Explorer for consistency
-Uwe Stieber (Wind River) - [175153][175316] Fix messages for new connection dlg
-Kevin Doyle (IBM) - [160769] Added message for invalid filter when moving files
-Kevin Doyle (IBM) - [250797] ValidatorSourceType sets error messages to ones that don't exist
--->
-<!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="1013" Indicator="E">
- <LevelOne>Expand failed or cancelled. 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>Please enter a valid 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>Please enter a valid 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 the selected 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="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="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="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="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="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="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="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="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="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="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="1095" Indicator="I">
- <LevelOne>Querying %1</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="1106" Indicator="E">
- <LevelOne>File %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="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="1142" Indicator="I">
- <LevelOne>Rename %1...</LevelOne>
- <LevelTwo></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="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="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="1220" Indicator="E">
- <LevelOne>Host name '%1' not found or valid</LevelOne>
- <LevelTwo>A remote system of host name '%1' was not 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="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="1244" Indicator="E">
- <LevelOne>The selected encoding is not supported.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- <Message ID="1246" Indicator="E">
- <LevelOne>Operation interrupted. Some objects have been renamed.
- </LevelOne>
- <LevelTwo>The following objects have been renamed:
-%1</LevelTwo>
- </Message>
- <Message ID="1247" Indicator="E">
- <LevelOne>Operation interrupted. Some objects have been deleted.
- </LevelOne>
- <LevelTwo>The following objects have been deleted:
-%1</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>
-
-
- </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="1003" Indicator="U">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</LevelTwo>
- </Message>
- <Message ID="1004" Indicator="Q">
- <LevelOne>%1</LevelOne>
- <LevelTwo>%2</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>
-
-
- <Message ID="1315" Indicator="I">
- <LevelOne>Deleting %1...</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="8002" Indicator="U">
- <LevelOne>An unexpected error occurred.</LevelOne>
- <LevelTwo>%1</LevelTwo>
- </Message>
-
-
- </MessageList>
- </Subcomponent>
- <Subcomponent Name="Communications" Abbr="C">
- <MessageList>
- <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="2306" Indicator="W">
- <LevelOne>Port %1 is normally used for the %2 service.</LevelOne>
- <LevelTwo></LevelTwo>
- </Message>
-
- </MessageList>
- </Subcomponent>
- </Component>
-</MessageFile> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/.classpath b/rse/plugins/org.eclipse.rse.useractions/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/.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.useractions/.cvsignore b/rse/plugins/org.eclipse.rse.useractions/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.useractions/.project b/rse/plugins/org.eclipse.rse.useractions/.project
deleted file mode 100644
index c1c20c540..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.useractions</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.useractions/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.useractions/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse.useractions/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.useractions/META-INF/MANIFEST.MF
deleted file mode 100644
index 3008bf9a5..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.useractions;singleton:=true
-Bundle-Version: 1.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.useractions.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.jface.text,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.ui.ide,
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.shells.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.expressions
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.rse.internal.useractions;x-internal:=true,
- org.eclipse.rse.internal.useractions.api.files.compile;x-internal:=true,
- org.eclipse.rse.internal.useractions.api.files.uda;x-internal:=true,
- org.eclipse.rse.internal.useractions.api.ui.compile;x-internal:=true,
- org.eclipse.rse.internal.useractions.api.ui.uda;x-internal:=true,
- org.eclipse.rse.internal.useractions.files.compile;x-internal:=true,
- org.eclipse.rse.internal.useractions.files.uda;x-internal:=true,
- org.eclipse.rse.internal.useractions.ui;x-internal:=true,
- org.eclipse.rse.internal.useractions.ui.compile;x-internal:=true,
- org.eclipse.rse.internal.useractions.ui.uda;x-internal:=true,
- org.eclipse.rse.internal.useractions.ui.uda.actions;x-internal:=true,
- org.eclipse.rse.internal.useractions.ui.uda.util;x-internal:=true,
- org.eclipse.rse.internal.useractions.ui.validators;x-internal:=true
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.useractions/about.html b/rse/plugins/org.eclipse.rse.useractions/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/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 5, 2007</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.useractions/about.ini b/rse/plugins/org.eclipse.rse.useractions/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/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=dsdp32.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.useractions/about.mappings b/rse/plugins/org.eclipse.rse.useractions/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/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.useractions/about.properties b/rse/plugins/org.eclipse.rse.useractions/about.properties
deleted file mode 100644
index 9fded69ee..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-###############################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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 User Actions\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/rse/plugins/org.eclipse.rse.useractions/build.properties b/rse/plugins/org.eclipse.rse.useractions/build.properties
deleted file mode 100644
index 04ac30edd..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/build.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2002, 2009 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) - Add branding for useractions feature
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- about.html,\
- about.properties,\
- plugin.properties,\
- plugin.xml,\
- .,\
- icons/,\
- about.ini,\
- about.mappings,\
- dsdp32.png
-src.includes = about.html
diff --git a/rse/plugins/org.eclipse.rse.useractions/dsdp32.png b/rse/plugins/org.eclipse.rse.useractions/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gif
deleted file mode 100644
index 264b1c492..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gif
deleted file mode 100644
index f0e084939..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gif
deleted file mode 100644
index 3541e3da3..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gif
deleted file mode 100644
index f485bbe5b..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gif
deleted file mode 100644
index c88993a29..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gif
deleted file mode 100644
index 9f48bb796..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gif
deleted file mode 100644
index 521951457..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gif
deleted file mode 100644
index 6a22ca85f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibm_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibm_obj.gif
deleted file mode 100644
index c7a0c3fc2..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibmuser_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibmuser_obj.gif
deleted file mode 100644
index 1c277194b..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_ibmuser_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_new_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_new_obj.gif
deleted file mode 100644
index cfcaaea00..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_user_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_user_obj.gif
deleted file mode 100644
index 25692da4b..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/compcmd_user_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_obj.gif
deleted file mode 100644
index 802d0ebe8..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_user_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_user_obj.gif
deleted file mode 100644
index 15d6f4ba8..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_ibm_user_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_new_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_new_obj.gif
deleted file mode 100644
index b595eb20b..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_obj.gif
deleted file mode 100644
index 556c02836..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_action_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_new_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_new_obj.gif
deleted file mode 100644
index 8055a95de..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_obj.gif
deleted file mode 100644
index 8d1885ba6..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_user_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_user_obj.gif
deleted file mode 100644
index 19ef4a224..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_ibm_user_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_new_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_new_obj.gif
deleted file mode 100644
index 823609da2..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_new_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_obj.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_obj.gif
deleted file mode 100644
index 2ecef415f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/icons/full/obj16/user_type_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.useractions/plugin.properties b/rse/plugins/org.eclipse.rse.useractions/plugin.properties
deleted file mode 100644
index e56b89d4d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/plugin.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2002, 2009 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) - add providerName
-# David Dykstal (IBM) - [186589] move properties from org.eclipse.rse.ui
-# Kevin Doyle (IBM) - [239700] Compile Commands are available on items it shouldn't
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = Remote System Explorer User Actions
-providerName = Eclipse.org - DSDP
-
-PropertyPage.TeamViewUserActionNode = User Action Information
-PropertyPage.TeamViewCompileTypeNode = Compile Type Information
-PropertyPage.TeamViewCompileCommandNode = Compile Command Information
-
-DynamicLabel.CompileActionNode = Compile
-DynamicLabel.CompilePromptActionNode = Compile (Prompt)
-DynamicLabel.UserActionNode = User Action \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/plugin.xml b/rse/plugins/org.eclipse.rse.useractions/plugin.xml
deleted file mode 100644
index 272a8a84a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/plugin.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?> <!--
- Copyright (c) 2005, 2008 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
- -->
-
-<plugin>
-
-
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="popup:org.eclipse.rse.ui.view.systemView">
- <menu id="org.eclipse.rse.ui.useractions.compile.menu"
- label="%DynamicLabel.CompileActionNode">
- <dynamic class="org.eclipse.rse.internal.useractions.api.ui.compile.SystemDynamicCompileMenu"
- id="org.eclipse.ui.rse.ui.views.dynamiccompilemenu">
- </dynamic>
- <visibleWhen>
- <with
- variable="activeMenuSelection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false">
- <and>
- <adapt
- type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- </adapt>
- <test
- property="org.eclipse.rse.internal.useractions.files.compile.iscompilable"
- value="true">
- </test>
- <test
- property="org.eclipse.rse.subsystems.files.isdirectory"
- value="false">
- </test>
- <test
- property="org.eclipse.rse.subsystems.files.isvirtual"
- value="false">
- </test>
- <test
- property="org.eclipse.rse.subsystems.files.isarchive"
- value="false">
- </test>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </menu>
- <menu
- id="org.eclipse.rse.ui.useractions.compileprompt.menu"
- label="%DynamicLabel.CompilePromptActionNode">
- <dynamic
- class="org.eclipse.rse.internal.useractions.api.ui.compile.SystemDynamicCompilePromptMenu"
- id="org.eclipse.ui.rse.ui.views.dynamiccompilepromptmenu">
- </dynamic>
- <visibleWhen>
- <with
- variable="activeMenuSelection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false">
- <and>
- <adapt
- type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- </adapt>
- <test
- property="org.eclipse.rse.internal.useractions.files.compile.iscompilable"
- value="true">
- </test>
- <test
- property="org.eclipse.rse.subsystems.files.isdirectory"
- value="false">
- </test>
- <test
- property="org.eclipse.rse.subsystems.files.isvirtual"
- value="false">
- </test>
- <test
- property="org.eclipse.rse.subsystems.files.isarchive"
- value="false">
- </test>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </menu>
- <menu id="org.eclipse.rse.ui.useractions.useraction.menu"
- label="%DynamicLabel.UserActionNode">
- <dynamic class="org.eclipse.rse.internal.useractions.api.ui.uda.SystemDynamicUserActionMenu"
- id="org.eclipse.ui.rse.ui.views.dynamicuseractionmenu">
- </dynamic>
- <visibleWhen>
- <with
- variable="activeMenuSelection">
- <iterate
- ifEmpty="false">
- <and>
- <adapt
- type="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile">
- </adapt>
- <test
- property="org.eclipse.rse.subsystems.files.isvirtual"
- value="false">
- </test>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </menu>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.rse.internal.useractions.files.compile.CompilablePropertyTester"
- id="org.eclipse.rse.internal.useractions.files.compile.CompilablePropertyTester"
- namespace="org.eclipse.rse.internal.useractions.files.compile"
- properties="iscompilable"
- type="org.eclipse.core.runtime.IAdaptable">
- </propertyTester>
- </extension>
-
-
-</plugin>
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java
deleted file mode 100644
index 83df7b390..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-import org.eclipse.rse.ui.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;
- public static final String PLUGIN_ID = "org.eclipse.rse.useractions"; //$NON-NLS-1$
- /**
- * 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;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.ui.SystemBasePlugin#initializeImageRegistry()
- */
- protected void initializeImageRegistry()
- {
- putImageInRegistry(IUserActionsImageIds.COMPILE_0, "icons/full/dlcl16/compile.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.COMPILE_1, "icons/full/elcl16/compile.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.WORK_WITH_COMPILE_COMMANDS_0, "icons/full/dlcl16/workwithcompilecmds.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.WORK_WITH_COMPILE_COMMANDS_1, "icons/full/elcl16/workwithcompilecmds.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.WORK_WITH_NAMED_TYPES_0, "icons/full/dlcl16/workwithnamedtypes.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.WORK_WITH_NAMED_TYPES_1, "icons/full/elcl16/workwithnamedtypes.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.WORK_WITH_USER_ACTIONS_0, "icons/full/dlcl16/workwithuseractions.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.WORK_WITH_USER_ACTIONS_1, "icons/full/elcl16/workwithuseractions.gif"); //$NON-NLS-1$
-
- putImageInRegistry(IUserActionsImageIds.USERACTION_NEW, "icons/full/obj16/user_action_new_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERACTION_USR, "icons/full/obj16/user_action_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERACTION_IBM, "icons/full/obj16/user_action_ibm_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERACTION_IBMUSR, "icons/full/obj16/user_action_ibm_user_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERTYPE_NEW, "icons/full/obj16/user_type_new_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERTYPE_USR, "icons/full/obj16/user_type_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERTYPE_IBM, "icons/full/obj16/user_type_ibm_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.USERTYPE_IBMUSR, "icons/full/obj16/user_type_ibm_user_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.COMPILE_NEW, "icons/full/obj16/compcmd_new_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.COMPILE_USR, "icons/full/obj16/compcmd_user_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.COMPILE_IBM, "icons/full/obj16/compcmd_ibm_obj.gif"); //$NON-NLS-1$
- putImageInRegistry(IUserActionsImageIds.COMPILE_IBMUSR, "icons/full/obj16/compcmd_ibmuser_obj.gif"); //$NON-NLS-1$
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionContext.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionContext.java
deleted file mode 100644
index 991b595cd..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionContext.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.useractions;
-
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * The interface for user action contexts. Clients can implement this interface.
- */
-public interface IUserActionContext extends IRSEModelObject {
-
- /**
- * Returns the profile that the user action context belongs to.
- * @return the profile that the user action context belongs to.
- */
- public ISystemProfile getParentProfile();
-
- /**
- * Returns the subsystem configuration that the user action context is applicable for.
- * @return the subsystem configuration that the user action context is applicable for.
- */
- public ISubSystemConfiguration getParentConfiguration();
-
- /**
- * Returns the supplier of the user action context.
- * @return the supplier of the user action context.
- */
- public String getSupplier();
-
- /**
- * Returns whether the user action context is modifiable.
- * @return <code>true<code> if the user action context is modifiable, <code>false</code> otherwise.
- */
- public boolean isModifiable();
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionModel.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionModel.java
deleted file mode 100644
index 236a0bcec..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionModel.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.useractions;
-
-import org.eclipse.rse.core.model.IRSEModelObject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * The interface for user action model. Clients can implement this interface.
- */
-public interface IUserActionModel extends IRSEModelObject {
-
- public static final String USER_ACTION_TYPE = "USER_ACTION_GENERIC"; //$NON-NLS-1$
- public static final String USER_ACTION_COMPILE = "USER_ACTION_COMPILE"; //$NON-NLS-1$
-
- /**
- * Returns the profile that the user action belongs to.
- * @return the profile that the user action belongs to.
- */
- public ISystemProfile getParentProfile();
-
- /**
- * Returns the subsystem configuration that the user action is applicable for.
- * @return the subsystem configuration that the user action is applicable for.
- */
- public ISubSystemConfiguration getParentConfiguration();
-
- /**
- * The type of the user action.
- * @return the type of the user action.
- */
- public String getType();
-
- /**
- * Returns the supplier of the user action.
- * @return the supplier of the user action.
- */
- public String getSupplier();
-
- /**
- * Returns the command of the user action.
- * @return the command of the user action.
- */
- public String getCommand();
-
- /**
- * Returns the contexts to which the user action applies.
- * @return array of user action contexts, or an empty array if there are no contexts to which the user action applies.
- */
- public IUserActionContext[] getContexts();
-
- /**
- * Returns whether the user action is modifiable.
- * @return <code>true<code> if the user action is modifiable, <code>false</code> otherwise.
- */
- public boolean isModifiable();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java
deleted file mode 100644
index 163f846af..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-public interface IUserActionsImageIds {
-
- public static final String COMPILE_0 = "COMPILE_0"; //$NON-NLS-1$
- public static final String COMPILE_1 = "COMPILE_1"; //$NON-NLS-1$
- public static final String WORK_WITH_USER_ACTIONS_0 = "WORK_WITH_USER_ACTIONS_0"; //$NON-NLS-1$
- public static final String WORK_WITH_USER_ACTIONS_1 = "WORK_WITH_USER_ACTIONS_1"; //$NON-NLS-1$
- public static final String WORK_WITH_NAMED_TYPES_0 = "WORK_WITH_NAMED_TYPES_0"; //$NON-NLS-1$
- public static final String WORK_WITH_NAMED_TYPES_1 = "WORK_WITH_NAMED_TYPES_1"; //$NON-NLS-1$
- public static final String WORK_WITH_COMPILE_COMMANDS_0 = "WORK_WITH_COMPILE_COMMANDS_0"; //$NON-NLS-1$
- public static final String WORK_WITH_COMPILE_COMMANDS_1 = "WORK_WITH_COMPILE_COMMANDS_1"; //$NON-NLS-1$
-
- // Specific Compile Commands and User Action Icons
- public static final String USERACTION_NEW = "USERACTION_NEW"; //$NON-NLS-1$
- public static final String USERACTION_USR = "USERACTION_USR"; //$NON-NLS-1$
- public static final String USERACTION_IBM = "USERACTION_IBM"; //$NON-NLS-1$
- public static final String USERACTION_IBMUSR = "USERACTION_IBMUSR"; //$NON-NLS-1$
- public static final String USERTYPE_NEW = "USERTYPE_NEW"; //$NON-NLS-1$
- public static final String USERTYPE_USR = "USERTYPE_USR"; //$NON-NLS-1$
- public static final String USERTYPE_IBM = "USERTYPE_IBM"; //$NON-NLS-1$
- public static final String USERTYPE_IBMUSR = "USERTYPE_IBMUSR"; //$NON-NLS-1$
- public static final String COMPILE_NEW = "COMPILE_NEW"; //$NON-NLS-1$
- public static final String COMPILE_USR = "COMPILE_USR"; //$NON-NLS-1$
- public static final String COMPILE_IBM = "COMPILE_IBM"; //$NON-NLS-1$
- public static final String COMPILE_IBMUSR = "COMPILE_IBMUSR"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java
deleted file mode 100644
index 70d5b3325..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-public interface IUserActionsMessageIds {
-
- 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_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_UDA_LOAD_ERROR = "RSEG1140"; //$NON-NLS-1$
- public static final String MSG_UDA_ROOTTAG_ERROR = "RSEG1141"; //$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$
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java
deleted file mode 100644
index eaf46a26a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-/*
- * These constants for model change events were taken from ISystemModelChangeEvents.
- */
-public interface IUserActionsModelChangeEvents {
-
- /**
- * 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;
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionContext.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionContext.java
deleted file mode 100644
index 54b970035..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionContext.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.useractions;
-
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * The model object for a user action context. A user action context is what a user action can apply to.
- * An example of a user action context is a named list of file types for which a certain user action applies.
- * Since the context can consist of different properties (file types, process names, etc.), the properties that make up the
- * context can be specified through property sets of the context.
- */
-public class UserActionContext extends RSEModelObject implements IUserActionContext {
-
- // persistent properties
- private ISystemProfile profile;
- private ISubSystemConfiguration subsysConfig;
- private String name;
- private String description;
- private String supplier;
- private boolean isModifiable;
-
- /**
- * Creates a modifiable user action context.
- * @param profile the parent profile for which the user action context applies.
- * @param subsysConfig the subsystem configuration for which the user action context applies.
- * @param name the name of the user action context.
- */
- public UserActionContext(ISystemProfile profile, ISubSystemConfiguration subsysConfig, String name) {
- super();
- this.profile = profile;
- this.subsysConfig = subsysConfig;
- this.name = name;
- this.isModifiable = true;
- }
-
- /**
- * Creates a user action context.
- * @param profile the parent profile for which the user action context applies.
- * @param subsysConfig the subsystem configuration for which the user action context applies.
- * @param name the name of the user action context.
- * @param description the description of the user action context.
- * @param supplier the supplier of the user action context.
- * @param sets the property sets associated with the user action context. The actual list of object types - for example, file types - that the context
- * represents can be specified through this parameter.
- * @param isModifiable <code>true</code> if the user action context is modifiable, <code>false</code> otherwise.
- */
- public UserActionContext(ISystemProfile profile, ISubSystemConfiguration subsysConfig, String name, String description, String supplier, IPropertySet[] sets, boolean isModifiable) {
- super();
- this.profile = profile;
- this.subsysConfig = subsysConfig;
- this.name = name;
- this.description = description;
- this.supplier = supplier;
- addPropertySets(sets);
- this.isModifiable = isModifiable;
- }
-
- /**
- * Returns the profile that the user action context belongs to.
- * @return the profile that the user action context belongs to.
- */
- public ISystemProfile getParentProfile() {
- return profile;
- }
-
- /**
- * Returns the subsystem configuration that the user action context is applicable for.
- * @return the subsystem configuration that the user action context is applicable for.
- */
- public ISubSystemConfiguration getParentConfiguration() {
- return subsysConfig;
- }
-
- /**
- * Sets the name of the user action context. It has no effect if the user action context is not modifiable.
- * @param name the name of the user action context.
- */
- public void setName(String name) {
-
- if (isModifiable()) {
- this.name = name;
- }
- }
-
- /**
- * Returns the name of the user action context.
- * @return the name of the user action context.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the description of the user action context. It has no effect if the user action context is not modifiable.
- * @param description the description of the user action context.
- */
- public void setDescription(String description) {
-
- if (isModifiable()) {
- this.description = description;
- }
- }
-
- /**
- * Returns the description of the user action context.
- * @return the description of the user action context.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the supplier of the user action context.
- * @param supplier the supplier of the user action context.
- */
- public void setSupplier(String supplier) {
-
- if (isModifiable()) {
- this.supplier = supplier;
- }
- }
-
- /**
- * Returns the supplier of the user action context.
- * @return the supplier of the user action context.
- */
- public String getSupplier() {
- return supplier;
- }
-
- /**
- * Returns whether the user action context is modifiable.
- * @return <code>true</code> if the user action context is modifiable, <code>false</code> otherwise.
- */
- public boolean isModifiable() {
- return isModifiable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
- */
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
- */
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionModel.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionModel.java
deleted file mode 100644
index 4811a94db..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionModel.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.useractions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IRSEPersistableContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.RSEModelObject;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * The model object for a user action. A user action applies to objects in subsystems belonging to a subsystem configuration in a user profile.
- */
-public class UserActionModel extends RSEModelObject implements IUserActionModel {
-
- // persistent properties
- private ISystemProfile profile;
- private ISubSystemConfiguration subsysConfig;
- private String type;
- private String name;
- private String description;
- private String supplier;
- private String command;
- private List contextList;
- private boolean isModifiable;
-
- /**
- * Creates a modifiable user action.
- * @param profile the parent profile for which the user action applies.
- * @param subsysConfig the subsystem configuration for which the user action applies.
- * @param name the name of the user action.
- */
- public UserActionModel(ISystemProfile profile, ISubSystemConfiguration subsysConfig, String name) {
- super();
- this.profile = profile;
- this.subsysConfig = subsysConfig;
- this.name = name;
- this.isModifiable = true;
- }
-
- /**
- * Creates a user action model object.
- * @param profile the parent profile for which the user action applies.
- * @param subsysConfig the subsystem configuration for which the user action applies.
- * @param type the type of the user action.
- * @param name the name of the user action.
- * @param description the description of the user action.
- * @param supplier the supplier of the user action.
- * @param command the command of the user action.
- * @param contexts the array of user action contexts to which this user action applies, or an empty array if there are no contexts to which the user action applies.
- * @param sets the property sets associated with the user action.
- * @param isModifiable <code>true</code> if the user action is modifiable, <code>false</code> otherwise.
- */
- public UserActionModel(ISystemProfile profile, ISubSystemConfiguration subsysConfig, String type, String name, String description, String supplier, String command, IUserActionContext[] contexts, IPropertySet[] sets, boolean isModifiable) {
- super();
- this.profile = profile;
- this.subsysConfig = subsysConfig;
- this.type = type;
- this.name = name;
- this.description = description;
- this.supplier = supplier;
- this.command = command;
- contextList = new ArrayList();
-
- for (int i = 0; i < contexts.length; i++) {
- contextList.add(contexts[i]);
- }
-
- addPropertySets(sets);
- this.isModifiable = isModifiable;
- }
-
- /**
- * Returns the profile that the user action belongs to.
- * @return the profile that the user action belongs to.
- */
- public ISystemProfile getParentProfile() {
- return profile;
- }
-
- /**
- * Returns the subsystem configuration that the user action is applicable for.
- * @return the subsystem configuration that the user action is applicable for.
- */
- public ISubSystemConfiguration getParentConfiguration() {
- return subsysConfig;
- }
-
- /**
- * Sets the type of the user action.
- * @param type the type of the user action.
- */
- public void setType(String type) {
-
- if (isModifiable()) {
- this.type = type;
- }
- }
-
- /**
- * The type of the user action.
- * @return the type of the user action.
- */
- public String getType() {
- return type;
- }
-
- /**
- * Sets the name of the user action. It has no effect if the user action is not modifiable.
- * @param name the name of the user action.
- */
- public void setName(String name) {
-
- if (isModifiable()) {
- this.name = name;
- }
- }
-
- /**
- * Returns the name of the user action.
- * @return the name of the user action.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the description of the user action. It has no effect if the user action is not modifiable.
- * @param description the description of the user action.
- */
- public void setDescription(String description) {
-
- if (isModifiable()) {
- this.description = description;
- }
- }
-
- /**
- * Returns the description of the user action.
- * @return the description of the user action.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the supplier of the user action. It has no effect if the user action is not modifiable.
- * @param supplier the supplier of the user action.
- */
- public void setSupplier(String supplier) {
-
- if (isModifiable()) {
- this.supplier = supplier;
- }
- }
-
- /**
- * Returns the supplier of the user action.
- * @return the supplier of the user action.
- */
- public String getSupplier() {
- return supplier;
- }
-
- /**
- * Sets the command of the user action. It has no effect if the user action is not modifiable.
- * @param command the command of the user action.
- */
- public void setCommand(String command) {
-
- if (isModifiable()) {
- this.command = command;
- }
- }
-
- /**
- * Returns the command of the user action.
- * @return the command of the user action.
- */
- public String getCommand() {
- return command;
- }
-
- /**
- * Returns the contexts to which the user action applies.
- * @return array of user action contexts, or an empty array if there are no contexts to which the user action applies.
- */
- public IUserActionContext[] getContexts() {
- return (IUserActionContext[])(contextList.toArray());
- }
-
- /**
- * Returns whether the user action is modifiable.
- * @return <code>true</code> if the user action is modifiable, <code>false</code> otherwise.
- */
- public boolean isModifiable() {
- return isModifiable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
- */
- public boolean commit() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
- */
- public IRSEPersistableContainer[] getPersistableChildren() {
- return IRSEPersistableContainer.NO_CHILDREN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
- */
- public IRSEPersistableContainer getPersistableParent() {
- return null;
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionRegistry.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionRegistry.java
deleted file mode 100644
index 631cd5144..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionRegistry.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.useractions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * The registry for user actions and user action contexts. Use this class to add, remove, copy and query user actions and contexts.
- */
-public class UserActionRegistry {
-
- private static UserActionRegistry registry;
-
- private Map userActionContextMap;
- private Map userActionModelMap;
-
- /**
- * Constructor to create the registry.
- */
- private UserActionRegistry() {
- userActionContextMap = new HashMap();
- userActionModelMap = new HashMap();
- }
-
- /**
- * Returns the singleton instance of the registry.
- * @return the singleton instance of the registry.
- */
- public static UserActionRegistry getInstance() {
-
- if (registry == null) {
- registry = new UserActionRegistry();
- }
-
- return registry;
- }
-
- /**
- * Returns the map associating subsystem configurations to list of user action contexts.
- * @return the map associating subsystem configurations to list of user action contexts.
- */
- private Map getUserActionContextMap(ISystemProfile profile) {
-
- if (!userActionContextMap.containsKey(profile)) {
- userActionContextMap.put(profile, new HashMap());
- }
-
- return (Map)(userActionContextMap.get(profile));
- }
-
- /**
- * Returns the map associating subsystem configurations to list of user actions.
- * @return the map associating subsystem configurations to list of user actions.
- */
- private Map getUserActionModelMap(ISystemProfile profile) {
-
- if (!userActionModelMap.containsKey(profile)) {
- userActionModelMap.put(profile, new HashMap());
- }
-
- return (Map)(userActionModelMap.get(profile));
- }
-
- /**
- * Returns the list of user action contexts from a map associating subsystem configurations with lists of user action contexts.
- * @param map the map.
- * @param configuration the subsystem configuration.
- * @return the list of user action contexts for the given configuration.
- */
- private List getUserActionContexts(Map map, ISubSystemConfiguration configuration) {
-
- if (!map.containsKey(configuration)) {
- map.put(configuration, new ArrayList());
- }
-
- return (List)(map.get(configuration));
- }
-
- /**
- * Returns the list of user actions from a map associating subsystem configurations with lists of user actions.
- * @param map the map.
- * @param configuration the subsystem configuration.
- * @return the list of user actions for the given configuration.
- */
- private List getUserActionModels(Map map, ISubSystemConfiguration configuration) {
-
- if (!map.containsKey(configuration)) {
- map.put(configuration, new ArrayList());
- }
-
- return (List)(map.get(configuration));
- }
-
- /**
- * Returns whether a user action context for the given profile and subsystem configuration exists.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @param context the user action context.
- * @return <code>true</code> if the user action context exists, <code>false</code> otherwise.
- */
- public boolean containsUserActionContext(ISystemProfile profile, ISubSystemConfiguration configuration, IUserActionContext context) {
- Map map = getUserActionContextMap(profile);
- List list = getUserActionContexts(map, configuration);
- return list.contains(context);
- }
-
- /**
- * Returns whether a user action for the given profile and subsystem configuration exists.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @param context the user action.
- * @return <code>true</code> if the user action context exists, <code>false</code> otherwise.
- */
- public boolean containsUserActionModel(ISystemProfile profile, ISubSystemConfiguration configuration, IUserActionContext context) {
- Map map = getUserActionModelMap(profile);
- List list = getUserActionModels(map, configuration);
- return list.contains(context);
- }
-
- /**
- * Adds a user action context for the given profile and subsystem configuration.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @param context the user action context.
- */
- public void addUserActionContext(ISystemProfile profile, ISubSystemConfiguration configuration, IUserActionContext context) {
- Map map = getUserActionContextMap(profile);
- List list = getUserActionContexts(map, configuration);
- list.add(context);
- }
-
- /**
- * Adds a user action for the given profile and subsystem configuration.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @param model the user action model.
- */
- public void addUserActionModel(ISystemProfile profile, ISubSystemConfiguration configuration, IUserActionModel model) {
- Map map = getUserActionModelMap(profile);
- List list = getUserActionModels(map, configuration);
- list.add(model);
- }
-
- /**
- * Removes a user action context for the given profile and subsystem configuration.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @param context the user action context.
- */
- public void removeUserActionContext(ISystemProfile profile, ISubSystemConfiguration configuration, IUserActionContext context) {
- Map map = getUserActionContextMap(profile);
- List list = getUserActionContexts(map, configuration);
- list.remove(context);
- }
-
- /**
- * Adds a user action for the given profile and subsystem configuration.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @param model the user action model.
- */
- public void removeUserActionModel(ISystemProfile profile, ISubSystemConfiguration configuration, IUserActionModel model) {
- Map map = getUserActionModelMap(profile);
- List list = getUserActionModels(map, configuration);
- list.remove(model);
- }
-
- /**
- * Returns an array of user action contexts for the given profile and subsystem configuration.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @return the array of user action contexts, or an empty array if none.
- */
- public IUserActionContext[] getUserActionContexts(ISystemProfile profile, ISubSystemConfiguration configuration) {
- Map map = getUserActionContextMap(profile);
- List list = getUserActionContexts(map, configuration);
- return (IUserActionContext[])(list.toArray());
- }
-
- /**
- * Returns an array of user actions for the given profile and subsystem configuration.
- * @param profile the system profile.
- * @param configuration the subsystem configuration.
- * @return the array of user action models, or an empty array if none.
- */
- public IUserActionModel[] getUserActionModels(ISystemProfile profile, ISubSystemConfiguration configuration) {
- Map map = getUserActionModelMap(profile);
- List list = getUserActionModels(map, configuration);
- return (IUserActionModel[])(list.toArray());
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java
deleted file mode 100644
index 29caa7b39..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Defines the standard icons for user actions, user types, and compile commands.
- * Images and image descriptions may be extracted from these.
- * There is no public constructor. Use the predefined instances of this class
- * to access the images and descriptors.
- */
-public class UserActionsIcon {
-
- /**
- * A new user defined action.
- */
- public static final UserActionsIcon USERACTION_NEW = new UserActionsIcon(IUserActionsImageIds.USERACTION_NEW);
-
- /**
- * An existing user defined user action.
- */
- public static final UserActionsIcon USERACTION_USR = new UserActionsIcon(IUserActionsImageIds.USERACTION_USR);
-
- /**
- * A predefined user defined action.
- */
- public static final UserActionsIcon USERACTION_IBM = new UserActionsIcon(IUserActionsImageIds.USERACTION_IBM);
-
- /**
- * A predefined user defined action that has been modified.
- */
- public static final UserActionsIcon USERACTION_IBMUSR = new UserActionsIcon(IUserActionsImageIds.USERACTION_IBMUSR);
-
- /**
- * A new user defined type.
- */
- public static final UserActionsIcon USERTYPE_NEW = new UserActionsIcon(IUserActionsImageIds.USERTYPE_NEW);
-
- /**
- * An existing user defined type.
- */
- public static final UserActionsIcon USERTYPE_USR = new UserActionsIcon(IUserActionsImageIds.USERTYPE_USR);
-
- /**
- * A predefined user defined type.
- */
- public static final UserActionsIcon USERTYPE_IBM = new UserActionsIcon(IUserActionsImageIds.USERTYPE_IBM);
-
- /**
- * A predefined user defined type that has been modified.
- */
- public static final UserActionsIcon USERTYPE_IBMUSR = new UserActionsIcon(IUserActionsImageIds.USERTYPE_IBMUSR);
-
- /**
- * A new user defined compile command.
- */
- public static final UserActionsIcon COMPILE_NEW = new UserActionsIcon(IUserActionsImageIds.COMPILE_NEW);
-
- /**
- * An existing user defined compile command.
- */
- public static final UserActionsIcon COMPILE_USR = new UserActionsIcon(IUserActionsImageIds.COMPILE_USR);
-
- /**
- * A predefined user defined compile command.
- */
- public static final UserActionsIcon COMPILE_IBM = new UserActionsIcon(IUserActionsImageIds.COMPILE_IBM);
-
- /**
- * A predefined user defined compile command that has been edited.
- */
- public static final UserActionsIcon COMPILE_IBMUSR = new UserActionsIcon(IUserActionsImageIds.COMPILE_IBMUSR);
-
- private String imageID;
-
- private UserActionsIcon(String imageID) {
- this.imageID = imageID;
- }
-
- /**
- * Gets the image associated with this icon. This image is stored in the image registry of the
- * user actions plugin and therefore the image must not be disposed when its use is completed.
- * @return the image
- */
- public Image getImage() {
- return Activator.getDefault().getImage(imageID);
- }
-
- /**
- * Gets the image descriptor associated with this icon.
- * @return the image descriptor
- */
- public ImageDescriptor getImageDescriptor() {
- return Activator.getDefault().getImageDescriptor(imageID);
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java
deleted file mode 100644
index b5ac28fcf..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * This class is a placeholder documenting the old persistence API and structure for
- * user actions, user type filters, and compile commands.
- * The class is not functional.
- * TODO: (dwd) this needs to be replaced with the new persistence provider scheme.
- */
-public class UserActionsPersistenceUtil {
-
-
- /*
- * Bogus infrastructure to make this compile
- */
-
- private static class ResourceHelpers {
- IFolder getOrCreateFolder(IFolder parent, String folderName) {
- return null;
- }
- IFolder getFolder(IContainer parent, String folderName) {
- return null;
- }
- }
-
- private static ResourceHelpers getResourceHelpers() {
- return new ResourceHelpers();
- }
-
- private static IFolder getProfileFolder(String profileName) {
- return null;
- }
-
- private static String getFolderName(ISubSystemConfiguration subystemConfiguration) {
- return null;
- }
-
- private static IProject getRemoteSystemsProject() {
- return null;
- }
-
- private static final String RESOURCE_USERACTIONS_FOLDER_NAME = null;
- private static final String RESOURCE_COMPILECOMMANDS_FOLDER_NAME = null;
- private static final String RESOURCE_TYPE_FILTERS_FOLDER_NAME = null;
-
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * 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.
- }
-
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * 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.
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.java
deleted file mode 100644
index eb6ec4d3e..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions;
-
-import org.eclipse.osgi.util.NLS;
-
-public class UserActionsResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.useractions.UserActionsResources"; //$NON-NLS-1$
- // Property sheet values: Categories in Team view
- 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;
- // USER ACTION PROPERTIES PAGE...
- public static String RESID_PP_USERACTION_TITLE;
- public static String RESID_PP_USERACTION_TYPE_VALUE;
- public static String RESID_PP_USERACTION_PROFILE_LABEL;
- public static String RESID_PP_USERACTION_PROFILE_TOOLTIP;
- public static String RESID_PP_USERACTION_ORIGIN_LABEL;
- public static String RESID_PP_USERACTION_ORIGIN_TOOLTIP;
- public static String RESID_PP_USERACTION_DOMAIN_LABEL;
- public static String RESID_PP_USERACTION_DOMAIN_TOOLTIP;
- // COMPILE TYPE PROPERTIES PAGE...
- public static String RESID_PP_COMPILETYPE_TITLE;
- public static String RESID_PP_COMPILETYPE_TYPE_VALUE;
- public static String RESID_PP_COMPILETYPE_TYPE_TOOLTIP;
- public static String RESID_PP_COMPILETYPE_PROFILE_LABEL;
- public static String RESID_PP_COMPILETYPE_PROFILE_TOOLTIP;
- public static String RESID_PP_COMPILETYPE_FILETYPE_LABEL;
- public static String RESID_PP_COMPILETYPE_FILETYPE_TOOLTIP;
- // COMPILE COMMAND PROPERTIES PAGE...
- public static String RESID_PP_COMPILECMD_TITLE;
- public static String RESID_PP_COMPILECMD_TYPE_VALUE;
- public static String RESID_PP_COMPILECMD_PROFILE_LABEL;
- public static String RESID_PP_COMPILECMD_PROFILE_TOOLTIP;
- public static String RESID_PP_COMPILECMD_ORIGIN_LABEL;
- public static String RESID_PP_COMPILECMD_ORIGIN_TOOLTIP;
- // USER ACTIONS
- public static String ACTION_COMPILE_NOPROMPT_LABEL;
- public static String ACTION_COMPILE_NOPROMPT_TOOLTIP;
- public static String ACTION_COMPILE_PROMPT_LABEL;
- public static String ACTION_COMPILE_PROMPT_TOOLTIP;
- // Property sheet values: User actions
- public static String RESID_PROPERTY_ORIGIN_IBM_VALUE;
- public static String RESID_PROPERTY_ORIGIN_IBMUSER_VALUE;
- public static String RESID_PROPERTY_ORIGIN_USER_VALUE;
- public static String RESID_PROPERTY_ORIGIN_ISV_VALUE;
- public static String RESID_PROPERTY_ORIGIN_ISVUSER_VALUE;
- public static String RESID_PROPERTY_USERACTION_VENDOR_LABEL;
- public static String RESID_PROPERTY_USERACTION_VENDOR_TOOLTIP;
- public static String RESID_PROPERTY_USERACTION_DOMAIN_LABEL;
- public static String RESID_PROPERTY_USERACTION_DOMAIN_TOOLTIP;
- public static String RESID_PROPERTY_USERACTION_DOMAIN_ALL_VALUE;
- // Property sheet values: Compile types
- public static String RESID_PROPERTY_COMPILETYPE_TYPES_LABEL;
- public static String RESID_PROPERTY_COMPILETYPE_TYPES_DESCRIPTION;
- // TEAM VIEW
- public static String RESID_TEAMVIEW_USERACTION_VALUE;
-
-
- 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 MSG_VALIDATE_UDANAME_EMPTY;
- public static String MSG_VALIDATE_UDANAME_NOTUNIQUE;
- public static String MSG_VALIDATE_UDANAME_NOTVALID;
- public static String MSG_VALIDATE_UDACMT_EMPTY;
- public static String MSG_VALIDATE_UDACMT_NOTVALID;
- public static String MSG_VALIDATE_UDACMD_EMPTY;
- public static String MSG_VALIDATE_UDACMD_NOTVALID;
- public static String MSG_VALIDATE_UDTNAME_EMPTY;
- public static String MSG_VALIDATE_UDTNAME_NOTUNIQUE;
- public static String MSG_VALIDATE_UDTNAME_NOTVALID;
- public static String MSG_VALIDATE_UDTTYPES_EMPTY;
- public static String MSG_VALIDATE_UDTTYPES_NOTVALID;
- public static String MSG_VALIDATE_COMPILELABEL_EMPTY;
- public static String MSG_VALIDATE_COMPILELABEL_NOTUNIQUE;
- public static String MSG_VALIDATE_COMPILELABEL_NOTVALID;
- public static String MSG_VALIDATE_COMPILESTRING_EMPTY;
- public static String MSG_VALIDATE_COMPILESTRING_NOTVALID;
- public static String MSG_UDA_LOAD_ERROR;
- public static String MSG_UDA_ROOTTAG_ERROR;
- public static String MSG_CONFIRM_DELETE_USERACTION;
- public static String MSG_CONFIRM_DELETE_USERTYPE;
-
- public static String MSG_VALIDATE_UDANAME_EMPTY_DETAILS;
- public static String MSG_VALIDATE_UDANAME_NOTUNIQUE_DETAILS;
- public static String MSG_VALIDATE_UDANAME_NOTVALID_DETAILS;
- public static String MSG_VALIDATE_UDACMT_EMPTY_DETAILS;
- public static String MSG_VALIDATE_UDACMT_NOTVALID_DETAILS;
- public static String MSG_VALIDATE_UDACMD_EMPTY_DETAILS;
- public static String MSG_VALIDATE_UDACMD_NOTVALID_DETAILS;
- public static String MSG_VALIDATE_UDTNAME_EMPTY_DETAILS;
- public static String MSG_VALIDATE_UDTNAME_NOTUNIQUE_DETAILS;
- public static String MSG_VALIDATE_UDTNAME_NOTVALID_DETAILS;
- public static String MSG_VALIDATE_UDTTYPES_EMPTY_DETAILS;
- public static String MSG_VALIDATE_UDTTYPES_NOTVALID_DETAILS;
- public static String MSG_VALIDATE_COMPILELABEL_EMPTY_DETAILS;
- public static String MSG_VALIDATE_COMPILELABEL_NOTUNIQUE_DETAILS;
- public static String MSG_VALIDATE_COMPILELABEL_NOTVALID_DETAILS;
- public static String MSG_VALIDATE_COMPILESTRING_EMPTY_DETAILS;
- public static String MSG_VALIDATE_COMPILESTRING_NOTVALID_DETAILS;
-
- public static String MSG_UDA_ROOTTAG_ERROR_DETAILS;
- public static String MSG_CONFIRM_DELETE_USERACTION_DETAILS;
- public static String MSG_CONFIRM_DELETE_USERTYPE_DETAILS;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, UserActionsResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.properties b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.properties
deleted file mode 100644
index 12458b1ff..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsResources.properties
+++ /dev/null
@@ -1,159 +0,0 @@
-###############################################################################
-# Copyright (c) 2002, 2008 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
-# David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
-# Kevin Doyle (IBM) - [239703] Error Messages containing {0}
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-# NLS_ENCODING=UTF-8
-
-#TEAM VIEW PROPERTIES
-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
-
-#=============================================================
-# USER ACTION PROPERTIES PAGE...
-#=============================================================
-RESID_PP_USERACTION_TITLE=Properties for User Action
-RESID_PP_USERACTION_TYPE_VALUE=User action
-RESID_PP_USERACTION_PROFILE_LABEL=Parent profile
-RESID_PP_USERACTION_PROFILE_TOOLTIP=Profile that contains this user action
-RESID_PP_USERACTION_ORIGIN_LABEL=Origin
-RESID_PP_USERACTION_ORIGIN_TOOLTIP=Who supplied this user action?
-RESID_PP_USERACTION_DOMAIN_LABEL=Domain
-RESID_PP_USERACTION_DOMAIN_TOOLTIP=What domain is this action scoped to?
-
-#=============================================================
-# COMPILE TYPE PROPERTIES PAGE...
-#=============================================================
-RESID_PP_COMPILETYPE_TITLE=Properties for Compilable Source Type
-RESID_PP_COMPILETYPE_TYPE_VALUE=Compilable source type
-RESID_PP_COMPILETYPE_TYPE_TOOLTIP=What type of artifact is this?
-RESID_PP_COMPILETYPE_PROFILE_LABEL=Parent profile
-RESID_PP_COMPILETYPE_PROFILE_TOOLTIP=Profile that contains this compile type and its compile commands
-RESID_PP_COMPILETYPE_FILETYPE_LABEL=Source type
-RESID_PP_COMPILETYPE_FILETYPE_TOOLTIP=The type of source that this type's compile commands apply to
-
-#=============================================================
-# COMPILE COMMAND PROPERTIES PAGE...
-#=============================================================
-RESID_PP_COMPILECMD_TITLE=Properties for Compilable Command
-RESID_PP_COMPILECMD_TYPE_VALUE=Compile command
-RESID_PP_COMPILECMD_PROFILE_LABEL=Parent profile
-RESID_PP_COMPILECMD_PROFILE_TOOLTIP=Profile that contains this compile command
-RESID_PP_COMPILECMD_ORIGIN_LABEL=Origin
-RESID_PP_COMPILECMD_ORIGIN_TOOLTIP=Who supplied this compile command?
-
-#=============================================================
-# USER ACTIONS...
-#=============================================================
-ACTION_COMPILE_NOPROMPT_LABEL=Compile
-ACTION_COMPILE_NOPROMPT_TOOLTIP=Run compile commands without prompting them
-ACTION_COMPILE_PROMPT_LABEL=Compile (Prompt)
-ACTION_COMPILE_PROMPT_TOOLTIP=Prompt and then run compile commands
-
-#=============================================================
-#USER ACTION PROPERTIES - PROPERTY SHEET
-#=============================================================
-RESID_PROPERTY_ORIGIN_IBM_VALUE=IBM supplied
-RESID_PROPERTY_ORIGIN_IBMUSER_VALUE=IBM supplied, user edited
-RESID_PROPERTY_ORIGIN_ISV_VALUE=ISV supplied
-RESID_PROPERTY_ORIGIN_ISVUSER_VALUE=ISV supplied, user edited
-RESID_PROPERTY_ORIGIN_USER_VALUE=User defined
-RESID_PROPERTY_USERACTION_DOMAIN_ALL_VALUE=All
-RESID_PROPERTY_USERACTION_VENDOR_LABEL=Vendor
-RESID_PROPERTY_USERACTION_VENDOR_TOOLTIP=Vendor that supplied this command
-RESID_PROPERTY_USERACTION_DOMAIN_LABEL=Domain
-RESID_PROPERTY_USERACTION_DOMAIN_TOOLTIP=Object domain this applies to
-
-#=============================================================
-#COMPILE TYPE PROPERTIES - PROPERTY SHEET
-#=============================================================
-RESID_PROPERTY_COMPILETYPE_TYPES_LABEL=File type
-RESID_PROPERTY_COMPILETYPE_TYPES_DESCRIPTION=File type this refers to
-
-#=============================================================
-# Team View
-#=============================================================
-RESID_TEAMVIEW_USERACTION_VALUE=User action
-
-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
-
-
-MSG_VALIDATE_UDANAME_EMPTY = Enter action name
-MSG_VALIDATE_UDANAME_EMPTY_DETAILS = You must enter a name for this action
-
-MSG_VALIDATE_UDANAME_NOTUNIQUE= Action name is not unique
-MSG_VALIDATE_UDANAME_NOTUNIQUE_DETAILS = There is already an action with the given name in the selected profile. Specify a name that is not already in use
-
-MSG_VALIDATE_UDANAME_NOTVALID =Action name is not valid
-MSG_VALIDATE_UDANAME_NOTVALID_DETAILS =The given name is not a valid action name
-
-MSG_VALIDATE_UDACMT_EMPTY = Enter comment
-MSG_VALIDATE_UDACMT_EMPTY_DETAILS = You must enter a comment for this action
-
-MSG_VALIDATE_UDACMT_NOTVALID = Action comment is not valid
-MSG_VALIDATE_UDACMT_NOTVALID_DETAILS =The given comment has syntactical errors
-
-MSG_VALIDATE_UDACMD_EMPTY = Enter command
-MSG_VALIDATE_UDACMD_EMPTY_DETAILS = You must enter a command for this action
-
-MSG_VALIDATE_UDACMD_NOTVALID = Action command is not valid
-MSG_VALIDATE_UDACMD_NOTVALID_DETAILS = The given command has syntactical errors
-
-MSG_VALIDATE_UDTNAME_EMPTY = Enter type name
-MSG_VALIDATE_UDTNAME_EMPTY_DETAILS = You must enter a name for this collection of resource types
-
-MSG_VALIDATE_UDTNAME_NOTUNIQUE= Type name %1 in use
-MSG_VALIDATE_UDTNAME_NOTUNIQUE_DETAILS = There is already a named type with the given name. Specify a name that is not already in use
-
-MSG_VALIDATE_UDTNAME_NOTVALID = Type name %1 is not valid
-MSG_VALIDATE_UDTNAME_NOTVALID_DETAILS =The given name is not valid for a named type. It must not contain blanks
-
-MSG_VALIDATE_UDTTYPES_EMPTY = Specify one or more resource types
-MSG_VALIDATE_UDTTYPES_EMPTY_DETAILS = You must specify one or more simple or generic resource types to constitute this named type
-
-MSG_VALIDATE_UDTTYPES_NOTVALID = Types not valid
-MSG_VALIDATE_UDTTYPES_NOTVALID_DETAILS = Syntactical errors were found in the list of resource types
-
-MSG_VALIDATE_COMPILELABEL_EMPTY = Enter a label for this compile command
-MSG_VALIDATE_COMPILELABEL_EMPTY_DETAILS = You must enter a label for this compile command, that will be shown in menus and lists
-
-MSG_VALIDATE_COMPILELABEL_NOTUNIQUE= Compile command label "%1" is in use
-MSG_VALIDATE_COMPILELABEL_NOTUNIQUE_DETAILS =There is already a compile command with the given label. Specify a label that is not already in use
-
-MSG_VALIDATE_COMPILELABEL_NOTVALID = Compile command label "%1" is not valid
-MSG_VALIDATE_COMPILELABEL_NOTVALID_DETAILS =The given label is not a valid compile label
-
-MSG_VALIDATE_COMPILESTRING_EMPTY = Enter command string for this compile command
-MSG_VALIDATE_COMPILESTRING_EMPTY_DETAILS = You must enter a command string for this compile command. This is what is run when this compile command is selected.
-
-MSG_VALIDATE_COMPILESTRING_NOTVALID = Compile command string "{0}" is not valid
-MSG_VALIDATE_COMPILESTRING_NOTVALID_DETAILS = The given string is not a valid command.
-
-MSG_UDA_LOAD_ERROR = Error occurred while loading the user-defined action information from file: {0}
-
-MSG_UDA_ROOTTAG_ERROR = The xml file ''{0}'' appears to be corrupted. It has been replaced
-MSG_UDA_ROOTTAG_ERROR_DETAILS=Expected root tag to be named ''{0}''. The corrupted file has been renamed to ''{1}'' and a new file created for you
-
-MSG_CONFIRM_DELETE_USERACTION = Delete selected user actions?
-MSG_CONFIRM_DELETE_USERACTION_DETAILS=This is a permanent deletion of the selected actions and cannot be undone.Select Yes to delete and No to cancel the delete action
-
-MSG_CONFIRM_DELETE_USERTYPE = Delete selected types?
-MSG_CONFIRM_DELETE_USERTYPE_DETAILS =This is a permanent deletion of the selected types and cannot be undone.Select Yes to delete and No to cancel the delete action
-
-
- \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/ISystemCompileManagerAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/ISystemCompileManagerAdapter.java
deleted file mode 100644
index c67f6a270..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/ISystemCompileManagerAdapter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.files.compile;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-
-/**
- * Compile Manager Adapter Interface.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public interface ISystemCompileManagerAdapter {
-
- public SystemCompileManager getSystemCompileManager(ISubSystemConfiguration ssc);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/UniversalCompileManagerAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/UniversalCompileManagerAdapter.java
deleted file mode 100644
index b99e453ba..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/compile/UniversalCompileManagerAdapter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.files.compile;
-
-import java.util.HashMap;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.files.compile.UniversalCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-
-/**
- * Universal Compile Manager Adapter.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class UniversalCompileManagerAdapter implements
- ISystemCompileManagerAdapter {
- private HashMap compileManagers = new HashMap();
-
- public SystemCompileManager getSystemCompileManager(ISubSystemConfiguration ssc) {
- String configID = ssc.getId();
-
- SystemCompileManager thisCompileManager = (SystemCompileManager)compileManagers.get(configID);
- if (thisCompileManager == null)
- {
- thisCompileManager = new UniversalCompileManager();
- thisCompileManager.setSubSystemFactory(ssc);
- compileManagers.put(configID, thisCompileManager);
- }
-
- return thisCompileManager;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/ISystemUDActionSubsystemAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/ISystemUDActionSubsystemAdapter.java
deleted file mode 100644
index 9cc1d36ca..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/ISystemUDActionSubsystemAdapter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.files.uda;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-
-
-/**
- * User-defined Action Subsystem Adapter Interface.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public interface ISystemUDActionSubsystemAdapter {
-
- public SystemUDActionSubsystem getSystemUDActionSubsystem(ISubSystemConfiguration ssc);
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/UniversalSystemUDActionSubsystemAdapter.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/UniversalSystemUDActionSubsystemAdapter.java
deleted file mode 100644
index 12247ee1a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/files/uda/UniversalSystemUDActionSubsystemAdapter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.files.uda;
-
-import java.util.HashMap;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.files.uda.UDActionSubsystemUniversalFiles;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-
-/**
- * Universal User-defined Action Subsystem Adapter.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class UniversalSystemUDActionSubsystemAdapter implements ISystemUDActionSubsystemAdapter {
- private HashMap uDActionSubsystems = new HashMap();
-
- public SystemUDActionSubsystem getSystemUDActionSubsystem(ISubSystemConfiguration ssc) {
- String configID = ssc.getId();
-
- SystemUDActionSubsystem thisuDActionSubsystem = (SystemUDActionSubsystem)uDActionSubsystems.get(configID);
- if (thisuDActionSubsystem == null)
- {
- thisuDActionSubsystem = new UDActionSubsystemUniversalFiles();
- thisuDActionSubsystem.setSubSystemFactory(ssc);
- uDActionSubsystems.put(configID, thisuDActionSubsystem);
- }
-
- return thisuDActionSubsystem;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCascadingCompileAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCascadingCompileAction.java
deleted file mode 100644
index 5503bde0d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCascadingCompileAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.api.ui.compile;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCascadeByProfileAction;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Cascading Compile-> menu for remote compilable resources.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class SystemCascadingCompileAction extends SystemBaseSubMenuAction implements IMenuListener {
- private boolean isPrompt;
-
- /**
- * Constructor for SystemCascadingCompileAction
- */
- public SystemCascadingCompileAction(Shell shell, boolean isPrompt) {
- super(isPrompt ? UserActionsResources.ACTION_COMPILE_PROMPT_LABEL : UserActionsResources.ACTION_COMPILE_NOPROMPT_LABEL, isPrompt ? UserActionsResources.ACTION_COMPILE_PROMPT_TOOLTIP
- : UserActionsResources.ACTION_COMPILE_NOPROMPT_TOOLTIP, (ImageDescriptor) null, shell);
- this.isPrompt = isPrompt;
- allowOnMultipleSelection(false);
- setMenuID(ISystemContextMenuConstants.MENU_COMPILE);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- //setTest(true);
- if (isPrompt)
- setHelp(RSEUIPlugin.HELPPREFIX + "ccpa0000"); //$NON-NLS-1$
- else
- setHelp(RSEUIPlugin.HELPPREFIX + "ccna0000"); //$NON-NLS-1$
- }
-
- /**
- * @see SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager ourSubMenu) {
- 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("Inside menuAboutToShow for SystemCascadingCompileAction");
- Object firstSelection = getFirstSelection();
- if (firstSelection == null) {
- System.out.println("Hmm, selection is null! "); //$NON-NLS-1$
- ourSubMenu.add(new SystemBaseAction("Programming error. Selection is null! ", null)); //$NON-NLS-1$
- return;
- }
- // is cascading-by-profile preference turned on?
- if (SystemPreferencesManager.getCascadeUserActions()) {
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- for (int idx = 0; idx < activeProfiles.length; idx++) {
- SystemBaseSubMenuAction profileAction = new SystemCompileCascadeByProfileAction(getShell(), firstSelection, activeProfiles[idx], isPrompt);
- ourSubMenu.add(profileAction.getSubMenu());
- }
- }
- // else concatenate all the compile commands from all the active profiles...
- else {
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- for (int idx = 0; idx < activeProfiles.length; idx++)
- SystemCompileCascadeByProfileAction.populateMenuWithCompileActions(ourSubMenu, getShell(), activeProfiles[idx], firstSelection, isPrompt);
- }
- // add a separator before Work With Compile Commands... menu item
- ourSubMenu.add(new Separator());
- // add Work With Commands... action
- ourSubMenu.add(new SystemWorkWithCompileCommandsAction(getShell(), true));
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCompileAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCompileAction.java
deleted file mode 100644
index 35c5b82df..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemCompileAction.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Kevin Doyle (IBM) - [252707] Everytime a Compile command is selected a saving profile job is performed
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.api.ui.compile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompilableSource;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileType;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-/**
- * This is the action for an individual compile command, either prompted or not
- * prompted. The label for the action is simply the compile command's label. If
- * promptable, then "..." is appended.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class SystemCompileAction extends SystemBaseAction {
- private SystemCompileCommand compileCmd;
- private boolean isPrompt;
-
- /**
- * Constructor
- */
- public SystemCompileAction(Shell shell, SystemCompileCommand compileCommand, boolean isPrompt) {
- super(
- isPrompt ? compileCommand.getLabel() + "..." : compileCommand.getLabel(), compileCommand.getLabel(), Activator.getDefault().getImageDescriptor(IUserActionsImageIds.COMPILE_1), shell); // null == image //$NON-NLS-1$
- this.compileCmd = compileCommand;
- this.isPrompt = isPrompt;
- SystemCompileManager mgr = compileCommand.getParentType().getParentProfile().getParentManager();
- allowOnMultipleSelection(mgr.isMultiSelectSupported(compileCommand));
- if (isPrompt)
- setHelp(RSEUIPlugin.HELPPREFIX + "scpa0000"); //$NON-NLS-1$
- else
- setHelp(RSEUIPlugin.HELPPREFIX + "scna0000"); //$NON-NLS-1$
- SystemCompileCommand lucc = compileCmd.getParentType().getLastUsedCompileCommand();
- if ((lucc != null) && lucc.getLabel().equals(compileCmd.getLabel())) {
- setChecked(true);
- // if (!isPrompt)
- // setAccelerator(SWT.CTRL | SWT.SHIFT | 'c');
- } else
- setChecked(false);
- }
-
- /**
- * Intercept of parent method that is our first opportunity to enable/disable this action, typically
- * by interrogating the current selection, retrievable via getSelection.
- * <p>
- * For this compile action, we disable if we are not currently connected.
- */
- public boolean updateSelection(IStructuredSelection selection) {
- boolean enable = true;
- Object selected = getFirstSelection();
- if (selected == null) return false;
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(selected);
- if (rmtAdapter == null) enable = false;
- // yantzi:artemis6.0, we need to allow the menu item to show up even if disconnected in order
- // to allow customers to restore the tree view from cache on startup and still have all actions
- // available. It is up to the subsystme to make sure to connect if required when the compile
- // command is run
- //else
- // enable = rmtAdapter.getSubSystem(selected).isConnected();
- if (!enable) return false;
- SystemCompileManager mgr = compileCmd.getParentType().getParentProfile().getParentManager();
- while (enable && (selected != null)) {
- enable = mgr.isCompilable(selected);
- selected = getNextSelection();
- }
- return enable;
- }
-
- /**
- * Intercept of parent method that is our opportunity to enable/disable this action, typically
- * by interrogating the current selection, retrievable via getSelection.
- * <p>
- * For this compile action, we disable if we are not currently connected.
- */
- public boolean checkObjectType(Object selectedObject) {
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(selectedObject);
- if (rmtAdapter == null)
- return false;
- else
- return rmtAdapter.getSubSystem(selectedObject).isConnected();
- }
-
- /**
- * Called by eclipse when the user selects this action. Does the actual running of the action.
- */
- public void run() {
- if (checkDirtyEditors()) {
- Object element = getFirstSelection();
- boolean ok = true;
- while (ok && (element != null)) {
- SystemCompileType compType = compileCmd.getParentType();
- if (!compileCmd.equals(compType.getLastUsedCompileCommand())) {
- compType.setLastUsedCompileCommand(compileCmd);
- compType.getParentProfile().writeToDisk();
- }
- SystemCompilableSource compilableSrc = compType.getParentProfile().getCompilableSourceObject(getShell(), element, compileCmd, isPrompt, viewer);
- ok = compilableSrc.runCompileCommand();
- if (ok) element = getNextSelection();
- }
- }
- }
-
- protected List getDirtyEditors() {
- IStructuredSelection sel = getSelection();
- List selection = sel.toList();
- List dirtyEditors = new ArrayList();
- for (int i = 0; i < selection.size(); i++) {
- Object selected = selection.get(i);
- if (selected instanceof IAdaptable) {
- ISystemEditableRemoteObject editable = getEditableFor((IAdaptable) selected);
- if (editable != null) {
- try {
- // is the file being edited?
- if (editable.checkOpenInEditor() == 0) {
- // reference the editing editor
- editable.openEditor();
- // file is open in editor - prompt for save
- if (editable.isDirty()) {
- dirtyEditors.add(editable);
- }
- }
- } catch (Exception e) {
- }
- }
- }
- }
- return dirtyEditors;
- }
-
- 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() {
- List dirtyEditors = getDirtyEditors();
- 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(null);
- ListSelectionDialog dlg = new ListSelectionDialog(getShell(), input, cprovider, lprovider, SystemUDAResources.EditorManager_saveResourcesMessage);
- dlg.setInitialSelections(input.getChildren());
- dlg.setTitle(SystemUDAResources.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);
- editable.doImmediateSaveAndUpload();
- }
- }
- return true;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompileMenu.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompileMenu.java
deleted file mode 100644
index d2d424801..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompileMenu.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- * Kevin Doyle (IBM) - [239805] User Action/Compile menu's shouldn't be tied to IRemoteFile
- * Kevin Doyle (IBM) - [239700] Compile Commands are available on items it shouldn't
- * Kevin Doyle (IBM) - [253037] ClassCastException in SystemDynamicUserActionMenu, SystemDynamicCompileMenu
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.ui.compile;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.api.files.compile.ISystemCompileManagerAdapter;
-import org.eclipse.rse.internal.useractions.files.compile.UniversalCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileType;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.CompoundContributionItem;
-
-/**
- * Dynamic Compile Menu.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class SystemDynamicCompileMenu extends CompoundContributionItem
-{
-
- protected IContributionItem[] getContributionItems() {
-
- ArrayList returnedItemList = new ArrayList();
-
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- Object firstSelection = null;
- if (selection instanceof IStructuredSelection)
- firstSelection = ((IStructuredSelection) selection).getFirstElement();
- if (firstSelection == null)
- {
- return new IContributionItem[0];
- }
- Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
-
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
- ISubSystem subsystem = rmtAdapter.getSubSystem(firstSelection);
- ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
-
- SystemCompileManager compileManager = null;
-
- if (firstSelection instanceof IAdaptable) {
- ISystemCompileManagerAdapter adapter = (ISystemCompileManagerAdapter)((IAdaptable)firstSelection).getAdapter(ISystemCompileManagerAdapter.class);
- if (null != adapter)
- {
- compileManager = adapter.getSystemCompileManager(ssc);
- }
- }
-
- if (null == compileManager)
- {
- compileManager = new UniversalCompileManager();
- compileManager.setSubSystemFactory(ssc);
- }
-
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- String srcType = null;
- if (rmtAdapter != null) {
- srcType = rmtAdapter.getRemoteSourceType(firstSelection);
- if (srcType == null)
- srcType = "null"; //$NON-NLS-1$
- else if (srcType.equals("")) //$NON-NLS-1$
- srcType = "blank"; //$NON-NLS-1$
- }
-
- if (null != compileManager)
- {
- SystemCompileManager thisCompileManager = compileManager;
- SystemCompileProfile compileProfile = thisCompileManager.getCompileProfile(activeProfiles[idx]);
- // compileProfile.addContributions(firstSelection);
- SystemCompileType compileType = compileProfile.getCompileType(srcType);
-
- if (compileType != null)
- {
- SystemCompileCommand[] cmds = compileType.getCompileCommandsArray();
- for (int idx2=0; idx2<cmds.length; idx2++)
- {
- SystemCompileAction action = new SystemCompileAction(shell, cmds[idx2], false);
- action.setSelection(selection);
- ActionContributionItem testContribution = new ActionContributionItem(action);
- returnedItemList.add(testContribution);
- //ourSubMenu.add(action);
- }
- }
- }
-
- }
-
- // add a separator before Work With Compile Commands... menu item
- //ourSubMenu.add(new Separator());
- // add Work With Commands... action
- if (returnedItemList.size() > 0)
- returnedItemList.add(new Separator());
-
- // Here's where you would dynamically generate your list
- SystemWorkWithCompileCommandsAction workWithCompileCommandAction = new SystemWorkWithCompileCommandsAction(shell, true, subsystem, compileManager);
- workWithCompileCommandAction.setSelection(selection);
- ActionContributionItem testContribution = new ActionContributionItem(workWithCompileCommandAction);
- returnedItemList.add(testContribution);
- IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new IContributionItem[]{});
- //String[] array = (String[])arrayList.toArray(new String[]{});
- //SystemCascadingCompileAction promptAction = new SystemCascadingCompileAction(null, true);
- //list[0] = new TestContribution(/*promptAction*/);
-
- return list;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompilePromptMenu.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompilePromptMenu.java
deleted file mode 100644
index 269e7ca12..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemDynamicCompilePromptMenu.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- * Kevin Doyle (IBM) - [239700] Compile Commands are available on items it shouldn't -- Modified SystemDynamicCompileMenu
- * Kevin Doyle (IBM) - [253037] ClassCastException in SystemDynamicUserActionMenu, SystemDynamicCompileMenu
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.ui.compile;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.api.files.compile.ISystemCompileManagerAdapter;
-import org.eclipse.rse.internal.useractions.files.compile.UniversalCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileType;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.CompoundContributionItem;
-
-/**
- * Dynamic Compile Menu.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class SystemDynamicCompilePromptMenu extends CompoundContributionItem
-{
-
- protected IContributionItem[] getContributionItems() {
-
- ArrayList returnedItemList = new ArrayList();
-
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- Object firstSelection = null;
- if (selection instanceof IStructuredSelection)
- firstSelection = ((IStructuredSelection) selection).getFirstElement();
- if (firstSelection == null)
- {
- return new IContributionItem[0];
- }
- Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
-
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
- ISubSystem subsystem = rmtAdapter.getSubSystem(firstSelection);
- ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
-
- SystemCompileManager compileManager = null;
-
- if (firstSelection instanceof IAdaptable) {
- ISystemCompileManagerAdapter adapter = (ISystemCompileManagerAdapter)((IAdaptable)firstSelection).getAdapter(ISystemCompileManagerAdapter.class);
- if (null != adapter)
- {
- compileManager = adapter.getSystemCompileManager(ssc);
- }
- }
-
- if (null == compileManager)
- {
- compileManager = new UniversalCompileManager();
- compileManager.setSubSystemFactory(ssc);
- }
-
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- String srcType = null;
- if (rmtAdapter != null) {
- srcType = rmtAdapter.getRemoteSourceType(firstSelection);
- if (srcType == null)
- srcType = "null"; //$NON-NLS-1$
- else if (srcType.equals("")) //$NON-NLS-1$
- srcType = "blank"; //$NON-NLS-1$
- }
-
- if (null != compileManager)
- {
- SystemCompileManager thisCompileManager = compileManager;
- SystemCompileProfile compileProfile = thisCompileManager.getCompileProfile(activeProfiles[idx]);
- // compileProfile.addContributions(firstSelection);
- SystemCompileType compileType = compileProfile.getCompileType(srcType);
-
- if (compileType != null)
- {
- SystemCompileCommand[] cmds = compileType.getCompileCommandsArray();
- for (int idx2=0; idx2<cmds.length; idx2++)
- {
- SystemCompileAction action = new SystemCompileAction(shell, cmds[idx2], true);
- action.setSelection(selection);
- ActionContributionItem testContribution = new ActionContributionItem(action);
- returnedItemList.add(testContribution);
- //ourSubMenu.add(action);
- }
- }
- }
-
- }
-
- // add a separator before Work With Compile Commands... menu item
- //ourSubMenu.add(new Separator());
- // add Work With Commands... action
- if (returnedItemList.size() > 0)
- returnedItemList.add(new Separator());
-
- // Here's where you would dynamically generate your list
- SystemWorkWithCompileCommandsAction workWithCompileCommandAction = new SystemWorkWithCompileCommandsAction(shell, true, subsystem, compileManager);
- workWithCompileCommandAction.setSelection(selection);
- ActionContributionItem testContribution = new ActionContributionItem(workWithCompileCommandAction);
- returnedItemList.add(testContribution);
- IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new IContributionItem[]{});
- //String[] array = (String[])arrayList.toArray(new String[]{});
- //SystemCascadingCompileAction promptAction = new SystemCascadingCompileAction(null, true);
- //list[0] = new TestContribution(/*promptAction*/);
-
- return list;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemWorkWithCompileCommandsAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemWorkWithCompileCommandsAction.java
deleted file mode 100644
index c8b7c1996..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/compile/SystemWorkWithCompileCommandsAction.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Xuan Chen (IBM) - [225617] [useraction][api] Remove Team view support inside user action.
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- * Kevin Doyle (IBM) - [239908] Need to set the connection in compile manager for Work with Compile Commands Action
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.api.ui.compile;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
-import org.eclipse.rse.internal.useractions.api.files.compile.ISystemCompileManagerAdapter;
-import org.eclipse.rse.internal.useractions.files.compile.UniversalCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemWorkWithCompileCommandsDialog;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action that displays the Work With -> Compile Commands menu item
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class SystemWorkWithCompileCommandsAction extends SystemBaseDialogAction {
-
- private ISubSystem subsystem = null;
- private ISubSystemConfiguration subsystemFactory = null;
- private ISystemProfile profile = null;
- private SystemCompileManager compileManager = null;
-
- /**
- * Constructor
- * @param shell The Shell of the parent UI for this dialog
- * @param fromCascadingCompileAction true to get "Work with Compile Commands" label, false to get "Compile Commands" label.
- */
- public SystemWorkWithCompileCommandsAction(Shell shell, boolean fromCascadingCompileAction) {
- super(fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWCOMPILE_CMDS_LABEL : SystemUDAResources.ACTION_WORKWITH_COMPILE_CMDS_LABEL,
- fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWCOMPILE_CMDS_TOOLTIP : SystemUDAResources.ACTION_WORKWITH_COMPILE_CMDS_TOOLTIP, Activator.getDefault()
- .getImageDescriptor(IUserActionsImageIds.WORK_WITH_COMPILE_COMMANDS_1), shell);
- allowOnMultipleSelection(false);
- if (!fromCascadingCompileAction)
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
- else
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "actnwwcc"); //$NON-NLS-1$
- setAvailableOffline(true);
- }
-
- public SystemWorkWithCompileCommandsAction(Shell shell, boolean fromCascadingCompileAction, ISubSystem subSystem, SystemCompileManager compileManager)
- {
- this(shell, fromCascadingCompileAction);
- this.subsystem = subSystem;
- this.compileManager = compileManager;
- if (null != subSystem)
- {
- subsystemFactory = subsystem.getSubSystemConfiguration();
- profile = subSystem.getSystemProfile();
- }
-
- }
-
- /**
- * Reset between runs
- */
- public void reset() {
- // nothing to do as we have no instance vars.
- }
-
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return true;
- }
-
- /**
- * 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) {
- Object inputObject = getFirstSelection();
- boolean caseSensitive = false;
- if (null == subsystem)
- {
- if (inputObject instanceof ISubSystem)
- subsystem = (ISubSystem) inputObject;
- //Don't think we need to support invoking this diaglog from Team view.
- /*
- else if (inputObject instanceof SystemTeamViewCompileTypeNode) {
- SystemTeamViewCompileTypeNode typeNode = ((SystemTeamViewCompileTypeNode) inputObject);
- subsystemFactory = typeNode.getParentSubSystemFactory().getSubSystemConfiguration();
- profile = typeNode.getProfile();
- } else if (inputObject instanceof SystemTeamViewSubSystemConfigurationNode) {
- subsystemFactory = ((SystemTeamViewSubSystemConfigurationNode) inputObject).getSubSystemConfiguration();
- profile = ((SystemTeamViewSubSystemConfigurationNode) inputObject).getProfile();
- }
- */
- else {
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(inputObject);
- if (rmtAdapter != null) subsystem = rmtAdapter.getSubSystem(inputObject);
- }
- }
- SystemCompileProfile currProfile = null;
- SystemCompileProfile[] currProfiles = null;
-
- if (subsystem != null) {
- if (subsystemFactory == null) subsystemFactory = subsystem.getSubSystemConfiguration();
- if (profile == null) profile = subsystem.getSystemProfile();
- }
-
- if (null == compileManager)
- {
- if (inputObject instanceof IAdaptable) {
- ISystemCompileManagerAdapter adapter = (ISystemCompileManagerAdapter)((IAdaptable)inputObject).getAdapter(ISystemCompileManagerAdapter.class);
- if (null != adapter)
- {
- compileManager = adapter.getSystemCompileManager(subsystemFactory);
- }
- }
- }
-
- if (null == compileManager)
- {
- compileManager = new UniversalCompileManager();
- compileManager.setSubSystemFactory(subsystemFactory);
- }
-
- if (null != compileManager)
- {
- if (profile != null)
- {
- currProfile = compileManager.getCompileProfile(profile);
- currProfiles = compileManager.getAllCompileProfiles();
- }
-
- if (subsystem != null) {
- compileManager.setSystemConnection(subsystem.getHost());
- }
-
- caseSensitive = subsystemFactory.isCaseSensitive();
-
- SystemWorkWithCompileCommandsDialog dlg = new SystemWorkWithCompileCommandsDialog(shell, compileManager, currProfile);
- /* FIXME - currProfiles cannot be null since above stuff was commented out
- if (currProfiles != null) {
- dlg.setProfiles(currProfiles);
- }
- */
- dlg.setProfiles(currProfiles);
- dlg.setCaseSensitive(caseSensitive);
-
- return dlg;
- }
- return null;
- }
-
- /**
- * Required by parent. We use it to return the new name.
- * In our case, we don't need it, so we return null.
- */
- protected Object getDialogValue(Dialog dlg) {
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/uda/SystemDynamicUserActionMenu.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/uda/SystemDynamicUserActionMenu.java
deleted file mode 100644
index 2163fe9ae..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/api/ui/uda/SystemDynamicUserActionMenu.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Xuan Chen (IBM) - [222470] initial contribution.
- * Kevin Doyle (IBM) - [239805] User Action/Compile menu's shouldn't be tied to IRemoteFile
- * Kevin Doyle (IBM) - [253037] ClassCastException in SystemDynamicUserActionMenu
- *********************************************************************************/
-package org.eclipse.rse.internal.useractions.api.ui.uda;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.api.files.uda.ISystemUDActionSubsystemAdapter;
-import org.eclipse.rse.internal.useractions.files.uda.UDActionSubsystemUniversalFiles;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-import org.eclipse.rse.internal.useractions.ui.uda.actions.SystemWorkWithUDAsAction;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.CompoundContributionItem;
-
-/**
- * Dynamic User-defined Action Menu.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class SystemDynamicUserActionMenu extends CompoundContributionItem
-{
-
- protected IContributionItem[] getContributionItems() {
-
- ArrayList returnedItemList = new ArrayList();
-
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- Object firstSelection = null;
- if (selection instanceof IStructuredSelection)
- firstSelection = ((IStructuredSelection) selection).getFirstElement();
- if (firstSelection == null)
- {
- return new IContributionItem[0];
- }
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
-
- ISubSystem subsystem = rmtAdapter.getSubSystem(firstSelection);
- ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
-
- SystemUDActionSubsystem systemUDActionSubsystem = null;
-
- if (firstSelection instanceof IAdaptable) {
- ISystemUDActionSubsystemAdapter adapter = (ISystemUDActionSubsystemAdapter)((IAdaptable)firstSelection).getAdapter(ISystemUDActionSubsystemAdapter.class);
- if (null != adapter)
- {
- systemUDActionSubsystem = adapter.getSystemUDActionSubsystem(ssc);
- systemUDActionSubsystem.setSubsystem(subsystem);
- }
- }
-
- if (null == systemUDActionSubsystem)
- {
- systemUDActionSubsystem = new UDActionSubsystemUniversalFiles();
- systemUDActionSubsystem.setSubSystemFactory(ssc);
- systemUDActionSubsystem.setSubsystem(subsystem);
- }
-
- Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
- for (int idx = 0; idx < activeProfiles.length; idx++)
- {
- //Xuan: the code for systemUDActionSubsystem#addUserActions go here...
- // systemUDActionSubsystem.addUserActions(menu, (IStructuredSelection)selection, profi, shell);
- if (null != systemUDActionSubsystem)
- {
- Action[] list = systemUDActionSubsystem.addUserActions(null, (IStructuredSelection)selection, activeProfiles[idx], shell);
-
- for (int i = 0; i < list.length; i++)
- {
- ActionContributionItem testContribution = new ActionContributionItem(list[i]);
- returnedItemList.add(testContribution);
- }
- }
- }
-
- // add a separator before Work With Compile Commands... menu item
- //ourSubMenu.add(new Separator());
- // add Work With Commands... action
- if (returnedItemList.size() > 0)
- returnedItemList.add(new Separator());
-
- SystemWorkWithUDAsAction wwAction;
- wwAction = new SystemWorkWithUDAsAction(shell, systemUDActionSubsystem.getSubsystem(), systemUDActionSubsystem);
- wwAction.setText(SystemUDAResources.RESID_WORKWITH_UDAS_ACTION_LABEL);
- wwAction.setToolTipText(SystemUDAResources.RESID_WORKWITH_UDAS_ACTION_TOOLTIP);
- wwAction.allowOnMultipleSelection(true);
- wwAction.setSelection(selection);
- ActionContributionItem userActionContribution = new ActionContributionItem(wwAction);
- returnedItemList.add(userActionContribution);
-
- IContributionItem[] list = (IContributionItem[])returnedItemList.toArray(new IContributionItem[]{});
- return list;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/CompilablePropertyTester.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/CompilablePropertyTester.java
deleted file mode 100644
index edc96b20e..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/CompilablePropertyTester.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Kevin Doyle (IBM) - initial API and implementation
- ********************************************************************************/
-
-package org.eclipse.rse.internal.useractions.files.compile;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.useractions.api.files.compile.ISystemCompileManagerAdapter;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-public class CompilablePropertyTester extends PropertyTester {
-
- public static final String PROPERTY_ISCOMPILABLE = "iscompilable"; //$NON-NLS-1$
-
-
- public boolean test(Object receiver, String property, Object[] args,
- Object expectedValue) {
-
- boolean test = ((Boolean) expectedValue).booleanValue();
-
- if (property.equals(PROPERTY_ISCOMPILABLE) && receiver != null && receiver instanceof IAdaptable) {
- ISubSystem subsystem = null;
-
- ISystemRemoteElementAdapter remoteAdapter = SystemAdapterHelpers.getRemoteAdapter(receiver);
- if (remoteAdapter != null)
- subsystem = remoteAdapter.getSubSystem(receiver);
-
- ISystemCompileManagerAdapter adapter = (ISystemCompileManagerAdapter) ((IAdaptable) receiver).getAdapter(ISystemCompileManagerAdapter.class);
- if (subsystem != null)
- {
- SystemCompileManager compileManager = null;
-
- if (adapter != null)
- compileManager = adapter.getSystemCompileManager(subsystem.getSubSystemConfiguration());
-
- if (compileManager == null)
- compileManager = new UniversalCompileManager(); // Use the Default Universal Compile Manager
-
- compileManager.setSubSystemFactory(subsystem.getSubSystemConfiguration());
-
- return compileManager.isCompilable(receiver) == test;
- }
- }
- return test == false;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java
deleted file mode 100644
index 3017d0dda..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileManager.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.useractions.files.compile;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
-
-/**
- * Specialization of the compile manager for universal files, for local files.
- */
-public class LocalCompileManager extends UniversalCompileManager {
- /**
- * Constructor for LocalCompileManager.
- */
- public LocalCompileManager() {
- super();
- }
-
- /**
- * Overridable method to instantiate the SystemCompileProfile for the
- * given system profile.
- * <p>
- * We return an instance of LocalCompileProfile
- */
- protected SystemCompileProfile createCompileProfile(ISystemProfile profile) {
- return new LocalCompileProfile(this, profile.getName());
- }
-
- /**
- * For support of the Work With Compile Commands dialog.
- * <p>
- * Return the substitution variables supported by compile commands managed by this manager.
- */
- public SystemCmdSubstVarList getSubstitutionVariableList() {
- return UniversalCompileSubstList.getInstance();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileProfile.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileProfile.java
deleted file mode 100644
index 4d4ed838a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/LocalCompileProfile.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.useractions.files.compile;
-
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-
-/**
- * Specialization of the compile profile class, uniquely for the compile support of files from
- * the local file subsystem.
- */
-public class LocalCompileProfile extends UniversalCompileProfile {
- /**
- * Constructor
- * @param manager SystemCompileManager of this compile file
- * @param profileName System profile name
- */
- public LocalCompileProfile(SystemCompileManager manager, String profileName) {
- super(manager, profileName);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompilableSource.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompilableSource.java
deleted file mode 100644
index 73cd4d583..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompilableSource.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.useractions.files.compile;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompilableSource;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This encapsulates a file in a universal file system, which is to be compiled.
- */
-public class UniversalCompilableSource extends SystemCompilableSource {
- /**
- * Constructor for UniversalCompilableSource.
- * @param shell - the shell to use if need to prompt
- * @param firstSelection - the selected compilable source member
- * @param compileCmd - the Compile Command that is to be run against the selected compilable source member
- * @param isPrompt - true if the user choose the flavor of the action to prompt the compile command
- * @param viewer - the viewer that originated the compile action
- */
- public UniversalCompilableSource(Shell shell, Object firstSelection, SystemCompileCommand compileCmd, boolean isPrompt, Viewer viewer) {
- super(shell, firstSelection, compileCmd, isPrompt, viewer);
- }
-
- /**
- * After the substituting and the prompting, it is now time to the remote running of the
- * fully resolved compile command. Do that here.
- * <p>
- * We use the RemoteCommandHelpers class to run it.
- */
- protected boolean internalRunCompileCommand(String compileCmd) {
- String path = RemoteCommandHelpers.getWorkingDirectory((IRemoteFile) firstSelection);
- boolean ok = RemoteCommandHelpers.runUniversalCommand(shell, compileCmd, path, getCommandSubSystem(), true);
- return ok;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java
deleted file mode 100644
index 08574788f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileManager.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.useractions.files.compile;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.compile.ISystemCompileCommandSubstitutor;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemDefaultCompileCommands;
-
-/**
- * Specializatio of compile support for universal file subsystems.
- */
-public class UniversalCompileManager extends SystemCompileManager {
- /**
- * Constructor for UniversalCompileManager.
- */
- public UniversalCompileManager() {
- super();
- }
-
- /**
- * Overridable method to instantiate the SystemCompileProfile for the
- * given system profile.
- * <p>
- * We return an instance of UniversalCompileProfile
- */
- protected SystemCompileProfile createCompileProfile(ISystemProfile profile) {
- return new UniversalCompileProfile(this, profile.getName());
- }
-
- /**
- * Return the default list of compile commands to prime new documents with.
- */
- public SystemDefaultCompileCommands getDefaultCompileCommands() {
- return UniversalIBMCompileCommands.getIBMCompileCommands();
- }
-
- /**
- * For support of the Work With Compile Commands dialog.
- * <p>
- * Return the substitution variables supported by compile commands managed by this manager.
- */
- public SystemCmdSubstVarList getSubstitutionVariableList() {
- return UniversalCompileSubstList.getInstance();
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager#createSubstitutor(IHost)
- */
- protected ISystemCompileCommandSubstitutor createSubstitutor(IHost connection) {
- return new UniversalCompileSubstitutor(connection);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileProfile.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileProfile.java
deleted file mode 100644
index 08380ec43..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileProfile.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.useractions.files.compile;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompilableSource;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
-import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Specialization of the compile profile class, uniquely for the compile support of files from
- * a universal file subsystem.
- */
-public class UniversalCompileProfile extends SystemCompileProfile {
- /**
- * Constructor for UniversalCompileProfile.
- * @param manager SystemCompileManager of this compile file
- * @param profileName System profile name
- */
- public UniversalCompileProfile(SystemCompileManager manager, String profileName) {
- super(manager, profileName);
- }
-
- /**
- * When the time comes to actually run a compile command against a selected source object,
- * this method is called to return the instance of SystemCompilableSource to do that.
- * <p>
- * This method must be implemented to return an instance of your subclass of SystemCompilableSource.
- */
- public SystemCompilableSource getCompilableSourceObject(Shell shell, Object selectedObject, SystemCompileCommand compileCmd, boolean isPrompt, Viewer viewer) {
- UniversalCompilableSource compilableSrc = new UniversalCompilableSource(shell, selectedObject, compileCmd, isPrompt, viewer);
- return compilableSrc;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java
deleted file mode 100644
index 6cf8786e3..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstList.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [177523] Unify singleton getter methods
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.files.compile;
-
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-
-/**
- * Encapsulation of the compile command substitution variables for universal files.
- */
-public class UniversalCompileSubstList extends SystemCmdSubstVarList {
- private static final String[] UNIVERSAL_FILES_VARNAMES = { "system_filesep", //$NON-NLS-1$
- "system_homedir", //$NON-NLS-1$
- "system_pathsep", //$NON-NLS-1$
- "system_tempdir", //$NON-NLS-1$
- "resource_name", //$NON-NLS-1$
- "resource_name_root", //$NON-NLS-1$
- "resource_path", //$NON-NLS-1$
- "resource_path_root", //$NON-NLS-1$
- "resource_path_drive", //$NON-NLS-1$
- "container_name", //$NON-NLS-1$
- "container_path" //$NON-NLS-1$
- };
- private static final String[] UNIVERSAL_FILES_DESCRIPTIONS = { SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_SYSTEM_FILESEP, SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_SYSTEM_HOMEDIR,
- SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_SYSTEM_PATHSEP, SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_SYSTEM_TEMPDIR, SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME,
- SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME_ROOT, SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH,
- SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH_ROOT, SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH_DRIVE,
- SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_CONTAINER_NAME, SystemUDAResources.RESID_COMPILE_FILES_SUBVAR_CONTAINER_PATH };
- private static UniversalCompileSubstList inst = null;
-
- /**
- * Constructor .
- * Not to be used directly. Rather, use {@link #getInstance()}.
- */
- UniversalCompileSubstList() {
- super(UNIVERSAL_FILES_VARNAMES, UNIVERSAL_FILES_DESCRIPTIONS);
- }
-
- /**
- * Return the singleton of this object. No need ever for more than one instance
- */
- public static UniversalCompileSubstList getInstance() {
- if (inst == null) inst = new UniversalCompileSubstList();
- return inst;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstitutor.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstitutor.java
deleted file mode 100644
index 368761748..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalCompileSubstitutor.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.files.compile;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.useractions.ui.compile.ISystemCompileCommandSubstitutor;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-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.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-/**
- * This class is responsible for doing variable substitution for iSeries compile
- * commands
- */
-public class UniversalCompileSubstitutor implements ISystemCompileCommandSubstitutor {
- private IHost connection;
-
- /**
- * Constructor for UniversalCompileSubstitutor.
- */
- public UniversalCompileSubstitutor(IHost connection) {
- super();
- this.connection = connection;
- }
-
- /**
- * Reset the connection so one instance can be re-used
- */
- public void setConnection(IHost connection) {
- this.connection = connection;
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.ISystemSubstitutor#getSubstitutionValue(String, Object)
- */
- public String getSubstitutionValue(String substitutionVariable, Object context) {
- //private static final String[] UNIVERSAL_FILES_VARNAMES =
- //{"system_filesep", "system_homedir", "system_pathsep", "system_tempdir",
- // "user_id", "resource_name", "resource_path", "resource_path_root", "resource_path_drive", "container_name", "container_path"};
- if (substitutionVariable.equals("${system_filesep}")) //$NON-NLS-1$
- return getFileSeparator();
- else if (substitutionVariable.equals("${system_homedir}")) //$NON-NLS-1$
- return getHomeDirectory();
- else if (substitutionVariable.equals("${system_pathsep}")) //$NON-NLS-1$
- return getPathSeparator();
- else if (substitutionVariable.equals("${system_tempdir}")) //$NON-NLS-1$
- return getTempDirectory();
- else if (substitutionVariable.equals("${user_id}")) //$NON-NLS-1$
- return getUserId();
- else if (substitutionVariable.equals("${resource_name}")) //$NON-NLS-1$
- return getResourceName(context);
- else if (substitutionVariable.equals("${resource_name_root}")) //$NON-NLS-1$
- return getResourceNameRoot(context);
- else if (substitutionVariable.equals("${resource_path}")) //$NON-NLS-1$
- return getResourcePath(context);
- else if (substitutionVariable.equals("${resource_path_root}")) //$NON-NLS-1$
- return getPathRoot(context);
- else if (substitutionVariable.equals("${resource_path_drive}")) //$NON-NLS-1$
- return getPathDrive(context);
- else if (substitutionVariable.equals("${container_name}")) //$NON-NLS-1$
- return getContainerName(context);
- else if (substitutionVariable.equals("${container_path}")) //$NON-NLS-1$
- return getContainerPath(context);
- return null;
- }
-
- /**
- * Get the command subsystem
- */
- protected IRemoteCmdSubSystem getCmdsSubSystem() {
- return RemoteCommandHelpers.getCmdSubSystem(connection);
- }
-
- /**
- * Get the files subsystem
- */
- protected IRemoteFileSubSystem getFilesSubSystem() {
- return RemoteFileUtility.getFileSubSystem(connection);
- }
-
- /**
- * Get the files subsystem factory
- */
- protected IRemoteFileSubSystemConfiguration getFilesSubSystemFactory() {
- return RemoteFileUtility.getFileSubSystem(connection).getParentRemoteFileSubSystemConfiguration();
- }
-
- /**
- * Return the file separator for the ${system_filesep} variable
- */
- protected String getFileSeparator() {
- return getFilesSubSystemFactory().getSeparator();
- }
-
- /**
- * Return the path separator for the ${system_pathsep} variable
- */
- protected String getPathSeparator() {
- return getFilesSubSystemFactory().getPathSeparator();
- }
-
- /**
- * Return the user's home directory on the remote system, for the ${system_homedir} variable
- */
- protected String getHomeDirectory() {
- return getCmdsSubSystem().getConnectorService().getHomeDirectory();
- }
-
- /**
- * Return the temporary directory on the remote system, for the ${system_tempdir} variable
- */
- protected String getTempDirectory() {
- return getCmdsSubSystem().getConnectorService().getTempDirectory();
- }
-
- /**
- * Return the user ID used to connect with the remote system, for the ${user_id} variable
- */
- protected String getUserId() {
- return getCmdsSubSystem().getConnectorService().getUserId();
- }
-
- /**
- * Return the name of the currently selected resource, for the ${resource_name} variable
- */
- protected String getResourceName(Object context) {
- return SystemAdapterHelpers.getRemoteAdapter(context).getName(context);
- }
-
- /**
- * Return the root part of the name of the currently selected resource, for the ${resource_name_root} variable
- */
- protected String getResourceNameRoot(Object context) {
- IRemoteFile selectedFile = (IRemoteFile) context;
- String name = selectedFile.getName();
- int dotIdx = name.lastIndexOf('.');
- if (dotIdx == 0)
- return ""; //$NON-NLS-1$
- else if (dotIdx > 0)
- return name.substring(0, dotIdx);
- else
- return name;
- }
-
- /**
- * Return the path of the currently selected resource, for the ${resource_path} variable
- */
- protected String getResourcePath(Object context) {
- return SystemAdapterHelpers.getRemoteAdapter(context).getAbsoluteName(context);
- }
-
- /**
- * Return the root part of the path, for the ${resource_path_root} variable
- */
- protected String getPathRoot(Object context) {
- IRemoteFile selectedFile = (IRemoteFile) context;
- String name = selectedFile.getAbsolutePath();
- if (name != null) {
- if (name.startsWith("/") || name.startsWith("\\")) //$NON-NLS-1$ //$NON-NLS-2$
- return name.substring(0, 1);
- else {
- int idx = name.indexOf(":\\"); //$NON-NLS-1$
- if (idx > 0) return name.substring(0, idx + 2);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return the drive part of the path, for the ${resource_path_drive} variable
- */
- protected String getPathDrive(Object context) {
- IRemoteFile selectedFile = (IRemoteFile) context;
- String name = selectedFile.getAbsolutePath();
- if ((name != null) && (name.length() > 1)) {
- int idx = name.indexOf(':');
- if (idx > 0) return name.substring(0, idx);
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return the name of the parent folder, for the ${container_name} variable
- */
- protected String getContainerName(Object context) {
- IRemoteFile selectedFile = (IRemoteFile) context;
- String fn = selectedFile.getParentName();
- if (fn != null)
- return fn;
- else
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return the path of the parent folder, for the ${container_path} variable
- */
- protected String getContainerPath(Object context) {
- IRemoteFile selectedFile = (IRemoteFile) context;
- String name = selectedFile.getAbsolutePath();
- if ((name != null) && (name.length() > 1)) {
- int idx = name.indexOf(':');
- if (idx > 0) return name.substring(0, idx);
- }
- return ""; //$NON-NLS-1$
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommand.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommand.java
deleted file mode 100644
index 1974d8581..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommand.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.rse.internal.useractions.files.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.compile.SystemDefaultCompileCommand;
-
-/**
- * Specialization of the the SystemDefaultCompileCommand for an IBM-supplied
- * compile command for universal files.
- */
-public class UniversalIBMCompileCommand extends SystemDefaultCompileCommand {
- /**
- * Constructor for UniversalCompileIBMCommand.
- * @param commandLabel label of the command
- * @param commandName name of the command
- */
- public UniversalIBMCompileCommand(String commandLabel, String commandName) {
- super(commandLabel, commandName);
- }
-
- /**
- * Constructor for UniversalCompileIBMCommand.
- * @param commandName name of the command
- */
- public UniversalIBMCompileCommand(String commandName) {
- super(commandName);
- }
-
- /**
- * Constructor that takes a command name and label and the parameters.
- * This avoids you having to call setAdditionalCommandParameters.
- */
- public UniversalIBMCompileCommand(String commandLabel, String commandName, String parameters) {
- super(commandLabel, commandName, parameters);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommands.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommands.java
deleted file mode 100644
index 58ec333b9..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/compile/UniversalIBMCompileCommands.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.rse.internal.useractions.files.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.compile.SystemDefaultCompileCommands;
-
-/**
- * Specialization of the SystemDefaultCompileCommands for the IBM-supplied compile commands
- * for universal files
- */
-public class UniversalIBMCompileCommands extends SystemDefaultCompileCommands {
- private static UniversalIBMCompileCommands ibmCompileCommands;
- // Source types supported
- public static final String TYPE_C = "c"; //$NON-NLS-1$
- public static final String TYPE_CC = "cc"; //$NON-NLS-1$
- public static final String TYPE_CXX = "cxx"; //$NON-NLS-1$
- public static final String TYPE_CPP = "cpp"; //$NON-NLS-1$
- public static final String TYPE_CPP_C = "C"; //$NON-NLS-1$
- public static final String TYPE_CPP_CC = "CC"; //$NON-NLS-1$
- public static final String TYPE_CPP_CXX = "CXX"; //$NON-NLS-1$
- public static final String TYPE_JAVA = "java"; //$NON-NLS-1$
- public static final String[] ALL_IBM_SRC_TYPES = { TYPE_C, TYPE_CPP, TYPE_CC, TYPE_CPP_CC, TYPE_CXX, TYPE_CPP_CXX, TYPE_JAVA };
-
- /**
- * Constructor
- */
- public UniversalIBMCompileCommands() {
- super();
- }
-
- /**
- * Get all IBM supplied compilable source types.
- */
- public String[] getAllDefaultSuppliedSourceTypes() {
- return ALL_IBM_SRC_TYPES;
- }
-
- /**
- * Return the singleton instance of the list of commands IBM recognizes by default
- */
- public static UniversalIBMCompileCommands getIBMCompileCommands() {
- if (ibmCompileCommands == null) {
- ibmCompileCommands = new UniversalIBMCompileCommands();
- UniversalIBMCompileCommand cmd = null;
- cmd = new UniversalIBMCompileCommand("JAVAC", "javac", "-deprecation -classpath . ${resource_name}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- cmd.setSourceTypes(new String[] { TYPE_JAVA });
- ibmCompileCommands.addCommand(cmd);
- cmd = new UniversalIBMCompileCommand("GCC", "gcc", "-c ${resource_name} -o ${resource_name_root}.o"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- cmd.setSourceTypes(new String[] { TYPE_C, TYPE_CC, TYPE_CPP, TYPE_CPP_CC, TYPE_CPP_CXX, TYPE_CXX });
- ibmCompileCommands.addCommand(cmd);
- cmd = new UniversalIBMCompileCommand("CC", "cc", "-c ${resource_name} -o ${resource_name_root}.o"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- cmd.setSourceTypes(new String[] { TYPE_C, TYPE_CC, TYPE_CPP, TYPE_CPP_CC, TYPE_CPP_CXX, TYPE_CXX });
- ibmCompileCommands.addCommand(cmd);
- }
- return ibmCompileCommands;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java
deleted file mode 100644
index f96f61358..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemFiles.java
+++ /dev/null
@@ -1,799 +0,0 @@
-package org.eclipse.rse.internal.useractions.files.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View (cleanup some use action stuff)
- * Kevin Doyle (IBM) - [222830] ArrayIndexOutOfBoundsException on Restore Defaults on Folder User Actions
- * Xuan Chen (IBM) - [246807] [useractions] - Command Command property set from different os and subsystem are all shown as "Compile Commands" in Team view
- *******************************************************************************/
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.UserActionsIcon;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDAConstants;
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDAEditPaneHoster;
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTreeView;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionManager;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDBaseManager;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeEditPane;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeManager;
-import org.eclipse.rse.services.clientserver.FileTypeMatcher;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-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.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * User action subsystem for universal files
- */
-public class UDActionSubsystemFiles extends SystemUDActionSubsystem {
- public static final String NO_EXTENSION_PLACEHOLDER = ".null"; //$NON-NLS-1$
- private static DateFormat dateFormatter;
- // INSTANCE VARIABLES...
- private FileTypeMatcher fileTypeMatcher;
- // CONSTANTS...
- private static final String DOMAINS[] = { "Folder", "File" }; //$NON-NLS-1$ //$NON-NLS-2$
- // Matching name string in the plugin resources (translated)
- //private String DOMAIN_NEWTYPENAME_STRING[] = { RESID_UDT_FILES_DOMAIN_NEWFOLDER, RESID_UDT_FILES_DOMAIN_NEWFILE };
- // index values must match above 2 variables
- public static final int DOMAIN_FOLDER = 0;
- public static final int DOMAIN_FILE = 1;
- protected static final String FILE_ACTIONS[][] = // todo!
- // name, refresh, singleSel, collect, types, cmd
- { { "java", "false", "true", "false", "CLASS", "java ${resource_name_root}" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- { "javac", "true", "false", "true", "JAVA", "javac -deprecation -classpath . ${resource_name}" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- { "jar", "true", "false", "true", "ALL", "jar -cvf classes.jar ${resource_name}" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- { "unjar", "false", "true", "false", "JAR ZIP", "jar -xf ${resource_name}" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- { "gmake", "true", "false", "false", "GNU_MAKEFILE", "gmake -f ${resource_name}" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- { "make", "true", "false", "false", "MAKEFILE", "make -f ${resource_name}" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- // I have decided against the following in favor of allowing these to be expanded in the tree view. Phil
- //{"list", "false", "true", "false", "JAR ZIP", "jar tf ${resource_name}"},
- };
- protected static final String FOLDER_ACTIONS[][] =
- // name, refresh, singleSel, collect, cmd
- { { "javac", "true", "false", "true", "javac -deprecation -classpath . *.java" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- { "jar", "true", "false", "true", "jar cvf classes.jar *.class" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- };
- protected static final String IBM_DEFAULT_FOLDERTYPES[][] = { // name, types
- { "ALL", "*" }, //$NON-NLS-1$ //$NON-NLS-2$
- };
- protected static final String IBM_DEFAULT_FILETYPES[][] = { // name, types
- { "ALL", "*" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "C", "c,h,i" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "C_COMPILABLE", "c" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "CPP", "cpp,cxx,hpp,ipp" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "CPP_COMPILABLE", "cpp,cxx" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "CLASS", "class" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "CSS", "css" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "EAR", "ear" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "EXE", "exe,bat,cmd" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "GRAPHIC", "bmp,gif,jpg" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "GNU_MAKEFILE", "GNUMakefile" + NO_EXTENSION_PLACEHOLDER }, //$NON-NLS-1$ //$NON-NLS-2$
- { "HTML", "htm, html" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "JAVA", "java" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "JAVASCRIPT", "js" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "JAR", "jar" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "JARZIP", "jar,zip" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "JSP", "jsp" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "MAKEFILE", "makefile" + NO_EXTENSION_PLACEHOLDER + ", mak" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- { "NONE", "null" }, // our own invention! //$NON-NLS-1$ //$NON-NLS-2$
- { "PERL", "pl" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "PROFILE", "profile" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "PYTHON", "py" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "SHELL ", "csh, ksh, sh" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "SQLJ", "sqlj" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "WAR", "war" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "WEB", "css, htm, html, js, jsp" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "TAR", "tar" }, //$NON-NLS-1$ //$NON-NLS-2$
- { "ZIP", "zip" }, //$NON-NLS-1$ //$NON-NLS-2$
- };
- protected String[] DOMAIN_NAME_STRING = new String[2];
- protected String[] DOMAIN_NEWNAME_STRING = new String[2];
-
- /**
- * Constructor
- */
- public UDActionSubsystemFiles() {
- super();
- DOMAIN_NAME_STRING[0] = SystemUDAResources.RESID_UDA_FILES_DOMAIN_FOLDER;
- DOMAIN_NAME_STRING[1] = SystemUDAResources.RESID_UDA_FILES_DOMAIN_FILE;
- DOMAIN_NEWNAME_STRING[0] = SystemUDAResources.RESID_UDA_FILES_DOMAIN_NEWFOLDER;
- DOMAIN_NEWNAME_STRING[1] = SystemUDAResources.RESID_UDA_FILES_DOMAIN_NEWFILE;
- }
-
- /**
- * Overridable extension point for child classes to do migration of their actions.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done... we return false
- */
- protected boolean doActionsMigration(ISystemProfile profile, String oldRelease) {
- return false;
- }
-
- /**
- * Overridable extension point for child classes to do migration of their types.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done... we return false
- */
- protected boolean doTypesMigration(ISystemProfile profile, String oldRelease) {
- return false;
- }
-
- /**
- * Required override of parent for doing substitutions for our unique variables.
- */
- public String internalGetSubstitutionValue(SystemUDActionElement currentAction, String subvar, Object selectedObject) {
- return getUniversalSubstitutionValue(currentAction, subvar, selectedObject);
- }
-
- /**
- * Required override of parent for doing substitutions for our unique variables.
- */
- public static String getUniversalSubstitutionValue(SystemUDActionElement currentAction, String subvar, Object selectedObject) {
- /* from resource property file...
- Common to files and folders:
- ...uda.files.subvar.resource_date = Last modified date of selected resource
- ...uda.files.subvar.resource_name = Name of selected resource, unqualified
- ...uda.files.subvar.resource_path = Path of selected resource, including name
- ...uda.files.subvar.resource_path_root=Root of selected file's path. "c:\\" on Windows, or "/" on others
- ...uda.files.subvar.resource_path_drive=Drive letter on Windows, empty string on others
- ...uda.files.subvar.container_name=Name of folder containing selected resource, unqualified
- ...uda.files.subvar.container_path=Path of folder containing selected resource, including name
- // note: resource_name and resource_path handled for us in parent class!
- File specific:
- ...uda.files.subvar.resource_name_root=Name of selected resource without the extension
- ...uda.files.subvar.resource_name_ext=Extension part of the name of the selected resource
- */
- IRemoteFile selectedFile = (IRemoteFile) selectedObject;
- if (subvar.equals("${resource_date}")) //$NON-NLS-1$
- {
- if (dateFormatter == null) dateFormatter = new SimpleDateFormat("yyyy.MM.dd hh:mm:ss z"); //new SimpleDateFormat(); //$NON-NLS-1$
- Date lmd = selectedFile.getLastModifiedDate();
- if (lmd != null)
- return dateFormatter.format(lmd);
- else
- return "not available"; //$NON-NLS-1$
- } else if (subvar.equals("${resource_name_root}")) //$NON-NLS-1$
- {
- String name = selectedFile.getName();
- int dotIdx = name.lastIndexOf('.');
- if (dotIdx == 0)
- return ""; //$NON-NLS-1$
- else if (dotIdx > 0)
- return name.substring(0, dotIdx);
- else
- return name;
- } else if (subvar.equals("${resource_name_ext}")) //$NON-NLS-1$
- {
- String name = selectedFile.getName();
- int dotIdx = name.lastIndexOf('.');
- if (dotIdx == 0) {
- if (name.length() == 1)
- return ""; //$NON-NLS-1$
- else
- return name.substring(1);
- } else if (dotIdx > 0)
- return name.substring(dotIdx + 1);
- else
- return ""; //$NON-NLS-1$
- }
- /*
- else if (subvar.equals("${path}"))
- {
- String p = selectedFile.getParentNoRoot();
- if (p != null)
- return p;
- else
- return "";
- }
- */
- else if (subvar.equals("${container_name}")) //$NON-NLS-1$
- {
- // another example where the info can't be trusted!
- /*
- String fn = selectedFile.getParentName();
- if (fn != null)
- return fn;
- else
- return "";
- */
- String fullpath = selectedFile.getParentPath();
- if ((fullpath == null) || (fullpath.length() == 0)) return ""; //$NON-NLS-1$
- IRemoteFileSubSystem rfss = getFileSubSystem(selectedObject);
- if (rfss == null) return ""; //$NON-NLS-1$
- char sep = rfss.getParentRemoteFileSubSystemConfiguration().getSeparatorChar();
- int idx = fullpath.lastIndexOf(sep);
- if (idx >= 0)
- return fullpath.substring(idx + 1);
- else
- return ""; //$NON-NLS-1$
- } else if (subvar.equals("${container_path}")) //$NON-NLS-1$
- return selectedFile.getParentPath();
- else if (subvar.equals("${resource_path_root}")) //$NON-NLS-1$
- {
- String name = selectedFile.getAbsolutePath();
- if (name != null) {
- if (name.startsWith("/") || name.startsWith("\\")) //$NON-NLS-1$ //$NON-NLS-2$
- return name.substring(0, 1);
- else {
- int idx = name.indexOf(":\\"); //$NON-NLS-1$
- if (idx > 0) return name.substring(0, idx + 2);
- }
- }
- return ""; //$NON-NLS-1$
- } else if (subvar.equals("${resource_path_drive}")) //$NON-NLS-1$
- {
- //String root = selectedFile.getRoot();
- String name = selectedFile.getAbsolutePath();
- if ((name != null) && (name.length() > 1)) {
- int idx = name.indexOf(':');
- if (idx > 0) return name.substring(0, idx);
- }
- return ""; //$NON-NLS-1$
- }
- /* now handled in common base class
- else if (subvar.equals("${system_pathsep}"))
- return selectedFile.getSeparator();
- */
- return null; // return null to tell parent we didn't do any substitutions!
- }
-
- /**
- * Get the delimiter used to delimiter the types in a type string.
- * Default is " "
- */
- protected String getTypesDelimiter() {
- return ","; //$NON-NLS-1$
- }
-
- /**
- * After an action's command has been resolved (vars substituted) this method
- * is called to actually do the remote command execution
- * <p>
- * Run the user action's command in the default shell, and
- * log result in the command view.
- *
- * @param shell - the shell to use if need to prompt for password or show msg dialog
- * @param action - the action being processed, in case attributes of it need to be queried
- * @param cmdString - the resolved command
- * @param cmdSubSystem - this connection's command subsystem, which will run the command
- * @param context - the selected IRemoteFile object
- * @param viewer the viewer that originated the compile action
- * @return true if we should continue, false if something went wrong
- */
- protected boolean runCommand(Shell shell, SystemUDActionElement action, String cmdString, IRemoteCmdSubSystem cmdSubSystem, Object context, Viewer viewer) {
- return runUniversalCommand(shell, cmdString, cmdSubSystem, context);
- }
-
- /**
- * Encapsulation of code needed to run a universal subsystem command.
- *
- * @param shell - the shell to use if need to prompt for password or show msg dialog
- * @param cmdString - the resolved command
- * @param cmdSubSystem - this connection's command subsystem, which will run the command
- * @param context - the selected IRemoteFile object
- * @return true if we should continue, false if something went wrong
- */
- public static boolean runUniversalCommand(Shell shell, String cmdString, IRemoteCmdSubSystem cmdSubSystem, Object context) {
- String path = RemoteCommandHelpers.getWorkingDirectory((IRemoteFile) context);
- boolean ok = RemoteCommandHelpers.runUniversalCommand(shell, cmdString, path, cmdSubSystem);
- return ok;
- } // end method
-
- // -----------------------------------------------
- // OVERRIDDEN METHODS FOR CAPABILITY DEFINITION
- // -----------------------------------------------
- /**
- * Return true if actions can be scoped by file types
- * The iSeries native file system does support types
- */
- public boolean supportsTypes() {
- return true;
- }
-
- /**
- * Return true if actions can be scoped by file types for the given domain.
- * Default is supportsTypes()
- */
- public boolean supportsTypes(int domain) {
- if (domain == DOMAIN_FOLDER)
- return false;
- else
- return true;
- }
-
- /**
- * Return true if the action/type manager supports domains.
- * The iSeries native file system does support domains
- */
- public boolean supportsDomains() {
- return true;
- }
-
- /**
- * In some cases, we supports domains in general, but only want to expose
- * one of those domains to the user. For example, for file subsystems,
- * we support folder and file domains, but for named types we really only
- * support the file domain.
- * <p>
- * We return DOMAIN_FILE if the docManager is the type manager
- */
- public int getSingleDomain(SystemUDBaseManager docManager) {
- if (docManager != getUDTypeManager())
- return -1;
- else
- return DOMAIN_FILE;
- }
-
- // --------------------
- // VARIOUS OVERRIDES...
- // --------------------
- /**
- * Subclasses may override to provide a custom type edit pane subclass
- */
- public SystemUDTypeEditPane getCustomUDTypeEditPane(ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- return new UDTypesEditPaneFiles(this, parent, tv);
- }
-
- /**
- * Prime new document with default types. This adds all the types that common across all system types,
- * but also allows unique types to be added per system by calling primeAdditionalDefaultUniversalTypes,
- * which is a method that subclasses can override.
- * <p>
- * Do no override this method, but instead override primeAdditionalDefaultUniversalTypes.
- */
- public SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager typeMgr) {
- Vector v = new Vector();
- primeDefaultUniversalTypes(typeMgr, v);
- // give subclasses a chance...
- primeAdditionalDefaultUniversalTypes(typeMgr, v);
- // convert vector to array
- SystemUDTypeElement[] typesArray = new SystemUDTypeElement[v.size()];
- for (int idx = 0; idx < typesArray.length; idx++)
- typesArray[idx] = (SystemUDTypeElement) v.elementAt(idx);
- return typesArray;
- }
-
- /**
- * Static version of primeDefaultTypes that is called by the iSeries IFS action subsystem.
- * @param typeMgr - the manager of the types document to be primed
- * @param vectorOfTypes - the vector to populate with types. Can be null, in which case the results are returned as an array
- * @return null if given a vector (it is populated), else the array of default types
- */
- public static SystemUDTypeElement[] primeDefaultUniversalTypes(SystemUDTypeManager typeMgr, Vector vectorOfTypes) {
- Vector v = vectorOfTypes;
- if (v == null) v = new Vector();
- for (int i = 0; i < IBM_DEFAULT_FOLDERTYPES.length; i++) {
- SystemUDTypeElement ft = typeMgr.addType(DOMAIN_FOLDER, IBM_DEFAULT_FOLDERTYPES[i][0]);
- if (null == ft) continue;
- v.addElement(ft);
- ft.setTypes(IBM_DEFAULT_FOLDERTYPES[i][1]);
- }
- for (int i = 0; i < IBM_DEFAULT_FILETYPES.length; i++) {
- SystemUDTypeElement ft = typeMgr.addType(DOMAIN_FILE, IBM_DEFAULT_FILETYPES[i][0]);
- if (null == ft) continue;
- v.addElement(ft);
- ft.setTypes(IBM_DEFAULT_FILETYPES[i][1]);
- }
- if (vectorOfTypes != null) return null;
- // convert vector to array
- SystemUDTypeElement[] typesArray = new SystemUDTypeElement[v.size()];
- for (int idx = 0; idx < typesArray.length; idx++)
- typesArray[idx] = (SystemUDTypeElement) v.elementAt(idx);
- return typesArray;
- }
-
- /**
- * This is an override point for subclasses to add system-specify default types.
- * <p>
- * To simplify processing, subclasses should add their additional SystemUDTypeElement
- * objects to the given vector.
- */
- protected void primeAdditionalDefaultUniversalTypes(SystemUDTypeManager typeMgr, Vector vectorOfTypes) {
- }
-
- /**
- * Prime new document with default action. This adds all the actions that common across all system types,
- * but also allows unique actions to be added per system by calling primeAdditionalDefaultUniversalActions,
- * which is a method that subclasses can override.
- * <p>
- * Do no override this method, but instead override primeAdditionalDefaultUniversalActions.
- */
- public SystemUDActionElement[] primeDefaultActions(SystemUDActionManager actionMgr, ISystemProfile profile) {
- Vector v = new Vector();
- primeDefaultUniversalActions(actionMgr, profile, v);
- // give subclasses a chance...
- primeAdditionalDefaultUniversalActions(actionMgr, profile, v);
- // convert vector to array
- SystemUDActionElement[] actionArray = new SystemUDActionElement[v.size()];
- for (int idx = 0; idx < actionArray.length; idx++)
- actionArray[idx] = (SystemUDActionElement) v.elementAt(idx);
- return actionArray;
- }
-
- /**
- * Static version of primeDefaultActions that is called by the iSeries IFS action subsystem.
- * @param actionMgr - the manager of the actions document to be primed
- * @param vectorOfActions - the vector to populate with actions. Can be null, in which case the results are returned as an array
- * @return null if given a vector (it is populated), else the array of default actions
- */
- public static SystemUDActionElement[] primeDefaultUniversalActions(SystemUDActionManager actionMgr, ISystemProfile profile, Vector vectorOfActions) {
- Vector v = vectorOfActions;
- if (v == null) v = new Vector();
- String osType = actionMgr.getActionSubSystem().getOSType();
- String userDefinedActionPropertySetName = ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX + osType + "." + actionMgr.getDocumentRootTagName(); //$NON-NLS-1$
- IPropertySet userDefinedActionPropertySet = profile.getPropertySet(userDefinedActionPropertySetName);
- if (null == userDefinedActionPropertySet)
- {
- userDefinedActionPropertySet = profile.createPropertySet(userDefinedActionPropertySetName);
- userDefinedActionPropertySet.addProperty(ISystemUDAConstants.NAME_ATTR, ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_Name + " - " + osType); //$NON-NLS-1$
- userDefinedActionPropertySet.addProperty(ISystemUDAConstants.RELEASE_ATTR, ISystemUDAConstants.RELEASE_VALUE);
- userDefinedActionPropertySet.addProperty(ISystemUDAConstants.UDA_ROOT_ATTR, actionMgr.getDocumentRootTagName());
- }
- // add file actions
- int domain = DOMAIN_FILE;
- SystemUDActionElement newAction;
- //IPropertySet domainFilePropertySet = userDefinedActionPropertySet.createPropertySet(DOMAINS[1]);
- for (int idx = 0; idx < FILE_ACTIONS.length; idx++) {
- newAction = actionMgr.addAction(profile, FILE_ACTIONS[idx][0], domain);
- v.addElement(newAction);
- newAction.setCommand(FILE_ACTIONS[idx][5]);
- newAction.setPrompt(true); // may as well always allow users chance to change command as its submitted
- newAction.setRefresh(FILE_ACTIONS[idx][1].equals("true")); //$NON-NLS-1$
- newAction.setShow(true);
- newAction.setSingleSelection(FILE_ACTIONS[idx][2].equals("true")); //$NON-NLS-1$
- newAction.setCollect(FILE_ACTIONS[idx][3].equals("true")); //$NON-NLS-1$
- newAction.setFileTypes(convertStringToArray(FILE_ACTIONS[idx][4]));
- }
- // add folder actions
- domain = DOMAIN_FOLDER;
- for (int idx = 0; idx < FOLDER_ACTIONS.length; idx++) {
- newAction = actionMgr.addAction(profile, FOLDER_ACTIONS[idx][0], domain);
- v.addElement(newAction);
- newAction.setCommand(FOLDER_ACTIONS[idx][4]);
- newAction.setPrompt(true); // may as well always allow users chance to change command as its submitted
- newAction.setRefresh(FOLDER_ACTIONS[idx][1].equals("true")); //$NON-NLS-1$
- newAction.setShow(true);
- newAction.setSingleSelection(FOLDER_ACTIONS[idx][2].equals("true")); //$NON-NLS-1$
- newAction.setCollect(FOLDER_ACTIONS[idx][3].equals("true")); //$NON-NLS-1$
- newAction.setFileTypes(new String[] { "ALL" }); //$NON-NLS-1$
- }
- if (vectorOfActions != null) return null;
- // convert vector to array...
- SystemUDActionElement[] actionArray = new SystemUDActionElement[v.size()];
- for (int idx = 0; idx < actionArray.length; idx++)
- actionArray[idx] = (SystemUDActionElement) v.elementAt(idx);
- return actionArray;
- }
-
- /**
- * This is an override point for subclasses to add system-specify default actions.
- * <p>
- * To simplify processing, subclasses should add their additional SystemUDActionElement
- * objects to the given vector.
- */
- protected void primeAdditionalDefaultUniversalActions(SystemUDActionManager actionMgr, ISystemProfile profile, Vector vectorOfActions) {
- }
-
- /**
- * Given this IBM-supplied named type, restore it to its IBM-supplied state
- * @return true if all went well, false if it wasn't restore for some reason
- */
- public boolean restoreDefaultType(SystemUDTypeElement element, int domain, String typeName) {
- boolean ok = restoreUniversalDefaultType(element, domain, typeName);
- if (!ok) ok = restoreAdditionalDefaultType(element, domain, typeName);
- return ok;
- }
-
- /**
- * Given this IBM-supplied named type, restore it to its IBM-supplied state.
- * This concrete method tests the commonly supplied universal types.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- public static boolean restoreUniversalDefaultType(SystemUDTypeElement element, int domain, String typeName) {
- boolean ok = false;
- String[][] typesArray = IBM_DEFAULT_FILETYPES;
- if (domain == DOMAIN_FOLDER) // no IBM types for folder.
- typesArray = IBM_DEFAULT_FOLDERTYPES;
- // first test the universal types...
- int match = -1;
- for (int idx = 0; (match == -1) && (idx < typesArray.length); idx++) {
- if (typeName.equals(typesArray[idx][0])) match = idx;
- }
- if (match != -1) {
- element.setName(typesArray[match][0]);
- element.setTypes(typesArray[match][1]);
- ok = true;
- }
- return ok;
- }
-
- /**
- * Given this IBM-supplied named type, restore it to its IBM-supplied state.
- * This abstract method is for the subclasses.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- protected boolean restoreAdditionalDefaultType(SystemUDTypeElement element, int domain, String typeName) {
- return false;
- }
-
- /**
- * Given this IBM-supplied named action, restore it to its IBM-supplied state
- * @return true if all went well, false if it wasn't restore for some reason
- */
- public boolean restoreDefaultAction(SystemUDActionElement element, int domain, String typeName) {
- boolean ok = restoreUniversalDefaultAction(element, domain, typeName);
- if (!ok) ok = restoreAdditionalDefaultAction(element, domain, typeName);
- return ok;
- }
-
- /**
- * Given this IBM-supplied named action, restore it to its IBM-supplied state.
- * This concrete method tests the commonly supplied universal actions.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- public static boolean restoreUniversalDefaultAction(SystemUDActionElement element, int domain, String actionName) {
- boolean ok = false;
- String[][] actionsArray = FILE_ACTIONS;
- if (domain == DOMAIN_FOLDER) // no IBM types for folder.
- actionsArray = FOLDER_ACTIONS;
- // first test the universal types...
- int match = -1;
- for (int idx = 0; (match == -1) && (idx < actionsArray.length); idx++) {
- if (actionName.equals(actionsArray[idx][0])) match = idx;
- }
- if (match != -1) {
- element.setName(actionsArray[match][0]);
- element.setPrompt(true); // may as well always allow users chance to change command as its submitted
- element.setRefresh(actionsArray[match][1].equals("true")); //$NON-NLS-1$
- element.setShow(true);
- element.setSingleSelection(actionsArray[match][2].equals("true")); //$NON-NLS-1$
- element.setCollect(actionsArray[match][3].equals("true")); //$NON-NLS-1$
- if (domain == DOMAIN_FOLDER) {
- element.setFileTypes(new String[] { "ALL" }); //$NON-NLS-1$
- element.setCommand(actionsArray[match][4]);
- } else {
- element.setFileTypes(convertStringToArray(actionsArray[match][4]));
- element.setCommand(actionsArray[match][5]);
- }
- ok = true;
- }
- return ok;
- }
-
- /**
- * Given this IBM-supplied named action, restore it to its IBM-supplied state.
- * This abstract method is for the subclasses.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- protected boolean restoreAdditionalDefaultAction(SystemUDActionElement element, int domain, String actionName) {
- return false;
- }
-
- /**
- * Convert space-delimited string into array of strings
- */
- protected static String[] convertStringToArray(String string) {
- StringTokenizer tokens = new StringTokenizer(string);
- Vector v = new Vector();
- while (tokens.hasMoreTokens()) {
- v.addElement(tokens.nextToken());
- }
- String[] strings = new String[v.size()];
- for (int idx = 0; idx < strings.length; idx++)
- strings[idx] = (String) v.elementAt(idx);
- return strings;
- }
-
- /**
- * We disable user defined actions if we are in work-offline mode.
- * Currently, how we determine this is dependent on the subsystem factory.
- */
- public boolean getWorkingOfflineMode() {
- return false; // todo: change this when offline mode is supported for universal!
- }
-
- /**
- * Return the list of substitution variables for the given domain type.
- * Called from edit pane in work with dialog.
- * This must be overridden!
- */
- public SystemCmdSubstVarList getActionSubstVarList(int actionDomainType) {
- if (actionDomainType == DOMAIN_FOLDER)
- return UDSubstListFolders.getInstance();
- else if (actionDomainType == DOMAIN_FILE)
- return UDSubstListFiles.getInstance();
- else
- return null;
- }
-
- /**
- * Given an action, and the currently selected remote objects, and the domain of those,
- * return true if ALL of the selected remote objects matches any of the type criteria
- * for this action
- * <p>
- * Override of parent
- */
- protected boolean meetsSelection(SystemUDActionElement action, IStructuredSelection selection, int domainType) {
- if (domainType == DOMAIN_FOLDER) return true; // no point in further testing because our getDomainFromSelection method already did this
- String unresolvedActionTypes[] = action.getFileTypes();
- // fastpath for "ALL"!
- if ((unresolvedActionTypes == null) || (unresolvedActionTypes.length == 0))
- return true; // what else to do?
- else if (unresolvedActionTypes[0].equals("ALL")) //$NON-NLS-1$
- return true;
- // flatten types
- String[] actionTypes = resolveTypes(unresolvedActionTypes, domainType);
- // create file type matcher
- fileTypeMatcher = null;
- if (domainType == DOMAIN_FILE) {
- if (fileTypeMatcher == null) fileTypeMatcher = new FileTypeMatcher(null, getSubsystem().getSubSystemConfiguration().isCaseSensitive());
- fileTypeMatcher.setTypesAndNames(actionTypes);
- }
- Iterator elements = selection.iterator();
- Object element = null;
- while (elements.hasNext()) {
- element = elements.next();
- IRemoteFile file = (IRemoteFile) element;
- // OK if matches any one of the file types for an action
- boolean foundMatch = false;
- if (domainType == DOMAIN_FOLDER) {
- if (file.isDirectory()) foundMatch = true;
- } else {
- if (fileTypeMatcher.matches(file.getName())) foundMatch = true;
- }
- if (!foundMatch) return false;
- }
- return true;
- }
-
- /**
- * Parent override.
- * <p>
- * Compares a particular file type (not named, but actual scalar/generic type)
- * to a specific user-selected remote object.
- * Returns true if the object's information matches that of the given type
- * <p>
- * BECAUSE WE OVERRRIDE meetsSelection, THIS METHOD IS NEVER CALLED FOR US!
- *
- * @param actionType - an unnamed file type, as in "*.cpp"
- * @param selectedObject - one of the currently selected remote objects
- * @param domainType - integer representation of current domain
- */
- protected boolean isMatch(Object actionType, Object selectedObject, int domainType) {
- return true;
- }
-
- // -----------------------------------------------
- // OVERRIDDEN METHODS RELATED TO DOMAIN SUPPORT...
- // -----------------------------------------------
- /**
- * Parent override.
- * Determine domain, given the selection.
- * Eg subsystem that supports domains has to do this via overriding this method.
- * If domains not supported, return -1.
- */
- protected int getDomainFromSelection(IStructuredSelection selection) {
- int domain = -1;
- Iterator elements = selection.iterator();
- if (elements.hasNext()) {
- IRemoteFile currFile = (IRemoteFile) elements.next();
- if (currFile.isDirectory())
- domain = DOMAIN_FOLDER;
- else
- domain = DOMAIN_FILE;
- }
- return domain;
- }
-
- /**
- * Parent override.
- * For efficiency reasons, internally we use an integer to represent a domain.
- * However, that has to be mapped to a name which is actually what is stored as the
- * "type" attribute for the xml domain node.
- * This returns the maximum integer number supported by this action/type manager.
- * Returns 1 for us.
- */
- public int getMaximumDomain() {
- return 1;
- }
-
- /**
- * Get the list of untranslated domain names
- */
- public String[] getDomainNames() {
- return DOMAINS;
- }
-
- /**
- * Get the list of translated domain names
- */
- public String[] getXlatedDomainNames() {
- return DOMAIN_NAME_STRING;
- }
-
- /**
- * Get the list of translated domain names for the tree view's "New" nodes
- */
- public String[] getXlatedDomainNewNames() {
- return DOMAIN_NEWNAME_STRING;
- }
-
- /**
- * Get the list of translated domain names for "new" nodes in tree view, for the WW Named Types dialog
- */
- public String[] getXlatedDomainNewTypeNames() {
- return DOMAIN_NEWNAME_STRING;
- //return DOMAIN_NEWTYPENAME_STRING; // SHOULD NEVER BE CALLED
- }
-
- /**
- * Get the domain icon to show in the tree views
- */
- public Image getDomainImage(int domain) {
- if (domain == DOMAIN_FOLDER)
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_FOLDER_ID);
- //return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- else if (domain == DOMAIN_FILE)
- //return RSEUIPlugin.getDefault().getImage(ISystemConstants.ICON_SYSTEM_FILE_ID);
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
- return null;
- }
-
- /**
- * Get the domain icon to show in the tree views, for the new item for this domain
- */
- public Image getDomainNewImage(int domain) {
- if (domain == DOMAIN_FOLDER)
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_NEWFOLDER_ID);
- //return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- else if (domain == DOMAIN_FILE) return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_NEWFILE_ID);
- //return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
- return null;
- }
-
- /**
- * Get the domain icon to show in the named type tree view, for the new item for this domain
- */
- public Image getDomainNewTypeImage(int domain) {
- return UserActionsIcon.USERTYPE_NEW.getImage();
- }
-
- /**
- * Overridable method for child classes to supply the label to display in the
- * "New" node for types. Typically only overriden if domains are not supported, as otherwise
- * the child nodes of "New" have the specific labels.
- * @return translated label for "New named type..."
- */
- protected String getNewNodeTypeLabel() {
- return SystemUDAResources.RESID_UDA_FILES_NEWNODE_LABEL;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemLocalFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemLocalFiles.java
deleted file mode 100644
index b10ef5be4..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemLocalFiles.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.eclipse.rse.internal.useractions.files.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionManager;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeManager;
-
-/**
- * This is a specialization of the universal files user action support, for
- * stuff unique to Local files.
- */
-public class UDActionSubsystemLocalFiles extends UDActionSubsystemFiles {
- /**
- * Constructor for UDActionSubsystemLocalFiles.
- */
- public UDActionSubsystemLocalFiles() {
- super();
- }
-
- /**
- * Parent intercept for adding default pre-defined types that are unique to us.
- */
- protected void primeAdditionalDefaultUniversalTypes(SystemUDTypeManager typeMgr, Vector vectorOfTypes) {
- // I have decided not to include the iSeries unique types as there are user actions I can imagine for them,
- // and they clutter up the namespace for non-iSeries users...
- /*
- // the following contains ONLY those types that are unique to local.
- // for now these are only local copies of remote iSeries members
- final String fileTypes[][] =
- {
- {"CBL_400", "cbl,cblle,lbl,sqlcblle" },
- {"CL_400", "clp,clle,cmd400,icl" },
- {"DDS_400", "dds,dspf,prtf,pf,lf,icff" },
- {"RPG_400", "rpg,rpgle,rpt" },
- };
-
- for (int i = 0; i < fileTypes.length; i++)
- {
- SystemUDTypeElement ft = typeMgr.addType(DOMAIN_FILE, fileTypes[i][0]);
- if (null == ft)
- continue;
- vectorOfTypes.addElement(ft);
- ft.setTypes(fileTypes[i][1]);
- }
- */
- }
-
- /**
- * Parent intercept for adding default pre-defined actions that are unique to us.
- */
- protected void primeAdditionalDefaultUniversalActions(SystemUDActionManager actionMgr, ISystemProfile profile, Vector vectorOfActions) {
- // duplicate the non-iseries types...
- int domain = DOMAIN_FILE;
- SystemUDActionElement newAction;
- for (int idx = 0; idx < UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS.length; idx++) {
- newAction = actionMgr.addAction(profile, UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][0], domain);
- vectorOfActions.addElement(newAction);
- newAction.setCommand(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][5]);
- newAction.setPrompt(true); // may as well always allow users chance to change command as its submitted
- newAction.setRefresh(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][1].equals("true")); //$NON-NLS-1$
- newAction.setShow(true);
- newAction.setSingleSelection(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][2].equals("true")); //$NON-NLS-1$
- newAction.setCollect(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][3].equals("true")); //$NON-NLS-1$
- newAction.setFileTypes(convertStringToArray(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][4]));
- }
- // add actions unique to local...
- }
-
- /**
- * Parent intercept for restoring one of our unique IBM-supplied actions to its original state.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- protected boolean restoreAdditionalDefaultAction(SystemUDActionElement element, int domain, String actionName) {
- boolean ok = false;
- if (domain == DOMAIN_FOLDER) return ok;
- int match = -1;
- for (int idx = 0; (match == -1) && (idx < UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS.length); idx++) {
- if (UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[idx][0].equals(actionName)) match = idx;
- }
- if (match != -1) {
- element.setName(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[match][0]);
- element.setPrompt(true); // may as well always allow users chance to change command as its submitted
- element.setRefresh(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[match][1].equals("true")); //$NON-NLS-1$
- element.setShow(true);
- element.setSingleSelection(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[match][2].equals("true")); //$NON-NLS-1$
- element.setCollect(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[match][3].equals("true")); //$NON-NLS-1$
- element.setFileTypes(convertStringToArray(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[match][4]));
- element.setCommand(UDActionSubsystemUniversalFiles.UNIVERSAL_FILE_ACTIONS[match][5]);
- ok = true;
- }
- return ok;
- }
-
- /**
- * Override of parent method to restore unique type supplied by us, to its original state.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- protected boolean restoreAdditionalDefaultType(SystemUDTypeElement element, int domain, String typeName) {
- return false; // nothing unique
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemUniversalFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemUniversalFiles.java
deleted file mode 100644
index dbf085797..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDActionSubsystemUniversalFiles.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.eclipse.rse.internal.useractions.files.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionManager;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeManager;
-
-/**
- * This is a specialization of the universal files user action support, for
- * stuff unique to non-Local, non-IFS files.
- */
-public class UDActionSubsystemUniversalFiles extends UDActionSubsystemFiles {
- /**
- * Universal non-iseries actions
- */
- protected static final String UNIVERSAL_FILE_ACTIONS[][] =
- // name, refresh, singleSel, collect, types, cmd
- {
- // these probably should be deleted, as these are more appropriate as compile commands
- // {"gcc", "true", "false", "false", "CPP_COMPILABLE C_COMPILABLE","gcc -c ${resource_name} -o ${resource_name_root}.o"},
- // {"cc", "true", "false", "false", "CPP_COMPILABLE C_COMPILABLE","cc -c ${resource_name} -o ${resource_name_root}.o"},
- //{"IBM C", "true", "false", "false", "C_COMPILABLE", "xlc -c -qinfo=all ${resource_name} -o ${resource_name_root}.o"},
- //{"IBM C++","true", "false", "false", "CPP_COMPILABLE", "xlC -c -qinfo=all ${resource_name} -o ${resource_name_root}.o"},
- };
-
- /**
- * Constructor
- */
- public UDActionSubsystemUniversalFiles() {
- super();
- }
-
- /**
- * Parent intercept for adding default pre-defined types that are unique to us.
- */
- protected void primeAdditionalDefaultUniversalTypes(SystemUDTypeManager typeMgr, Vector vectorOfTypes) {
- return; // nothing unique
- }
-
- /**
- * Parent intercept for adding default pre-defined actions that are unique to us.
- */
- protected void primeAdditionalDefaultUniversalActions(SystemUDActionManager actionMgr, ISystemProfile profile, Vector vectorOfActions) {
- // add file actions
- int domain = DOMAIN_FILE;
- SystemUDActionElement newAction;
- for (int idx = 0; idx < UNIVERSAL_FILE_ACTIONS.length; idx++) {
- newAction = actionMgr.addAction(profile, UNIVERSAL_FILE_ACTIONS[idx][0], domain);
- vectorOfActions.addElement(newAction);
- newAction.setCommand(UNIVERSAL_FILE_ACTIONS[idx][5]);
- newAction.setPrompt(true); // may as well always allow users chance to change command as its submitted
- newAction.setRefresh(UNIVERSAL_FILE_ACTIONS[idx][1].equals("true")); //$NON-NLS-1$
- newAction.setShow(true);
- newAction.setSingleSelection(UNIVERSAL_FILE_ACTIONS[idx][2].equals("true")); //$NON-NLS-1$
- newAction.setCollect(UNIVERSAL_FILE_ACTIONS[idx][3].equals("true")); //$NON-NLS-1$
- newAction.setFileTypes(convertStringToArray(UNIVERSAL_FILE_ACTIONS[idx][4]));
- }
- }
-
- /**
- * We disable user defined actions if we are in work-offline mode.
- * Currently, how we determine this is dependent on the subsystem factory.
- */
- public boolean getWorkingOfflineMode() {
- return false; // todo... set to preferences setting when offline mode supported for universal
- }
-
- /**
- * Parent intercept for restoring one of our unique IBM-supplied actions to its original state.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- protected boolean restoreAdditionalDefaultAction(SystemUDActionElement element, int domain, String actionName) {
- boolean ok = false;
- if (domain == DOMAIN_FOLDER) return ok;
- int match = -1;
- for (int idx = 0; (match == -1) && (idx < UNIVERSAL_FILE_ACTIONS.length); idx++) {
- if (UNIVERSAL_FILE_ACTIONS[idx][0].equals(actionName)) match = idx;
- }
- if (match != -1) {
- element.setName(UNIVERSAL_FILE_ACTIONS[match][0]);
- element.setPrompt(true); // may as well always allow users chance to change command as its submitted
- element.setRefresh(UNIVERSAL_FILE_ACTIONS[match][1].equals("true")); //$NON-NLS-1$
- element.setShow(true);
- element.setSingleSelection(UNIVERSAL_FILE_ACTIONS[match][2].equals("true")); //$NON-NLS-1$
- element.setCollect(UNIVERSAL_FILE_ACTIONS[match][3].equals("true")); //$NON-NLS-1$
- element.setFileTypes(convertStringToArray(UNIVERSAL_FILE_ACTIONS[match][4]));
- element.setCommand(UNIVERSAL_FILE_ACTIONS[match][5]);
- ok = true;
- }
- return ok;
- }
-
- /**
- * Override of parent method to restore unique type supplied by us, to its original state.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- protected boolean restoreAdditionalDefaultType(SystemUDTypeElement element, int domain, String typeName) {
- return false; // nothing unique
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java
deleted file mode 100644
index 3e0da128c..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListCommonFiles.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [177523] Unify singleton getter methods
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.files.uda;
-
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDASubstVarListCommon;
-
-/**
- * Encapsulation of the common substitution variables for both folders and files.
- * Superset of overall system common variables.
- */
-public class UDSubstListCommonFiles extends SystemCmdSubstVarList {
- /* from resource property file...
- ...uda.files.subvar.resource_date = Last modified date of selected resource
- ...uda.files.subvar.resource_name = Name of selected resource, unqualified
- ...uda.files.subvar.resource_path = Path of selected resource, including name
- ...uda.files.subvar.resource_path_root=Root of selected file's path. "c:\\" on Windows, or "/" on others
- ...uda.files.subvar.resource_path_drive=Drive letter on Windows, empty string on others
- ...uda.files.subvar.container_name=Name of folder containing selected resource, unqualified
- ...uda.files.subvar.container_path=Path of folder containing selected resource, including name
- */
- private static final String[] COMMON_VARNAMES = { "resource_date", //$NON-NLS-1$
- "resource_name", //$NON-NLS-1$
- "resource_path", //$NON-NLS-1$
- "resource_path_root", //$NON-NLS-1$
- "resource_path_drive", //$NON-NLS-1$
- "container_name", //$NON-NLS-1$
- "container_path" //$NON-NLS-1$
- };
- private static final String[] COMMON_DESCRIPTIONS = { SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_DATE, SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_NAME,
- SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_PATH, SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_PATH_ROOT, SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_PATH_DRIVE,
- SystemUDAResources.RESID_UDA_FILES_SUBVAR_CONTAINER_NAME, SystemUDAResources.RESID_UDA_FILES_SUBVAR_CONTAINER_PATH };
- private static UDSubstListCommonFiles inst = null;
-
- /**
- * Constructor .
- * Not to be used directly. Rather, use {@link #getInstance()}.
- */
- UDSubstListCommonFiles() {
- super(SystemUDASubstVarListCommon.getInstance(), COMMON_VARNAMES, COMMON_DESCRIPTIONS);
- }
-
- /**
- * Return the singleton of this object. No need ever for more than one instance
- */
- public static UDSubstListCommonFiles getInstance() {
- if (inst == null) inst = new UDSubstListCommonFiles();
- return inst;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java
deleted file mode 100644
index a05af1959..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFiles.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [177523] Unify singleton getter methods
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.files.uda;
-
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-
-/**
- * @author coulthar
- *
- * Substitution variables for folders. Superset of common list
- */
-public class UDSubstListFiles extends SystemCmdSubstVarList {
- /* from resource property file...
- ...uda.files.subvar.resource_name_root=Name of selected resource without the extension
- ...uda.files.subvar.resource_name_ext=Extension part of the name of the selected resource
- */
- private static final String[] FILE_VARNAMES = { "resource_name_ext", //$NON-NLS-1$
- "resource_name_root" //$NON-NLS-1$
- };
- private static final String[] DESCRIPTIONS = { SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_NAME_EXT, SystemUDAResources.RESID_UDA_FILES_SUBVAR_RESOURCE_NAME_ROOT };
- private static UDSubstListFiles inst = null;
-
- /**
- * Constructor .
- * Not to be used directly. Rather, use {@link #getInstance()}.
- */
- UDSubstListFiles() {
- super(UDSubstListCommonFiles.getInstance(), FILE_VARNAMES, DESCRIPTIONS);
- testForDuplicates();
- }
-
- /**
- * Return the singleton of this object. No need ever for more than one instance
- */
- public static UDSubstListFiles getInstance() {
- if (inst == null) inst = new UDSubstListFiles();
- return inst;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java
deleted file mode 100644
index 8c05fd0fc..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDSubstListFolders.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [177523] Unify singleton getter methods
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.files.uda;
-
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-
-/**
- * @author coulthar
- *
- * Substitution variables for folders. Superset of common list
- */
-public class UDSubstListFolders extends SystemCmdSubstVarList {
- private static final String[] FOLDER_VARNAMES = {};
- private static final String[] DESCRIPTIONS = {};
- private static UDSubstListFolders inst = null;
-
- /**
- * Constructor .
- * Not to be used directly. Rather, use {@link #getInstance()}.
- */
- UDSubstListFolders() {
- super(UDSubstListCommonFiles.getInstance(), FOLDER_VARNAMES, DESCRIPTIONS);
- testForDuplicates();
- }
-
- /**
- * Return the singleton of this object. No need ever for more than one instance
- */
- public static UDSubstListFolders getInstance() {
- if (inst == null) inst = new UDSubstListFolders();
- return inst;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditPaneFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditPaneFiles.java
deleted file mode 100644
index 7166171b4..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditPaneFiles.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.eclipse.rse.internal.useractions.files.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDAEditPaneHoster;
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTreeView;
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeEditPane;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author coulthar
- *
- * This is a refinement of the generic edit pane for defining
- * new named file types, specifialized for universal files.
- * Specifically, it overrides the editor used to select/specify
- * the individual types that constitute the named type.
- */
-public class UDTypesEditPaneFiles extends SystemUDTypeEditPane {
- /**
- * Constructor for UDTypesEditPaneFiles.
- * @param udaActionSubsys User Defined Action subsystem
- * @param parent any dialog or property page that wants to host a user action edit pane.
- * @param tv User Defined Action tree view
- */
- public UDTypesEditPaneFiles(SystemUDActionSubsystem udaActionSubsys, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- super(udaActionSubsys, parent, tv);
- }
-
- /**
- * Overridable exit point.
- * Return true if the types are to be auto-uppercased.
- * We return false
- */
- protected boolean getAutoUpperCaseTypes() {
- return false;
- }
-
- /**
- * Overridable exit point from parent.
- * Create the edit widgets that will allow the user to see and
- * edit the list of file types that constitute this named type.
- * <p>
- * To better facilitate this, the only requirement is that this
- * "editor" meet the minimal interface
- * {@link org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector}
- * <p>
- * Our implementation is to return an instance of our custom UDDTypesEditorFiles class.
- *
- * @param parent - the parent composite where the widgets are to go
- * @param nbrColumns - the number of columns in the parent composite, which these
- * widgets should span
- * @return a class implementing the required interface
- */
- protected ISystemUDTypeEditPaneTypesSelector createTypesListEditor(Composite parent, int nbrColumns) {
- UDTypesEditorFiles ourEditor = new UDTypesEditorFiles(parent, nbrColumns);
- //ourEditor.setAutoUpperCase(getAutoUpperCaseTypes());
- return ourEditor;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java
deleted file mode 100644
index 9e09517a7..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.files.uda;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-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.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.Label;
-import org.eclipse.swt.widgets.Table;
-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;
-
-/**
- * This class implements the interface needed to supply
- * custom widgets allowing the user to specify the file types
- * for a named file type, in the Work With File Types dialog
- */
-public class UDTypesEditorFiles implements ISystemUDTypeEditPaneTypesSelector, ICheckStateListener {
- public static final String NO_EXTENSION_PLACEHOLDER = UDActionSubsystemFiles.NO_EXTENSION_PLACEHOLDER;
- // gui widgets
- private CheckboxTableViewer typesSelectionList;
- //private Label typesSelectionListVerbage;
- //private Button addTypesButton;
- //private Text definedTypesText;
- private Label definedTypesLabel;
- private Text userDefinedText;
- private Label nonEditableVerbage;
- private Composite typesComposite;
- // state
- private java.util.List inpTypes;
- private IFileEditorMapping[] currentInput;
- private int currentDomain;
- private boolean ignoreModifyEvents = false;
- // constants
- private static final int LIST_HEIGHT = 150;
- private static final int LIST_WIDTH = 50;
- private static final String TYPE_DELIMITER = ","; //GenericMessages.getString("TypesFiltering.typeDelimiter"); //$NON-NLS-1$
- // registered listeners
- private Vector listeners = new Vector();
-
- /**
- * Constructor for UDTypesEditorFiles.
- */
- public UDTypesEditorFiles(Composite comp, int nbrColumns) //, SystemPromptDialog parentDialog)
- {
- super();
- // List of currently selected types if given parent composite has 2 columns
- if (nbrColumns == 2) {
- //definedTypesText =
- // SystemWidgetHelpers.createLabeledTextField(comp, null, rb, RESID_UDT_FILES_DEFINEDTYPES_ROOT);
- definedTypesLabel = SystemWidgetHelpers.createLabeledLabel(comp, SystemUDAResources.RESID_UDT_FILES_DEFINEDTYPES_LABEL, SystemUDAResources.RESID_UDT_FILES_DEFINEDTYPES_TOOLTIP, true);
- }
- nonEditableVerbage = SystemWidgetHelpers.createVerbiage(comp, "", nbrColumns, false, 350); //$NON-NLS-1$
- nonEditableVerbage.setVisible(false);
- //typesComposite = SystemWidgetHelpers.createGroupComposite(comp, 1, rb.getString(RESID_UDT_FILES_TYPESGROUP_ROOT_LABEL);
- typesComposite = SystemWidgetHelpers.createTightComposite(comp, 1);
- typesComposite.setToolTipText(SystemUDAResources.RESID_UDT_FILES_TYPESGROUP_TOOLTIP);
- ((GridData) typesComposite.getLayoutData()).horizontalSpan = nbrColumns;
- nbrColumns = 1;
- // List of currently selected types if given parent composite did not have 2 columns
- if (definedTypesLabel == null)
- //definedTypesText =
- // SystemWidgetHelpers.createLabeledTextField(typesComposite, null, rb, RESID_UDT_FILES_DEFINEDTYPES_ROOT);
- definedTypesLabel = SystemWidgetHelpers.createLabeledLabel(typesComposite, SystemUDAResources.RESID_UDT_FILES_DEFINEDTYPES_LABEL, SystemUDAResources.RESID_UDT_FILES_DEFINEDTYPES_TOOLTIP,
- true);
- //definedTypesLabel.setEnabled(false);
- definedTypesLabel.setForeground(definedTypesLabel.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
- //definedTypesText =
- // SystemWidgetHelpers.createReadonlyTextField(typesComposite, rb, RESID_UDT_FILES_DEFINEDTYPES_ROOT);
- //definedTypesText.setToolTipText("");
- //definedTypesText.setVisible(false);
- // types selection label
- //typesSelectionListVerbage =
- // SystemWidgetHelpers.createLabel(typesComposite, rb, RESID_UDT_TYPESLIST_LABEL_ROOT, nbrColumns, false);
- // types selection list
- //typesSelectionList = CheckboxTableViewer.newCheckList(comp, SWT.BORDER);
- Table table = new Table(typesComposite, SWT.CHECK | SWT.BORDER);
- table.setToolTipText(SystemUDAResources.RESID_UDT_FILES_TYPESGROUP_TOOLTIP);
- typesSelectionList = new CheckboxTableViewer(table);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = nbrColumns;
- data.heightHint = LIST_HEIGHT;
- data.widthHint = LIST_WIDTH;
- //data.grabExcessHorizontalSpace = false;
- //data.grabExcessVerticalSpace = false;
- typesSelectionList.getTable().setLayoutData(data);
- typesSelectionList.setLabelProvider(FileEditorMappingLabelProvider.INSTANCE);
- typesSelectionList.setContentProvider(FileEditorMappingContentProvider.INSTANCE);
- addSelectionButtons(typesComposite);
- Composite userComp = createUserEntryGroup(typesComposite);
- ((GridData) userComp.getLayoutData()).horizontalSpan = nbrColumns;
- // configure widgets...
- initializeViewer();
- //if ((this.initialSelections != null) && !this.initialSelections.isEmpty())
- // checkInitialSelections();
- typesSelectionList.addCheckStateListener(this);
- }
-
- /**
- * Set domain.
- * The edit pane may possibly appear differently, depending on the domain.
- * When the domain changes (either in "new" or "edit" mode) this method is called.
- */
- public void setDomain(int domain) {
- this.currentDomain = domain;
- }
-
- /**
- * Set the message line for issuing msgs to
- */
- public void setMessageLine(ISystemMessageLine msgLine) {
- }
-
- /**
- * Return the domain of the currently selected existing named type, or "new" node
- */
- public int getDomain() {
- return currentDomain;
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#setTypes(String)
- */
- public void setTypes(String types) {
- //this.inpTypes = types;
- if (types == null) {
- setTypes((String[]) null);
- } else {
- setTypes(RemoteFileFilterString.parseTypes(types));
- setDefinedTypesText(types);
- }
- }
-
- /**
- * Set defined types text
- */
- private void setDefinedTypesText(String types) {
- definedTypesLabel.setText(" " + types); //$NON-NLS-1$
- definedTypesLabel.setToolTipText(types);
- //definedTypesText.setText(types);
- }
-
- /**
- * Clear defined types text
- */
- private void clearDefinedTypesText() {
- definedTypesLabel.setText(""); //$NON-NLS-1$
- definedTypesLabel.setToolTipText(""); //$NON-NLS-1$
- //definedTypesText.setText("");
- }
-
- /**
- * Set the types via an array
- */
- private void setTypes(String[] types) {
- clearTypes();
- if (types != null) {
- this.inpTypes = Arrays.asList(types);
- ignoreModifyEvents = true;
- checkInitialSelections();
- ignoreModifyEvents = false;
- }
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#clearTypes()
- */
- public void clearTypes() {
- ignoreModifyEvents = true;
- this.inpTypes = null;
- typesSelectionList.setAllChecked(false);
- clearDefinedTypesText();
- userDefinedText.setText(""); //$NON-NLS-1$
- ignoreModifyEvents = false;
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#getTypes()
- */
- public String getTypes() {
- return RemoteFileFilterString.getTypesString(getTypesAsArray());
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#getTypes()
- */
- public String[] getTypesAsArray() {
- java.util.List selectedEntries = getSelectedTypes();
- String[] seldArray = new String[selectedEntries.size()];
- for (int idx = 0; idx < seldArray.length; idx++)
- seldArray[idx] = (String) selectedEntries.get(idx);
- return seldArray;
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#addModifyListener(ModifyListener)
- */
- public void addModifyListener(ModifyListener listener) {
- listeners.add(listener);
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#removeModifyListener(ModifyListener)
- */
- public void removeModifyListener(ModifyListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#validate()
- */
- public SystemMessage validate() {
- if (typesSelectionList == null) return null;
-
-
-
- if (!areTypesSelected()) {
- return new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_EMPTY,
- IStatus.ERROR,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_EMPTY,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_EMPTY_DETAILS);
- }
- // validate that user-defined entry field!
- return validateUserDefinedTypes();
- }
-
- /**
- * Validate the contents of the user-defined types entry field
- */
- public SystemMessage validateUserDefinedTypes() {
- String filename = userDefinedText.getText().trim();
- // copied from SystemSelectFileTypes...
- // check for empty name and extension
- if (filename.length() == 0) return null;
- // 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) == '*')) {
- return new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID,
- IStatus.ERROR,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID_DETAILS);
- }
- }
- 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) {
- return new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID,
- IStatus.ERROR,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID_DETAILS);
- }
- if (index != 0 || filename.charAt(1) != '.') {
- return new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID,
- IStatus.ERROR,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID,
- UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID_DETAILS);
- }
- }
- return null;
- }
-
- /**
- * @see org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector#getControl()
- */
- public Control getControl() {
- return typesSelectionList.getControl();
- }
-
- /**
- * Enable or disable the input-capability of the constituent controls
- */
- public void setEnabled(boolean enable) {
- typesSelectionList.getControl().setEnabled(enable);
- userDefinedText.setEnabled(enable);
- }
-
- /**
- * We want to disable editing of IBM or vendor-supplied
- * types, so when one of these is selected, this method is
- * called to enter non-editable mode.
- * @param editable Whether to disable editing of this type or not
- * @param vendor When disabling, it contains the name of the vendor for substitution purposes
- */
- public void setEditable(boolean editable, String vendor) {
- //setEnabled(editable);
- typesComposite.setVisible(editable);
- if (editable)
- nonEditableVerbage.setVisible(false);
- else {
- nonEditableVerbage.setVisible(true);
- if (vendor.equals("IBM")) //$NON-NLS-1$
- nonEditableVerbage.setText(SystemUDAResources.RESID_UDT_IBM_VERBAGE);
- else {
- String verbage = SystemUDAResources.RESID_UDT_VENDOR_VERBAGE;
- verbage = SystemMessage.sub(verbage, "%1", vendor); //$NON-NLS-1$
- nonEditableVerbage.setText(verbage);
- }
- }
- }
-
- // private methods...
- /**
- * Fire event to all listeners...
- */
- private void fireModifiedEvent() {
- Event event = new Event();
- event.widget = getControl();
- event.type = SWT.Modify;
- event.data = this;
- ModifyEvent mEvent = new ModifyEvent(event);
- for (int idx = 0; idx < listeners.size(); idx++) {
- ModifyListener l = (ModifyListener) listeners.elementAt(idx);
- //System.out.println("...firing modify event");
- l.modifyText(mEvent);
- }
- setDefinedTypesText(getTypes());
- }
-
- /**
- * From ICheckStateListener interface.
- * Called when user checks/unchecks an item
- */
- public void checkStateChanged(CheckStateChangedEvent event) {
- //System.out.println("inside checkStateChanged");
- if (!ignoreModifyEvents) fireModifiedEvent();
- ignoreModifyEvents = false; // non-sticky
- }
-
- // --------------------------------------------
- // Similar to org.eclipse.ui.dialogs.TypeFilteringDialog
- // --------------------------------------------
- /**
- * 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$
-
- SelectionListener listener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent e) {
- typesSelectionList.setAllChecked(true);
- }
- };
- selectButton.addSelectionListener(listener);
-
- Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, GenericMessages.getString("WizardTransferPage.deselectAll"), false); //$NON-NLS-1$
-
- listener = new SelectionAdapter()
- {
- public void widgetSelected(SelectionEvent e) {
- typesSelectionList.setAllChecked(false);
-
- }
- };
- deselectButton.addSelectionListener(listener);
- */
- }
-
- 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;
- }
-
- /**
- * Add the currently-specified extensions.
- */
- private void addUserDefinedEntries(java.util.List result) {
- StringTokenizer tokenizer = new StringTokenizer(userDefinedText.getText(), TYPE_DELIMITER);
- //Allow the *. and . prefix and extract 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.
- */
- private void checkInitialSelections() {
- if ((inpTypes == null) || (inpTypes.size() == 0)) return;
- IFileEditorMapping editorMappings[] = PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();
- ArrayList selectedMappings = new ArrayList();
- for (int i = 0; i < editorMappings.length; i++) {
- IFileEditorMapping mapping = editorMappings[i];
- if (inpTypes.contains(mapping.getLabel())) {
- typesSelectionList.setChecked(mapping, true);
- selectedMappings.add(mapping.getLabel());
- } else {
- //System.out.println("name = '" + mapping.getName() + "', label = '" + mapping.getLabel() + "', ext = '" + mapping.getExtension() + "'");
- if (mapping.getName().equals("*")) //$NON-NLS-1$
- {
- if (inpTypes.contains(mapping.getExtension())) {
- typesSelectionList.setChecked(mapping, true);
- selectedMappings.add(mapping.getExtension());
- }
- } else if (mapping.getExtension().equals("")) // extension-less name like "makefile" //$NON-NLS-1$
- {
- if (inpTypes.contains(mapping.getName() + NO_EXTENSION_PLACEHOLDER)) {
- typesSelectionList.setChecked(mapping, true);
- selectedMappings.add(mapping.getName() + NO_EXTENSION_PLACEHOLDER);
- }
- }
- }
- }
- //Now add in the ones not selected to the user defined list
- Iterator initialIterator = inpTypes.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 Composite createUserEntryGroup(Composite parent) {
- // destination specification group
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createFlushComposite(parent, nbrColumns);
- userDefinedText = SystemWidgetHelpers.createLabeledTextField(composite, null, SystemUDAResources.RESID_UDT_FILES_USERTYPES_LABEL, SystemUDAResources.RESID_UDT_FILES_USERTYPES_TOOLTIP);
- userDefinedText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (!ignoreModifyEvents) fireModifiedEvent();
- ignoreModifyEvents = false; // non-sticky flag
- }
- });
- SystemWidgetHelpers.setHelp(userDefinedText, RSEUIPlugin.HELPPREFIX + "wwnt0002"); //$NON-NLS-1$
- return composite;
- }
-
- /**
- * Return the input to the dialog.
- */
- private IFileEditorMapping[] getInput() {
- //Filter the mappings to be just those with a wildcard extension
- // Hmm, why does Eclipse do this? Phil
- if (currentInput == null) {
- currentInput =
- //IFileEditorMapping [] allMappings =
- PlatformUI.getWorkbench().getEditorRegistry().getFileEditorMappings();
- //java.util.List wildcardEditors = new ArrayList();
- //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() {
- typesSelectionList.setInput(getInput());
- }
-
- /**
- * Return the currently selected items as a java.util.List of Strings
- */
- protected java.util.List getSelectedTypes() {
- // 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 (typesSelectionList.getChecked(element)) {
- if (element.getName().equals("*")) //$NON-NLS-1$
- list.add(element.getExtension());
- else if (element.getExtension().equals("")) //$NON-NLS-1$
- list.add(element.getName() + NO_EXTENSION_PLACEHOLDER);
- else
- list.add(element.getLabel());
- }
- }
- addUserDefinedEntries(list);
- //setResult(list);
- return list;
- }
-
- /**
- * Return true if there are any types currently selected
- */
- protected boolean areTypesSelected() {
- // Get the input children.
- IFileEditorMapping[] children = getInput();
- // Test list of selected children.
- for (int i = 0; i < children.length; ++i) {
- IFileEditorMapping element = children[i];
- if (typesSelectionList.getChecked(element)) {
- return true;
- }
- }
- String udtText = userDefinedText.getText().trim();
- if (udtText.length() == 0) return false;
- //StringTokenizer tokenizer =
- // new StringTokenizer(udtText, TYPE_DELIMITER);
- //return tokenizer.hasMoreTokens();
- return true;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemCommandTextAdditionalGUIProvider.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemCommandTextAdditionalGUIProvider.java
deleted file mode 100644
index d4be8029f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemCommandTextAdditionalGUIProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.useractions.ui;
-
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Interface that is to be implemented by anyone interested in
- * supplying additional gui, beyond the default, to the command text widget.
- */
-public interface ISystemCommandTextAdditionalGUIProvider {
- /**
- * Overridable entry point for subclasses that wish to put something to the right of the "Command:" label
- * @return true if something entered to take up the available columns, false otherwise (will be padded)
- */
- public boolean createCommandLabelLineControls(Composite parent, int availableColumns);
-
- /**
- * Create additional buttons, to go under command prompt.
- * Overridable.
- * @return true if something entered to take up the available columns, false otherwise (will be padded)
- */
- public boolean createExtraButtons(Composite parent, int availableColumns);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemSubstitutor.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemSubstitutor.java
deleted file mode 100644
index 3e6633df7..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/ISystemSubstitutor.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-/**
- * Objects implementing this interface are passed to
- * {@link SystemCmdSubstVarList} parse a given command
- * string for variables defined in the substitution list.
- * For each match, this object is called back to retrieve
- * the substition value, given the variable name (including
- * its prefix). It will also pass back the context object
- * given to it. Presumably this is a currently selected object.
- */
-public interface ISystemSubstitutor {
- /**
- * Return the string to substitute for the given substitution
- * variable, given the current context object. This object will
- * be passed whatever was passed into the doSubstitution method.
- * <p>It is VERY IMPORTANT to return null if you can't do the
- * substitution for some reason! This is a clue to the algorithm
- * that no change was made and increases performance.
- */
- public String getSubstitutionValue(String substitutionVariable, Object context);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVar.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVar.java
deleted file mode 100644
index 2f186feba..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVar.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-/**
- * @author coulthar
- *
- * This class encapsulates a single substitution variable.
- * Such a variable has the following information:
- * <ol>
- * <li>The actual variable, as in "&L"
- * <li>A translated description of the variable, as in "Library name"
- * <li>A display string, which is typically a concatenation of the above two attributes
- * </ol>
- * Currently this class is not used at runtime to do the actual substitution,
- * although that would be a natural next step.
- */
-public class SystemCmdSubstVar implements Comparable {
- private String var, desc;
-
- // public constants
- /**
- * Constructor
- */
- public SystemCmdSubstVar(String variable, String description) {
- super();
- this.var = variable;
- this.desc = description;
- }
-
- /**
- * Return the substitution variable. Eg "&x" or "${xxxx}"
- */
- public String getVariable() {
- return var;
- }
-
- /**
- * Return the description. Eg "File name"
- */
- public String getDescription() {
- return desc;
- }
-
- /**
- * Return the display string. Eg var " - " description
- */
- public String getDisplayString() {
- return var + " - " + desc; //$NON-NLS-1$
- }
-
- // comparable interface method, to enable sorting
- /**
- * Compare ourself to another instance of this class
- * @return -1 we are less than given object, 0 we are equal, 1 we are greater than
- */
- public int compareTo(Object o) {
- /* only re-use this when we want to bubble longer names to top...
- SystemUDASubstVar other = (SystemUDASubstVar)o;
- if (var.equals(other.getVariable()))
- return 0;
- else if (var.length() > other.getVariable().length())
- return -1; // we want longer names at the beginning of an ascending list!
- else
- return 1;
- */
- return var.compareTo(((SystemCmdSubstVar) o).getVariable());
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVarList.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVarList.java
deleted file mode 100644
index 15a9e57b6..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCmdSubstVarList.java
+++ /dev/null
@@ -1,292 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.io.PrintWriter;
-import java.util.Arrays;
-
-/**
- * @author coulthar
- *
- * This encapsulates a list of substitution variables.
- * The input for the list is the variable prefix (eg "&"), an
- * array of variable names (eg "A", "B", etc), plus the
- * resource bundle and key-root for getting the variable
- * descriptions (will append variable names to the key-root
- * to get the resource bundle key).
- * <p>
- * This class is also used to help with the actual substitutions
- * at runtime. The method doSubstitutions will walk the given
- * string looking for matches on any of the variables in this
- * list, taking care to look for the longer-named variables first,
- * and when a match is found, will call back to the given
- * implementor of ISystemSubstitutor, to get the substitution
- * value. The substitutor will be given the variable name (eg, "N",
- * not "&N") and whatever context object was passed into
- * doSubstitutions, presumably one of the currently selected
- * objects.
- */
-public class SystemCmdSubstVarList {
- private SystemCmdSubstVar[] list, sortedList;
- private char prefix = ' ';
- private boolean usingDelimiters = false;
- // constants
- /**
- * Typical substitution variable prefix when using single prefix char: '&'
- */
- public static final char SUBST_PREFIX_AMP = '&';
- /**
- * Typical substitution variable char prefix when using delimiters: "$"
- */
- public static final char SUBST_PREFIX_DOLLAR = '$';
- /**
- * Typical substitution variable char prefix when using delimiters: "{"
- */
- public static final char SUBST_PREFIX_BRACE = '}';
- /**
- * Typical substitution variable string prefix when using delimiters: "{"
- */
- public static final String SUBST_PREFIX = "${"; //$NON-NLS-1$
- /**
- * Typical substitution variable char suffix when using delimiters: "}"
- */
- public static final char SUBST_SUFFIX_BRACE = '}';
-
- /**
- * Constructor when using single prefix like '&'
- */
- public SystemCmdSubstVarList(char prefix, String[] names, String[] descriptions) {
- this(null, prefix, names, descriptions);
- }
-
- /**
- * Constructor when using single prefix like '&', and based on another list
- * Sometimes a substitution variable list contains common variables, plus some unique variables.
- * In this case, use this construction, and pass in the list object for the common variables.
- */
- public SystemCmdSubstVarList(SystemCmdSubstVarList commonList, char prefix, String[] names, String[] descriptions) {
- super();
- this.prefix = prefix;
- init(commonList, names, descriptions);
- }
-
- /**
- * Constructor when using ${xxx} delimiting, and not based on another list
- */
- public SystemCmdSubstVarList(String[] names, String[] descriptions) {
- this(null, names, descriptions);
- }
-
- /**
- * Constructor when using ${xxx} delimiting, and we are based on another list
- */
- public SystemCmdSubstVarList(SystemCmdSubstVarList commonList, String[] names, String[] descriptions) {
- super();
- usingDelimiters = true;
- prefix = SUBST_PREFIX_DOLLAR;
- init(commonList, names, descriptions);
- }
-
- /**
- * Abstraction of common stuff done by all constructors.
- */
- public void init(SystemCmdSubstVarList commonList, String[] names, String[] descriptions) {
- SystemCmdSubstVar[] commonArray = null;
- int idx = 0;
- if (commonList == null)
- list = new SystemCmdSubstVar[names.length];
- else {
- commonArray = commonList.getListAsArray();
- list = new SystemCmdSubstVar[commonArray.length + names.length];
- for (; idx < commonArray.length; idx++)
- list[idx] = commonArray[idx];
- }
- String varName = null;
- String description = null;
- for (int jdx = 0; jdx < names.length; idx++, jdx++) {
- if (!usingDelimiters) {
- varName = prefix + names[jdx];
- } else {
- varName = SUBST_PREFIX + names[jdx] + SUBST_SUFFIX_BRACE;
- }
- description = descriptions[jdx];
- list[idx] = new SystemCmdSubstVar(varName, description);
- }
- // sort list alphabetically...
- Arrays.sort(list);
- // for testing...
- /*
- System.out.println("Sorted list: ");
- for (int jdx=0; jdx<list.length; jdx++)
- System.out.println("..."+list[jdx].getVariable());
- System.out.println();
- */
- }
-
- /**
- * Return the list of variables as an array of SystemCmdSubstVar objects
- */
- public SystemCmdSubstVar[] getListAsArray() {
- return list;
- }
-
- /**
- * Return the list as an array of display strings of the form xx - some text
- */
- public String[] getDisplayStrings() {
- String[] strings = new String[list.length];
- for (int idx = 0; idx < strings.length; idx++)
- strings[idx] = list[idx].getDisplayString();
- return strings;
- }
-
- /**
- * For debugging purposes, writes the list of variables to standard out
- */
- public void printDisplayStrings() {
- System.out.println("Substitution Variables for " + getClass().getName()); //$NON-NLS-1$
- String[] strings = getDisplayStrings();
- for (int idx = 0; idx < strings.length; idx++)
- System.out.println(strings[idx]);
- System.out.println();
- }
-
- /**
- * For whatever purpose, writes the list of variables to given stream
- */
- public void printDisplayStrings(PrintWriter stream) {
- stream.println("Substitution Variables for " + getClass().getName()); //$NON-NLS-1$
- String[] strings = getDisplayStrings();
- for (int idx = 0; idx < strings.length; idx++)
- stream.println(strings[idx]);
- stream.println();
- }
-
- /**
- * Given a command string potentially containing substitution variables,
- * and a context object that represents something currently selected (say),
- * this will scan the command string for matches on any of the substitution
- * variables defined in this list. For each match it calls the given
- * implementor of {@link ISystemSubstitutor} to retrieve the value to
- * replace the substitution variable with. The substitutor is also given
- * the context object passed in here.
- * <p>
- * Currently this assume all variables use the prefix given in the constructor,
- * as it optimizes performance.
- * Another flavour would be needed if arbitrary prefixes were to supported!
- * <p>
- * Further, this also currently assumes a doubled up prefix is used for escaping,
- * meaning the first prefix is to be removed, the next is to be left unsubstituted.
- *
- * @param commandString - the command from the user action, that contains vars to be substituted
- * @param context - a selected object
- * @param substitutor - an object that knows how to do substitutions. A callback.
- */
- public String doSubstitutions(String commandString, Object context, ISystemSubstitutor substitutor) {
- //System.out.println("Command before substitution: " + commandString);
- // walk the command string, looking for variables...
- String part1, part2;
- int index = 0;
- int lastindex = 0;
- //int cmdLength = commandString.length();
- while ((index = commandString.indexOf(prefix, lastindex)) >= 0) {
- lastindex = index + 1; // start next search at char after this '&'
- // ampersand followed by at least one letter?
- if (commandString.length() >= (index + 1)) {
- char sc = commandString.charAt(index + 1); // char after this '&'
- if (sc == prefix) // next char is also an '&'?
- {
- ++lastindex; // skip it. Note its ok to bump it past length of string
- } else {
- String var = findMatchingVar(commandString, index);
- if (var != null) {
- String replacement = substitutor.getSubstitutionValue(var, context);
- if (replacement != null) {
- if (index == 0) // substitution variable at front of command?
- commandString = commandString.substring(index + var.length());
- else {
- part1 = commandString.substring(0, index);
- part2 = commandString.substring(index + var.length());
- commandString = part1 + replacement + part2;
- }
- lastindex = index + replacement.length(); // assume replacement has no '&' chars in it!
- }
- }
- }
- }
- } // end while
- //System.out.println("Command after substitution : " + commandString);
- //System.out.println();
- return commandString;
- }
-
- /**
- * For testing purposes.
- * Given the selected object, this returns an array of strings, one for each substitution
- * variable, of the form "varname = substituted-value".
- * @param context - a selected object
- * @param substitutor - an object that knows how to do substitutions. A callback
- */
- public String[] doAllSubstitutions(Object context, ISystemSubstitutor substitutor) {
- String[] substitutedVariables = new String[list.length];
- String currVar = null;
- for (int idx = 0; idx < list.length; idx++) {
- currVar = list[idx].getVariable();
- substitutedVariables[idx] = currVar + " = " + //$NON-NLS-1$
- doSubstitutions("\"" + currVar + "\"", context, substitutor); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return substitutedVariables;
- }
-
- /**
- * Check our list of sub vars for a match on given string at given index
- */
- private String findMatchingVar(String cmd, int indexOfPrefix) {
- if (sortedList == null) {
- sortedList = list;
- /*
- * At this point we don't need to sort names as we are careful not
- * to define variables that are ambiguous. Eg, &A and &AB.
- *
- sortedList = new SystemUDASubstVar[list.length];
- for (int i = 0; i < sortedList.length; i++)
- sortedList[i] = list[i];
- Arrays.sort(sortedList);
- */
- }
- int cmdlen = cmd.length();
- for (int idx = 0; idx < sortedList.length; idx++) {
- String var = sortedList[idx].getVariable();
- int varlen = var.length();
- if (((indexOfPrefix + varlen) <= cmdlen) && var.equals(cmd.substring(indexOfPrefix, indexOfPrefix + varlen))) return var;
- }
- return null;
- }
-
- /**
- * Helper method to test for duplicate variables
- */
- public void testForDuplicates() {
- String currname = null;
- for (int idx = 0; idx < list.length; idx++) {
- currname = list[idx].getVariable();
- for (int i = 0; i < list.length; i++)
- if (i != idx) if (list[i].equals(currname)) System.out.println("duplicate subs var " + currname + " in list " + this.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * This writes out the class name.
- */
- public String toString() {
- return getClass().getName();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandTextField.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandTextField.java
deleted file mode 100644
index 393d2f8d9..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandTextField.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * Kevin Doyle (IBM) - [239704] No Validation for Command textbox in Work with Compile and User Action dialogs
- * Kevin Doyle (IBM) - [242041] Bring back Undo/Content Assist for User Actions/Compile Commands Command Field
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui;
-
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserActionCommand;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.view.ISystemCommandTextModifyListener;
-import org.eclipse.rse.shells.ui.view.SystemCommandEditor;
-import org.eclipse.rse.ui.ISystemMassager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-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;
-
-/**
- * This class encapsulates a prompt for a remote command that supports
- * substitution variables. It is used in both compile and user action dialogs.
- */
-public class SystemCommandTextField implements SelectionListener {
- protected SystemCommandEditor textCommand;
- protected ISystemMassager cmdMassager;
- protected Button insertVariableButton;
- protected Button editButton;
- protected boolean menuListenerAdded;
- protected SystemCommandViewerConfiguration sourceViewerConfiguration;
- //mri
- private String cmdFieldLabel = SystemUDAResources.RESID_UDA_COMMAND_LABEL;
- private String cmdFieldTooltip = SystemUDAResources.RESID_UDA_COMMAND_TOOLTIP;
- private String insertVarButtonLabel = SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_LABEL;
- private String insertVarButtonTooltip = SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_TOOLTIP;
- private String editButtonLabel = SystemUDAResources.RESID_UDA_EDIT_BUTTON_LABEL;
- private String editButtonTooltip = SystemUDAResources.RESID_UDA_EDIT_BUTTON_TOOLTIP;
- /**
- * Maximum text length for command field: 512
- */
- public static final int MAX_CMD_LENGTH = 512;
-
- /**
- * Constructor .
- * You must call setSubstitutionVariableList before
- * calling createContents!
- */
- public SystemCommandTextField(SystemCommandViewerConfiguration cmdAssistant) {
- super();
- this.sourceViewerConfiguration = cmdAssistant;
- }
-
- /**
- * Reset what will be used to manage the content assist. A default is supplied.
- */
- public void setCommandTextViewerConfiguration(SystemCommandViewerConfiguration cmdAssistant) {
- // defect 46404...
- if ((sourceViewerConfiguration != null) && (textCommand != null) && (sourceViewerConfiguration.getContentAssistant(textCommand) != null))
- sourceViewerConfiguration.getContentAssistant(textCommand).uninstall();
- this.sourceViewerConfiguration = cmdAssistant;
- if (textCommand != null) {
- textCommand.configure(sourceViewerConfiguration);
- }
- }
-
- /**
- * Set the substitution variable list that Insert Variable will use.
- */
- public void setSubstitutionVariableList(SystemCmdSubstVarList varList) {
- sourceViewerConfiguration.setSubstVarList(varList);
- }
-
- /**
- * Set the action command massager. This is called to massage the contents
- * when getCommandText is called.
- */
- public void setCommandMassager(ISystemMassager massager) {
- this.cmdMassager = massager;
- }
-
- /**
- * Return the command massager as set by setCommandMassager(...)
- */
- public ISystemMassager getCommandMassager() {
- return cmdMassager;
- }
-
- /**
- * Return the edit widget. Will be null until createEditor is called
- */
- public SourceViewer getEditor() {
- return textCommand;
- }
-
- /**
- * Return the control widget for the command prompt
- */
- public Control getCommandWidget() {
- return textCommand.getControl();
- }
-
- /**
- * Return the text contents of the command widget
- */
- public String getCommandText() {
- return textCommand.getCommandText();
- }
-
- /**
- * Return the text contents of the command widget, after applying the massager.
- * If the massager is null, this is the same as calling getCommandText().
- */
- public String getMassagedCommandText() {
- if (cmdMassager == null)
- return getCommandText();
- else
- return cmdMassager.massage(getCommandText());
- }
-
- /**
- * Set the text contents of the command widget
- */
- public void setCommandText(String text) {
- textCommand.getDocument().set(text);
- }
-
- /**
- * Enable/disable command widget
- */
- public void enableCommandWidget(boolean enable) {
- if (textCommand != null) textCommand.getTextWidget().setEnabled(enable);
- if (insertVariableButton != null) insertVariableButton.setEnabled(enable);
- if (editButton != null) editButton.setEnabled(enable);
- }
-
- /**
- * Turn on or off event ignoring flag
- */
- public void setIgnoreChanges(boolean ignore) {
- if (textCommand != null) {
- textCommand.setIgnoreChanges(ignore);
- }
- }
-
- /**
- * Method createContents.
- * @param comp - the parent composite into which to place the prompt, field and insert-variable buttons
- * @return Control
- */
- public Control createContents(Composite comp, int nbrColumns, ISystemCommandTextAdditionalGUIProvider guiProvider) {
- Label labelCommand = SystemWidgetHelpers.createLabel(comp, cmdFieldLabel, cmdFieldTooltip);
- String s = SystemWidgetHelpers.appendColon(labelCommand.getText());
- labelCommand.setText(s);
- if ((guiProvider == null) || !guiProvider.createCommandLabelLineControls(comp, nbrColumns - 1)) ((GridData) labelCommand.getLayoutData()).horizontalSpan = nbrColumns;
- int cmdSpan = nbrColumns;
- textCommand = createEditor(comp, cmdSpan, sourceViewerConfiguration);
- textCommand.getControl().setToolTipText(cmdFieldTooltip);
- // Insert Variable... button
- insertVariableButton = SystemWidgetHelpers.createPushButton(comp, null, insertVarButtonLabel, insertVarButtonTooltip);
- // edit command button
- editButton = SystemWidgetHelpers.createPushButton(comp, null, editButtonLabel, editButtonTooltip);
- // SUBCLASS-SUPPLIED BUTTONS
- if ((guiProvider == null) || !guiProvider.createExtraButtons(comp, nbrColumns - 1)) addFillerLine(comp, nbrColumns - 1);
- insertVariableButton.addSelectionListener(this);
- editButton.addSelectionListener(this);
- textCommand.getTextWidget().addKeyListener(new KeyAdapter()
- {
- public void keyReleased(KeyEvent e)
- {
-
- if (!e.doit)
- return;
-
- if (e.stateMask == SWT.CTRL)
- {
- switch (e.character)
- {
- case ' ' :
- textCommand.setInCodeAssist(true);
- textCommand.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- break;
- // CTRL-Z
- case 'z' - 'a' + 1 :
- textCommand.doOperation(ITextOperationTarget.UNDO);
- //e.doit = false;
- break;
- }
- }
-
- }
- });
- return comp;
- }
-
- /**
- * Set the information needed to get the command field's mri
- */
- public void setMRI(String cmdFieldLabel, String cmdFieldTooltip, String insertVarButtonLabel, String insertVarButtonTooltip) {
- this.cmdFieldLabel = cmdFieldLabel;
- this.cmdFieldTooltip = cmdFieldTooltip;
- this.insertVarButtonLabel = insertVarButtonLabel;
- this.insertVarButtonTooltip = insertVarButtonTooltip;
- }
-
- /**
- * SelectionListener Interface:
- * For the checkboxes
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- /**
- * SelectionListener Interface:
- * For the checkboxes
- */
- public void widgetSelected(SelectionEvent e) {
- Object source = e.getSource();
- if (source == insertVariableButton) {
- //sourceViewerConfiguration.getSubstVarList().printDisplayStrings();
- textCommand.getTextWidget().setFocus();
- textCommand.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- } else if (source == editButton) {
- // bring up dialog
- SystemCommandViewerConfiguration cfg = new SystemCommandViewerConfiguration();
- cfg.setSubstVarList(sourceViewerConfiguration.getSubstVarList());
- SystemEditCommandDialog dlg = new SystemEditCommandDialog(getCommandWidget().getShell(), getCommandText(), cfg, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- if (dlg.open() == Window.OK) {
- String str = dlg.getCommand();
- textCommand.getDocument().set(str);
- }
- }
- }
-
- /**
- * Create the editor widget
- */
- private SystemCommandEditor createEditor(Composite parent, int nbrColumns, SystemCommandViewerConfiguration sourceViewerConfiguration) {
- textCommand = new SystemCommandEditor(null, parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL, nbrColumns, sourceViewerConfiguration,
- "", SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_LABEL); //$NON-NLS-1$
- textCommand.setCommandValidator(new ValidatorUserActionCommand());
- return textCommand;
- }
-
- /**
- * Set the command validator to validate contents per keystroke
- */
- public void setCommandValidator(ISystemValidator cmdValidator) {
- if (textCommand != null) textCommand.setCommandValidator(cmdValidator);
- }
-
- /**
- * Validate command input
- */
- public SystemMessage validateCommand() {
- if (textCommand != null)
- return textCommand.validateCommand();
- else
- return null;
- }
-
- /**
- * Add a modify listener
- */
- public void addModifyListener(ISystemCommandTextModifyListener listener) {
- if (textCommand != null) textCommand.addModifyListener(listener);
- }
-
- /**
- * Remove a modify listener
- */
- public void removeModifyListener(ISystemCommandTextModifyListener listener) {
- if (textCommand != null) textCommand.removeModifyListener(listener);
- }
-
- // -----------------------------
- // 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandViewerConfiguration.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandViewerConfiguration.java
deleted file mode 100644
index fa4c4aaab..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemCommandViewerConfiguration.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-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.ContentAssistant;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-
-/**
- * @author coulthar
- *
- * This is the class which enables the popup window shown when
- * Insert Variable is pressed in the UDA dialog.
- */
-public class SystemCommandViewerConfiguration extends SourceViewerConfiguration {
- private SystemCommandContentAssistProcessor contentAssistantProcessor;
- private ContentAssistant contentAssistant;
-
- /**
- * Constructor
- * You must call setSubstVarList.
- */
- public SystemCommandViewerConfiguration() {
- super();
- contentAssistantProcessor = new SystemCommandContentAssistProcessor(this);
- }
-
- /**
- * Reset the variable list
- */
- public void setSubstVarList(SystemCmdSubstVarList variableList) {
- contentAssistantProcessor.setSubstVarList(variableList);
- }
-
- /**
- * Return the current substitution variable list
- */
- public SystemCmdSubstVarList getSubstVarList() {
- return contentAssistantProcessor.getSubstVarList();
- }
-
- /**
- * 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);
- }
- return contentAssistant;
- }
-
- /*
- * Similar to org.eclipse.jdt.internal.ui.text.template.TemplateVariableProcessor#getStart(String,int).
- */
- /**
- * Guesses the start position of the completion.
- * <p>
- * Overridable by subclasses for cases when not using ${...} substitution variable patterns
- */
- protected int getStart(String string, int end) {
- int start = end;
- if (start >= 1 && string.charAt(start - 1) == '$') return start - 1;
- while ((start != 0) && Character.isUnicodeIdentifierPart(string.charAt(start - 1)))
- start--;
- if (start >= 2 && string.charAt(start - 1) == '{' && string.charAt(start - 2) == '$') return start - 2;
- return end;
- }
-
- /**
- * 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[] { '$' };
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getHyperlinkDetectors(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
- return null;
- }
-
- /**
- * Internal class that implements the content assist processor interface
- */
- private class SystemCommandContentAssistProcessor implements IContentAssistProcessor {
- private SystemCmdSubstVarList variableList;
- private SystemCommandViewerConfiguration configurator;
-
- /**
- * Constructor
- */
- public SystemCommandContentAssistProcessor(SystemCommandViewerConfiguration configurator) {
- this.configurator = configurator;
- }
-
- /**
- * Reset the variable list
- */
- public void setSubstVarList(SystemCmdSubstVarList variableList) {
- this.variableList = variableList;
- }
-
- /**
- * Return the variable list
- */
- public SystemCmdSubstVarList getSubstVarList() {
- return variableList;
- }
-
- /**
- * @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- if (variableList == null) {
- System.out.println("Inside UDAContentAssistProcessor in SystemUDASourceViewerConfiguration. variableList is null!"); //$NON-NLS-1$
- return null;
- }
- SystemCmdSubstVar[] subVars = variableList.getListAsArray();
- ICompletionProposal[] proposalList = new ICompletionProposal[subVars.length];
- int replacementOffset = documentOffset;
- int replacementLength = 0;
- // this little algo comes from the Java template support example.
- // I am not sure I like it... it seems to be designed to replace the
- // contents of the text from the previous substitution-variable-start character
- // (eg '&' or '$') to the current cursor position.
- String text = viewer.getDocument().get();
- //System.out.println("docOffset = " + documentOffset + ", text = '" + text + "'");
- replacementOffset = configurator.getStart(text, documentOffset);
- replacementLength = documentOffset - replacementOffset;
- for (int idx = 0; idx < proposalList.length; idx++) {
- SystemCmdSubstVar currVar = subVars[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
- proposalList[idx] = new CompletionProposal(currVar.getVariable(), replacementOffset, replacementLength, documentOffset + currVar.getVariable().length(), null, currVar
- .getDisplayString(), null, null);
- }
- return proposalList;
- }
-
- /*
- * @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;
- }
- } // end inner class
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemEditCommandDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemEditCommandDialog.java
deleted file mode 100644
index b1a2cb911..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemEditCommandDialog.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * Kevin Doyle (IBM) - [239704] No Validation for Command textbox in Work with Compile and User Action dialogs
- *******************************************************************************/
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserActionCommand;
-import org.eclipse.rse.shells.ui.view.SystemCommandEditor;
-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.Label;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog used for editing command text in a resizable widget
- */
-public class SystemEditCommandDialog extends Dialog {
- // gui
- protected Label newNamePrompt;
- // input
- protected String cmd;
- // output
- protected String newCmdString;
- protected boolean ignoreChanges;
- // state
- protected SystemCommandViewerConfiguration sourceViewerConfiguration;
- protected SystemCommandEditor textCommand;
- protected Button insertVariableButton;
- protected int style;
- protected int INSERT_ID = 10;
-
- /**
- * Constructor.
- * @param shell The parent window hosting this dialog
- * @param command The resolved command from the user action
- * @param sourceViewerConfiguration configration for editor
- * @param style for editor
- */
- public SystemEditCommandDialog(Shell shell, String command, SystemCommandViewerConfiguration sourceViewerConfiguration, int style) {
- this(shell, command, SystemUDAResources.RESID_UDA_PROMPTCMD_TITLE, sourceViewerConfiguration, style);
- }
-
- /**
- * Constructor when specifying your own title.
- * @param shell The parent window hosting this dialog
- * @param command The resolved command from the user action
- * @param title title for the dialog
- * @param sourceViewerConfiguration configration for editor
- * @param style for editor
- */
- public SystemEditCommandDialog(Shell shell, String command, String title, SystemCommandViewerConfiguration sourceViewerConfiguration, int style) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
- this.style = style;
- this.cmd = command;
- this.sourceViewerConfiguration = sourceViewerConfiguration;
- }
-
- /**
- * Create GUI controls, populate into given composite.
- */
- protected Control createDialogArea(Composite gparent) {
- Composite parent = new Composite(gparent, SWT.NONE);
- GridData data = new GridData();
- data.heightHint = 100;
- data.widthHint = 400;
- parent.setLayout(new GridLayout());
- parent.setLayoutData(data);
- createEditor(parent, 5, sourceViewerConfiguration, cmd);
- String title = SystemUDAResources.RESID_UDA_COMMAND_LABEL;
- getShell().setText(title);
- return parent;
- }
-
- /**
- * Create the editor widget
- */
- private SourceViewer createEditor(Composite parent, int columnSpan, SystemCommandViewerConfiguration sourceViewerConfiguration, String cmd) {
- textCommand = new SystemCommandEditor(null, parent, style, columnSpan, sourceViewerConfiguration, cmd, SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_LABEL);
- textCommand.setCommandValidator(new ValidatorUserActionCommand());
- return textCommand;
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- String label = SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_LABEL;
- createButton(parent, INSERT_ID, label, false);
- super.createButtonsForButtonBar(parent);
- }
-
- /**
- * Return widget to set initial focus to
- */
- protected Control getInitialFocusControl() {
- return textCommand.getControl();
- }
-
- protected void buttonPressed(int buttonId) {
- if (IDialogConstants.OK_ID == buttonId) {
- processOK();
- textCommand.getTextWidget().dispose();
- }
- if (buttonId == INSERT_ID) {
- textCommand.getTextWidget().setFocus();
- textCommand.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- }
- super.buttonPressed(buttonId);
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK() {
- newCmdString = textCommand.getDocument().get().trim();
- return true;
- }
-
- /**
- * Returns the user-edited command
- */
- public String getCommand() {
- return newCmdString;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemPromptCommandDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemPromptCommandDialog.java
deleted file mode 100644
index b17be1fba..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/SystemPromptCommandDialog.java
+++ /dev/null
@@ -1,220 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-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.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Dialog used when to prompt the user with a command, with the intention that
- * the user can change.
- * <p>
- * This default implementation merely puts the command into an entry field, which
- * the user can edit.
- * <p>
- * Typically this is subclassed or configured to supply unique translated text.
- */
-public class SystemPromptCommandDialog extends SystemPromptDialog {
- // gui
- protected Text cmdText;
- protected Label newNamePrompt;
- // input
- protected String cmd;
- // output
- protected String newCmdString;
- // state
- protected SystemMessage errorMessage;
-
- /**
- * Constructor.
- * @param shell The parent window hosting this dialog
- * @param command The resolved command from the user action
- */
- public SystemPromptCommandDialog(Shell shell, String command) {
- this(shell, command, SystemUDAResources.RESID_UDA_PROMPTCMD_TITLE);
- }
-
- /**
- * Constructor when specifying your own title.
- * @param shell The parent window hosting this dialog
- * @param command The resolved command from the user action
- */
- public SystemPromptCommandDialog(Shell shell, String command, String title) {
- super(shell, title);
- this.cmd = command;
- super.setOkButtonLabel(getOKButtonLabel());
- super.setOkButtonToolTipText(getOKButtonToolTipText());
- super.setCancelButtonToolTipText(getCancelButtonToolTipText());
- //setHelp(RSEUIPlugin.HELPPREFIX+"drnp0000");
- }
-
- // --------------
- // MRI METHODS...
- // --------------
- /**
- * Translated text configuration method.
- * Override to return OK button label if you don't want the default
- */
- protected String getOKButtonLabel() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_OKBUTTON_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return OK button tooltip if you don't want the default
- */
- protected String getOKButtonToolTipText() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_OKBUTTON_TOOLTIP;
- }
-
- /**
- * Translated text configuration method.
- * Override to return Cancel button tooltip if you don't want the default
- */
- protected String getCancelButtonToolTipText() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_CANCELBUTTON_TOOLTIP;
- }
-
- /**
- * Translated text configuration method.
- * Override to return verbage message if you don't want the default
- */
- protected String getVerbage() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_VERBAGE_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return label for the command prompt, if you don't want the default
- */
- protected String getPromptLabel() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_PROMPT_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return tooltip text for the command prompt, if you don't want the default
- */
- protected String getPromptToolTipText() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_PROMPT_TOOLTIP;
- }
-
- /**
- * Create GUI controls, populate into given composite.
- */
- protected Control createInner(Composite parent) {
- // Inner composite
- int nbrColumns = 1;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- // VERBAGE
- SystemWidgetHelpers.createVerbiage(composite_prompts, getVerbage(), nbrColumns, false, 250);
- addFillerLine(composite_prompts, nbrColumns);
- // ENTRY FIELD
- SystemWidgetHelpers.createLabel(composite_prompts, getPromptLabel());
- cmdText = SystemWidgetHelpers.createMultiLineTextField(composite_prompts, null, 65);
- ((GridData) cmdText.getLayoutData()).widthHint = 350;
- cmdText.setToolTipText(getPromptToolTipText());
- cmdText.setTextLimit(2000);
- cmdText.setText(cmd);
- // add keystroke listeners...
- cmdText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateInput();
- }
- });
- return composite_prompts;
- }
-
- /**
- * Return widget to set initial focus to
- */
- protected Control getInitialFocusControl() {
- return cmdText;
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK() {
- newCmdString = cmdText.getText().trim();
- boolean closeDialog = verify();
- if (closeDialog) {
- setOutputObject(newCmdString);
- }
- return closeDialog;
- }
-
- /**
- * Verifies all input. Currently, we do no verification!
- * @return true if there are no errors in the user input
- */
- public boolean verify() {
- //clearErrorMessage();
- //errorMessage = null;
- //if (errorMessage != null)
- // cmdText.setFocus();
- return (errorMessage == null);
- }
-
- /**
- * This hook method is called whenever the text changes in the cmd input field.
- * Currently not used.
- */
- protected SystemMessage validateInput() {
- //errorMessage = null;
- //if (errorMessage != null)
- // displayErrorMessage(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 theNewCmd = cmdText.getText().trim();
- pageComplete = (theNewCmd.length() > 0);
- }
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete() {
- setPageComplete(isPageComplete());
- }
-
- /**
- * Returns the user-edited command
- */
- public String getCommand() {
- return newCmdString;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneHoster.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneHoster.java
deleted file mode 100644
index aaa6d057d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneHoster.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.useractions.ui.compile;
-
-//import org.eclipse.jface.viewers.ISelection;
-//import org.eclipse.jface.viewers.IStructuredSelection;
-//import org.eclipse.jface.viewers.StructuredSelection;
-//import org.eclipse.jface.viewers.ISelection;
-//import org.eclipse.swt.widgets.Control;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The interface that must be implemented for any dialog or property page that wants to
- * host a user action edit pane.
- */
-public interface ISystemCompileCommandEditPaneHoster extends ISystemMessageLine {
- /**
- * Get the shell for this dialog or property page
- */
- public Shell getShell();
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneListener.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneListener.java
deleted file mode 100644
index cb163598d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandEditPaneListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-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 compile command in the SystemCompileCommandEditPane.
- */
-public interface ISystemCompileCommandEditPaneListener {
- /**
- * Callback method. The user has changed the compile command. It may or may not
- * be valid. If not, the given message is non-null. If it is, and you want it,
- * call getSystemCompileCommand() in the edit pane.
- */
- public void compileCommandChanged(SystemMessage message);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandSubstitutor.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandSubstitutor.java
deleted file mode 100644
index 5f8fd3750..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileCommandSubstitutor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.useractions.ui.compile;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.useractions.ui.ISystemSubstitutor;
-
-/**
- * This is the callback from SystemCmdSubstVarList that is used to substitute
- * a particular substitution variable into the given compile command, for the
- * given remote object.
- */
-public interface ISystemCompileCommandSubstitutor extends ISystemSubstitutor {
- /**
- * Reset the connection so one instance can be re-used
- */
- public void setConnection(IHost connection);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileXMLConstants.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileXMLConstants.java
deleted file mode 100644
index f6a175723..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/ISystemCompileXMLConstants.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View (cleanup some use action stuff)
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import org.eclipse.rse.core.RSECorePlugin;
-
-/**
- * Constants used in the persistence of the compile commands, into an xml file
- */
-public interface ISystemCompileXMLConstants {
-
- public static final String COMPILE_COMMAND_PROPRERTY_SET_PREFIX = "CompileCommand."; //$NON-NLS-1$
- public static final String COMPILE_COMMAND_NAME = "Compile Commands"; //$NON-NLS-1$
-
- // root tag
- /**
- * The name of the root element (tag) for the compile types xml file. That element is named "types".
- */
- public static final String ROOT_ELEMENT = "types"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the version number when this document was last written.
- * The xml attribute is named "version".
- */
- public static final String VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
- /**
- * Current version number for the compile framework
- */
- public static final String VERSION_VALUE = RSECorePlugin.CURRENT_RELEASE_NAME; // changed from "5.1.0" by Phil
- /**
- * The name of the copyright element (tag) holding the copyright value. That element is named "copyright".
- */
- public static final String COPYRIGHT_ELEMENT = "copyright"; //$NON-NLS-1$
- /**
- * The data of the copyright element (tag).
- */
- public static final String COPYRIGHT_TEXT = "Copyright (c) IBM Corporation and others 2002, 2007"; //$NON-NLS-1$
- // type tag
- /**
- * The name of the element (tag) containing all the compile command sub-elements (tags) for
- * a source type.
- * <p>
- * The xml element is named "compiletype".
- */
- public static final String TYPE_ELEMENT = "compiletype"; //$NON-NLS-1$
- public static final String SOURCETYPE_ATTRIBUTE = "sourcetype"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the last-used compile command. This value identifies that
- * command via its label value.
- * <p>
- * The xml attribute is named "lastcompilename", for historical reasons (when compile commands
- * were called compile names).
- */
- public static final String LASTUSED_ATTRIBUTE = "lastcompilename"; //$NON-NLS-1$
- // compile name tag
- /**
- * The name of the element (tag) containing all the compile command attributes.
- * The xml element is named "compilename", for historical reasons (when compile commands
- * were called compile names).
- */
- public static final String COMPILECOMMAND_ELEMENT = "compilename"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the compile command label. This is the name the user sees for this
- * compile command. The xml attribute is named "name" for historical reasons (when compile commands
- * were called compile names).
- */
- public static final String LABEL_ATTRIBUTE = "name"; //$NON-NLS-1$
- public static final String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the nature value. This tells the framework if this is
- * an IBM-supplied or user-supplied compile command. The xml attribute is named "nature".
- */
- public static final String NATURE_ATTRIBUTE = "nature"; //$NON-NLS-1$
- /**
- * Value for the compile command nature attribute for IBM-supplied commands: "IBM defined"
- */
- public static final String NATURE_IBM_VALUE = "IBM defined"; //$NON-NLS-1$
- /**
- * Value for the compile command nature attribute for user-supplied commands: "User defined"
- */
- public static final String NATURE_USER_VALUE = "User defined"; //$NON-NLS-1$
- /**
- * Value for the compile command nature attribute for vendor-supplied commands: "ISV defined"
- */
- public static final String NATURE_ISV_VALUE = "ISV defined"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the default string value. This is the IBM-supplied value for
- * support of "Restore Defaults". The xml attribute is named "default".
- */
- public static final String DEFAULT_ATTRIBUTE = "default"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the current string value. This is the potentially user-edited
- * compile command including parameters. The xml attribute is named "current".
- */
- public static final String CURRENT_ATTRIBUTE = "current"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the menu option value. This tells the compile framework if this
- * user action is to displayed in the non-promptable cascading menu, the promptable cascading menu,
- * or both cascading menus. These menus shown in the popup menu for a compilable remote source
- * object.
- * The xml attribute is named "menu".
- */
- public static final String MENU_ATTRIBUTE = "menu"; //$NON-NLS-1$
- /**
- * Value for the compile command menu attribute for prompt-only commands: "Prompt"
- */
- public static final String MENU_PROMPTABLE_VALUE = "Prompt"; //$NON-NLS-1$
- /**
- * Value for the compile command menu attribute for no-prompt-only commands: "NoPrompt"
- */
- public static final String MENU_NON_PROMPTABLE_VALUE = "NoPrompt"; //$NON-NLS-1$
- /**
- * Value for the compile command menu attribute for both prompt and no-prompt commands: "Both"
- */
- public static final String MENU_BOTH_VALUE = "Both"; //$NON-NLS-1$
- /**
- * Value for the compile command menu attribute for neither promptable nor non-promptable commands: "None".
- * These compile commands do not appear in the menu.
- */
- public static final String MENU_NONE_VALUE = "None"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the relative order the compile command is to appear in any
- * list of compile commands: "order"
- */
- public static final String ORDER_ATTRIBUTE = "order"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the job environment value. This is not used in all cases, but those
- * that need it (such as for iSeries IFS which needs to prompt for QSYS vs QSHELL cmd), this is where to
- * store it. The attribute name is "jobenv".
- */
- public static final String JOBENV_ATTRIBUTE = "jobenv"; //$NON-NLS-1$
- /**
- * The name of the attribute holding the id: "id"
- */
- public static final String ID_ATTRIBUTE = "id"; //$NON-NLS-1$
- /**
- * The name of the attribute holding whether the label is editable: "labeleditable"
- */
- public static final String LABEL_EDITABLE_ATTRIBUTE = "labeleditable"; //$NON-NLS-1$
- /**
- * The name of the attribute holding whether the command string is editable: "stringeditable"
- */
- public static final String STRING_EDITABLE_ATTRIBUTE = "stringeditable"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompilableSource.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompilableSource.java
deleted file mode 100644
index 62c44e64f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompilableSource.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * When a user selects a remote compilable source member, and then one of the compile commands
- * from the cascading compile popup menu action, an instance of this class is created to manage
- * the actual running of the compile command against the selected source.
- */
-public class SystemCompilableSource implements Runnable {
- protected Object firstSelection;
- protected boolean isPrompt;
- protected SystemCompileCommand compileCmd;
- protected ISystemRemoteElementAdapter rmtAdapter;
- protected Shell shell;
- protected Viewer viewer;
-
- /**
- * Constructor for SystemCompilableSource.
- * Instantiated by SystemCompileAction.
- * @param shell - the current shell, in case we need it for the prompt dialog or error messages.
- * @param firstSelection - the selected compilable source member
- * @param compileCmd - the Compile Command that is to be run against the selected compilable source member
- * @param isPrompt - true if the user choose the flavor of the action to prompt the compile command
- * @param viewer - the viewer that originated the compile action
- */
- public SystemCompilableSource(Shell shell, Object firstSelection, SystemCompileCommand compileCmd, boolean isPrompt, Viewer viewer) {
- super();
- this.shell = shell;
- this.firstSelection = firstSelection;
- this.compileCmd = compileCmd;
- this.isPrompt = isPrompt;
- this.rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
- this.viewer = viewer;
- }
-
- /**
- * Return the shell as set in the constructor.
- * If this is null, we attempt to get the active shell
- */
- public Shell getShell() {
- if (shell != null)
- return shell;
- else {
- shell = SystemBasePlugin.getActiveWorkbenchShell();
- if (shell == null) {
- shell = Display.getCurrent().getActiveShell();
- if (shell == null) {
- Shell[] shells = Display.getCurrent().getShells();
- for (int i = 0; (i < shells.length) && (shell == null); i++)
- if (!shells[i].isDisposed() && shells[i].isEnabled()) shell = shells[i];
- }
- }
- return shell;
- }
- }
-
- /**
- * Return the selected compilable remote source object we are to compile
- */
- protected Object getSelectedObject() {
- return firstSelection;
- }
-
- /**
- * Return the compile command to compile the selected source object with.
- */
- protected SystemCompileCommand getCompileCommand() {
- return compileCmd;
- }
-
- /**
- * Return if the compile command is to be prompted or not
- */
- protected boolean isPrompt() {
- return isPrompt;
- }
-
- /**
- * Return the remote adapter for the currently selected compilable remote source object
- */
- protected ISystemRemoteElementAdapter getRemoteAdapter() {
- return rmtAdapter;
- }
-
- /**
- * Return the source type of this remote object
- */
- public String getSourceType() {
- return rmtAdapter.getRemoteSourceType(firstSelection);
- }
-
- /**
- * Return the system connection from the which the selected object came from
- */
- public IHost getSystemConnection() {
- return getSubSystem().getHost();
- }
-
- /**
- * Return the subsystem which is responsible for producing the remote object.
- */
- protected ISubSystem getSubSystem() {
- return rmtAdapter.getSubSystem(firstSelection);
- }
-
- /**
- * Return the command subsystem for the remote connection. Typically needed to actually run the
- * compile command.
- */
- protected IRemoteCmdSubSystem getCommandSubSystem() {
- return RemoteCommandHelpers.getCmdSubSystem(getSubSystem().getHost());
- }
-
- /**
- * Return the substitution variable list. Called by runCompileCommand default implementation.
- * By default, returns it from the SystemCompileManager, but you can override if you have your
- * own list.
- */
- protected SystemCmdSubstVarList getSubstitutionVariableList() {
- SystemCompileManager mgr = compileCmd.getParentType().getParentProfile().getParentManager();
- mgr.setCurrentCompileCommand(compileCmd); // defect 47808
- SystemCmdSubstVarList varlist = mgr.getSubstitutionVariableList();
- mgr.setCurrentCompileCommand(null); // defect 47808
- return varlist;
- }
-
- /**
- * Return the substitutor for doing variable substitution. Called by runCompileCommand default implementation.
- * By default, returns it from the SystemCompileManager, but you can override if you have your
- * own list.
- */
- protected ISystemCompileCommandSubstitutor getSubstitutor() {
- SystemCompileManager mgr = compileCmd.getParentType().getParentProfile().getParentManager();
- mgr.setCurrentCompileCommand(compileCmd); // defect 47808
- // if not called by the compile action, system connection is not set, so set it here
- if (mgr.getSystemConnection() == null) mgr.setSystemConnection(getSystemConnection());
- ISystemCompileCommandSubstitutor substitutor = compileCmd.getParentType().getParentProfile().getParentManager().getSubstitutor();
- mgr.setCurrentCompileCommand(null); // defect 47808
- return substitutor;
- }
-
- /**
- * Run the compile command against the selected source.
- * Do not override this directly, as it tries to handle the prompting first.
- * Rather, override internalPromptCompileCommand(String) and internalRunCompileCommand(String)
- */
- public boolean runCompileCommand() {
- //String originalString = compileCmd.getCurrentString();
- String substitutedString = getSubstitutedString(compileCmd, firstSelection, getSubstitutor());
- if (isPrompt()) {
- substitutedString = internalPromptCompileCommand(substitutedString);
- if (substitutedString == null || substitutedString.trim().equals("")) //$NON-NLS-1$
- return false;
- }
- //System.out.println("Running compile command...");
- //System.out.println("...original cmd: '" + originalString + "'");
- //System.out.println("...final cmd...: '" + substitutedString + "'");
- return internalRunCompileCommand(substitutedString);
- }
-
- /**
- * Given the compile command, the selected source object, do the variable substitution.
- * This can be overridden if needed. The default implementation here is:
- * <pre><code>
- * return compileCmd.doVariableSubstitution(firstSelection, substitutor);
- * </code></pre>
- */
- protected String getSubstitutedString(SystemCompileCommand compileCmd, Object firstSelection, ISystemCompileCommandSubstitutor substitutor) {
- return compileCmd.doVariableSubstitution(firstSelection, substitutor);
- }
-
- /**
- * After the substituting and the prompting, it is now time to the remote running of the
- * fully resolved compile command. Do that here.
- * <p>
- * Must be overridden.
- * @return true if all is well, false if something went wrong. This prevents the next compile from running
- */
- protected boolean internalRunCompileCommand(String compileCmd) {
- return true;
- }
-
- /**
- * When running a compile command from the prompt menu, we prompt the command. This is the
- * method that does this prompt. Override if appropriate, else a simple dialog is presented
- * to the user showing the substituted compile command and allowing them to change it.
- * <p>
- * By default, this uses the SystemPromptCompileCommandDialog dialog to prompt the user to change
- * the compile command.
- */
- protected String internalPromptCompileCommand(String substitutedCompileCommand) {
- String promptedCmd = substitutedCompileCommand;
- SystemPromptCompileCommandDialog promptDlg = new SystemPromptCompileCommandDialog(shell, substitutedCompileCommand);
- promptDlg.open();
- if (!promptDlg.wasCancelled())
- promptedCmd = promptDlg.getCommand();
- else
- promptedCmd = null;
- return promptedCmd;
- }
-
- /**
- * The run() method for running code in a thread. This is empty by default, but we include it
- * for your convenience to save adding "implements Runnable" in your subclass. Override if
- * using threads or asynchExec.
- */
- public void run() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java
deleted file mode 100644
index a2742d387..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.internal.useractions.api.files.compile.ISystemCompileManagerAdapter;
-import org.eclipse.rse.internal.useractions.api.ui.compile.SystemCompileAction;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
-import org.eclipse.rse.ui.actions.SystemBaseDummyAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A cascading submenu action for "Compile->".
- * This is after the first cascade, which lists profiles.
- * Here, for that profile, we list actions
- */
-public class SystemCompileCascadeByProfileAction extends SystemBaseSubMenuAction implements IMenuListener {
- private ISystemProfile profile;
- private Object firstSelection;
- private boolean isPrompt;
-
- /**
- * Constructor.
- */
- public SystemCompileCascadeByProfileAction(Shell shell, Object firstSelection, ISystemProfile profile, boolean isPrompt) {
- super(profile.getName(), RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID), shell);
- this.profile = profile;
- this.firstSelection = firstSelection;
- this.isPrompt = isPrompt;
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- //this.setTest(true);
- }
-
- /**
- * @see org.eclipse.rse.ui.actions.SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu) {
- //System.out.println("Inside populateSubMenu for SystemUDACascadeByProfileAction");
- menu.addMenuListener(this);
- menu.setRemoveAllWhenShown(true);
- //menu.setEnabled(true);
- menu.add(new SystemBaseDummyAction());
- return menu;
- }
-
- /**
- * Called when submenu is about to show. Called because we
- * implement IMenuListener, and registered ourself for this event.
- */
- public void menuAboutToShow(IMenuManager ourSubMenu) {
- //System.out.println("Inside menuAboutToShow for SystemUDACascadeByProfileAction");
- Shell shell = getShell();
- populateMenuWithCompileActions(ourSubMenu, shell, profile, firstSelection, isPrompt);
- }
-
- /**
- * 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 ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) {
- return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
- }
-
- /**
- * Re-usable method to populate a sub-menu with compile actions...
- */
- public static IMenuManager populateMenuWithCompileActions(IMenuManager ourSubMenu, Shell shell, ISystemProfile profile, Object firstSelection, boolean isPrompt) {
- String srcType = null;
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
- if (rmtAdapter != null) {
- srcType = rmtAdapter.getRemoteSourceType(firstSelection);
- if (srcType == null)
- srcType = "null"; //$NON-NLS-1$
- else if (srcType.equals("")) //$NON-NLS-1$
- srcType = "blank"; //$NON-NLS-1$
- } else
- return ourSubMenu; // should never happen
- ISubSystem subsystem = rmtAdapter.getSubSystem(firstSelection);
- ISubSystemConfiguration ssc = subsystem.getSubSystemConfiguration();
-
- SystemCompileManager compileManager = null;
-
- if (firstSelection instanceof IAdaptable) {
- ISystemCompileManagerAdapter adapter = (ISystemCompileManagerAdapter)((IAdaptable)firstSelection).getAdapter(ISystemCompileManagerAdapter.class);
- if (null != adapter)
- {
- compileManager = adapter.getSystemCompileManager(ssc);
- }
- }
-
- if (null != compileManager)
- {
- SystemCompileManager thisCompileManager = compileManager;
- SystemCompileProfile compileProfile = thisCompileManager.getCompileProfile(profile);
- // compileProfile.addContributions(firstSelection);
- SystemCompileType compileType = compileProfile.getCompileType(srcType);
-
- if (compileType != null)
- {
- SystemCompileCommand[] cmds = compileType.getCompileCommandsArray();
- for (int idx=0; idx<cmds.length; idx++)
- {
- SystemCompileAction action = new SystemCompileAction(shell, cmds[idx], isPrompt);
- ourSubMenu.add(action);
- }
- }
- }
-
- return ourSubMenu;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommand.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommand.java
deleted file mode 100644
index c46881461..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommand.java
+++ /dev/null
@@ -1,440 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562][api] dont implement ISystemCompileXMLConstants
- * Martin Oberhuber (Wind River) - [219975] Fix implementations of clone()
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-
-/**
- * A compile command is represents a command that can be run on a remote system for the
- * explicit purpose of compiling selected source members.
- * <p>
- * The attributes of a compile command include:
- * <ul>
- * <li>Nature. Either IBM-supplied or user defined. See {@link #setNature(String)} and {@link #getNature()}
- * <li>Label. The visual name the user sees, representing this compile command. See {@link #setLabel(String)} and {@link #getLabel()}
- * <li>DefaultString. The default IBM-supplied compile command (with parms) for support of restore defaults. See {@link #setDefaultString(String)} and {@link #getDefaultString()}
- * <li>CurrentString. The current potentially user-edited compile command (with parms) for support of restore defaults.
- * See {@link #setCurrentString(String)} and {@link #getCurrentString()}
- * <li>MenuOption. Identifies what compile popup menu this command appears in, if any.
- * See {@link #setMenuOption(String)} and {@link #getMenuOption()} and {@link #isPromptable()} and {@link #isNonPromptable()}.
- * <li>Option. This compile commands position within the list of compile commands for a given compile type.
- * See {@link #setOrder(int)} and {@link #getOrder()}
- * <li>JobEnvironment. This is available for subsystems that need it, and they decide what to put in this attribute.
- * </ul>
- */
-public class SystemCompileCommand implements Cloneable, IAdaptable {
- private SystemCompileType parentType; // reference to parent type
- private String nature;
- private String id;
- private String label;
- private String defaultString;
- private String currentString;
- private String menuOption;
- private String jobEnv;
- private int order;
- private boolean isLabelEditable = true;
- private static final String ID_IBM_PREFIX = "com.ibm"; //$NON-NLS-1$
- private static final String ID_USER_PREFIX = "user"; //$NON-NLS-1$
-
- /**
- * Constructor for SystemCompileCommand
- */
- public SystemCompileCommand(SystemCompileType parentType) {
- super();
- setParentType(parentType);
- setMenuOptionBoth();
- }
-
- /**
- * Constructor for SystemCompileCommand. Id and label must be a unique value.
- */
- public SystemCompileCommand(SystemCompileType parentType, String id, String label, String nature, String defaultString, String currentString, String menuOption, int order) {
- super();
- setParentType(parentType);
- setId(id);
- setLabel(label);
- setNature(nature);
- setDefaultString(defaultString);
- setCurrentString(currentString);
- setMenuOption(menuOption);
- setOrder(order);
- // if the given id is null, then try to configure it automatically.
- // This is only good for IBM and user supplied commands.
- // We assume ISV supplied commands have unique ids.
- if (id == null) {
- configureId();
- }
- }
-
- /**
- * Sets the parent type
- * @param parentType the parent type
- */
- public void setParentType(SystemCompileType parentType) {
- this.parentType = parentType;
- }
-
- /**
- * Get the parent type
- * @return the parent type
- */
- public SystemCompileType getParentType() {
- return parentType;
- }
-
- /**
- * Set the id. This is the unique id of the compile command.
- * @param identifier the id
- */
- public void setId(String identifier) {
- this.id = identifier;
- }
-
- /**
- * Get the id.
- * @return the unique id.
- */
- public String getId() {
- return id;
- }
-
- /**
- * Sets the id automatically. This only works for IBM supplied or user supplied commands. It does
- * not work with ISV supplied commands. ISVs should set their own unique id.
- */
- private void configureId() {
- if (nature != null && label != null) {
- if (isIBMSupplied()) {
- setId(ID_IBM_PREFIX + "." + label); //$NON-NLS-1$
- } else if (isUserSupplied()) {
- setId(ID_USER_PREFIX + "." + label); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Set the label. This is the visual name the user sees in the compile command list.
- * @param name the label
- */
- public void setLabel(String name) {
- this.label = name;
- configureId(); // Id may change as a result
- }
-
- /**
- * Get the label. This is the visual name the user sees in the compile command list.
- * @return the label
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Set the nature: either IBM-supplied or user defined.
- * @param nature Typically one of {#link ISystemCompileXMLConstants#NATURE_IBM_VALUE} or {#link ISystemCompileXMLConstants#NATURE_USER_VALUE}
- * @see #setIsIBMSupplied()
- * @see #setIsUserSupplied()
- * @see #setIsISVSupplied()
- */
- public void setNature(String nature) {
- this.nature = nature;
- configureId(); // Id may change as a result
- // For IBM and User supplied commands, we set editability parameters. We do this here because it's convenient.
- // During a copy and paste of an IBM supplied command, nature of newly created command is user supplied,
- // and so label becomes editable.
- if (isIBMSupplied()) {
- setLabelEditable(false);
- setCommandStringEditable(true);
- } else if (isUserSupplied()) {
- setLabelEditable(true);
- setCommandStringEditable(true);
- }
- }
-
- /**
- * Indicate this is IBM supplied. This sets the nature to {#link ISystemCompileXMLConstants#NATURE_IBM_VALUE}
- */
- public void setIsIBMSupplied() {
- setNature(ISystemCompileXMLConstants.NATURE_IBM_VALUE);
- }
-
- /**
- * Indicate this is user supplied. This sets the nature to {#link ISystemCompileXMLConstants#NATURE_USER_VALUE}
- */
- public void setIsUserSupplied() {
- setNature(ISystemCompileXMLConstants.NATURE_USER_VALUE);
- }
-
- /**
- * Indicate this is ISV supplied. This sets the nature to {#link ISystemCompileXMLConstants#NATURE_ISV_VALUE}
- */
- public void setIsISVSupplied() {
- setNature(ISystemCompileXMLConstants.NATURE_ISV_VALUE);
- }
-
- /**
- * Get the nature: either IBM-supplied or user defined.
- * @return the nature. One of {#link ISystemCompileXMLConstants#NATURE_IBM_VALUE} or {#link ISystemCompileXMLConstants#NATURE_USER_VALUE}
- * @see #isIBMSupplied()
- * @see #isUserSupplied()
- */
- public String getNature() {
- return nature;
- }
-
- /**
- * Return true if this is an IBM-supplied type. If false it is user or ISV supplied.
- */
- public boolean isIBMSupplied() {
- return nature.equals(ISystemCompileXMLConstants.NATURE_IBM_VALUE);
- }
-
- /**
- * Return true if this is an user-supplied type. If false it is IBM or ISV supplied.
- */
- public boolean isUserSupplied() {
- return nature.equals(ISystemCompileXMLConstants.NATURE_USER_VALUE);
- }
-
- /**
- * Return true if this is an ISV-supplied type. If false it is IBM or user supplied.
- */
- public boolean isISVSupplied() {
- return nature.equals(ISystemCompileXMLConstants.NATURE_ISV_VALUE);
- }
-
- /**
- * Set the default string. This is the IBM-supplied compile command (with parameters) that is restored when "Restore Defaults" is pressed.
- * @param defaultString the default string
- */
- public void setDefaultString(String defaultString) {
- //this.defaultString = defaultString.toUpperCase(); // now leave it up to GUI to do massaging
- this.defaultString = defaultString;
- }
-
- /**
- * Get the default string. This is the IBM-supplied compile command (with parameters) that is restored when "Restore Defaults" is pressed.
- * @return the default string
- */
- public String getDefaultString() {
- return defaultString;
- }
-
- /**
- * Set the current string. This is the current value of the compile command (with parameters).
- * @param currentString the current string
- */
- public void setCurrentString(String currentString) {
- //this.currentString = currentString.toUpperCase(); now leave it up to GUI to massage command string
- this.currentString = currentString;
- }
-
- /**
- * Get the current string. This is the current value of the compile command (with parameters).
- * @return the current string
- */
- public String getCurrentString() {
- return currentString;
- }
-
- /**
- * Set the menu option. Dictates in what popup menu, if any, this compile command appears in.
- * @param menuOption the menu option.
- * One of {#link ISystemCompileXMLConstants#MENU_PROMPTABLE_VALUE}
- * or {#link ISystemCompileXMLConstants#MENU_NON_PROMPTABLE_VALUE}
- * or {#link ISystemCompileXMLConstants#MENU_BOTH_VALUE}
- * or {#link ISystemCompileXMLConstants#MENU_NONE_VALUE}
- */
- public void setMenuOption(String menuOption) {
- this.menuOption = menuOption;
- }
-
- /**
- * Fastpath to setting the menu option to both, which is the typical case
- */
- public void setMenuOptionBoth() {
- setMenuOption(ISystemCompileXMLConstants.MENU_BOTH_VALUE);
- }
-
- /**
- * Get the menu option. Dictates in what popup menu, if any, this compile command appears in.
- * @return the menu option:
- * One of {#link ISystemCompileXMLConstants#MENU_PROMPTABLE_VALUE}
- * or {#link ISystemCompileXMLConstants#MENU_NON_PROMPTABLE_VALUE}
- * or {#link ISystemCompileXMLConstants#MENU_BOTH_VALUE}
- * or {#link ISystemCompileXMLConstants#MENU_NONE_VALUE}
- */
- public String getMenuOption() {
- return menuOption;
- }
-
- /**
- * Set the order. That is, this compile commands position within the list of compile commands for a given compile type.
- * @returns the compile command's order or position.
- */
- public void setOrder(int order) {
- this.order = order;
- }
-
- /**
- * Get the order. That is, this compile commands position within the list of compile commands for a given compile type.
- * @return the order or position.
- */
- public int getOrder() {
- return order;
- }
-
- /**
- * Returns if it is promptable. Queries the value of the menuOption attribute.
- *
- * @return true if promptable, false otherwise
- */
- public boolean isPromptable() {
- if (menuOption.equals(ISystemCompileXMLConstants.MENU_BOTH_VALUE) || menuOption.equals(ISystemCompileXMLConstants.MENU_PROMPTABLE_VALUE))
- return true;
- else
- return false;
- }
-
- /**
- * Returns if it is non-promptable. Queries the value of the menuOption attribute.
- */
- public boolean isNonPromptable() {
- if (menuOption.equals(ISystemCompileXMLConstants.MENU_BOTH_VALUE) || menuOption.equals(ISystemCompileXMLConstants.MENU_NON_PROMPTABLE_VALUE))
- return true;
- else
- return false;
- }
-
- /**
- * Set the job environment property. This is subsystem specific, and not used by all subsystems.
- */
- public void setJobEnvironment(String jobenv) {
- this.jobEnv = jobenv;
- }
-
- /**
- * Get the job environment property.
- */
- public String getJobEnvironment() {
- return jobEnv;
- }
-
- /**
- * Sets whether the label is editable in the Work With Compile Commands dialog.
- */
- public void setLabelEditable(boolean editable) {
- isLabelEditable = editable;
- }
-
- /**
- * Gets whether the label is editable in the Work With Compile Commands dialog.
- */
- public boolean isLabelEditable() {
- return isLabelEditable;
- }
-
- /**
- * Sets whether the command string is editable in the Work With Compile Commands dialog.
- */
- public void setCommandStringEditable(boolean editable) {
- }
-
- /**
- * Gets whether the command string is editable in the Work With Compile Commands dialog.
- */
- public boolean isCommandStringEditable() {
- // return isCommandStringEditable;
- return true; // for 5.1, all command strings are editable
- // TODO: For V6, think about the scenario when it's false
- // how do we handle that in the various dialogs?
- }
-
- /**
- * Clone the object: creates a new compile command and copies all its attributes.
- *
- * During the process of cloning, the Nature is always set to be
- * User-supplied - so even if an IBM-Supplied compile command is cloned,
- * the result will be treated as User-supplied.
- *
- * Subclasses must ensure that such a deep copy operation is always
- * possible, so their state must always be cloneable. Which should
- * always be possible to achieve, since this Object also needs to be
- * serializable. If a subclass adds additional complex attributes,
- * this method should be subclassed to clone those attributes.
- */
- public Object clone() {
- ////Old invalid method of cloning does not maintain runtime type
- //SystemCompileCommand clone = new SystemCompileCommand(getParentType(), getId(), getLabel(), ISystemCompileXMLConstants.NATURE_USER_VALUE, null, getCurrentString(), getMenuOption(), getOrder());
- SystemCompileCommand clone = null;
- try {
- clone = (SystemCompileCommand)super.clone();
- } catch(CloneNotSupportedException e) {
- //assert false; //can never happen
- throw new RuntimeException(e);
- }
- clone.setNature(ISystemCompileXMLConstants.NATURE_USER_VALUE);
- clone.setDefaultString(null);
- clone.configureId();
- if (jobEnv != null) clone.setJobEnvironment(jobEnv);
- return clone;
- }
-
- /**
- * Print the full command string to standard out, for debugging purposes
- */
- public void printCommand(String indent) {
- System.out.println(indent + "Label: '" + label + "', Cmd: '" + currentString + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /**
- * Do substitution of any variables found in the compile command, using the given
- * remote source object. It is the responsibility of the caller of this method to
- * supply a "substitutor" that has knowledge of the supported substitution variables
- * for these compile commands. Each implementation will override the substitutor
- * interface to support the necessary getters for resolving their supported variables.
- * <p>
- * This method retrieves the substitution variable list from the compile manager, and
- * then calls doSubstitutions in it. This in turn will call back to the supplied substitutor
- * for each match it finds in compile string, of a variable in its list.
- */
- public String doVariableSubstitution(Object remoteObject, ISystemCompileCommandSubstitutor substitutor) {
- SystemCompileManager mgr = parentType.getParentProfile().getParentManager();
- mgr.setCurrentCompileCommand(this); // defect 47808
- SystemCmdSubstVarList substVarList = mgr.getSubstitutionVariableList();
- String substitutedString = substVarList.doSubstitutions(getCurrentString(), remoteObject, substitutor);
- mgr.setCurrentCompileCommand(null); // defect 47808
- //System.out.println("mgr class = " + mgr.getClass().getName());
- //System.out.println("substVL class = " + substVarList.getClass().getName());
- //System.out.println("substitutor class = " + substitutor.getClass().getName());
- return substitutedString;
- }
-
- /**
- * Return this object as a string.
- */
- public String toString() {
- return getCurrentString();
- }
-
- /**
- * 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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionCopy.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionCopy.java
deleted file mode 100644
index e03bd8f43..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionCopy.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The action is used within the Work With Compile Commands dialog, in the context menu of the selected compile command.
- * It is used to copy the selected compile command to the clipboard for subsequent paste.
- */
-public class SystemCompileCommandActionCopy extends SystemBaseAction {
- private SystemWorkWithCompileCommandsDialog parentDialog;
-
- /**
- * Constructor
- */
- public SystemCompileCommandActionCopy(SystemWorkWithCompileCommandsDialog parentDialog) {
- super(SystemUDAResources.RESID_WWCOMPCMDS_ACTION_COPY_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_ACTION_COPY_TOOLTIP, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_TOOL_COPY), null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc2000"); //$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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionDelete.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionDelete.java
deleted file mode 100644
index c6d6a8fff..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionDelete.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The action is used within the Work With Compile Commands dialog, in the context menu of the selected compile command.
- * It is used to delete the selected compile command.
- */
-public class SystemCompileCommandActionDelete extends SystemBaseAction {
- private SystemWorkWithCompileCommandsDialog parentDialog;
-
- /**
- * Constructor
- */
- public SystemCompileCommandActionDelete(SystemWorkWithCompileCommandsDialog parentDialog) {
- super(SystemUDAResources.RESID_WWCOMPCMDS_ACTION_DELETE_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_ACTION_DELETE_TOOLTIP, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_TOOL_DELETE), null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc1000"); //$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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveDown.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveDown.java
deleted file mode 100644
index 148daf866..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveDown.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-
-/**
- * The action is used within the Work With Compile Commands dialog, in the context menu of the selected compile command.
- * It is used to move the selected compile command up by one in the list.
- */
-public class SystemCompileCommandActionMoveDown extends SystemBaseAction {
- private SystemWorkWithCompileCommandsDialog parentDialog;
-
- /**
- * Constructor
- */
- public SystemCompileCommandActionMoveDown(SystemWorkWithCompileCommandsDialog parentDialog) {
- super(SystemUDAResources.RESID_WWCOMPCMDS_ACTION_MOVEDOWN_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_ACTION_MOVEDOWN_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc5000"); //$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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveUp.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveUp.java
deleted file mode 100644
index 098089310..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionMoveUp.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-
-/**
- * The action is used within the Work With Compile Commands dialog, in the context menu of the selected compile command.
- * It is used to move the selected compile command down by one in the list
- */
-public class SystemCompileCommandActionMoveUp extends SystemBaseAction {
- private SystemWorkWithCompileCommandsDialog parentDialog;
-
- /**
- * Constructor
- */
- public SystemCompileCommandActionMoveUp(SystemWorkWithCompileCommandsDialog parentDialog) {
- super(SystemUDAResources.RESID_WWCOMPCMDS_ACTION_MOVEUP_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_ACTION_MOVEUP_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc4000"); //$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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionPaste.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionPaste.java
deleted file mode 100644
index 27e9b96d2..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionPaste.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The action is used within the Work With Compile Commands dialog, in the context menu of the selected compile command.
- * It is used to paste the copied compile command from the clipboard to the list.
- */
-public class SystemCompileCommandActionPaste extends SystemBaseAction {
- private SystemWorkWithCompileCommandsDialog parentDialog;
-
- /**
- * Constructor
- */
- public SystemCompileCommandActionPaste(SystemWorkWithCompileCommandsDialog parentDialog) {
- super(SystemUDAResources.RESID_WWCOMPCMDS_ACTION_PASTE_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_ACTION_PASTE_TOOLTIP, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_TOOL_PASTE), null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc3000"); //$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();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionRestoreDefaults.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionRestoreDefaults.java
deleted file mode 100644
index b5c047c94..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandActionRestoreDefaults.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-
-/**
- * The action is used within the Work With Compile Commands dialog, in the context menu
- * of the selected compile command.
- * It is used to restore shipped defaults of the selected IBM-supplied compile command.
- */
-public class SystemCompileCommandActionRestoreDefaults extends SystemBaseAction {
- private SystemWorkWithCompileCommandsDialog parentDialog;
-
- /**
- * Constructor
- */
- public SystemCompileCommandActionRestoreDefaults(SystemWorkWithCompileCommandsDialog parentDialog) {
- super(SystemUDAResources.RESID_WWCOMPCMDS_ACTION_RESTORE_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_ACTION_RESTORE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptorFromIDE(
- ISystemIconConstants.ICON_IDE_REFRESH_ID), null);
- allowOnMultipleSelection(false);
- this.parentDialog = parentDialog;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc6000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is an IBM-supplied compile command
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentDialog.canRestore();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentDialog.doRestore();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandContentProvider.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandContentProvider.java
deleted file mode 100644
index fda07183a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandContentProvider.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Content provider for the list viewer in the Work With Compile Commands dialog.
- */
-public class SystemCompileCommandContentProvider implements IStructuredContentProvider {
- /**
- * Constructor for SystemCompileCommandContentProvider.
- */
- public SystemCompileCommandContentProvider() {
- super();
- }
-
- /**
- * @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 null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java
deleted file mode 100644
index 5365019a2..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java
+++ /dev/null
@@ -1,677 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- *******************************************************************************/
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.internal.useractions.ui.ISystemCommandTextAdditionalGUIProvider;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.SystemCommandTextField;
-import org.eclipse.rse.internal.useractions.ui.SystemCommandViewerConfiguration;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorCompileCommandLabel;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.view.ISystemCommandTextModifyListener;
-import org.eclipse.rse.ui.ISystemMassager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-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.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
- * compile command. This edit pane is used in the Work With Compile Commands dialog.
- * <p>
- * 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 SystemCompileCommand 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 SystemCompileCommand
- * <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>setSubSystem ... no need to ever override
- * <li>setCompileCommandValidator ... 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>getCompileCommand ... you will typically override
- * <li>areFieldsComplete ... you will typically override
- * </ul>
- */
-public class SystemCompileCommandEditPane implements SelectionListener, ISystemCommandTextAdditionalGUIProvider, ISystemCommandTextModifyListener {
- // inputs
- protected Shell shell;
- protected ISystemCompileCommandEditPaneHoster hoster;
- protected SystemCompileManager compileManager;
- protected SystemCompileCommand inputCompileCommand;
- protected SystemCompileType parentCompileType;
- protected Vector listeners = new Vector();
- protected SystemCmdSubstVarList varList;
- protected boolean newMode = true;
- protected boolean ignoreChanges;
- // default GUI
- protected Label labelLabel;
- protected Text textLabel;
- protected SystemCommandTextField commandField;
- // state
- protected SystemMessage errorMessage;
- protected boolean skipEventFiring;
- protected boolean fromVerify;
- protected boolean caseSensitive;
- protected Control controlInError = null;
- // validators
- protected ISystemValidator cmdLabelValidator;
-
- /**
- * Constructor
- * @param compileManager - the compile manager owner of this compile command
- * @param shell - the shell of the wizard or dialog host this
- * @param owner - the dialog or property page hosting this edit pane
- * @param caseSensitive - whether the file system is case sensitive for where this compile command will run. Usually from isCaseSensitive() of a subsystem factory.
- */
- public SystemCompileCommandEditPane(SystemCompileManager compileManager, Shell shell, ISystemCompileCommandEditPaneHoster owner, boolean caseSensitive) {
- super();
- this.compileManager = compileManager;
- this.shell = shell;
- this.caseSensitive = caseSensitive;
- this.commandField = new SystemCommandTextField(getCommandTextViewerConfiguration());
- this.commandField.setSubstitutionVariableList(compileManager.getSubstitutionVariableList());
- this.hoster = owner;
- }
-
- // ------------------------------
- // HELPER METHODS...
- // ------------------------------
- /**
- * Return the shell given us in the ctor
- */
- protected Shell getShell() {
- return shell;
- }
-
- /**
- * Return the input compile command as given us in setCompileCommand
- */
- protected SystemCompileCommand getInputCompileCommand() {
- return inputCompileCommand;
- }
-
- /**
- * For subclasses: return the input compile manager
- */
- protected SystemCompileManager getCompileManager() {
- return compileManager;
- }
-
- /**
- * For subclasses within the subsystem factory framework: return the system connection
- * within which this dialog was launched.
- */
- protected IHost getSystemConnection() {
- return compileManager.getSystemConnection();
- }
-
- // ------------------------------
- // CONFIGURATION/INPUT METHODS...
- // ------------------------------
- /**
- * Set the validator to use for the compile command. By default, ValidatorCompileCommandLabel is used.
- */
- public void setCompileLabelValidator(ISystemValidator validator) {
- this.cmdLabelValidator = validator;
- }
-
- /**
- * 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;
- commandField.setIgnoreChanges(ignoreChanges);
- }
-
- /**
- * Identify a listener interested in any changes made to the filter string,
- * as they happen
- */
- public void addChangeListener(ISystemCompileCommandEditPaneListener l) {
- listeners.add(l);
- }
-
- /**
- * Remove a listener interested in any changes made to the filter string,
- * as they happen
- */
- public void removeChangeListener(ISystemCompileCommandEditPaneListener l) {
- listeners.remove(l);
- }
-
- /**
- * Set the action command validator. This is called per keystroke as
- * the user types the command.
- */
- public void setCommandValidator(ISystemValidator validator) {
- commandField.setCommandValidator(validator);
- }
-
- /**
- * Set the action command massager. This is called before saving the
- * command to the persistent store, to allow for massaging what the
- * user typed, such as doing intelligent uppercasing.
- */
- public void setCommandMassager(ISystemMassager massager) {
- commandField.setCommandMassager(massager);
- }
-
- /**
- * Set the substitution variable list that Insert Variable will use.
- */
- public void setSubstitutionVariableList(SystemCmdSubstVarList varList) {
- commandField.setSubstitutionVariableList(varList);
- }
-
- /**
- * For child classes to return their own subclasses of the default configurator
- * used to enable proposal support in the command entry field.
- */
- protected SystemCommandViewerConfiguration getCommandTextViewerConfiguration() {
- return new SystemCommandViewerConfiguration();
- }
-
- /**
- * For child classes (such as iSeries IFS) that need to dynamically change the command
- * entry field configuration, on the fly.
- */
- protected void setCommandTextViewerConfiguration(SystemCommandViewerConfiguration cmdAssistant) {
- commandField.setCommandTextViewerConfiguration(cmdAssistant);
- }
-
- // ------------------------------
- // LIFECYCLE METHODS...
- // ------------------------------
- /**
- * Set the input filter string, in edit mode.
- * Or pass null if reseting to new mode.
- */
- public void setCompileCommand(SystemCompileType parentCompileType, SystemCompileCommand compileCommand) {
- this.inputCompileCommand = compileCommand;
- //System.out.println("inside setCompileCommand: input null? " + (compileCommand==null));
- this.parentCompileType = parentCompileType;
- if ((parentCompileType != null) && (cmdLabelValidator instanceof ISystemValidatorUniqueString)) {
- Vector existingLabels = parentCompileType.getExistingLabels();
- if (compileCommand != null) existingLabels.removeElement(compileCommand.getLabel());
- ((ISystemValidatorUniqueString) cmdLabelValidator).setExistingNamesList(existingLabels);
- }
- newMode = (compileCommand == null);
- setIgnoreChanges(true);
- resetFields();
- if (compileCommand != null) doInitializeFields();
- enableExtraButtons();
- if (newMode)
- resetExtraButtonsForNewMode();
- else
- resetExtraButtons(compileCommand);
- setIgnoreChanges(false);
- }
-
- /**
- * Save all pending changes. Called by dialog when user Presses Apply.
- * @return new or updated compile command object. Caller must call writeToDisk() on the parent SystemCompileProfile object
- */
- public SystemCompileCommand saveChanges() {
- String cmdLabel = textLabel.getText().trim();
- if (cmdLabel.length() == 0) return null;
- String cmdString = commandField.getMassagedCommandText();
- if (cmdString.length() == 0) return null;
- cmdString = preSaveMassage(cmdString);
- SystemCompileCommand currentCmd = inputCompileCommand;
- if (currentCmd == null) // new mode? Must create the new compile command object
- {
- currentCmd = new SystemCompileCommand(parentCompileType);
- currentCmd.setDefaultString(cmdString);
- currentCmd.setIsUserSupplied();
- } else if (commandField.getCommandMassager() != null) {
- setIgnoreChanges(true); // disable modify listeners
- setCommandText(cmdString);
- setIgnoreChanges(false); // re-enable modify listeners
- }
- if (!caseSensitive) {
- //cmdLabel = cmdLabel.toUpperCase(); I0 decision not to do this anymore
- //cmdString = cmdString.toUpperCase(); we use a massager now
- }
- currentCmd.setLabel(cmdLabel);
- currentCmd.setCurrentString(cmdString);
- processExtraButtonsChanges(currentCmd); // allow subclasses to save their extra data
- /*
- String option = null;
- if (yesPromptButton.getSelection() && noPromptButton.getSelection())
- option = ISystemCompileXMLConstants.MENU_BOTH_VALUE;
- else if (yesPromptButton.getSelection() && !noPromptButton.getSelection())
- option = ISystemCompileXMLConstants.MENU_PROMPTABLE_VALUE;
- else if (!yesPromptButton.getSelection() && noPromptButton.getSelection())
- option = ISystemCompileXMLConstants.MENU_NON_PROMPTABLE_VALUE;
- else
- option = ISystemCompileXMLConstants.MENU_NONE_VALUE;
- currentCmd.setMenuOption(option);
- */
- return currentCmd;
- }
-
- /**
- * Opportunity for subclasses to perform any additional massaging of the
- * user-entered command string, just prior to saving it.
- */
- protected String preSaveMassage(String commandString) {
- return commandString;
- }
-
- /**
- * In the Work With dialog, this edit pane is shown on the right side, beside
- * the compile command selection list. Above it is a label, that shows something
- * like "Selected Compile Command" in edit mode, or "New Compile Command" 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.
- */
- public void configureHeadingLabel(Label label) {
- if (!newMode) {
- label.setText(SystemUDAResources.RESID_WWCOMPCMDS_EDITCMD_LABEL);
- label.setToolTipText(SystemUDAResources.RESID_WWCOMPCMDS_EDITCMD_TOOLTIP);
- } else {
- label.setText(SystemUDAResources.RESID_WWCOMPCMDS_NEWCMD_LABEL);
- label.setToolTipText(SystemUDAResources.RESID_WWCOMPCMDS_NEWCMD_TOOLTIP);
- }
- }
-
- /**
- * Populate the pane with the GUI widgets
- * @param parent of the pane
- * @return Control
- */
- public Control createContents(Composite parent) {
- if (cmdLabelValidator == null) cmdLabelValidator = new ValidatorCompileCommandLabel();
- if (cmdLabelValidator instanceof ISystemValidatorUniqueString) ((ISystemValidatorUniqueString) cmdLabelValidator).setCaseSensitive(caseSensitive);
- // Inner composite
- int nbrColumns = 3;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- ((GridLayout) composite_prompts.getLayout()).marginWidth = 0;
- // COMPILE LABEL PROMPT
- textLabel = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, getCompileCommandLabel(), getCompileCommandTooltip());
- labelLabel = SystemWidgetHelpers.getLastLabel();
- textLabel.setTextLimit(cmdLabelValidator.getMaximumNameLength());
- ((GridData) textLabel.getLayoutData()).horizontalSpan = nbrColumns - 1;
- // COMPILE COMMAND PROMPT
- /*
- textString = SystemWidgetHelpers.createLabeledTextField(composite_prompts,null,rb, getCompileCommandPromptRBKey());
- labelString = SystemWidgetHelpers.getLastLabel();
- //textString.setTextLimit(1000);
- ((GridData)textString.getLayoutData()).widthHint=300;
- */
- commandField.createContents(composite_prompts, nbrColumns, this);
- resetFields();
- doInitializeFields();
- // add keystroke listeners...
- textLabel.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateLabelInput();
- }
- });
- commandField.addModifyListener(this);
- return composite_prompts;
- }
-
- /**
- * Return the control to recieve initial focus. Should be overridden if you override createContents
- */
- public Control getInitialFocusControl() {
- if (textLabel.isEnabled())
- return textLabel;
- else
- return commandField.getCommandWidget();
- }
-
- /**
- * Overridable entry point for subclasses that wish to put something to the right of the "Command:" label
- * From interface ISystemCommandTextAdditionalGUIProvider.
- * @return true if something entered to take up the available columns, false otherwise (will be padded)
- */
- public boolean createCommandLabelLineControls(Composite parent, int availableColumns) {
- return false;
- }
-
- /**
- * Create additional buttons, to go under command prompt.
- * Overridable.
- * From interface ISystemCommandTextAdditionalGUIProvider.
- * @return true if something entered to take up the available columns, false otherwise (will be padded)
- */
- public boolean createExtraButtons(Composite parent, int availableColumns) {
- return false;
- }
-
- /**
- * Enable/disable extra buttons added by subclass.
- * Called when state changes
- * Overridable
- */
- protected void enableExtraButtons() {
- }
-
- /**
- * Overridable method for resetting GUI in subclass-supplied additional GUI,
- * when in "new" mode
- */
- protected void resetExtraButtonsForNewMode() {
- }
-
- /**
- * Overridable method for resetting GUI in subclass-supplied additional GUI,
- * when in "edit" mode
- */
- protected void resetExtraButtons(SystemCompileCommand originalCmd) {
- }
-
- /**
- * Overridable method for saving data in subclass-supplied additional GUI.
- */
- protected void processExtraButtonsChanges(SystemCompileCommand currentCmd) {
- }
-
- protected String getCompileCommandLabel() {
- return SystemUDAResources.RESID_WWCOMPCMDS_CMDLABEL_LABEL;
- }
-
- protected String getCompileCommandTooltip() {
- return SystemUDAResources.RESID_WWCOMPCMDS_CMDLABEL_TOOLTIP;
- }
-
- protected String getCompileCommandPromptLabel() {
- return SystemUDAResources.RESID_WWCOMPCMDS_CMD_LABEL;
- }
-
- protected String getCompileCommandPromptTooltip() {
- return SystemUDAResources.RESID_WWCOMPCMDS_CMD_TOOLTIP;
- }
-
- /**
- * Initialize the input fields based on the inputCompileCommand, and perhaps subsystem.
- * 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() {
- //System.out.println("inside doInitializeFields: textString null? " + (commandField==null) + " input null? " + (inputCompileCommand==null));
- if (commandField == null) return; // do nothing
- if (inputCompileCommand != null) {
- textLabel.setText(inputCompileCommand.getLabel());
- /* if (!inputCompileCommand.isLabelEditable()) { // ibm or vendor supplied?
- textLabel.setEnabled(false);
- } */
- textLabel.setEnabled(inputCompileCommand.isLabelEditable());
- commandField.setCommandText(inputCompileCommand.getCurrentString());
- /* if (!inputCompileCommand.isCommandStringEditable()) {
- System.out.println("Compile command not editable");
- commandField.enableCommandWidget(false);
- } */
- commandField.enableCommandWidget(inputCompileCommand.isCommandStringEditable());
- }
- }
-
- /**
- * This is called in the work with compile commands dialog when the user selects "new", or selects another command.
- * You must override this if you override createContents. Be sure to test if the contents have even been created yet!
- */
- protected void resetFields() {
- textLabel.setEnabled(true);
- textLabel.setText(""); //$NON-NLS-1$
- commandField.setCommandText(""); //$NON-NLS-1$
- errorMessage = null;
- }
-
- /**
- * Do not override. Instead, override areFieldsComplete().
- * <p>
- * This is called by the dialog 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();
- return complete;
- }
-
- /**
- * 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 (commandField == null)
- return false;
- else
- return (textLabel.getText().trim().length() > 0) && (commandField.getCommandText().length() > 0);
- }
-
- /**
- * Are errors pending? Used in dialog to prevent changing the compile command selection
- */
- public boolean areErrorsPending() {
- return (errorMessage != null);
- }
-
- /**
- * Clear any pending errors. Called when Revert pressed.
- */
- public void clearErrorMessage() {
- errorMessage = null;
- }
-
- /**
- * 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) {
- this.errorMessage = errorMessage;
- processCommandTextChange(cmdText, (errorMessage != null));
- if (!fromVerify) fireChangeEvent(errorMessage);
- }
-
- /**
- * Method called as user types into the command field
- * Encapsulated out so that it can be called from various types of listeners.
- * Further, it is easily overridden
- */
- protected void processCommandTextChange(String newText, boolean hasError) {
- }
-
- /**
- * Set the command text
- */
- protected void setCommandText(String text) {
- commandField.setCommandText(text);
- }
-
- /**
- * Get the command text as is, no massaging done.
- */
- protected String getCommandText() {
- return commandField.getCommandText();
- }
-
- // ------------------------------
- // PRIVATE METHODS
- // ------------------------------
- /**
- * Fire an event to all registered listeners, that the user has changed the
- * compile command. 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++) {
- ISystemCompileCommandEditPaneListener l = (ISystemCompileCommandEditPaneListener) listeners.elementAt(idx);
- l.compileCommandChanged(error);
- }
- }
-
- // ---------------------------------------------
- // METHODS FOR VERIFYING INPUT PER KEYSTROKE ...
- // ---------------------------------------------
- /**
- * Validates compile command label as entered so far in the text field.
- * Not called if you override createContents() and verify()
- */
- protected SystemMessage validateLabelInput() {
- if (ignoreChanges) return errorMessage;
- errorMessage = cmdLabelValidator.validate(textLabel.getText().trim());
- //if ((errorMessage == null) && !fromVerify)
- // errorMessage = validate(true, false);
- if (!fromVerify) fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /**
- * Validates compile command 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 = commandField.validateCommand();
- if (!fromVerify) fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- /**
- * Does complete verification of input fields. This has to handle being called
- * from a particular validator method or from verify.
- *
- * @return error message if there is one, else null if ok
- */
- public SystemMessage validate(boolean skipLabel, boolean skipString) {
- errorMessage = null;
- controlInError = null;
- if (!skipLabel) {
- errorMessage = validateLabelInput();
- if (errorMessage != null) controlInError = textLabel;
- }
- if ((errorMessage == null) && !skipString) {
- errorMessage = validateStringInput();
- if (errorMessage != null) controlInError = commandField.getCommandWidget();
- }
- return errorMessage;
- }
-
- // ---------------------------------
- // METHODS FOR VERIFICATION...
- // ---------------------------------
- /**
- * 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() {
- fromVerify = true;
- errorMessage = validate(false, false);
- if (errorMessage != null) {
- if (controlInError != null) controlInError.setFocus();
- }
- fromVerify = false;
- fireChangeEvent(errorMessage);
- return errorMessage;
- }
-
- // ------------------
- // EVENT LISTENERS...
- // ------------------
- /**
- * User has selected something
- */
- public void widgetSelected(SelectionEvent event) {
- }
-
- /**
- * User has selected something via enter/dbl-click
- */
- public void widgetDefaultSelected(SelectionEvent event) {
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
- /**
- * 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);
- }
-
- /**
- * 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);
- }
-
- /**
- * 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);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java
deleted file mode 100644
index e44b52c30..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- *******************************************************************************/
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Label provider for compile commands in the work with compile commands
- * dialog.
- */
-public class SystemCompileCommandLabelProvider extends LabelProvider {
-
- Image _compileCommandImage = null;
-
- /**
- * Constructor
- */
- public SystemCompileCommandLabelProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if (element instanceof SystemCompileCommand)
- return ((SystemCompileCommand) element).getLabel();
- else if (element != null)
- return element.toString();
- else
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- Image result = null;
- if (element instanceof SystemCompileCommand) {
- if (_compileCommandImage == null || _compileCommandImage.isDisposed()) {
- ImageDescriptor id = Activator.getDefault().getImageDescriptor(IUserActionsImageIds.COMPILE_1);
- _compileCommandImage = id.createImage();
- }
- result = _compileCommandImage;
- }
- return result;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributor.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributor.java
deleted file mode 100644
index 4977519c2..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributor.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [180562][api] dont implement ISystemCompileXMLConstants
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-public class SystemCompileContributor {
- private IConfigurationElement config;
- private SystemCompileRemoteObjectMatcher matcher;
-
- public SystemCompileContributor(IConfigurationElement element) {
- this.config = element;
- String ssfId = element.getAttribute("subsystemconfigurationid"); //$NON-NLS-1$
- String namefilter = element.getAttribute("namefilter"); //$NON-NLS-1$
- String typefilter = element.getAttribute("typefilter"); //$NON-NLS-1$
- matcher = new SystemCompileRemoteObjectMatcher(ssfId, namefilter, typefilter);
- }
-
- /**
- * Getter method.
- * Return what was specified for the <samp>subsystemconfigurationid</samp> xml attribute.
- */
- public String getSubSystemFactoryId() {
- return matcher.getSubSystemFactoryId();
- }
-
- /**
- * 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();
- }
-
- /**
- * Returns true if the current selection matches all the given filtering criteria, false otherwise.
- */
- public boolean isApplicableTo(Object element) {
- return matcher.appliesTo(element);
- }
-
- /**
- * Contribute the compile command.
- */
- public void contributeCompileCommand(SystemCompileProfile prf, Object element) {
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(element);
- if (rmtAdapter != null) {
- String srcType = rmtAdapter.getRemoteSourceType(element);
- if (srcType == null) {
- srcType = "null"; //$NON-NLS-1$
- } else if (srcType.equals("")) { //$NON-NLS-1$
- srcType = "blank"; //$NON-NLS-1$
- }
- String id = config.getAttribute("id"); //$NON-NLS-1$
- String label = config.getAttribute("label"); //$NON-NLS-1$
- String commandString = config.getAttribute("commandstring"); //$NON-NLS-1$
- String labelEditable = config.getAttribute("labeleditable"); //$NON-NLS-1$
- String commandStringEditable = config.getAttribute("stringeditable"); //$NON-NLS-1$
- // label and command string are editable by default
- // they are only false if indicated in extension point
- boolean isLabelEditable = true;
- boolean isCommandStringEditable = true;
- if (labelEditable != null && labelEditable.equalsIgnoreCase("false")) { //$NON-NLS-1$
- isLabelEditable = false;
- }
- if (commandStringEditable != null && commandStringEditable.equalsIgnoreCase("false")) { //$NON-NLS-1$
- isCommandStringEditable = false;
- }
- // check all required attributes
- if (id == null || label == null || commandString == null || id.equals("") || label.equals("") || commandString.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return;
- }
- // obtain the compile type
- SystemCompileType compileType = prf.getCompileType(srcType);
- // if compile type exists, then get all the compile commands for this compile type
- if (compileType != null) {
- // search for a command with the id
- boolean idExists = compileType.isIdExists(id);
- // TODO: if compile commands with the id exist, we probably should update the default command string.
- // Why update the default command string? Because a vendor might decide to update a
- // compile command with a new release. We don't want to change the label, current string, etc.
- // but at least change the default command string. On the other hand, changing the default
- // command string is unnecessary most of the time, since idExists is true after the first time the
- // the compile command is added. Hence we leave it for now.
- if (!idExists) {
- // now check if a command with the label exists; we want to avoid duplicate labels
- // so only add the command if this label does not already exist.
- boolean labelExists = compileType.isLabelExists(label);
- if (!labelExists) {
- int numOfCommands = compileType.getNumOfCommands();
- SystemCompileCommand command = new SystemCompileCommand(compileType, id, label, ISystemCompileXMLConstants.NATURE_ISV_VALUE, commandString, commandString, ISystemCompileXMLConstants.MENU_BOTH_VALUE, numOfCommands);
- command.setLabelEditable(isLabelEditable);
- command.setCommandStringEditable(isCommandStringEditable);
- compileType.addCompileCommandInOrder(command);
- // if the type had no existing commands at all, then make the compile command
- // we have just added the last used compile command for the type
- if (numOfCommands == 0) {
- compileType.setLastUsedCompileCommand(command);
- }
- }
- }
- }
- // compile type does not exist, so add a compile type, then add the compile command to it
- else {
- compileType = new SystemCompileType(prf, srcType);
- SystemCompileCommand command = new SystemCompileCommand(compileType, id, label, ISystemCompileXMLConstants.NATURE_ISV_VALUE, commandString, commandString, ISystemCompileXMLConstants.MENU_BOTH_VALUE, 0);
- command.setLabelEditable(isLabelEditable);
- command.setCommandStringEditable(isCommandStringEditable);
- compileType.addCompileCommandInOrder(command);
- // since the compile command we have added is the first compile command for the newly created
- // compile type, make it the last used compile command.
- compileType.setLastUsedCompileCommand(command);
- // add the compile type to the compile profile
- prf.addCompileType(compileType);
- }
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorManager.java
deleted file mode 100644
index 98baef77c..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.Vector;
-
-/**
- * This singleton class manages all compile contributions added through extension points.
- */
-public class SystemCompileContributorManager {
- private static SystemCompileContributorManager inst;
- private Vector contributors = new Vector();
-
- private SystemCompileContributorManager() {
- loadContributors();
- }
-
- /**
- * Returns the singleton instance of the manager.
- * @return The singleton instance of this class
- */
- public static SystemCompileContributorManager getInstance() {
- if (inst == null) {
- inst = new SystemCompileContributorManager();
- }
- return inst;
- }
-
- /**
- * Loads the compile contributors from the workbench's registry.
- */
- private void loadContributors() {
- SystemCompileContributorReader reader = new SystemCompileContributorReader();
- reader.readCompileContributors(this);
- }
-
- /**
- * Register a contributor with the manager.
- * @param contributor a contributor.
- */
- public void registerContributor(SystemCompileContributor contributor) {
- contributors.add(contributor);
- }
-
- /**
- * Adds all compile command contributions through extension point for the remote object.
- * Returns true if there are any contributions, false otherwise.
- */
- public boolean contributeCompileCommands(SystemCompileProfile prf, Object element) {
- boolean isContributions = false;
- // go through list of all contributors, find out which ones apply for the selected element
- // and add/change a compile type to the given compile profile.
- for (int idx = 0; idx < contributors.size(); idx++) {
- SystemCompileContributor contributor = (SystemCompileContributor) contributors.elementAt(idx);
- if (contributor.isApplicableTo(element)) {
- contributor.contributeCompileCommand(prf, element);
- isContributions = true;
- }
- }
- return isContributions;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorReader.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorReader.java
deleted file mode 100644
index f31ee553f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileContributorReader.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * This class reads configuration elements from the workbench's registry, creates contributors
- * and registers them with the manager.
- */
-public class SystemCompileContributorReader {
- private SystemCompileContributorManager manager;
- private static final String COMPILE_COMMAND_ELEMENT_NAME = "compilecommand"; //$NON-NLS-1$
-
- public SystemCompileContributorReader() {
- }
-
- public void readCompileContributors(SystemCompileContributorManager mgr) {
- this.manager = mgr;
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry.getExtensionPoint(RSEUIPlugin.PLUGIN_ID, "compile"); //$NON-NLS-1$
- if (extensionPoint != null) {
- IExtension[] extensions = extensionPoint.getExtensions();
- for (int m = 0; m < extensions.length; m++) {
- IExtension extension = extensions[m];
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for (int n = 0; n < elements.length; n++) {
- IConfigurationElement element = elements[n];
- // if the element is a compile command
- // then create a contributor that represents the element
- // and register the contributor with the contributor manager
- if (element.getName().equals(COMPILE_COMMAND_ELEMENT_NAME)) {
- SystemCompileContributor contributor = new SystemCompileContributor(element);
- manager.registerContributor(contributor);
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java
deleted file mode 100644
index 3f81d6bb7..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.UserActionsPersistenceUtil;
-import org.eclipse.rse.internal.useractions.api.ui.compile.SystemCascadingCompileAction;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-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.SystemBasePlugin;
-import org.eclipse.rse.ui.SystemMenuManager;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class manages the compile framework for a particular instantiation.
- * It is typically associated with a subsystem factory, but it is designed
- * to be used in other contexts as well.
- * <p>
- * Here is the model for the compile framework:
- * <ul>
- * <li>This compile manager manages a list of SystemCompileProfiles. For subsystem
- * factories, there will be one of these per system profile. In other contexts,
- * there may well be only one SystemCompileProfile per manager.
- * <li>A SystemCompileProfile manages a list of a SystemCompileTypes, which are persisted.
- * There is one compile type per compilable source type, like ".cpp" for unix file
- * systems.
- * <li>Each SystemCompileType manages a list of SystemCompileCommands. Each command
- * represents a remote command for compiling source objects of this type. Each
- * command has a label shown in the Compile popup menu and a compile string that
- * is the command.
- * <li>There is a Work With Compile Commmands dialog that shows all existing types,
- * and for each type the list of existing compile commands. Users can use this
- * to define new compile commands per type, and new types.
- * <li>The compile profile will optionally pre-fill its list if the persistent file is
- * not found (ie, on first touch). That pre-filled list is what the user gets by
- * default until they define their own compile commands. The pre-filled compile
- * commands can be edited by the user (except the label) and can be restored to
- * their shipped values.
- * <li>When the user selects a compile command to run, an instance of SystemCompilableSource
- * is created, containing a reference to the selected source object and the
- * selected SystemCompileCommand. A method in that object is called to actually
- * run the compile command.
- * <li>Compile commands can have substitution variables. The list of supported substitution
- * variables is supplied by this SystemCompileManager. The work-with dialog allows the
- * user to easily insert these into his command string, and the SystemCompilableSource
- * object is responsible for making the substitutions at runtime, given the compile
- * command and selected source object.
- * </ul>
- * @see SystemCompileProfile
- * @see SystemCompileType
- * @see SystemCompileCommand
- * @see SystemWorkWithCompileCommandsDialog
- */
-public abstract class SystemCompileManager {
- private Hashtable compileProfilesPerProfile = new Hashtable();
- private Hashtable compileSubstitutorsPerConnection = new Hashtable();
- protected IHost systemConnection;
- protected String osType = "default"; //$NON-NLS-1$
- protected ISubSystemConfiguration subsystemFactory;
- /**
- * As last set by calling setCurrentCompileCommand. Sometimes needed by subclasses.
- */
- protected SystemCompileCommand currentCompileCommand;
-
- /**
- * Constructor for SystemCompileManager
- */
- public SystemCompileManager() {
- super();
- }
-
- /**
- * Sets the subsystemconfiguration which instantiated this. Not called if using this
- * framework outside of the world of subsystem factories.
- */
- public void setSubSystemFactory(ISubSystemConfiguration ssFactory) {
- this.subsystemFactory = ssFactory;
- }
-
- /**
- * Return the subsystem factory which instantiated this instance, or as set via {@link #setSubSystemFactory(ISubSystemConfiguration)}.
- */
- public ISubSystemConfiguration getSubSystemFactory() {
- return subsystemFactory;
- }
-
- /**
- * Set the current system connection. This is set in the work with dialog, and
- * used by the edit pane and other downstream classes.
- */
- public void setSystemConnection(IHost systemConnection) {
- this.systemConnection = systemConnection;
- }
-
- /**
- * Return the system connection with which this manager instance is associated.
- */
- public IHost getSystemConnection() {
- return systemConnection;
- }
-
- /**
- * Sets the current compile command. Called by the framework when running a compile command, prior to calling
- * commands that may be dependent on values in the compile command being processed.
- */
- public void setCurrentCompileCommand(SystemCompileCommand compileCmd) { // defect 47808
- this.currentCompileCommand = compileCmd;
- }
-
- /**
- * Return the current compile cmd as set by {@link #setCurrentCompileCommand(SystemCompileCommand)}.
- */
- public SystemCompileCommand getCurrentCompileCommand() { // defect 47808
- return currentCompileCommand;
- }
-
- /**
- * Return true (default) if multiple-select is supported for the compile action
- */
- public boolean isMultiSelectSupported(SystemCompileCommand compileCmd) {
- return true;
- }
-
- /**
- * Get the singleton compile profile given a SystemProfile.
- * <p>
- * Called in the Work With Compile Commands and the Compile cascading actions.
- * <p>
- * Do not override this, as the implementation is complete. However,
- * you must override createCompileProfile.
- * <p>
- * If you are using this outside of the subsystem framework, this method will not be called.
- *
- * @see #createCompileProfile(ISystemProfile)
- */
- public SystemCompileProfile getCompileProfile(ISystemProfile profile) {
- if (compileProfilesPerProfile == null) compileProfilesPerProfile = new Hashtable();
- SystemCompileProfile cprofile = (SystemCompileProfile) compileProfilesPerProfile.get(profile);
- if (cprofile == null) {
- cprofile = createCompileProfile(profile);
- if (cprofile != null) compileProfilesPerProfile.put(profile, cprofile);
- }
- return cprofile;
- }
-
- /**
- * Return a list of all SystemCompileProfile objects.
- * By default, returns one per active system profile. If not using the subsystem framework,
- * this must be overridden.
- */
- public SystemCompileProfile[] getAllCompileProfiles() {
- ISystemProfile[] systemProfiles = RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles();
- SystemCompileProfile[] compProfiles = null;
- if ((systemProfiles != null) && (systemProfiles.length > 0)) {
- compProfiles = new SystemCompileProfile[systemProfiles.length];
- for (int idx = 0; idx < systemProfiles.length; idx++)
- compProfiles[idx] = getCompileProfile(systemProfiles[idx]);
- }
- return compProfiles;
- }
-
- /**
- * Overridable method to instantiate your SystemCompileProfile subclass for the
- * given system profile.
- * <p>It is important you pass the SystemProfile's name to the ctor of SystemCompileProfile.
- */
- protected abstract SystemCompileProfile createCompileProfile(ISystemProfile profile);
-
- /**
- * Callback method from SystemCompileProfile to get the folder into which the
- * xml file for this compile profile will be stored. By default uses the
- * given subsystem factory. If you are using this framework outside of the
- * subsystem factory world, then override this method.
- */
- public IFolder getCompileProfileFolder(SystemCompileProfile compProfile) {
- ISystemProfile systemProfile = getSystemProfile(compProfile);
- if (systemProfile == null) {
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_E);
- msg.makeSubstitution(SystemUDAResources.SystemCompileManager_0);
- SystemBasePlugin
- .logError("In SystemCompileManager#getCompileProfileFolder, and we have gotten a null for the system profile named " + compProfile.getProfileName() + ". That should never happen!"); //$NON-NLS-1$ //$NON-NLS-2$
- SystemMessageDialog.displayErrorMessage(SystemBasePlugin.getActiveWorkbenchShell(), msg);
- //return null; BETTER TO LET IT CRASH... BETTER RECOVERY
- }
- //System.out.println("systemProfile = " + systemProfile);
- //System.out.println("subsystemFactory = " + subsystemFactory);
- IFolder folder = UserActionsPersistenceUtil.getCompileCommandsFolder(systemProfile, subsystemFactory);
- return folder;
- }
-
- /**
- * Callback from SystemProfile to decide, when no xml file is found, if we want
- * to prime the new xml file with defaults.
- * <p>
- * By default, returns true if the SystemProfile the given compile profile is
- * associated with is a user-private profile. If not using the compile framework,
- * override this to use your own criteria.
- */
- public boolean wantToPrimeWithDefaults(SystemCompileProfile profile) {
- ISystemProfile systemProfile = getSystemProfile(profile);
- //System.out.println("Inside wantToPrimeWithDefaults("+systemProfile.getName()+") and result is " + systemProfile.isDefaultPrivate());
- return systemProfile.isDefaultPrivate();
- }
-
- /**
- * Return the default (supplied) compile commands to prime the compile commands with.
- */
- public abstract SystemDefaultCompileCommands getDefaultCompileCommands();
-
- /**
- * If the command is an default supplied command, returns its SystemDefaultCompileCommand object.
- * Returns null if not a default supplied command.
- * @param commandName - the name of the command, minus the parameters. This is not the label!
- */
- public SystemDefaultCompileCommand getDefaultSuppliedCommand(String commandName) {
- SystemDefaultCompileCommands dftCmds = getDefaultCompileCommands();
- if (dftCmds == null) return null;
- return dftCmds.getCommand(commandName);
- }
-
- /**
- * Given a SystemCompileProfile, return the SystemProfile it is associated with
- */
- private ISystemProfile getSystemProfile(SystemCompileProfile compProfile) {
- //return currentProfile;
- //SystemProfile[] systemProfiles = RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles(); THIS WAS THE BUG!!
- ISystemProfile[] systemProfiles = RSECorePlugin.getTheSystemProfileManager().getSystemProfiles();
- String profileName = compProfile.getProfileName();
- ISystemProfile currentProfile = null;
- for (int idx = 0; (currentProfile == null) && (idx < systemProfiles.length); idx++) {
- if (systemProfiles[idx].getName().equals(profileName)) currentProfile = systemProfiles[idx];
- }
- return currentProfile;
- /*
- System.out.println("Searching for match on = " + compProfile.getProfileName());
- Enumeration keys = compileProfilesPerProfile.keys();
- System.out.println(":Keys exist? " + keys.hasMoreElements());
- SystemProfile match = null;
- while ((match==null) && keys.hasMoreElements())
- {
- SystemProfile key = (SystemProfile)keys.nextElement();
- SystemCompileProfile value = (SystemCompileProfile)compileProfilesPerProfile.get(key);
- System.out.println("...key = " + key.getName());
- System.out.println("...value = " + value.getProfileName());
- if (value == compProfile)
- match = key;
- }
- return match;
- */
- }
-
- /**
- * The compile manager and related classes is impacted by a profile rename, as we have
- * some in-memory places to be updated. This method is called by the subsystem factory
- * on a profile rename operation so we can update ourselves.
- */
- public void profileRenamed(ISystemProfile profile, String oldName) {
- if (compileProfilesPerProfile == null) return;
- SystemCompileProfile cprofile = (SystemCompileProfile) compileProfilesPerProfile.get(profile);
- if (cprofile != null) cprofile.setProfileName(profile.getName());
- }
-
- /**
- * Return true if the given remote object is potentially compilable. This decides
- * the existence of the Compile menu item. It is possible to enable/disable this if
- * there is no current compile command... this is a more course grained decision.
- * <p>
- * Our default implementation is to query the source type of the input object,
- * and return true only if there is a source type defined for it in any of the
- * currently active system profiles.
- */
- public boolean isCompilable(Object selection) {
- /* MJB: Hack to disable compilation on virtual files for now */
- if (selection instanceof IVirtualRemoteFile) return false;
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(selection);
- if (rmtAdapter == null) return false;
- String srcType = rmtAdapter.getRemoteSourceType(selection);
- if (srcType == null) return false;
- boolean compilable = false;
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- for (int idx = 0; !compilable && (idx < activeProfiles.length); idx++) {
- SystemCompileProfile compProfile = getCompileProfile(activeProfiles[idx]);
- compProfile.addContributions(selection);
- compilable = (compProfile.getCompileType(srcType) != null);
- }
- return compilable;
- }
-
- /**
- * Populate main context menu with a menu item for compile.
- * Allows subclasses the opportunity to add compile actions for single and multiple selections.
- * <p>
- * This is called by the addCommonRemoteObjectsActions method, if this subsystem
- * supports compiles.
- */
- public void addCompileActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup) {
- if ((selection == null) || (selection.getFirstElement() == null)) {
- return;
- }
- int size = selection.size();
- if (size == 1) {
- addSingleSelectionCompileActions(shell, selection, menu, menuGroup);
- } else if (size > 1) {
- addMultipleSelectionCompileActions(shell, selection, menu, menuGroup);
- }
- }
-
- /**
- * Adds compile actions for single selections.
- * Populates main context menu with a "Compile->" submenu cascade,
- * which will only be populated when the submenu is selected.
- * <p>
- * This is called by the addCompileActions method for single selections.
- * Subclasses may override.
- */
- public void addSingleSelectionCompileActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup) {
- SystemCascadingCompileAction promptAction = new SystemCascadingCompileAction(shell, true);
- SystemCascadingCompileAction noPromptAction = new SystemCascadingCompileAction(shell, false);
- menu.add(menuGroup, noPromptAction);
- menu.add(menuGroup, promptAction);
- }
-
- /**
- * Adds compile actions for multiple selections.
- * By default, does nothing.
- * This is called by the addCompileActions method for multiple selections.
- * Subclasses may override.
- */
- public void addMultipleSelectionCompileActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup) {
- SystemCompileMultipleSelectAction multiAction = new SystemCompileMultipleSelectAction(shell);
- menu.add(menuGroup, multiAction);
- }
-
- /**
- * For support of the Work With Compile Commands dialog.
- * <p>
- * Return the substitution variables supported by compile commands managed by this manager.
- */
- public abstract SystemCmdSubstVarList getSubstitutionVariableList();
-
- /**
- * Return the substitutor for doing variable substitution.
- * <p>
- * Override to return a class that implements ISystemCompileCommandSubstitutor, that knows how to
- * substitute the variables found in getSubstitutionVariableList().
- */
- protected ISystemCompileCommandSubstitutor getSubstitutor() {
- ISystemCompileCommandSubstitutor substor = (ISystemCompileCommandSubstitutor) compileSubstitutorsPerConnection.get(systemConnection);
- if (substor == null) {
- substor = createSubstitutor(systemConnection);
- compileSubstitutorsPerConnection.put(systemConnection, substor);
- }
- return substor;
- }
-
- /**
- * Return the substitutor for doing variable substitution.
- * <p>
- * Override to return a class that implements ISystemCompileCommandSubstitutor, that knows how to
- * substitute the variables found in getSubstitutionVariableList().
- */
- protected abstract ISystemCompileCommandSubstitutor createSubstitutor(IHost connection);
-
- /**
- * For support of the Work With Compile Commands dialog.
- * <p>
- * Return our edit pane. Overriding this is an alternative to calling setEditPane.
- * This is called in createContents
- */
- public SystemCompileCommandEditPane getCompileCommandEditPane(Shell shell, ISystemCompileCommandEditPaneHoster hoster, boolean caseSensitive) {
- return new SystemCompileCommandEditPane(this, shell, hoster, caseSensitive);
- }
-
- /**
- * For support of the Work With Compile Commands dialog.
- * <p>
- * Return the dialog used to prompt for a new source type when "Add..." is pressed beside the
- * source type combo. This returns an instance of the default SystemNewCompileSrcTypeDialog.
- * <p>
- * One strategy for subclasses is to call super on this method, then configure the results via
- * the setters in the default dialog. Another is to subclass that dialog and return an instance
- * of the subclass.
- */
- protected SystemNewCompileSrcTypeDialog getNewSrcTypeDialog(Shell shell, boolean caseSensitive) {
- //System.out.println("test 1" + caseSensitive);
- return new SystemNewCompileSrcTypeDialog(shell, this, caseSensitive);
- }
-
- public String getSourceTypePromptMRILabel() {
- return SystemUDAResources.RESID_WWCOMPCMDS_TYPES_LABEL;
- }
-
- public String getSourceTypePromptMRITooltip() {
- return SystemUDAResources.RESID_WWCOMPCMDS_TYPES_TOOLTIP;
- }
-
- public String getOSType()
- {
- return osType;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileMultipleSelectAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileMultipleSelectAction.java
deleted file mode 100644
index 59a40235e..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileMultipleSelectAction.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Kevin Doyle (IBM) - [240069] Need to fix the markers FIXME in SystemCompileMultipleSelectAction
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.internal.useractions.api.files.compile.ISystemCompileManagerAdapter;
-import org.eclipse.rse.internal.useractions.files.compile.UniversalCompileManager;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-import org.eclipse.rse.ui.view.SystemTableViewProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-public class SystemCompileMultipleSelectAction extends SystemBaseAction {
- /**
- * Constructor for multiple select compile action
- */
- public SystemCompileMultipleSelectAction(Shell shell) {
- super(UserActionsResources.ACTION_COMPILE_NOPROMPT_LABEL, UserActionsResources.ACTION_COMPILE_NOPROMPT_TOOLTIP, (ImageDescriptor) null, shell);
- allowOnMultipleSelection(true);
- setAccelerator(SWT.CTRL | SWT.SHIFT | 'c');
- }
-
-
- /**
- * The default implementation runs the last used compile command for each selected resource.
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- if (checkDirtyEditors()) {
- Object element = getFirstSelection();
- boolean ok = true;
- while (ok && (element != null)) {
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(element);
-
- ISubSystem subsystem = rmtAdapter.getSubSystem(element);
-
- String srcType = null;
- srcType = rmtAdapter.getRemoteSourceType(element);
- if (srcType == null) {
- srcType = "null"; //$NON-NLS-1$
- } else if (srcType.equals("")) { //$NON-NLS-1$
- srcType = "blank"; //$NON-NLS-1$
- }
-
- SystemCompileManager compileManager = null;
-
- if (element instanceof IAdaptable) {
- ISystemCompileManagerAdapter adapter = (ISystemCompileManagerAdapter)((IAdaptable)element).getAdapter(ISystemCompileManagerAdapter.class);
- if (null != adapter)
- {
- compileManager = adapter.getSystemCompileManager(subsystem.getSubSystemConfiguration());
- }
- }
-
- if (null == compileManager)
- {
- compileManager = new UniversalCompileManager();
- compileManager.setSubSystemFactory(subsystem.getSubSystemConfiguration());
- }
-
- ISystemProfile profile = subsystem.getSystemProfile();
-
- // get the compile profile
- SystemCompileProfile compileProfile = compileManager.getCompileProfile(profile);
-
- compileManager.setSystemConnection(subsystem.getHost());
-
- // add any contributions from compile extension points
- // compileProfile.addContributions(element);
-
- // get the compile type for the current resource
- SystemCompileType compType = compileProfile.getCompileType(srcType);
-
-
- // get the last used compile command for that type
- SystemCompileCommand compileCmd = compType.getLastUsedCompileCommand();
-
- SystemCompilableSource compilableSrc = compType.getParentProfile().getCompilableSourceObject(getShell(), element, compileCmd, false, viewer);
-
- ok = compilableSrc.runCompileCommand();
-
- if (ok) {
- element = getNextSelection();
- }
- }
- }
- }
-
- protected List getDirtyEditors() {
- IStructuredSelection sel = getSelection();
- List selection = sel.toList();
- List dirtyEditors = new ArrayList();
- for (int i = 0; i < selection.size(); i++) {
- Object selected = selection.get(i);
- if (selected instanceof IAdaptable) {
- ISystemEditableRemoteObject editable = getEditableFor((IAdaptable) selected);
- if (editable != null) {
- try {
- // is the file being edited?
- if (editable.checkOpenInEditor() == 0) {
- // reference the editing editor
- editable.openEditor();
- // file is open in editor - prompt for save
- if (editable.isDirty()) {
- dirtyEditors.add(editable);
- }
- }
- } catch (Exception e) {
- }
- }
- }
- }
- return dirtyEditors;
- }
-
- 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() {
- List dirtyEditors = getDirtyEditors();
- 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(null);
- ListSelectionDialog dlg = new ListSelectionDialog(getShell(), input, cprovider, lprovider, SystemUDAResources.EditorManager_saveResourcesMessage);
- dlg.setInitialSelections(input.getChildren());
- dlg.setTitle(SystemUDAResources.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);
- editable.doImmediateSaveAndUpload();
- }
- }
- return true;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileProfile.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileProfile.java
deleted file mode 100644
index b69bffa8f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileProfile.java
+++ /dev/null
@@ -1,614 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562][api] dont implement ISystemCompileXMLConstants
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View (cleanup some use action stuff)
- * Xuan Chen (IBM) - [225617] [useraction][api] Remove Team view support inside user action.
- * Kevin Doyle (IBM) - [239701] [useractions] Compile types show up multiple times after adding a command
- * Xuan Chen (IBM) - [246807] [useractions] - Command Command property set from different os and subsystem are all shown as "Compile Commands" in Team view
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A SystemCompileProfile has a one-to-one correspondence with a SystemProfile. There is one
- * for each profile, for each subsystem factory that supports compiles.
- * <p>
- * The compile profile manages all aspects of the compile framework for this subsystem factory,
- * for this system profile. Underneath, this basically means managing the xml file where the
- * compile information is stored.
- * <p>
- * At a high level, a SystemCompileProfile manages a list of {@link SystemCompileType} objects,
- * of which there is one per compilable source type. Given a raw source type like ".cpp" there
- * is a method {@link #getCompileType(String)} to return the SystemCompileType object for it.
- * From that, one can get a list of compile commands registered for that type, and the
- * last-used compile command for that type.
- */
-public abstract class SystemCompileProfile {
- private SystemCompileManager parentManager;
- //private SystemProfile systemProfile;
- private String profileName;
- private Vector compileTypes;
- private String[] srcTypes;
- private boolean isRead;
- private Object associatedData;
-
- /**
- * Constructor for SystemCompileProfile
- * Will automatically read from disk.
- * @param manager - the SystemCompileManager which instantiated this
- * @param profileName - the name for this profile.
- */
- public SystemCompileProfile(SystemCompileManager manager, String profileName) {
- super();
- this.parentManager = manager;
- this.profileName = profileName;
- //this.systemProfile = profile;
- doPreRead();
- readFromDisk();
- }
-
- // -----------------
- // PUBLIC METHODS...
- // -----------------
- /**
- * Reset the profile name, on a profile rename operation, say.
- */
- public void setProfileName(String name) {
- //System.out.println("Inside SystemCompileProfile#setProfileName. Old = " + profileName + ", New = " + name);
- this.profileName = name;
- }
-
- /**
- * Set any data you want associated with this profile, while it is in memory
- */
- public void setAssociatedData(Object data) {
- this.associatedData = data;
- }
-
- /**
- * Get the associated data set via setAssociatedData
- */
- public Object getAssociatedData() {
- return associatedData;
- }
-
- /**
- * Return the name of this profile as given in the constructor
- */
- public String getProfileName() {
- return profileName;
- }
-
- /**
- * Return the system profile this is associated with
- */
- public ISystemProfile getProfile() {
- return RSECorePlugin.getTheSystemRegistry().getSystemProfile(profileName);
- }
-
- /**
- * Return the SystemCompileManager responsible for this profile
- */
- public SystemCompileManager getParentManager() {
- return parentManager;
- }
-
- /**
- * Add a compile type
- */
- public void addCompileType(SystemCompileType type) {
- compileTypes.add(type);
- flushCache();
- }
-
- /**
- * Remote a compile type.
- * Should only be called if the type is empty of compile commands
- */
- public void removeCompileType(SystemCompileType type) {
- compileTypes.remove(type);
- flushCache();
- }
-
- /**
- * Get compile types.
- * @return a Vector of SystemCompileType objects.
- */
- public Vector getCompileTypes() {
- return compileTypes;
- }
-
- /**
- * Get compile types as an array of strings.
- */
- public String[] getCompileTypesArray() {
- if ((srcTypes == null) || (srcTypes.length != compileTypes.size())) {
- srcTypes = new String[compileTypes.size()];
- for (int idx = 0; idx < srcTypes.length; idx++)
- srcTypes[idx] = ((SystemCompileType) compileTypes.elementAt(idx)).getType();
- }
- return srcTypes;
- }
-
- /**
- * Get the compile type, given a type
- */
- public SystemCompileType getCompileType(String typeString) {
- SystemCompileType compileType;
- for (int i = 0; i < compileTypes.size(); i++) {
- compileType = (SystemCompileType) (compileTypes.get(i));
- if (compileType.getType().equalsIgnoreCase(typeString)) return compileType;
- }
- return null;
- }
-
- /**
- * Save this profile to disk. It is saved to an xml file that is scoped
- * to a folder named after the subsystem factory, and that in turn is
- * scoped to a folder named "CompileCommands" within this system profile's
- * folder.
- */
- public void writeToDisk() {
- //We need to get the compile command information from the system profile now.
- ISystemProfile systemProfile = RSECorePlugin.getTheSystemProfileManager().getSystemProfile(profileName);
- write(compileTypes, systemProfile);
- isRead = false;
- }
-
- /**
- * Should you require access to the IFolder containing the persisted xml
- * file, call this method. Note, this folder is only created on first touch,
- * so this call may have the side-effect of creating the folder.
- * <p>
- * This defers back to the owning SystemCompileManager.
- */
- public IFolder getCompileFolder() {
- return parentManager.getCompileProfileFolder(this);
- }
-
- // -------------------
- // ABSTRACT METHODS...
- // -------------------
- /**
- * When the time comes to actually run a compile command against a selected source object,
- * this method is called to return the instance of SystemCompilableSource to do that.
- * <p>
- * This method must be implemented to return an instance of your subclass of SystemCompilableSource.
- */
- public abstract SystemCompilableSource getCompilableSourceObject(Shell shell, Object selectedObject, SystemCompileCommand compileCmd, boolean isPrompt, Viewer viewer);
-
- /**
- * This method is called by the constructor, prior to reading the xml contents from disk.
- * It is an exit point in case subclasses need to do anything before the read, such as rename
- * or migrate legacy information.
- */
- protected void doPreRead() {
- }
-
- // -------------------
- // PRIVATE METHODS...
- // -------------------
- /**
- * Read all compile types associated with the profile from the disk
- */
- private void readFromDisk() {
- if (!isRead) {
- compileTypes = read();
- isRead = true;
- }
- }
-
- /**
- * Clear any cached info, as something has changed.
- */
- private void flushCache() {
- srcTypes = null;
- }
-
- /**
- * Read the XML file that holds all information about the
- * types and associated compile names in this profile.
- */
- private Vector read() {
- Vector types = null;
-
- //We need to get the compile command information from the system profile now.
- //Get the propertySet first
- String osType = getParentManager().getOSType();
- String compileCommandPropertySetName = ISystemCompileXMLConstants.COMPILE_COMMAND_PROPRERTY_SET_PREFIX + osType;
- ISystemProfile systemProfile = RSECorePlugin.getTheSystemProfileManager().getSystemProfile(profileName);
- IPropertySet compileCommandPropertySet = systemProfile.getPropertySet(compileCommandPropertySetName);
- if (null == compileCommandPropertySet)
- {
- if (parentManager.wantToPrimeWithDefaults(this)) // we only prime the user's private profile with default compile commands
- {
- types = writeDefaults(systemProfile);
- }
- else
- {
- return new Vector();
- }
- }
- else
- {
- types = getTypes(systemProfile);
- }
- /*
- File file = getCompileProfileJavaFile();
- // If the file does not exist, then write all IBM supplied default
- // types and compile names first before reading
- if (file == null || !file.exists()) {
- if (parentManager.wantToPrimeWithDefaults(this)) // we only prime the user's private profile with default compile commands
- {
- if (!writeDefaults()) return new Vector();
- } else {
- return new Vector();
- }
- }
- */
- return types;
- }
-
- /**
- * Get all the compile types.
- * @return a vector of SystemCompileType objects.
- */
- private Vector getTypes(ISystemProfile systemProfile) {
- Vector types = new Vector();
- //Get the propertySet first
- String osType = getParentManager().getOSType();
- String compileCommandPropertySetName = ISystemCompileXMLConstants.COMPILE_COMMAND_PROPRERTY_SET_PREFIX + osType;
- IPropertySet compileCommandPropertySet = systemProfile.getPropertySet(compileCommandPropertySetName);
- if (null == compileCommandPropertySet)
- {
- return null;
- }
- IPropertySet[] list = compileCommandPropertySet.getPropertySets(); //This is for all the compile types
- if (list == null) return types;
-
- for (int i = 0; i < list.length; i++) {
- IPropertySet compileType = list[i]; //This is one compile type
- IPropertySet[] compileNameList = compileType.getPropertySets();
-
- IProperty typeProperty = compileType.getProperty(ISystemCompileXMLConstants.SOURCETYPE_ATTRIBUTE);
- String type = typeProperty.getValue();
- IProperty lastUsedProperty = compileType.getProperty(ISystemCompileXMLConstants.LASTUSED_ATTRIBUTE);
- String lastUsed = lastUsedProperty.getValue();
-
- SystemCompileType newType = new SystemCompileType(this, type);
-
- for (int j = 0; j < compileNameList.length; j++) {
- IPropertySet compileName = compileNameList[j]; //This is one compilename
- // get the name of the compile name
- IProperty labelProperty = compileName.getProperty(ISystemCompileXMLConstants.LABEL_ATTRIBUTE);
- String name = labelProperty.getValue();
- // get the nature of the compile name
- IProperty natureProperty = compileName.getProperty(ISystemCompileXMLConstants.NATURE_ATTRIBUTE);
- String nature = natureProperty.getValue();
- // get the default command string
- IProperty defaultProperty = compileName.getProperty(ISystemCompileXMLConstants.DEFAULT_ATTRIBUTE);
- String defaultString = (defaultProperty != null) ? defaultProperty.getValue() : ""; //$NON-NLS-1$
- // get the current string
- IProperty currentProperty = compileName.getProperty(ISystemCompileXMLConstants.CURRENT_ATTRIBUTE);
- String currentString = currentProperty.getValue();
- // get the menu option
- IProperty menuProperty = compileName.getProperty(ISystemCompileXMLConstants.MENU_ATTRIBUTE);
- String menuOption = menuProperty.getValue();
- // get the jobenv option
- IProperty jobenvProperty = compileName.getProperty(ISystemCompileXMLConstants.JOBENV_ATTRIBUTE);
- String jobEnv = null;
- if (null != jobenvProperty)
- {
- jobEnv = jobenvProperty.getValue();
- }
- // get the ordering
- IProperty orderProperty = compileName.getProperty(ISystemCompileXMLConstants.ORDER_ATTRIBUTE);
- int order = j;
- // to ensure previous beta customers do not have problems
- if (null != orderProperty)
- {
- order = Integer.valueOf(orderProperty.getValue()).intValue();
- }
- // get the id option
- IProperty idProperty = compileName.getProperty(ISystemCompileXMLConstants.ID_ATTRIBUTE);
- String id = null;
- if (null != idProperty)
- {
- id = idProperty.getValue();
- }
- // get the label editable option
- IProperty labelEditableProperty = compileName.getProperty(ISystemCompileXMLConstants.LABEL_EDITABLE_ATTRIBUTE);
- String labelEditable = null;
- if (null != labelEditableProperty)
- {
- labelEditable = labelEditableProperty.getValue();
- }
- // get the string editable option
- IProperty stringEditableProperty = compileName.getProperty(ISystemCompileXMLConstants.STRING_EDITABLE_ATTRIBUTE);
- String stringEditable = null;
- if (null != stringEditableProperty)
- {
- stringEditable = stringEditableProperty.getValue();
- }
- // id can be null, in which case the contructor will try to configure the id automatically
- // so no need to check for id == null here
- SystemCompileCommand newCmd = new SystemCompileCommand(newType, id, name, nature, defaultString, currentString, menuOption, order);
- // if label editable is null, i.e. attribute did not exist, then don't do anything
- // because the command is either IBM supplied or user supplied, and the constructor will take
- // care of it. We only care if the attribute is not null.
- if (labelEditable != null) {
- boolean isLabelEditable = Boolean.valueOf(labelEditable).booleanValue();
- newCmd.setLabelEditable(isLabelEditable);
- }
- // if string editable is null, i.e. attribute did not exist, then don't do anything
- // because the command is either IBM supplied or user supplied, and the constructor will take
- // care of it. We only care if the attribute is not null.
- if (stringEditable != null) {
- boolean isStringEditable = Boolean.valueOf(stringEditable).booleanValue();
- newCmd.setCommandStringEditable(isStringEditable);
- }
- if (jobEnv != null) newCmd.setJobEnvironment(jobEnv);
- if (name.equalsIgnoreCase(lastUsed)) newType.setLastUsedCompileCommand(newCmd);
- //TODO - XUAN need to handling migration later on
- /*
- if (oldversion) newCmd = migrateCompileCommand(newCmd, oldvrm);
- */
- newType.addCompileCommandInOrder(newCmd);
- }
- // add compile type and all its contents to the types list
- types.add(newType);
- }
- // if we currently have an older version on disk, we may have added new default types and associated
- // default compile commands for this release. so find out what new default source types we have
- // in this release, and add them to list of types in memory.
- // We only want to add these new default types to the default private profile.
- // Warning:: this will not handle the case where we want to change a default compile command for
- // an existing type with a new release. Need to modify the code below for that.
- //TODO - XUAN need to handling migration later on
- /*
- if (parentManager.wantToPrimeWithDefaults(this) && oldversion) {
- SystemDefaultCompileCommands allCmds = parentManager.getDefaultCompileCommands();
- if (allCmds == null) {
- return types;
- }
- // get all default types
- String[] defaultTypes = allCmds.getAllDefaultSuppliedSourceTypes();
- // for each default type, find out if we already have it in memory, i.e.
- // it exists from a previous release and so is not new.
- for (int i = 0; i < defaultTypes.length; i++) {
- boolean typeFound = false;
- Iterator iter = types.iterator();
- // iterate over all types in memory
- while (iter.hasNext()) {
- SystemCompileType tempType = (SystemCompileType) iter.next();
- // if the types match, we know this type is not new
- if (tempType.getType().equalsIgnoreCase(defaultTypes[i])) {
- typeFound = true;
- break;
- }
- }
- // type wasn't found in memory, so this is a new default type which we need to add
- // also need to add the default commands for that source type
- if (!typeFound) {
- SystemCompileType type = new SystemCompileType(this, defaultTypes[i]);
- SystemDefaultCompileCommand[] defaultCmds = allCmds.getCommandsForSrcType(defaultTypes[i]);
- if ((defaultCmds == null) || (defaultCmds.length == 0)) {
- types.add(type);
- continue;
- }
- SystemCompileCommand[] cmds = new SystemCompileCommand[defaultCmds.length];
- for (int j = 0; j < defaultCmds.length; j++) {
- String cmdName = defaultCmds[j].getLabel();
- String commandString = defaultCmds[j].getCommandWithParameters();
- // we can pass in null for the id, because the constructor checks if id is null
- // and if so tries to configure id automatically. This will work for IBM supplied commands.
- cmds[j] = new SystemCompileCommand(type, null, cmdName, ISystemCompileXMLConstants.NATURE_IBM_VALUE, commandString, commandString, ISystemCompileXMLConstants.MENU_BOTH_VALUE, j);
- type.addCompileCommandInOrder(cmds[j]);
- String jobEnv = defaultCmds[j].getJobEnvironment();
- if (jobEnv != null) {
- cmds[j].setJobEnvironment(jobEnv);
- }
- if (j == 0) {
- type.setLastUsedCompileCommand(cmds[j]);
- }
- }
- types.add(type);
- }
- }
- }
- */
- return types;
- }
-
- /**
- *
- * Add compile contributions made through extension points for the given resource,
- * and save them to disk.
- */
- public void addContributions(Object element) {
- // we only add contributions to the default private profile
- // Should we update existing labels in other profiles, e.g. a user may have copied a contributed
- // label to another profile? This won't change those labels, only the label in the default private profile.
- if (parentManager.wantToPrimeWithDefaults(this)) {
- SystemCompileContributorManager.getInstance().contributeCompileCommands(this, element);
- }
- // write the contributions to disk
- // writeToDisk();
- }
-
- /**
- * Opportunity for subclasses to do migration of compile commands read from disk,
- * from a document that has an older vrm than the current vrm.
- */
- protected SystemCompileCommand migrateCompileCommand(SystemCompileCommand oldCmd, String oldVrm) {
- return oldCmd;
- }
-
- /**
- * Do substring substitution. Using you are replacing &1 (say) with
- * another string.
- * @param string - string containing substring to be substituted.
- * @param subOld - substitution variable. Eg "%1"
- * @param subNew - substitution data. Eg "001"
- * @return string with all occurrences of subOld substituted with subNew.
- */
- protected String sub(String string, String subOld, String subNew) {
- if (string == null) return string;
- StringBuffer temp = new StringBuffer();
- int lastHit = 0;
- int newHit = 0;
- for (newHit = string.indexOf(subOld, lastHit); newHit != -1; lastHit = newHit, newHit = string.indexOf(subOld, lastHit)) {
- if (newHit >= 0) temp.append(string.substring(lastHit, newHit));
- temp.append(subNew);
- newHit += subOld.length();
- }
- if (lastHit >= 0) temp.append(string.substring(lastHit));
- return temp.toString();
- }
-
- /**
- * Write the contents of the file, given the contents as a Vector of SystemCompileType objects.
- */
- private void write(Vector types, ISystemProfile systemProfile) {
-
- //Get the propertySet first
- String osType = getParentManager().getOSType();
- String compileCommandPropertySetName = ISystemCompileXMLConstants.COMPILE_COMMAND_PROPRERTY_SET_PREFIX + osType;
- IPropertySet compileCommandPropertySet = systemProfile.getPropertySet(compileCommandPropertySetName);
- if (null == compileCommandPropertySet)
- {
- compileCommandPropertySet = systemProfile.createPropertySet(compileCommandPropertySetName);
- //Set its name and type attributes
- String compileCommandPropertySetLabel = ISystemCompileXMLConstants.COMPILE_COMMAND_NAME + " - " + osType; //$NON-NLS-1$
- compileCommandPropertySet.addProperty(ISystemCompileXMLConstants.LABEL_ATTRIBUTE, compileCommandPropertySetLabel);
- }
- // write type and compile commands for each
- for (int i = 0; i < types.size(); i++) {
- SystemCompileType compileType = (SystemCompileType) (types.get(i));
- //Element typeElement = doc.createElement(ISystemCompileXMLConstants.TYPE_ELEMENT);
- //typeElement.setAttribute(ISystemCompileXMLConstants.TYPE_ATTRIBUTE, type.getType());
- SystemCompileCommand lastUsedCompileName = compileType.getLastUsedCompileCommand();
- String lastUsedName = null;
- if (lastUsedCompileName == null) {
- lastUsedName = ""; //$NON-NLS-1$
- } else {
- lastUsedName = lastUsedCompileName.getLabel();
- }
- //now create a propertySet for this compile type
-
- IPropertySet thisCompileTypePropertySet = compileCommandPropertySet.createPropertySet(compileType.getType());
- //Set its properties.
- thisCompileTypePropertySet.addProperty(ISystemCompileXMLConstants.TYPE_ATTRIBUTE, ISystemCompileXMLConstants.TYPE_ELEMENT);
- thisCompileTypePropertySet.addProperty(ISystemCompileXMLConstants.LABEL_ATTRIBUTE, compileType.getType());
- thisCompileTypePropertySet.addProperty(ISystemCompileXMLConstants.LASTUSED_ATTRIBUTE, lastUsedName);
- thisCompileTypePropertySet.addProperty(ISystemCompileXMLConstants.SOURCETYPE_ATTRIBUTE, compileType.getType());
- Vector cmds = compileType.getCompileCommands();
- for (int j = 0; j < cmds.size(); j++) {
- SystemCompileCommand cmd = (SystemCompileCommand) (cmds.get(j));
- IPropertySet thisCompileCommandPropertySet = thisCompileTypePropertySet.createPropertySet(cmd.getLabel() + j);
- if (null != cmd.getId())
- {
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.ID_ATTRIBUTE, cmd.getId());
- }
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.LABEL_ATTRIBUTE, cmd.getLabel());
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.TYPE_ATTRIBUTE, ISystemCompileXMLConstants.COMPILECOMMAND_ELEMENT);
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.NATURE_ATTRIBUTE, cmd.getNature());
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.DEFAULT_ATTRIBUTE, cmd.getDefaultString());
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.CURRENT_ATTRIBUTE, cmd.getCurrentString());
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.ID_ATTRIBUTE, cmd.getId());
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.MENU_ATTRIBUTE, cmd.getMenuOption());
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.ORDER_ATTRIBUTE, String.valueOf(j));
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.LABEL_EDITABLE_ATTRIBUTE, String.valueOf(cmd.isLabelEditable()));
- if (cmd.getJobEnvironment() != null) {
- thisCompileCommandPropertySet.addProperty(ISystemCompileXMLConstants.JOBENV_ATTRIBUTE, cmd.getJobEnvironment());
- }
-
- }
- }
- //Need to persist it.
- systemProfile.commit();
- /*
- // write out document to XML file
- TransformerFactory transformerFactory = TransformerFactory.newInstance();
- Transformer transformer = transformerFactory.newTransformer();
- DOMSource input = new DOMSource(doc);
- Result output = new StreamResult(file);
- transformer.transform(input, output);
- // now refresh the eclipse workspace model for the parent folder, to recognize changes we made
- SystemResourceHelpers.getResourceHelpers().refreshResource(getCompileFolder());
- */
- }
-
- /**
- * Prime document with default (supplied) types and names.
- * Return true if any written, false if none to write.
- */
- private Vector writeDefaults(ISystemProfile systemProfile) {
- SystemDefaultCompileCommands allCmds = parentManager.getDefaultCompileCommands();
- if (allCmds == null) return null;
- String[] defaultTypes = allCmds.getAllDefaultSuppliedSourceTypes();
- Vector types = new Vector();
- for (int i = 0; i < defaultTypes.length; i++) {
- SystemCompileType type = new SystemCompileType(this, defaultTypes[i]);
- SystemDefaultCompileCommand[] defaultCmds = allCmds.getCommandsForSrcType(defaultTypes[i]);
- if ((defaultCmds == null) || (defaultCmds.length == 0)) {
- types.add(type);
- continue;
- }
- SystemCompileCommand[] cmds = new SystemCompileCommand[defaultCmds.length];
- for (int j = 0; j < defaultCmds.length; j++) {
- String cmdName = defaultCmds[j].getLabel();
- String commandString = defaultCmds[j].getCommandWithParameters();
- // we can pass in null for the id, because the constructor checks if id is null
- // and if so tries to configure id automatically. This will work for IBM supplied commands.
- cmds[j] = new SystemCompileCommand(type, null, cmdName, ISystemCompileXMLConstants.NATURE_IBM_VALUE, commandString, commandString, ISystemCompileXMLConstants.MENU_BOTH_VALUE, j);
- type.addCompileCommandInOrder(cmds[j]);
- String jobEnv = defaultCmds[j].getJobEnvironment();
- if (jobEnv != null) cmds[j].setJobEnvironment(jobEnv);
- if (j == 0) {
- type.setLastUsedCompileCommand(cmds[j]);
- }
- }
- types.add(type);
- }
- write(types, systemProfile);
- //printCommandsByType(types); // temporary, for debugging
- return types;
- }
-
- /**
- * Print the commands to standard out, sorted by source type, for debugging purposes
- */
- public void printCommandsByType(Vector compileTypes) {
- System.out.println();
- System.out.println("Compile commands"); //$NON-NLS-1$
- System.out.println("-----------------"); //$NON-NLS-1$
- for (int idx = 0; idx < compileTypes.size(); idx++) {
- SystemCompileType type = (SystemCompileType) compileTypes.elementAt(idx);
- System.out.println("Type: " + type.getType()); //$NON-NLS-1$
- for (int jdx = 0; jdx < type.getNumOfCommands(); jdx++) {
- SystemCompileCommand cmd = type.getCompileCommand(jdx);
- cmd.printCommand(" "); //$NON-NLS-1$
- }
- }
- System.out.println();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileRemoteObjectMatcher.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileRemoteObjectMatcher.java
deleted file mode 100644
index 77385f1e7..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileRemoteObjectMatcher.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-
-public class SystemCompileRemoteObjectMatcher {
- private String ssfId, nameFilter, typeFilter;
- private boolean allSsfs, allNames, allTypes;
- private boolean genericSsfStart, genericNamesStart, genericTypesStart;
- private boolean genericSsfEnd, genericNamesEnd, genericTypesEnd;
- private String ssfIdPart, nameFilterPart, typeFilterPart;
-
- public SystemCompileRemoteObjectMatcher(String ssfId, String nameFilter, String typeFilter) {
- this.ssfId = ssfId;
- this.nameFilter = nameFilter;
- this.typeFilter = typeFilter;
- if (ssfId == null) {
- ssfId = "*"; //$NON-NLS-1$
- }
- if (nameFilter == null) {
- nameFilter = "*"; //$NON-NLS-1$
- }
- if (typeFilter == null) {
- typeFilter = "*"; //$NON-NLS-1$
- }
- // determine if any attribute is totally generic
- this.allSsfs = ssfId.equals("*"); //$NON-NLS-1$
- this.allNames = nameFilter.equals("*"); //$NON-NLS-1$
- this.allTypes = typeFilter.equals("*"); //$NON-NLS-1$
- // determine if any attribute value starts with asterisk
- this.genericSsfStart = !allSsfs && startsWithAsterisk(ssfId);
- this.genericNamesStart = !allNames && startsWithAsterisk(nameFilter);
- this.genericTypesStart = !allTypes && startsWithAsterisk(typeFilter);
- // determine if any attribute value ends with asterisk
- this.genericSsfEnd = !allSsfs && endsWithAsterisk(ssfId);
- this.genericNamesEnd = !allNames && endsWithAsterisk(nameFilter);
- this.genericTypesEnd = !allTypes && endsWithAsterisk(typeFilter);
- // strip of leading asterisk if there is one
- if (genericSsfStart) {
- ssfIdPart = stripLeadingAsterisk(ssfId);
- }
- if (genericNamesStart) {
- nameFilterPart = stripLeadingAsterisk(nameFilter);
- }
- if (genericTypesStart) {
- typeFilterPart = stripLeadingAsterisk(typeFilter);
- }
- // strip of trailing asterisk if there is one
- if (genericSsfEnd) {
- ssfIdPart = stripTrailingAsterisk(ssfId);
- }
- if (genericNamesEnd) {
- nameFilterPart = stripTrailingAsterisk(nameFilter);
- }
- if (genericTypesEnd) {
- typeFilterPart = stripTrailingAsterisk(typeFilter);
- }
- }
-
- /**
- * 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 name.substring(1);
- }
-
- /**
- * Helper method.
- * Strips off the trailing asterisk.
- */
- protected String stripTrailingAsterisk(String name) {
- return name.substring(0, name.length() - 1);
- }
-
- /**
- * Getter method.
- * Return what was specified for the <samp>subsystemconfigurationid</samp> xml attribute.
- */
- public String getSubSystemFactoryId() {
- return ssfId;
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns true if the current selection matches all the given filtering criteria, false otherwise.
- */
- public boolean appliesTo(Object element) {
- ISystemRemoteElementAdapter adapter = SystemAdapterHelpers.getRemoteAdapter(element);
- if (adapter == null) {
- return false;
- }
- boolean applies = true;
- // must match on all attributes
- // check for match on subsystem factory id
- boolean ssfIdMatch = true;
- if (!allSsfs) {
- String subsystem = adapter.getSubSystemConfigurationId(element);
- if (ssfId == null) {
- ssfIdMatch = false;
- } else if (!genericSsfStart && !genericSsfEnd) {
- ssfIdMatch = subsystem.equals(ssfId);
- } else if (genericSsfStart) {
- ssfIdMatch = subsystem.endsWith(ssfIdPart);
- } else if (genericSsfEnd) {
- ssfIdMatch = subsystem.startsWith(ssfIdPart);
- }
- }
- if (!ssfIdMatch) {
- return false;
- }
- // check for match on name filter
- boolean nameMatch = true;
- if (!allNames) {
- String name = adapter.getName(element);
- if (name == null || !genericNamesStart) {
- nameMatch = false;
- } else if (!genericNamesStart && !genericNamesEnd) {
- nameMatch = name.equals(nameFilter);
- } else if (genericNamesStart) {
- nameMatch = name.endsWith(nameFilterPart);
- } else if (genericNamesEnd) {
- nameMatch = name.startsWith(nameFilterPart);
- }
- }
- if (!nameMatch) {
- return false;
- }
- // check for match on type filter
- boolean typeMatch = true;
- if (!allTypes) {
- String type = adapter.getRemoteSourceType(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;
- }
- return applies;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileType.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileType.java
deleted file mode 100644
index 3288a1f8b..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileType.java
+++ /dev/null
@@ -1,348 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * A SystemCompileType is effectively an index that maps a compilable source type (like ".cpp") to a
- * list of SystemCompileCommand objects that represent the commands that are registered against that source
- * type. It also remembers the last-used such compile command.
- * <p>
- * There is a one-to-one relationship between a source type like (".cpp") and a SystemCompileType... for
- * each compilable source type there will be one SystemCompileType object. It is a list of these that is
- * effectively persisted to disk via an xml file, one file per system profile. This is what the SystemCompileProfile
- * class manages ... a list of SystemCompileProfile objects.
- */
-public class SystemCompileType implements IAdaptable {
- private SystemCompileProfile profile;
- private String type;
- private SystemCompileCommand lastUsedCompileCommand;
- private Vector commands = new Vector();
-
- /**
- * Constructor for SystemCompileType when the source type isn't known yet.
- * @see #setType(String)
- */
- public SystemCompileType(SystemCompileProfile profile) {
- super();
- setParentProfile(profile);
- }
-
- /**
- * Constructor for SystemCompileType when you know the source type it represents.
- */
- public SystemCompileType(SystemCompileProfile profile, String type) {
- super();
- setParentProfile(profile);
- setType(type);
- }
-
- /**
- * Constructor for SystemCompileType when you know the source type and last used command
- */
- public SystemCompileType(SystemCompileProfile profile, String type, SystemCompileCommand lastUsedCompileCmd) {
- super();
- setParentProfile(profile);
- setType(type);
- setLastUsedCompileCommand(lastUsedCompileCmd);
- }
-
- /**
- * Set the parent SystemCompileProfile profile
- * @param profile the parent profile
- */
- public void setParentProfile(SystemCompileProfile profile) {
- this.profile = profile;
- }
-
- /**
- * Get the parent SystemCompileProfile profile
- * @return the parent profile
- */
- public SystemCompileProfile getParentProfile() {
- return profile;
- }
-
- /**
- * Set the source type value this represents. This is typically a file type like "cpp".
- * @param type the type
- */
- public void setType(String type) {
- //this.type = type.toUpperCase(); defect 46282
- this.type = type;
- }
-
- /**
- * Get the source type value this represents. This is typically a file type like "cpp".
- * @return the type
- */
- public String getType() {
- return type;
- }
-
- /**
- * Set the last used compile command
- * @param lastUsedCompileCommand the last used compile command
- */
- public void setLastUsedCompileCommand(SystemCompileCommand lastUsedCompileCommand) {
- this.lastUsedCompileCommand = lastUsedCompileCommand;
- }
-
- /**
- * Get the last used compile command
- */
- public SystemCompileCommand getLastUsedCompileCommand() {
- return lastUsedCompileCommand;
- }
-
- /**
- * Add a compile command at the end.
- * @param command a compile command object
- */
- public void addCompileCommand(SystemCompileCommand command) {
- flushCache();
- commands.add(command);
- }
-
- /**
- * Add a compile command, into its appropriate order as per its getOrder() value.
- * @param compileCommand a compile command object
- */
- public void addCompileCommandInOrder(SystemCompileCommand compileCommand) {
- flushCache();
- if (commands.size() == 0) {
- commands.add(compileCommand);
- return;
- }
- int order = compileCommand.getOrder();
- SystemCompileCommand cmd = null;
- for (int i = 0; i < commands.size(); i++) {
- cmd = (SystemCompileCommand) (commands.get(i));
- if (order < cmd.getOrder()) {
- commands.insertElementAt(compileCommand, i);
- return;
- }
- }
- // reached the end, so just add
- commands.add(compileCommand);
- }
-
- /**
- * Remove a compile command give its reference
- * @param cmd the compile command to remove
- */
- public void removeCompileCommand(SystemCompileCommand cmd) {
- flushCache();
- SystemCompileCommand compileCmd;
- for (int i = 0; i < commands.size(); i++) {
- compileCmd = (SystemCompileCommand) (commands.get(i));
- if (compileCmd == cmd) {
- commands.remove(i);
- return;
- }
- }
- }
-
- /**
- * Remove a compile command given its index
- * @param index the zero-based index of the compile command to remove
- */
- public SystemCompileCommand removeCompileCommand(int index) {
- flushCache();
- return (SystemCompileCommand) (commands.remove(index));
- }
-
- /**
- * Insert a compile command at the given index
- * @param compileName a compile command
- * @param index the zero-based index to insert it at
- */
- public void insertCompileCommand(SystemCompileCommand compileName, int index) {
- commands.insertElementAt(compileName, index);
- flushCache();
- }
-
- /**
- * Get all compile commands associated with this type
- * @return a Vector of SystemCompileCommand objects
- */
- public Vector getCompileCommands() {
- return commands;
- }
-
- /**
- * Get all compile commands associated with this type, as an array.
- * @return an array of SystemCompileCommand objects
- */
- public SystemCompileCommand[] getCompileCommandsArray() {
- SystemCompileCommand[] cmds = new SystemCompileCommand[commands.size()];
- for (int idx = 0; idx < cmds.length; idx++)
- cmds[idx] = (SystemCompileCommand) commands.elementAt(idx);
- return cmds;
- }
-
- /**
- * Get the number of compile commands associated with this type
- */
- public int getNumOfCommands() {
- return commands.size();
- }
-
- /**
- * Get all promptable compile commands associated with this type
- * @return a vector of all promptable compile commands ... that is, SystemCompileCommand objecs
- */
- public Vector getPromptableCompileCommands() {
- Vector promptableCmds = new Vector();
- SystemCompileCommand compileCmd = null;
- for (int i = 0; i < commands.size(); i++) {
- compileCmd = (SystemCompileCommand) (commands.get(i));
- if (compileCmd.isPromptable()) promptableCmds.add(compileCmd);
- }
- return promptableCmds;
- }
-
- /**
- * Get all non-promptable compile commands associated with this type
- * @return a vector of all non-promptable compile commands ... that is, SystemCompileCommand objecs
- */
- public Vector getNonPromptableCompileCommands() {
- Vector nonPromptableCmds = new Vector();
- SystemCompileCommand compileCmd = null;
- for (int i = 0; i < commands.size(); i++) {
- compileCmd = (SystemCompileCommand) (commands.get(i));
- if (compileCmd.isNonPromptable()) nonPromptableCmds.add(compileCmd);
- }
- return nonPromptableCmds;
- }
-
- /**
- * Get the compile command, given its label
- */
- public SystemCompileCommand getCompileLabel(String label) {
- SystemCompileCommand compileCmd = null;
- for (int i = 0; i < commands.size(); i++) {
- compileCmd = (SystemCompileCommand) (commands.get(i));
- if (compileCmd.getLabel().equalsIgnoreCase(label)) {
- return compileCmd;
- }
- }
- return null;
- }
-
- /**
- * Get compile commands, given the id. Note that compile commands with the same
- * id might exist for a compile type. This is possible if a user copies a compile
- * command in the Work With dialog, and pastes it in the same type. We only
- * require the label to be changed, but the id remains the same.
- * @return a vector of compile commands that have the given id.
- */
- public Vector getCompileId(String id) {
- Vector list = new Vector();
- SystemCompileCommand compileCmd = null;
- for (int i = 0; i < commands.size(); i++) {
- compileCmd = (SystemCompileCommand) (commands.get(i));
- if (compileCmd.getId().equalsIgnoreCase(id)) {
- list.add(compileCmd);
- }
- }
- return list;
- }
-
- /**
- * Find out if a given compile label already exists
- */
- public boolean isIdExists(String id) {
- SystemCompileCommand compileCmd = null;
- for (int idx = 0; idx < commands.size(); idx++) {
- compileCmd = (SystemCompileCommand) (commands.get(idx));
- if (compileCmd.getId().equalsIgnoreCase(id)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Get the compile command, given its index
- */
- public SystemCompileCommand getCompileCommand(int index) {
- return (SystemCompileCommand) (commands.get(index));
- }
-
- /**
- * Find out if a given compile label already exists
- */
- public boolean isLabelExists(String nameString) {
- SystemCompileCommand compileCmd = null;
- for (int idx = 0; idx < commands.size(); idx++) {
- compileCmd = (SystemCompileCommand) (commands.get(idx));
- if (compileCmd.getLabel().equalsIgnoreCase(nameString)) return true;
- }
- return false;
- }
-
- /**
- * Find out if a compile label with the same name already exists.
- * Checks if it exists twice or more, since the first is assumed to
- * be the current one being edited.
- */
- public boolean isDuplicateLabelExists(String nameString) {
- SystemCompileCommand compileCmd = null;
- boolean once = false;
- // has to match twice for us to know that there is a duplicate
- for (int idx = 0; idx < commands.size(); idx++) {
- compileCmd = (SystemCompileCommand) (commands.get(idx));
- if (compileCmd.getLabel().equalsIgnoreCase(nameString)) {
- if (!once)
- once = true;
- else
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return a vector of Strings representing the labels for all the compile commands
- * within this type. This is typically for uniqueness checking.
- */
- public Vector getExistingLabels() {
- Vector labels = new Vector();
- for (int idx = 0; idx < commands.size(); idx++)
- labels.add(((SystemCompileCommand) commands.get(idx)).getLabel());
- return labels;
- }
-
- /**
- * Return this object as a string.
- */
- public String toString() {
- return getType();
- }
-
- /**
- * 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 METHODS
- private void flushCache() {
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommand.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommand.java
deleted file mode 100644
index c9ecc3122..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommand.java
+++ /dev/null
@@ -1,214 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.StringTokenizer;
-
-/**
- * This class encapsulates, for a particular compile command, the
- * important information for that command including:
- * <ul>
- * <li>The label of the command... which is what the user sees in the compile menu
- * <li>The name of the command... without parameters.
- * <li>The default command string with the minimum parameters we need to compile with this command, using substitution variables.
- * </ul>
- */
-public class SystemDefaultCompileCommand {
- // instance variables
- protected String name, label, jobEnv;
- protected String addlParms;
- protected String[] srcTypes;
-
- /**
- * Constructor that takes a command name and label.
- * You must call setAdditionalCommandParameters after this.
- */
- public SystemDefaultCompileCommand(String commandLabel, String commandName) {
- super();
- this.name = commandName;
- this.label = commandLabel;
- }
-
- /**
- * Constructor that just takes a command name and defaults the label to it.
- * You must call setAdditionalCommandParameters after this.
- */
- public SystemDefaultCompileCommand(String commandName) {
- this(commandName, commandName);
- }
-
- /**
- * Constructor that takes a command name and label and the parameters.
- * This avoids you having to call setAdditionalCommandParameters.
- */
- public SystemDefaultCompileCommand(String commandLabel, String commandName, String parameters) {
- this(commandLabel, commandName);
- setAdditionalParameters(parameters);
- }
-
- /**
- * Set additional minimum parameters not specified via the constructor. Will be appended to the
- * command string in the methods getMinimumCommandWithParameters and getFullCommandWithParameters.
- * <p>
- * Don't worry about a leading blank.
- */
- public void setAdditionalParameters(String parms) {
- this.addlParms = " " + parms; //$NON-NLS-1$
- }
-
- /**
- * Set the source type this applies to, when there is only one
- */
- public void setSourceType(String type) {
- setSourceTypes(new String[] { type });
- }
-
- /**
- * Set the source types this applies to
- */
- public void setSourceTypes(String[] types) {
- this.srcTypes = types;
- }
-
- /**
- * Get the source types this applies to
- */
- public String[] getSourceTypes() {
- return srcTypes;
- }
-
- /**
- * Return true if this command applies to the given source type
- */
- public boolean appliesToSourceType(String type) {
- if (srcTypes == null)
- return false;
- else {
- boolean match = false;
- for (int idx = 0; !match && (idx < srcTypes.length); idx++) {
- if (type.equals(srcTypes[idx])) match = true;
- }
- return match;
- }
- }
-
- /**
- * Return the command label
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Return the command name, without parameters
- */
- public String getName() {
- return name;
- }
-
- /**
- * Return command fully populated with default parameters and substitution variables
- */
- public String getCommandWithParameters() {
- return getCommandWithParameters(null);
- }
-
- /**
- * Set the job environment. Some systems support multiple command systems, and this attribute
- * is needed to identify which system this should run in.
- */
- public void setJobEnvironment(String jobEnv) {
- this.jobEnv = jobEnv;
- }
-
- /**
- * Return the job environment. This is not often used, but sometimes needed for systems
- * that support multiple command systems.
- */
- public String getJobEnvironment() {
- return jobEnv;
- }
-
- /**
- * Given user-specified command paramaters (minus the cmd name),
- * verify it has all the minimum parameters we defined for this command.
- * For any that are missing, add them...
- */
- public String fillWithRequiredParams(String commandParams) {
- if ((commandParams == null) || (commandParams.length() == 0))
- return getCommandWithParameters();
- else
- return getCommandWithParameters(commandParams);
- }
-
- /**
- * Print the command lable to standard out, for debugging purposes
- */
- public void printCommandLabel() {
- System.out.println(label);
- }
-
- /**
- * Print the command name to standard out, for debugging purposes
- */
- public void printCommandName() {
- System.out.println(name);
- }
-
- /**
- * Print the full command string to standard out, for debugging purposes
- */
- public void printCommand() {
- System.out.println(getCommandWithParameters());
- }
-
- // -------------------
- // PRIVATE METHODS...
- // -------------------
- /**
- * Private implementation that supports two modes:
- * - append all required parameters
- * - append only those required parameters that do not already exist
- * <p>
- * Typically not overridden. Rather populateWithParameters is overridden, which this calls.
- */
- protected String getCommandWithParameters(String existingParameters) {
- StringBuffer buffer = null;
- if (existingParameters == null)
- buffer = new StringBuffer(name);
- else
- buffer = new StringBuffer(name + " " + existingParameters); //$NON-NLS-1$
- populateWithParameters(buffer);
- if (addlParms != null) {
- if (existingParameters == null)
- buffer.append(" " + addlParms); //$NON-NLS-1$
- else {
- // we have to look at each additional parameter and determine if it has been specified in
- // given parameter string or not. If not, we add that additional parameter.
- StringTokenizer tokens = new StringTokenizer(addlParms);
- while (tokens.hasMoreTokens()) {
- String parm = tokens.nextToken();
- String parmName = parm.substring(0, parm.indexOf('(') + 1); // "PARM("
- if (existingParameters.indexOf(parmName) == -1) buffer.append(" " + parm); //$NON-NLS-1$
- }
- }
- }
- return buffer.toString();
- }
-
- /**
- * Overridable method that will append required parameters to the command string.
- * These are any not already specified via additional parameters
- */
- protected void populateWithParameters(StringBuffer bufferSoFar) {
- return;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommands.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommands.java
deleted file mode 100644
index 2ba9c5908..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemDefaultCompileCommands.java
+++ /dev/null
@@ -1,196 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.Vector;
-
-/**
- * This class manages a list of compile commands.
- */
-public abstract class SystemDefaultCompileCommands {
- // instance variables
- private Vector commands = new Vector();
- private SystemDefaultCompileCommand[] array;
- private String[] nameArray, stringArray;
-
- /**
- * Constructor for ISeriesCompileCommands.
- */
- public SystemDefaultCompileCommands() {
- super();
- }
-
- /**
- * Return all pre-defined compilable source types. Eg, for a typical file system, this
- * would be file extensions, like ".c", ".cpp",etc.
- */
- public abstract String[] getAllDefaultSuppliedSourceTypes();
-
- /**
- * Get the compile command at the given index
- */
- public SystemDefaultCompileCommand getCommand(int idx) {
- return (SystemDefaultCompileCommand) commands.elementAt(idx);
- }
-
- /**
- * Get the compile command the corresponds to the given command name.
- * Will return null if none found.
- */
- public SystemDefaultCompileCommand getCommand(String commandName) {
- SystemDefaultCompileCommand match = null;
- for (int idx = 0; (match == null) && (idx < commands.size()); idx++) {
- SystemDefaultCompileCommand cmd = (SystemDefaultCompileCommand) commands.elementAt(idx);
- if (cmd.getName().equalsIgnoreCase(commandName)) match = cmd;
- }
- return match;
- }
-
- /**
- * Get the commands as an array
- */
- public SystemDefaultCompileCommand[] getCommands() {
- if ((array == null) || (array.length != commands.size())) {
- array = new SystemDefaultCompileCommand[commands.size()];
- for (int idx = 0; idx < commands.size(); idx++)
- array[idx] = (SystemDefaultCompileCommand) commands.elementAt(idx);
- }
- return array;
- }
-
- /**
- * Get the commands that match the given source types.
- * Never returns null, but may return an empty array.
- */
- public SystemDefaultCompileCommand[] getCommandsForSrcType(String srcType) {
- Vector v = new Vector();
- for (int idx = 0; idx < commands.size(); idx++) {
- if (((SystemDefaultCompileCommand) commands.elementAt(idx)).appliesToSourceType(srcType)) v.addElement(commands.elementAt(idx));
- }
- SystemDefaultCompileCommand[] matches = new SystemDefaultCompileCommand[v.size()];
- for (int idx = 0; idx < matches.length; idx++)
- matches[idx] = (SystemDefaultCompileCommand) v.elementAt(idx);
- return matches;
- }
-
- /**
- * Get the command names only as an array
- */
- public String[] getCommandNames() {
- if ((nameArray == null) || (nameArray.length != commands.size())) {
- nameArray = new String[commands.size()];
- for (int idx = 0; idx < commands.size(); idx++)
- nameArray[idx] = ((SystemDefaultCompileCommand) commands.elementAt(idx)).getName();
- }
- return nameArray;
- }
-
- /**
- * Get the fully-populated command strings as an array of string
- */
- public String[] getCommandStrings() {
- if ((stringArray == null) || (stringArray.length != commands.size())) {
- stringArray = new String[commands.size()];
- for (int idx = 0; idx < commands.size(); idx++)
- stringArray[idx] = ((SystemDefaultCompileCommand) commands.elementAt(idx)).getCommandWithParameters();
- }
- return stringArray;
- }
-
- /**
- * Return a count of the compile commands in this list
- */
- public int getSize() {
- return commands.size();
- }
-
- /**
- * Given a user-specified command string, check if the command is one of those defined in this list,
- * and if so, verify it has all the minimum parameters. For any that are missing, add them...
- */
- public String fillWithRequiredParams(String commandString) {
- if (commandString == null) return null;
- // first, extract the command name
- commandString = commandString.trim();
- if (commandString.length() == 0) return commandString;
- int blankIdx = commandString.indexOf(' ');
- String cmdName = null;
- String cmdParms = null;
- if (blankIdx == -1) // no blanks?
- {
- cmdName = commandString; // assume the string only contains a command name, no parms
- } else {
- cmdName = commandString.substring(0, blankIdx);
- cmdParms = commandString.substring(blankIdx + 1);
- }
- // second, test if this command name is in our list...
- SystemDefaultCompileCommand cmdMatch = getCommand(cmdName);
- if (cmdMatch != null)
- return cmdMatch.fillWithRequiredParams(cmdParms);
- else
- return commandString;
- }
-
- /**
- * Add a new compile command to the list
- */
- public void addCommand(SystemDefaultCompileCommand cmd) {
- commands.add(cmd);
- clearCache();
- }
-
- /**
- * Print the command labels to standard out, for debugging purposes
- */
- public void printCommandLabels() {
- System.out.println();
- System.out.println("Total commands: " + getSize()); //$NON-NLS-1$
- for (int idx = 0; idx < commands.size(); idx++) {
- SystemDefaultCompileCommand cmd = (SystemDefaultCompileCommand) commands.elementAt(idx);
- cmd.printCommandLabel();
- }
- System.out.println();
- }
-
- /**
- * Print the command names to standard out, for debugging purposes
- */
- public void printCommandNames() {
- System.out.println();
- System.out.println("Total commands: " + getSize()); //$NON-NLS-1$
- for (int idx = 0; idx < commands.size(); idx++) {
- SystemDefaultCompileCommand cmd = (SystemDefaultCompileCommand) commands.elementAt(idx);
- cmd.printCommandName();
- }
- System.out.println();
- }
-
- /**
- * Print the full command strings to standard out, for debugging purposes
- */
- public void printCommands() {
- System.out.println();
- System.out.println("Total commands: " + getSize()); //$NON-NLS-1$
- for (int idx = 0; idx < commands.size(); idx++) {
- SystemDefaultCompileCommand cmd = (SystemDefaultCompileCommand) commands.elementAt(idx);
- cmd.printCommand();
- }
- System.out.println();
- }
-
- /**
- * Clear array cache
- */
- private void clearCache() {
- array = null;
- nameArray = null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemNewCompileSrcTypeDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemNewCompileSrcTypeDialog.java
deleted file mode 100644
index b7cb5a6eb..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemNewCompileSrcTypeDialog.java
+++ /dev/null
@@ -1,217 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMassager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.validators.ValidatorSourceType;
-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 used when in the Work With Compile Commands dialog when the user presses
- * the "Add..." button to add a new source type.
- * <p>
- * This class is designed so that it need not be subclassed. Rather, the mri, validation
- * and massaging can all be configured.
- */
-public class SystemNewCompileSrcTypeDialog extends SystemPromptDialog {
- // gui
- protected Text srcTypeText;
- // input
- protected SystemCompileManager manager;
- protected ISystemValidator srcTypeValidator;
- protected ISystemMassager srcTypeMassager;
- protected boolean caseSensitive;
- protected String[] existingTypes;
- // output
- protected String newSrcType;
- // state
- protected SystemMessage errorMessage;
- protected boolean ignoreEvents;
- // mri
- protected String mriVerbageLabel, mriPromptLabel, mriPromptTooltip;
-
- /**
- * Constructor when you want to use the default title.
- * @param shell The parent window hosting this dialog
- * @param compileManager The compile manager that manages these compile commands
- * @param caseSensitive True if source types are case-sensitive. False if not.
- */
- public SystemNewCompileSrcTypeDialog(Shell shell, SystemCompileManager compileManager, boolean caseSensitive) {
- this(shell, compileManager, caseSensitive, SystemUDAResources.RESID_COMPILE_NEWSRCTYPE_TITLE);
- }
-
- /**
- * Constructor when you want to supply your own title.
- * @param shell The parent window hosting this dialog
- * @param compileManager The compile manager that manages these compile commands
- * @param caseSensitive True if source types are case-sensitive. False if not.
- */
- public SystemNewCompileSrcTypeDialog(Shell shell, SystemCompileManager compileManager, boolean caseSensitive, String title) {
- super(shell, title);
- this.manager = compileManager;
- this.caseSensitive = caseSensitive;
- setMRI(SystemUDAResources.RESID_COMPILE_NEWSRCTYPE_VERBAGE_LABEL, SystemUDAResources.RESID_COMPILE_NEWSRCTYPE_PROMPT_LABEL, SystemUDAResources.RESID_COMPILE_NEWSRCTYPE_PROMPT_TOOLTIP);
- }
-
- public void setMRI(String verbageMRILabel, String promptMRILabel, String promptMRITooltip) {
- if (verbageMRILabel != null) this.mriVerbageLabel = verbageMRILabel;
- if (promptMRILabel != null) this.mriPromptLabel = promptMRILabel;
- if (promptMRITooltip != null) this.mriPromptTooltip = promptMRITooltip;
- }
-
- /**
- * Set the validator for the new src type
- */
- public void setSrcTypeValidator(ISystemValidator validator) {
- this.srcTypeValidator = validator;
- if ((existingTypes != null) && (srcTypeValidator instanceof ISystemValidatorUniqueString)) {
- ((ISystemValidatorUniqueString) srcTypeValidator).setExistingNamesList(existingTypes);
- }
- }
-
- /**
- * Set the existing source types so error checking will prevent them from being entered again.
- */
- public void setExistingSrcTypes(String[] srcTypes) {
- this.existingTypes = srcTypes;
- if ((srcTypeValidator != null) && (srcTypeValidator instanceof ISystemValidatorUniqueString)) {
- ((ISystemValidatorUniqueString) srcTypeValidator).setExistingNamesList(existingTypes);
- }
- }
-
- /**
- * Set the massager for the new src type. This will be
- * called to massage the source type before it is returned.
- * Eg, you might pass MassagerFoldCase to fold the result to uppercase or lowercase.
- */
- public void setSrcTypeMassager(ISystemMassager massager) {
- this.srcTypeMassager = massager;
- }
-
- /**
- * Create GUI controls, populate into given composite.
- */
- protected Control createInner(Composite parent) {
- if (srcTypeValidator == null) setSrcTypeValidator(new ValidatorSourceType(caseSensitive));
- // Inner composite
- int nbrColumns = 2;
- Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- // VERBAGE
- SystemWidgetHelpers.createVerbiage(composite_prompts, mriVerbageLabel, nbrColumns, false, 250);
- // ENTRY FIELD
- srcTypeText = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, mriPromptLabel, mriPromptTooltip);
- // add keystroke listeners...
- srcTypeText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateInput();
- }
- });
- setPageComplete(false); // since input is currently empty
- return composite_prompts;
- }
-
- /**
- * Return widget to set initial focus to
- */
- protected Control getInitialFocusControl() {
- return srcTypeText;
- }
-
- /**
- * Called when user presses OK button.
- * Return true to close dialog.
- * Return false to not close dialog.
- */
- protected boolean processOK() {
- newSrcType = srcTypeText.getText().trim();
- if (srcTypeMassager != null) {
- newSrcType = srcTypeMassager.massage(newSrcType);
- ignoreEvents = true;
- srcTypeText.setText(newSrcType);
- ignoreEvents = false;
- }
- boolean closeDialog = verify();
- if (closeDialog) {
- setOutputObject(newSrcType);
- }
- return closeDialog;
- }
-
- /**
- * Verifies all input.
- * @return true if there are no errors in the user input
- */
- public boolean verify() {
- errorMessage = validateInput();
- if (errorMessage == null)
- clearErrorMessage();
- else {
- srcTypeText.setFocus();
- setErrorMessage(errorMessage);
- }
- return (errorMessage == null);
- }
-
- /**
- * This hook method is called whenever the text changes in the cmd input field.
- * Currently not used.
- */
- protected SystemMessage validateInput() {
- if (ignoreEvents) return errorMessage;
- errorMessage = null;
- if (srcTypeValidator != null) errorMessage = srcTypeValidator.validate(srcTypeText.getText().trim());
- if (errorMessage != null)
- setErrorMessage(errorMessage);
- else
- clearErrorMessage();
- setPageComplete();
- return errorMessage;
- }
-
- /**
- * This method can be called by the dialog or wizard page host, to decide whether to enable
- * or disable the next, final or ok buttons. It returns true if the minimal information is
- * available and is correct.
- */
- public boolean isPageComplete() {
- boolean pageComplete = false;
- if (errorMessage == null) {
- pageComplete = (srcTypeText.getText().trim().length() > 0);
- }
- return pageComplete;
- }
-
- /**
- * Inform caller of page-complete status of this form
- */
- public void setPageComplete() {
- setPageComplete(isPageComplete());
- }
-
- /**
- * Returns the user-specified new source type
- */
- public String getNewSrcType() {
- //System.out.println("Returning " + newSrcType);
- return newSrcType;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemPromptCompileCommandDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemPromptCompileCommandDialog.java
deleted file mode 100644
index e74317da6..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemPromptCompileCommandDialog.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.SystemPromptCommandDialog;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog used when running a user action, which has the prompt option specified.
- * This allows the user to edit the resolved command, and the result is placed
- * in the output object.
- * <p>
- * This default implementation merely puts the command into an entry field, which
- * the user can edit.
- */
-public class SystemPromptCompileCommandDialog extends SystemPromptCommandDialog {
- /**
- * Constructor.
- * @param shell The parent window hosting this dialog
- * @param command The resolved command from the user action
- */
- public SystemPromptCompileCommandDialog(Shell shell, String command) {
- super(shell, command, SystemUDAResources.RESID_COMPILE_PROMPTCMD_TITLE);
- this.cmd = command;
- //setHelp(RSEUIPlugin.HELPPREFIX+"drnp0000");
- }
-
- /**
- * Translated text configuration method.
- * Override to return OK button label if you don't want the default
- */
- protected String getOKButtonLabel() {
- return SystemUDAResources.RESID_COMPILE_PROMPTCMD_OKBUTTON_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return OK button tooltip if you don't want the default
- */
- protected String getOKButtonToolTipText() {
- return SystemUDAResources.RESID_COMPILE_PROMPTCMD_OKBUTTON_TOOLTIP;
- }
-
- /**
- * Translated text configuration method.
- * Override to return Cancel button tooltip if you don't want the default
- */
- protected String getCancelButtonToolTipText() {
- return SystemUDAResources.RESID_COMPILE_PROMPTCMD_CANCELBUTTON_TOOLTIP;
- }
-
- /**
- * Translated text configuration method.
- * Override to return verbage message if you don't want the default
- */
- protected String getVerbage() {
- return SystemUDAResources.RESID_COMPILE_PROMPTCMD_VERBAGE_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return label for the command prompt, if you don't want the default
- */
- protected String getPromptLabel() {
- return SystemUDAResources.RESID_COMPILE_PROMPTCMD_PROMPT_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return tooltip text for the command prompt, if you don't want the default
- */
- protected String getPromptToolTipText() {
- return SystemUDAResources.RESID_COMPILE_PROMPTCMD_PROMPT_TOOLTIP;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java
deleted file mode 100644
index b48d005a5..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java
+++ /dev/null
@@ -1,1125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David Dykstal (IBM) - [232318] fixing layout problems with button composite
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.compile;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
-import org.eclipse.rse.ui.view.SystemAdapterHelpers;
-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.Combo;
-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;
-
-/**
- * A dialog that allows the user to work with the compile commands for the compile actions in this subsystem.
- */
-public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog implements SelectionListener, ISystemCompileCommandEditPaneListener, IMenuListener, Runnable,
- ISystemCompileCommandEditPaneHoster {
- protected Button applyButton, revertButton, newSrcTypeButton, rmvSrcTypeButton;
- protected Combo profileCombo;
- protected Combo srcTypeCombo;
- protected List listView;
- protected Label ccLabel;
- protected SystemEditPaneStateMachine sm;
- // context menu actions support
- private SystemCompileCommandActionCopy copyAction;
- private SystemCompileCommandActionPaste pasteAction;
- private SystemCompileCommandActionDelete deleteAction;
- private SystemCompileCommandActionMoveUp moveUpAction;
- private SystemCompileCommandActionMoveDown moveDownAction;
- private SystemCompileCommandActionRestoreDefaults restoreAction;
- private MenuManager menuMgr;
- private Clipboard clipboard;
- private boolean menuListenerAdded;
- // inputs
- protected SystemCompileManager compileManager;
- protected SystemCompileCommandEditPane editpane;
- protected SystemCompileProfile[] compProfiles;
- protected SystemCompileProfile currentCompProfile;
- protected SystemCompileType currentCompType;
- protected boolean caseSensitive;
- protected boolean supportsAddSrcTypeButton;
- private String srcTypeLabel, srcTypeTooltip;
- // state
- protected boolean ignoreEvents = false;
- protected boolean restoreProfileComboSelection = true;
- protected boolean showProfileCombo;
- protected boolean resetting = false;
- protected boolean giveEditorFocus = true;
- protected int prevProfileComboSelection = 0;
- protected int prevSrcTypeComboSelection = 0;
- protected int prevListSelection = 0;
- protected String[] compileTypeNames;
- private boolean traceTest;
-
- /**
- * Constructor
- */
- public SystemWorkWithCompileCommandsDialog(Shell shell, SystemCompileManager compileManager, SystemCompileProfile currentCompProfile) {
- this(shell, compileManager, currentCompProfile, SystemUDAResources.RESID_WWCOMPCMDS_TITLE);
- }
-
- /**
- * Constructor, when unique title desired
- */
- public SystemWorkWithCompileCommandsDialog(Shell shell, SystemCompileManager compileManager, SystemCompileProfile currentCompProfile, String title) {
- super(shell, title);
- this.compileManager = compileManager;
- this.currentCompProfile = currentCompProfile;
- this.compProfiles = new SystemCompileProfile[] { currentCompProfile };
- this.supportsAddSrcTypeButton = true;
- setCancelButtonLabel(SystemUDAResources.BUTTON_CLOSE);
- setShowOkButton(false);
- setOutputObject(null);
- setHelp();
- // default mri values...
- setSourceTypePromptMRI(compileManager.getSourceTypePromptMRILabel(), compileManager.getSourceTypePromptMRITooltip());
- }
-
- /**
- * Overridable extension point for setting dialog help
- */
- protected void setHelp() {
- setHelp(RSEUIPlugin.HELPPREFIX + "wwcc0000"); //$NON-NLS-1$
- }
-
- // INPUT/CONFIGURATION
- /**
- * Specify an edit pane that prompts the user for the contents of a compile command
- */
- public void setCompileCommandEditPane(SystemCompileCommandEditPane editPane) {
- this.editpane = editPane;
- }
-
- /**
- * Set the compile profiles to show in the profile combo.
- * @param profiles - array of profiles to show
- */
- public void setProfiles(SystemCompileProfile[] profiles) {
- if (profiles == null)
- compProfiles = new SystemCompileProfile[0];
- else {
- compProfiles = profiles;
- showProfileCombo = true;
- }
- }
-
- /**
- * Set whether the source types, labels, etc are case sensitive
- */
- public void setCaseSensitive(boolean caseSensitive) {
- this.caseSensitive = caseSensitive;
- }
-
- /**
- * Set supports the "Add..." button beside the source type combo.
- * The default is true.
- */
- public void setSupportsAddSrcTypeButton(boolean supports) {
- this.supportsAddSrcTypeButton = supports;
- }
-
- /**
- * Set the mri for the source type prompt
- */
- public void setSourceTypePromptMRI(String srcTypeMRILabel, String srcTypeMRITooltip) {
- this.srcTypeLabel = srcTypeMRILabel;
- this.srcTypeTooltip = srcTypeMRITooltip;
- }
-
- /**
- * Set the compile to pre-select in the types combo
- */
- public void setCompileType(SystemCompileType type) {
- this.currentCompType = type;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
- return editpane.getInitialFocusControl();
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent) {
- editpane = getCompileCommandEditPane(getShell());
- //editpane.setSubSystem(subsystem);
- // Inner composite
- int nbrColumns = 4;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- // profile combo
- profileCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite, null, SystemUDAResources.RESID_WWCOMPCMDS_PROFILE_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_PROFILE_TOOLTIP);
- ((GridData) profileCombo.getLayoutData()).horizontalSpan = nbrColumns - 1;
- // source type combo
- srcTypeCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite, null, srcTypeLabel, srcTypeTooltip);
- if (supportsAddSrcTypeButton) {
- newSrcTypeButton = SystemWidgetHelpers.createPushButton(composite, null, SystemUDAResources.RESID_WWCOMPCMDS_TYPES_BUTTON_ADD_LABEL,
- SystemUDAResources.RESID_WWCOMPCMDS_TYPES_BUTTON_ADD_TOOLTIP);
- rmvSrcTypeButton = SystemWidgetHelpers.createPushButton(composite, null, SystemUDAResources.RESID_WWCOMPCMDS_TYPES_BUTTON_RMV_LABEL,
- SystemUDAResources.RESID_WWCOMPCMDS_TYPES_BUTTON_RMV_TOOLTIP);
- rmvSrcTypeButton.setEnabled(false);
- } else
- ((GridData) srcTypeCombo.getLayoutData()).horizontalSpan = nbrColumns - 1;
- //SystemWidgetHelpers.setHelp(profileCombo, RSEUIPlugin.HELPPREFIX + "ccon0001", parentHelpId);
- addFillerLine(composite, nbrColumns);
- // create list view on left
- listView = SystemWidgetHelpers.createListBox(composite, SystemUDAResources.RESID_WWCOMPCMDS_LIST_LABEL, null, false, 1);
- //listView.setToolTipText(listPromptTip); annoying!
- GridData data = (GridData) listView.getLayoutData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.widthHint = 110;
- // 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);
- ((GridData) rightSideComposite.getLayoutData()).horizontalSpan = nbrColumns - 1;
- // now add a top spacer line and visual separator line, for the right side
- addFillerLine(rightSideComposite, 1);
- ccLabel = SystemWidgetHelpers.createLabel(rightSideComposite, ""); //$NON-NLS-1$
- addSeparatorLine(rightSideComposite, 1);
- // now populate top of right-side composite with edit pane...
- editpane.createContents(rightSideComposite);
- // 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);
- // 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;
- applyButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_APPLY_LABEL,
- SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_APPLY_TOOLTIP);
- ((GridData) applyButton.getLayoutData()).grabExcessHorizontalSpace = false;
- revertButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_REVERT_LABEL,
- SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_REVERT_TOOLTIP);
- ((GridData) revertButton.getLayoutData()).grabExcessHorizontalSpace = false;
- // 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.setApplyLabelForNewMode(SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_CREATE_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_CREATE_TOOLTIP);
- sm.setUnsetMode();
- // populate profile dropdown
- initProfileCombo();
- composite.layout(true);
- // add listeners
- profileCombo.addSelectionListener(this);
- srcTypeCombo.addSelectionListener(this);
- if (supportsAddSrcTypeButton) {
- newSrcTypeButton.addSelectionListener(this);
- rmvSrcTypeButton.addSelectionListener(this);
- }
- 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
- 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
- // -----------------------------
- menuMgr = new MenuManager("#WWCompCmdsPopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Menu menu = menuMgr.createContextMenu(listView);
- listView.setMenu(menu);
- editpane.configureHeadingLabel(ccLabel);
- editpane.isComplete();// side effect is initial enablement of test button
- 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. Overriding this is an alternative to calling setEditPane.
- * This is called in createContents
- */
- protected SystemCompileCommandEditPane getCompileCommandEditPane(Shell shell) {
- if (editpane == null) editpane = compileManager.getCompileCommandEditPane(shell, this, caseSensitive);
- return editpane;
- }
-
- /**
- * Initialize contents and selection of profile combo
- */
- private void initProfileCombo() {
- if (profileCombo != null) {
- if ((compProfiles != null) && (compProfiles.length > 0)) {
- String[] names = new String[compProfiles.length];
- int selIdx = -1;
- for (int idx = 0; idx < names.length; idx++) {
- names[idx] = compProfiles[idx].getProfileName();
- if ((currentCompProfile != null) && (currentCompProfile == compProfiles[idx])) selIdx = idx;
- }
- if (selIdx == -1) {
- selIdx = 0;
- currentCompProfile = compProfiles[0];
- }
- profileCombo.setItems(names);
- profileCombo.setText(names[selIdx]);
- prevProfileComboSelection = selIdx;
- if (currentCompProfile != null) {
- if (currentCompType != null)
- processProfileSelected(currentCompType.getType());
- else
- processProfileSelected(null);
- }
- }
- }
- }
-
- /**
- * Process when a profile is selected
- */
- private void processProfileSelected(String srcType) {
- if (srcType == null) {
- ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(getInputObject());
- if (rmtAdapter != null) {
- srcType = rmtAdapter.getRemoteSourceType(getInputObject());
- /*
- if (currentCompProfile.getCompileType(srcType) == null)
- {
- currentCompProfile.addCompileType(new SystemCompileType(currentCompProfile, srcType));
- saveData();
- }*/
- }
- }
- Vector types = currentCompProfile.getCompileTypes();
- if (srcType == null) {
- if (types.size() > 0)
- srcType = ((SystemCompileType) types.elementAt(0)).getType();
- else {
- srcType = ""; //$NON-NLS-1$
- }
- }
- compileTypeNames = new String[types.size()];
- int index = 0;
- // when profile is selected, show the member type
- // of the DataElement selected.
- for (int i = 0; i < compileTypeNames.length; i++) {
- compileTypeNames[i] = ((SystemCompileType) types.get(i)).getType();
- if (!caseSensitive) {
- if (srcType.equalsIgnoreCase(compileTypeNames[i])) index = i;
- } else {
- if (srcType.equals(compileTypeNames[i])) index = i;
- }
- }
- srcTypeCombo.setItems(compileTypeNames);
- if (srcTypeCombo.getItemCount() > 0) {
- srcTypeCombo.setText(srcTypeCombo.getItem(index));
- prevSrcTypeComboSelection = index;
- currentCompType = currentCompProfile.getCompileType(srcTypeCombo.getText());
- processSrcTypeSelected(0);
- } else {
- prevSrcTypeComboSelection = -1;
- currentCompType = null;
- processSrcTypeSelected(-1);
- }
- }
-
- /**
- * Process when src type selected
- */
- private void processSrcTypeSelected(int selection) {
- Vector cmds = new Vector();
- if (currentCompType != null) cmds = currentCompType.getCompileCommands();
- if (rmvSrcTypeButton != null) rmvSrcTypeButton.setEnabled((currentCompType != null) && (cmds.size() == 0));
- if (currentCompType != null) {
- String[] listItems = new String[1 + cmds.size()];
- listItems[0] = SystemUDAResources.RESID_WWCOMPCMDS_LIST_NEWITEM;
- for (int idx = 0; idx < cmds.size(); idx++)
- listItems[idx + 1] = ((SystemCompileCommand) cmds.get(idx)).getLabel();
- listView.setItems(listItems);
- listView.setSelection(selection);
- } else {
- listView.removeAll();
- }
- processCommandsListSelected();
- }
-
- /**
- * Process when compile command is selected in the list view
- */
- private void processCommandsListSelected() {
- int index = listView.getSelectionIndex();
- if (index == 0) {
- sm.setNewMode();
- editpane.setCompileCommand(currentCompType, null);
- editpane.configureHeadingLabel(ccLabel);
- } else if (index > -1) // and not zero
- {
- SystemCompileCommand currCmd = getCurrentlySelectedCompileCommand();
- sm.setEditMode();
- editpane.setCompileCommand(currentCompType, currCmd);
- editpane.configureHeadingLabel(ccLabel);
- } else {
- sm.setUnsetMode();
- editpane.setCompileCommand(null, null);
- }
- prevListSelection = index;
- }
-
- /**
- * Gets the current compile profile, given the profile selection index
- */
- private SystemCompileProfile getCompileProfile(int currSelIdx) {
- return compProfiles[currSelIdx];
- }
-
- /**
- * Parent override.
- * Called when user presses CLOSE button.
- * We simply close the dialog (since we save as we go), unless there are pending changes.
- */
- protected boolean processCancel() {
- if (sm.isSaveRequired()) {
- ignoreEvents = true;
- if ((editpane.verify() != null)) {
- ignoreEvents = false;
- sm.setChangesMade(); // defect 45773
- return false; // pending errors. Cannot save, so cannot close!
- }
- ignoreEvents = false;
- //saveData();
- applyPressed(false); // defect 46379
- }
- return super.processCancel();
- }
-
- /**
- * Save the data in the currently selected profile
- */
- private void saveData() {
- if (currentCompProfile != null) currentCompProfile.writeToDisk();
- }
-
- /**
- * Handles events generated by controls on this page.
- */
- public void widgetSelected(SelectionEvent e) {
- clearMessage();
- Widget source = e.widget;
- if (resetting) return;
- if (source == applyButton) {
- applyPressed(true);
- } else if (source == revertButton) {
- revertPressed();
- } else if (source == newSrcTypeButton) {
- newSrcTypePressed();
- } else if (source == rmvSrcTypeButton) {
- rmvSrcTypePressed();
- } else if (source == listView) {
- if (traceTest) System.out.println("Inside widgetSelected for listView: " + listView.getSelectionIndex()); //$NON-NLS-1$
- // change for pendings changes or unresolved errors...
- if (editpane.areErrorsPending()) {
- //System.out.println("errors pending in editpane");
- e.doit = false; // dang, this doesn't work!
- resetting = true;
- listView.select(prevListSelection);
- resetting = false;
- return;
- } else if (sm.isSaveRequired()) {
- boolean newMode = (sm.getMode() == ISystemEditPaneStates.MODE_NEW);
- if (editpane.verify() != null) {
- //System.out.println("verify in editpane returned an error");
- e.doit = false; // dang, this doesn't work!
- resetting = true;
- listView.select(prevListSelection);
- resetting = false;
- sm.setChangesMade(); // isSaveRequired() resets it so we need to undo that
- return;
- }
- int newSelection = listView.getSelectionIndex();
- saveCompileCommand(editpane.saveChanges(), newMode, prevListSelection);
- listView.select(newSelection); // the save changed the selection, so we need to restore it
- }
- processCommandsListSelected();
- if (giveEditorFocus) {
- Control c = editpane.getInitialFocusControl();
- if ((c != null) && !c.isDisposed() && c.isVisible()) c.setFocus();
- }
- } else if (source == profileCombo) {
- if (editpane.areErrorsPending()) {
- restoreProfileComboSelection = true;
- profileCombo.getDisplay().asyncExec(this);
- return;
- } else if (sm.isSaveRequired()) // defect 46318
- {
- boolean newMode = (sm.getMode() == ISystemEditPaneStates.MODE_NEW);
- if (editpane.verify() != null) {
- restoreProfileComboSelection = true;
- sm.setChangesMade(); // isSaveRequired() resets it so we need to undo that
- profileCombo.getDisplay().asyncExec(this);
- return; // newly-found errors are pending so go no further
- }
- //int newSelection = listView.getSelectionIndex();
- saveCompileCommand(editpane.saveChanges(), newMode, prevListSelection);
- //listView.select(newSelection); // the save changed the selection, so we need to restore it
- }
- int idx = profileCombo.getSelectionIndex();
- currentCompProfile = getCompileProfile(idx);
- //processProfileSelected(srcTypeCombo.getText());
- processProfileSelected(null);
- prevProfileComboSelection = idx;
- } else if (source == srcTypeCombo) {
- if (editpane.areErrorsPending()) {
- restoreProfileComboSelection = false;
- srcTypeCombo.getDisplay().asyncExec(this);
- return;
- } else if (sm.isSaveRequired()) // defect 46318
- {
- boolean newMode = (sm.getMode() == ISystemEditPaneStates.MODE_NEW);
- if (editpane.verify() != null) {
- restoreProfileComboSelection = false;
- sm.setChangesMade(); // isSaveRequired() resets it so we need to undo that
- profileCombo.getDisplay().asyncExec(this);
- return; // newly-found errors are pending so go no further
- }
- //int newSelection = listView.getSelectionIndex();
- saveCompileCommand(editpane.saveChanges(), newMode, prevListSelection);
- //listView.select(newSelection); // the save changed the selection, so we need to restore it
- }
- int idx = srcTypeCombo.getSelectionIndex();
- currentCompType = currentCompProfile.getCompileType(srcTypeCombo.getText());
- processSrcTypeSelected(0);
- prevSrcTypeComboSelection = idx;
- }
- }
-
- /**
- * User pressed Apply to save the pending changes the current filter string
- */
- protected void applyPressed(boolean doVerify) {
- ignoreEvents = true;
- if (!doVerify || (editpane.verify() == null)) {
- SystemCompileCommand editedCompileCmd = editpane.saveChanges();
- boolean ok = (editedCompileCmd != null);
- if (ok) {
- boolean newMode = (sm.getMode() == ISystemEditPaneStates.MODE_NEW);
- sm.applyPressed();
- saveCompileCommand(editedCompileCmd, newMode, prevListSelection);
- processCommandsListSelected();
- if (newMode)
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, editedCompileCmd,
- null);
- else
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD,
- editedCompileCmd, null);
- }
- }
- ignoreEvents = false;
- }
-
- /**
- * User pressed Revert to discard the pending changes the current filter string
- */
- protected void revertPressed() {
- ignoreEvents = true;
- editpane.clearErrorMessage();
- sm.resetPressed();
- if (isNewSelected() || (listView.getSelectionIndex() == -1))
- editpane.setCompileCommand(currentCompType, null);
- else
- editpane.setCompileCommand(currentCompType, getCurrentlySelectedCompileCommand());
- setPageComplete(true);
- clearErrorMessage();
- ignoreEvents = false;
- }
-
- /**
- * User pressed New... beside the Source Type combo
- */
- protected void newSrcTypePressed() {
- if (sm.isSaveRequired()) {
- ignoreEvents = true;
- if ((editpane.verify() != null)) {
- ignoreEvents = false;
- return; // pending errors. Cannot save, so cannot process!
- }
- ignoreEvents = false;
- //saveData();
- applyPressed(false); // defect 46379
- }
- SystemNewCompileSrcTypeDialog dlg = compileManager.getNewSrcTypeDialog(getShell(), caseSensitive);
- dlg.setExistingSrcTypes(compileTypeNames);
- dlg.open();
- if (!dlg.wasCancelled()) {
- String newSrcType = dlg.getNewSrcType();
- currentCompProfile.addCompileType(new SystemCompileType(currentCompProfile, newSrcType));
- saveData();
- processProfileSelected(newSrcType);
- //System.out.println("New src type: " + newSrcType);
- }
- }
-
- /**
- * User pressed Remove... beside the Source Type combo
- */
- protected void rmvSrcTypePressed() {
- if (sm.isSaveRequired()) {
- ignoreEvents = true;
- if ((editpane.verify() != null)) {
- ignoreEvents = false;
- return; // pending errors. Cannot save, so cannot process!
- }
- ignoreEvents = false;
- //saveData();
- applyPressed(false); // defect 46379
- }
- currentCompProfile.removeCompileType(currentCompType);
- saveData();
- processProfileSelected(null);
- }
-
- /**
- * Handles events generated by controls on this page.
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- /**
- * Save the given edited/new compile command and updates the gui list.
- */
- protected void saveCompileCommand(SystemCompileCommand editedCompileCommand, boolean newMode, int selectionIndex) {
- if (newMode) {
- currentCompType.addCompileCommand(editedCompileCommand);
- listView.add(editedCompileCommand.getLabel());
- saveData();
- //listView.select(listView.getItemCount()-1);
- processSrcTypeSelected(listView.getItemCount() - 1);
- } else {
- saveData();
- //listView.select(selectionIndex);
- //listView.setItem(selectionIndex, editedCompileCommand.getLabel());
- //processCommandsListSelected();
- processSrcTypeSelected(selectionIndex);
- }
- }
-
- /**
- * Intercept of parent method so we can direct it to the Apply button versus the OK button (which we don't have).
- */
- 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
- }
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
- /**
- * 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);
- return adapter;
- }
-
- // ------------
- // List methods
- // ------------
- /**
- * Return true if currently selected item is "New"
- */
- protected boolean isNewSelected() {
- return (listView.getSelectionIndex() == 0);
- }
-
- /**
- * Return true if currently selected item is IBM- or vendor-supplied
- */
- protected boolean isIBMSupplied() {
- if (listView.getSelectionIndex() > 0) {
- return !getCurrentlySelectedCompileCommand().isUserSupplied();
- } else
- return false;
- }
-
- /**
- * Return currently selected list item
- */
- protected String getCurrentSelection() {
- if (listView.getSelectionCount() >= 1)
- return listView.getSelection()[0];
- else
- return null;
- }
-
- /**
- * Return the currently selected compile command
- */
- protected SystemCompileCommand getCurrentlySelectedCompileCommand() {
- int selIdx = listView.getSelectionIndex();
- if (selIdx > 0) // item 0 is "new" so skip it
- return currentCompType.getCompileCommand(selIdx - 1);
- else
- return null;
- }
-
- // ----------------------------------------------
- // EDIT PANE CHANGE LISTENER INTERFACE METHODS...
- // ----------------------------------------------
- /**
- * Callback method. The user has changed the compile command. It may or may not
- * be valid. If not, the given message is non-null. If it is, and you want it,
- * call getCompileCommand() in the edit pane.
- */
- public void compileCommandChanged(SystemMessage message) {
- if (message != null)
- setErrorMessage(message);
- else
- clearErrorMessage();
- if (!ignoreEvents) // this is set on while verifying, indicating these are not real change events per se
- {
- sm.setChangesMade();
- }
- setPageComplete(message == null); // d45795
- }
-
- // ------------------------------
- // 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);
- action = getRestoreAction(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_CHANGE)); // restore
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- }
-
- /**
- * Get the delete action
- */
- private SystemCompileCommandActionDelete getDeleteAction(ISelection selection) {
- if (deleteAction == null) deleteAction = new SystemCompileCommandActionDelete(this);
- deleteAction.setShell(getShell());
- deleteAction.setSelection(selection);
- return deleteAction;
- }
-
- /**
- * Get the move up action
- */
- private SystemCompileCommandActionMoveUp getMoveUpAction(ISelection selection) {
- if (moveUpAction == null) moveUpAction = new SystemCompileCommandActionMoveUp(this);
- moveUpAction.setShell(getShell());
- moveUpAction.setSelection(selection);
- return moveUpAction;
- }
-
- /**
- * Get the move down action
- */
- private SystemCompileCommandActionMoveDown getMoveDownAction(ISelection selection) {
- if (moveDownAction == null) moveDownAction = new SystemCompileCommandActionMoveDown(this);
- moveDownAction.setShell(getShell());
- moveDownAction.setSelection(selection);
- return moveDownAction;
- }
-
- /**
- * Get the copy action
- */
- private SystemCompileCommandActionCopy getCopyAction(ISelection selection) {
- if (copyAction == null) copyAction = new SystemCompileCommandActionCopy(this);
- copyAction.setShell(getShell());
- copyAction.setSelection(selection);
- return copyAction;
- }
-
- /**
- * Get the paste action
- */
- private SystemCompileCommandActionPaste getPasteAction(ISelection selection) {
- if (pasteAction == null) pasteAction = new SystemCompileCommandActionPaste(this);
- pasteAction.setShell(getShell());
- if (selection != null) pasteAction.setSelection(selection);
- return pasteAction;
- }
-
- /**
- * Get the restore defaults action
- */
- private SystemCompileCommandActionRestoreDefaults getRestoreAction(ISelection selection) {
- if (restoreAction == null) restoreAction = new SystemCompileCommandActionRestoreDefaults(this);
- restoreAction.setShell(getShell());
- if (selection != null) restoreAction.setSelection(selection);
- return restoreAction;
- }
-
- // -------------------------------------------------------------
- // 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) && !isIBMSupplied();
- }
-
- /**
- * 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()) {
- SystemCompileCommand deletedCmd = getCurrentlySelectedCompileCommand();
- currentCompType.removeCompileCommand(deletedCmd);
- saveData();
- //traceTest = true;
- listView.remove(idx); // remove item from list
- if (idx <= (listView.getItemCount() - 1)) // can we select next item?
- listView.select(idx); // select next item
- else
- listView.select(idx - 1); // select previous item
- processCommandsListSelected();
- if (listView.getItemCount() == 1) //d47206
- rmvSrcTypeButton.setEnabled(true);
- //traceTest = false;
- // fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, deletedCmd, null);
- }
- } catch (Exception exc) {
- }
- }
-
- /**
- * 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, and skip first actual compile command as it can't be moved up
- }
- return can;
- }
-
- /**
- * Perform the move up action
- */
- public void doMoveUp() {
- int idx = listView.getSelectionIndex();
- SystemCompileCommand currCmd = getCurrentlySelectedCompileCommand();
- if (currCmd == null) return; // better never happen!
- // remove and add in model...
- currentCompType.removeCompileCommand(currCmd); // remove item from model
- currentCompType.insertCompileCommand(currCmd, idx - 2); // re-add one position up (remembering that the UI has one extra node at the top for "new")
- saveData();
- // remove and add in UI...
- listView.remove(idx); // remove item from UI list
- listView.add(currCmd.getLabel(), idx - 1); // re-add one position up
- listView.select(idx - 1);
- listView.showSelection();
- processCommandsListSelected();
- // fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, currCmd, null);
- }
-
- /**
- * 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();
- SystemCompileCommand currCmd = getCurrentlySelectedCompileCommand();
- if (currCmd == null) return; // better never happen!
- // remove and add in model...
- currentCompType.removeCompileCommand(currCmd); // remove item from model
- currentCompType.insertCompileCommand(currCmd, idx); // re-add one position down (remembering that the UI has one extra node at the top for "new")
- saveData();
- // remove and add in UI...
- listView.remove(idx); // remove item from UI list
- listView.add(currCmd.getLabel(), idx + 1); // re-add one position down
- listView.select(idx + 1);
- listView.showSelection();
- processCommandsListSelected();
- // fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, currCmd, null);
- }
-
- /**
- * 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);
- SystemCompileCommand oldCmd = currentCompType.getCompileLabel(textData);
- if (oldCmd == null) return;
- SystemCompileCommand newCmd = (SystemCompileCommand) oldCmd.clone();
- newCmd.setLabel(getUniqueCloneLabel(oldCmd));
- String newCopy = newCmd.getLabel();
- int newLocation = listView.getSelectionIndex();
- if (newLocation <= 0) {
- listView.add(newCopy);
- listView.select(listView.getItemCount() - 1);
- } else {
- listView.add(newCopy, newLocation);
- listView.select(newLocation);
- }
- listView.showSelection();
- currentCompType.insertCompileCommand(newCmd, listView.getSelectionIndex() - 1); // the "-1" is to discount for the "new" item at the top
- saveData();
- processCommandsListSelected();
- // we don't need to do the following but for consistency with change user actions and types, we do
- clipboard.dispose();
- clipboard = null;
- // fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, oldCmd, null);
- }
-
- /**
- * Return a new unique label to assign to a pastable compile command node clone
- */
- private String getUniqueCloneLabel(SystemCompileCommand clonableCmd) {
- String newName = SystemUDAResources.RESID_WWCOMPCMDS_COPY_NAME_1;
- newName = SystemMessage.sub(newName, "%1", clonableCmd.getLabel()); //$NON-NLS-1$
- Vector existingNames = currentCompType.getExistingLabels();
- boolean nameInUse = (existingNames.indexOf(newName) >= 0);
- int nbr = 2;
- while (nameInUse) {
- newName = SystemUDAResources.RESID_WWCOMPCMDS_COPY_NAME_N;
- newName = SystemMessage.sub(newName, "%1", clonableCmd.getLabel()); //$NON-NLS-1$
- newName = SystemMessage.sub(newName, "%2", Integer.toString(nbr)); //$NON-NLS-1$
- nameInUse = (existingNames.indexOf(newName) >= 0);
- ++nbr;
- }
- return newName;
- }
-
- /**
- * Decide if we can do the restore defaults or not.
- * Will decide the enabled state of the restore defaults action.
- */
- public boolean canRestore() {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isNewSelected();
- if (can) {
- SystemCompileCommand cmd = getCurrentlySelectedCompileCommand();
- if (cmd != null)
- can = !cmd.isUserSupplied() && !cmd.getDefaultString().equals(cmd.getCurrentString());
- else
- can = false;
- }
- return can;
- }
-
- /**
- * Perform the restore defaults action
- */
- public void doRestore() {
- SystemCompileCommand cmd = getCurrentlySelectedCompileCommand();
- cmd.setCurrentString(cmd.getDefaultString());
- saveData();
- processCommandsListSelected();
- }
-
- /**
- * For asynch exec we defer some operations until other pending events are processed.
- */
- public void run() {
- if (restoreProfileComboSelection)
- profileCombo.select(prevProfileComboSelection);
- else
- srcTypeCombo.select(prevSrcTypeComboSelection);
- super.run();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAConstants.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAConstants.java
deleted file mode 100644
index 56ad08372..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAConstants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View (cleanup some use action stuff)
- * Kevin Doyle (IBM) - [222829] MoveUp/Down Broken in Work with User Actions Dialog
- *******************************************************************************/
-/**
- * @author coulthar
- *
- * Constants used throughout the User Defined Action framework.
- */
-public interface ISystemUDAConstants {
-
- public static final String USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX = "UserActoins."; //$NON-NLS-1$
-
- public static final String USER_DEFINED_ACTION_PROPRERTY_SET_Name = "User Actions"; //$NON-NLS-1$
-
- static final String UDA_ROOT_ATTR = "uda_root"; //$NON-NLS-1$
- static final String FILETYPES_ROOT = "FileTypes"; //$NON-NLS-1$
- static final String ACTIONS_ROOT = "Actions"; //$NON-NLS-1$
- static final String ACTION_FILETYPES = "User Action File Types"; //$NON-NLS-1$
-
- /**
- * The name of the xml tag for domain tags.
- * Domains are used to partition actions.
- * Eg, you might have "Folder" and "File" domains
- * or for iSeries "Object" and "Member" domains
- */
- public static final String XE_DOMAIN = "Domain"; //$NON-NLS-1$
-
- /**
- * The name of the xml attribute of domain tags which
- * identifies the domain type. Its values will be
- * an untranslated name like "Object" or "Folder".
- */
- public static final String XE_DOMTYPE = "DomainType"; //$NON-NLS-1$
-
- /**
- * The name of the xml attribute of domain tags which
- * identifies the domain name. Its values will be
- * a translated name like "Object" or "Folder".
- */
- public static final String XE_DOMNAME = "name"; //$NON-NLS-1$
-
- /**
- * The name of the attribute we consistently use to store an element's name
- */
- public static final String NAME_ATTR = "name"; //$NON-NLS-1$
-
- /**
- * The type of the attribute we consistently use to store an element's name
- */
- public static final String TYPE_ATTR = "type"; //$NON-NLS-1$
-
- /**
- * The name of the attribute we consistently use to store an element's original IBM-supplied name
- */
- public static final String ORIGINAL_NAME_ATTR = "OriginalName"; //$NON-NLS-1$
-
- /**
- * The position in the list of other user actions a user action should show up in
- */
- public static final String ORDER_ATTR = "Order"; //$NON-NLS-1$
-
- /**
- * The name of the attribute we consistently use to store a release number
- */
- public static final String RELEASE_ATTR = "release"; //$NON-NLS-1$
-
- public static final String RELEASE_VALUE = "7.5"; //$NON-NLS-1$
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAEditPaneHoster.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAEditPaneHoster.java
deleted file mode 100644
index ea7f0e470..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDAEditPaneHoster.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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.internal.useractions.ui.uda;
-
-//import org.eclipse.jface.viewers.ISelection;
-//import org.eclipse.jface.viewers.IStructuredSelection;
-//import org.eclipse.jface.viewers.StructuredSelection;
-//import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The interface that must be implemented for any dialog or property page that wants to
- * host a user action edit pane.
- */
-public interface ISystemUDAEditPaneHoster extends ISystemMessageLine {
- /**
- * Get the shell for this dialog or property page
- */
- public Shell getShell();
-
- /**
- * Identify that the page/dialog is complete
- */
- public void setPageComplete(boolean complete);
-
- /**
- * Set the help for the given control
- */
- public void setHelp(Control c, String id);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDSelectTypeListener.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDSelectTypeListener.java
deleted file mode 100644
index 28d42ab28..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDSelectTypeListener.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-/**
- * @author coulthar
- *
- * This is an interface for listening for changes made to the
- * user-selected list of types for an action.
- * Used by the SystemUDSelectTypesForm class.
- */
-public interface ISystemUDSelectTypeListener {
- /**
- * The user has added or removed a type.
- * Call getTypes() on given form to get the new list.
- */
- public void selectedTypeListChanged(SystemUDSelectTypesForm form);
-
- /**
- * The user has edited the master list of types. It needs to be refreshed.
- * You must call setMasterTypes() to update the form's master type list
- */
- public void masterTypeListChanged(SystemUDSelectTypesForm form);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTreeView.java
deleted file mode 100644
index bd42b13fe..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTreeView.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-/*
- * Created on Dec 5, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author coulthar
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public interface ISystemUDTreeView {
- /**
- * Expand the non-new domain (parent) nodes
- */
- public abstract void expandDomainNodes();
-
- /**
- * Expand the given domain (parent) node, named by its
- * translatable name.
- */
- public abstract void expandDomainNode(String displayName);
-
- /**
- * Convenience method for returning the shell of this viewer.
- */
- public abstract Shell getShell();
-
- /**
- * Return the action or type manager
- */
- public abstract SystemUDBaseManager getDocumentManager();
-
- /**
- * Get the selected action or type name.
- * Returns "" if nothing selected
- */
- public abstract String getSelectedElementName();
-
- /**
- * Get the selected action or type domain.
- * Returns -1 if nothing selected or domains not supported
- */
- public abstract int getSelectedElementDomain();
-
- /**
- * Return true if currently selected element is "ALL"
- */
- public boolean isElementAllSelected();
-
- // ------------------------------------
- public abstract SystemXMLElementWrapper getSelectedElement();
-
- /**
- * Select the given type
- */
- public abstract void selectElement(SystemXMLElementWrapper element);
-
- /**
- * Find the parent tree item of the given type.
- * If it is not currently shown in the tree, or there is no parent, returns null.
- */
- public abstract TreeItem findParentItem(SystemXMLElementWrapper element);
-
- /**
- * Refresh the parent of the given action.
- * That is, find the parent and refresh the children.
- * If the parent is not found, assume it is because it is new too,
- * so refresh the whole tree.
- */
- public abstract void refreshElementParent(SystemXMLElementWrapper element);
-
- /**
- * Returns the tree item of the first selected object.
- */
- public abstract TreeItem getSelectedTreeItem();
-
- /**
- * Returns the tree item of the sibling before the first selected object.
- */
- public abstract TreeItem getSelectedPreviousTreeItem();
-
- /**
- * Returns the tree item of the sibling after the first selected object.
- */
- public abstract TreeItem getSelectedNextTreeItem();
-
- /**
- * Returns the tree item of the sibling two after the first selected object.
- */
- public abstract TreeItem getSelectedNextNextTreeItem();
-
- /**
- * Return true if currently selected element is vendor supplied
- */
- public boolean isSelectionVendorSupplied();
-
- /**
- * Return the vendor that is responsible for pre-supplying this existing type,
- * or null if not applicable.
- */
- public String getVendorOfSelection();
-
- /**
- * Set the selection
- */
- public void setSelection(ISelection selection);
-
- /**
- * Refresh given element
- */
- public void refresh(Object element);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTypeEditPaneTypesSelector.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTypeEditPaneTypesSelector.java
deleted file mode 100644
index 9ca68a1fa..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDTypeEditPaneTypesSelector.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author coulthar
- *
- * Within the Work With Files Types dialog is an edit pane
- * ({@link org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeEditPane})
- * that contains an entry field for the name, and then one or
- * more widgets that prompt for the file types that constitute
- * this named type.
- * <p>
- * This is interface abstracts out the minimal requirements for that
- * set of widgets, so that it can be pluggable by subsystems wishing
- * to supply customer widgets. These could be as simple as an entry
- * field or as complex as a checkbox viewer with add and remove
- * buttons. As far as the edit pane class is concerned, it need only
- * be able to set the inputs, get the outputs and listen for changes.
- *
- */
-public interface ISystemUDTypeEditPaneTypesSelector {
- /**
- * Set domain.
- * The edit pane may possibly appear differently, depending on the domain.
- * When the domain changes (either in "new" or "edit" mode) this method is called.
- */
- public void setDomain(int domain);
-
- /**
- * Set the msg line in case this composite widget needs to issue an error msg
- */
- public void setMessageLine(ISystemMessageLine msgLine);
-
- /**
- * Initialize the types. These are stored as a single string using
- * a subsystem-decidable delimiter character. This is called when
- * entering "edit" mode.
- */
- public void setTypes(String types);
-
- /**
- * Clear the types. That is, make sure none are selected. This is
- * called when entering "new" mode.
- */
- public void clearTypes();
-
- /**
- * Retrieve the types as a single string. The delimiter used is up to
- * the implementor, as long as it knows how to parse and assemble the
- * types list as a single string.
- */
- public String getTypes();
-
- /**
- * Allow the edit pane (or any consumer) to be informed as
- * changes are made to the list. When events are fired, the consumer
- * will call getTypes() to get the new list.
- */
- public void addModifyListener(ModifyListener listener);
-
- /**
- * Allow the edit pane (or any consumer) to stop listening as
- * changes are made to the list.
- */
- public void removeModifyListener(ModifyListener listener);
-
- /**
- * Validate input, and return the error message if an error is found.
- * This is called by the consumer upon receipt of a modify event, to
- * show any error messages and to know if there are errors pending or
- * not.
- */
- public SystemMessage validate();
-
- /**
- * Return the primary input-capable control.
- * Used to set focus, among other things.
- */
- public Control getControl();
-
- /**
- * Enable or disable the input-capability of the constituent controls
- */
- public void setEnabled(boolean enable);
-
- /**
- * We want to disable editing of IBM or vendor-supplied
- * types, so when one of these is selected, this method is
- * called to enter non-editable mode.
- * @param editable Whether to disable editing of this type or not
- * @param vendor When disabling, it contains the name of the vendor for substitution purposes
- */
- public void setEditable(boolean editable, String vendor);
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDWorkWithDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDWorkWithDialog.java
deleted file mode 100644
index cfbd86381..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemUDWorkWithDialog.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.ui.messages.ISystemMessageLine;
-
-/**
- * A common interface that the action, and types, edit panes for user actions
- * implement.
- */
-public interface ISystemUDWorkWithDialog {
- /**
- * Decide if we can do the delete or not.
- * Will decide the enabled state of the delete action.
- */
- public boolean canDelete(Object selectedObject);
-
- /**
- * Decide if we can do the move up or not.
- * Will decide the enabled state of the move up action.
- */
- public boolean canMoveUp(Object selectedObject);
-
- /**
- * Decide if we can do the move down or not.
- * Will decide the enabled state of the move down action.
- */
- public boolean canMoveDown(Object selectedObject);
-
- /**
- * Decide if we can do the copy or not.
- * Will decide the enabled state of the copy action.
- */
- public boolean canCopy(Object selectedObject);
-
- /**
- * Return the message line
- */
- public ISystemMessageLine getMessageLine();
-
- /**
- * Return true if changes are pending in the edit pane
- */
- public boolean areChangesPending();
-
- /**
- * Process the apply button
- */
- public void processApply();
-
- /**
- * Process the revert button
- */
- public void processRevert();
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemXMLElementWrapperFactory.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemXMLElementWrapperFactory.java
deleted file mode 100644
index ad9e2d5fe..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/ISystemXMLElementWrapperFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-
-/**
- * @author coulthar
- *
- * Classes that implement this know how to create the approprate
- * subclass of SystemXMLElementWrapper
- */
-public interface ISystemXMLElementWrapperFactory {
- /**
- * Given an xml element node, create an instance of the appropriate
- * subclass of SystemXMLElementWrapper to represent it.
- */
- public SystemXMLElementWrapper createElementWrapper(IPropertySet xmlElementToWrap, ISystemProfile profile, int domain);
-
- /**
- * Return the tag name for these elements. Will be "Action" or "Type"
- */
- public String getTagName();
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemPromptUDADialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemPromptUDADialog.java
deleted file mode 100644
index 4b8edc28f..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemPromptUDADialog.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.SystemPromptCommandDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog used when running a user action, which has the prompt option specified.
- * This allows the user to edit the resolved command, and the result is placed
- * in the output object.
- */
-public class SystemPromptUDADialog extends SystemPromptCommandDialog {
- /**
- * Constructor.
- * @param shell The parent window hosting this dialog
- * @param command The resolved command from the user action
- */
- public SystemPromptUDADialog(Shell shell, String command) {
- super(shell, command, SystemUDAResources.RESID_UDA_PROMPTCMD_TITLE);
- //setHelp(RSEUIPlugin.HELPPREFIX+"drnp0000");
- }
-
- /**
- * Translated text configuration method.
- * Override to return OK button label if you don't want the default
- */
- protected String getOKButtonLabel() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_OKBUTTON_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return OK button tooltip if you don't want the default
- */
- protected String getOKButtonToolTipText() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_OKBUTTON_TOOLTIP;
- }
-
- /**
- * Translated text configuration method.
- * Override to return Cancel button tooltip if you don't want the default
- */
- protected String getCancelButtonToolTipText() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_CANCELBUTTON_TOOLTIP;
- }
-
- /**
- * Translated text configuration method.
- * Override to return verbage message if you don't want the default
- */
- protected String getVerbage() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_VERBAGE_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return label for the command prompt, if you don't want the default
- */
- protected String getPromptLabel() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_PROMPT_LABEL;
- }
-
- /**
- * Translated text configuration method.
- * Override to return tooltip text for the command prompt, if you don't want the default
- */
- protected String getPromptToolTipText() {
- return SystemUDAResources.RESID_UDA_PROMPTCMD_PROMPT_TOOLTIP;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeAction.java
deleted file mode 100644
index 33fe921e1..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.ui.uda.actions.SystemWorkWithUDAsAction;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-import org.eclipse.rse.ui.actions.SystemBaseDummyAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A cascading menu action for "User actions->"
- */
-public class SystemUDACascadeAction extends SystemBaseSubMenuAction implements IMenuListener {
- private SystemUDActionSubsystem udsubsystem;
- //private IStructuredSelection selection;
- private SystemWorkWithUDAsAction wwAction;
-
- /**
- * Constructor for the "User Actions" menu item.
- * Expansion will either list profiles, or actions, depending on preferences setting
- */
- public SystemUDACascadeAction(SystemUDActionSubsystem udsubsystem, IStructuredSelection selection) {
- super(SystemUDAResources.ACTION_UDA_CASCADE_LABEL, SystemUDAResources.ACTION_UDA_CASCADE_TOOLTIP, null);
- this.udsubsystem = udsubsystem;
- super.setSelection(selection);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- }
-
- /**
- * This is called by the parent class, in its getSubMenu() method.
- * That in turn is called when this menu is added to its parent menu.
- */
- public IMenuManager populateSubMenu(IMenuManager menu) {
- menu.addMenuListener(this);
- menu.setRemoveAllWhenShown(true);
- //menu.setEnabled(true);
- menu.add(new SystemBaseDummyAction());
- //((SystemSubMenuManager)menu).setTracing(true);
- return menu;
- }
-
- /**
- * Called when submenu is about to show, by JFace.
- * It is part of the IMenuListener interface, and we are called
- * because we registered ourself as a listener in our populateSubMenu
- * method.
- */
- public void menuAboutToShow(IMenuManager ourSubMenu) {
- //System.out.println("UDA submenu AboutToShow():");
- Shell shell = getShell();
- // is cascading-by-profile preference turned off?
- //System.out.println("Preference setting: " + SystemPreferencesGlobal.getGlobalSystemPreferences().getCascadeUserActions());
- if (!SystemPreferencesManager.getCascadeUserActions()) {
- udsubsystem.addUserActions(ourSubMenu, getSelection(), null, shell);
- }
- // is cascading-by-profile preference turned on?
- else {
- ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- for (int idx = 0; idx < activeProfiles.length; idx++) {
- SystemBaseSubMenuAction profileAction = new SystemUDACascadeByProfileAction(shell, udsubsystem, getSelection(), activeProfiles[idx]);
- ourSubMenu.add(profileAction.getSubMenu());
- }
- }
- ourSubMenu.add(new Separator(ISystemContextMenuConstants.GROUP_WORKWITH));
- if (wwAction == null) {
- wwAction = new SystemWorkWithUDAsAction(shell, udsubsystem.getSubsystem(), udsubsystem);
- wwAction.setText(SystemUDAResources.RESID_WORKWITH_UDAS_ACTION_LABEL);
- wwAction.setToolTipText(SystemUDAResources.RESID_WORKWITH_UDAS_ACTION_TOOLTIP);
- wwAction.allowOnMultipleSelection(true);
- }
- ourSubMenu.appendToGroup(ISystemContextMenuConstants.GROUP_WORKWITH, wwAction);
- }
-
- /**
- * Override for debugging
- */
- public void setInputs(Shell shell, Viewer v, ISelection selection) {
- super.setInputs(shell, v, selection);
- //System.out.println("Inside setInputs for SystemCascadeAction");
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeByProfileAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeByProfileAction.java
deleted file mode 100644
index a6680033d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDACascadeByProfileAction.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.ISystemViewMenuListener;
-import org.eclipse.rse.ui.actions.SystemBaseDummyAction;
-import org.eclipse.rse.ui.actions.SystemBaseSubMenuAction;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A cascading submenu action for "User Actions->".
- * This is after the first cascade, which lists profiles.
- * Here, for that profile, we list actions
- */
-public class SystemUDACascadeByProfileAction extends SystemBaseSubMenuAction implements IMenuListener {
- private ISystemProfile profile;
- private SystemUDActionSubsystem udsubsystem;
-
- //private IStructuredSelection selection;
- /**
- * Constructor.
- */
- public SystemUDACascadeByProfileAction(Shell shell, SystemUDActionSubsystem udss, IStructuredSelection selection, ISystemProfile profile) {
- super(profile.getName(), RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID), shell);
- this.profile = profile;
- this.udsubsystem = udss;
- super.setSelection(selection);
- setCreateMenuEachTime(false);
- setPopulateMenuEachTime(true);
- //System.out.println("Inside ctor for SystemUDACascadeByProfileAction");
- }
-
- /**
- * @see org.eclipse.rse.ui.actions.SystemBaseSubMenuAction#getSubMenu()
- */
- public IMenuManager populateSubMenu(IMenuManager menu) {
- //System.out.println("Inside populateSubMenu for SystemUDACascadeByProfileAction");
- menu.addMenuListener(this);
- menu.setRemoveAllWhenShown(true);
- //menu.setEnabled(true);
- menu.add(new SystemBaseDummyAction());
- return menu;
- }
-
- /**
- * Called when submenu is about to show. Called because we
- * implement IMenuListener, and registered ourself for this event.
- */
- public void menuAboutToShow(IMenuManager ourSubMenu) {
- //System.out.println("Inside menuAboutToShow for SystemUDACascadeByProfileAction");
- Shell shell = getShell();
- udsubsystem.addUserActions(ourSubMenu, getSelection(), profile, shell);
- }
-
- /**
- * 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 ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) {
- return new SystemViewMenuListener(false); // our menu is re-built dynamically each time
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAFileTypesForName.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAFileTypesForName.java
deleted file mode 100644
index 56633aa66..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAFileTypesForName.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-public class SystemUDAFileTypesForName {
- String name;
- String types;
-
- public SystemUDAFileTypesForName(String p_name, String p_types) {
- name = p_name;
- types = p_types;
- }
-
- public String getName() {
- return name;
- }
-
- public String getTypes() {
- return types;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResolvedTypes.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResolvedTypes.java
deleted file mode 100644
index cf1943c46..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResolvedTypes.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [232106] - NPE when resolving types
- *******************************************************************************/
-import java.util.Vector;
-
-/**
- *
- */
-public class SystemUDAResolvedTypes {
- protected Vector previousTypes = null;
- protected Vector[] UDAFileTypesForNameByDomain;
- protected Vector UDAFileTypesForNameNoDomain;
-
- //private char delimiter = ' ';
- // I have done a bit of work in here, but I really have not analyzed this logic
- // to see what its doing, and if its doing it all correctly. Phil.
- /**
- * Constructor when using blank as the type delimiter
- */
- public SystemUDAResolvedTypes() {
- previousTypes = null;
- }
-
- /*
- * Constructor when specifying your own character as the type delimiter
- *
- public UDAResolvedTypes(char delimiter)
- {
- previousTypes = null;
- this.delimiter = delimiter;
- }*/
- /**
- *
- */
- protected void addTypesToVector(Vector v, Object[] objElems) {
- for (int i = 0; i < objElems.length; i++) {
- SystemUDTypeElement typeElem = (SystemUDTypeElement) objElems[i];
- String name = typeElem.toString();
- resolveType(name, v, objElems);
- }
- }
-
- /**
- *
- */
- protected String resolveTypes(String types, Vector v, Object[] objElems) {
- int i = types.indexOf("<"); //$NON-NLS-1$
- if (i < 0) return types;
- int j = types.indexOf(">"); //$NON-NLS-1$
- if (i >= j) return types;
- String type = types.substring(i + 1, j);
- String resolvedType = resolveType(type, v, objElems);
- return types.substring(0, i) + " " + resolvedType + " " + resolveTypes(types.substring(j + 1), v, objElems); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- *
- */
- protected String resolveType(String type, Vector v, Object[] objElems) {
- if (previousTypes.contains(type)) return ""; //$NON-NLS-1$
- String resolvedTypes = resolveType(type, v);
- if (resolvedTypes != null) return resolvedTypes;
- for (int i = 0; i < objElems.length; i++) {
- SystemUDTypeElement typeElem = (SystemUDTypeElement) objElems[i];
- if (type.equals(typeElem.toString())) {
- previousTypes.addElement(type);
- String types = typeElem.getTypes();
- if (types != null) {
- resolvedTypes = resolveTypes(types, v, objElems);
- }
- previousTypes.remove(type);
- v.addElement(new SystemUDAFileTypesForName(type, resolvedTypes));
- return resolvedTypes;
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- *
- */
- protected String resolveType(String type, Vector v) {
- for (int i = 0; i < v.size(); i++) {
- SystemUDAFileTypesForName typesForName = (SystemUDAFileTypesForName) v.elementAt(i);
- if (type.equals(typesForName.getName())) return typesForName.getTypes();
- }
- return null;
- }
-
- /**
- * Given a named type, return all the types that this typed name represents,
- * concatenated as a single string.
- * @param name - the named type to be resolved
- * @param domain - the domain, expressed in its integer form
- */
- public String getFileTypesForTypeName(String name, int domain, SystemUDTypeManager typeMgr) {
- Vector typesVector = null;
- boolean supportsDomains = typeMgr.getActionSubSystem().supportsDomains();
- boolean needToPopulate = false;
- if (supportsDomains) {
- if (UDAFileTypesForNameByDomain == null) {
- int nbrDomains = typeMgr.getActionSubSystem().getMaximumDomain() + 1;
- UDAFileTypesForNameByDomain = new Vector[nbrDomains];
- }
- typesVector = UDAFileTypesForNameByDomain[domain];
- if (typesVector == null) {
- typesVector = new Vector();
- UDAFileTypesForNameByDomain[domain] = typesVector;
- needToPopulate = true;
- }
- } else {
- typesVector = UDAFileTypesForNameNoDomain;
- if (typesVector == null) {
- typesVector = new Vector();
- UDAFileTypesForNameNoDomain = typesVector;
- needToPopulate = true;
- }
- }
- if (needToPopulate) {
- previousTypes = new Vector(); // what's this for?
- addTypesToVector(typesVector, typeMgr.getTypes(null, domain));
- }
- return resolveType(name, typesVector);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.java
deleted file mode 100644
index c0d9f7339..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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.internal.useractions.ui.uda;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SystemUDAResources extends NLS {
- private static String BUNDLE_NAME = "org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources";//$NON-NLS-1$
- // WORK WITH USER DEFINED ACTIONS DIALOG...
- public static String RESID_WORKWITH_UDAS_TITLE;
- public static String RESID_WORKWITH_UDAS_ACTION_LABEL;
- public static String RESID_WORKWITH_UDAS_ACTION_TOOLTIP;
- public static String RESID_UDA_TREE_TIP;
- public static String RESID_UDA_PROFILE_LABEL;
- public static String RESID_UDA_PROFILE_TOOLTIP;
- public static String RESID_UDA_APPLY_BUTTON_LABEL;
- public static String RESID_UDA_APPLY_BUTTON_TOOLTIP;
- public static String RESID_UDA_RESET_BUTTON_LABEL;
- public static String RESID_UDA_RESET_BUTTON_TOOLTIP;
- public static String RESID_UDA_REVERT_BUTTON_LABEL;
- public static String RESID_UDA_REVERT_BUTTON_TOOLTIP;
- public static String RESID_UDA_DELETE_BUTTON_LABEL;
- public static String RESID_UDA_DELETE_BUTTON_TOOLTIP;
- public static String RESID_UDA_COPY_BUTTON_LABEL;
- public static String RESID_UDA_COPY_BUTTON_TOOLTIP;
- public static String RESID_UDA_COPY_NAME_1;
- public static String RESID_UDA_COPY_NAME_N;
- public static String RESID_UDA_IBM_VERBAGE;
- public static String RESID_UDA_VENDOR_VERBAGE;
- // WORK WITH USER DEFINED ACTIONS NEW/EDIT PANE ...
- public static String RESID_UDA_NAME_LABEL;
- public static String RESID_UDA_NAME_TOOLTIP;
- public static String RESID_UDA_COMMENT_LABEL;
- public static String RESID_UDA_COMMENT_TOOLTIP;
- public static String RESID_UDA_COMMAND_LABEL;
- public static String RESID_UDA_COMMAND_TOOLTIP;
- public static String RESID_UDA_INSERTVAR_BUTTON_LABEL;
- public static String RESID_UDA_INSERTVAR_BUTTON_TOOLTIP;
- public static String RESID_UDA_EDIT_BUTTON_LABEL;
- public static String RESID_UDA_EDIT_BUTTON_TOOLTIP;
- public static String RESID_UDA_OPTION_PROMPT_LABEL;
- public static String RESID_UDA_OPTION_PROMPT_TOOLTIP;
- public static String RESID_UDA_OPTION_SHOW_LABEL;
- public static String RESID_UDA_OPTION_SHOW_TOOLTIP;
- public static String RESID_UDA_OPTION_REFRESH_LABEL;
- public static String RESID_UDA_OPTION_REFRESH_TOOLTIP;
- public static String RESID_UDA_OPTION_COLLECT_LABEL;
- public static String RESID_UDA_OPTION_COLLECT_TOOLTIP;
- public static String RESID_UDA_OPTION_SINGLESEL_LABEL;
- public static String RESID_UDA_OPTION_SINGLESEL_TOOLTIP;
- public static String RESID_UDA_OPTION_REMOTE_LABEL;
- public static String RESID_UDA_OPTION_REMOTE_TOOLTIP;
- public static String RESID_UDA_TYPE_LIST_LABEL;
- public static String RESID_UDA_TYPE_LIST_TOOLTIP;
- public static String RESID_UDA_TYPE_LIST_MASTER_LABEL;
- public static String RESID_UDA_TYPE_LIST_MASTER_TOOLTIP;
- public static String RESID_UDA_TYPE_LIST_SELECTED_LABEL;
- public static String RESID_UDA_TYPE_LIST_SELECTED_TOOLTIP;
- public static String RESID_UDA_TYPE_EDIT_BUTTON_LABEL;
- public static String RESID_UDA_TYPE_EDIT_BUTTON_TOOLTIP;
- public static String RESID_UDA_TYPE_ADD_BUTTON_LABEL;
- public static String RESID_UDA_TYPE_ADD_BUTTON_TOOLTIP;
- public static String RESID_UDA_TYPE_RMV_BUTTON_LABEL;
- public static String RESID_UDA_TYPE_RMV_BUTTON_TOOLTIP;
- // PROMPT USER DEFINED ACTION COMMAND DIALOG...
- public static String RESID_UDA_PROMPTCMD_TITLE;
- public static String RESID_UDA_PROMPTCMD_VERBAGE_LABEL;
- public static String RESID_UDA_PROMPTCMD_PROMPT_LABEL;
- public static String RESID_UDA_PROMPTCMD_PROMPT_TOOLTIP;
- public static String RESID_UDA_PROMPTCMD_OKBUTTON_LABEL;
- public static String RESID_UDA_PROMPTCMD_OKBUTTON_TOOLTIP;
- public static String RESID_UDA_PROMPTCMD_CANCELBUTTON_TOOLTIP;
- // COMMON USER DEFINED ACTION SUBSTITUTION VARIABLES SUPPORT...
- public static String RESID_UDA_SUBVAR_ACTION_NAME;
- public static String RESID_UDA_SUBVAR_CONNECTION_NAME;
- public static String RESID_UDA_SUBVAR_LOCAL_HOSTNAME;
- public static String RESID_UDA_SUBVAR_LOCAL_IP;
- public static String RESID_UDA_SUBVAR_USER_ID;
- public static String RESID_UDA_SUBVAR_SYSTEM_TEMPDIR;
- public static String RESID_UDA_SUBVAR_SYSTEM_HOMEDIR;
- public static String RESID_UDA_SUBVAR_SYSTEM_HOSTNAME;
- public static String RESID_UDA_SUBVAR_SYSTEM_PATHSEP;
- public static String RESID_UDA_SUBVAR_SYSTEM_FILESEP;
- // Resource type shown in property sheet / delete confirmation dialog for
- // UDAs
- public static String RESID_UDA_RESOURCE_TYPE;
- // WORK WITH USER DEFINED TYPE DIALOG...
- public static String RESID_WORKWITH_UDT_TITLE;
- public static String RESID_UDT_TREE_TIP;
- public static String RESID_UDT_NAME_LABEL;
- public static String RESID_UDT_NAME_TOOLTIP;
- public static String RESID_UDT_TYPES_LABEL;
- public static String RESID_UDT_TYPES_TOOLTIP;
- public static String RESID_UDT_TYPESLIST_LABEL_LABEL;
- public static String RESID_UDT_TYPESLIST_LABEL_TOOLTIP;
- public static String RESID_UDT_DELETE_BUTTON_LABEL;
- public static String RESID_UDT_DELETE_BUTTON_TOOLTIP;
- public static String RESID_UDT_IBM_VERBAGE;
- public static String RESID_UDT_VENDOR_VERBAGE;
- // Resource type shown in property sheet / delete confirmation dialog for
- // UDTs
- public static String RESID_UDT_RESOURCE_TYPE;
- // UNIVERSAL FILE SYSTEM USER DEFINED ACTION SUPPORT...
- public static String RESID_UDA_FILES_DOMAIN_FOLDER;
- public static String RESID_UDA_FILES_DOMAIN_FILE;
- public static String RESID_UDA_FILES_DOMAIN_NEWFOLDER;
- public static String RESID_UDA_FILES_DOMAIN_NEWFILE;
- public static String RESID_UDA_FILES_NEWNODE_LABEL;
- // UNIVERSAL FILE SYSTEM USER DEFINED TYPE SUPPORT...
- public static String RESID_UDT_FILES_DOMAIN_NEWFOLDER;
- public static String RESID_UDT_FILES_DOMAIN_NEWFILE;
- public static String RESID_UDT_FILES_TYPESGROUP_LABEL;
- public static String RESID_UDT_FILES_TYPESGROUP_TOOLTIP;
- public static String RESID_UDT_FILES_DEFINEDTYPES_LABEL;
- public static String RESID_UDT_FILES_DEFINEDTYPES_TOOLTIP;
- public static String RESID_UDT_FILES_USERTYPES_LABEL;
- public static String RESID_UDT_FILES_USERTYPES_TOOLTIP;
- // UNIVERSAL RUN COMMAND DIALOG
- public static String RESID_UCMD_RUN_IN_NEW_SHELL_LABEL;
- public static String RESID_UCMD_RUN_IN_NEW_SHELL_TOOLTIP;
- public static String RESID_UCMD_RUN_COMMAND_LABEL;
- public static String RESID_UCMD_COMMAND_LABEL;
- public static String RESID_UCMD_COMMAND_TOOLTIP;
- public static String RESID_UCMD_COMAMND_SHELL_LABEL;
- // UNIVERSAL FILE SYSTEM UDA SUPPORT...
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_DATE;
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_NAME;
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_PATH;
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_NAME_ROOT;
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_NAME_EXT;
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_PATH_ROOT;
- public static String RESID_UDA_FILES_SUBVAR_RESOURCE_PATH_DRIVE;
- public static String RESID_UDA_FILES_SUBVAR_CONTAINER_NAME;
- public static String RESID_UDA_FILES_SUBVAR_CONTAINER_PATH;
- // UNIVERSAL FILE SYSTEM COMPILE COMMAND SUPPORT...
- public static String RESID_COMPILE_FILES_SUBVAR_CONNECTION_NAME;
- public static String RESID_COMPILE_FILES_SUBVAR_LOCAL_HOSTNAME;
- public static String RESID_COMPILE_FILES_SUBVAR_LOCAL_IP;
- public static String RESID_COMPILE_FILES_SUBVAR_USER_ID;
- public static String RESID_COMPILE_FILES_SUBVAR_SYSTEM_TEMPDIR;
- public static String RESID_COMPILE_FILES_SUBVAR_SYSTEM_HOMEDIR;
- public static String RESID_COMPILE_FILES_SUBVAR_SYSTEM_HOSTNAME;
- public static String RESID_COMPILE_FILES_SUBVAR_SYSTEM_PATHSEP;
- public static String RESID_COMPILE_FILES_SUBVAR_SYSTEM_FILESEP;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_DATE;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME_ROOT;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME_EXT;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH_ROOT;
- public static String RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH_DRIVE;
- public static String RESID_COMPILE_FILES_SUBVAR_CONTAINER_NAME;
- public static String RESID_COMPILE_FILES_SUBVAR_CONTAINER_PATH;
- // WORK WITH COMPILE COMMANDS DIALOG...
- public static String RESID_WWCOMPCMDS_TITLE;
- public static String RESID_WWCOMPCMDS_PROFILE_LABEL;
- public static String RESID_WWCOMPCMDS_PROFILE_TOOLTIP;
- public static String RESID_WWCOMPCMDS_TYPES_LABEL;
- public static String RESID_WWCOMPCMDS_TYPES_TOOLTIP;
- public static String RESID_WWCOMPCMDS_TYPES_BUTTON_ADD_LABEL;
- public static String RESID_WWCOMPCMDS_TYPES_BUTTON_ADD_TOOLTIP;
- public static String RESID_WWCOMPCMDS_TYPES_BUTTON_CHG_LABEL;
- public static String RESID_WWCOMPCMDS_TYPES_BUTTON_CHG_TOOLTIP;
- public static String RESID_WWCOMPCMDS_TYPES_BUTTON_RMV_LABEL;
- public static String RESID_WWCOMPCMDS_TYPES_BUTTON_RMV_TOOLTIP;
- public static String RESID_WWCOMPCMDS_LIST_LABEL;
- public static String RESID_WWCOMPCMDS_LIST_TOOLTIP;
- public static String RESID_WWCOMPCMDS_LIST_NEWITEM;
- public static String RESID_WWCOMPCMDS_EDITCMD_LABEL;
- public static String RESID_WWCOMPCMDS_EDITCMD_TOOLTIP;
- public static String RESID_WWCOMPCMDS_NEWCMD_LABEL;
- public static String RESID_WWCOMPCMDS_NEWCMD_TOOLTIP;
- public static String RESID_WWCOMPCMDS_CMDLABEL_LABEL;
- public static String RESID_WWCOMPCMDS_CMDLABEL_TOOLTIP;
- public static String RESID_WWCOMPCMDS_CMD_LABEL;
- public static String RESID_WWCOMPCMDS_CMD_TOOLTIP;
- public static String RESID_WWCOMPCMDS_BUTTON_CREATE_LABEL;
- public static String RESID_WWCOMPCMDS_BUTTON_CREATE_TOOLTIP;
- public static String RESID_WWCOMPCMDS_BUTTON_APPLY_LABEL;
- public static String RESID_WWCOMPCMDS_BUTTON_APPLY_TOOLTIP;
- public static String RESID_WWCOMPCMDS_BUTTON_REVERT_LABEL;
- public static String RESID_WWCOMPCMDS_BUTTON_REVERT_TOOLTIP;
- // Popup menu actions within this dialog
- public static String RESID_WWCOMPCMDS_COPY_NAME_1;
- public static String RESID_WWCOMPCMDS_COPY_NAME_N;
- // PROMPT COMPILE COMMAND DIALOG...
- public static String RESID_COMPILE_PROMPTCMD_TITLE;
- public static String RESID_COMPILE_PROMPTCMD_VERBAGE_LABEL;
- public static String RESID_COMPILE_PROMPTCMD_PROMPT_LABEL;
- public static String RESID_COMPILE_PROMPTCMD_PROMPT_TOOLTIP;
- public static String RESID_COMPILE_PROMPTCMD_OKBUTTON_LABEL;
- public static String RESID_COMPILE_PROMPTCMD_OKBUTTON_TOOLTIP;
- public static String RESID_COMPILE_PROMPTCMD_CANCELBUTTON_TOOLTIP;
- // ADD COMPILABLE SOURCE TYPE DIALOG...
- public static String RESID_COMPILE_NEWSRCTYPE_TITLE;
- public static String RESID_COMPILE_NEWSRCTYPE_VERBAGE_LABEL;
- public static String RESID_COMPILE_NEWSRCTYPE_PROMPT_LABEL;
- public static String RESID_COMPILE_NEWSRCTYPE_PROMPT_TOOLTIP;
- // EDIT COMPILABLE SOURCE TYPE DIALOG...
- public static String RESID_COMPILE_EDITSRCTYPED_TITLE;
- public static String RESID_COMPILE_EDITSRCTYPE_VERBAGE_LABEL;
- public static String RESID_COMPILE_EDITSRCTYPE_PROMPT_LABEL;
- public static String RESID_COMPILE_EDITSRCTYPE_PROMPT_TOOLTIP;
- public static String RESID_UDA_ACTION_DELETE_LABEL;
- public static String RESID_UDA_ACTION_DELETE_TOOLTIP;
- public static String RESID_UDA_ACTION_COPY_LABEL;
- public static String RESID_UDA_ACTION_COPY_TOOLTIP;
- public static String RESID_UDA_ACTION_PASTE_LABEL;
- public static String RESID_UDA_ACTION_PASTE_TOOLTIP;
- public static String RESID_UDA_ACTION_MOVEUP_LABEL;
- public static String RESID_UDA_ACTION_MOVEUP_TOOLTIP;
- public static String RESID_UDA_ACTION_MOVEDOWN_LABEL;
- public static String RESID_UDA_ACTION_MOVEDOWN_TOOLTIP;
- public static String RESID_UDA_ACTION_RESTORE_LABEL;
- public static String RESID_UDA_ACTION_RESTORE_TOOLTIP;
- public static String RESID_WWCOMPCMDS_ACTION_DELETE_LABEL;
- public static String RESID_WWCOMPCMDS_ACTION_DELETE_TOOLTIP;
- public static String RESID_WWCOMPCMDS_ACTION_COPY_LABEL;
- public static String RESID_WWCOMPCMDS_ACTION_COPY_TOOLTIP;
- public static String RESID_WWCOMPCMDS_ACTION_PASTE_LABEL;
- public static String RESID_WWCOMPCMDS_ACTION_PASTE_TOOLTIP;
- public static String RESID_WWCOMPCMDS_ACTION_MOVEUP_LABEL;
- public static String RESID_WWCOMPCMDS_ACTION_MOVEUP_TOOLTIP;
- public static String RESID_WWCOMPCMDS_ACTION_MOVEDOWN_LABEL;
- public static String RESID_WWCOMPCMDS_ACTION_MOVEDOWN_TOOLTIP;
- public static String RESID_WWCOMPCMDS_ACTION_RESTORE_LABEL;
- public static String RESID_WWCOMPCMDS_ACTION_RESTORE_TOOLTIP;
- public static String ACTION_WORKWITH_UDAS_LABEL;
- public static String ACTION_WORKWITH_UDAS_TOOLTIP;
- public static String ACTION_WORKWITH_WWUDAS_LABEL;
- public static String ACTION_WORKWITH_WWUDAS_TOOLTIP;
- public static String ACTION_WORKWITH_NAMEDTYPES_LABEL;
- public static String ACTION_WORKWITH_NAMEDTYPES_TOOLTIP;
- public static String ACTION_WORKWITH_COMPILE_CMDS_LABEL;
- public static String ACTION_WORKWITH_COMPILE_CMDS_TOOLTIP;
- public static String ACTION_WORKWITH_WWCOMPILE_CMDS_LABEL;
- public static String ACTION_WORKWITH_WWCOMPILE_CMDS_TOOLTIP;
- public static String ACTION_UDA_CASCADE_LABEL;
- public static String ACTION_UDA_CASCADE_TOOLTIP;
- public static String RESID_PREF_UDAS_CASCADEBYPROFILE_LABEL;
- public static String RESID_PREF_UDAS_CASCADEBYPROFILE_TOOLTIP;
- public static String SystemCompileManager_0;
-
- //Resources used to be in other internal plugins:
- public static String EditorManager_saveResourcesMessage;
- public static String EditorManager_saveResourcesTitle;
-
- public static String BUTTON_CLOSE;
- public static String RESID_PP_PROPERTIES_TYPE_LABEL;
- public static String RESID_PP_PROPERTIES_TYPE_TOOLTIP;
- public static String ACTION_CASCADING_NEW_LABEL;
- public static String ACTION_CASCADING_NEW_TOOLTIP;
-
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemUDAResources.class);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.properties b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.properties
deleted file mode 100644
index d37740823..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAResources.properties
+++ /dev/null
@@ -1,423 +0,0 @@
-###############################################################################
-# Copyright (c) 2002, 2008 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
-# Xuan Chen (IBM) - [223103] [cleanup] remove duplicate NL strings for user action plugin
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-#=============================================================
-# WORK WITH USER-DEFINED ACTIONS DIALOG...
-#=============================================================
-RESID_WORKWITH_UDAS_TITLE=Work With User Actions
-RESID_UDA_TREE_TIP=Existing user actions. Press F1 for details.
-RESID_UDA_ACTION_DELETE_LABEL=Delete...
-RESID_UDA_ACTION_DELETE_TOOLTIP=Delete selected action or type. Will be asked to confirm
-RESID_UDA_ACTION_COPY_LABEL=Copy
-RESID_UDA_ACTION_COPY_TOOLTIP=Copy selected action or type to clipboard so it can be pasted for a duplication operation
-RESID_UDA_ACTION_PASTE_LABEL=Paste
-RESID_UDA_ACTION_PASTE_TOOLTIP=Paste action or type from clipboard
-RESID_UDA_ACTION_MOVEUP_LABEL=Move up
-RESID_UDA_ACTION_MOVEUP_TOOLTIP=Move selected action or type up in the list
-RESID_UDA_ACTION_MOVEDOWN_LABEL=Move down
-RESID_UDA_ACTION_MOVEDOWN_TOOLTIP=Move selected action or type down in the list
-RESID_UDA_ACTION_RESTORE_LABEL=Restore defaults
-RESID_UDA_ACTION_RESTORE_TOOLTIP=Restore to original state as supplied by IBM
-RESID_UDA_COPY_NAME_1=Copy of %1
-RESID_UDA_COPY_NAME_N=Copy (%2) of %1
-RESID_UDA_IBM_VERBAGE=This action is supplied by IBM and is not editable.
-RESID_UDA_VENDOR_VERBAGE=This action is supplied by vendor %1 and is not editable.
-
-RESID_WORKWITH_UDAS_ACTION_LABEL=Work With User Actions...
-RESID_WORKWITH_UDAS_ACTION_TOOLTIP=Work with your user action definitions
-
-
-#=============================================================
-# USER-DEFINED ACTION NEW/EDIT PANE...
-#=============================================================
-
-#=============================================================
-# USER-DEFINED ACTION RESOURCE TYPE (FOR DELETE CONFIRM DIALOG)
-#=============================================================
-RESID_UDA_RESOURCE_TYPE= User-defined action
-
-#=============================================================
-# WORK WITH USER-DEFINED (File) Types DIALOG...
-#=============================================================
-RESID_WORKWITH_UDT_TITLE=Work With Named Types
-RESID_UDT_TREE_TIP=Existing named types. Press F1 for details.
-RESID_UDT_IBM_VERBAGE=This named type is supplied by IBM and is not editable.
-RESID_UDT_VENDOR_VERBAGE=This named type is supplied by vendor %1 and is not editable.
-
-#=============================================================
-# USER-DEFINED ACTION RESOURCE TYPE (FOR DELETE CONFIRM DIALOG)
-#=============================================================
-RESID_UDT_RESOURCE_TYPE= User-defined file type
-
-#=============================================================
-# PROMPT USER-DEFINED-ACTION COMMAND DIALOG...
-#=============================================================
-RESID_UDA_PROMPTCMD_TITLE=Prompt User Action Command
-
-#=============================================================
-# PROMPT COMPILE COMMAND DIALOG...
-#=============================================================
-RESID_COMPILE_PROMPTCMD_TITLE=Prompt Compile Command
-
-
-#=============================================================
-# COMMON USER-DEFINED ACTIONS SUBSTITUTION VARIABLES...
-#=============================================================
-RESID_UDA_SUBVAR_ACTION_NAME = This user action's name
-RESID_UDA_SUBVAR_CONNECTION_NAME = The name of the connection expanded to see these resources
-RESID_UDA_SUBVAR_LOCAL_HOSTNAME = Local workstation host name
-RESID_UDA_SUBVAR_LOCAL_IP = Local workstation IP address
-RESID_UDA_SUBVAR_USER_ID = User ID used to make the connection
-RESID_UDA_SUBVAR_SYSTEM_TEMPDIR = Temporary directory on the target system
-RESID_UDA_SUBVAR_SYSTEM_HOMEDIR = Home directory on the target system, for the connection's user ID
-RESID_UDA_SUBVAR_SYSTEM_HOSTNAME = Remote system host name
-RESID_UDA_SUBVAR_SYSTEM_PATHSEP = Path separator. ";" on Windows, ":" on Unix and Linux
-RESID_UDA_SUBVAR_SYSTEM_FILESEP = File separator. "\\" on Windows, "/" on Unix and Linux
-
-
-
-#=============================================================
-# UNIVERSAL FILE SUBSYSTEM USER-DEFINED ACTIONS MRI...
-#=============================================================
-RESID_UDA_FILES_DOMAIN_FOLDER= Folder
-RESID_UDA_FILES_DOMAIN_FILE= File
-RESID_UDA_FILES_DOMAIN_NEWFOLDER= Folder action
-RESID_UDA_FILES_DOMAIN_NEWFILE= File action
-RESID_UDA_FILES_NEWNODE_LABEL= New named type...
-
-#=================================================================
-# UNIVERSAL FILE SUBSYSTEM SUBSTITUTION VARIABLES FOR USER ACTIONS
-#=================================================================
-RESID_UDA_FILES_SUBVAR_RESOURCE_DATE = Last modified date of selected resource
-RESID_UDA_FILES_SUBVAR_RESOURCE_NAME = Name of selected resource, unqualified
-RESID_UDA_FILES_SUBVAR_RESOURCE_PATH = Path of selected resource, including name
-RESID_UDA_FILES_SUBVAR_RESOURCE_NAME_ROOT=Name of selected resource without the extension
-RESID_UDA_FILES_SUBVAR_RESOURCE_NAME_EXT=Extension part of the name of the selected resource
-RESID_UDA_FILES_SUBVAR_RESOURCE_PATH_ROOT=Root of selected file's path. "c:\\" on Windows, or "/" on others
-RESID_UDA_FILES_SUBVAR_RESOURCE_PATH_DRIVE=Drive letter on Windows, empty string on others
-RESID_UDA_FILES_SUBVAR_CONTAINER_NAME=Name of folder containing selected resource, unqualified
-RESID_UDA_FILES_SUBVAR_CONTAINER_PATH=Path of folder containing selected resource, including name
-
-#=================================================================
-# UNIVERSAL FILE SUBSYSTEM SUBSTITUTION VARIABLES FOR COMPILE ACTIONS
-#=================================================================
-RESID_COMPILE_FILES_SUBVAR_CONNECTION_NAME = The name of the connection expanded to see these resources
-RESID_COMPILE_FILES_SUBVAR_LOCAL_HOSTNAME = Local workstation host name
-RESID_COMPILE_FILES_SUBVAR_LOCAL_IP = Local workstation IP address
-RESID_COMPILE_FILES_SUBVAR_USER_ID = User ID used to make the connection
-RESID_COMPILE_FILES_SUBVAR_SYSTEM_TEMPDIR = Temporary directory on the target system
-RESID_COMPILE_FILES_SUBVAR_SYSTEM_HOMEDIR = Home directory on the target system, for the connection's user ID
-RESID_COMPILE_FILES_SUBVAR_SYSTEM_HOSTNAME = Remote system host name
-RESID_COMPILE_FILES_SUBVAR_SYSTEM_PATHSEP = Path separator. ";" on Windows, ":" on Unix and Linux
-RESID_COMPILE_FILES_SUBVAR_SYSTEM_FILESEP = File separator. "\\" on Windows, "/" on Unix and Linux
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_DATE = Last modified date of selected resource
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME = Name of selected resource, unqualified
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH = Path of selected resource, including name
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME_ROOT=Name of selected resource without the extension
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_NAME_EXT=Extension part of the name of the selected resource
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH_ROOT=Root of selected file's path. "c:\\" on Windows, or "/" on others
-RESID_COMPILE_FILES_SUBVAR_RESOURCE_PATH_DRIVE=Drive letter on Windows, empty string on others
-RESID_COMPILE_FILES_SUBVAR_CONTAINER_NAME=Name of folder containing selected resource, unqualified
-RESID_COMPILE_FILES_SUBVAR_CONTAINER_PATH=Path of folder containing selected resource, including name
-
-
-#=============================================================
-# UNIVERSAL FILE SUBSYSTEM USER-DEFINED TYPES MRI...
-#=============================================================
-RESID_UDT_FILES_DOMAIN_NEWFOLDER= Folder type
-RESID_UDT_FILES_DOMAIN_NEWFILE= File type
-
-#=============================================================
-# SELECT REMOTE FILES RE-USABLE WIDGET...
-#=============================================================
-
-#=============================================================
-# WORK WITH COMPILE COMMANDS DIALOG...
-#=============================================================
-RESID_WWCOMPCMDS_TITLE=Work With Compile Commands
-RESID_WWCOMPCMDS_LIST_NEWITEM=New command
-# POPUP-MENU ITEMS WITHIN THIS DIALOG
-RESID_WWCOMPCMDS_COPY_NAME_1=Copy of %1
-RESID_WWCOMPCMDS_COPY_NAME_N=Copy (%2) of %1
-#=============================================================
-# PROMPT FOR NEW COMPILE SOURCE TYPE...
-#=============================================================
-RESID_COMPILE_NEWSRCTYPE_TITLE=Add Source Type
-#=============================================================
-# PROMPT FOR EDITING COMPILE SOURCE TYPE...
-#=============================================================
-RESID_COMPILE_EDITSRCTYPED_TITLE=Edit Source Type
-#=================================================================
-# UNIVERSAL FILE SUBSYSTEM SUBSTITUTION VARIABLES FOR USER ACTIONS
-#=================================================================
-ACTION_WORKWITH_UDAS_LABEL=User Actions...
-ACTION_WORKWITH_UDAS_TOOLTIP=Create or manage user-defined actions for remote objects
-
-ACTION_WORKWITH_WWUDAS_LABEL=Work With User Actions...
-ACTION_WORKWITH_WWUDAS_TOOLTIP=Create or manage user-defined actions for remote objects
-
-ACTION_WORKWITH_NAMEDTYPES_LABEL=Named Types...
-ACTION_WORKWITH_NAMEDTYPES_TOOLTIP=Create or manage named lists of pre-defined resource types
-
-ACTION_WORKWITH_COMPILE_CMDS_LABEL=Compile Commands...
-ACTION_WORKWITH_COMPILE_CMDS_TOOLTIP=Create or manage commands used to compile selected resources
-
-ACTION_WORKWITH_WWCOMPILE_CMDS_LABEL=Work With Compile Commands...
-ACTION_WORKWITH_WWCOMPILE_CMDS_TOOLTIP=Create or manage commands used to compile selected resources
-
-
-ACTION_UDA_CASCADE_LABEL=User Actions
-ACTION_UDA_CASCADE_TOOLTIP=User defined actions for the selected resources
-
-RESID_PREF_UDAS_CASCADEBYPROFILE_LABEL=Cascade user actions and compile commands by profile
-RESID_PREF_UDAS_CASCADEBYPROFILE_TOOLTIP=Cascade the User Actions and Compile pop-up menus by active profile, for remote objects
-
-
-
-#=============================================================
-# WORK WITH USER-DEFINED ACTIONS DIALOG...
-#=============================================================
-RESID_UDA_PROFILE_LABEL=Parent profile
-RESID_UDA_PROFILE_TOOLTIP=Select profile whose user actions you wish to work with
-
-RESID_UDA_APPLY_BUTTON_LABEL=Apply
-RESID_UDA_APPLY_BUTTON_TOOLTIP=Apply changes
-
-RESID_UDA_RESET_BUTTON_LABEL=Reset
-RESID_UDA_RESET_BUTTON_TOOLTIP=Reset settings
-
-RESID_UDA_REVERT_BUTTON_LABEL=Revert
-RESID_UDA_REVERT_BUTTON_TOOLTIP=Revert changes
-
-RESID_UDA_DELETE_BUTTON_LABEL=Delete...
-RESID_UDA_DELETE_BUTTON_TOOLTIP=Delete selected action
-
-RESID_UDA_COPY_BUTTON_LABEL=Copy
-RESID_UDA_COPY_BUTTON_TOOLTIP=Duplicate this action in the same or different profile
-
-#=============================================================
-# USER-DEFINED ACTION NEW/EDIT PANE...
-#=============================================================
-
-RESID_UDA_NAME_LABEL=Action name
-RESID_UDA_NAME_TOOLTIP=Unique name for the action
-
-RESID_UDA_COMMENT_LABEL=Comment
-RESID_UDA_COMMENT_TOOLTIP=Enter a comment to describe this action in more detail
-
-RESID_UDA_COMMAND_LABEL=Command
-RESID_UDA_COMMAND_TOOLTIP=The command string which will be run when the action is invoked
-
-RESID_UDA_INSERTVAR_BUTTON_LABEL=Insert variable...
-RESID_UDA_INSERTVAR_BUTTON_TOOLTIP=Insert a substitution variable into the command, at the cursor
-
-RESID_UDA_EDIT_BUTTON_LABEL=Edit...
-RESID_UDA_EDIT_BUTTON_TOOLTIP=Edit the command string
-
-RESID_UDA_OPTION_PROMPT_LABEL=Prompt first
-RESID_UDA_OPTION_PROMPT_TOOLTIP=Prompt for command parameter changes when the action is invoked
-
-RESID_UDA_OPTION_SHOW_LABEL=Show action
-RESID_UDA_OPTION_SHOW_TOOLTIP=Show this action when it applies
-
-RESID_UDA_OPTION_REFRESH_LABEL=Refresh after
-RESID_UDA_OPTION_REFRESH_TOOLTIP=Refresh information on the selected resources after the action is invoked
-
-RESID_UDA_OPTION_COLLECT_LABEL=Invoke once
-RESID_UDA_OPTION_COLLECT_TOOLTIP=Invoke the action once for all selected objects, versus once for each. The name substitution variable holds the quoted full name of each object, delimited by blanks
-
-RESID_UDA_OPTION_SINGLESEL_LABEL=Single selection only
-RESID_UDA_OPTION_SINGLESEL_TOOLTIP=Show action only if a single object is selected
-
-RESID_UDA_OPTION_REMOTE_LABEL=Remote command
-RESID_UDA_OPTION_REMOTE_TOOLTIP=Command is a remote command versus a local command
-
-RESID_UDA_TYPE_LIST_LABEL=Resource types for which this action will appear
-RESID_UDA_TYPE_LIST_TOOLTIP=Select types to scope this action to
-
-RESID_UDA_TYPE_LIST_MASTER_LABEL=Defined Types
-RESID_UDA_TYPE_LIST_MASTER_TOOLTIP=Master list of all previously defined types
-
-RESID_UDA_TYPE_LIST_SELECTED_LABEL=Selected Types
-RESID_UDA_TYPE_LIST_SELECTED_TOOLTIP=Select list of types to scope this action to
-
-RESID_UDA_TYPE_EDIT_BUTTON_LABEL=Edit...
-RESID_UDA_TYPE_EDIT_BUTTON_TOOLTIP=Edit master list of file types
-
-RESID_UDA_TYPE_ADD_BUTTON_LABEL=Add>
-RESID_UDA_TYPE_ADD_BUTTON_TOOLTIP=Add selected type from master list to the selected list
-
-RESID_UDA_TYPE_RMV_BUTTON_LABEL=<Remove
-RESID_UDA_TYPE_RMV_BUTTON_TOOLTIP=Remove selected type from the selected list
-
-#=============================================================
-# PROMPT USER-DEFINED-ACTION COMMAND DIALOG...
-#=============================================================
-RESID_UDA_PROMPTCMD_VERBAGE_LABEL=Optionally edit the command for this user action. Press Run to run it.
-RESID_UDA_PROMPTCMD_PROMPT_LABEL=Command
-RESID_UDA_PROMPTCMD_PROMPT_TOOLTIP=Command to be run, with substitution variables resolved. Can be edited
-RESID_UDA_PROMPTCMD_OKBUTTON_LABEL=Run
-RESID_UDA_PROMPTCMD_OKBUTTON_TOOLTIP=Run the command
-RESID_UDA_PROMPTCMD_CANCELBUTTON_TOOLTIP=Do not run the command
-
-
-#=============================================================
-# WORK WITH COMPILE COMMANDS DIALOG...
-#=============================================================
-
-RESID_WWCOMPCMDS_PROFILE_LABEL=Parent profile:
-RESID_WWCOMPCMDS_PROFILE_TOOLTIP=Select profile whose compile commands you wish to work with
-
-RESID_WWCOMPCMDS_TYPES_LABEL=Source type:
-RESID_WWCOMPCMDS_TYPES_TOOLTIP=Select the source type for which these compile commands apply
-
-RESID_WWCOMPCMDS_TYPES_BUTTON_ADD_LABEL=Add...
-RESID_WWCOMPCMDS_TYPES_BUTTON_ADD_TOOLTIP=Add a source type for which there will be associated compile commands
-
-RESID_WWCOMPCMDS_TYPES_BUTTON_CHG_LABEL=Edit...
-RESID_WWCOMPCMDS_TYPES_BUTTON_CHG_TOOLTIP=Edit this source type, for which there are associated compile commands
-
-RESID_WWCOMPCMDS_TYPES_BUTTON_RMV_LABEL=Remove
-RESID_WWCOMPCMDS_TYPES_BUTTON_RMV_TOOLTIP=Remove this source type. Only enabled if there are no associated compile commands.
-
-RESID_WWCOMPCMDS_LIST_LABEL=Compile Commands:
-RESID_WWCOMPCMDS_LIST_TOOLTIP=Commands to compile with. Use the pop-up menu for additional actions
-
-RESID_WWCOMPCMDS_EDITCMD_LABEL=Selected compile command:
-RESID_WWCOMPCMDS_EDITCMD_TOOLTIP=Edit the compile command and press Apply to change it in the list
-
-RESID_WWCOMPCMDS_NEWCMD_LABEL=New compile command:
-RESID_WWCOMPCMDS_NEWCMD_TOOLTIP=Specify the new compile command, then press Create to add it to the list
-
-RESID_WWCOMPCMDS_CMDLABEL_LABEL=Label:
-RESID_WWCOMPCMDS_CMDLABEL_TOOLTIP=A unique label for the compile command, shown in the compile menu for resources of the selected type. Labels of IBM-supplied compile commands are not editable.
-
-RESID_WWCOMPCMDS_CMD_LABEL=Command:
-RESID_WWCOMPCMDS_CMD_TOOLTIP=Specify the compile command, including any parameters and substitution variables desired
-
-RESID_WWCOMPCMDS_BUTTON_CREATE_LABEL=Create
-RESID_WWCOMPCMDS_BUTTON_CREATE_TOOLTIP=Press to create a new compile command using the given label and command string
-
-RESID_WWCOMPCMDS_BUTTON_APPLY_LABEL=Apply
-RESID_WWCOMPCMDS_BUTTON_APPLY_TOOLTIP=Press to apply the changes to the currently selected compile command
-
-RESID_WWCOMPCMDS_BUTTON_REVERT_LABEL=Revert
-RESID_WWCOMPCMDS_BUTTON_REVERT_TOOLTIP=Press to revert to the last saved values for the currently selected compile command
-
-RESID_WWCOMPCMDS_ACTION_DELETE_LABEL=Delete...
-RESID_WWCOMPCMDS_ACTION_DELETE_TOOLTIP=Delete selected action or type. Will be asked to confirm
-RESID_WWCOMPCMDS_ACTION_COPY_LABEL=Copy
-RESID_WWCOMPCMDS_ACTION_COPY_TOOLTIP=Copy selected action or type to clipboard so it can be pasted for a duplication operation
-RESID_WWCOMPCMDS_ACTION_PASTE_LABEL=Paste
-RESID_WWCOMPCMDS_ACTION_PASTE_TOOLTIP=Paste action or type from clipboard
-RESID_WWCOMPCMDS_ACTION_MOVEUP_LABEL=Move up
-RESID_WWCOMPCMDS_ACTION_MOVEUP_TOOLTIP=Move selected action or type up in the list
-RESID_WWCOMPCMDS_ACTION_MOVEDOWN_LABEL=Move down
-RESID_WWCOMPCMDS_ACTION_MOVEDOWN_TOOLTIP=Move selected action or type down in the list
-RESID_WWCOMPCMDS_ACTION_RESTORE_LABEL=Restore defaults
-RESID_WWCOMPCMDS_ACTION_RESTORE_TOOLTIP=Restore to original state as supplied by IBM
-
-
-#=============================================================
-# PROMPT COMPILE COMMAND DIALOG...
-#=============================================================
-RESID_COMPILE_PROMPTCMD_VERBAGE_LABEL=Optionally edit the command before running it. Press Run to run it.
-
-RESID_COMPILE_PROMPTCMD_PROMPT_LABEL=Compile command
-RESID_COMPILE_PROMPTCMD_PROMPT_TOOLTIP=Command to be run, with substitution variables resolved. Can be edited
-
-RESID_COMPILE_PROMPTCMD_OKBUTTON_LABEL=Run
-RESID_COMPILE_PROMPTCMD_OKBUTTON_TOOLTIP=Run the compile command
-
-RESID_COMPILE_PROMPTCMD_CANCELBUTTON_TOOLTIP=Do not run the compile command
-
-
-
-#=============================================================
-# PROMPT FOR NEW COMPILE SOURCE TYPE...
-#=============================================================
-
-RESID_COMPILE_NEWSRCTYPE_VERBAGE_LABEL=Specify a new compilable source type
-
-RESID_COMPILE_NEWSRCTYPE_PROMPT_LABEL=New source type
-RESID_COMPILE_NEWSRCTYPE_PROMPT_TOOLTIP=Identify a source type for which compile commands will be associated
-
-
-#=============================================================
-# PROMPT FOR EDITING COMPILE SOURCE TYPE...
-#=============================================================
-
-RESID_COMPILE_EDITSRCTYPE_VERBAGE_LABEL=Change the compilable source type
-
-RESID_COMPILE_EDITSRCTYPE_PROMPT_LABEL=Source type
-RESID_COMPILE_EDITSRCTYPE_PROMPT_TOOLTIP=Re-specify this source type with which compile commands are associated
-
-
-
-#=============================================================
-# USER-DEFINED ACTION RESOURCE TYPE (FOR DELETE CONFIRM DIALOG)
-#=============================================================
-com.ibm.etools.systems.ui.uda.resourceType = User-defined action
-
-#=============================================================
-# WORK WITH USER-DEFINED (File) Types DIALOG...
-#=============================================================
-RESID_UDT_NAME_LABEL=Name
-RESID_UDT_NAME_TOOLTIP=Unique name for the named type
-
-RESID_UDT_TYPES_LABEL=Types
-RESID_UDT_TYPES_TOOLTIP=One or more blank-delimited resource types. These can be simple or generic
-
-RESID_UDT_TYPESLIST_LABEL_LABEL=Select types
-RESID_UDT_TYPESLIST_LABEL_TOOLTIP=Select one or more resource types which this named type will represent
-
-RESID_UDT_DELETE_BUTTON_LABEL=Delete
-RESID_UDT_DELETE_BUTTON_TOOLTIP=Delete selected type
-
-
-#=============================================================
-# UNIVERSAL FILE SUBSYSTEM USER-DEFINED TYPES MRI...
-#=============================================================
-RESID_UDT_FILES_TYPESGROUP_LABEL=File Types
-RESID_UDT_FILES_TYPESGROUP_TOOLTIP=Select one or more file types which this named type will represent
-
-RESID_UDT_FILES_DEFINEDTYPES_LABEL=Selected types
-RESID_UDT_FILES_DEFINEDTYPES_TOOLTIP=All types currently selected for this named type
-
-RESID_UDT_FILES_USERTYPES_LABEL=Other types
-RESID_UDT_FILES_USERTYPES_TOOLTIP=Enter additional extensions, comma-separated. Press F1 for details.
-
-
-###################################################################################
-############################ Universal Commands ############################
-###################################################################################
-RESID_UCMD_RUN_IN_NEW_SHELL_LABEL = Run in new shell
-RESID_UCMD_RUN_IN_NEW_SHELL_TOOLTIP = Indicate whether the command is to be launched in a new shell or the system default shell
-RESID_UCMD_RUN_COMMAND_LABEL = Run Command
-RESID_UCMD_COMMAND_LABEL = Command
-RESID_UCMD_COMMAND_TOOLTIP = Enter the command to invoke
-RESID_UCMD_COMAMND_SHELL_LABEL = Command Shell
-
-SystemCompileManager_0=An error has been detected that is probably a programming bug. Please submit your .log file in the .metadata subfolder for service.
-
-
-EditorManager_saveResourcesMessage = Select the &resources to save:
-EditorManager_saveResourcesTitle = Save Resources
-
-BUTTON_CLOSE=Close
-RESID_PP_PROPERTIES_TYPE_LABEL=Resource type
-RESID_PP_PROPERTIES_TYPE_TOOLTIP=What type of artifact is this?
-ACTION_CASCADING_NEW_LABEL=New
-ACTION_CASCADING_NEW_TOOLTIP=Create a new resource
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDARestoreDefaultsActions.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDARestoreDefaultsActions.java
deleted file mode 100644
index d8f0eb905..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDARestoreDefaultsActions.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-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.actions.SystemBaseAction;
-
-/**
- * The action is used within the Work With User Actions dialog, in the context menu
- * of the selected user-defined action.<br>
- * It is used to restore shipped defaults of the selected IBM-supplied user action
- */
-public class SystemUDARestoreDefaultsActions extends SystemBaseAction {
- private SystemUDBaseTreeView parentTree;
-
- /**
- * Constructor
- */
- public SystemUDARestoreDefaultsActions(SystemUDBaseTreeView parentTree) {
- super(SystemUDAResources.RESID_UDA_ACTION_RESTORE_LABEL, SystemUDAResources.RESID_UDA_ACTION_RESTORE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptorFromIDE(
- ISystemIconConstants.ICON_IDE_REFRESH_ID), null);
- allowOnMultipleSelection(false);
- this.parentTree = parentTree;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
- setHelp(RSEUIPlugin.HELPPREFIX + "udrd0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is an IBM-supplied compile command
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentTree.canRestore();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentTree.doRestore();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java
deleted file mode 100644
index 2895153c5..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDASubstVarListCommon.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [177523] Unify singleton getter methods
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-
-/**
- * @author coulthar
- *
- * Encapsulation of the substitution variables that are typically common for
- * absolutely every subsystem.
- */
-public class SystemUDASubstVarListCommon extends SystemCmdSubstVarList {
- private static final String[] COMMON_VARNAMES = { "action_name", "connection_name", "local_hostname", "local_ip", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "system_filesep", "system_homedir", "system_hostname", "system_pathsep", "system_tempdir", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "user_id" }; //$NON-NLS-1$
- private static final String[] COMMON_VARNAME_DESCRIPTIONS = { SystemUDAResources.RESID_UDA_SUBVAR_ACTION_NAME, SystemUDAResources.RESID_UDA_SUBVAR_CONNECTION_NAME,
- SystemUDAResources.RESID_UDA_SUBVAR_LOCAL_HOSTNAME, SystemUDAResources.RESID_UDA_SUBVAR_LOCAL_IP, SystemUDAResources.RESID_UDA_SUBVAR_SYSTEM_FILESEP,
- SystemUDAResources.RESID_UDA_SUBVAR_SYSTEM_HOMEDIR, SystemUDAResources.RESID_UDA_SUBVAR_SYSTEM_HOSTNAME, SystemUDAResources.RESID_UDA_SUBVAR_SYSTEM_PATHSEP,
- SystemUDAResources.RESID_UDA_SUBVAR_SYSTEM_TEMPDIR, SystemUDAResources.RESID_UDA_SUBVAR_USER_ID };
- private static SystemUDASubstVarListCommon inst = null;
-
- /**
- * Constructor .
- * Not to be used directly. Rather, use {@link #getInstance()}.
- */
- SystemUDASubstVarListCommon() {
- super(COMMON_VARNAMES, COMMON_VARNAME_DESCRIPTIONS);
- }
-
- /**
- * Return the singleton of this object. No need ever for more than one instance
- */
- public static SystemUDASubstVarListCommon getInstance() {
- if (inst == null) inst = new SystemUDASubstVarListCommon();
- return inst;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java
deleted file mode 100644
index 84b82b6d4..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java
+++ /dev/null
@@ -1,1195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.util.Vector;
-
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
-import org.eclipse.rse.internal.useractions.ui.ISystemCommandTextAdditionalGUIProvider;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.internal.useractions.ui.SystemCommandTextField;
-import org.eclipse.rse.internal.useractions.ui.SystemCommandViewerConfiguration;
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserActionComment;
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserActionName;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.view.ISystemCommandTextModifyListener;
-import org.eclipse.rse.ui.ISystemMassager;
-import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-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.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.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.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * This is the default edit pane shown on the right, when
- * an action is selected on the left. It is also used when
- * "new..." is selected on the left, so there are three states
- * for this class: new, edit and not-set.
- */
-public class SystemUDActionEditPane implements SelectionListener, // for the checkboxes
- ISelectionChangedListener, Listener, ISystemUDSelectTypeListener, ISystemCommandTextAdditionalGUIProvider, ISystemCommandTextModifyListener, MouseListener, KeyListener {
- // gui widgets
- protected Text textName, textComment;
- //protected SourceViewer textCommand;
- protected SystemCommandTextField commandField;
- //protected SystemUDASourceViewerConfiguration sourceViewerConfiguration;
- protected Button promptCB, refreshCB, showCB, singleSelCB, collectCB;
- protected Button resetButton;
- //protected Button insertVariableButton;
- protected Label typesSeparator;
- protected SystemUDSelectTypesForm selectTypesForm;
- protected boolean menuListenerAdded;
- protected String testActionName;
- // actions for popup of command SourceViewer
- // private Map fGlobalActions= new HashMap(10);
- // private List fSelectionActions = new ArrayList(3);
- // Current selection not valid if errorMessage not null
- protected SystemMessage errorMessage;
- protected ISubSystem subsystem;
- protected SystemUDActionSubsystem udaActionSubsys;
- protected ISubSystemConfiguration subsystemFactory;
- protected ISystemProfile profile;
- public SystemUDActionElement currentAction;
- protected ISystemValidator nameValidator;
- //protected ISystemValidator cmdValidator;
- protected ISystemValidator cmtValidator;
- //protected ISystemMassager cmdMassager;
- private boolean isEnabled = false;
- private boolean recursiveCall = false;
- private boolean ignoreChanges = false;
- // entry fields enabled from last selection
- private NameModifyListener nameML = new NameModifyListener();
- private NameFocusListener nameFL = new NameFocusListener();
- private CommentModifyListener commentML = new CommentModifyListener();
- //protected SystemWorkWithUDAsDialog parentDialog;
- protected ISystemUDAEditPaneHoster parentDialog;
- protected ISystemUDTreeView treeView;
- // Switch to trigger a tree view refresh when the item's name is changed.
- private boolean nameChanged = false;
- protected boolean newMode = false;
- private int newModeDomain = -1;
- private SystemUDTreeViewNewItem newModeNewItem;
- private Vector EMPTY_VECTOR = new Vector();
- // state
- private boolean grabFocus = true; // grab the focus away from the tree when processing selection events
- // state machine
- private SystemEditPaneStateMachine stateMachine;
-
- /**
- * Constructor when we have a subsystem or a subsystemconfiguration/profile pair.
- */
- public SystemUDActionEditPane(SystemUDActionSubsystem udaActionSubsys, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- super();
- this.udaActionSubsys = udaActionSubsys;
- this.subsystem = udaActionSubsys.getSubsystem();
- this.subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = (profile == null) ? subsystem.getSystemProfile() : profile;
- parentDialog = parent;
- treeView = tv;
- commandField = new SystemCommandTextField(getCommandTextViewerConfiguration());
- testActionName = getUDActionSubsystem().getTestActionName().toLowerCase();
- }
-
- /**
- * Return the user defined action subsystem
- */
- protected SystemUDActionSubsystem getUDActionSubsystem() {
- return udaActionSubsys;
- }
-
- /**
- * For child classes to return their own subclasses of the default configurator
- * used to enable proposal support in the command entry field.
- */
- protected SystemCommandViewerConfiguration getCommandTextViewerConfiguration() {
- return new SystemCommandViewerConfiguration();
- }
-
- /**
- * For child classes (such as iSeries IFS) that need to dynamically change the command
- * entry field configuration, on the fly.
- */
- protected void setCommandTextViewerConfiguration(SystemCommandViewerConfiguration cmdAssistant) {
- commandField.setCommandTextViewerConfiguration(cmdAssistant);
- }
-
- /**
- * For child classes to access current subsystem. If null, use getSubSystemFactory and getProfile
- */
- protected ISubSystem getSubSystem() {
- return subsystem;
- }
-
- /**
- * For child classes to access current profile
- */
- protected ISystemProfile getProfile() {
- return profile;
- }
-
- /**
- * For child classes to access current shell
- */
- protected Shell getShell() {
- return parentDialog.getShell();
- }
-
- // ------------------------------
- // CONFIGURATION/INPUT METHODS...
- // ------------------------------
- /**
- * Set the state machine.
- * Called by the UDA dialog
- */
- public void setStateMachine(SystemEditPaneStateMachine sm) {
- this.stateMachine = sm;
- }
-
- /**
- * Set the action name validator
- */
- public void setNameValidator(ISystemValidator validator) {
- this.nameValidator = validator;
- }
-
- /**
- * Set the action comment validator
- */
- public void setCommentValidator(ISystemValidator validator) {
- this.cmtValidator = validator;
- }
-
- /**
- * Set the action command validator. This is called per keystroke as
- * the user types the command.
- */
- public void setCommandValidator(ISystemValidator validator) {
- commandField.setCommandValidator(validator);
- }
-
- /**
- * Set the action command massager. This is called before saving the
- * command to the persistent store, to allow for massaging what the
- * user typed, such as doing intelligent uppercasing.
- */
- public void setCommandMassager(ISystemMassager massager) {
- commandField.setCommandMassager(massager);
- }
-
- /**
- * Set the substitution variable list that Insert Variable will use.
- */
- public void setSubstitutionVariableList(SystemCmdSubstVarList varList) {
- commandField.setSubstitutionVariableList(varList);
- }
-
- // ------------------------------
- // DATA EXTRACTION METHODS
- // ------------------------------
- // ------------------------------
- // EXTERNAL LIFECYCLE METHODS...
- // ------------------------------
- /**
- * Method createContents.
- * @param parent parent of this pane
- * @return Control
- */
- public Control createContents(Composite parent) {
- if (nameValidator == null) nameValidator = new ValidatorUserActionName();
- if (cmtValidator == null) cmtValidator = new ValidatorUserActionComment();
- //Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, 1); // why???
- // Inner composite
- final int nbrColumns = 3; // 2
- Composite comp = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- // Action name
- textName = SystemWidgetHelpers.createLabeledTextField(comp, null, SystemUDAResources.RESID_UDA_NAME_LABEL, SystemUDAResources.RESID_UDA_NAME_TOOLTIP);
- ((GridData) textName.getLayoutData()).horizontalSpan = nbrColumns - 1;
- // Comment
- textComment = SystemWidgetHelpers.createLabeledTextField(comp, null, SystemUDAResources.RESID_UDA_COMMENT_LABEL, SystemUDAResources.RESID_UDA_COMMENT_TOOLTIP);
- ((GridData) textComment.getLayoutData()).horizontalSpan = nbrColumns - 1;
- // Re-usable command field...
- commandField.setMRI(SystemUDAResources.RESID_UDA_COMMAND_LABEL, SystemUDAResources.RESID_UDA_COMMAND_TOOLTIP, SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_LABEL,
- SystemUDAResources.RESID_UDA_INSERTVAR_BUTTON_TOOLTIP);
- commandField.createContents(comp, nbrColumns, this);
- // old way...
- /*
- Label labelCommand = SystemWidgetHelpers.createLabel(comp,rb,RESID_UDA_COMMAND_ROOT);
- String s = labelCommand.getText();
- if (!s.endsWith(":"))
- labelCommand.setText(s+":");
- if (!createCommandLabelLineControls(comp, nbrColumns-1))
- ((GridData)labelCommand.getLayoutData()).horizontalSpan = nbrColumns;
-
- int cmdSpan = nbrColumns;
- textCommand = createEditor(comp, cmdSpan, sourceViewerConfiguration);
- textCommand.getControl().setToolTipText(rb.getString(RESID_UDA_COMMAND_ROOT_TOOLTIP);
- // Insert Variable... button
- insertVariableButton = SystemWidgetHelpers.createPushButton(comp, null, rb, ISystemConstants.RESID_UDA_INSERTVAR_BUTTON_ROOT);
- // SUBCLASS-SUPPLIED BUTTONS
- if (!createExtraButtons(comp, nbrColumns-1))
- addFillerLine(comp, nbrColumns-1);
- */
- //Label filler = SystemWidgetHelpers.createLabel(comp, "");
- //((GridData)filler.getLayoutData()).horizontalSpan = nbrColumns;
- // SEPARATOR BEFORE OPTIONS
- /*
- SystemWidgetHelpers.createLabel(comp, "");
- addSeparatorLine(comp, 1);
- SystemWidgetHelpers.createLabel(comp, "");
- */
- addFillerLine(comp, nbrColumns);
- // OPTION CHECKBOXES
- Composite options_composite = SystemWidgetHelpers.createTightComposite(comp, 3);
- ((GridData) options_composite.getLayoutData()).horizontalSpan = nbrColumns;
- // Prompt before
- promptCB = SystemWidgetHelpers.createCheckBox(options_composite, 1, null, SystemUDAResources.RESID_UDA_OPTION_PROMPT_LABEL, SystemUDAResources.RESID_UDA_OPTION_PROMPT_TOOLTIP);
- // Refresh after
- refreshCB = SystemWidgetHelpers.createCheckBox(options_composite, 1, null, SystemUDAResources.RESID_UDA_OPTION_REFRESH_LABEL, SystemUDAResources.RESID_UDA_OPTION_REFRESH_TOOLTIP);
- // Show action
- showCB = SystemWidgetHelpers.createCheckBox(options_composite, 1, null, SystemUDAResources.RESID_UDA_OPTION_SHOW_LABEL, SystemUDAResources.RESID_UDA_OPTION_SHOW_TOOLTIP);
- // Single selection only
- singleSelCB = SystemWidgetHelpers.createCheckBox(options_composite, 1, null, SystemUDAResources.RESID_UDA_OPTION_SINGLESEL_LABEL, SystemUDAResources.RESID_UDA_OPTION_SINGLESEL_TOOLTIP);
- // Collect names of selected object into delimited string
- collectCB = SystemWidgetHelpers.createCheckBox(options_composite, 1, null, getInvokeOnceLabel(), getInvokeOnceTooltip());
- // SUBCLASS-SUPPLIED OPTION CHECKBOXES
- Control[] extraOptions = createExtraOptionCheckBoxes(options_composite);
- // SEPARATOR BEFORE TYPES
- if (getUDActionSubsystem().supportsTypes()) {
- //SystemWidgetHelpers.createLabel(comp, "");
- //typesSeparator = addSeparatorLine(comp, 1);
- //SystemWidgetHelpers.createLabel(comp, "");
- addFillerLine(comp, nbrColumns);
- }
- //Label filler2 = SystemWidgetHelpers.createLabel(comp, "");
- //((GridData)filler2.getLayoutData()).horizontalSpan = nbrColumns;
- // TYPE SELECTION FORM
- if (udaActionSubsys != null)
- selectTypesForm = createSelectTypesForm(parentDialog.getShell(), subsystem, udaActionSubsys);
- else
- {
- // FIXME: Xuan - selectTypesForm = createSelectTypesForm(parentDialog.getShell(), profile);
- }
- if (selectTypesForm != null) {
- selectTypesForm.createContents(comp, nbrColumns);
- }
- // CONFIGURE THE WIDGETS...
- //resetButton = SystemWidgetHelpers.createPushButton(comp,this,rb,"com.ibm.etools.systems.core.ui.uda.ResetButton.");
- //((GridData)resetButton.getLayoutData()).horizontalAlignment = GridData.BEGINNING;
- textName.setTextLimit(ValidatorUserActionName.MAX_UDANAME_LENGTH);
- textComment.setTextLimit(ValidatorUserActionComment.MAX_UDACMT_LENGTH);
- //textName.setEditable(false);
- //textComment.setEditable(false);
- promptCB.addSelectionListener(this);
- refreshCB.addSelectionListener(this);
- showCB.addSelectionListener(this);
- singleSelCB.addSelectionListener(this);
- collectCB.addSelectionListener(this);
- if (extraOptions != null) for (int idx = 0; idx < extraOptions.length; idx++)
- if (extraOptions[idx] instanceof Button)
- ((Button) extraOptions[idx]).addSelectionListener(this);
- else if (extraOptions[idx] instanceof Combo)
- ((Combo) extraOptions[idx]).addSelectionListener(this);
- else if (extraOptions[idx] instanceof org.eclipse.swt.widgets.List) ((org.eclipse.swt.widgets.List) extraOptions[idx]).addSelectionListener(this);
- if (selectTypesForm != null) selectTypesForm.addSelectionListener(this);
- // ??? id ???
- // SystemWidgetHelpers.setHelp(comp, this, RSEUIPlugin.HELPPREFIX+"cprf0000");
- textName.addModifyListener(nameML);
- textName.addFocusListener(nameFL);
- textComment.addModifyListener(commentML);
- commandField.addModifyListener(this);
- return comp;
- }
-
- protected String getInvokeOnceLabel() {
- return SystemUDAResources.RESID_UDA_OPTION_COLLECT_LABEL;
- }
-
- protected String getInvokeOnceTooltip() {
- return SystemUDAResources.RESID_UDA_OPTION_COLLECT_TOOLTIP;
- }
-
- /**
- * Are errors pending? If so, don't allow user to change selection
- * or profile or anything!
- */
- public boolean areErrorsPending() {
- return ((errorMessage != null) && ((currentAction != null) || newMode));
- }
-
- /**
- * This is called when user changes their selection in the left-side tree view
- */
- public void selectionChanged(SelectionChangedEvent se) {
- if (recursiveCall) return; // ignore!
- IStructuredSelection ss = (IStructuredSelection) se.getSelection();
- Object so = ss.getFirstElement();
- if (areErrorsPending()) {
- if (newMode || SystemUDBaseManager.inCurrentTree(currentAction.getElement())) {
- if (!newMode && (so != currentAction))
- treeView.setSelection(new StructuredSelection(currentAction));
- else if (newMode && (so != newModeNewItem)) treeView.setSelection(new StructuredSelection(newModeNewItem));
- return;
- }
- }
- // We need to test for pending changes, and if any are pending, prompt
- // user to continue (and lose changes) or cancel...
- if ((stateMachine != null) && stateMachine.isSaveRequired()) {
- saveData();
- if (newMode) {
- // interesting problem! The save of the new data resulted in a new node,
- // but this is not visible in the tree view. To make it visible means we
- // we will lose focus, and this method will be recalled recursively...
- recursiveCall = true;
- treeView.refreshElementParent(currentAction); // show new item in tree view
- recursiveCall = false;
- if (so instanceof SystemUDActionElement) // if user was selecting an action, it might have a new binary address after the refresh
- treeView.selectElement((SystemUDActionElement) so);
- else if (so != null) treeView.setSelection(new StructuredSelection(so)); // restore what user selected
- return; // avoid recursion!
- }
- }
- recursiveCall = false;
- // Clear any page-valid errors remaining from previous selection
- // (Since validation on the new selection is only run if editing
- // changes are made
- errorMessage = null;
- resetPageValidation();
- newMode = ((so instanceof SystemUDTreeViewNewItem) && ((SystemUDTreeViewNewItem) so).isExecutable());
- if (newMode) newModeDomain = ((SystemUDTreeViewNewItem) so).getDomain();
- // Refresh tree view if name changed on last item
- if (nameChanged) {
- nameChanged = false;
- if (currentAction != null) treeView.refresh(currentAction);
- }
- SystemUDActionElement sn = null;
- //temp = null;
- if ((null != so) && (so instanceof SystemUDActionElement)) sn = (SystemUDActionElement) so;
- currentAction = sn;
- setIgnoreChanges(true);
- boolean changeMode = false;
- // entering un-selected mode? we turn invisible for this...
- if (!newMode && ((null == sn) || sn.isDomain())) {
- isEnabled = false;
- textName.setText(""); //$NON-NLS-1$
- textComment.setText(""); //$NON-NLS-1$
- setCommandText(""); //$NON-NLS-1$
- enableExtraButtons(false);
- }
- // entering new or selected mode? we turn visible for this...
- else if (newMode) {
- isEnabled = true;
- SystemCmdSubstVarList varList = null;
- /*
- if (!newMode) // existing action selected
- {
- textName.setText(sn.toString());
- textComment.setText(sn.getComment());
- setCommandText(sn.getCommand());
-
- promptCB.setSelection(sn.getPrompt());
- refreshCB.setSelection(sn.getRefresh());
- showCB.setSelection(sn.getShow());
- singleSelCB.setSelection(sn.getSingleSelection());
- collectCB.setSelection( sn.getCollect());
- //if (singleSelCB.getSelection())
- collectCB.setEnabled(!singleSelCB.getSelection());
- resetExtraOptions(sn);
-
- varList = getActionSubstVarList(sn.getDomain());
- //setEditable(!parentDialog.isSelectionVendorSupplied(), parentDialog.getVendorOfSelection()); todo
- }
- else // new mode
- {*/
- textName.setText(""); //$NON-NLS-1$
- textComment.setText(""); //$NON-NLS-1$
- setCommandText(""); //$NON-NLS-1$
- promptCB.setSelection(false);
- refreshCB.setSelection(false);
- showCB.setSelection(true);
- singleSelCB.setSelection(false);
- collectCB.setSelection(false);
- resetExtraOptionsForNewMode();
- if (so != null) {
- varList = getActionSubstVarList(((SystemUDTreeViewNewItem) so).getDomain());
- }
- /*}*/
- // update the substitution variable list
- //sourceViewerConfiguration.setSubstVarList(varList);
- commandField.setSubstitutionVariableList(varList);
- //varList.printDisplayStrings(); // temp. todo - remove
- enableExtraButtons(true);
- }
- // existing action
- else {
- isEnabled = true;
- changeMode = true;
- setAction(sn);
- }
- setIgnoreChanges(false); // re-enable modify listeners
- if (newMode) {
- //System.out.println("entering New mode");
- stateMachine.setNewMode(); // resets Apply/Reset button status
- newModeNewItem = (SystemUDTreeViewNewItem) so;
- //System.out.println("newModeDomain = " + newModeDomain);
- } else if ((sn == null) || sn.isDomain()) {
- //System.out.println("entering Unset mode");
- stateMachine.setUnsetMode(); // resets Apply/Reset button status
- } else {
- //System.out.println("entering Edit mode");
- stateMachine.setEditMode(); // resets Apply/Reset button status }
- }
- if (isEnabled && (typesSeparator != null)) {
- int domain = getDomain();
- if (domain == -1)
- typesSeparator.setVisible(getUDActionSubsystem().supportsTypes());
- else
- typesSeparator.setVisible(getUDActionSubsystem().supportsTypes(domain));
- }
- if (!changeMode && (selectTypesForm != null)) // already done for change mode
- reConfigureSelectTypesForm(selectTypesForm);
- if (isEnabled && newMode) // we have already done it for new mode
- {
- if (grabFocus) {
- textName.setFocus();
- }
- //if (!wasEnabled)
- if (nameValidator instanceof ISystemValidatorUniqueString) {
- ((ISystemValidatorUniqueString) nameValidator).setExistingNamesList(getExistingActionNames());
- /*
- System.out.println("...got existing names: ");
- Vector v = getExistingActionNames();
- for (int idx=0; idx<v.size(); idx++)
- System.out.print(v.elementAt(idx) + ", ");
- System.out.println();
- */
- }
- }
- setPageComplete();
- }
-
- /**
- * This is called when to set the input to an existing action
- */
- public void setAction(SystemUDActionElement action) {
- currentAction = action;
- boolean currentIgnoreState = ignoreChanges;
- setIgnoreChanges(true);
- textName.setText(action.toString());
- textComment.setText(action.getComment());
- setCommandText(action.getCommand());
- promptCB.setSelection(action.getPrompt());
- refreshCB.setSelection(action.getRefresh());
- showCB.setSelection(action.getShow());
- singleSelCB.setSelection(action.getSingleSelection());
- collectCB.setSelection(action.getCollect());
- //if (singleSelCB.getSelection())
- collectCB.setEnabled(!singleSelCB.getSelection());
- resetExtraOptions(action);
- // update the substitution variable list
- commandField.setSubstitutionVariableList(getActionSubstVarList(action.getDomain()));
- setIgnoreChanges(currentIgnoreState); // re-enable modify listeners
- if (selectTypesForm != null) reConfigureSelectTypesForm(selectTypesForm);
- if (grabFocus) textName.setFocus();
- if (nameValidator instanceof ISystemValidatorUniqueString) ((ISystemValidatorUniqueString) nameValidator).setExistingNamesList(getExistingActionNames());
- enableExtraButtons(true);
- }
-
- /*
- * Mouse and key listeners for mouse and key events in the tree. Used
- * to determine focus for accessibility.
- */
- /*
- * Process the mouse down event.
- */
- public void mouseDown(MouseEvent e) {
- grabFocus = true;
- }
-
- /*
- * Process the mouse up event.
- */
- public void mouseUp(MouseEvent e) {
- grabFocus = true;
- }
-
- /*
- * Process the mouse double-click event.
- */
- public void mouseDoubleClick(MouseEvent e) {
- grabFocus = true;
- }
-
- /*
- * Process the key pressed event.
- */
- public void keyPressed(KeyEvent e) {
- grabFocus = false;
- }
-
- /*
- * Process the key released event.
- */
- public void keyReleased(KeyEvent e) {
- grabFocus = false;
- }
-
- /**
- * Return the current domain of the selected node or New item
- */
- protected int getDomain() {
- if (newMode)
- return newModeDomain;
- else if (currentAction != null)
- return currentAction.getDomain();
- else
- return -1;
- }
-
- /**
- * Revert button pressed
- */
- public void revertPressed() {
- if ((currentAction != null) && !currentAction.isDomain()) {
- textName.setText(currentAction.toString());
- setCommandText(currentAction.getCommand());
- textComment.setText(currentAction.getComment());
- promptCB.setSelection(currentAction.getPrompt());
- refreshCB.setSelection(currentAction.getRefresh());
- showCB.setSelection(currentAction.getShow());
- singleSelCB.setSelection(currentAction.getSingleSelection());
- collectCB.setSelection(currentAction.getCollect());
- collectCB.setEnabled(!singleSelCB.getSelection());
- resetExtraOptions(currentAction);
- if (selectTypesForm != null) selectTypesForm.setTypes(currentAction.getFileTypes());
- if (stateMachine != null) stateMachine.resetPressed();
- } else if (newMode) {
- resetPageValidation();
- setIgnoreChanges(true); // disable modify listeners
- textName.setText(""); //$NON-NLS-1$
- setCommandText(""); //$NON-NLS-1$
- textComment.setText(""); //$NON-NLS-1$
- promptCB.setSelection(false);
- refreshCB.setSelection(false);
- showCB.setSelection(true);
- singleSelCB.setSelection(false);
- collectCB.setSelection(false);
- collectCB.setEnabled(true);
- resetExtraOptionsForNewMode();
- if (selectTypesForm != null) selectTypesForm.resetTypes();
- setIgnoreChanges(false); // re-enable modify listeners
- if (stateMachine != null) stateMachine.resetPressed();
- }
- resetPageValidation(); // defect 45772
- //setPageComplete();
- }
-
- /**
- * Process the apply button
- */
- public void applyPressed() {
- if ((newMode || ((currentAction != null) && !currentAction.isDomain())) && validateInput(true, null)) {
- saveData();
- if (stateMachine != null) stateMachine.applyPressed();
- if (newMode) {
- // Now update tree view to show new item
- recursiveCall = true;
- treeView.refreshElementParent(currentAction);
- recursiveCall = false;
- treeView.selectElement(currentAction);
- } else
- treeView.refresh(currentAction);
- }
- setPageComplete();
- } //apply
-
- // ------------------------------
- // OVERRIDABLE METHODS
- // ------------------------------
- /**
- * Overridable entry point for subclasses that wish to put something to the right of the "Command:" label
- * From interface ISystemCommandTextAdditionalGUIProvider.
- * @return true if something entered to take up the available columns, false otherwise (will be padded)
- */
- public boolean createCommandLabelLineControls(Composite parent, int availableColumns) {
- return false;
- }
-
- /**
- * Create additional buttons, to go under command prompt.
- * Overridable.
- * From interface ISystemCommandTextAdditionalGUIProvider.
- * @return true if something entered to take up the available columns, false otherwise (will be padded)
- */
- public boolean createExtraButtons(Composite parent, int availableColumns) {
- return false;
- }
-
- /**
- * Create the select-types form.
- * Override if you want to change the mri, but first call super.createSelectTypeForm()!
- * Or override and return null to not prompt user for file types in your edit pane.
- * @return the created form, or null if you don't wish to include the GUI for selecting types
- */
- protected SystemUDSelectTypesForm createSelectTypesForm(Shell shell, ISubSystem subsystem, SystemUDActionSubsystem udaActionSubsys) {
-
- if (udaActionSubsys.supportsTypes())
- {
- return new SystemUDSelectTypesForm(shell, subsystem, udaActionSubsys.getUDTypeManager());
- }
- return null;
- }
-
- /**
- * Re-configure the type-selection form when the state changes.
- * Important to set the input type lists (master and current selection)
- * Overridable, but you MUST call super.xxx first!
- */
- protected void reConfigureSelectTypesForm(SystemUDSelectTypesForm form) {
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDTypeManager udtm = udas.getUDTypeManager();
- // Populate the listboxes
- if (currentAction != null) {
- //String domainName = udas.getDomainName(currentAction);
- int domainType = currentAction.getDomain();
- if ((domainType != -1) && !udas.supportsTypes(domainType))
- form.setVisible(false);
- else {
- form.setVisible(true);
- form.setMasterTypes(udtm.getTypeNames(currentAction.getDomain()));
- form.setTypes(currentAction.getFileTypes());
- form.setDomain(domainType);
- }
- } else if (newMode) {
- //form.reset();
- if ((newModeDomain != -1) && !udas.supportsTypes(newModeDomain)) {
- form.setVisible(false);
- } else {
- form.setVisible(true);
- form.setMasterTypes(udtm.getTypeNames(newModeDomain));
- form.resetTypes();
- form.setDomain(newModeDomain);
- }
- } else
- form.reset();
- }
-
- /**
- * Return the list of substitutation variables for the given domain type
- */
- protected SystemCmdSubstVarList getActionSubstVarList(int actionDomainType) {
- SystemCmdSubstVarList varList = getUDActionSubsystem().getActionSubstVarList(actionDomainType);
- //varList.printDisplayStrings();
- return varList;
- }
-
- /**
- * Create additional option checkboxes, to go under default options.
- * Overridable.
- * @param parent - the options composite to place checkboxes in
- * @return An array of the widgets created
- */
- protected Control[] createExtraOptionCheckBoxes(Composite parent) {
- return null;
- }
-
- /**
- * Enable/disable extra buttons added by subclass.
- * Called when state changes
- * Overridable
- */
- protected void enableExtraButtons(boolean b) {
- }
-
- /**
- * Overridable method for saving data in subclass-supplied additional options
- */
- protected void processExtraOptionsChanges(SystemUDActionElement currentAction) {
- }
-
- /**
- * Overridable method for resetting options in subclass-supplied additional options,
- * when in "edit" mode
- */
- protected void resetExtraOptions(SystemUDActionElement originalAction) {
- }
-
- /**
- * Overridable method for resetting options in subclass-supplied additional options,
- * when in "new" mode
- */
- protected void resetExtraOptionsForNewMode() {
- }
-
- // ------------------------------
- // INTERNAL LISTENER METHODS...
- // ------------------------------
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event arg0) {
- }
-
- /**
- * SelectionListener Interface:
- * For the checkboxes
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- /**
- * SelectionListener Interface:
- * For the checkboxes
- */
- public void widgetSelected(SelectionEvent e) {
- if (!newMode && (currentAction == null)) return;
- Object source = e.getSource();
- if (source == singleSelCB) {
- if (singleSelCB.getSelection()) {
- collectCB.setSelection(false);
- collectCB.setEnabled(false);
- } else
- collectCB.setEnabled(true);
- }
- if ((source instanceof Button) || (source instanceof Combo)) {
- //errorMessage = null;
- //parentDialog.clearErrorMessage();
- validateInput(false, null);
- }
- setChangesMade();
- setPageComplete();
- }
-
- /**
- * Scenario: User edits an item, producing a syntax error.
- * (eg. clear action name field) Gets error msg, OK button disabled.
- * then changes selection to another item.
- * Current Problem: Error msg stays, OK remains disabled, until
- * they edit a field. (ValidateInput isnt re-reun until
- * another field is changed.)
- * Solution: When changing selection, reset the errorMessage and
- * page-valid status, since we are not saving invalid field changes .
- * Need to add/remove listeners around selection changes, so
- * I can set text fields without triggering modify event.
- * So listeners implemented as internal classes
- */
- private class NameModifyListener implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (ignoreChanges) return;
- setChangesMade();
- errorMessage = validateName(textName.getText().trim());
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- setPageComplete();
- } else {
- validateInput(false, textName);
- nameChanged = true;
- }
- }
- } //class
-
- /**
- * Focus listener for name field
- */
- private class NameFocusListener implements FocusListener {
- public void focusLost(FocusEvent event) {
- if (ignoreChanges) return;
- String name = textName.getText().trim().toLowerCase();
- if (name.startsWith(testActionName) && (textComment.getText().trim().length() == 0) && (getCommandText().length() == 0)) {
- textComment.setText(getUDActionSubsystem().getTestFilePath());
- setCommandText(getUDActionSubsystem().getTestFileName());
- }
- }
-
- public void focusGained(FocusEvent event) {
- }
- }
-
- /**
- * Modify listener for comment field
- */
- private class CommentModifyListener implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (ignoreChanges) return;
- setChangesMade();
- errorMessage = validateComment(textComment.getText().trim());
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- setPageComplete();
- } else
- validateInput(false, textComment);
- }
- } //class
-
- /**
- * From ISystemUDSelectTypeListener interface, called from
- * SystemUDSelectTypesFrom widget.
- * <p>
- * The user has added or removed a type.
- * Call getTypes() on given form to get the new list.
- */
- public void selectedTypeListChanged(SystemUDSelectTypesForm form) {
- setChangesMade();
- setPageComplete();
- validateInput(false, null);
- }
-
- /**
- * From ISystemUDSelectTypeListener interface, called from
- * SystemUDSelectTypesFrom widget.
- * <p>
- * The user has edited the master list of types. It needs to be refreshed.
- * We must call setMasterTypes() to update the form's master type list
- */
- public void masterTypeListChanged(SystemUDSelectTypesForm form) {
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDTypeManager udtm = udas.getUDTypeManager();
- // Re-populate the master listbox
- if (currentAction != null) {
- form.setMasterTypes(udtm.getTypeNames(currentAction.getDomain()));
- } else if (newMode) {
- form.setMasterTypes(udtm.getTypeNames(newModeDomain));
- }
- }
-
- // ------------------------------
- // INTERNAL VALIDATION METHODS...
- // ------------------------------
- /**
- * Scenario: User edits an item, producing a syntax error.
- * (eg. clear action name field) Gets error msg, OK button disabled.
- * then changes selection to another item.
- * Current Problem: Error msg stays, OK remains disabled, until
- * they edit a field. (ValidateInput isnt re-reun until
- * another field is changed.)
- * <p>
- * Solution: When changing selection, reset the errorMessage and
- * page-valid status. Can get away with this because we
- * do not propagate invalid field changes to the UDA data in memory.
- */
- private void resetPageValidation() {
- // setMessage( null);
- errorMessage = null;
- parentDialog.clearErrorMessage();
- parentDialog.setPageComplete(true);
- }
-
- /**
- * Check all input for errors.
- * Subclasses should not override. Rather, they should override
- * doAdditionalValidation(boolean) which this method calls.
- * @param setFocus - true if to set focus on offending control
- * @param skipControl - control to skip since already checked
- * @return true if no errors
- */
- protected final boolean validateInput(boolean setFocus, Control skipControl) {
- Control errCtl = null;
- errorMessage = null;
- if (skipControl != textName) errorMessage = validateName(textName.getText().trim());
- errCtl = textName;
- if ((errorMessage == null) && (skipControl != textComment)) {
- errorMessage = validateComment(textComment.getText().trim());
- errCtl = textComment;
- }
- if ((errorMessage == null) && (skipControl != getCommandWidget())) {
- errorMessage = validateCommand();
- errCtl = getCommandWidget();
- }
- if (errorMessage == null) errorMessage = doAdditionalValidation(setFocus); // let child classes try
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- if (setFocus) errCtl.setFocus();
- } else
- parentDialog.clearErrorMessage();
- setPageComplete();
- return (errorMessage == null);
- }
-
- /**
- * Overridable extension point for subclasses to do validation of options and
- * such when Apply is pressed. If you do report an error, consider setting the
- * focus to the appropriate widget, if setFocus is set.
- * @return error message if an error detected, else null
- */
- protected SystemMessage doAdditionalValidation(boolean doSetFocus) {
- return null;
- }
-
- /**
- * Validate name input
- */
- protected SystemMessage validateName(String input) {
- return nameValidator.validate(input);
- }
-
- /**
- * Validate comment input
- */
- protected SystemMessage validateComment(String input) {
- return cmtValidator.validate(input);
- }
-
- /**
- * Validate command input
- */
- protected SystemMessage validateCommand() {
- return commandField.validateCommand();
- }
-
- // -------------------------------------------
- // METHODS FOR USE BY US AND OUR CHILD CLASSES
- // -------------------------------------------
- /**
- * Return the control widget for the command prompt
- */
- protected Control getCommandWidget() {
- return commandField.getCommandWidget();
- }
-
- /**
- * Set the text contents of the command widget
- */
- protected void setCommandText(String text) {
- commandField.setCommandText(text);
- }
-
- /**
- * Enable/disable command widget
- */
- protected void enableCommandWidget(boolean enable) {
- commandField.enableCommandWidget(enable);
- }
-
- /**
- * Get the contents of the command field
- */
- protected String getCommandText() {
- return commandField.getCommandText();
- }
-
- /**
- * Turn on or off event ignoring flag
- */
- protected void setIgnoreChanges(boolean ignore) {
- ignoreChanges = ignore;
- commandField.setIgnoreChanges(ignore);
- }
-
- // ------------------------------
- // INTERNAL METHODS...
- // ------------------------------
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by setPageComplete
- */
- protected boolean isPageComplete() {
- return ((errorMessage == null) && (textName.getText().trim().length() > 0) && (getCommandText().length() > 0));
- }
-
- /**
- * Set page complete... enables/disables Apply button
- */
- protected void setPageComplete() {
- boolean complete = isPageComplete();
- parentDialog.setPageComplete(complete);
- }
-
- /**
- * When user presses Apply, commit all pending changes...
- */
- protected void processChanges() {
- currentAction.setComment(textComment.getText().trim());
- currentAction.setName(textName.getText().trim());
- String cmd = commandField.getMassagedCommandText();
- if (commandField.getCommandMassager() != null) {
- if (!newMode) {
- setIgnoreChanges(true); // disable modify listeners
- setCommandText(cmd);
- setIgnoreChanges(false); // re-enable modify listeners
- }
- }
- currentAction.setCommand(cmd);
- currentAction.setPrompt(promptCB.getSelection());
- currentAction.setRefresh(refreshCB.getSelection());
- currentAction.setShow(showCB.getSelection());
- currentAction.setSingleSelection(singleSelCB.getSelection());
- currentAction.setCollect(collectCB.getSelection());
- processExtraOptionsChanges(currentAction);
- if (selectTypesForm != null) currentAction.setFileTypes(selectTypesForm.getTypes());
- } //process changes
-
- /**
- * Save current state to disk
- */
- protected void saveData() {
- if (newMode) {
- currentAction = createNewAction(textName.getText().trim(), newModeDomain);
- }
- processChanges();
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDActionManager udam = udas.getUDActionManager();
- ISystemProfile currentProfile = udam.getCurrentProfile();
- if (currentProfile == null) // shouldn't!
- currentProfile = profile;
- //subsystem.getUDActionSubsystem().getUDActionManager().saveUserData();
- udam.saveUserData(currentProfile);
- // inform anybody registered as listeners that we have created/changed model object...
- if (newMode)
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION, currentAction, null);
- else
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION, currentAction, null);
- }
-
- /**
- * Call this whenever the user makes ANY changes.
- * Used to enable/disable apply/revert buttons
- */
- protected void setChangesMade() {
- if (stateMachine != null) stateMachine.setChangesMade();
- }
-
- /**
- * In "new" mode, create a new action when Apply is pressed.
- * This only creates the action. It does not populate the attributes
- * @return The new action
- */
- protected SystemUDActionElement createNewAction(String actionName, int domain) {
- // code was originally in SystemNewUDAsWizardMainPage
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDActionManager udam = udas.getUDActionManager();
- ISystemProfile currentProfile = udam.getCurrentProfile();
- if (currentProfile == null) // shouldn't!
- currentProfile = profile;
- SystemUDActionElement na = udam.addAction(currentProfile, actionName, domain);
- // ??? handle failure ??? check for ???
- if (null != na) {
- // Set default types to ALL, if ALL is not a type we create it with types string *
- if (domain != SystemUDActionSubsystem.DOMAIN_NONE) {
- SystemUDTypeManager typeManager = getUDActionSubsystem().getUDTypeManager();
- if (typeManager.findChildByName(currentProfile, SystemUDTypeManager.ALL_TYPE, domain) == null) {
- SystemUDTypeElement nt = typeManager.addType(domain, SystemUDTypeManager.ALL_TYPE);
- nt.setTypes("*"); //$NON-NLS-1$
- typeManager.saveUserData(currentProfile);
- }
- // Add the ALL type to the action
- String[] types = new String[1];
- types[0] = SystemUDTypeManager.ALL_TYPE;
- na.setFileTypes(types);
- }
- // Now update tree view to show new item, and set selection to it.
- //SystemUDActionElement parentEl = (SystemUDActionElement) udas.getUDActionManager().getParent(na);
- //treeView.internalRefresh(parentEl);
- }
- return na;
- }
-
- /**
- * For uniqueness checking, get the list of existing action names
- */
- protected Vector getExistingActionNames() {
- if (newMode) {
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDActionManager udam = udas.getUDActionManager();
- ISystemProfile currentProfile = udam.getCurrentProfile();
- if (currentProfile == null) // shouldn't!
- currentProfile = profile;
- //System.out.println("Asking for existing names for newModeDomain " + newModeDomain);
- return udam.getExistingNames(currentProfile, newModeDomain);
- } else if (currentAction != null)
- return currentAction.getExistingNames();
- else
- return EMPTY_VECTOR;
- }
-
- /**
- * 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) {
- this.errorMessage = errorMessage;
- setChangesMade();
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- setPageComplete();
- } else
- validateInput(false, getCommandWidget());
- processCommandTextChange(cmdText, (errorMessage != null));
- }
-
- /**
- * Method called as user types into the command field
- * Encapsulated out so that it can be called from various types of listeners.
- * Further, it is easily overridden
- */
- protected void processCommandTextChange(String newText, boolean hasError) {
- }
-
- // -----------------------------
- // 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionElement.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionElement.java
deleted file mode 100644
index 781888a7a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionElement.java
+++ /dev/null
@@ -1,303 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import java.util.StringTokenizer;
-
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.UserActionsIcon;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Represents a single user defined action, as an adaptable
- * eclipse-friendly object
- */
-public class SystemUDActionElement extends SystemXMLElementWrapper {
- private final static String ACTION_TAG = "Action"; //$NON-NLS-1$
- private final static String COMMENT_TAG = "Comment"; //$NON-NLS-1$
- private final static String COMMAND_TAG = "Command"; //$NON-NLS-1$
- private final static String FILETYPES_TAG = "FileTypes"; //$NON-NLS-1$
- private final static String PROMPT_ATTR = "Prompt"; //$NON-NLS-1$
- private final static String REFRESH_ATTR = "Refresh"; //$NON-NLS-1$
- private final static String COLLECT_ATTR = "Collect"; //$NON-NLS-1$
- private final static String SINGLESEL_ATTR = "SingleSelection"; //$NON-NLS-1$
- private final static String SHOW_ATTR = "Enable"; //$NON-NLS-1$
- //for reseting
- private String initCommand;
- private Object data;
-
- /**
- * Constructor
- * @param e - The actual xml document element for this action
- * @param am - The subsystemFactory-specific manager of actions
- * @param profile - The system profile which owns this action
- * @param domainType - The integer representation of the domain this is in (or this is, for a domain element)
- */
- public SystemUDActionElement(IPropertySet e, SystemUDActionManager am, ISystemProfile profile, int domainType) {
- super(e, am, profile, domainType);
- }
-
- /**
- * Return the value of this node's "Name" attribute, but with "..." appended if
- * the action is a prompting action. This is used for popup menu labels.
- */
- public String getLabel() {
- String name = getName();
- if (getPrompt()) name = name + "..."; //$NON-NLS-1$
- return name;
- }
-
- /**
- * Return image to use for this item, in tree views
- */
- public Image getImage() {
- if (isIBM()) {
- if (isUserChanged())
- return UserActionsIcon.USERACTION_IBMUSR.getImage();
- else
- return UserActionsIcon.USERACTION_IBM.getImage();
- } else
- return UserActionsIcon.USERACTION_USR.getImage();
- }
-
- /**
- * Return our tag name
- */
- public String getTagName() {
- return ACTION_TAG;
- }
-
- /**
- * Return value of the "Comment" sub-tag
- */
-
- public String getComment() {
- //Get the property for this
- IProperty commentProperty = elm.getProperty(COMMENT_TAG);
- if (commentProperty != null)
- {
- return commentProperty.getValue();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return value of the "Command" sub-tag, which is the current command value
- */
- public String getCommand() {
- //Get the property for this
- IProperty commentProperty = elm.getProperty(COMMAND_TAG);
- if (commentProperty != null)
- {
- return commentProperty.getValue();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Return value of the "Prompt" attribute
- */
- public boolean getPrompt() {
- return getBooleanAttribute(PROMPT_ATTR, false);
- }
-
- /**
- * Return value of the "Refresh" attribute
- */
- public boolean getRefresh() {
- return getBooleanAttribute(REFRESH_ATTR, false);
- }
-
- /**
- * Return value of the "Show" attribute
- */
- public boolean getShow() {
- return getBooleanAttribute(SHOW_ATTR, true);
- }
-
- /**
- * Return value of the "Collect" attribute
- */
- public boolean getCollect() {
- return getBooleanAttribute(COLLECT_ATTR, false);
- }
-
- /**
- * Return value of the "Single Selection" attribute
- */
- public boolean getSingleSelection() {
- return getBooleanAttribute(SINGLESEL_ATTR, false);
- }
-
- /**
- * Return value of the "FileTypes" sub-tag
- */
- public String[] getFileTypes() {
- //Get the property for this
- IProperty fileTypeProperty = elm.getProperty(FILETYPES_TAG);
- if (fileTypeProperty != null)
- {
- String fts = fileTypeProperty.getValue();
- // returns an empty string if no attribute
- StringTokenizer st = new StringTokenizer(fts);
- int n = st.countTokens();
- String sa[] = new String[n];
- for (int i = 0; i < n; i++) {
- sa[i] = st.nextToken();
- }
- return sa;
- }
-
- return new String[0];
- }
-
- /**
- * Set the value of the "Comment" sub-tag
- */
- public void setComment(String s) {
- IProperty commentProperty = elm.getProperty(COMMENT_TAG);
- if (null != commentProperty)
- {
- commentProperty.setValue(s);
- }
- else
- {
- elm.addProperty(COMMENT_TAG, s);
- }
-
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "Command" sub-tag.
- */
- public void setCommand(String s) {
- IProperty commandProperty = elm.getProperty(COMMAND_TAG);
- if (null != commandProperty)
- {
- commandProperty.setValue(s);
- }
- else
- {
- elm.addProperty(COMMAND_TAG, s);
- }
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "Prompt" attribute
- */
- public void setPrompt(boolean b) {
- setBooleanAttribute(PROMPT_ATTR, b);
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "Refresh" attribute
- */
- public void setRefresh(boolean b) {
- setBooleanAttribute(REFRESH_ATTR, b);
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "Show" attribute
- */
- public void setShow(boolean b) {
- setBooleanAttribute(SHOW_ATTR, b);
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "Collect" attribute
- */
- public void setCollect(boolean b) {
- setBooleanAttribute(COLLECT_ATTR, b);
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "Single Selection Only" attribute
- */
- public void setSingleSelection(boolean b) {
- setBooleanAttribute(SINGLESEL_ATTR, b);
- setUserChanged(true);
- }
-
- /**
- * Set the value of the "FileTypes" sub-tag
- */
- public void setFileTypes(String sa[]) {
- String s = ""; //$NON-NLS-1$
- for (int i = 0; i < sa.length; i++) {
- s = s + " " + sa[i]; //$NON-NLS-1$
- }
-
- IProperty fileTypeProperty = elm.getProperty(FILETYPES_TAG);
- if (null != fileTypeProperty)
- {
- fileTypeProperty.setValue(s);
- }
- else
- {
- elm.addProperty(FILETYPES_TAG, s);
- }
-
- setUserChanged(true);
- }
-
- // ***************************************
- // Determing file type matches
- // ***************************************
- /**
- * Is this action's file types a generic value
- */
- public boolean isGeneric() {
- // ?? may not be optimal
- String fts[] = getFileTypes();
- if (0 == fts.length) return true;
- for (int i = 0; i < fts.length; i++) {
- if ("*".equals(fts[i])) //$NON-NLS-1$
- return true;
- }
- return true;
- }
-
- /**
- * Set the initial command value
- */
- public void setInitCommand(String s) {
- this.initCommand = s;
- }
-
- /**
- * Get the initial command value
- */
- public String getInitCommand() {
- return this.initCommand;
- }
-
- /**
- * Set data. Useful when used in context like trees.
- */
- public void setData(Object data) {
- this.data = data;
- }
-
- /**
- * Return data as set by setData
- */
- public Object getData() {
- return data;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java
deleted file mode 100644
index 885da96e4..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.UserActionsIcon;
-import org.eclipse.rse.internal.useractions.UserActionsPersistenceUtil;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Instances of this class hold the UDA definitions unique to:
- * <ol>
- * <li>The SystemProfile - according to the subsystem
- * <li>The SubSystem type - according to the subclassed SystemUDActionSubsystem
- * </ol>
- * Instances of this class will be linked to a SubSystem instance
- *
- *
- * Eventually, would hope to create a factory method for this class which will
- * return existing instances common to the subsystems of different connections
- * within the same profile.
- */
-public class SystemUDActionManager extends SystemUDBaseManager
-// implements ErrorHandler,
- implements ITreeContentProvider {
- private static final String XE_ROOT = ISystemUDAConstants.ACTIONS_ROOT;
- private static final String XE_ACTION = "Action"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemUDActionManager(SystemUDActionSubsystem udas) {
- super(udas);
- }
-
- /**
- * Return true if this is user actions, false if this is named types.
- */
- protected boolean isUserActionsManager() {
- return true;
- }
-
- /**
- * Get the icon to show in the tree views, for the "new" expandable item
- */
- public Image getNewImage() {
- return UserActionsIcon.USERACTION_NEW.getImage();
- }
-
- /**
- * Parent method override for returning the "New" icon label for the Work With dialog tree view.
- * For us, we defer to the getActionSubSystem().{@link SystemUDActionSubsystem#getNewNodeActionLabel() getNewNodeActionLabel()}.
- * Do not override this.
- * @return translated value for "New" in new icon for WW action and type dialogs. Default is "New"
- */
- protected String getNewNodeLabel() {
- return getActionSubSystem().getNewNodeActionLabel();
- }
-
- /**
- * Overridable method for child classes to do migration of their document.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done
- */
- protected boolean doMigration(ISystemProfile profile, String oldRelease) {
- return getActionSubSystem().doActionsMigration(profile, oldRelease);
- }
-
- /**
- * Get the document root tag name.
- * We return "Actions"
- */
- public String getDocumentRootTagName() {
- return XE_ROOT; // "Actions"
- }
-
- /**
- * Do we uppercase the value of the "Name" attribute?
- * No, we don't for actions.
- */
- protected boolean uppercaseName() {
- return false;
- }
-
- /**
- * Return true if the elements managed by this class are scoped by
- * profile. Usually true for actions, false for types
- */
- public boolean supportsProfiles() {
- return true;
- }
-
- /**
- * Prime the given document with any default actions/types
- * Should be overridden!
- */
- public SystemXMLElementWrapper[] primeDocument(ISystemProfile profile) {
- if (profile.isDefaultPrivate()) // we only prime the user's private profile with default actions
- return getActionSubSystem().primeDefaultActions(this, profile);
- else
- return null;
- }
-
- /**
- * Get the folder containing the xml file used to persist the actions,
- * for the given profile
- */
- protected IFolder getDocumentFolder(ISubSystemConfiguration subsystemFactory, ISystemProfile profile) {
- return UserActionsPersistenceUtil.getUserActionsFolder(profile.getName(), subsystemFactory);
- }
-
- /**
- * Intended for IMPORT actions only, where no Subsystem instance available:
- */
- public void setFolder(String profileName, String factoryId) {
- importCaseFolder = UserActionsPersistenceUtil.getUserActionsFolder(profileName, factoryId);
- }
-
- /**
- * Add a user-defined action
- */
- public SystemUDActionElement addAction(ISystemProfile profile, String name, int domain) {
- return (SystemUDActionElement) super.addElement(profile, domain, name);
- }
-
- /**
- * Return xml element wrapper objects for all actions, for the
- * given domain, or for the whole document if domain is -1 (iff
- * domains not supported).
- * @param v - existing vector to populate. If null passed, it is
- * not populated.
- * @param profile - the profile to limit the search to
- * @param domain - the integer representation of the given domain,
- * or -1 iff supportsDomains() is false
- * @return array of action objects
- */
- public SystemUDActionElement[] getActions(Vector v, ISystemProfile profile, int domain) {
- v = super.getXMLWrappers(v, domain, profile);
- if (v == null) return new SystemUDActionElement[0];
- SystemUDActionElement[] actions = new SystemUDActionElement[v.size()];
- for (int idx = 0; idx < actions.length; idx++)
- actions[idx] = (SystemUDActionElement) v.elementAt(idx);
- return actions;
- }
-
- /**
- * Return all the actions for the given profile, in all domains.
- * @param v - existing vector to populate. If null passed, it is not populated.
- * @param profile - the profile to limit the search to
- * @return array of action objects
- */
- public SystemUDActionElement[] getAllActions(Vector v, ISystemProfile profile) {
- if (!getActionSubSystem().supportsDomains()) return getActions(v, profile, -1);
- if (v == null) v = new Vector();
- int nbrDomains = getActionSubSystem().getMaximumDomain() + 1;
- for (int domain = 0; domain < nbrDomains; domain++) {
- super.getXMLWrappers(v, domain, profile);
- }
- SystemUDActionElement[] actions = new SystemUDActionElement[v.size()];
- for (int idx = 0; idx < actions.length; idx++)
- actions[idx] = (SystemUDActionElement) v.elementAt(idx);
- return actions;
- }
-
- // -----------------------------------------------------------
- // ISystemXMLElementWrapperFactory
- // -----------------------------------------------------------
- /**
- * Return the tag name for our managed elements.
- * Eg: will be "Action" for user actions, and "Type" for file types.
- */
- public String getTagName() {
- return XE_ACTION;
- }
-
- /**
- * Given an xml element node, create an instance of the appropriate
- * subclass of SystemXMLElementWrapper to represent it.
- */
- public SystemXMLElementWrapper createElementWrapper(IPropertySet xmlElementToWrap, ISystemProfile profile, int domain) {
- SystemUDActionElement elementWrapper = new SystemUDActionElement(xmlElementToWrap, this, profile, domain);
- return elementWrapper;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java
deleted file mode 100644
index 6778835fc..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionSubsystem.java
+++ /dev/null
@@ -1,1158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
- * Kevin Doyle (IBM) - [241015] Add getActionSubstVarList(SystemUDActionElement)
- * Kevin Doyle (IBM) - [241866] Refresh After doesn't work for User Actions
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.PrintWriter;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.internal.useractions.UserActionsIcon;
-import org.eclipse.rse.internal.useractions.ui.ISystemSubstitutor;
-import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-/**
- * Provide the interface to customize and implement the user-defined actions support
- * for the subsystems which implement it. Subsystems are expected to override
- * these methods as required.
- * <p>
- * For some subsystem factories, actions and types can be partitioned/scoped by
- * "domain". Eg, for iSeries actions are scoped by object and member, and each
- * has unique lists of actions and types.
- * This base class offers all the support for supporting domains, but it is triggered
- * by the method supportsDomains() which is overridden by child classes appropriately.
- * <p>
- * Some subsystems will support named types by which actions can be scoped. This
- * support is triggered by supportsTypes(), which returns true by default but can
- * be overridden by childclasses.
- */
-public abstract class SystemUDActionSubsystem implements ISystemSubstitutor {
- public final static int DOMAIN_NONE = -1;
- protected ISubSystem _subsystem; // May be null for an import action
- protected ISubSystemConfiguration subsystemFactory; // for use in Team view where we show user actions per SSF.
- protected SystemUDActionManager udActionManager;
- protected SystemUDTypeManager udTypeManager;
- protected SystemUDAResolvedTypes udaResolvedTypes;
- protected SystemUDActionElement currentAction; // current action being processed
- protected boolean testAction; // is current action the test action?
- protected String osType = "default"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemUDActionSubsystem() {
- super();
- //this._subsystem = subsys;
- }
-
- /**
- * Overridable method for child classes to do migration of their actions.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done
- */
- protected abstract boolean doActionsMigration(ISystemProfile profile, String oldRelease);
-
- /**
- * Overridable method for child classes to do migration of their types.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done
- */
- protected abstract boolean doTypesMigration(ISystemProfile profile, String oldRelease);
-
- /**
- * Overridable method for child classes to supply the label to display in the
- * "New" node for actions. Typically only overridden if domains are not supported,
- * as otherwise the child nodes of "New" have the specific labels.<br>
- * If not overridden, then "New" is used.
- * @return translated label
- */
- protected String getNewNodeActionLabel() {
- return SystemUDAResources.ACTION_CASCADING_NEW_LABEL;
- }
-
- /**
- * Overridable method for child classes to supply the label to display in the
- * "New" node for type. Typically only overridden if domains are not supported,
- * as otherwise the child nodes of "New" have the specific labels.<br>
- * If not overridden, then "New" is used.
- * @return translated label
- */
- protected String getNewNodeTypeLabel() {
- return SystemUDAResources.ACTION_CASCADING_NEW_LABEL;
- }
-
- /**
- * Get the singleton manager of user-defined actions for this subsystem factory
- */
- public SystemUDActionManager getUDActionManager() {
- if (udActionManager == null) udActionManager = new SystemUDActionManager(this);
- return udActionManager;
- }
-
- /**
- * Get the singleton manager of named file types for this subsystem factory
- */
- public SystemUDTypeManager getUDTypeManager() {
- if ((udTypeManager == null) && supportsTypes()) udTypeManager = new SystemUDTypeManager(this);
- return udTypeManager;
- }
-
- /**
- * Return the list of substitution variables for the given domain type.
- * Called from edit pane in work with dialog.
- * This must be overridden!
- */
- public abstract SystemCmdSubstVarList getActionSubstVarList(int actionDomainType);
-
- /**
- * Return the list of substitution variables for the given UDA action.
- */
- public SystemCmdSubstVarList getActionSubstVarList(SystemUDActionElement action)
- {
- int actionDomainType = action.getDomain();
- return getActionSubstVarList(actionDomainType);
- }
-
- /**
- * Retrieve current subsystem
- */
- public ISubSystem getSubsystem() {
- return _subsystem;
- }
-
- /**
- * Set current subsystem
- */
- public void setSubsystem(ISubSystem ss) {
- _subsystem = ss;
- if (ss != null) setSubSystemFactory(ss.getSubSystemConfiguration());
- }
-
- /**
- * Retrieve current subsystem factory. Useful when we don't have a subsystem
- */
- public ISubSystemConfiguration getSubSystemFactory() {
- return subsystemFactory;
- }
-
- /**
- * Set current subsystem factory. Useful when we don't have a subsystem
- */
- public void setSubSystemFactory(ISubSystemConfiguration ssf) {
- subsystemFactory = ssf;
- }
-
- /**
- * Return true if actions can be scoped by file types
- * Default is true
- */
- public boolean supportsTypes() {
- return true;
- }
-
- /**
- * Return true if actions can be scoped by file types for the given domain.
- * Default is supportsTypes()
- */
- public boolean supportsTypes(int domain) {
- return supportsTypes();
- }
-
- /**
- * Return true if the action/type manager supports domains.
- * Default is false
- */
- public boolean supportsDomains() {
- return false;
- }
-
- /**
- * In some cases, we supports domains in general, but only want to expose
- * one of those domains to the user. For example, for file subsystems,
- * we support folder and file domains, but for named types we really only
- * support the file domain.
- * <p>
- * Default is -1
- */
- public int getSingleDomain(SystemUDBaseManager docManager) {
- return -1;
- }
-
- // **************************************************************
- // User Interface: Adding Menu Actions, etc.
- // **************************************************************
- /**
- * Return the action's edit pane.
- * Subclasses should override if they want to return their own edit pane.
- * @param ss - the subsystem if you have it. If you don't have it, pass null.
- * @param ssFactory - the subsystem factory, if you don't have the subsystem.
- * @param profile - the subsystem factory, if you don't have the subsystem.
- * @param parent - the hosting dialog/property page
- * @param tv - the tree view if the parent is a dialog.
- * */
- public SystemUDActionEditPane getCustomUDActionEditPane(ISubSystem ss, ISubSystemConfiguration ssFactory, ISystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- return new SystemUDActionEditPane(this, parent, tv);
- }
-
- /**
- * Historical.
- * Now replaced with {@link #getCustomUDActionEditPane(ISubSystem, ISubSystemConfiguration, ISystemProfile, ISystemUDAEditPaneHoster, ISystemUDTreeView)}
- */
- protected final SystemUDActionEditPane getCustomUDActionEditPane(ISubSystem ss, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- return getCustomUDActionEditPane(ss, null, null, parent, tv);
- }
-
- /**
- * Historical.
- * Now replaced with {@link #getCustomUDActionEditPane(ISubSystem, ISubSystemConfiguration, ISystemProfile, ISystemUDAEditPaneHoster, ISystemUDTreeView)}
- */
- protected final SystemUDActionEditPane getCustomUDActionEditPane(ISubSystemConfiguration ssFactory, ISystemProfile profile, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- return getCustomUDActionEditPane(null, ssFactory, profile, parent, tv);
- }
-
- /**
- * Subclasses may override to provide a custom type edit pane subclass.
- * Subclasses should override if they want to return their own types pane.
- * @param parent - the hosting dialog/property page
- * @param tv - the tree view if the parent is a dialog.
- */
- public SystemUDTypeEditPane getCustomUDTypeEditPane(ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- return new SystemUDTypeEditPane(this, parent, tv);
- }
-
- // **************************************************************
- // Accessing UDA/UDT's in memory/storage:
- // **************************************************************
- /**
- * Prime the user data with the default types.
- */
- public abstract SystemUDTypeElement[] primeDefaultTypes(SystemUDTypeManager udtd);
-
- /**
- * Prime the user data with the default actions. Subsystem and profile specific
- */
- public abstract SystemUDActionElement[] primeDefaultActions(SystemUDActionManager udad, ISystemProfile profile);
-
- /**
- * Given this IBM-supplied user action, restore it to its IBM-supplied state.
- * @return true if all went well, false if it wasn't restore for some reason
- */
- public boolean restoreDefaultAction(SystemUDActionElement element, int domain, String actionName) {
- return false;
- }
-
- /**
- * Given this IBM-supplied named type, restore it to its IBM-supplied state
- * @return true if all went well, false if it wasn't restore for some reason
- */
- public boolean restoreDefaultType(SystemUDTypeElement element, int domain, String typeName) {
- return false;
- }
-
- // **************************************************************
- // Running commands:
- // **************************************************************
- /**
- * Return the command name that tells us this is an action for testing substitution variables.
- * <p>
- * Returns "ibm test action"
- */
- public String getTestActionName() {
- return "ibm test action"; //$NON-NLS-1$
- }
-
- /**
- * Return the default name of the test file in test mode.
- * The test file is generated at action run-time when the action name is {@link #getTestActionName()}.
- * <p>
- * Returns "TESTUSERACTION.TXT"
- */
- public String getTestFileName() {
- return "TESTUSERACTION.TXT"; //$NON-NLS-1$
- }
-
- /**
- * Return the default path of the test file in test mode
- * The test file is generated at action run-time when the action name is {@link #getTestActionName()}.
- * <p>
- * Returns "c:\\Test_RSE_User_Actions"
- */
- public String getTestFilePath() {
- return "c:\\Test_RSE_User_Actions"; //$NON-NLS-1$
- }
-
- /**
- * Overriddable method for printing out information about the collected names
- * for "invoke once" actions, when in test mode.
- */
- protected void printTestActionInvokeOnceInformation(Shell shell, PrintWriter writer) {
- }
-
- /**
- * When the user selects one or more objects in the RSE, then right clicks
- * and selects a user action, this method is called (by the SystemUDAsBaseAction
- * class).
- * <p>
- * For each selected object, the action's command is resolved (variable substitution done)
- * by calling doCommandSubstitution, and then run by calling runCommand(...).
- * @param shell - the shell to use for display the prompt, if appropriate
- * @param action - the user action to run
- * @param selection - the currently selected objects
- * @param viewer - the viewer we are running this from. Used to do the refresh if requested in this action. Can be null.
- */
- public void run(Shell shell, SystemUDActionElement action, IStructuredSelection selection, ISystemResourceChangeListener viewer) {
- //Assert.isLegal(shell != null, "shell argument is null"); //$NON-NLS-1$
- processingSelection(true);
- Iterator elements = selection.iterator();
- this.currentAction = action;
- IRemoteCmdSubSystem cmdSubSystem = null;
- boolean runOnce = action.getCollect();
- boolean actionRunEvenOnce = false;
- boolean cancelled = false;
- /*
- * DKM - I've taken the linebreak stripping out. Now we intend to support
- * batches of commands. The interpreting of line breaks is now
- * delegated to implementors of runCommand()
- */
- String command = action.getCommand();
- // what is test action? For testing purposes, creating an action with this name means
- // generating a local file to prove the variable substitution works...
- testAction = action.getName().toLowerCase().startsWith(getTestActionName());
- File testFile = null;
- PrintWriter testWriter = null;
- if (testAction) {
- this.currentAction = action;
- try {
- String testFileDir = action.getComment();
- if ((testFileDir == null) || (testFileDir.trim().length() == 0)) testFileDir = getTestFilePath();
- File testDir = new File(testFileDir);
- if (!testDir.exists()) {
- testDir.mkdir();
- }
- String testFileName = command;
- if ((testFileName == null) || (testFileName.trim().length() == 0)) testFileName = getTestFileName();
- testFile = new File(testDir, testFileName);
- String message = "In test action mode. Output file is: {0}"; //$NON-NLS-1$
- message = MessageFormat.format(message, new Object[] { testFile.getAbsolutePath() });
- SystemBasePlugin.logInfo(message);
- testWriter = new PrintWriter(new FileOutputStream(testFile));
- getActionSubstVarList(action.getDomain()).printDisplayStrings(testWriter);
- } catch (Exception exc) {
- if (testFile != null) {
- String message = "Error creating test file {0} for user actions:"; //$NON-NLS-1$
- message = MessageFormat.format(message, new Object[] { testFile.getAbsolutePath() });
- SystemBasePlugin.logError(message, exc);
- }
- return;
- }
- }
- // ------------------------------------------------------------
- // THIS ACTION IS TO BE RUN ONCE PER SELECTED OBJECT
- // ------------------------------------------------------------
- try {
- if (checkDirtyEditors(selection)) {
- if (!runOnce) {
- Object selectedObject = null;
- while (!cancelled && elements.hasNext()) {
- selectedObject = elements.next();
- //cmdSubSystemContext = selectedObject;
- if (cmdSubSystem == null) {
- cmdSubSystem = getCommandSubSystem(selectedObject);
- }
- if (testAction) {
- SystemCmdSubstVarList supportedVariables = getActionSubstVarList(action.getDomain());
- String[] substitutedVariables = supportedVariables.doAllSubstitutions(selectedObject, this);
- if (testWriter != null) {
- testWriter.println("Selected Object: " + getRemoteAdapter(selectedObject).getAbsoluteName(selectedObject)); //$NON-NLS-1$
- for (int idx = 0; idx < substitutedVariables.length; idx++) {
- testWriter.println("....." + substitutedVariables[idx]); //$NON-NLS-1$
- }
- }
- } else {
- String cmd = doCommandSubstitutions(action, command, selectedObject);
- // Prompt support
- if (action.getPrompt()) {
- // Prompt user and allow to edit the command. Honor their request to cancel
- cmd = promptCommand(shell, cmd);
- if (cmd == null) cancelled = true;
- }
- if (!cancelled) cancelled = !runCommand(shell, action, cmd, cmdSubSystem, selectedObject, (Viewer) viewer);
- if (!cancelled && !actionRunEvenOnce) actionRunEvenOnce = true;
- } // end else !testAction
- } // end while loop
- } // end if !runOnce
- // ------------------------------------------------------------
- // THIS ACTION IS TO BE RUN ONCE ONLY, FOR ALL SELECTED OBJECTS
- // ------------------------------------------------------------
- else {
- StringBuffer collectedNames = new StringBuffer();
- Object firstSelectedObject = collectNames(shell, elements, collectedNames);
- if (firstSelectedObject == null) // happens when something goes wrong. Msg already shown to user
- return;
- String nameVar = getAllNamesSubstitutionVariable();
- String cmd = command;
- if (nameVar != null) {
- if (testAction) cmd = nameVar;
- int nameVarIdx = cmd.indexOf(nameVar);
- if (nameVarIdx >= 0) {
- cmd = cmd.substring(0, nameVarIdx) + collectedNames.toString() + cmd.substring(nameVarIdx + nameVar.length());
- }
- }
- if (testAction && testWriter != null) {
- SystemCmdSubstVarList supportedVariables = getActionSubstVarList(action.getDomain());
- String[] substitutedVariables = supportedVariables.doAllSubstitutions(firstSelectedObject, this);
- testWriter.println("First Selected Object: " + getRemoteAdapter(firstSelectedObject).getAbsoluteName(firstSelectedObject)); //$NON-NLS-1$
- if (nameVar != null) testWriter.println("....." + nameVar + " = " + cmd); //$NON-NLS-1$ //$NON-NLS-2$
- for (int idx = 0; idx < substitutedVariables.length; idx++)
- testWriter.println("....." + substitutedVariables[idx]); //$NON-NLS-1$
- printTestActionInvokeOnceInformation(shell, testWriter);
- } else {
- cmd = doCommandSubstitutions(action, cmd, firstSelectedObject);
- // Prompt support
- if (action.getPrompt()) {
- // Prompt user and allow to edit the command. Honor their request to cancel
- cmd = promptCommand(shell, cmd);
- if (cmd == null) cancelled = true;
- }
- if (!cancelled) {
- cmdSubSystem = getCommandSubSystem(firstSelectedObject);
- cancelled = !runCommand(shell, action, cmd, cmdSubSystem, firstSelectedObject, (Viewer) viewer);
- }
- if (!cancelled) actionRunEvenOnce = true;
- } // end else !testAction
- } // end else runOnce
- // ANYTHING GO WRONG??
- }
- } catch (Exception exc) {
- SystemMessageDialog.displayExceptionMessage(shell, exc);
- System.out.println("Error running user action " + command + ": " + exc.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- // ------------------------------------------------------------
- // REFRESH VIEW IF REQUESTED IN ACTION
- // ------------------------------------------------------------
- if (actionRunEvenOnce && action.getRefresh()) {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- try {
- Thread.sleep(500L);
- } catch (Exception exc) {
- } // defect 46380: give action's command time to run? I don't know, but this works!
- if (viewer != null) {
- sr.fireEvent(viewer, new SystemResourceChangeEvent(selection.toArray(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null));
- } else {
- sr.fireEvent(new SystemResourceChangeEvent(selection.toArray(), ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null));
- }
- // todo! verify we are sending the right event! ok, done... its the right one.
- }
- if (testWriter != null && testFile != null) {
- testWriter.flush();
- testWriter.close();
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_I_HELP);
- msg.makeSubstitution("Test file " + testFile.getName() + " generated successfully", "The file was generated in directory " + testFile.getParent()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SystemMessageDialog dlg = new SystemMessageDialog(shell, msg);
- dlg.openWithDetails();
- }
- processingSelection(false);
- } // end method
-
- /**
- * After an action's command has been resolved (vars substituted) this method
- * is called to actually do the remote command execution
- * @param shell - the shell to use if need to prompt for password or show msg dialog
- * @param action - the action being processed, in case attributes of it need to be queried
- * @param cmdString - the resolved command
- * @param cmdSubSystem - this connection's command subsystem, which will run the command
- * @param context - any context information the subsystem's runCommand might need
- * @return true if we should continue, false if something went wrong
- */
- protected boolean runCommand(Shell shell, SystemUDActionElement action, String cmdString, IRemoteCmdSubSystem cmdSubSystem, Object context, Viewer viewer) {
- boolean ok = false;
- if (cmdSubSystem != null) {
- ok = true;
- try {
- cmdSubSystem.runCommand(cmdString, context, new NullProgressMonitor());
- } catch (Exception e) {
- SystemBasePlugin.logError("RunUserAction", e); //$NON-NLS-1$
- SystemMessageDialog.displayExceptionMessage(shell, e);
- ok = false;
- }
- } // end if
- return ok;
- } // end method
-
- /**
- * Called when user selects a user action to run, from the base user
- * action class. Called by our run(...) method
- */
- protected String doCommandSubstitutions(SystemUDActionElement action, String cmd, Object selectedObject) {
- this.currentAction = action;
- SystemCmdSubstVarList supportedVariables = getActionSubstVarList(action);
- return supportedVariables.doSubstitutions(cmd, selectedObject, this);
- } // end method
-
- /**
- * When processing an action that has elected to be invoked only once, versus
- * once per selected object, we call this method to collect the names of the
- * selected objects into a single string buffer.
- * <p>
- * This can be overridden if need be. The default behaviour is to concatenate
- * the quoted absolute name of each selected object.
- *
- * @return first selected object, or null if something went wrong (msg will have been issued)
- */
- protected Object collectNames(Shell shell, Iterator elements, StringBuffer collectedNames) {
- return collectNamesDefaultMethod(shell, elements, collectedNames);
- } // end method
-
- /**
- * Allows subclasses to call it even if their immediate parent overrides
- */
- protected Object collectNamesDefaultMethod(Shell shell, Iterator elements, StringBuffer collectedNames) {
- Object firstSelectedObject = null;
- while (elements.hasNext()) {
- Object selectedObject = elements.next();
- if (firstSelectedObject == null)
- firstSelectedObject = selectedObject;
- else
- collectedNames.append(" "); //$NON-NLS-1$
- collectedNames.append(getNameDelimiter());
- collectedNames.append(getRemoteAdapter(selectedObject).getAbsoluteName(selectedObject));
- collectedNames.append(getNameDelimiter());
- } // end while loop
- return firstSelectedObject;
- } // end method
-
- /**
- * When processing an action that has elected to be invoked only once, versus
- * once per selected object, we call this method to get the "all names"
- * substitution variable so that we can substitute it with the collection
- * of names of all selected objects.
- * <p>
- * The default is "${resource_name}", but can be overridden.
- */
- protected String getAllNamesSubstitutionVariable() {
- return "${resource_name}"; //$NON-NLS-1$
- }
-
- /**
- * When processing an action that has elected to be invoked only once, versus
- * once per selected object, we call this method to get the delimiter
- * character to surround each name in.
- * <p>
- * The default is a double quote, but can be overridden. For example, for iSeries
- * native file systems, this is overridden with a single quote.
- */
- protected char getNameDelimiter() {
- return '\"';
- }
-
- /**
- * Called when processing user action that has the "prompt" attribute set.
- * By default, puts up dialog allowing user to see and edit the fully resolved command.
- * @param shell - the shell to host the modal dialog
- * @param command - the fully resolved (variables substituted) command
- * @return the edited command string, or null if the user pressed cancel
- */
- protected String promptCommand(Shell shell, String command) {
- return promptCommandDefault(shell, command);
- }
-
- /**
- * This allows child classes to call this directly
- */
- protected String promptCommandDefault(Shell shell, String command) {
- SystemPromptUDADialog dialog = new SystemPromptUDADialog(shell, command);
- dialog.open();
- if (!dialog.wasCancelled())
- return dialog.getCommand();
- else
- return null;
- }
-
- /**
- * Get the command subsystem associated the given remote object
- */
- protected static IRemoteCmdSubSystem getCommandSubSystem(Object selectedObject) {
- return RemoteCommandHelpers.getCmdSubSystem(getRemoteAdapter(selectedObject).getSubSystem(selectedObject).getHost());
- }
-
- /**
- * Get the first file subsystem associated the given remote object.
- * May return null!
- */
- protected static IRemoteFileSubSystem getFileSubSystem(Object selectedObject) {
- IRemoteFileSubSystem[] rfsss = RemoteFileUtility.getFileSubSystems(getCommandSubSystem(selectedObject).getHost());
- if ((rfsss != null) && (rfsss.length > 0))
- return rfsss[0];
- else
- return null;
- }
-
- /**
- * Returns the implementation of ISystemRemoteElement for the given
- * object. Returns null if this object does not adaptable to this.
- */
- protected static ISystemRemoteElementAdapter getRemoteAdapter(Object o) {
- if (!(o instanceof IAdaptable))
- return (ISystemRemoteElementAdapter) Platform.getAdapterManager().getAdapter(o, ISystemRemoteElementAdapter.class);
- else
- return (ISystemRemoteElementAdapter) ((IAdaptable) o).getAdapter(ISystemRemoteElementAdapter.class);
- }
-
- /**
- * From the interface ISystemSubstitutor.
- * <p>
- * Return the string to substitute for the given substitution
- * variable, given the current context object. This object will
- * be passed whatever was passed into the doSubstitution method.
- * <p>It is VERY IMPORTANT to return null if you can't do the
- * substitution for some reason! This is a clue to the algorithm
- * that no change was made and increases performance.
- * <p>
- * We try to handle common substitutions here in the base class, and
- * pass on any other requests to the child classes via a call to
- * internalGetSubstitutionValue(String var, Object context)
- */
- public String getSubstitutionValue(String subvar, Object context) {
- return getCommonSubstitutionValues(subvar, context);
- }
-
- /**
- * This abstraction allows child subclasses to override getSubstitutionValues, yet
- * grandchild subclasses to still call this common class if needed.
- */
- public String getCommonSubstitutionValues(String subvar, Object context) {
- // ${action_name} = This user defined action name
- if (subvar.equals("${action_name}")) //$NON-NLS-1$
- return currentAction.toString();
- // ${connection_name} = The connection in which this action is launched
- if (subvar.equals("${connection_name}")) //$NON-NLS-1$
- return getCommandSubSystem(context).getHost().getAliasName();
- // ${user_id} = The user ID that was used to signon with
- else if (subvar.equals("${user_id}")) //$NON-NLS-1$
- return getCommandSubSystem(context).getConnectorService().getUserId();
- // ${system_tempdir} = The fully qualified temp directory in remote system
- else if (subvar.equals("${system_tempdir}")) //$NON-NLS-1$
- return getCommandSubSystem(context).getConnectorService().getTempDirectory();
- // ${system_homedir} = The fully qualified home directory in remote system, for current user
- else if (subvar.equals("${system_homedir}")) //$NON-NLS-1$
- return getCommandSubSystem(context).getConnectorService().getHomeDirectory();
- // ${system_pathsep} = The path separator. ';' on Windows, ':' on Unix and Linux
- else if (subvar.equals("${system_pathsep}")) //$NON-NLS-1$
- {
- IRemoteFileSubSystem rfss = getFileSubSystem(context);
- if (rfss != null)
- return rfss.getParentRemoteFileSubSystemConfiguration().getPathSeparator();
- else
- return "system_pathsep not available"; // hopefully will never happen //$NON-NLS-1$
- }
- // ${system_filesep} = The file separator. '\\' on Windows, '/' on Unix and Linux
- else if (subvar.equals("${system_filesep}")) //$NON-NLS-1$
- {
- IRemoteFileSubSystem rfss = getFileSubSystem(context);
- if (rfss != null)
- return rfss.getParentRemoteFileSubSystemConfiguration().getSeparator();
- else
- return "system_filesep not available"; // hopefully will never happen //$NON-NLS-1$
- }
- // ${system_hostname} = The host name of the remote system
- else if (subvar.equals("${system_hostname}")) //$NON-NLS-1$
- return getCommandSubSystem(context).getHost().getHostName();
- // ${local_hostname} = The host name of the local system
- else if (subvar.equals("${local_hostname}")) //$NON-NLS-1$
- return RSECorePlugin.getLocalMachineName();
- // ${local_ip} = The ip address of the local system
- else if (subvar.equals("${local_ip}")) //$NON-NLS-1$
- return RSECorePlugin.getLocalMachineIPAddress();
- // ----------------------------------------------------------------------
- // We leave it to each subsystem plugin to define the following, as they
- // will each define their own mri for the display text. However, we can
- // do the substitutions right here as it generic code...
- // ----------------------------------------------------------------------
- // ${resource_name} = The name of the selected object
- else if (subvar.equals("${resource_name}")) //$NON-NLS-1$
- return getRemoteAdapter(context).getName(context);
- // ${resource_path} = The fully qualified name of the selected resource
- else if (subvar.equals("${resource_path}")) //$NON-NLS-1$
- return getRemoteAdapter(context).getAbsoluteName(context);
- else
- return internalGetSubstitutionValue(currentAction, subvar, context);
- }
-
- /**
- * Overridable extension point for child class to do variable substitution for variables unique to them.
- *
- */
- public abstract String internalGetSubstitutionValue(SystemUDActionElement currentAction, String substitutionVariable, Object context);
-
- /**
- *
- */
- public boolean hasUnsupportedSubstitutionVars(Object action, int domain) {
- return false;
- }
-
- /**
- * Check to see it any actions will apply to this selection.
- * Stop checking as soon as 1 action is found.
- * This method is an optimized, find-1-only, version of addUserActions() below.
- * May be overriden for subsystem specific filtering of actions
- * <b>CURRENTLY WE JUST RETURN TRUE</b>
- */
- public boolean eligibleUserActionsForSelection(IStructuredSelection selection, ISystemProfile profile) {
- return true; // todo. Maybe ... doesn't seem worth it!
- }
-
- /**
- * Populate context menu ("User Actions->" cascading action) with user
- * actions that meet their type-scoping criteria for given selection.
- * <p>
- * If given a profile, the list is scoped to that, else it includes actions
- * for all active profiles.
- */
- public Action[] addUserActions(IMenuManager menu, IStructuredSelection selection, ISystemProfile profile, Shell shell) {
- // access UDA tree for this subsystem
- SystemUDActionManager actMgr = getUDActionManager();
- // Go through each profile for this subsystem's factory
- ISystemProfile[] profiles = null;
- if (profile == null)
- profiles = getActiveSystemProfiles();
- else
- profiles = new ISystemProfile[] { profile };
- int domain = -1;
- if (supportsDomains()) {
- domain = getDomainFromSelection(selection);
- if (domain == -1)
- return new Action[0];
- }
- boolean multiSelection = (selection.size() != 1);
- ArrayList actionList = new ArrayList();
- for (int idx = 0; idx < profiles.length; idx++) {
- profile = profiles[idx];
- SystemUDActionElement[] actionElements = actMgr.getActions(null, profile, domain);
- // Scan UDA's for matching types and add to menu.
- // if any match, then create the initial UDA submenu cascade item
- for (int i = 0; i < actionElements.length; i++) {
- SystemUDActionElement actionElement = actionElements[i];
- if (!actionElement.getShow()) continue;
- if (multiSelection && actionElement.getSingleSelection()) continue;
- if (supportsDomains() && (domain != actionElement.getDomain())) continue; // newly added... we were getting file actions on folders
- if (!supportsTypes() || meetsSelection(actionElement, selection, domain)) {
- SystemUDAsBaseAction uda = new SystemUDAsBaseAction(actionElement, shell, this);
- uda.setSelection(selection);
- uda.setShell(shell);
- uda.setEnabled(!getWorkingOfflineMode());
- actionList.add(uda);
- if (null != menu)
- {
- menu.add(uda);
- }
-
- }
- } // end for-loop
- } // end for all profiles loop
- Action[] list = (Action[])actionList.toArray(new Action[]{});
-
- return list;
-
- }
-
- /**
- * We disable user defined actions if we are in work-offline mode.
- * Currently, how we determine this is dependent on the subsystem factory.
- */
- public boolean getWorkingOfflineMode() {
- return false;
- }
-
- /**
- * Determine domain, given the selection.
- * Eg subsystem that supports domains has to do this via overriding this method.
- * If domains not supported, return -1.
- */
- protected abstract int getDomainFromSelection(IStructuredSelection selection);
-
- /**
- * Given an action, and the currently selected remote objects, and the domain of those,
- * return true if ALL of the selected remote objects matches any of the type criteria
- * for this action
- */
- protected boolean meetsSelection(SystemUDActionElement action, IStructuredSelection selection, int domainType) {
- String unresolvedActionTypes[] = action.getFileTypes();
- // fastpath for "ALL"!
- if ((unresolvedActionTypes == null) || (unresolvedActionTypes.length == 0))
- return true; // what else to do?
- else if (unresolvedActionTypes[0].equals("ALL")) //$NON-NLS-1$
- return true;
- Object actionTypes[] = resolveTypes(unresolvedActionTypes, domainType);
- Iterator elements = selection.iterator();
- Object element = null;
- while (elements.hasNext()) {
- element = elements.next();
- // OK if matches any one of the file types for an action
- boolean foundMatch = false;
- for (int j = 0; !foundMatch && (j < actionTypes.length); j++) {
- // compare current unnamed type to current selected object
- if (isMatch(actionTypes[j], element, domainType)) {
- foundMatch = true;
- break;
- }
- } // for j
- if (!foundMatch) return false;
- }
- return true;
- }
-
- /**
- * Given a list of names that represent named types,
- * resolve that into a concatenated list of all types for
- * the given type names.
- * <p>
- * Basically, this concatenates all the subtypes together.
- * However, it also weeds out any redundancies
- */
- protected String[] resolveTypes(String[] p_types, int domainType) {
- Vector types = new Vector();
- for (int i = 0; i < p_types.length; i++) {
- String fileTypes = getFileTypesForTypeName(p_types[i], domainType);
- if (fileTypes != null) {
- StringTokenizer st = new StringTokenizer(fileTypes, getTypesDelimiter());
- int n = st.countTokens();
- for (int j = 0; j < n; j++) {
- String token = st.nextToken().trim();
- if (types.indexOf(token) < 0) types.addElement(token);
- }
- }
- }
- String[] allTypes = new String[types.size()];
- for (int idx = 0; idx < allTypes.length; idx++)
- allTypes[idx] = (String) types.elementAt(idx);
- return allTypes;
- }
-
- /**
- * Given a named-type name and a domain, find that type element and
- * return the types for that named type.
- */
- private String getFileTypesForTypeName(String name, int domainType) {
- if (udaResolvedTypes == null) udaResolvedTypes = getResolvedTypesHelper();
- return udaResolvedTypes.getFileTypesForTypeName(name, domainType, getUDTypeManager());
- }
-
- /**
- * Compares a particular file type (not named, but actual scalar/generic type)
- * to a specific user-selected remote object.
- * Returns true if the object's information matches that of the given type
- * <p>
- * Must be overridden, but only called if supportsTypes() returns true.
- * Else, just return true!
- * @param actionType - an unnamed file type, as in "*.cpp"
- * @param selectedObject - one of the currently selected remote objects
- * @param domainType - integer representation of current domain
- */
- protected abstract boolean isMatch(Object actionType, Object selectedObject, int domainType);
-
- /**
- * Get the delimiter used to delimiter the types in a type string.
- * Default is " "
- */
- protected String getTypesDelimiter() {
- return " "; //$NON-NLS-1$
- }
-
- /**
- *
- */
- public void resetResolvedTypes() {
- udaResolvedTypes = null;
- }
-
- /**
- *
- */
- public SystemUDAResolvedTypes getResolvedTypesHelper() {
- return new SystemUDAResolvedTypes();
- }
-
- // ---------------------------------------------------------------------------
- // NEW METHODS MOVED DOWN TO ABSTRACT-OUT/ENCAPSULATE THE NOTION OF DOMAINS...
- // DONE BY PHIL IN RELEASE 2.
- // PREVIOUSLY DOMAINS ONLY INTRODUCED IN THE ISERIES SUBCLASS FOR NATIVE FILES
- // XML SYNTAX FOR A DOMAIN:
- // <Domain Name="XlatedDomainName" Type="DomainName"
- // ---------------------------------------------------------------------------
- /**
- * For efficiency reasons, internally we use an integer to represent a domain.
- * However, that has to be mapped to a name which is actually what is stored as the
- * "name" attribute for the xml domain node.
- * This returns the maximum integer number supported by this action/type manager.
- * Returns -1 by default.
- * Needs to be overridden by children that support domains
- */
- public int getMaximumDomain() {
- return -1;
- }
-
- /**
- * For efficiency reasons, internally we use an integer to represent a domain.
- * However, that has to be mapped to a name which is actually what is stored as the
- * "type" attribute for the xml domain node.
- * <p>XML ATTRIBUTE SYNTAX FOR A DOMAIN:
- * <code>
- * <Domain Name="XlatedDomainName" Type="DomainName"/>
- * </code>
- * This maps the given integer to its domain name.
- * Returns null by default.
- * Needs to be overridden by children that support domains
- */
- public String mapDomainName(int domainInteger) {
- if ((domainInteger >= 0) && (domainInteger <= getMaximumDomain()))
- return getDomainNames()[domainInteger];
- else
- return null;
- }
-
- /**
- * Map a given untranslated domain name to its integer value
- */
- public int mapDomainName(String domainName) {
- String[] domainNames = getDomainNames();
- int match = -1;
- if ((domainNames != null) && (domainNames.length > 0)) {
- for (int idx = 0; (match == -1) && (idx < domainNames.length); idx++)
- if (domainNames[idx].equals(domainName)) match = idx;
- }
- return match;
- }
-
- /**
- * For efficiency reasons, internally we use an integer to represent a domain.
- * However, that has to be mapped to a translated name occasionally for the UI,
- * and indeed the translated name is stored in the XML in the "Name" attribute.
- * <p>XML ATTRIBUTE SYNTAX FOR A DOMAIN:
- * <code>
- * <Domain Name="XlatedDomainName" Type="DomainName"/>
- * </code>
- * This maps the given integer to its translated domain name.
- * Returns null by default.
- * Needs to be overridden by children that support domains
- */
- public String mapDomainXlatedName(int domainInteger) {
- if ((domainInteger >= 0) && (domainInteger <= getMaximumDomain()))
- return getXlatedDomainNames()[domainInteger];
- else
- return null;
- }
-
- /**
- * Same as above but specifically for what is shown in the work with user actions dialog for the new element
- */
- public String mapDomainXlatedNewName(int domainInteger) {
- if ((domainInteger >= 0) && (domainInteger <= getMaximumDomain()))
- return getXlatedDomainNewNames()[domainInteger];
- else
- return null;
- }
-
- /**
- * Same as above but specifically for what is shown in the work with named types dialog for the new element
- */
- public String mapDomainXlatedNewTypeName(int domainInteger) {
- if ((domainInteger >= 0) && (domainInteger <= getMaximumDomain()))
- return getXlatedDomainNewTypeNames()[domainInteger];
- else
- return null;
- }
-
- /**
- * Get the list of untranslated domain names
- */
- public String[] getDomainNames() {
- return null;
- }
-
- /**
- * Get the list of translated domain names
- */
- public String[] getXlatedDomainNames() {
- return null;
- }
-
- /**
- * Get the list of translated domain names for use in the tree view, for the "New" nodes,
- * in the Work With User Actions dialog.
- */
- public String[] getXlatedDomainNewNames() {
- return null;
- }
-
- /**
- * Get the list of translated domain names for use in the tree view, for the "New" nodes,
- * in the Work With User Types dialog.
- */
- public String[] getXlatedDomainNewTypeNames() {
- return null;
- }
-
- /**
- * Get the domain icon to show in the tree views
- */
- public Image getDomainImage(int domain) {
- return null;
- }
-
- /**
- * Get the domain icon to show in the tree views, for the new item for this domain
- */
- public Image getDomainNewImage(int domain) {
- return UserActionsIcon.USERACTION_NEW.getImage();
- }
-
- /**
- * Get the domain icon to show in the named type tree view, for the new item for this domain
- */
- public Image getDomainNewTypeImage(int domain) {
- return UserActionsIcon.USERTYPE_NEW.getImage();
- }
-
- /**
- * Get the active system profiles
- */
- protected ISystemProfile[] getActiveSystemProfiles() {
- return RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- }
-
- protected List getDirtyEditors(IStructuredSelection sel) {
- List dirtyEditors = new ArrayList();
- List selection = sel.toList();
- for (int i = 0; i < selection.size(); i++) {
- Object selected = selection.get(i);
- if (selected instanceof IAdaptable) {
- ISystemEditableRemoteObject editable = getEditableFor((IAdaptable) selected);
- if (editable != null) {
- try {
- // is the file being edited?
- if (editable.checkOpenInEditor() == 0) {
- // reference the editing editor
- editable.openEditor();
- // file is open in editor - prompt for save
- if (editable.isDirty()) {
- dirtyEditors.add(editable);
- }
- }
- } catch (Exception e) {
- }
- }
- }
- }
- return dirtyEditors;
- }
-
- 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(IStructuredSelection selection) {
- List dirtyEditors = getDirtyEditors(selection);
- 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();
- ListSelectionDialog dlg = new ListSelectionDialog(SystemBasePlugin.getActiveWorkbenchShell(), input, cprovider, lprovider, SystemUDAResources.EditorManager_saveResourcesMessage);
- dlg.setInitialSelections(input.getChildren());
- dlg.setTitle(SystemUDAResources.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);
- editable.doImmediateSaveAndUpload();
- }
- }
- return true;
- }
-
- /**
- * Method called at the start and end of running user actions
- * This allows children a chance to perform some action before and after
- * the actions are run by overriding this method.
- * @param processingSelection true before proecssing, false after processing
- */
- protected void processingSelection(boolean processingSelection) {
- }
-
- public String getOSType()
- {
- return osType;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java
deleted file mode 100644
index e9f511f39..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * In the Work With User Defined Actions dialog, this is the
- * tree view for showing the existing actions.
- */
-public class SystemUDActionTreeView extends SystemUDBaseTreeView {
- /**
- * Constructor when we have a subsystem
- */
- public SystemUDActionTreeView(Composite parent, ISystemUDWorkWithDialog editPane, ISubSystem ss, SystemUDActionSubsystem udaActionSubsystem) {
- super(parent, editPane, ss, udaActionSubsystem.getUDActionManager());
- }
-
- /**
- * Constructor when we have a subsystem factory
- */
- public SystemUDActionTreeView(Composite parent, ISystemUDWorkWithDialog editPane, ISubSystemConfiguration ssFactory, ISystemProfile profile) {
- super(parent, editPane, ssFactory, profile,
- // FIXME - UDA can't be coupled with subsystem API
- //((ISubsystemFactoryAdapter)ssFactory.getAdapter(ISubsystemFactoryAdapter.class)).getActionSubSystem(ssFactory, null).getUDActionManager()
- null);
- }
-
- /**
- * Return the {@link org.eclipse.rse.core.events.ISystemModelChangeEvents} constant representing the resource type managed by this tree.
- * This is a parent class override.
- */
- protected int getResourceType() {
- return IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION;
- }
-
- /**
- * Parent override.
- * Restore the selected action to its IBM-supplied default value.
- */
- public void doRestore() {
- SystemXMLElementWrapper selectedElement = getSelectedElement();
- if ((selectedElement == null) || !(selectedElement instanceof SystemUDActionElement)) return;
- SystemUDActionElement action = (SystemUDActionElement) selectedElement;
- boolean ok = getDocumentManager().getActionSubSystem().restoreDefaultAction(action, action.getDomain(), action.getOriginalName());
- if (ok) {
- action.setUserChanged(false);
- getDocumentManager().saveUserData(profile);
- selectElement(selectedElement);
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- update(selectedElement, allProps);
- }
- }
-
- // ------------------------------------
- // HELPER METHODS CALLED FROM EDIT PANE
- // ------------------------------------
- /**
- * Select the given action
- */
- public void selectAction(SystemUDActionElement element) {
- super.selectElement(element);
- }
-
- /**
- * Refresh the parent of the given action.
- * That is, find the parent and refresh the children.
- * If the parent is not found, assume it is because it is new too,
- * so refresh the whole tree.
- */
- public void refreshActionParent(SystemUDActionElement element) {
- super.refreshElementParent(element);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAsBaseAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAsBaseAction.java
deleted file mode 100644
index 3de6841cb..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDAsBaseAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [168975] Move RSE Events API to Core
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.events.ISystemResourceChangeListener;
-import org.eclipse.rse.internal.useractions.UserActionsIcon;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Base action for user-defined actions, shown in the "User actions->" menu.
- * When one of these is run, it does variable substitution and runs the command.
- */
-public class SystemUDAsBaseAction extends SystemBaseAction {
- private SystemUDActionSubsystem udaSubsystem;
- private SystemUDActionElement action;
-
- public SystemUDAsBaseAction(SystemUDActionElement action, Shell parent, SystemUDActionSubsystem udasubsys) {
- super(action.getLabel(), action.isIBM() ? UserActionsIcon.USERACTION_IBM.getImageDescriptor() : UserActionsIcon.USERACTION_USR.getImageDescriptor(), parent);
- this.udaSubsystem = udasubsys;
- this.action = action;
- allowOnMultipleSelection(true);
- // yantzi: artemis60, set SystemConnection to enable the offline support to
- // automatically disable UDA when the system connection is offline
- setHost(udasubsys.getSubsystem().getHost());
- }
-
- /**
- * 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() {
- IStructuredSelection selection = getSelection();
- if (viewer instanceof ISystemResourceChangeListener)
- udaSubsystem.run(getShell(), action, selection, (ISystemResourceChangeListener) viewer);
- else
- udaSubsystem.run(getShell(), action, selection, null);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java
deleted file mode 100644
index 993934930..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java
+++ /dev/null
@@ -1,1347 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562][api] dont implement ISystemUDAConstants
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View (cleanup some use action stuff)
- * Kevin Doyle (IBM) - [222825] NPE when changing profile on Work with User Actions Dialog
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- * Kevin Doyle (IBM) - [240725] Add Null Pointer checking when there are no default user actions
- * Kevin Doyle (IBM) - [239702] Copy/Paste doesn't work with User Defined Actions and Named Types
- * Kevin Doyle (IBM) - [222829] MoveUp/Down Broken in Work with User Actions Dialog
- * Xuan Chen (IBM) - [246807] [useractions] - Command Command property set from different os and subsystem are all shown as "Compile Commands" in Team view
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IFolder;
-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.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertySetContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.PropertySet;
-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.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-/**
- * Instances of this class hold the UDA definitions unique to
- * <ol>
- * <li> The SystemProfile - according to the subsystem
- * <li> the SubSystem type - according to the SubSystemFactory
- * </ol>
- * Instances of this class will be linked to a SubSystem instance
- * Eventually, would hope to create a factory method for this class which will
- * return existing instances common to the subsystems of different connections
- * within the same profile.
- * <p>
- * When used for IMPORT: NO SubSystem instance available. Will be NULL!
- * <p>
- * This is the base class for both action managers and types managers.
- * Only action managers are actually scoped by profile.
- * <p>
- * Architecturally, this class and the SystemXMLElementWrapper class
- * encapsulate all knowledge of the fact the underlying store is a xml document.
- */
-public abstract class SystemUDBaseManager implements IResourceChangeListener, ISystemXMLElementWrapperFactory, ITreeContentProvider {
- // state
- protected SystemUDActionSubsystem _udas;
- protected IFolder importCaseFolder; // Only set during Import processing
- private SystemUDTreeViewNewItem[] newItemsPerDomain;
- private boolean ignoreMyResourceChange = false; // avoid recursion
- // profile-indexed state.
- // Access to these is carefully guarded, for the case when
- // a subclass does not support profiles.
- private Hashtable udocsByProfile;
- private Hashtable hasChangedByProfile;
- private Hashtable dirPathByProfile;
- // used by subclasses that are not profile-indexed
- private IPropertySet udocNoProfile;
- private boolean hasChangedNoProfile = false;
- private Object[] dirPathNoProfile;
- // Profile for which we are working for actions for...
- private ISystemProfile currentlyActiveProfile; // set in UDA GUI
- // Clipboard copy/paste support
- private IPropertySet currentNodeClone = null;
- private String currentNodeCloneID = ""; //$NON-NLS-1$
- // private String currentNodeCloneName = ""; //$NON-NLS-1$
- private int currentNodeCloneDomain = -1;
- // constants
- protected static final Object[] EMPTY_ARRAY = new Object[0];
- /**
- * Current release as a string. Eg "5.0"
- */
- private static final String CURRENT_RELEASE_NAME = RSECorePlugin.CURRENT_RELEASE_NAME; //"5.1.2"; // Historical from when part of iSeries.
-
- /**
- * Constructor
- */
- public SystemUDBaseManager(SystemUDActionSubsystem udas) {
- super();
- _udas = udas;
- if (supportsProfiles()) {
- udocsByProfile = new Hashtable();
- hasChangedByProfile = new Hashtable();
- dirPathByProfile = new Hashtable();
- }
- addListener();
- }
-
- /**
- * Return the action subsystem object
- */
- public SystemUDActionSubsystem getActionSubSystem() {
- return _udas;
- }
-
- /**
- * Get the icon to show in the tree views, for the "new" expandable item
- */
- public Image getNewImage() {
- return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_NEW_ID);
- }
-
- // -----------------------------------------------------------
- // ISystemXMLElementWrapperFactory
- // -----------------------------------------------------------
- /**
- * Return the tag name for our managed elements.
- * Eg: will be "Action" for user actions, and "Type" for file types.
- */
- public abstract String getTagName();
-
- /**
- * Given an xml element node, create an instance of the appropriate
- * subclass of SystemXMLElementWrapper to represent it.
- */
- public abstract SystemXMLElementWrapper createElementWrapper(IPropertySet xmlElementToWrap, ISystemProfile profile, int domain);
-
- // -----------------------------------------------------------
- // ITREECONTENTPROVIDER METHODS...
- // -----------------------------------------------------------
- /**
- * Returns the implementation of IWorkbenchAdapter for the given
- * object. Returns null if the adapter is not defined or the
- * object is not adaptable.
- */
- protected IWorkbenchAdapter getAdapter(Object o) {
- if (!(o instanceof IAdaptable)) return null;
- return (IWorkbenchAdapter) ((IAdaptable) o).getAdapter(IWorkbenchAdapter.class);
- }
-
- public void dispose() {
- // To be safe, we clear the parent profile name when the tree is disposed,
- // so it doesn't linger. This will happen because we only instantiate ourselves
- // once and then always re-use that instance.
- setCurrentProfile(null);
- }
-
- /**
- * Method declared on ITreeContentProvider.
- * We return null.
- */
- public Object getParent(Object element) {
- return null;
- }
-
- /**
- * Method declared on ITreeContentProvider.
- */
- public boolean hasChildren(Object element) {
- //return getChildren(element).length > 0;
- if (element instanceof SystemUDTreeViewNewItem) {
- if (getActionSubSystem().supportsDomains())
- return !((SystemUDTreeViewNewItem) element).isExecutable();
- else
- return false;
- } else if (element instanceof SystemXMLElementWrapper) {
- if (getActionSubSystem().supportsDomains()) {
- SystemXMLElementWrapper wrapper = (SystemXMLElementWrapper) element;
- if (!wrapper.isDomain())
- return false;
- else
- {
- IPropertySet[] childrenPropertySet = wrapper.getElement().getPropertySets();
- if (childrenPropertySet == null || childrenPropertySet.length == 0)
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- } else
- return false;
- } else if (element == null) {
- SystemBasePlugin.logError("Unexpected null input to hasChildren!"); //$NON-NLS-1$
- } else {
- String message = "Unexpected input to hasChildren: " + element.getClass().getName(); //$NON-NLS-1$
- SystemBasePlugin.logError(message);
- }
- return false;
- }
-
- /**
- * Method declared on IContentProvider.
- * Callen when input changed. We do nothing.
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- // -----------------------------------------------------------
- // THE FOLLOWING ABSTRACT OUT THE DIFFERENCES BETWEEN ACTIONS
- // AND TYPES
- // -----------------------------------------------------------
- /**
- * Get the document root tag name.
- * Will be "FileTypes" for types, and "Actions" for actions
- */
- public abstract String getDocumentRootTagName();
-
- /**
- * Do we uppercase the value of the "Name" attribute?
- * Yes, we do for types, and No, we don't for actions
- */
- protected abstract boolean uppercaseName();
-
- /**
- * Retrieve the action/type tags for the given profile and domain,
- * wrapped in appropriate xml wrapper objects
- * @param children - existing vector to populate. Pass null to create and return new vector
- * @param domain - the integer representation of the domain, or -1 iff domains not support
- * @param profile - profile to determine the document to query. If profiles not supported, pass null.
- * @return a vector of the action/type tags
- */
- public Vector getXMLWrappers(Vector children, int domain, ISystemProfile profile) {
- SystemXMLElementWrapper domainElement = null;
- if (getActionSubSystem().supportsDomains()) {
- domainElement = getDomainWrapper(profile, domain);
- if (domainElement == null) // if parent domain not found, don't continue!
- return children;
- }
- return getXMLWrappers(children, domainElement, profile);
- }
-
- /**
- * Retrieve the action/type tags for the given profile and domain,
- * wrapped in appropriate xml wrapper objects
- * @param children - existing vector to populate. Pass null to create and return new vector
- * @param parentOrDomain - if domains supported, this must be the parent domain whose kids are being queried, or an Integer for single-domains, else null
- * @param profile - profile to determine the document to query. If profiles not supported, pass null.
- * @return a vector of the action/type tags
- */
- public Vector getXMLWrappers(Vector children, Object parentOrDomain, ISystemProfile profile) {
- int domain = -1;
- IPropertySet parentElement = null;
- if (parentOrDomain instanceof SystemXMLElementWrapper) {
- parentElement = ((SystemXMLElementWrapper) parentOrDomain).getElement();
- domain = ((SystemXMLElementWrapper) parentOrDomain).getDomain();
- } else if (parentOrDomain instanceof IPropertySet) parentElement = (IPropertySet) parentOrDomain;
- children = SystemXMLElementWrapper.getChildren(children, parentElement, getDocument(profile), profile, this, domain);
- return children;
- }
-
- /**
- * Return true if the elements managed by this class are scoped by
- * profile. Usually true for actions, false for types
- */
- public boolean supportsProfiles() {
- return true;
- }
-
- // -------------------------------------
- //
- // -------------------------------------
- /**
- *
- */
- private void addListener() {
- // Team support
- // Register a listener for resource change events on objects
- // in our remote system project.
- // Dont register multiple times, if already done once.
- // (Since this load method may be repeated)
- /* ADDED BY JOHN, BUT COMMENTED OUT BY PHIL. OUR MODEL FOR RECOVERING FROM A TEAM SYNCH
- * IS TO REQUIRE THE USER TO RUN RELOADRSE.
- if (!listening)
- {
- listening = true;
- SystemResourceManager.addResourceChangeListener(this);
- }
- */
- }
-
-
- /**
- * Get the current subsystem. Will be null for import, or working in team view when
- * no subsystems exist yet for a particular subsystem factory.
- */
- protected ISubSystem getSubSystem() {
- if (_udas != null)
- return _udas.getSubsystem();
- else
- return null;
- }
-
- /**
- * Get the current subsystem. Will be set in SystemProfileImpl's getUserActions method
- * for cases when there are no subsystems created for a subsystemconfiguration yet.
- */
- protected ISubSystemConfiguration getSubSystemFactory() {
- if (_udas != null)
- return _udas.getSubSystemFactory();
- else
- return null;
- }
-
-
-
-
- /**
- * loadAndParseXMLFile:
- * tries to load and parse the specified XML file.
- * @param profile the profile in which the user defined actions are kept
- * @return the document containing the user defined actions
- */
- protected IPropertySet loadAndParseXMLFile(ISystemProfile profile) {
-
- String osType = _udas.getOSType();
- String udaRootPropertySetName = ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX + osType + "." + getDocumentRootTagName(); //$NON-NLS-1$
- IPropertySet userDefinedActionPropertySet = profile.getPropertySet(udaRootPropertySetName);
-
- return userDefinedActionPropertySet;
-
- }
-
-
- // **********************************************************
- // ErrorHandler Interface: (XML SAX parsing)
- // **********************************************************
- /** Warning. */
- public void warning(SAXParseException ex) {
- SystemBasePlugin.logWarning("SystemAbstractUDdata: XML Warning: " + ex.toString()); //$NON-NLS-1$
- }
-
- /** Error. */
- public void error(SAXParseException ex) {
- SystemBasePlugin.logError("SystemAbstractUDdata: XML Error: " + ex.toString(), ex); //$NON-NLS-1$
- }
-
- /** Fatal error. */
- public void fatalError(SAXParseException ex) throws SAXException {
- SystemBasePlugin.logError("SystemAbstractUDdata: Fatal XML error: " + ex.toString(), ex); //$NON-NLS-1$
- throw (ex);
- }
-
- // **********************************************************
- //
- // **********************************************************
- /**
- * Interface org.eclipse.core.resources. IResourceChangeListener
- */
- public void resourceChanged(IResourceChangeEvent event) {
- //System.out.println( "SystemUDBaseManager.resourceChanged: flag=" + String.valueOf(ignoreMyResourceChange) );
- if (ignoreMyResourceChange) return;
- if (IResourceChangeEvent.POST_CHANGE != event.getType()) return;
- Object source = event.getSource();
- // if (ignoreEvents || !(event.getSource() instanceof IWorkspace))
- if (!(source instanceof IWorkspace)) return;
- // int type = event.getType();
- // String sType = SystemResourceListener.getTypeString(type);
- // System.out.println("RESOURCE CHANGED EVENT: eventType="+sType+", eventSource=" + source.toString() );
- // System.out.println("RESOURCE DELTA:"); //$NON-NLS-1$
- // IResource resource = event.getResource();
- IResourceDelta delta = event.getDelta();
- if (null == delta) return;
- /*
- if ((resource == null) && (delta != null))
- resource = delta.getResource();
-
- if ( null != resource)
- {
- String rname = resource.getLocation().toOSString();
-
- System.out.println("RESOURCE " + rname);
- System.out.println("RESOURCE Name: " + resource.getName() );
- System.out.println("RESOURCE type: " + SystemResourceListener.getTypeString( resource.getType()) );
-
- if ( null != resource.getProject() )
- System.out.println("RESOURCE Proj: " + resource.getProject().getName() );
-
- }
-
- resource = delta.getResource();
- if ( null != resource)
- {
- String rname = resource.getLocation().toOSString();
-
- System.out.println("RESOURCE DELTA: " + rname);
- System.out.println("RESOURCE Name: " + resource.getName() );
- System.out.println("RESOURCE type: " + SystemResourceListener.getTypeString( resource.getType()) );
-
- if ( null != resource.getProject() )
- System.out.println("RESOURCE Proj: " + resource.getProject().getName() );
- }
- */
- //System.out.println("res UD file:" );
- if (supportsProfiles()) {
- ISystemProfile[] activeProfiles = getActiveSystemProfiles();
- for (int idx = 0; idx < activeProfiles.length; idx++) {
- ISystemProfile profile = activeProfiles[idx];
- //ensureDirPathResolved(profile);
- searchDelta(profile, delta, 0);
- }
- } else {
- //ensureDirPathResolved(null);
- searchDelta(null, delta, 0);
- }
- }
-
- private void searchDelta(ISystemProfile profile, IResourceDelta parent, int nestLevel) {
- Object[] dirPath = getProfileIndexedInstanceVariable_dirPath(profile);
- String target = (String) dirPath[nestLevel];
- // System.out.println("search for: "+String.valueOf( nestLevel)+ ": "+target);
- IResourceDelta resdel[] = parent.getAffectedChildren(IResourceDelta.CHANGED | IResourceDelta.ADDED | IResourceDelta.REMOVED);
- for (int i = 0; i < resdel.length; i++) {
- IResource resource = resdel[i].getResource();
- // System.out.println(" .. " + String.valueOf(i) + ": " + resource.getName());
- if ((null != resource) && target.equals(resource.getName())) {
- // End of the search chain?
- nestLevel++;
- if (nestLevel < dirPath.length)
- // Recurse
- searchDelta(profile, resdel[i], nestLevel);
- else {
- // Matches !!
- //System.out.println("Matches! " );
- processResourceChangeHit(profile);
- }
- // Stop further searching at this level
- return;
- }
- }
- }
-
- /**
- * Get the active system profiles
- */
- private ISystemProfile[] getActiveSystemProfiles() {
- return RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles();
- }
-
- // ---------------------------------------------------------------------------
- // The GUI for working with user-defined actions sets the current profile
- // as the user selects it. This becomes the default profile to work with until
- // the user changes it again
- // ---------------------------------------------------------------------------
- /**
- * Set the profile we are working with the actions for, until reset.
- * Note, to reduce chance for errors, we do not implicitly use this profile
- * anywhere! Rather, this is simply a convenient holding place for it,
- * and the caller must explicitly call getCurrentProfile to retrieve it
- * when it is needed as input to any of the other methods in this class
- * or a child class.
- */
- public void setCurrentProfile(ISystemProfile profile) {
- this.currentlyActiveProfile = profile;
- }
-
- /**
- * Get the profile we are currently working with, as set by a call to setCurrentProfile
- */
- public ISystemProfile getCurrentProfile() {
- return currentlyActiveProfile;
- }
-
- // -----------------------------------------------------------
- // THE FOLLOWING METHODS ARE ALL INDEXED BY SYSTEM PROFILE...
- // -----------------------------------------------------------
- /**
- * Prime the given document with any default actions/types
- * Should be overridden!
- */
- public SystemXMLElementWrapper[] primeDocument(ISystemProfile profile) {
- return null;
- }
-
- /**
- * Get the release of the document. Eg, value of the "release"attribute of the root.
- * If not set then we assume it is release "4.0"
- */
- /*
- public String getDocumentRelease(ISystemProfile profile) {
- Document doc = getDocument(profile);
- Element root = doc.getDocumentElement();
- String rel = root.getAttribute(ISystemUDAConstants.RELEASE_ATTR);
- if (rel == null)
- return "4.0"; //$NON-NLS-1$
- else
- return rel;
- }
- */
-
- /**
- * Load document for given SystemProfile only if not already done.
- */
- public IPropertySet getDocument(ISystemProfile profile) {
- IPropertySet doc = getProfileIndexedInstanceVariable_Document(profile);
- if (doc == null) {
- doc = loadUserData(profile);
- if (doc == null)
- {
- //No user action for this profile
- return doc;
- }
- setProfileIndexedInstanceVariable_Document(profile, doc);
- // document is good. Now, check the release date stamped on it.
- // if not the current release, then we must consider migration...
- /*
- Element docroot = doc.getDocumentElement();
- String docRelease = docroot.getAttribute(ISystemUDAConstants.RELEASE_ATTR);
- if ((docRelease == null) || (docRelease.length() == 0)) docRelease = "4.0"; //$NON-NLS-1$
- if (!docRelease.equals(CURRENT_RELEASE_NAME)) {
- //System.out.println("Doing migration from "+docRelease+" to " + ISystemConstants.CURRENT_RELEASE_NAME + "...");
- boolean migrationDone = doMigration(profile, docRelease);
- docroot.setAttribute(ISystemUDAConstants.RELEASE_ATTR, RSECorePlugin.CURRENT_RELEASE_NAME);
- if (migrationDone) {
- setChanged(profile); // is this the right thing to do?
- saveUserData(profile);
- }
- }
- */
- } else {
- }
-
- return doc;
- }
-
- /**
- * Overridable extension point for child classes to do migration of their document.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done
- */
- protected abstract boolean doMigration(ISystemProfile profile, String oldRelease);
-
-
- /**
- * Indicate the data has changed for the document for the given system profile
- */
- public void setChanged(ISystemProfile profile) {
- dataChanged(profile);
- setProfileIndexedInstanceVariable_hasChanged(profile, true);
- }
-
- /**
- * Reload the User data for the given profile, from disk if it has been changed in memory
- */
- public void resetUserData(ISystemProfile profile) {
- //System.out.println("UD reset: " + getFileName() );
- if (!getProfileIndexedInstanceVariable_hasChanged(profile)) setProfileIndexedInstanceVariable_Document(profile, loadUserData(profile));
- }
-
- /**
- * Force a re-load
- */
- public void processResourceChangeHit(ISystemProfile profile) {
- setProfileIndexedInstanceVariable_Document(profile, null);
- dataChanged(profile);
- }
-
- /**
- * Indicate data has changed for the given profile
- */
- protected void dataChanged(ISystemProfile profile) {
- }
-
- /**
- * Load the user actions from the XML document, for the given profile
- */
- protected IPropertySet loadUserData(ISystemProfile profile) {
- //System.out.println("UD load: " + getFileName() );
- dataChanged(profile); // not sure why we call this, at this time!! Phil
- setProfileIndexedInstanceVariable_hasChanged(profile, false);
- /*
- String fn = getFilePath(profile);
- Document doc = null;
- if (!(new File(fn)).canRead())
- doc = createAndPrimeDocument(profile);
- else
- doc = loadAndParseXMLFile(fn, profile);
- //addListener();
- */
- //We use PropertySet to store User Action instead.
- //We need to get the compile command information from the system profile now.
- //Get the propertySet first
- String osType = _udas.getOSType();
- String udaRootPropertySetName = ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX + osType + "." + getDocumentRootTagName(); //$NON-NLS-1$
- IPropertySet udaRootPropertySet = profile.getPropertySet(udaRootPropertySetName);
- if (null == udaRootPropertySet)
- {
- if (profile.isDefaultPrivate()) // we only prime the user's private profile with default compile commands
- {
- udaRootPropertySet = createAndPrimeDocument(profile);
- } else {
- udaRootPropertySet = profile.createPropertySet(udaRootPropertySetName);
- }
- }
- else
- {
- udaRootPropertySet = loadAndParseXMLFile(profile);
- }
- return udaRootPropertySet;
- }
-
- /**
- * Create and prime the XML document
- */
- protected IPropertySet createAndPrimeDocument(ISystemProfile profile) {
- //Document doc = initializeDocument();
- //setProfileIndexedInstanceVariable_Document(profile, doc);
- SystemXMLElementWrapper[] primedElements = primeDocument(profile);
- if (primedElements != null) {
- for (int idx = 0; idx < primedElements.length; idx++) {
- SystemXMLElementWrapper newElement = primedElements[idx];
- newElement.setIBM(true);
- newElement.setUserChanged(false);
- }
- }
- saveUserData(profile);
-
- String osType = _udas.getOSType();
- String udaRootPropertySetName = ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX + osType + "." + getDocumentRootTagName(); //$NON-NLS-1$
- IPropertySet userDefinedActionPropertySet = profile.getPropertySet(udaRootPropertySetName);
-
- return userDefinedActionPropertySet;
-
- }
-
- /**
- * Save user data for the given system profile
- */
- public void saveUserData(ISystemProfile profile) {
- //System.out.println("UD save: " + getFileName() );
- if (!getProfileIndexedInstanceVariable_hasChanged(profile)) {
- //System.out.println("UD save: No changes. " + getFileName() );
- return;
- }
- profile.commit();
- ignoreMyResourceChange = false;
- SystemResourceManager.turnOnResourceEventListening();
- }
-
- /**
- * Move given element down one in document, save document
- * @return true if move successful
- */
- public boolean moveElementDown(SystemXMLElementWrapper elementWrapper/*, SystemXMLElementWrapper nextNextElementWrapper*/) {
- getDocument(elementWrapper.getProfile());
- IPropertySet element = elementWrapper.getElement();
- IPropertySetContainer parentElement = element.getContainer();
- IPropertySet[] allChildren = parentElement.getPropertySets();
-
- IPropertySet elementBelow = null;
- int elementOrder = getOrder(element);
- // Find the element whose order index is 1 more then the current element
- for (int i = 0; i < allChildren.length && elementBelow == null; ++i)
- {
- // Get the order attribute of the current property set
- int order = getOrder(allChildren[i]);
-
- // Compare to the current elements order attribute
- if (order != -1 && (elementOrder + 1) == order)
- elementBelow = allChildren[i];
- }
-
- // Swap the order for the 2 elements
- if (elementBelow != null) {
- elementBelow.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(elementOrder));
- element.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(elementOrder + 1));
-
- // Save User Data
- setProfileIndexedInstanceVariable_hasChanged(elementWrapper.getProfile(), true);
- saveUserData(elementWrapper.getProfile());
- return true;
- }
- return false;
- }
-
- /**
- * Move given element up one in document, save document
- * @return true if move successful
- */
- public boolean moveElementUp(SystemXMLElementWrapper elementWrapper/*, SystemXMLElementWrapper previousElementWrapper*/) {
- getDocument(elementWrapper.getProfile());
- IPropertySet element = elementWrapper.getElement();
- IPropertySetContainer parentElement = element.getContainer();
- IPropertySet[] allChildren = parentElement.getPropertySets();
-
- IPropertySet elementAbove = null;
- int elementOrder = getOrder(element);
- for (int i = 0; i < allChildren.length && elementAbove == null; ++i)
- {
- // Get the order attribute of the current property set
- int order = getOrder(allChildren[i]);
-
- // Compare to the current elements order attribute
- if (order != -1 && (elementOrder - 1) == order)
- elementAbove = allChildren[i];
- }
-
- // Swap the order for the 2 elements
- if (elementAbove != null) {
- elementAbove.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(elementOrder));
- element.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(elementOrder - 1));
-
- // Save User Data
- setProfileIndexedInstanceVariable_hasChanged(elementWrapper.getProfile(), true);
- saveUserData(elementWrapper.getProfile());
- return true;
- }
- return false;
- }
-
- /**
- * Prepares a given element for the clipboard.
- * This clones the element in transient memory, and returns a reference to the clone
- * that can be placed in a local clipboard instance. Subsequently, paste is only enabled
- * if the reference in the clipboard corresponds to a node clone in this object.
- * @return an id that uniquely identifies the cloned node, or null if it failed.
- */
- public String prepareClipboardCopy(SystemXMLElementWrapper elementWrapper) {
- getDocument(elementWrapper.getProfile());
- IPropertySet element = elementWrapper.getElement();
- currentNodeClone = new PropertySet(element);
- currentNodeCloneID = getActionSubSystem().getClass().getName() + "." + //$NON-NLS-1$
- getActionSubSystem().getOSType() + "." + //$NON-NLS-1$
- elementWrapper.getName();
- currentNodeCloneDomain = elementWrapper.getDomain();
-// currentNodeCloneName = elementWrapper.getName();
- return currentNodeCloneID;
- }
-
-
- /**
- * Test if the given ID, read from the clipboard, matches a node we prepared for
- * the clipboard. It also ensure that domains match.
- * <p>
- * This decides if the paste action will be enabled or not
- */
- public boolean enablePaste(SystemXMLElementWrapper selectedElementWrapper, String id) {
- if (id == null) return false;
- int selectedElementDomain = selectedElementWrapper.getDomain();
- return (id.equals(currentNodeCloneID) && (selectedElementDomain == currentNodeCloneDomain));
- }
-
- /**
- * After a successful call to enablePaste, this is called to do the paste operation.
- * The new object is inserted before the current selection if appropriate, else to the end of the domain
- * @return SystemXMLElementWrapper wrapper object of pasted element, or null if it failed
- */
- public SystemXMLElementWrapper pasteClipboardCopy(SystemXMLElementWrapper selectedElementWrapper, String id) {
- ISystemProfile profile = selectedElementWrapper.getProfile();
- if (profile == null)
- profile = getActionSubSystem().getSubsystem().getSystemProfile();
- getDocument(profile);
- IPropertySet selectedElement = selectedElementWrapper.getElement();
- SystemXMLElementWrapper pastedElementWrapper = null;
- try {
- IPropertySetContainer parentElement = null;
-
- pastedElementWrapper = createElementWrapper(currentNodeClone, selectedElementWrapper.getProfile(), selectedElementWrapper.getDomain());
- pastedElementWrapper.setName(getUniqueCloneName(pastedElementWrapper));
- currentNodeClone.setName(getUniqueCloneName(pastedElementWrapper));
- pastedElementWrapper.setIBM(false); // not an IBM action, even if source was
-
- if (selectedElementWrapper.isDomain()) {
- parentElement = selectedElement;
- IPropertySet[] allChildren = parentElement.getPropertySets();
- currentNodeClone.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(allChildren.length));
-
- parentElement.addPropertySet(currentNodeClone);
- } else {
- parentElement = selectedElement.getContainer();
- IPropertySet[] allChildren = parentElement.getPropertySets();
- IPropertySet elementBelow = null;
- int elementOrder = getOrder(selectedElement);
- for (int i = 0; i < allChildren.length && elementBelow == null; ++i)
- {
- // Get the order attribute of the current property set
- int order = getOrder(allChildren[i]);
-
- // Increment the order value for each property set greater then the current element's as we
- // insert the new pasted element right below the selected
- if (order > elementOrder) {
- allChildren[i].addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(order + 1));
- }
- }
- currentNodeClone.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(elementOrder + 1));
- parentElement.addPropertySet(currentNodeClone);
- }
-
- } catch (Exception exc) {
- SystemBasePlugin.logError("Error pasting user action/type", exc); //$NON-NLS-1$
- return null;
- }
- saveUserData(profile);
- return pastedElementWrapper;
- }
-
- /**
- * Return a new unique name to assign to a pastable element node clone
- */
- private String getUniqueCloneName(SystemXMLElementWrapper elementWrapper) {
- String newName = SystemUDAResources.RESID_UDA_COPY_NAME_1;
- newName = SystemMessage.sub(newName, "%1", elementWrapper.getName()); //$NON-NLS-1$
- Vector existingNames = getExistingNames(elementWrapper.getProfile(), elementWrapper.getDomain());
- boolean nameInUse = (existingNames.indexOf(newName) >= 0);
- int nbr = 2;
- while (nameInUse) {
- newName = SystemUDAResources.RESID_UDA_COPY_NAME_N;
- newName = SystemMessage.sub(newName, "%1", elementWrapper.getName()); //$NON-NLS-1$
- newName = SystemMessage.sub(newName, "%2", Integer.toString(nbr)); //$NON-NLS-1$
- nameInUse = (existingNames.indexOf(newName) >= 0);
- ++nbr;
- }
- return newName;
- }
-
- // ----------------------------------------------------------------------
- // THE FOLLOWING WERE PULLED DOWN FROM VARIOUS SUBCLASSES, AND ABSTRACTED
- // TO BE USABLE AS IS FOR ALL SCENARIOS:
- // ACTIONS VS TYPES
- // PROFILE-SCOPED VS NOT-PROFILE-SCOPED
- // SUPPORTS-DOMAINS VS DOESN'T-SUPPORT DOMAINS
- // ----------------------------------------------------------------------
- /**
- * Method declared on IStructuredContentProvider.
- * Returns root elements for the currently set profile (see setCurrentProfile).
- * If this is null, returns root elements for all active profiles
- */
-
- public Object[] getElements(Object element) {
- if (!supportsProfiles())
- return getElements((ISystemProfile) null, element);
- else {
- ISystemProfile currProfile = getCurrentProfile();
- if (currProfile != null)
- return getElements(currProfile, element);
- else
- return getElements(getActiveSystemProfiles(), element);
- }
- }
-
-
- /**
- * Return root elements for given profile.
- */
- public Object[] getElements(ISystemProfile profile, Object element) {
- return getElements(new ISystemProfile[] { profile }, element);
- }
-
- /**
- * Return the root elements.
- * <p>
- * If domains are supported, returns a root "New" item plus element wrappers for
- * any existing domain tags in the xml
- * If domains are not supported, returns a non-root "New" item plus element
- * wrappers for all action/type xml tags found under the root of the xml document
- */
- public Object[] getElements(ISystemProfile[] profiles, Object input) {
- /*
- if (input == null)
- System.out.println("Inside getElements. input is null");
- else
- System.out.println("Inside getElements. input is of type " + input.getClass().getName());
- */
- if ((input != null) && !(input instanceof String)) return EMPTY_ARRAY;
- Vector v = new Vector();
- // if domains supported, return "New" root item, plus wrappers of
- // any domain xml elements found...
- int onlyDomain = getActionSubSystem().getSingleDomain(this);
- if (getActionSubSystem().supportsDomains() && (onlyDomain == -1)) {
- v.add(SystemUDTreeViewNewItem.getRootNewItem(isUserActionsManager(), getNewNodeLabel()));
- if (supportsProfiles()) {
- // get domain elements per given profile
- for (int idx = 0; idx < profiles.length; idx++) {
- ISystemProfile profile = profiles[idx];
- v = createExistingDomainElementWrappers(v, profile);
- }
- } else {
- // get domain elements
- v = createExistingDomainElementWrappers(v, null);
- }
- }
- // if domains not supported, return singleton New item, plus wrappers
- // of any action/type elements found
- else {
- IPropertySetContainer parentDomainElement = null;
- if (onlyDomain == -1)
- v.add(SystemUDTreeViewNewItem.getOnlyNewItem(isUserActionsManager(), getNewNodeLabel()));
- else
- v.add(SystemUDTreeViewNewItem.getOnlyNewItem(onlyDomain, isUserActionsManager(), getNewNodeLabel()));
- if (supportsProfiles()) {
- // get actual elements (actions/types) per given profile
- for (int idx = 0; idx < profiles.length; idx++) {
- ISystemProfile profile = profiles[idx];
- if (onlyDomain != -1) parentDomainElement = findDomainElement(getDocument(profile), onlyDomain);
- v = getXMLWrappers(v, parentDomainElement, profile);
- }
- } else {
- // get actual elements (actions/types)
- if (onlyDomain != -1) parentDomainElement = findDomainElement(getDocument(null), onlyDomain);
- v = getXMLWrappers(v, parentDomainElement, null);
- }
- }
- return v.toArray();
- }
-
- /**
- * Overridable method for returning the label for the "New" nodes in the tree view.
- * Will usually be different for actions versus types.
- * @return translated value for "New" in new icon. Default is "New"
- */
- protected String getNewNodeLabel() {
- return SystemUDAResources.ACTION_CASCADING_NEW_LABEL;
- }
-
- /**
- * Return true if this is user actions, false if this is named types.
- */
- protected abstract boolean isUserActionsManager();
-
- /**
- * Return all the user actions/types under the given node.
- * If input is a New item, return New items per domain
- * If input is a Domain element wrapper, return wrappers of all child actions/types under that domain,
- * for that domain's profile.
- */
- public Object[] getChildren(Object element) {
- /*
- if (element == null)
- System.out.println("Inside getElements. input is null");
- else
- System.out.println("Inside getElements. input is of type " + element.getClass().getName());
- */
- if (element instanceof SystemUDTreeViewNewItem) {
- // Only on the (parent) cascade item.
- // Will only happen if we support domains
- if (!((SystemUDTreeViewNewItem) element).isExecutable()) {
- boolean isUserActionDialog = ((SystemUDTreeViewNewItem) element).isWorkWithActionsDialog();
- if (newItemsPerDomain == null) {
- int nbrDomains = getActionSubSystem().getMaximumDomain() + 1;
- newItemsPerDomain = new SystemUDTreeViewNewItem[nbrDomains];
- for (int idx = 0; idx < newItemsPerDomain.length; idx++) {
- if (isUserActionDialog)
- newItemsPerDomain[idx] = new SystemUDTreeViewNewItem(true, getActionSubSystem().mapDomainXlatedNewName(idx), idx, isUserActionDialog);
- else
- newItemsPerDomain[idx] = new SystemUDTreeViewNewItem(true, getActionSubSystem().mapDomainXlatedNewTypeName(idx), idx, isUserActionDialog);
- }
- }
- return newItemsPerDomain;
- }
- return EMPTY_ARRAY;
- }
- // getElements() is called to get roots, so we should never be
- // called here unless we have been given a domain element wrapper
- if (!(element instanceof SystemXMLElementWrapper) || !((SystemXMLElementWrapper) element).isDomain()) return EMPTY_ARRAY;
- SystemXMLElementWrapper parent = (SystemXMLElementWrapper) element;
- Vector v = new Vector();
- ISystemProfile profile = parent.getProfile();
- getXMLWrappers(v, parent, profile);
- return v.toArray();
- }
-
- /**
- * Find a child element of a given name.
- * Returns the xml node element or null
- */
- public IPropertySet findChildByName(ISystemProfile profile, String name, int domain) {
- IPropertySet xdoc = getDocument(profile);
- if (getActionSubSystem().supportsDomains() && (domain >= 0)) {
- IPropertySet domainElement = findDomainElement(xdoc, domain);
- return SystemXMLElementWrapper.findChildByName(domainElement, xdoc, getTagName(), name);
- } else {
- return SystemXMLElementWrapper.findChildByName(null, xdoc, getTagName(), name);
- }
- }
-
- /**
- * Find a child element of a given name.
- * Returns the wrapper of the xml node element or null
- */
- public SystemXMLElementWrapper findByName(ISystemProfile profile, String name, int domain) {
- IPropertySet element = findChildByName(profile, name, domain);
- if (element == null)
- return null;
- else
- return createElementWrapper(element, profile, domain);
- }
-
- /**
- * Get a list of existing names, for unique-name checking.
- */
- public Vector getExistingNames(ISystemProfile profile, int domain) {
- IPropertySet xdoc = getDocument(profile);
- if (getActionSubSystem().supportsDomains() && (domain >= 0)) {
- IPropertySet domainElement = findDomainElement(xdoc, domain);
- if (domainElement == null) return new Vector(); // defect 46147
- return SystemXMLElementWrapper.getExistingNames(domainElement, xdoc, getTagName());
- } else {
- return SystemXMLElementWrapper.getExistingNames(null, xdoc, getTagName());
- }
- }
-
- /**
- * Add a new user action or type.
- * Creates the new XML node in the document,
- * and creates and returns a wrapper object for it.
- */
- public SystemXMLElementWrapper addElement(ISystemProfile profile, int domain, String name) {
-
- String osType = _udas.getOSType();
- String udaRootPropertySetName = ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX + osType + "." + getDocumentRootTagName(); //$NON-NLS-1$
- //String userDefinedActionPropertySetName = ISystemUDAConstants.USER_DEFINED_ACTION_PROPRERTY_SET_PREFIX + osType;
- //ISystemProfile systemProfile = SystemRegistry.getInstance().getSystemProfile(profile.getName());
- IPropertySet udaRootPropertySet = profile.getPropertySet(udaRootPropertySetName);
- if (udaRootPropertySet == null)
- {
- udaRootPropertySet = profile.createPropertySet(udaRootPropertySetName);
- udaRootPropertySet.addProperty(ISystemUDAConstants.NAME_ATTR, ISystemUDAConstants.ACTION_FILETYPES + " - " + osType); //$NON-NLS-1$
- udaRootPropertySet.addProperty(ISystemUDAConstants.RELEASE_ATTR, CURRENT_RELEASE_NAME);
- udaRootPropertySet.addProperty(ISystemUDAConstants.UDA_ROOT_ATTR, getDocumentRootTagName());
- }
- IPropertySet child = null;
- // Get domain element, create if necessary
- if (getActionSubSystem().supportsDomains())
- {
- IPropertySet se = findOrCreateDomainElement(udaRootPropertySet, domain);
- child = se.createPropertySet(name);
- }
- else
- {
- child = udaRootPropertySet.createPropertySet(name);
- }
- child.addProperty(ISystemUDAConstants.NAME_ATTR, uppercaseName() ? name.toUpperCase() : name);
- child.addProperty(ISystemUDAConstants.TYPE_ATTR, getTagName());
-
- // Set the Order
- IPropertySetContainer parentElement = child.getContainer();
- IPropertySet[] allChildren = parentElement.getPropertySets();
- child.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(allChildren.length - 1)); // -1 the length because we are already part of the child list
-
- SystemXMLElementWrapper newElementWrapper = null;
-
- newElementWrapper = createElementWrapper(child, profile, domain);
- setChanged(profile);
- return newElementWrapper;
- }
-
- /**
- * Delete a give user action or type, given its wrapper.
- * Deletes the xml node from the document.
- */
- public void delete(ISystemProfile profile, SystemXMLElementWrapper elementWrapper) {
- elementWrapper.deleteElement();
- setChanged(profile);
- }
-
- // -----------------------------------------------------------
- // ISOLATE READING AND WRITING OF PROFILE-INDEXED VARIABLES...
- // -----------------------------------------------------------
- /**
- * Set the profile-indexed document instance variable
- */
- private void setProfileIndexedInstanceVariable_Document(ISystemProfile profile, IPropertySet doc) {
- if (!supportsProfiles())
- udocNoProfile = doc;
- else
- udocsByProfile.put(profile, doc);
- }
-
- /**
- * Get the profile-indexed document instance variable
- */
- private IPropertySet getProfileIndexedInstanceVariable_Document(ISystemProfile profile) {
- if (!supportsProfiles())
- return udocNoProfile;
- else
- return (IPropertySet) udocsByProfile.get(profile);
- }
-
- /**
- * Set the profile-indexed has-changed instance variable
- */
- private void setProfileIndexedInstanceVariable_hasChanged(ISystemProfile profile, boolean hasChanged) {
- if (!supportsProfiles())
- hasChangedNoProfile = hasChanged;
- else {
- if (hasChanged)
- hasChangedByProfile.put(profile, Boolean.TRUE);
- else
- hasChangedByProfile.put(profile, Boolean.FALSE);
- }
- }
-
- /**
- * Get the profile-indexed has-changed instance variable
- */
- private boolean getProfileIndexedInstanceVariable_hasChanged(ISystemProfile profile) {
- if (!supportsProfiles())
- return hasChangedNoProfile;
- else {
- Boolean b = (Boolean) hasChangedByProfile.get(profile);
- if (b == null)
- return false;
- else
- return (b == Boolean.TRUE);
- }
- }
-
- /**
- * Get the dir-path has-changed instance variable
- */
- private Object[] getProfileIndexedInstanceVariable_dirPath(ISystemProfile profile) {
- if (!supportsProfiles())
- return dirPathNoProfile;
- else
- return (Object[]) dirPathByProfile.get(profile);
- }
-
- // -------------------------------------
- // METHODS RELATED TO DOMAIN ELEMENTS...
- // -------------------------------------
- /**
- * Given a domain's integer representation, find its element in
- * xml document and return the wrapper for it. If not found,
- * returns null
- */
- protected SystemXMLElementWrapper getDomainWrapper(ISystemProfile profile, int domain) {
- IPropertySet udaRootPropertySet = getDocument(profile);
- if (udaRootPropertySet == null)
- {
- return null;
- }
- IPropertySet element = findDomainElement(getDocument(profile), domain);
- if (element != null)
- return createDomainElementWrapper(element, profile, domain);
- else
- return null;
- }
-
- /**
- * Find all existing domain XML elements that are children of the root,
- * and create wrapper objects for them, and add them to the given vector.
- * <p>
- * It is important to note these are returned in the pre-determined order,
- * not the order they are found in the document!
- */
- protected Vector createExistingDomainElementWrappers(Vector v, ISystemProfile profile) {
- IPropertySet xdoc = getDocument(profile);
- if (xdoc == null)
- return v;
- // get the "domain" children of the root, in the pre-determined order of domains
- IPropertySet[] subList = xdoc.getPropertySets();
- if ((subList == null) || (subList.length == 0)) return v;
- String[] domains = getActionSubSystem().getDomainNames();
- int subListLen = subList.length;
- for (int idx = 0; idx < domains.length; idx++) {
- IPropertySet match = null;
- for (int jdx = 0; (match == null) && (jdx < subListLen); jdx++) {
- IPropertySet currNode = subList[jdx];
- if (isDomainElement(currNode, domains[idx])) {
- //Element currElement = (Element)currNode;
- //if (currElement.getAttribute(XE_DOMTYPE).equals(domains[idx]))
- match = currNode;
- }
- }
- if (match != null) v.add(createDomainElementWrapper(match, profile, idx));
- }
- return v;
- }
-
- /**
- * Create a domain element wrapper
- */
- protected SystemXMLElementWrapper createDomainElementWrapper(IPropertySet xmlDomainElementToWrap, ISystemProfile profile, int domain) {
- return createElementWrapper(xmlDomainElementToWrap, profile, domain);
- }
-
- /**
- * Given an xml action/type document, try to find a domain element ("Domain" tag)
- * of the given domain type. If not found, do NOT create it.
- */
- protected IPropertySet findDomainElement(IPropertySet xdoc, int domain) {
- return findOrCreateDomainElement(xdoc, domain, false);
- }
-
- /**
- * Given an xml action/type document, try to find a domain element ("Domain" tag)
- * of the given untranslated name ("Type" attribute). If not found, create it.
- */
- protected IPropertySet findOrCreateDomainElement(IPropertySet xdoc, int domain) {
- return findOrCreateDomainElement(xdoc, domain, true);
- }
-
- /**
- * Given an xml action/type document, try to find a domain element ("Domain" tag)
- * of the given untranslated name ("Type" attribute). If not found, optionally create it.
- */
- protected IPropertySet findOrCreateDomainElement(IPropertySet xdoc, int domain, boolean create) {
- if (xdoc == null)
- return null;
-
- IPropertySet[] domainSets = xdoc.getPropertySets();
- String domainName = getActionSubSystem().mapDomainName(domain); // unxlated name. Eg "Type" parm
- IPropertySet domainElement = null;
- for (int i = 0; i < domainSets.length; i++)
- {
- IPropertySet thisDomain = domainSets[i];
- if (null != thisDomain)
- {
- if (isDomainElement(thisDomain, domainName))
- {
- domainElement = thisDomain;
- }
- }
-
- }
- /*
- NodeList subList = xdoc.getDocumentElement().getChildNodes();
- String domainName = getActionSubSystem().mapDomainName(domain); // unxlated name. Eg "Type" parm
- Element domainElement = null;
- if (subList != null) {
- for (int idx = 0; (domainElement == null) && (idx < subList.getLength()); idx++) {
- Node sn = subList.item(idx);
- if (sn instanceof Element) {
- if (isDomainElement((Element) sn, domainName)) domainElement = (Element) sn;
- }
- }
- }
- */
- if (create && (domainElement == null)) domainElement = createDomainElement(xdoc, domain);
- return domainElement;
- }
-
- /**
- * Create a new xml domain element. That, an element of tag name "Domain".
- * @param xdoc - the document to add it to. Will be added as child of root
- * @param domain - the integer representation of the domain, used to get its name and translated name
- */
- protected IPropertySet createDomainElement(IPropertySet xdoc, int domain) {
- IPropertySet element = xdoc.createPropertySet(getActionSubSystem().mapDomainXlatedName(domain));
- element.addProperty(ISystemUDAConstants.XE_DOMTYPE, getActionSubSystem().mapDomainName(domain));
- element.addProperty(ISystemUDAConstants.XE_DOMNAME, getActionSubSystem().mapDomainXlatedName(domain));
- element.addProperty(ISystemUDAConstants.TYPE_ATTR, ISystemUDAConstants.XE_DOMAIN);
- return element;
- }
-
- // -------------------------------------------
- // STATIC HELPER METHODS RELATED TO DOMAINS...
- // -------------------------------------------
- /**
- * Given an xml Element object, return true if it is a Domain
- * element. That is, if its tag name is "Domain"
- */
- public static boolean isDomainElement(IPropertySet element) {
- return (element.getPropertyValue(ISystemUDAConstants.TYPE_ATTR).equals(ISystemUDAConstants.XE_DOMAIN));
- }
-
- /**
- * Given an xml Element object, return true if it is a Domain
- * element and its "Type" attribute matches the given name.
- */
- public static boolean isDomainElement(IPropertySet element, String domainName) {
- return isDomainElement(element) && domainTypeEquals(element, domainName);
- }
-
- /**
- * Given an xml Domain element, return true if it's "type" attribute matches
- * the given untranslated domain name
- */
- public static boolean domainTypeEquals(IPropertySet element, String domainName) {
- return (element.getPropertyValue(ISystemUDAConstants.XE_DOMTYPE).equals(domainName));
- }
-
- /**
- * Checking not deleted. Still in document tree?
- * (for Actions and Types).
- * Needed by tree view/ Edit pane selection change processing.
- * If current selection has validation errors, & user tries to
- * change selection, want to set view back to the old selection,
- * but have to confirm it hasn't been deleted, first.
- *
- * Do so by traversing the tree backwards, back to the Document root,
- * then forwards again to verify the child links are in place.
- */
- public static boolean inCurrentTree(IPropertySet n) {
- String udaRootType = n.getPropertyValue(ISystemUDAConstants.UDA_ROOT_ATTR);
- if (udaRootType != null && (udaRootType.equals(ISystemUDAConstants.ACTIONS_ROOT) || udaRootType.equals(ISystemUDAConstants.FILETYPES_ROOT)))
- {
- //It is one of the UDA related root.
- return true;
- }
- IPropertySetContainer parent = n.getContainer();
- if (null == parent) return false;
- // Recursive, walk tree back to root, then finally Document.
- if (parent instanceof IPropertySet)
- {
- if (!inCurrentTree((IPropertySet)parent)) return false;
- }
- else
- {
- return false;
- }
- // Finally, check this is still a child of the parent
- IPropertySet[] siblings = parent.getPropertySets();
- for (int i=0; i<siblings.length; i++)
- {
- if (n == siblings[i])
- {
- return true;
- }
- }
- return false;
- }
-
- private int getOrder(IPropertySet elm) {
- IProperty orderProperty = elm.getProperty(ISystemUDAConstants.ORDER_ATTR);
- int order = -1;
-
- if (orderProperty != null)
- {
- order = Integer.valueOf(orderProperty.getValue()).intValue();
- }
- return order;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java
deleted file mode 100644
index 4fd93e5b5..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java
+++ /dev/null
@@ -1,820 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Kevin Doyle (IBM) - [222831] Can't Delete User Actions/Named Types
- * Kevin Doyle (IBM) - [222827] Treeview is collapsed after creating new user action
- * Kevin Doyle (IBM) - [239702] Copy/Paste doesn't work with User Defined Actions and Named Types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.core.runtime.IStatus;
-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.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.eclipse.rse.ui.actions.ISystemAction;
-import org.eclipse.rse.ui.messages.SystemMessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * Base class for tree views for both actions and types.
- */
-public class SystemUDBaseTreeView extends TreeViewer implements IMenuListener, IDoubleClickListener, ISystemUDTreeView {
- protected Composite parent;
- protected MenuManager menuMgr;
- protected SystemUDBaseManager docManager;
- protected ISubSystem subsystem;
- protected ISubSystemConfiguration subsystemFactory;
- protected ISystemProfile profile;
- protected ISystemUDWorkWithDialog wwDialog;
- protected SystemUDTreeActionCopy copyAction;
- protected SystemUDTreeActionPaste pasteAction;
- protected SystemUDTreeActionDelete deleteAction;
- protected SystemUDTreeActionMoveUp moveUpAction;
- protected SystemUDTreeActionMoveDown moveDownAction;
- protected SystemUDARestoreDefaultsActions restoreAction;
- protected Clipboard clipboard;
- protected boolean menuListenerAdded;
-
- /**
- * Constructor when we have a subsystem
- */
- public SystemUDBaseTreeView(Composite parent, ISystemUDWorkWithDialog editPane, ISubSystem ss, SystemUDBaseManager docManager) {
- //super(parent);
- // I don't think multi-selection makes sense for this tree! Phil
- super(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); // no SWT_MULTI
- // this.shell = shell;
- this.parent = parent;
- this.subsystem = ss;
- this.subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = subsystem.getSystemProfile();
- this.docManager = docManager;
- this.wwDialog = editPane;
- init();
- getTree().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (clipboard != null) clipboard.dispose();
- }
- });
- }
-
- /**
- * Constructor when we have a subsystem factory and profile
- */
- public SystemUDBaseTreeView(Composite parent, ISystemUDWorkWithDialog editPane, ISubSystemConfiguration ssFactory, ISystemProfile profile, SystemUDBaseManager docManager) {
- //super(parent);
- // I don't think multi-selection makes sense for this tree! Phil
- super(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); // no SWT_MULTI
- // this.shell = shell;
- this.parent = parent;
- this.subsystemFactory = ssFactory;
- this.profile = profile;
- this.docManager = docManager;
- this.wwDialog = editPane;
- init();
- getTree().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (clipboard != null) clipboard.dispose();
- }
- });
- }
-
- protected void init() {
- setContentProvider(docManager);
- setLabelProvider(new SystemUDBaseTreeViewLabelProvider(docManager));
- // For double-click on "New..." items in tree
- addDoubleClickListener(this);
- //setAutoExpandLevel(2); // does not work!!
- // -----------------------------
- // Enable right-click popup menu
- // -----------------------------
- menuMgr = new MenuManager("#UDTreePopupMenu"); //$NON-NLS-1$
- // menuMgr = new SystemSubMenuManager("#UDTreePopupMenu");
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(this);
- Menu menu = menuMgr.createContextMenu(getTree());
- getTree().setMenu(menu);
- /**/
- setInput("0"); // this should trigger displaying the roots //$NON-NLS-1$
- }
-
- /**
- * Expand the non-new domain (parent) nodes
- */
- public void expandDomainNodes() {
- // for usability we try to auto-expand the domain (parent) nodes...
- if (docManager.getActionSubSystem().supportsDomains()) {
- TreeItem[] rootItems = getTree().getItems();
- for (int idx = 0; idx < rootItems.length; idx++) {
- if (rootItems[idx].getData() instanceof SystemXMLElementWrapper) // assume a domain node
- {
- setExpandedState(rootItems[idx].getData(), true);
- } else if (rootItems[idx].getData() instanceof SystemUDTreeViewNewItem) {
- SystemUDTreeViewNewItem newNode = (SystemUDTreeViewNewItem) rootItems[idx].getData();
- if (!newNode.isExecutable()) setExpandedState(rootItems[idx].getData(), true);
- }
- }
- }
- }
-
- /**
- * Expand the given domain (parent) node, named by its
- * translatable name.
- */
- public void expandDomainNode(String displayName) {
- // for usability we try to auto-expand the domain (parent) nodes...
- if (docManager.getActionSubSystem().supportsDomains()) {
- TreeItem[] rootItems = getTree().getItems();
- for (int idx = 0; idx < rootItems.length; idx++) {
- if (rootItems[idx].getData() instanceof SystemXMLElementWrapper) // assume a domain node
- {
- //System.out.println(rootItems[idx].getText());
- if (rootItems[idx].getText().equals(displayName)) {
- setExpandedState(rootItems[idx].getData(), true);
- return;
- }
- }
- }
- }
- }
-
- /**
- * 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) {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- // this code assumes single select. if we ever change to allow multiple selection,
- // this code will have to change
- int selectionCount = selection.size();
- if (selectionCount > 0) // something selected
- {
- Object firstSelection = selection.getFirstElement();
- if ((firstSelection instanceof SystemXMLElementWrapper) && !((SystemXMLElementWrapper) firstSelection).isDomain()) {
- // Partition into groups...
- createStandardGroups(menu);
- ISystemAction action = getDeleteAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- action = getCopyAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- action = getPasteAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- action = getMoveUpAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- action = getMoveDownAction(selection);
- menu.appendToGroup(action.getContextMenuGroup(), action);
- action = getRestoreAction(selection);
- if (action != null) menu.appendToGroup(action.getContextMenuGroup(), action);
- } else if ((firstSelection instanceof SystemXMLElementWrapper) && ((SystemXMLElementWrapper) firstSelection).isDomain()) {
- // Partition into groups...
- createStandardGroups(menu);
- ISystemAction 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_CHANGE)); // restore
- menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions
- }
-
- /**
- * Get the delete action
- */
- private SystemUDTreeActionDelete getDeleteAction(ISelection selection) {
- if (deleteAction == null) deleteAction = new SystemUDTreeActionDelete(this);
- deleteAction.setInputs(getShell(), this, selection);
- return deleteAction;
- }
-
- /**
- * Get the move up action
- */
- private SystemUDTreeActionMoveUp getMoveUpAction(ISelection selection) {
- if (moveUpAction == null) moveUpAction = new SystemUDTreeActionMoveUp(this);
- moveUpAction.setInputs(getShell(), this, selection);
- return moveUpAction;
- }
-
- /**
- * Get the move down action
- */
- private SystemUDTreeActionMoveDown getMoveDownAction(ISelection selection) {
- if (moveDownAction == null) moveDownAction = new SystemUDTreeActionMoveDown(this);
- moveDownAction.setInputs(getShell(), this, selection);
- return moveDownAction;
- }
-
- /**
- * Get the copy action
- */
- private SystemUDTreeActionCopy getCopyAction(ISelection selection) {
- if (copyAction == null) copyAction = new SystemUDTreeActionCopy(this);
- copyAction.setInputs(getShell(), this, selection);
- return copyAction;
- }
-
- /**
- * Get the paste action
- */
- private SystemUDTreeActionPaste getPasteAction(ISelection selection) {
- if (pasteAction == null) pasteAction = new SystemUDTreeActionPaste(this);
- pasteAction.setInputs(getShell(), this, selection);
- return pasteAction;
- }
-
- /**
- * Get the restore defaults action
- */
- protected SystemUDARestoreDefaultsActions getRestoreAction(ISelection selection) {
- if (restoreAction == null) restoreAction = new SystemUDARestoreDefaultsActions(this);
- restoreAction.setShell(getShell());
- if (selection != null) restoreAction.setSelection(selection);
- return restoreAction;
- }
-
- /**
- * Convenience method for returning the shell of this viewer.
- */
- public Shell getShell() {
- return getTree().getShell();
- }
-
- /**
- * Clear the clipboard
- */
- public void clearClipboard() {
- if (clipboard != null) {
- clipboard.dispose();
- clipboard = null;
- }
- }
-
- // ----------------------------------
- // METHODS USED BY POPUP MENU ACTIONS
- // ----------------------------------
- /**
- * Decide if we can do the delete or not.
- * Decision deferred to work-with dialog hosting this tree
- */
- public boolean canDelete() {
- return wwDialog.canDelete(((IStructuredSelection) getSelection()).getFirstElement());
- }
-
- /**
- * Return true if the currently selected item can be moved up or not.
- * Called by the SystemUDTreeActionMoveUp action class.
- */
- public boolean canMoveUp() {
- return wwDialog.canMoveUp(((IStructuredSelection) getSelection()).getFirstElement());
- }
-
- /**
- * Return true if the currently selected item can be moved down or not.
- * Called by the SystemUDTreeActionMoveDown action class.
- */
- public boolean canMoveDown() {
- return wwDialog.canMoveDown(((IStructuredSelection) getSelection()).getFirstElement());
- }
-
- /**
- * Return true if the currently selected item can be copied to the clipboard or not.
- * Called by the SystemChangeFilterActionCopyString action class.
- */
- public boolean canCopy() {
- return wwDialog.canCopy(((IStructuredSelection) getSelection()).getFirstElement());
- }
-
- /**
- * Return true if the current contents of the clipboard apply to us or not.
- * Called by the SystemUDTreeActionPaste action class.
- */
- public boolean canPaste() {
- if (clipboard == null) return false;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- if (!(selection.getFirstElement() instanceof SystemXMLElementWrapper)) return false;
- SystemXMLElementWrapper firstSelect = (SystemXMLElementWrapper) selection.getFirstElement();
- TextTransfer textTransfer = TextTransfer.getInstance();
- String textData = (String) clipboard.getContents(textTransfer);
- return docManager.enablePaste(firstSelect, textData);
- }
-
- /**
- * Actually do the delete of currently selected item.
- * Return true if it worked. Return false if it didn't (eg, user cancelled confirm)
- * Called by the SystemUDTreeActionDelete action class.
- */
- public boolean doDelete() {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- boolean deleted = false;
- SystemMessage confirmDlt = getDeleteConfirmationMessage();
- SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), confirmDlt);
- try {
- deleted = msgDlg.openQuestion();
- if (deleted) {
- docManager.delete(docManager.getCurrentProfile(), (SystemXMLElementWrapper) selection.getFirstElement());
- docManager.saveUserData(docManager.getCurrentProfile());
- deleted = true;
- }
- } catch (Exception exc) {
- SystemBasePlugin.logError("Error deleting user actions", exc); //$NON-NLS-1$
- }
- if (deleted) {
- remove(selection.getFirstElement());
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, getResourceType(), selection.getFirstElement(), null);
- }
- return deleted;
- }
-
- /**
- * Return the {@link org.eclipse.rse.core.events.ISystemModelChangeEvents} constant representing the resource type managed by this tree.
- * This must be overridden.
- */
- protected int getResourceType() {
- return -1;
- }
-
- /**
- * Return message for delete confirmation
- */
- protected SystemMessage getDeleteConfirmationMessage() {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_CONFIRM_DELETE_USERACTION,
- IStatus.ERROR, UserActionsResources.MSG_CONFIRM_DELETE_USERACTION, UserActionsResources.MSG_CONFIRM_DELETE_USERTYPE_DETAILS);
- msg.setIndicator(SystemMessage.INQUIRY);
- return msg;
- }
-
- /**
- * Actually do the move up of currently selected item.
- * Return true if all went well.
- * Called by the SystemUDTreeActionMoveUp action class.
- */
- public boolean doMoveUp() {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- SystemXMLElementWrapper firstSelect = (SystemXMLElementWrapper) selection.getFirstElement();
- //SystemXMLElementWrapper previousElement = (SystemXMLElementWrapper) getSelectedPreviousTreeItem().getData();
- boolean moved = docManager.moveElementUp(firstSelect/*, previousElement*/);
- if (moved) {
- refreshElementParent(firstSelect);
- selectElement(firstSelect);
- docManager.saveUserData(docManager.getCurrentProfile());
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, getResourceType(), firstSelect, null);
- }
- return true;
- }
-
- /**
- * Actually do the move down of currently selected item.
- * Return true if all went well.
- * Called by the SystemUDTreeActionMoveDown action class.
- */
- public boolean doMoveDown() {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- SystemXMLElementWrapper firstSelect = (SystemXMLElementWrapper) selection.getFirstElement();
- //SystemXMLElementWrapper nextElement = null;
- //if (nextNextItem != null) nextElement = (SystemXMLElementWrapper) nextNextItem.getData();
- boolean moved = docManager.moveElementDown(firstSelect/*, nextElement*/);
- if (moved) {
- refreshElementParent(firstSelect);
- selectElement(firstSelect);
- docManager.saveUserData(docManager.getCurrentProfile());
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, getResourceType(), firstSelect, null);
- }
- return true;
- }
-
- /**
- * Actually do the copy of currently selected item to the clipboard.
- * Return true if all went well.
- * Called by the SystemChangeFilterActionCopyString action class.
- */
- public boolean doCopy() {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- SystemXMLElementWrapper firstSelect = (SystemXMLElementWrapper) selection.getFirstElement();
- if (clipboard == null) clipboard = new Clipboard(getShell().getDisplay());
- String id = docManager.prepareClipboardCopy(firstSelect);
- if (id == null) return false;
- TextTransfer transfer = TextTransfer.getInstance();
- clipboard.setContents(new Object[] { id }, new Transfer[] { transfer });
- return true;
- }
-
- /**
- * Actually do the paste of clipboard contents relative to currently selected object.
- * Return true if all went well.
- * Called by the SystemUDTreeActionPaste action class.
- */
- public boolean doPaste() {
- if (clipboard == null) return false;
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- SystemXMLElementWrapper firstSelect = (SystemXMLElementWrapper) selection.getFirstElement();
- TextTransfer textTransfer = TextTransfer.getInstance();
- String textData = (String) clipboard.getContents(textTransfer);
- SystemXMLElementWrapper pastedElementWrapper = docManager.pasteClipboardCopy(firstSelect, textData);
- if (pastedElementWrapper != null) {
- if (firstSelect.isDomain()) {
- refresh(firstSelect);
- setExpandedState(firstSelect, true); // force expansion, just in case
- } else
- refreshElementParent(firstSelect);
- selectElement(pastedElementWrapper);
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, getResourceType(), pastedElementWrapper, null);
- }
- clipboard.dispose();
- clipboard = null;
- return (pastedElementWrapper != null);
- }
-
- /**
- * Return true if we are to enable the Restore Defaults actions
- */
- public boolean canRestore() {
- if (wwDialog.areChangesPending()) return false;
- SystemXMLElementWrapper selectedElement = getSelectedElement();
- if ((selectedElement == null) || !((selectedElement instanceof SystemUDActionElement) || (selectedElement instanceof SystemUDTypeElement))) return false;
- return selectedElement.isIBM() && selectedElement.isUserChanged();
- }
-
- /**
- * Restore the selected action/type to its IBM-supplied default value.
- * Needs to be overridden by children that want to support it.
- */
- public void doRestore() {
- }
-
- // --------------
- // Miscellaneous
- // --------------
- /**
- * Return the action or type manager
- */
- public SystemUDBaseManager getDocumentManager() {
- return docManager;
- }
-
- // For Interface IDoubleClickListener
- // For double-click on "New..." items in tree
- public void doubleClick(DoubleClickEvent event) {
- }
-
- /**
- * Get the selected action or type name.
- * Returns "" if nothing selected
- */
- public String getSelectedElementName() {
- String seldName = ""; //$NON-NLS-1$
- IStructuredSelection sel = (IStructuredSelection) getSelection();
- if ((sel != null) && (sel.getFirstElement() != null)) {
- Object selObj = sel.getFirstElement();
- if (selObj instanceof SystemXMLElementWrapper) seldName = ((SystemXMLElementWrapper) selObj).toString();
- }
- return seldName;
- }
-
- /**
- * Return true if currently selected element is "ALL"
- */
- public boolean isElementAllSelected() {
- return getSelectedElementName().equals("ALL"); //$NON-NLS-1$
- }
-
- /**
- * Return true if currently selected element is vendor supplied
- */
- public boolean isSelectionVendorSupplied() {
- SystemXMLElementWrapper selectedElement = getSelectedElement();
- if (selectedElement != null) {
- String vendor = selectedElement.getVendor();
- //System.out.println("Vendor value: '"+vendor+"'");
- return ((vendor != null) && (vendor.length() > 0));
- }
- return false;
- }
-
- /**
- * Return the vendor that is responsible for pre-supplying this existing type,
- * or null if not applicable.
- */
- public String getVendorOfSelection() {
- SystemXMLElementWrapper selectedElement = getSelectedElement();
- if (selectedElement != null) {
- String vendor = selectedElement.getVendor();
- if ((vendor != null) && (vendor.length() > 0)) return vendor;
- }
- return null;
- }
-
- /**
- * Get the selected action or type domain.
- * Returns -1 if nothing selected or domains not supported
- */
- public int getSelectedElementDomain() {
- int seldDomain = -1;
- IStructuredSelection sel = (IStructuredSelection) getSelection();
- if ((sel != null) && (sel.getFirstElement() != null)) {
- Object selObj = sel.getFirstElement();
- if (selObj instanceof SystemXMLElementWrapper) seldDomain = ((SystemXMLElementWrapper) selObj).getDomain();
- }
- return seldDomain;
- }
-
- // ------------------------------------
- // HELPER METHODS CALLED FROM EDIT PANE
- // ------------------------------------
- /**
- * Return the selected non-domain element, or null if an existing element
- * is not currently selected
- */
- public SystemXMLElementWrapper getSelectedElement() {
- IStructuredSelection sel = (IStructuredSelection) getSelection();
- if ((sel != null) && (sel.getFirstElement() != null)) {
- Object selObj = sel.getFirstElement();
- if (selObj instanceof SystemXMLElementWrapper) {
- SystemXMLElementWrapper selEle = (SystemXMLElementWrapper) selObj;
- if (!selEle.isDomain()) return selEle;
- }
- }
- return null;
- }
-
- /**
- * Select the given type
- */
- public void selectElement(SystemXMLElementWrapper element) {
- //System.out.println("Inside selectElement of tree for action: " + element);
- // here is our problem:
- // We are given an element object that wrappers an xml node object.
- // These wrappers are re-created on the fly, whenever the tree is refreshed.
- // So, we might not find a binary match on the wrapper.
- // Hence, we need to see if there is such a match, and if not, then
- // we have to walk the tree comparing the xml node objects.
- // The assumption is that we are always given something that is in fact
- // in the tree.
- Widget w = findItem(element);
- if (w != null) // we found it!
- super.setSelection(new StructuredSelection(element), true); // select it
- else {
- //start walking!
- TreeItem matchingItem = findElement(element.getElement());
- if (matchingItem != null)
- super.setSelection(new StructuredSelection(matchingItem.getData()), true); // select it
- else
- super.setSelection((ISelection) null); // deselect what is currently selected
- }
- }
-
- /**
- * Find the parent tree item of the given type.
- * If it is not currently shown in the tree, or there is no parent, returns null.
- */
- public TreeItem findParentItem(SystemXMLElementWrapper element) {
-// IPropertySet parentElement = element.getParentDomainElement();
- // Since we use PropertySet's now we don't want the parent domain element, just the parent element
- IPropertySet parentElement = element.getParentElement();
- TreeItem parentItem = null;
- if (parentElement != null)
- parentItem = findElement(parentElement);
- else {
- //System.out.println("asked to find parent item, yet there is no parent element");
- }
- return parentItem;
- }
-
- /**
- * Refresh the parent of the given action.
- * That is, find the parent and refresh the children.
- * If the parent is not found, assume it is because it is new too,
- * so refresh the whole tree.
- */
- public void refreshElementParent(SystemXMLElementWrapper element) {
- TreeItem parentItem = findParentItem(element);
- if (parentItem == null) // parent not found?
- {
- //System.out.println("parentItem null. Refreshing tree");
- refresh(); // refresh whole tree
- // now, try again to find parent to ensure it is expanded...
- parentItem = findParentItem(element);
- } else {
- //System.out.println("parentItem not null. Refreshing it");
- refresh(parentItem.getData()); // refresh this element
- }
- if (parentItem != null) // should not happen
- {
- //System.out.println("parentItem not null. Expanded? " + parentItem.getExpanded());
- if (!parentItem.getExpanded()) // not expanded yet?
- {
- //System.out.println(" expanding parent... " + parentItem.getExpanded());
- setExpandedState(parentItem.getData(), true); // expand it now
- }
- }
- }
-
- /**
- * Given an xml node, find the wrapper for the element in the tree,
- * scanning entire tree.
- */
- private TreeItem findElement(IPropertySet searchNode) {
- TreeItem match = null;
- TreeItem[] roots = getTree().getItems();
- for (int idx = 0; (match == null) && (idx < roots.length); idx++)
- match = findElement(roots[idx], searchNode);
- return match;
- }
-
- /**
- * Given an xml node and parent tree item, find the wrapper for the element in the tree
- * under the given parent.
- */
- private TreeItem findElement(TreeItem parentItem, IPropertySet searchNode) {
- TreeItem match = null;
- // first, check for match on the given parent itself...
- Object itemData = parentItem.getData();
- IPropertySet itemNode = null;
- if ((itemData != null) && (itemData instanceof SystemXMLElementWrapper)) {
- itemNode = ((SystemXMLElementWrapper) itemData).getElement();
- if (itemNode == searchNode) return parentItem;
- }
- // no match on parent, check kids...
- TreeItem[] kids = parentItem.getItems();
- if (kids != null) for (int idx = 0; (match == null) && (idx < kids.length); idx++)
- match = findElement(kids[idx], searchNode);
- return match;
- }
-
- /**
- * Returns the tree item of the first selected object.
- */
- public TreeItem getSelectedTreeItem() {
- TreeItem[] selectedItems = getTree().getSelection();
- if ((selectedItems != null) && (selectedItems.length > 0))
- return selectedItems[0];
- else
- return null;
- }
-
- /**
- * Returns the tree item of the sibling before the first selected object.
- */
- public TreeItem getSelectedPreviousTreeItem() {
- TreeItem selectedItem = getSelectedTreeItem();
- if (selectedItem == null) return null;
- TreeItem[] siblings = null;
- if (selectedItem.getParentItem() != null)
- siblings = selectedItem.getParentItem().getItems();
- else
- siblings = selectedItem.getParent().getItems();
- for (int idx = 0; idx < siblings.length; idx++) {
- if (siblings[idx] == selectedItem) {
- if (idx == 0)
- return null;
- else
- return siblings[idx - 1];
- }
- }
- return null;
- }
-
- /**
- * Returns the tree item of the sibling after the first selected object.
- */
- public TreeItem getSelectedNextTreeItem() {
- TreeItem selectedItem = getSelectedTreeItem();
- if (selectedItem == null) return null;
- TreeItem[] siblings = null;
- if (selectedItem.getParentItem() != null)
- siblings = selectedItem.getParentItem().getItems();
- else
- siblings = selectedItem.getParent().getItems();
- for (int idx = 0; idx < siblings.length; idx++) {
- if (siblings[idx] == selectedItem) {
- if (idx >= (siblings.length - 1))
- return null;
- else
- return siblings[idx + 1];
- }
- }
- return null;
- }
-
- /**
- * Returns the tree item of the sibling two after the first selected object.
- */
- public TreeItem getSelectedNextNextTreeItem() {
- TreeItem selectedItem = getSelectedTreeItem();
- if (selectedItem == null) return null;
- TreeItem[] siblings = null;
- if (selectedItem.getParentItem() != null)
- siblings = selectedItem.getParentItem().getItems();
- else
- siblings = selectedItem.getParent().getItems();
- for (int idx = 0; idx < siblings.length; idx++) {
- if (siblings[idx] == selectedItem) {
- if (idx >= (siblings.length - 2))
- return null;
- else
- return siblings[idx + 2];
- }
- }
- return null;
- }
-
- /**
- * 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();
- }
-
- /**
- * Get the position of a tree item within its parent
- */
- protected int getTreeItemPosition(Widget parentItem, Item childItem) {
- int pos = -1;
- Item[] children = null;
- if (parentItem instanceof Item)
- children = getItems((Item) parentItem);
- else
- children = getChildren(parentItem);
- for (int idx = 0; (pos == -1) && (idx < children.length); idx++) {
- if (children[idx] == childItem) pos = idx;
- }
- return pos;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeViewLabelProvider.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeViewLabelProvider.java
deleted file mode 100644
index 81c7248b5..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeViewLabelProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-//import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Label provider for our user actions and named types tree views
- */
-public class SystemUDBaseTreeViewLabelProvider extends LabelProvider {
- private SystemUDBaseManager docManager;
-
- /**
- * Constructor
- */
- public SystemUDBaseTreeViewLabelProvider(SystemUDBaseManager docManager) {
- super();
- this.docManager = docManager;
- }
-
- /**
- * Override of parent so we can supply an image, if we desire.
- */
- public Image getImage(Object element) {
- if (element instanceof SystemUDTreeViewNewItem) {
- if (!((SystemUDTreeViewNewItem) element).isExecutable()) {
- //System.out.println("Calling docManager.getNewImage...");
- return docManager.getNewImage();
- } else {
- //System.out.println("Calling actionss.getDomainNewImage...");
- if (!docManager.isUserActionsManager())
- return docManager.getActionSubSystem().getDomainNewTypeImage(((SystemUDTreeViewNewItem) element).getDomain());
- else
- return docManager.getActionSubSystem().getDomainNewImage(((SystemUDTreeViewNewItem) element).getDomain());
- }
- } else if (element instanceof SystemXMLElementWrapper) {
- if (((SystemXMLElementWrapper) element).isDomain())
- return docManager.getActionSubSystem().getDomainImage(((SystemXMLElementWrapper) element).getDomain());
- else
- return ((SystemXMLElementWrapper) element).getImage();
- }
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSelectTypesForm.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSelectTypesForm.java
deleted file mode 100644
index 0a8859092..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSelectTypesForm.java
+++ /dev/null
@@ -1,478 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.ui.uda.actions.SystemWorkWithFileTypesAction;
-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.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This is a subclassable and configurable encapsulation of a
- * composite that allows users to select file types from a master
- * list, as well as edit that master list.
- * <p>
- * It is used in the edit pane of the Work With User Actions
- * dialog, to allow the user to indicate which file types this
- * action is scoped to.
- */
-public class SystemUDSelectTypesForm implements SelectionListener {
- // inputs
- protected Shell shell;
- protected ISubSystem subsystem = null;
- protected ISubSystemConfiguration subsystemFactory = null;
- protected ISystemProfile profile;
- protected SystemUDTypeManager udtm;
- protected int domain;
- protected String groupLabel, groupTooltip;
- protected String masterListLabel, masterListTooltip;
- protected String ourListLabel, ourListTooltip;
- protected String ALL_TYPE = "ALL"; //$NON-NLS-1$
- protected String[] inpMasterTypes = { ALL_TYPE };
- protected String[] inpSelectedTypes = { ALL_TYPE };
- protected Vector listeners = new Vector();
- // widgets
- protected Composite composite_prompts;
- protected List masterList;
- protected List ourList;
- protected Button addButton, rmvButton, editButton;
- protected Label verbageLabel;
- protected Label msgLine;
- // static
- protected String[] ALL_TYPE_ARRAY = { ALL_TYPE };
-
- /**
- * Constructor for SystemUDSelectTypesForm, when we have a subsystem.
- */
- public SystemUDSelectTypesForm(Shell shell, ISubSystem subsystem, SystemUDTypeManager mgr) {
- super();
- this.shell = shell;
- this.subsystem = subsystem;
- this.subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = subsystem.getSystemProfile();
- this.udtm = mgr;
- setGroupLabel(SystemUDAResources.RESID_UDA_TYPE_LIST_LABEL, SystemUDAResources.RESID_UDA_TYPE_LIST_TOOLTIP);
- setMasterListLabel(SystemUDAResources.RESID_UDA_TYPE_LIST_MASTER_LABEL, SystemUDAResources.RESID_UDA_TYPE_LIST_MASTER_TOOLTIP);
- setSelectedListLabel(SystemUDAResources.RESID_UDA_TYPE_LIST_SELECTED_LABEL, SystemUDAResources.RESID_UDA_TYPE_LIST_SELECTED_TOOLTIP);
- }
-
- /**
- * Constructor for SystemUDSelectTypesForm, when we have a subsystem factory and profile
- */
- public SystemUDSelectTypesForm(Shell shell, ISubSystemConfiguration subsystemFactory, ISystemProfile profile, SystemUDTypeManager mgr) {
- super();
- this.shell = shell;
- this.subsystemFactory = subsystemFactory;
- this.profile = profile;
- this.udtm = mgr;
- setGroupLabel(SystemUDAResources.RESID_UDA_TYPE_LIST_LABEL, SystemUDAResources.RESID_UDA_TYPE_LIST_TOOLTIP);
- setMasterListLabel(SystemUDAResources.RESID_UDA_TYPE_LIST_MASTER_LABEL, SystemUDAResources.RESID_UDA_TYPE_LIST_MASTER_TOOLTIP);
- setSelectedListLabel(SystemUDAResources.RESID_UDA_TYPE_LIST_SELECTED_LABEL, SystemUDAResources.RESID_UDA_TYPE_LIST_SELECTED_TOOLTIP);
- }
-
- // ------------------------
- // CONFIGURATION METHODS...
- // ------------------------
- /**
- * Set what type string represents "all".
- * The default is "ALL"
- */
- public void setAllType(String allType) {
- this.ALL_TYPE = allType;
- ALL_TYPE_ARRAY = new String[] { allType };
- }
-
- /**
- * Configuration method.
- * <p>
- * Set the verbage and tooltip for the overall group
- * <p>
- */
- public void setGroupLabel(String label, String tooltip) {
- this.groupLabel = label;
- this.groupTooltip = tooltip;
- }
-
- /**
- * Configuration method.
- * Set the label and tooltip for the master list of all defined types
- */
- public void setMasterListLabel(String label, String tooltip) {
- this.masterListLabel = label;
- this.masterListTooltip = tooltip;
- }
-
- /**
- * Configuration method.
- * Set the label and tooltip for the user-select list of types for this action,
- */
- public void setSelectedListLabel(String label, String tooltip) {
- this.ourListLabel = label;
- this.ourListTooltip = tooltip;
- }
-
- /**
- * Set the whole form to be visible or not
- */
- public void setVisible(boolean visible) {
- if (composite_prompts != null) {
- verbageLabel.setVisible(visible);
- composite_prompts.setVisible(visible);
- }
- }
-
- /**
- * Set the domain of the action we are creating or editing.
- */
- public void setDomain(int domain) {
- this.domain = domain;
- }
-
- // ---------------------------------
- // LISTENER CONFIGURATION METHODS...
- // ---------------------------------
- public void addSelectionListener(ISystemUDSelectTypeListener l) {
- listeners.add(l);
- }
-
- // -----------------------------
- // DATA CONFIGURATION METHODS...
- // -----------------------------
- /**
- * Set the initial master list of all defined types
- */
- public void setMasterTypes(String[] types) {
- this.inpMasterTypes = types;
- if (masterList != null) {
- masterList.removeAll();
- if (types != null) {
- masterList.setItems(types);
- if (types.length > 0) {
- masterList.select(0);
- addButton.setEnabled(true);
- }
- }
- setMessage(masterList);
- }
- }
-
- /**
- * Set the initial list of all types selected for this action.
- * For "new" actions, you don't have to call this to insert ALL,
- * as that is done for you
- */
- public void setTypes(String[] types) {
- this.inpSelectedTypes = types;
- if (ourList != null) {
- ourList.removeAll();
- if (types != null) {
- ourList.setItems(types);
- if (types.length > 0) {
- ourList.select(0);
- }
- }
- enableDisableRmvButton();
- setMessage(ourList);
- }
- }
-
- /**
- * Reset the master types list to just "ALL"
- */
- public void resetMasterTypes() {
- setMasterTypes(ALL_TYPE_ARRAY);
- }
-
- /**
- * Reset the user-selected types to just "ALL"
- */
- public void resetTypes() {
- setTypes(ALL_TYPE_ARRAY);
- }
-
- /**
- * Reset state (like when now working on a new action)
- */
- public void reset() {
- resetMasterTypes();
- resetTypes();
- /*
- masterList.removeAll();
- inpMasterTypes = ALL_TYPE_ARRAY;
- masterList.setItems(inpMasterTypes);
-
- inpSelectedTypes = ALL_TYPE_ARRAY;
- ourList.removeAll();
- ourList.setItems(inpSelectedTypes);
- */
- }
-
- // --------------------------
- // DATA EXTRACTION METHODS...
- // --------------------------
- /**
- * Return the master list of defined types.
- * This may have changed by way of the user pressing Edit
- */
- public String[] getMasterTypes() {
- return masterList.getItems();
- }
-
- /**
- * Return the list of user-selected types, as an array of strings.
- * Never an empty list! Enforced to select at least one type, which is defaulted to <ALL>
- */
- public String[] getTypes() {
- return ourList.getItems();
- }
-
- // ------------------------
- // INTERNAL METHODS...
- // ------------------------
- /**
- * Create the widgets and populate the composite.
- * @param parent - the parent composite these widgets will be added to (actually we create our own composite to hold the widgets)
- * @param span - the number of columns within the parent composite that our widgets are to span
- */
- public Composite createContents(Composite parent, int span) {
- verbageLabel = SystemWidgetHelpers.createVerbiage(parent, groupLabel, span, false, -1);
- //addFillerLine(parent, span);
- int nbrColumns = 3;
- //composite_prompts = SystemWidgetHelpers.createGroupComposite(parent, nbrColumns, groupLabel);
- composite_prompts = SystemWidgetHelpers.createFlushComposite(parent, nbrColumns);
- composite_prompts.setToolTipText(groupTooltip);
- ((GridData) composite_prompts.getLayoutData()).horizontalSpan = span;
- ((GridLayout) composite_prompts.getLayout()).marginHeight = 0;
- ((GridLayout) composite_prompts.getLayout()).marginWidth = 2;
- masterList = createListBox(composite_prompts, masterListLabel, masterListTooltip);
- Composite middle_composite = SystemWidgetHelpers.createComposite(composite_prompts, 1);
- ((GridLayout) middle_composite.getLayout()).marginWidth = 0;
- SystemWidgetHelpers.createLabel(middle_composite, ""); //$NON-NLS-1$
- Composite button_composite = SystemWidgetHelpers.createTightComposite(middle_composite, 1);
- addButton = SystemWidgetHelpers.createPushButton(button_composite, null, SystemUDAResources.RESID_UDA_TYPE_ADD_BUTTON_LABEL, SystemUDAResources.RESID_UDA_TYPE_ADD_BUTTON_TOOLTIP);
- rmvButton = SystemWidgetHelpers.createPushButton(button_composite, null, SystemUDAResources.RESID_UDA_TYPE_RMV_BUTTON_LABEL, SystemUDAResources.RESID_UDA_TYPE_RMV_BUTTON_TOOLTIP);
- editButton = SystemWidgetHelpers.createPushButton(button_composite, null, SystemUDAResources.RESID_UDA_TYPE_EDIT_BUTTON_LABEL, SystemUDAResources.RESID_UDA_TYPE_EDIT_BUTTON_TOOLTIP);
- Label bottomFiller = SystemWidgetHelpers.createLabel(button_composite, ""); //$NON-NLS-1$
- ((GridData) bottomFiller.getLayoutData()).grabExcessVerticalSpace = true;
- ((GridData) bottomFiller.getLayoutData()).verticalAlignment = GridData.FILL;
- ourList = createListBox(composite_prompts, ourListLabel, ourListTooltip);
- msgLine = SystemWidgetHelpers.createLabel(composite_prompts, "");//, 1, true); //$NON-NLS-1$
- ((GridData) msgLine.getLayoutData()).horizontalSpan = nbrColumns;
- ((GridData) msgLine.getLayoutData()).widthHint = 150;
- // add our own listeners to our own widgets
- masterList.addSelectionListener(this);
- ourList.addSelectionListener(this);
- addButton.addSelectionListener(this);
- rmvButton.addSelectionListener(this);
- editButton.addSelectionListener(this);
- boolean enableAdd = false;
- boolean enableRmv = false;
- // prefill data
- if (inpMasterTypes != null) {
- masterList.setItems(inpMasterTypes);
- if (inpMasterTypes.length > 0) {
- masterList.select(0);
- enableAdd = true;
- }
- }
- if (inpSelectedTypes != null) {
- ourList.setItems(inpSelectedTypes);
- if (inpSelectedTypes.length > 0) {
- ourList.select(0);
- enableRmv = !inpSelectedTypes[0].equals(ALL_TYPE);
- }
- }
- setMessage(ourList);
- // initially disable buttons
- addButton.setEnabled(enableAdd);
- rmvButton.setEnabled(enableRmv);
- return composite_prompts;
- }
-
- /**
- * create list box
- */
- private List createListBox(Composite c, String label, String tooltip) {
- List listbox = SystemWidgetHelpers.createListBox(c, null, false, label, tooltip);
- ((GridData) listbox.getLayoutData()).widthHint = 50;
- ((GridData) listbox.getLayoutData()).heightHint = 78; // 120
- return listbox;
- }
-
- /**
- * enable/disable rmv button
- */
- private void enableDisableRmvButton() {
- int selIdx = ourList.getSelectionIndex();
- rmvButton.setEnabled((selIdx >= 0) && !((ourList.getItemCount() == 1) && (ourList.getItem(0).equals(ALL_TYPE))));
- }
-
- /**
- * SelectionListener interface.
- * Called when button selected
- */
- public void widgetSelected(SelectionEvent event) {
- Object src = event.getSource();
- boolean fireEvent = false;
- if (src == masterList) {
- int selIdx = masterList.getSelectionIndex();
- addButton.setEnabled(selIdx >= 0);
- enableDisableRmvButton();
- setMessage(masterList);
- } else if (src == ourList) {
- enableDisableRmvButton();
- setMessage(ourList);
- } else if (src == rmvButton) {
- int selIdx = ourList.getSelectionIndex();
- if (selIdx < 0) return;
- ourList.remove(selIdx);
- if (ourList.getItemCount() == 0) ourList.add(ALL_TYPE);
- enableDisableRmvButton();
- fireEvent = true;
- } else // add or edit
- {
- String[] selected = masterList.getSelection();
- String selection = null;
- if ((selected != null) && (selected.length > 0)) {
- selection = selected[0];
- }
- int selIdx = -1;
- if (src == addButton) {
- if (selected == null || selection == null) // should never happen if our enablement is correct
- {
- addButton.setEnabled(false);
- return;
- }
- // is the selected type already in the selected-list?
- selIdx = ourList.indexOf(selection);
- if (selIdx < 0) // no, not already in list
- {
- if (selection.equals(ALL_TYPE)) // adding ALL?
- ourList.removeAll();
- else {
- try {
- ourList.remove(ALL_TYPE);
- } catch (Exception exc) {
- }
- }
- ourList.add(selection);
- enableDisableRmvButton();
- fireEvent = true;
- }
- } else if (src == editButton) {
- SystemWorkWithFileTypesAction editTypesAction = null;
- if (subsystem != null)
- editTypesAction = new SystemWorkWithFileTypesAction(shell, udtm.getActionSubSystem());
- else
- editTypesAction = new SystemWorkWithFileTypesAction(shell, subsystemFactory, profile);
- if (selection != null) {
- editTypesAction.preSelectType(domain, selection);
- }
- editTypesAction.run();
- String outputSelectedTypeName = editTypesAction.getSelectedTypeName();
- int outputSelectedTypeDomain = editTypesAction.getSelectedTypeDomain();
- //System.out.println("outputSelectedTypeName = " + outputSelectedTypeName);
- // the following will result in a callback to us to refresh the master list
- fireSelectedListChange(false, true);
- // now, select something in master list
- if ((outputSelectedTypeName != null) && (outputSelectedTypeDomain == domain)) {
- masterList.setSelection(new String[] { outputSelectedTypeName });
- masterList.showSelection();
- } else if (selection != null) masterList.setSelection(new String[] { selection });
- }
- }
- if (fireEvent) fireSelectedListChange(true, false);
- }
-
- /**
- * SelectionListener interface.
- * Called when enter pressed on widget we are listening to
- */
- public void widgetDefaultSelected(SelectionEvent event) {
- }
-
- /**
- * Set the text in the message line below the lists
- */
- private void setMessage(List listbox) {
- int selIdx = listbox.getSelectionIndex();
- if (selIdx < 0)
- msgLine.setText(""); //$NON-NLS-1$
- else {
- String type = listbox.getItem(selIdx);
- String types = udtm.getTypesForTypeName(type, domain);
- if (types == null) {
- msgLine.setText(""); //$NON-NLS-1$
- msgLine.setToolTipText(""); //$NON-NLS-1$
- } else {
- String msg = null;
- if (types.length() > 35)
- msg = type + ": " + types.substring(0, 34) + "..."; //$NON-NLS-1$ //$NON-NLS-2$
- else
- msg = type + ": " + types; //$NON-NLS-1$
- //System.out.println(msg);
- msgLine.setText(msg);
- msgLine.setToolTipText(types);
- }
- }
- }
-
- /**
- * The user has changed the selected-types list.
- * Inform all listeners
- */
- private void fireSelectedListChange(boolean selectedListChanged, boolean masterListChanged) {
- for (int idx = 0; idx < listeners.size(); idx++) {
- if (selectedListChanged) ((ISystemUDSelectTypeListener) listeners.elementAt(idx)).selectedTypeListChanged(this);
- if (masterListChanged) ((ISystemUDSelectTypeListener) listeners.elementAt(idx)).masterTypeListChanged(this);
- }
- }
-
- // -----------------------------
- // 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;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java
deleted file mode 100644
index bc2ebcf99..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java
+++ /dev/null
@@ -1,193 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- *******************************************************************************/
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserTypeTypes;
-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.swt.events.ModifyListener;
-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.Text;
-
-/**
- * Default implementation of ISystemUDTypeEditPaneTypesSelector, which is
- * simply a labeled text field.
- * These editors are used in the Named Types dialog, to prompt for the list of
- * constituent types.
- */
-public class SystemUDSimpleTypesListEditor implements ISystemUDTypeEditPaneTypesSelector {
- protected Text textTypes;
- protected Label typesLabel, nonEditableVerbage;
- private boolean autoUpperCase = false;
- private ISystemValidator typesValidator;
- private int currentDomain = -1;
- protected ISystemMessageLine msgLine;
- protected Shell shell;
-
- /**
- * constructor
- */
- public SystemUDSimpleTypesListEditor(Composite parent, int nbrColumns) {
- shell = parent.getShell();
- createContents(parent, nbrColumns);
- setValidator(new ValidatorUserTypeTypes());
- }
-
- /**
- * Set the msg line in case this composite widget needs to issue an error msg
- */
- public void setMessageLine(ISystemMessageLine msgLine) {
- this.msgLine = msgLine;
- }
-
- /**
- * Create and populate widgets
- */
- protected void createContents(Composite parent, int nbrColumns) {
- textTypes = SystemWidgetHelpers.createLabeledTextField(parent, null, SystemUDAResources.RESID_UDT_TYPES_LABEL, SystemUDAResources.RESID_UDT_TYPES_TOOLTIP);
- typesLabel = SystemWidgetHelpers.getLastLabel();
- ((GridData) textTypes.getLayoutData()).horizontalSpan = nbrColumns - 1;
- textTypes.setTextLimit(ValidatorUserTypeTypes.MAX_UDTTYPES_LENGTH);
- nonEditableVerbage = SystemWidgetHelpers.createVerbiage(parent, "", nbrColumns, false, 200); //$NON-NLS-1$
- nonEditableVerbage.setVisible(false);
- }
-
- /**
- * Set domain.
- * The edit pane may possibly appear differently, depending on the domain.
- * When the domain changes (either in "new" or "edit" mode) this method is called.
- */
- public void setDomain(int domain) {
- this.currentDomain = domain;
- }
-
- /**
- * Get the domain of the currently selected existing new type, or "new" node.
- */
- public int getDomain() {
- return currentDomain;
- }
-
- /**
- * Set the validator to use for the types
- */
- public void setValidator(ISystemValidator validator) {
- typesValidator = validator;
- }
-
- /**
- * Initialize the types. These are stored as a single string using
- * a subsystem-decidable delimiter character.
- */
- public void setTypes(String types) {
- textTypes.setText(types);
- }
-
- /**
- * Clear the types. That is, make sure none are selected. This is
- * called when entering "new" mode.
- */
- public void clearTypes() {
- textTypes.setText(""); //$NON-NLS-1$
- }
-
- /**
- * Retrieve the types as a single string. The delimiter used is up to
- * the implementor, as long as it knows how to parse and assemble the
- * types list as a single string.
- */
- public String getTypes() {
- if (autoUpperCase)
- return textTypes.getText().trim().toUpperCase();
- else
- return textTypes.getText().trim();
- }
-
- /**
- * Allow the edit pane (or any consumer) to be informed as
- * changes are made to the list. When events are fired, the consumer
- * will call getTypes() to get the new list.
- */
- public void addModifyListener(ModifyListener listener) {
- textTypes.addModifyListener(listener);
- }
-
- /**
- * Allow the edit pane (or any consumer) to stop listening as
- * changes are made to the list.
- */
- public void removeModifyListener(ModifyListener listener) {
- textTypes.removeModifyListener(listener);
- }
-
- /**
- * Validate input, and return the error message if an error is found.
- * This is called by the consumer upon receipt of a modify event, to
- * show any error messages and to know if there are errors pending or
- * not.
- */
- public SystemMessage validate() {
- return typesValidator.validate(getTypes());
- }
-
- /**
- * Return primary control for setting focus, among other things
- */
- public Control getControl() {
- return textTypes;
- }
-
- /**
- * Enable or disable the input-capability of the constituent controls
- */
- public void setEnabled(boolean enable) {
- textTypes.setEnabled(enable);
- }
-
- /**
- * We want to disable editing of IBM or vendor-supplied
- * types, so when one of these is selected, this method is
- * called to enter non-editable mode.
- * @param editable Whether to disable editing of this type or not
- * @param vendor When disabling, it contains the name of the vendor for substitution purposes
- */
- public void setEditable(boolean editable, String vendor) {
- textTypes.setEditable(editable);
- if (editable)
- nonEditableVerbage.setVisible(false);
- else {
- nonEditableVerbage.setVisible(true);
- if (vendor.equals("IBM")) //$NON-NLS-1$
- nonEditableVerbage.setText(SystemUDAResources.RESID_UDT_IBM_VERBAGE);
- else {
- String verbage = SystemUDAResources.RESID_UDT_VENDOR_VERBAGE;
- verbage = SystemMessage.sub(verbage, "%1", vendor); //$NON-NLS-1$
- nonEditableVerbage.setText(verbage);
- }
- }
- }
-
- /**
- * Not from interface.
- * Specify if the types are to be auto-uppercased or not.
- * Default is false.
- */
- public void setAutoUpperCase(boolean autoUpperCase) {
- this.autoUpperCase = autoUpperCase;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionCopy.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionCopy.java
deleted file mode 100644
index 628b0ba28..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionCopy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The action allows users to copy the currently selected user action or type to the clipboard
- */
-public class SystemUDTreeActionCopy extends SystemBaseAction {
- private SystemUDBaseTreeView parentTreeView;
-
- /**
- * Constructor
- */
- public SystemUDTreeActionCopy(SystemUDBaseTreeView parentTreeView) {
- super(SystemUDAResources.RESID_UDA_ACTION_COPY_LABEL, SystemUDAResources.RESID_UDA_ACTION_COPY_TOOLTIP, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_TOOL_COPY), null);
- allowOnMultipleSelection(false);
- this.parentTreeView = parentTreeView;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "udac0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the last action/type
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentTreeView.canCopy();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentTreeView.doCopy();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionDelete.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionDelete.java
deleted file mode 100644
index e54cf2362..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionDelete.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The action allows users to delete the currently selected user action or type
- */
-public class SystemUDTreeActionDelete extends SystemBaseAction {
- private SystemUDBaseTreeView parentTreeView;
-
- /**
- * Constructor
- */
- public SystemUDTreeActionDelete(SystemUDBaseTreeView parentTreeView) {
- super(SystemUDAResources.RESID_UDA_ACTION_DELETE_LABEL, SystemUDAResources.RESID_UDA_ACTION_DELETE_TOOLTIP, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_TOOL_DELETE), null);
- allowOnMultipleSelection(false);
- this.parentTreeView = parentTreeView;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "udad0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the last action/type
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentTreeView.canDelete();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentTreeView.doDelete();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveDown.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveDown.java
deleted file mode 100644
index 10232bde3..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveDown.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-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.actions.SystemBaseAction;
-
-/**
- * The action allows users to move the currently selected user action or type down in the list
- */
-public class SystemUDTreeActionMoveDown extends SystemBaseAction {
- private SystemUDBaseTreeView parentTreeView;
-
- /**
- * Constructor
- */
- public SystemUDTreeActionMoveDown(SystemUDBaseTreeView parentTreeView) {
- super(SystemUDAResources.RESID_UDA_ACTION_MOVEDOWN_LABEL, SystemUDAResources.RESID_UDA_ACTION_MOVEDOWN_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_MOVEDOWN_ID), null);
- allowOnMultipleSelection(false);
- this.parentTreeView = parentTreeView;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX + "udmd0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the last action/type
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentTreeView.canMoveDown();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentTreeView.doMoveDown();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveUp.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveUp.java
deleted file mode 100644
index 7260d1301..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionMoveUp.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-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.actions.SystemBaseAction;
-
-/**
- * The action allows users to move the currently selected user action or type up in the list
- */
-public class SystemUDTreeActionMoveUp extends SystemBaseAction {
- private SystemUDBaseTreeView parentTreeView;
-
- /**
- * Constructor
- */
- public SystemUDTreeActionMoveUp(SystemUDBaseTreeView parentTreeView) {
- super(SystemUDAResources.RESID_UDA_ACTION_MOVEUP_LABEL, SystemUDAResources.RESID_UDA_ACTION_MOVEUP_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_MOVEUP_ID), null);
- allowOnMultipleSelection(false);
- this.parentTreeView = parentTreeView;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORDER);
- setHelp(RSEUIPlugin.HELPPREFIX + "udmu0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the fist action/type
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentTreeView.canMoveUp();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentTreeView.doMoveUp();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionPaste.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionPaste.java
deleted file mode 100644
index 90fe429a0..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeActionPaste.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseAction;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The action allows users to paste a user action or type from the clipboard
- */
-public class SystemUDTreeActionPaste extends SystemBaseAction {
- private SystemUDBaseTreeView parentTreeView;
-
- /**
- * Constructor
- */
- public SystemUDTreeActionPaste(SystemUDBaseTreeView parentTreeView) {
- super(SystemUDAResources.RESID_UDA_ACTION_PASTE_LABEL, SystemUDAResources.RESID_UDA_ACTION_PASTE_TOOLTIP, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
- ISharedImages.IMG_TOOL_PASTE), null);
- allowOnMultipleSelection(false);
- this.parentTreeView = parentTreeView;
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "udap0000"); //$NON-NLS-1$
- }
-
- /**
- * We override from parent to do unique checking.
- * We intercept to ensure this is isn't the last action/type
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return parentTreeView.canPaste();
- }
-
- /**
- * This is the method called when the user selects this action.
- */
- public void run() {
- parentTreeView.doPaste();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeViewNewItem.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeViewNewItem.java
deleted file mode 100644
index 041795bc7..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTreeViewNewItem.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-//import com.ibm.etools.systems.core.*;
-/**
- * This represent a tree-node for "New" items
- */
-public class SystemUDTreeViewNewItem {
- // state
- private String label;
- private boolean executable; // cascading or not?
- private int domain = -1;
- private boolean wwActionsDialog; // true for ww user actions, false for ww user types
- // constants
- private static SystemUDTreeViewNewItem rootActionInst, rootTypeInst;
- private static SystemUDTreeViewNewItem rootActionOnlyInst, rootTypeOnlyInst;
-
- /**
- * Constructor
- * @param _executable -> true if this is a leaf node
- * @param _label -> label to show the user, in the tre
- * @param _domain -> domain this represents
- * @param _wwActionsDialog -> true if this is for the ww user actions dialog, false for the ww named types dialog
- */
- public SystemUDTreeViewNewItem(boolean _executable, String _label, int _domain, boolean _wwActionsDialog) {
- super();
- label = _label;
- executable = _executable;
- domain = _domain;
- wwActionsDialog = _wwActionsDialog;
- }
-
- /**
- * Return the label
- */
- public String toString() {
- return label;
- }
-
- /**
- * Is this executable? Ie, should it launch a "New" wizard?
- */
- public boolean isExecutable() {
- return executable;
- }
-
- /**
- * Is this the work with actions dialog (true) or the work with types dialog (false)
- */
- public boolean isWorkWithActionsDialog() {
- return wwActionsDialog;
- }
-
- /**
- * Get the domain this represents
- */
- public int getDomain() {
- return domain;
- }
-
- /**
- * Return singleon instance of new item that does have children.
- * This is used for the first element when domains are supported.
- * @param wwActionsDialog true if called from dialog
- * @param newNodeLabel the translated label for the node.
- */
- public static SystemUDTreeViewNewItem getRootNewItem(boolean wwActionsDialog, String newNodeLabel) {
- if (wwActionsDialog) {
- if (rootActionInst == null) rootActionInst = new SystemUDTreeViewNewItem(false, // this item is not executable
- newNodeLabel, 0, wwActionsDialog);
- return rootActionInst;
- } else {
- if (rootTypeInst == null) rootTypeInst = new SystemUDTreeViewNewItem(false, // this item is not executable
- newNodeLabel, 0, wwActionsDialog);
- return rootTypeInst;
- }
- }
-
- /**
- * Return singleton instance of root new item that does not have children.
- * This is used for the first element when domains are not supported.
- * @param wwActionsDialog true if called from dialog
- * @param newNodeLabel the translated label for the node.
- */
- public static SystemUDTreeViewNewItem getOnlyNewItem(boolean wwActionsDialog, String newNodeLabel) {
- if (wwActionsDialog) {
- if (rootActionOnlyInst == null) rootActionOnlyInst = new SystemUDTreeViewNewItem(true, // this item is executable
- newNodeLabel, -1, wwActionsDialog);
- return rootActionOnlyInst;
- } else {
- if (rootTypeOnlyInst == null) rootTypeOnlyInst = new SystemUDTreeViewNewItem(true, // this item is executable
- newNodeLabel, -1, wwActionsDialog);
- return rootTypeOnlyInst;
- }
- }
-
- /**
- * Return non-singleton instance of root new item that does not have children.
- * This is used for the first element when domains are supported internally, but externally
- * only one is used.
- * @param domain - the domain to use
- * @param wwActionsDialog - true if called from dialog
- * @param newNodeLabel - the translated label for the node
- */
- public static SystemUDTreeViewNewItem getOnlyNewItem(int domain, boolean wwActionsDialog, String newNodeLabel) {
- return new SystemUDTreeViewNewItem(true, // this item is executable
- newNodeLabel, domain, wwActionsDialog);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java
deleted file mode 100644
index ca023264a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java
+++ /dev/null
@@ -1,536 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Kevin Doyle (IBM) - [242717] Need a way to set the name validator of Named Types
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.util.Vector;
-
-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.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
-import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserTypeName;
-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.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
-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.Text;
-
-/**
- * This is the eidt pane on the right, when a named type is selected
- * on the left (or "New" is selected). It is used to create or edit
- * a named type definition, which is nothing more than a name associated
- * with one or more file types.
- */
-public class SystemUDTypeEditPane implements ISelectionChangedListener {
- // gui
- private Composite comp;
- private Text textName;
- private ISystemUDTypeEditPaneTypesSelector typesEditor;
- // input
- protected SystemUDActionSubsystem udaActionSubsys;
- protected ISubSystem subsystem;
- protected ISubSystemConfiguration subsystemFactory;
- protected ISystemProfile profile;
- protected ISystemUDTreeView treeView;
- protected ISystemUDAEditPaneHoster parentDialog;
- // validators
- private ISystemValidator nameValidator;
- // listeners
- private NameModifyListener nameML = new NameModifyListener();
- private TypesModifyListener typesML = new TypesModifyListener();
- // current error message
- private SystemMessage errorMessage;
- // state related to current selection or state
- private boolean newMode = false;
- private boolean recursiveCall = false;
- private int newModeDomain = -1;
- private SystemUDTreeViewNewItem newModeNewItem;
- private SystemEditPaneStateMachine stateMachine;
- private int currentDomain = -1;
- private SystemUDTypeElement currentType;
- // misc state
- private boolean nameChanged = false;
- private boolean isEnabled = false;
- private boolean ignoreChanges = false;
- // constants
- private static final Vector EMPTY_VECTOR = new Vector();
-
- /**
- * Constructor
- */
- public SystemUDTypeEditPane(SystemUDActionSubsystem udaActionSubsys, ISystemUDAEditPaneHoster parent, ISystemUDTreeView tv) {
- super();
- this.udaActionSubsys = udaActionSubsys;
- subsystem = udaActionSubsys.getSubsystem();
- subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = subsystem.getSystemProfile();
- //this.subsystemFactory = ss.getParentSubSystemFactory();
- //this.profile = ss.getSystemProfile();
- treeView = tv;
- parentDialog = parent;
- }
-
- /**
- * Set domain.
- * The edit pane may possibly appear differently, depending on the domain.
- * When the domain changes (either in "new" or "edit" mode) this method is called.
- */
- public void setDomain(int domain) {
- this.currentDomain = domain;
- if (typesEditor != null) typesEditor.setDomain(domain);
- }
-
- /**
- * Get the current domain.
- * This is equivalent to newModeDomain in "new" mode, and currentType.getDomain() in "edit" mode
- */
- public int getDomain() {
- if (currentDomain == -1) {
- if (newMode)
- return newModeDomain;
- else if (currentType != null)
- return currentType.getDomain();
- else
- return -1;
- } else
- return currentDomain;
- }
-
- /**
- * Set the state machine.
- * Called by the UDA dialog
- */
- public void setStateMachine(SystemEditPaneStateMachine sm) {
- this.stateMachine = sm;
- }
-
- /**
- * Create widgets and populate/return composite
- */
- public Control createContents(Composite parent) {
- if (nameValidator == null)
- nameValidator = new ValidatorUserTypeName();
-
- // Inner composite
- int nbrColumns = 2;
- comp = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- // Action name
- textName = SystemWidgetHelpers.createLabeledTextField(comp, null, SystemUDAResources.RESID_UDT_NAME_LABEL, SystemUDAResources.RESID_UDT_NAME_TOOLTIP);
- // List of selected types as a single string...
- typesEditor = createTypesListEditor(comp, nbrColumns);
- typesEditor.setMessageLine(parentDialog);
- // configuration of widgets...
- textName.setTextLimit(ValidatorUserTypeName.MAX_UDTNAME_LENGTH);
- return comp;
- }
-
- /**
- * Overridable exit point.
- * Create the edit widgets that will allow the user to see and
- * edit the list of file types that constitute this named type.
- * <p>
- * To better facilitate this, the only requirement is that this
- * "editor" meet the minimal interface
- * {@link org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector}
- * <p>
- * The default implementation is simply a labeled entry field!
- *
- * @param parent - the parent composite where the widgets are to go
- * @param nbrColumns - the number of columns in the parent composite, which these
- * widgets should span
- * @return a class implementing the required interface
- */
- protected ISystemUDTypeEditPaneTypesSelector createTypesListEditor(Composite parent, int nbrColumns) {
- SystemUDSimpleTypesListEditor simpleEditor = new SystemUDSimpleTypesListEditor(parent, nbrColumns);
- simpleEditor.setAutoUpperCase(getAutoUpperCaseTypes());
- return simpleEditor;
- }
-
- /**
- * Overridable exit point.
- * Return true if the types are to be auto-uppercased.
- * Default is true.
- * Only used if not supplying your own types editor.
- */
- protected boolean getAutoUpperCaseTypes() {
- return true;
- }
-
- /**
- * Enable/disable entire pane
- */
- public void setEnabled(boolean enable) {
- textName.setEnabled(enable);
- typesEditor.setEnabled(enable);
- }
-
- /**
- * Check all input for errors
- * @param setFocus - true if to set focus on offending control
- * @param skipControl - control to skip since already checked
- * @return true if no errors
- */
- protected boolean validateInput(boolean setFocus, Control skipControl) {
- Control errCtl = null;
- errorMessage = null;
- if (skipControl != textName) errorMessage = nameValidator.validate(textName.getText().trim());
- errCtl = textName;
- if ((errorMessage == null) && (skipControl != typesEditor.getControl())) {
- errorMessage = typesEditor.validate();
- if (errorMessage == null) errorMessage = doTypesStringValidation(setFocus);
- errCtl = typesEditor.getControl();
- }
- if (errorMessage == null) errorMessage = doAdditionalValidation(setFocus); // let child classes try
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- if (setFocus) errCtl.setFocus();
- } else
- parentDialog.clearErrorMessage();
- setPageComplete();
- return (errorMessage == null);
- }
-
- /**
- * Overridable entry point for doing validation of the type string.
- * Called by validateInput.
- * If setFocus is true, set the focus at the appropriate widget that is in error.
- * If setFocus is true, you can assume we are doing OK processing vs keystroke processor.
- * @return error message if an error detected, else null
- */
- protected SystemMessage doTypesStringValidation(boolean doSetFocus) {
- return null;
- }
-
- /**
- * Overridable entry point for doing validation of input.
- * Called by validateInput.
- * If setFocus is true, set the focus at the appropriate widget that is in error.
- * If setFocus is true, you can assume we are doing OK processing vs keystroke processor.
- * @return error message if an error detected, else null
- */
- protected SystemMessage doAdditionalValidation(boolean doSetFocus) {
- return null;
- }
-
- // Scenario: User edits an item, producing a syntax error.
- // (eg. clear action name field) Gets error msg, OK button disabled.
- // then changes selection to another item.
- // Current Problem: Error msg stays, OK remains disabled, until
- // they edit a field. (ValidateInput isnt re-reun until
- // another field is changed.)
- // Solution: When changing selection, reset the errorMessage and
- // page-valid status. Can get away with this because we
- // do not propagate invalid field changes to the UDA data in memory.
- private void resetPageValidation() {
- errorMessage = null;
- parentDialog.clearErrorMessage();
- parentDialog.setPageComplete(true);
- }
-
- /**
- * Return true if the page is complete, so to enable Finish.
- * Called by setPageComplete
- */
- protected boolean isPageComplete() {
- return ((errorMessage == null) && (textName.getText().trim().length() > 0) && (typesEditor.getTypes().length() > 0));
- }
-
- /**
- * Set page complete... enables/disables Apply button
- */
- protected void setPageComplete() {
- boolean complete = isPageComplete();
- parentDialog.setPageComplete(complete);
- }
-
- /**
- * Call this whenever the user makes ANY changes.
- * Used to enable/disable apply/revert buttons
- */
- protected void setChangesMade() {
- if (stateMachine != null) stateMachine.setChangesMade();
- }
-
- /**
- * Are errors pending? If so, don't allow user to change selection
- * or profile or anything!
- */
- public boolean areErrorsPending() {
- return ((errorMessage != null) && ((currentType != null) || newMode));
- }
-
- /**
- * This is called when user changes their selection in the left-side tree view
- */
- public void selectionChanged(SelectionChangedEvent se) {
- if (recursiveCall) return; // ignore!
- // Calling the setText() methods here was causing Modify events
- // when just switching the selection, even on Domain items, leading
- // to setComment(), etc calls on the Action item, caausing these tags to
- // even be written in the saved XML. Even for Domain items!
- // So, turning off/on the modifyListeners around the selection change,
- // based on the isEnabled switch
- IStructuredSelection ss = (IStructuredSelection) se.getSelection();
- Object so = ss.getFirstElement();
- // if old selection has validation errors, don't allow selection to be changed.
- if (areErrorsPending()) {
- // Verify old selection has not been deleted from tree
- if (newMode || SystemUDBaseManager.inCurrentTree(currentType.getElement())) {
- if (!newMode && (so != currentType))
- treeView.setSelection(new StructuredSelection(currentType));
- else if (newMode && (so != newModeNewItem)) treeView.setSelection(new StructuredSelection(newModeNewItem));
- return;
- }
- }
- // We need to test for pending changes, and if any are pending, prompt
- // user to continue (and lose changes) or cancel...
- if ((stateMachine != null) && stateMachine.isSaveRequired()) {
- saveData();
- if (newMode) {
- // interesting problem! The save of the new data resulted in a new node,
- // but this is not visible in the tree view. To make it visible means we
- // we will lose focus, and this method will be recalled recursively...
- recursiveCall = true;
- treeView.refreshElementParent(currentType); // show new item in tree view
- recursiveCall = false;
- if (so instanceof SystemUDTypeElement) // if user was selecting a type, it might have a new binary address after the refresh
- treeView.selectElement((SystemUDTypeElement) so);
- else if (so != null) treeView.setSelection(new StructuredSelection(so)); // restore what user selected
- return; // avoid recursion!
- }
- }
- recursiveCall = false;
- // Clear any page-valid errors remaining from previous selection
- // (Since validation on the new selection is only run if editing
- // changes are made
- errorMessage = null;
- resetPageValidation();
- newMode = ((so instanceof SystemUDTreeViewNewItem) && ((SystemUDTreeViewNewItem) so).isExecutable());
- // Refresh tree view if name changed on last item
- if (nameChanged) {
- nameChanged = false;
- if (null != currentType) treeView.refresh(currentType);
- }
- SystemUDTypeElement sn = null;
- if ((null != so) && (so instanceof SystemUDTypeElement)) sn = (SystemUDTypeElement) so;
- currentType = sn;
- // Disable modifyListeners prior to resetting fields
- if (isEnabled) {
- textName.removeModifyListener(nameML);
- typesEditor.removeModifyListener(typesML);
- }
- // Clear all fields if not a file type entry. Could be a domain node
- //boolean prevEnabledState = isEnabled;
- //boolean newEnabledState = false;
- // domain node selected. Note we will be hidden in this case, by the
- // state machine
- if (!newMode && ((null == sn) || sn.isDomain())) {
- isEnabled = false;
- //newEnabledState = false;
- textName.setText(""); //$NON-NLS-1$
- typesEditor.clearTypes();
- }
- // "new" node or existing node selected
- else {
- isEnabled = true;
- //newEnabledState = true;
- if (!newMode && sn != null) {
- textName.setText(sn.toString());
- typesEditor.setTypes(sn.getTypes());
- //setEnabled(!treeView.isElementAllSelected() && !treeView.isSelectionVendorSupplied());
- //typesEditor.setEditable(!treeView.isSelectionVendorSupplied(), treeView.getVendorOfSelection());
- setEnabled(!treeView.isElementAllSelected());
- typesEditor.setEditable(!treeView.isElementAllSelected(), treeView.isElementAllSelected() ? treeView.getVendorOfSelection() : null);
- } else {
- textName.setText(""); //$NON-NLS-1$
- typesEditor.clearTypes();
- typesEditor.setEditable(true, null);
- setEnabled(true);
- }
- // isEnabled will = true when leaving this logic branch
- // Will always need to re-add the listeners
- textName.addModifyListener(nameML);
- typesEditor.addModifyListener(typesML);
- }
- //System.out.println("selection changed: " + (testCounter++) + ", new? " + newMode + ", enabled? " + isEnabled);
- // update state machine
- if (newMode) {
- stateMachine.setNewMode(); // resets Apply/Reset button status
- newModeNewItem = (SystemUDTreeViewNewItem) so;
- newModeDomain = newModeNewItem.getDomain();
- if (newModeDomain != currentDomain) setDomain(newModeDomain); //indicate domain change
- } else if ((sn == null) || sn.isDomain()) {
- stateMachine.setUnsetMode(); // resets Apply/Reset button status
- } else {
- stateMachine.setEditMode(); // resets Apply/Reset button status }
- if (sn.getDomain() != currentDomain) setDomain(sn.getDomain()); //indicate domain change
- }
- if (nameValidator instanceof ISystemValidatorUniqueString)
- ((ISystemValidatorUniqueString) nameValidator).setExistingNamesList(getExistingNames());
- setPageComplete();
- }
-
- /**
- * Need to add/remove listeners around selection changes, so
- * I can set text fields without triggering modify event.
- * So listeners implemented as internal classes
- */
- private class NameModifyListener implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (ignoreChanges) return;
- setChangesMade();
- String s = textName.getText().trim().toUpperCase();
- errorMessage = nameValidator.validate(s);
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- setPageComplete();
- } else {
- validateInput(false, textName);
- if (currentType != null) {
- nameChanged = true;
- }
- }
- }
- } //class
-
- private class TypesModifyListener implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (ignoreChanges) return;
- setChangesMade();
- errorMessage = typesEditor.validate();
- if (errorMessage != null) {
- parentDialog.setErrorMessage(errorMessage);
- setPageComplete();
- } else {
- validateInput(false, typesEditor.getControl());
- }
- }
- } //class
-
- /**
- * For uniqueness checking, get the list of existing type names
- */
- protected Vector getExistingNames() {
- if (newMode) {
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDTypeManager udtm = udas.getUDTypeManager();
- return udtm.getExistingNames(null, newModeDomain);
- } else if (currentType != null)
- return currentType.getExistingNames();
- else
- return EMPTY_VECTOR;
- }
-
- /**
- * Return the user defined action subsystem
- */
- protected SystemUDActionSubsystem getUDActionSubsystem() {
- return udaActionSubsys;
- }
-
- /**
- * When user presses Apply, commit all pending changes...
- */
- protected void processChanges() {
- currentType.setName(textName.getText().trim());
- currentType.setTypes(typesEditor.getTypes());
- } //process changes
-
- /**
- * Save current state to disk
- */
- protected void saveData() {
- if (newMode) {
- currentType = createNewType(textName.getText().trim(), newModeDomain);
- }
- processChanges();
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDTypeManager udtm = udas.getUDTypeManager();
- udtm.saveUserData();
- // inform anybody registered as listeners that we have created/changed model object...
- if (newMode)
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE, currentType, null);
- else
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE, currentType, null);
- }
-
- /**
- * In "new" mode, create a new type when Apply is pressed.
- * This only creates the type. It does not populate the attributes
- * @return The new action
- */
- protected SystemUDTypeElement createNewType(String typeName, int domain) {
- // code was originally in SystemNewUDAsWizardMainPage
- SystemUDActionSubsystem udas = getUDActionSubsystem();
- SystemUDTypeManager udtm = udas.getUDTypeManager();
- SystemUDTypeElement nt = udtm.addType(domain, typeName);
- return nt;
- }
-
- /**
- * Revert button pressed
- */
- public void revertPressed() {
- ignoreChanges = true;
- resetPageValidation();
- if ((currentType != null) && !currentType.isDomain()) {
- textName.setText(currentType.toString());
- typesEditor.setTypes(currentType.getTypes());
- if (stateMachine != null) stateMachine.resetPressed();
- } else if (newMode) {
- textName.setText(""); //$NON-NLS-1$
- typesEditor.clearTypes();
- if (stateMachine != null) stateMachine.resetPressed();
- }
- ignoreChanges = false;
- setPageComplete();
- }
-
- /**
- * Process the apply button
- */
- public void applyPressed() {
- if ((newMode || ((currentType != null) && !currentType.isDomain())) && validateInput(true, null)) {
- saveData();
- if (stateMachine != null) stateMachine.applyPressed();
- if (newMode) {
- // Now update tree view to show new item
- recursiveCall = true;
- treeView.refreshElementParent(currentType);
- recursiveCall = false;
- treeView.selectElement(currentType);
- } else
- treeView.refresh(currentType);
- }
- setPageComplete();
- } //apply
-
- public void setNameValidator(ISystemValidator validator) {
- nameValidator = validator;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeElement.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeElement.java
deleted file mode 100644
index 3ae3dfa27..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.internal.useractions.UserActionsIcon;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Wraps a "Type" XML tag
- */
-public class SystemUDTypeElement extends SystemXMLElementWrapper {
- private final static String NO_TYPE = ""; //$NON-NLS-1$
- private final static String TYPES_TAG = "Types"; //$NON-NLS-1$
- private final static String TYPE_TAG = "Type"; //$NON-NLS-1$
-
- /**
- * Constructor
- * @param element The actual xml document element for this action
- * @param tm The subsystemFactory-specific manager of actions
- * @param domainType - The integer representation of the domain this is in (or this is, for a domain element)
- */
- public SystemUDTypeElement(IPropertySet element, SystemUDTypeManager tm, int domainType) {
- super(element, tm, null, domainType);
- }
-
- /**
- * Return image to use for this item, in tree views
- */
- public Image getImage() {
- Image image = null;
- if (isIBM()) {
- if (isUserChanged())
- image = UserActionsIcon.USERTYPE_IBMUSR.getImage();
- else
- image = UserActionsIcon.USERTYPE_IBM.getImage();
- } else
- image = UserActionsIcon.USERTYPE_USR.getImage();
- //System.out.println("... image returned = "+image);
- return image;
- }
-
- /**
- * Return our tag name
- */
- public String getTagName() {
- return TYPE_TAG;
- }
-
- /**
- * Return the list of types
- */
- public String getTypes() {
- IProperty typesProperty = elm.getProperty(TYPES_TAG);
- if (typesProperty != null)
- {
- return typesProperty.getValue();
- }
- return NO_TYPE;
- }
-
- /**
- * Set the list of types
- */
- public void setTypes(String s) {
- IProperty typesProperty = elm.getProperty(TYPES_TAG);
- if (typesProperty == null)
- {
- typesProperty = elm.addProperty(TYPES_TAG, s);
- }
- else
- {
- typesProperty.setValue(s);
- }
- setUserChanged(true);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java
deleted file mode 100644
index 0e7094408..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.internal.useractions.UserActionsIcon;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Instances of this class hold the UDA Type definitions unique to
- * the SubSystem type - according to the SubSystemFactory
- *
- * Note that unlike user actions, types are not scoped by profile.
- * For each subsystem factory there is but a single master list of types.
- *
- * Instances of this class will be linked to a SubSystem instance for
- * now, but should be linked to a subsystem factory instance in the future.
- *
- */
-public class SystemUDTypeManager extends SystemUDBaseManager {
- private static final String XE_ROOT = ISystemUDAConstants.FILETYPES_ROOT;
- public static final String XE_TYPE = "Type"; //$NON-NLS-1$
- public static final String ALL_TYPE = "ALL"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public SystemUDTypeManager(SystemUDActionSubsystem udas) {
- super(udas);
- }
-
- /**
- * Return true if this is user actions, false if this is named types.
- */
- protected boolean isUserActionsManager() {
- return false;
- }
-
- /**
- * Get the icon to show in the tree views, for the "new" expandable item
- */
- public Image getNewImage() {
- return UserActionsIcon.USERTYPE_NEW.getImage();
- }
-
-
- /**
- * Overridable extension point for child classes to do migration of their document.
- * This is called on first load of a document, which has a release stamp other than
- * the current release
- * @return true if any migration was done
- */
- protected boolean doMigration(ISystemProfile profile, String oldRelease) {
- return getActionSubSystem().doTypesMigration(profile, oldRelease);
- }
-
- /**
- * Parent method override for returning the "New" icon label for the Work With dialog tree view.
- * For us, we defer to the getActionSubSystem().{@link SystemUDActionSubsystem#getNewNodeTypeLabel() getNewNodeTypeLabel()}.
- * Do not override this.
- * @return translated value for "New" in new icon for WW action and type dialogs. Default is "New"
- */
- protected String getNewNodeLabel() {
- return getActionSubSystem().getNewNodeTypeLabel();
- }
-
- // -----------------------------------------------------------
- // ISystemXMLElementWrapperFactory
- // -----------------------------------------------------------
- /**
- * Return the tag name for our managed elements.
- * Eg: will be "Action" for user actions, and "Type" for file types.
- */
- public String getTagName() {
- return XE_TYPE;
- }
-
- /**
- * Given an xml element node, create an instance of the appropriate
- * subclass of SystemXMLElementWrapper to represent it.
- */
- public SystemXMLElementWrapper createElementWrapper(IPropertySet xmlElementToWrap, ISystemProfile profile, int domain) {
- SystemUDTypeElement elementWrapper = new SystemUDTypeElement(xmlElementToWrap, this, domain);
- return elementWrapper;
- }
-
- // -----------------------------------------------------------
- // THE FOLLOWING ARE PARENT METHODS THAT ABSTRACT OUT THE
- // DIFFERENCES BETWEEN ACTIONS AND TYPES
- // -----------------------------------------------------------
- /**
- * Get the document root tag name.
- * We return "FileTypes"
- */
- public String getDocumentRootTagName() {
- return XE_ROOT; // "FileTypes"
- }
-
- /**
- * Do we uppercase the value of the "Name" attribute?
- * Yes, we do for types
- */
- protected boolean uppercaseName() {
- return true;
- }
-
- /**
- * Return true if the elements managed by this class are scoped by
- * profile. Usually true for actions, false for types
- */
- public boolean supportsProfiles() {
- return false;
- }
-
- /**
- * Prime the given document with any default types
- * Calls primeDefaultTypes in action subsystem.
- */
- public SystemXMLElementWrapper[] primeDocument(ISystemProfile profile) {
- return getActionSubSystem().primeDefaultTypes(this);
- }
-
-
-
-
-
- /**
- * Indicate data has changed for the given profile
- */
- protected void dataChanged(ISystemProfile profile) {
- // ADDED THIS LINE TO RESET THE RESOLVED TYPES WHEN A TYPE IS ADDED
- _udas.resetResolvedTypes();
- }
-
- // -----------------------------------------------------------
- // TYPE-MANAGER UNIQUE METHODS...
- // -----------------------------------------------------------
- /**
- * Given a type name and domain, find the named type and return
- * its types, or null if not found
- */
- public String getTypesForTypeName(String typeName, int domain) {
- ISystemProfile profile = getSubSystem().getSystemProfile();
- SystemUDTypeElement element = (SystemUDTypeElement) findByName(profile, typeName, domain);
- if (element != null)
- return element.getTypes();
- else
- return null;
- }
-
- /**
- * Return xml element wrapper objects for all types, for the
- * given domain, or for the whole document if domain is -1 (iff
- * domains not supported).
- * @param v - existing vector to populate. If null passed, it is
- * not populated.
- * @param domain - the integer representation of the given domain,
- * or -1 iff supportsDomains() is false
- * @return array of type objects
- */
- public SystemUDTypeElement[] getTypes(Vector v, int domain) {
- v = super.getXMLWrappers(v, domain, _udas.getSubsystem().getSystemProfile());
- if (v == null) return new SystemUDTypeElement[0];
- SystemUDTypeElement[] types = new SystemUDTypeElement[v.size()];
- for (int idx = 0; idx < types.length; idx++)
- types[idx] = (SystemUDTypeElement) v.elementAt(idx);
- return types;
- }
-
- /**
- * Return list of names of types in the given domain, or in doc
- * if domain is -1 (which must only happen if supportsDomains() is false!)
- */
- public String[] getTypeNames(int domain) {
- Vector v = new Vector();
- // step 1: find the parent domain object, if any...
- if (domain != -1) {
- SystemUDTypeElement parentDomainElement = (SystemUDTypeElement) getDomainWrapper(null, domain);
- // step 1a: ask that parent to return its children names...
- v = parentDomainElement.getExistingNames();
- String[] names = new String[v.size()];
- for (int idx = 0; idx < names.length; idx++)
- names[idx] = (String) v.elementAt(idx);
- return names;
- }
- // step 2: no domain name given, so assume document roots are the types so find them and return their names
- else {
- v = SystemXMLElementWrapper.getExistingNames(null, getDocument(null), XE_TYPE);
- String[] names = new String[v.size()];
- for (int idx = 0; idx < names.length; idx++)
- names[idx] = (String) v.elementAt(idx);
- return names;
- }
- }
-
- /**
- * Add a new user type.
- * Creates the new XML node in the document,
- * and creates and returns a wrapper object for it.
- * <p>
- * Optimized flavour of addElement that does not require a profile,
- * and is typed to return SystemUDTypeElement
- */
- public SystemUDTypeElement addType(int domain, String name) {
- ISystemProfile profile = getSubSystem().getSystemProfile();
- return (SystemUDTypeElement) super.addElement(profile, domain, name);
- }
-
- /**
- * Delete a give user action or type, given its wrapper.
- * Deletes the xml node from the document.
- * <p>
- * Optimized flavour of delete that does not require a profile,
- * and is typed to take SystemUDTypeElement
- */
- public void delete(SystemUDTypeElement typeElement) {
- super.delete(null, typeElement);
- }
-
- // -------------------------------------------------------------------------
- // SPECIAL FLAVOURS OF PARENT METHODS, THAT DON'T REQUIRE A PROFILE PARM...
- // -------------------------------------------------------------------------
- /**
- * Save user data
- */
- public void saveUserData() {
- ISystemProfile profile = getActionSubSystem().getSubsystem().getSystemProfile();
- super.saveUserData(profile);
- }
- /*
- * Get our xml document
- *
- protected Document getDocument()
- {
- return super.getDocument(null);
- }*/
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java
deleted file mode 100644
index dc7128abb..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- * Kevin Doyle (IBM) - [222831] Can't Delete User Actions/Named Types
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * In the Work With User Defined File Types dialog, this is the
- * tree view for showing the existing types.
- */
-public class SystemUDTypeTreeView extends SystemUDBaseTreeView {
- /**
- * Constructor when we have a subsystem
- */
- public SystemUDTypeTreeView(Composite parent, ISystemUDWorkWithDialog editPane, ISubSystem ss, SystemUDActionSubsystem udaActionSubsystem) {
- /* FIXME - UDA not coupled with subsystem API anymore */
- super(parent, editPane, ss, udaActionSubsystem.getUDTypeManager());
- }
-
- /**
- * Constructor when we have a subsystem factory and profile
- */
- public SystemUDTypeTreeView(Composite parent, ISystemUDWorkWithDialog editPane, ISubSystemConfiguration ssFactory, ISystemProfile profile) {
- super(parent, editPane, ssFactory, profile,
- /* FIXME - UDA not coupled with subsystem API anymore
- ((ISubsystemFactoryAdapter)ssFactory.getAdapter(ISubsystemFactoryAdapter.class)).getActionSubSystem(ssFactory, null).getUDTypeManager()
- */
- null);
- }
-
- /**
- * Return types manager
- */
- public SystemUDTypeManager getTypeManager() {
- return (SystemUDTypeManager) super.getDocumentManager();
- }
-
- /**
- * Get the selected type name.
- * Returns "" if nothing selected
- */
- public String getSelectedTypeName() {
- return super.getSelectedElementName();
- }
-
- /**
- * Get the selected type domain.
- * Returns -1 if nothing selected or domains not supported
- */
- public int getSelectedTypeDomain() {
- return super.getSelectedElementDomain();
- }
-
- /**
- * Return message for delete confirmation
- */
- protected SystemMessage getDeleteConfirmationMessage() {
- SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_CONFIRM_DELETE_USERTYPE,
- IStatus.WARNING, UserActionsResources.MSG_CONFIRM_DELETE_USERTYPE, UserActionsResources.MSG_CONFIRM_DELETE_USERTYPE_DETAILS);
- msg.setIndicator(SystemMessage.INQUIRY);
- return msg;
- }
-
- /**
- * Return the {@link org.eclipse.rse.core.events.ISystemModelChangeEvents} constant representing the resource type managed by this tree.
- * This is a parent class override.
- */
- protected int getResourceType() {
- return IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE;
- }
-
- /**
- * Parent override.
- * Restore the selected type to its IBM-supplied default value.
- */
- public void doRestore() {
- SystemXMLElementWrapper selectedElement = getSelectedElement();
- if ((selectedElement == null) || !(selectedElement instanceof SystemUDTypeElement)) return;
- SystemUDTypeElement type = (SystemUDTypeElement) selectedElement;
- boolean ok = getDocumentManager().getActionSubSystem().restoreDefaultType(type, type.getDomain(), type.getOriginalName());
- if (ok) {
- type.setUserChanged(false);
- getDocumentManager().saveUserData(profile);
- selectElement(selectedElement);
- String[] allProps = { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
- update(selectedElement, allProps);
- }
- }
-
- // ------------------------------------
- // HELPER METHODS CALLED FROM EDIT PANE
- // ------------------------------------
- /**
- * Select the given type
- */
- public void selectType(SystemUDTypeElement element) {
- super.selectElement(element);
- }
-
- /**
- * Refresh the parent of the given action.
- * That is, find the parent and refresh the children.
- * If the parent is not found, assume it is because it is new too,
- * so refresh the whole tree.
- */
- public void refreshTypeParent(SystemUDTypeElement element) {
- super.refreshElementParent(element);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtension.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtension.java
deleted file mode 100644
index 56ef482da..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtension.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.rse.core.IRSESystemType;
-
-/**
- * This class represents a user action read from a user action extension point
- * <p>
- * THIS CLASS IS THE BEGINNING OF SUPPORT FOR USER ACTION EXTENSION POINTS.
- * IT IS NOT COMPLETE YET AND NOT SUPPORTED YET.
- */
-public class SystemUserActionExtension {
- private String types;
- private String id, vendor;
- private boolean allTypes;
-
- // SEE FILE plugin.xml.udaExtensionPoint.notused
- /**
- * Constructor
- */
- public SystemUserActionExtension(IConfigurationElement element) {
- types = element.getAttribute("systemTypes"); //$NON-NLS-1$
- if ((types == null) || types.equals("*")) //$NON-NLS-1$
- allTypes = true;
- id = element.getAttribute("id"); //$NON-NLS-1$
- vendor = element.getAttribute("vendor"); //$NON-NLS-1$
- }
-
- /**
- * Return the value of the "vendor" attribute
- */
- public String getVendor() {
- return vendor;
- }
-
- /**
- * Return the value of the "id" attribute
- */
- public String getId() {
- return id;
- }
-
- /**
- * Return true if this extension's systemTypes attribute matches the given system type
- */
- public boolean appliesToSystemType(IRSESystemType type) {
- //System.out.println("INSIDE APPLIESTO FOR " + type + ". allTypes = " + allTypes + ". types = " + types);
- if (allTypes)
- return true;
- else {
- //FIXME migrate to using ID
- return (types.indexOf(type.getId()) >= 0);
- }
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtensionManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtensionManager.java
deleted file mode 100644
index 41e90c2dd..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUserActionExtensionManager.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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) - [184095] Replace systemTypeName by IRSESystemType
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-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.rse.core.IRSESystemType;
-
-/**
- * This class manages reading user action extension points.
- * Each subsystem is responsible for defining their own extension points
- * to allow BPs and ISVs to pre-supply user actions, if desired.
- * <p>
- * Further, the extension points must all support a common set of subtags:
- * <code>userActionContribution</code>,
- * <code>namedType</code> and <code>userAction</code>.
- * <p>
- * This class is the base class for the reader for parsing these
- * extension points.
- *
- * <p>
- * THIS CLASS IS THE BEGINNING OF SUPPORT FOR USER ACTION EXTENSION POINTS.
- * IT IS NOT COMPLETE YET AND NOT SUPPORTED YET.
- */
-public class SystemUserActionExtensionManager {
- private String pluginID, extensionID;
- private boolean read;
- private Vector elements;
-
- // SEE FILE plugin.xml.udaExtensionPoint.notused
- /**
- * Constructor
- * @param pluginID - the ID of the plugin which defined this extension
- * @param extensionID - the ID of the extension
- */
- public SystemUserActionExtensionManager(String pluginID, String extensionID) {
- this.pluginID = pluginID;
- this.extensionID = extensionID;
- }
-
- /**
- * Return list of user-actions defined by the given extension point, for the given
- * system type.
- */
- public SystemUserActionExtension[] getUserActionExtensions(IRSESystemType systemType) {
- int count = 0;
- if (!read) readExtensions();
- if ((elements == null) || (elements.size() == 0)) return null;
- for (int idx = 0; idx < elements.size(); idx++) {
- SystemUserActionExtension currAction = (SystemUserActionExtension) elements.elementAt(idx);
- if (currAction.appliesToSystemType(systemType)) ++count;
- }
- if (count == 0) return null;
- SystemUserActionExtension[] actions = new SystemUserActionExtension[count];
- count = 0;
- for (int idx = 0; idx < elements.size(); idx++) {
- SystemUserActionExtension currAction = (SystemUserActionExtension) elements.elementAt(idx);
- if (currAction.appliesToSystemType(systemType)) actions[count++] = currAction;
- }
- return actions;
- }
-
- /**
- * Return true if the extensions have been read in yet from the registry
- */
- protected boolean hasBeenRead() {
- return read;
- }
-
- /**
- * Read list of extensions from registry
- */
- protected void readExtensions() {
- // Get reference to the plug-in registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- // Get configured extenders
- IConfigurationElement[] userActionExtensions = registry.getConfigurationElementsFor(pluginID, extensionID);
- if (userActionExtensions != null) {
- elements = new Vector();
- for (int idx = 0; idx < userActionExtensions.length; idx++) {
- elements.add(createUserActionExtension(userActionExtensions[idx]));
- }
- }
- read = true;
- }
-
- /**
- * Overridable method for instantiating a new SystemUserActionExtension object
- */
- protected SystemUserActionExtension createUserActionExtension(IConfigurationElement element) {
- return new SystemUserActionExtension(element);
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDAsDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDAsDialog.java
deleted file mode 100644
index d90aecf9a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDAsDialog.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- *******************************************************************************/
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemProfile;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.widgets.ISystemEditPaneStates;
-import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
-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.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.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * A dialog that allows the user to manipulate their user defined actions for a
- * given subsystem factory.
- */
-public class SystemWorkWithUDAsDialog extends SystemPromptDialog implements ISystemUDWorkWithDialog, ISystemUDAEditPaneHoster, Listener, SelectionListener,
- Runnable {
- // Changes:
- // June 2002, Phil Coulthard: Added prompt for parent profile, similar to New Connection and New Filter Pool wizards.
- // Similar to SystemConnectionForm
- protected Shell shell; // shell hosting this viewer
- // GUI widgets
- protected Label labelProfile, labelProfileValue;
- protected Combo profileCombo;
- protected SystemUDActionTreeView treeView;
- protected int prevProfileComboSelection = 0;
- // inputs
- protected ISubSystem subsystem;
- protected ISubSystemConfiguration subsystemFactory;
- protected SystemUDActionSubsystem udaActionSubsystem;
- //protected String defaultProfileName;
- //protected String[] defaultProfileNames;
- protected ISystemProfile[] systemProfiles;
- protected ISystemProfile currentProfile;
- // state
- protected SystemUDActionEditPane editpane;
- protected Button applyButton, revertButton;
- protected SystemEditPaneStateMachine sm;
-
- /**
- * Constructor when we have a subsystem
- */
- public SystemWorkWithUDAsDialog(Shell shell, ISubSystem ss, SystemUDActionSubsystem udaActionSubsystem) {
- super(shell, SystemUDAResources.RESID_WORKWITH_UDAS_TITLE);
- setCancelButtonLabel(SystemUDAResources.BUTTON_CLOSE);
- setShowOkButton(false);
- this.shell = shell;
- this.subsystem = ss;
- this.subsystemFactory = ss.getSubSystemConfiguration();
- this.udaActionSubsystem = udaActionSubsystem;
- setProfiles(RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles(), subsystem.getSystemProfile());
- //setMinimumSize(600, 520); // x, y
- //pack();
- setHelp();
- }
-
- /**
- * Constructor when we have a subsystem factory
- */
- public SystemWorkWithUDAsDialog(Shell shell, ISubSystemConfiguration ssFactory, ISystemProfile profile, SystemUDActionSubsystem udaActionSubsystem) {
- super(shell, SystemUDAResources.RESID_WORKWITH_UDAS_TITLE);
- setCancelButtonLabel(SystemUDAResources.BUTTON_CLOSE);
- setShowOkButton(false);
- this.shell = shell;
- this.subsystemFactory = ssFactory;
- this.udaActionSubsystem = udaActionSubsystem;
- setProfiles(RSECorePlugin.getTheSystemProfileManager().getActiveSystemProfiles(), profile);
- //setMinimumSize(600, 520); // x, y
- //pack();
- setHelp();
- }
-
- /**
- * Overridable extension point for setting dialog help
- */
- protected void setHelp() {
- setHelp(RSEUIPlugin.HELPPREFIX + "wwua0000"); //$NON-NLS-1$
- }
-
- /**
- * Set the profiles to show in the combo.
- * @param profiles array of profiles to show
- * @param profile the profile to pre-select
- */
- public void setProfiles(ISystemProfile[] profiles, ISystemProfile profile) {
- if (profiles == null) profiles = new ISystemProfile[0];
- this.systemProfiles = profiles;
- this.currentProfile = profile;
- initProfileCombo();
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
- return null;
- }
-
- /**
- * Return the user defined action subsystem
- */
- protected SystemUDActionSubsystem getUDActionSubsystem() {
- return udaActionSubsystem;
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent) {
- // 2 columns
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- Composite profileComposite = SystemWidgetHelpers.createFlushComposite(composite, 2);
- ((GridData) profileComposite.getLayoutData()).horizontalSpan = nbrColumns;
- String temp = SystemWidgetHelpers.appendColon(SystemUDAResources.RESID_UDA_PROFILE_LABEL);
- labelProfile = SystemWidgetHelpers.createLabel(profileComposite, temp);
- labelProfile.setToolTipText(SystemUDAResources.RESID_UDA_PROFILE_TOOLTIP);
- profileCombo = SystemWidgetHelpers.createReadonlyCombo(profileComposite, null, SystemUDAResources.RESID_UDA_PROFILE_TOOLTIP);
- //SystemWidgetHelpers.setHelp(profileCombo, RSEUIPlugin.HELPPREFIX + "ccon0001", parentHelpId);
- if (currentProfile != null) // important to set this before instantiating action tree
- getUDActionSubsystem().getUDActionManager().setCurrentProfile(currentProfile);
- // create tree view on left
- if (subsystem != null)
- treeView = new SystemUDActionTreeView(composite, this, subsystem, udaActionSubsystem);
- else
- {
- // FIXME - Xuan
- //treeView = new SystemUDActionTreeView(composite, this, subsystemFactory, currentProfile);
- }
- Control c = treeView.getControl();
- //c.setToolTipText(RSEUIPlugin.getString(RESID_UDA_TREE_TIP));
- GridData data = (GridData) c.getLayoutData();
- if (data == null) data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.widthHint = 140; // 170
- data.heightHint = publicConvertHeightInCharsToPixels(12); // high enough to show 12 entries
- c.setLayoutData(data);
- // 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);
- // now populate top of right-side composite with edit pane...
- if (subsystem != null)
- editpane = getUDActionSubsystem().getCustomUDActionEditPane(subsystem, this, treeView);
- else
- editpane = getUDActionSubsystem().getCustomUDActionEditPane(subsystemFactory, currentProfile, this, treeView);
- editpane.createContents(rightSideComposite);
- // now add a visual separator line
- addSeparatorLine(rightSideComposite, 1);
- // now populate bottom of right-side composite with apply/revert buttons within their own composite
- int nbrColumns_buttonComposite = 4;
- Composite applyResetButtonComposite = SystemWidgetHelpers.createFlushComposite(rightSideComposite, nbrColumns_buttonComposite);
- //((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;
- applyButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_UDA_APPLY_BUTTON_LABEL, SystemUDAResources.RESID_UDA_APPLY_BUTTON_TOOLTIP);
- revertButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_UDA_REVERT_BUTTON_LABEL, SystemUDAResources.RESID_UDA_REVERT_BUTTON_TOOLTIP);
- // now add a spacer to soak up left-over height...
- addGrowableFillerLine(rightSideComposite, 1);
- // populate profile dropdown
- initProfileCombo();
- // add state machine to edit pane
- sm = new SystemEditPaneStateMachine(rightSideComposite, applyButton, revertButton);
- editpane.setStateMachine(sm);
- // add listeners...
- profileCombo.addSelectionListener(this);
- treeView.addSelectionChangedListener(editpane);
- getShell().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- //System.out.println("Inside dispose for SystemWorkWithUDAsDialog");
- getUDActionSubsystem().getUDActionManager().setCurrentProfile(null);
- }
- });
- treeView.getControl().addMouseListener(editpane);
- treeView.getControl().addKeyListener(editpane);
- composite.layout(true);
- rightSideComposite.setVisible(false);
- treeView.expandDomainNodes();
- 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
- }
-
- /**
- * Initialize contents and selection of profile combo
- */
- private void initProfileCombo() {
- if (profileCombo != null) {
- if ((systemProfiles != null) && (systemProfiles.length > 0)) {
- String[] names = new String[systemProfiles.length];
- int selIdx = 0;
- for (int idx = 0; idx < names.length; idx++) {
- names[idx] = systemProfiles[idx].getName();
- if ((currentProfile != null) && (currentProfile == systemProfiles[idx])) selIdx = idx;
- }
- profileCombo.setItems(names);
- profileCombo.setText(names[selIdx]);
- prevProfileComboSelection = selIdx;
- }
- }
- }
-
- /**
- * Intercept of parent method so we can direct it to the Apply button versus the OK button
- */
- public void setPageComplete(boolean complete) {
- 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
- }
- }
-
- /**
- * Parent override.
- * Called when user presses CLOSE button.
- * We simply close the dialog (since we save as we go), unless there are pending changes.
- */
- protected boolean processCancel() {
- if (sm.isSaveRequired()) {
- if (!editpane.validateInput(true, null)) {
- sm.setChangesMade(); // defect 45773
- return false; // pending errors. Cannot save, so cannot close!
- }
- editpane.saveData();
- }
- return super.processCancel();
- }
-
- // ---------------------------------
- // METHODS FOR INTERFACES...
- // ---------------------------------
- /**
- * Handles events generated by controls on this page.
- */
- public void handleEvent(Event e) {
- clearMessage();
- Widget source = e.widget;
- if (source == applyButton) {
- processApply();
- } else if (source == revertButton) {
- processRevert();
- }
- }
-
- /**
- * Process the apply button
- */
- public void processApply() {
- editpane.applyPressed();
- }
-
- /**
- * Process the revert button
- */
- public void processRevert() {
- editpane.revertPressed();
- }
-
- /**
- * 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) {
- if (editpane.areErrorsPending()) {
- profileCombo.getDisplay().asyncExec(this);
- return;
- }
- // SystemUDActionManager udam = getUDActionSubsystem().getUDActionManager();
- if (sm.isSaveRequired()) {
- if (!editpane.validateInput(true, null)) // errors in pending input?
- {
- sm.setChangesMade();
- profileCombo.getDisplay().asyncExec(this);
- return;
- }
- //udam.saveUserData(udam.getCurrentProfile());
- editpane.saveData(); // defect 45771
- }
- sm.applyPressed();
- int idx = profileCombo.getSelectionIndex();
- if (idx < 0) // should never happen?
- idx = 0;
- prevProfileComboSelection = idx;
- currentProfile = systemProfiles[idx];
- getUDActionSubsystem().getUDActionManager().setCurrentProfile(currentProfile);
- treeView.clearClipboard();
- treeView.setInput("0"); //$NON-NLS-1$
- treeView.expandDomainNodes();
- }
- }
-
- // -------------------------------------------------------
- // METHOD REQUIRED BY RUNNABLE, USED IN CALL TO ASYNCEXEC
- // -------------------------------------------------------
- /**
- * Run asynchronously verification of data when user changes profile
- * selection. If errors pending, re-select previous profile
- */
- public void run() {
- profileCombo.select(prevProfileComboSelection);
- super.run();
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
- // -----------------------------------
- // ISystemUDWorkWithDialog methods...
- // -----------------------------------
- /**
- * Decide if we can do the delete or not.
- * Will decide the enabled state of the delete action.
- */
- public boolean canDelete(Object selectedObject) {
- return (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isSelectionVendorSupplied();
- }
-
- /**
- * Decide if we can do the move up or not.
- * Will decide the enabled state of the move up action.
- */
- public boolean canMoveUp(Object selectedObject) {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending();
- if (can) {
- TreeItem selectedItem = treeView.getSelectedTreeItem();
- TreeItem parentItem = selectedItem.getParentItem();
- if (parentItem != null)
- can = (parentItem.getItems()[0] != selectedItem);
- else // this means we don't have domains
- {
- TreeItem[] roots = treeView.getTree().getItems();
- for (int idx = 0; idx < roots.length; idx++) {
- if (roots[idx].getData() instanceof SystemXMLElementWrapper) {
- can = (roots[idx] != selectedItem);
- break;
- }
- }
- }
- }
- return can;
- }
-
- /**
- * Decide if we can do the move down or not.
- * Will decide the enabled state of the move down action.
- */
- public boolean canMoveDown(Object selectedObject) {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending();
- if (can) {
- TreeItem selectedItem = treeView.getSelectedTreeItem();
- TreeItem parentItem = selectedItem.getParentItem();
- if (parentItem != null)
- can = (parentItem.getItems()[parentItem.getItemCount() - 1] != selectedItem);
- else // this means we don't have domains
- {
- TreeItem[] roots = treeView.getTree().getItems();
- can = (roots[roots.length - 1] != selectedItem);
- }
- }
- return can;
- }
-
- /**
- * Decide if we can do the copy or not.
- * Will decide the enabled state of the copy action.
- */
- public boolean canCopy(Object selectedObject) {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending();
- return can;
- }
-
- /**
- * Return true if currently selected type is vendor supplied
- */
- protected boolean isSelectionVendorSupplied() {
- SystemXMLElementWrapper selectedElement = treeView.getSelectedElement();
- if (selectedElement != null) {
- String vendor = selectedElement.getVendor();
- //System.out.println("Vendor value: '"+vendor+"'");
- return ((vendor != null) && (vendor.length() > 0));
- }
- return false;
- }
-
- /**
- * Return the vendor that is responsible for pre-supplying this existing type,
- * or null if not applicable.
- */
- protected String getVendorOfSelection() {
- SystemXMLElementWrapper selectedElement = treeView.getSelectedElement();
- if (selectedElement != null) {
- String vendor = selectedElement.getVendor();
- if ((vendor != null) && (vendor.length() > 0)) return vendor;
- }
- return null;
- }
-
- /**
- * Return true if changes are pending in the edit pane
- */
- public boolean areChangesPending() {
- return sm.areChangesPending();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDTypeDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDTypeDialog.java
deleted file mode 100644
index f238bc686..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemWorkWithUDTypeDialog.java
+++ /dev/null
@@ -1,426 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- *******************************************************************************/
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-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.SystemWidgetHelpers;
-import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
-import org.eclipse.rse.ui.widgets.ISystemEditPaneStates;
-import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
-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.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * A dialog that allows the user to manipulate their user defined actions for a given subsystem factory.
- * <p>
- */
-public class SystemWorkWithUDTypeDialog extends SystemPromptDialog implements ISystemUDWorkWithDialog, Listener, Runnable, ISystemUDAEditPaneHoster {
- protected Shell shell; // shell hosting this viewer
- protected ResourceBundle rb;
- protected SystemUDActionSubsystem udaActionSubsystem;
- protected ISubSystem subsystem;
- protected ISubSystemConfiguration subsystemFactory;
- protected ISystemProfile profile;
- protected SystemUDTypeEditPane editpane;
- protected Button applyButton, revertButton;
- protected SystemEditPaneStateMachine sm;
- protected SystemUDTypeTreeView treeView;
- private String typeToPreSelect;
- private String currentType;
- private int preSelectTypeDomain;
- private int currentDomain = -1;
- private Object objectToPreSelect;
- private String domainToPreExpand;
-
- /**
- * Constructor when we have a subsystem
- */
- public SystemWorkWithUDTypeDialog(Shell shell, ISubSystem ss, SystemUDActionSubsystem udaActionSubsystem) {
- super(shell, SystemUDAResources.RESID_WORKWITH_UDT_TITLE);
- setCancelButtonLabel(SystemUDAResources.BUTTON_CLOSE);
- setShowOkButton(false);
- this.shell = shell;
- this.udaActionSubsystem = udaActionSubsystem;
- this.subsystem = ss;
- this.subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = subsystem.getSystemProfile();
- setOutputObject(null);
- //setMinimumSize(550, 300); // x, y
- setHelp();
- }
-
- /**
- * Constructor when we have a subsystem factory and profile
- */
- public SystemWorkWithUDTypeDialog(Shell shell, ISubSystemConfiguration ssFactory, ISystemProfile profile) {
- super(shell, SystemUDAResources.RESID_WORKWITH_UDT_TITLE);
- setCancelButtonLabel(SystemUDAResources.BUTTON_CLOSE);
- setShowOkButton(false);
- this.shell = shell;
- this.subsystemFactory = ssFactory;
- this.profile = profile;
- setOutputObject(null);
- //setMinimumSize(550, 300); // x, y
- setHelp();
- }
-
- /**
- * Overridable extension point for setting dialog help
- */
- protected void setHelp() {
- setHelp(RSEUIPlugin.HELPPREFIX + "wwnt0000"); //$NON-NLS-1$
- }
-
- /**
- * Set a type to preselect in the dialog.
- * If domains are supported, specify the domain number, else
- * pass -1.
- */
- public void preSelectType(int domain, String type) {
- this.preSelectTypeDomain = domain;
- this.typeToPreSelect = type;
- }
-
- /**
- * @see SystemPromptDialog#getInitialFocusControl()
- */
- protected Control getInitialFocusControl() {
- return treeView.getControl();
- }
-
- /**
- * @see SystemPromptDialog#createInner(Composite)
- */
- protected Control createInner(Composite parent) {
- // Inner composite
- int nbrColumns = 2;
- Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns);
- // create tree view on left
- if (subsystem != null)
- treeView = new SystemUDTypeTreeView(composite, this, subsystem, udaActionSubsystem);
- else
- treeView = new SystemUDTypeTreeView(composite, this, subsystemFactory, profile);
- Control c = treeView.getControl();
- //c.setToolTipText(SystemUDAResources.RESID_UDA_TREE_TIP)); it is too annoying
- GridData data = (GridData) c.getLayoutData();
- if (data == null) data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessVerticalSpace = true;
- data.verticalAlignment = GridData.FILL;
- data.widthHint = 140; // 150, or 170
- data.heightHint = publicConvertHeightInCharsToPixels(12); // high enough to show 12 entries
- c.setLayoutData(data);
- // 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);
- // now populate top of right-side composite with edit pane...
- //editpane = new SystemUDTypeEditPane( subsystem, this, treeView);
- //if (subsystem!=null)
- // editpane = getUDActionSubsystem().getCustomUDTypeEditPane( subsystem, this, treeView);
- //else
- // editpane = getUDActionSubsystem().getCustomUDTypeEditPane( subsystemFactory, profile, this, treeView);
- editpane = getUDActionSubsystem().getCustomUDTypeEditPane(this, treeView);
- editpane.createContents(rightSideComposite);
- // now add a visual separator line
- addSeparatorLine(rightSideComposite, 1);
- // now populate bottom of right-side composite with apply/revert buttons within their own composite
- int nbrColumns_buttonComposite = 4;
- Composite applyResetButtonComposite = SystemWidgetHelpers.createFlushComposite(rightSideComposite, nbrColumns_buttonComposite);
- //((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;
- applyButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_UDA_APPLY_BUTTON_LABEL, SystemUDAResources.RESID_UDA_APPLY_BUTTON_TOOLTIP);
- //applyButton.setImage(RSEUIPlugin.getDefault().getImage(ISystemConstants.ICON_SYSTEM_OK_ID));
- revertButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_UDA_REVERT_BUTTON_LABEL, SystemUDAResources.RESID_UDA_REVERT_BUTTON_TOOLTIP);
- // now add a spacer to soak up left-over height...
- addGrowableFillerLine(rightSideComposite, 1);
- // add state machine to edit pane
- sm = new SystemEditPaneStateMachine(rightSideComposite, applyButton, revertButton);
- editpane.setStateMachine(sm);
- composite.layout(true);
- rightSideComposite.setVisible(false);
- // if we have been given a type to preselect, do so now...
- //System.out.println("typeToPreSelect = " + typeToPreSelect);
- if (typeToPreSelect != null) {
- SystemUDTypeManager udtm = getUDActionSubsystem().getUDTypeManager();
- SystemUDTypeElement type = null;
- if (preSelectTypeDomain >= 0) {
- domainToPreExpand = getUDActionSubsystem().mapDomainXlatedName(preSelectTypeDomain);
- //treeView.expandDomainNode(domainToPreExpand);
- }
- // add listeners, after expansion...
- treeView.addSelectionChangedListener(editpane);
- if (subsystem != null)
- {
- type = (SystemUDTypeElement) udtm.findByName(subsystem.getSystemProfile(), typeToPreSelect, preSelectTypeDomain);
- }
- if (type != null) objectToPreSelect = type;
- } else {
- //treeView.expandDomainNodes();
- // add listeners, after expansion...
- treeView.addSelectionChangedListener(editpane);
- }
- //System.out.println("Test1");
- treeView.getShell().getDisplay().asyncExec(this);
- //System.out.println("Test2");
- 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 the user defined action subsystem
- */
- protected SystemUDActionSubsystem getUDActionSubsystem() {
- return udaActionSubsystem;
- }
-
- /**
- * Parent override.
- * Called when user presses CLOSE button.
- * If we exit, then we set the dialog's output object to be the
- * name of the selected type.
- */
- protected boolean processCancel() {
- if (sm.isSaveRequired()) {
- if (!editpane.validateInput(true, null)) {
- sm.setChangesMade(); // defect 45773
- return false; // pending errors. Cannot save, so cannot close!
- }
- editpane.saveData();
- }
- currentType = treeView.getSelectedTypeName();
- if (currentType.length() > 0) setOutputObject(currentType);
- currentDomain = treeView.getSelectedTypeDomain();
- return super.processCancel();
- }
-
- /**
- * Get the name of the type that was selected at the time we left
- */
- public String getSelectedTypeName() {
- return currentType;
- }
-
- /**
- * Get the domain of the type that was selected at the time we left
- */
- public int getSelectedTypeDomain() {
- return currentDomain;
- }
-
- /**
- * Override of parent method so we can direct it to the Apply button versus the OK button
- */
- public void setPageComplete(boolean complete) {
- 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
- }
- }
-
- /**
- * Return true if currently selected type is "ALL"
- */
- protected boolean isAllTypeSelected() {
- return treeView.getSelectedTypeName().equals("ALL"); //$NON-NLS-1$
- }
-
- /**
- * Return true if currently selected type is vendor supplied
- */
- protected boolean isSelectionVendorSupplied() {
- return treeView.isSelectionVendorSupplied();
- }
-
- /**
- * Return the vendor that is responsible for pre-supplying this existing type,
- * or null if not applicable.
- */
- protected String getVendorOfSelection() {
- return treeView.getVendorOfSelection();
- }
-
- /**
- * Handles events generated by controls on this page.
- */
- public void handleEvent(Event e) {
- clearMessage();
- Widget source = e.widget;
- if (source == applyButton) {
- processApply();
- } else if (source == revertButton) {
- processRevert();
- }
- }
-
- /**
- * Process the apply button
- */
- public void processApply() {
- editpane.applyPressed();
- }
-
- /**
- * Process the revert button
- */
- public void processRevert() {
- editpane.revertPressed();
- }
-
- // ---------------
- // HELPER METHODS
- // ---------------
- /**
- * 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);
- }
-
- // -----------------------------------
- // ISystemUDWorkWithDialog methods...
- // -----------------------------------
- /**
- * Decide if we can do the delete or not.
- * Will decide the enabled state of the delete action.
- */
- public boolean canDelete(Object selectedObject) {
- return (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isSelectionVendorSupplied();
- }
-
- /**
- * Decide if we can do the move up or not.
- * Will decide the enabled state of the move up action.
- */
- public boolean canMoveUp(Object selectedObject) {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isAllTypeSelected();
- if (can) {
- TreeItem selectedItem = treeView.getSelectedTreeItem();
- TreeItem parentItem = selectedItem.getParentItem();
- if (parentItem != null)
- can = (parentItem.getItems()[0] != selectedItem);
- else // this means we don't have domains
- {
- TreeItem[] roots = treeView.getTree().getItems();
- for (int idx = 0; idx < roots.length; idx++) {
- if (roots[idx].getData() instanceof SystemXMLElementWrapper) {
- can = (roots[idx] != selectedItem);
- break;
- }
- }
- }
- }
- return can;
- }
-
- /**
- * Decide if we can do the move down or not.
- * Will decide the enabled state of the move down action.
- */
- public boolean canMoveDown(Object selectedObject) {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isAllTypeSelected();
- if (can) {
- TreeItem selectedItem = treeView.getSelectedTreeItem();
- TreeItem parentItem = selectedItem.getParentItem();
- if (parentItem != null)
- can = (parentItem.getItems()[parentItem.getItemCount() - 1] != selectedItem);
- else // this means we don't have domains
- {
- TreeItem[] roots = treeView.getTree().getItems();
- can = (roots[roots.length - 1] != selectedItem);
- }
- }
- return can;
- }
-
- /**
- * Decide if we can do the copy or not.
- * Will decide the enabled state of the copy action.
- */
- public boolean canCopy(Object selectedObject) {
- boolean can = (sm.getMode() == ISystemEditPaneStates.MODE_EDIT) && !sm.areChangesPending() && !isAllTypeSelected();
- return can;
- }
-
- /**
- * For AsyncExec.
- * Do selection, after tree is created
- */
- public void run() {
- // check it out! This run method executes multiple times even though it is only called once!!!
- //System.out.println("Test1");
- if (domainToPreExpand != null)
- treeView.expandDomainNode(domainToPreExpand);
- else
- treeView.expandDomainNodes();
- //System.out.println("Test2");
- //if (true)
- // return; // for debugging
- if (objectToPreSelect != null) {
- if (objectToPreSelect instanceof SystemXMLElementWrapper)
- treeView.selectElement((SystemXMLElementWrapper) objectToPreSelect);
- else {
- ISelection selection = new StructuredSelection(objectToPreSelect);
- treeView.setSelection(selection, true);
- }
- } else
- //else if (treeView.getTree().getSelectionCount() == 0)
- {
- objectToPreSelect = (treeView.getTree().getItems()[0]).getData();
- ISelection selection = new StructuredSelection(objectToPreSelect);
- //System.out.println("Test5");
- treeView.setSelection(selection, true);
- //System.out.println("Test6");
- }
- }
-
- /**
- * Return true if changes are pending in the edit pane
- */
- public boolean areChangesPending() {
- return sm.areChangesPending();
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemXMLElementWrapper.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemXMLElementWrapper.java
deleted file mode 100644
index ef5c18bad..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemXMLElementWrapper.java
+++ /dev/null
@@ -1,542 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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) - [180562][api] dont implement ISystemUDAConstants
- * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View (cleanup some use action stuff)
- * Kevin Doyle (IBM) - [240725] Add Null Pointer checking when there are no default user actions
- * Kevin Doyle (IBM) - [222829] MoveUp/Down Broken in Work with User Actions Dialog
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.uda;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.model.IProperty;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.IPropertySetContainer;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * This is a base class for classes that wrapper UDA elements.
- * Eg, there are child classes to represent action UDA elements, and
- * type UDA elements.
- */
-public abstract class SystemXMLElementWrapper implements IAdaptable {
- //parameters
- protected IPropertySet elm;
- private boolean isDomainElement;
- private SystemUDBaseManager database; // For setChanged()
- private ISystemProfile profile;
- private int domainType;
- // constants
- /**
- * What we store in UDA document for TRUE
- */
- private static final String UDA_TRUE = "True"; //$NON-NLS-1$
- /**
- * What we store in UDA document for FALSE
- */
- private static final String UDA_FALSE = "False"; //$NON-NLS-1$
- /**
- * The XML attribute name for the "IBM-Supplied" attribute
- */
- private static final String UDA_ATTR_VENDOR = "Vendor"; //$NON-NLS-1$
- /**
- * The XML attribute name for the "User-Changed" attribute
- */
- private static final String UDA_ATTR_CHANGED = "UserChanged"; //$NON-NLS-1$
- /**
- * The value we place in the Vendor attribute for IBM-supplied actions/types
- */
- private static final String VENDOR_IBM = "IBM"; //$NON-NLS-1$
-
- /**
- * Constructor
- * @param elm - The actual UDA element for this action/type
- * @param mgr - The parent manager of these actions/types
- * @param profile - The system profile which owns this action
- * @param domainType - The integer representation of the domain this is in (or this is, for a domain element)
- */
- public SystemXMLElementWrapper(IPropertySet elm, SystemUDBaseManager mgr, ISystemProfile profile, int domainType) {
- super();
- this.elm = elm;
- this.isDomainElement = elm.getPropertyValue(ISystemUDAConstants.TYPE_ATTR).equals(ISystemUDAConstants.XE_DOMAIN);
- this.domainType = domainType;
- database = mgr;
- this.profile = profile;
- }
-
- // ----------------------------------
- // METHODS THAT MUST BE OVERRIDDEN...
- // ----------------------------------
- protected abstract String getTagName();
-
- public abstract Image getImage();
-
- // -------------------------------------
- //
- // -------------------------------------
- /**
- * Convert to a string
- * Same as calling getName
- */
- public String toString() {
- return getName();
- }
-
- /**
- * As required by the IAdaptable interface.
- * @see IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapterType) {
- return Platform.getAdapterManager().getAdapter(this, adapterType);
- }
-
- /**
- * Get the profile this is associated with
- */
- public ISystemProfile getProfile() {
- return profile;
- }
-
- /**
- * Get the manager that manages the document this element is part of.
- */
- public SystemUDBaseManager getManager() {
- return database;
- }
-
- /**
- * Get the UDA element this node wraps
- */
- public IPropertySet getElement() {
- return elm;
- }
-
- /**
- * Get the document this element is a part of
- */
- public IPropertySet getDocument() {
- // this method added by phil.
- // this allows getChildren in xxxmanager classes to avoid deducing the document
- return (IPropertySet)elm.getContainer();
- }
-
- /**
- * Get the parent UDA element of this element.
- * If domains aren't supported, this will return null
- */
- public IPropertySet getParentDomainElement() {
- IPropertySet parent = getParentElement();
- if ((parent != null) && parent.getPropertyValue(ISystemUDAConstants.NAME_ATTR).equals(ISystemUDAConstants.XE_DOMAIN))
- return parent;
- else
- return null;
- }
-
- /**
- * Get the parent UDA element of this element.
- * Only returns null if this is the root, which should never happen.
- */
- public IPropertySet getParentElement() {
- Object parent = elm.getContainer();
- if (parent instanceof IPropertySet)
- return (IPropertySet) parent;
- else
- return null;
- }
-
- /**
- * Is this a "Domain" tag?
- */
- public boolean isDomain() {
- return isDomainElement;
- }
-
- /**
- * Return the domain this element is in, or represents if it is a domain element itself.
- * This is the integer representation used internally.
- * Will be -1 if domains not supported for this subsystem.
- */
- public int getDomain() {
- return domainType;
- }
-
- /**
- * Return the value of this node's "name" attribute
- */
- public String getName() {
- return elm.getPropertyValue(ISystemUDAConstants.NAME_ATTR);
- }
-
- /**
- * Set the value of this tag's "Name" attribute.
- * If this is an IBM-supplied user action, then it will cause an addition attribute to
- * be created named "OriginalName", containing the IBM-supplied name.
- */
- public void setName(String s) {
- if (isIBM()) {
- String orgName = elm.getPropertyValue(ISystemUDAConstants.ORIGINAL_NAME_ATTR);
- if ((orgName != null) && (orgName.length() > 0)) {
- // no need to do anything, as its already set.
- }
- else
- {
- IProperty property = elm.getProperty(ISystemUDAConstants.ORIGINAL_NAME_ATTR);
- if (null == property)
- {
- elm.addProperty(ISystemUDAConstants.ORIGINAL_NAME_ATTR, getName());
- }
- else
- {
- property.setValue(getName());
- }
- }
- }
- setAttribute(ISystemUDAConstants.NAME_ATTR, s);
- setUserChanged(true);
- }
-
- /**
- * Return the value of this node's "order" attribute
- */
- public int getOrder() {
- IProperty orderProperty = elm.getProperty(ISystemUDAConstants.ORDER_ATTR);
- int order = -1;
-
- if (orderProperty != null)
- {
- order = Integer.valueOf(orderProperty.getValue()).intValue();
- }
- return order;
- }
-
- public void setOrder(int order) {
- elm.addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(order));
- }
-
- /**
- * For IBM-supplied elements that have been edited, returns the original IBM-supplied name
- */
- public String getOriginalName() {
- String s = elm.getPropertyValue(ISystemUDAConstants.ORIGINAL_NAME_ATTR);
- if ((s == null) || (s.length() == 0))
- return getName();
- else
- return s;
- }
-
- /**
- * Return the value of this node's "IBM" attribute.
- * That is, is this an IBM-supplied tag?
- */
- public boolean isIBM() {
- String vendor = elm.getPropertyValue(UDA_ATTR_VENDOR);
- if (vendor == null)
- return false;
- else
- return vendor.equals(VENDOR_IBM);
- }
-
- /**
- * Set the name of the vendor who supplied this user action or type
- */
- public void setVendor(String vendor) {
- setAttribute(UDA_ATTR_VENDOR, vendor);
- }
-
- /**
- * Get the name of the vendor who supplied this user action or type.
- * May be null, if created by a user
- */
- public String getVendor() {
- return elm.getPropertyValue(UDA_ATTR_VENDOR);
- }
-
- /**
- * Set the value of this tag's "Vendor" attribute to "IBM",
- * or clear the IBM attribute (after a duplication action for example).
- */
- public void setIBM(boolean isFromIBM) {
- if (isFromIBM)
- setAttribute(UDA_ATTR_VENDOR, VENDOR_IBM);
- else
- setAttribute(UDA_ATTR_VENDOR, null);
- }
-
- /**
- * Return the value of this node's "user-changed" attribute.
- * That is, if this an IBM-supplied tag, has the user changed it?
- */
- public boolean isUserChanged() {
- boolean changed = false;
- if (!isIBM())
- changed = true;
- else if (isDomainElement)
- changed = false;
- else
- changed = getBooleanAttribute(UDA_ATTR_CHANGED, false);
- //System.out.println("Inside isUserChanged, returning "+changed+": isIBM()="+isIBM()+", isDomainElement="+isDomainElement);
- return changed;
- }
-
- /**
- * Set the value of this tag's "user-changed" attribute
- */
- public void setUserChanged(boolean isUserChanged) {
- if (isIBM() && !isDomainElement) setBooleanAttribute(UDA_ATTR_CHANGED, isUserChanged);
- }
-
- /**
- * Delete this element from the document
- */
- public void deleteElement() {
- // Not intended for root. Only for Actions
- //elm.getParentNode().removeChild(elm);
- int elmOrder = getOrder();
- elm.getContainer().removePropertySet(elm.getName());
- IPropertySetContainer parentElement = elm.getContainer();
- IPropertySet[] allChildren = parentElement.getPropertySets();
- for (int i = 0; i < allChildren.length; i++) {
- IProperty orderProperty = allChildren[i].getProperty(ISystemUDAConstants.ORDER_ATTR);
- int order = -1;
- if (orderProperty != null)
- {
- order = Integer.valueOf(orderProperty.getValue()).intValue();
- }
-
- // Decrease the order of all elements greater then elmOrder
- if (order > elmOrder) {
- allChildren[i].addProperty(ISystemUDAConstants.ORDER_ATTR, Integer.toString(order - 1));
- }
- }
-
-
- }
-
- /**
- * Set the value of a boolean attribute
- */
- public void setBooleanAttribute(String attr, boolean b) {
- IProperty property = elm.getProperty(attr);
- if (null == property)
- {
- elm.addProperty(attr, (b) ? UDA_TRUE : UDA_FALSE);
- }
- else
- {
- property.setValue((b) ? UDA_TRUE : UDA_FALSE);
- }
- database.setChanged(profile);
- }
-
- /**
- * Return the boolean value of a given attribute. It must exist!
- * @param attr - name of the attribute to query
- */
- public boolean getBooleanAttribute(String attr) {
- String val = elm.getPropertyValue(attr);
- if (UDA_TRUE.equals(val)) return true;
- return false;
- }
-
- /**
- * Return the boolean value of a given attribute.
- * @param attr - name of the attribute to query
- * @param defaultValue - value to return if the attribute is not found
- */
- public boolean getBooleanAttribute(String attr, boolean defaultValue) {
- String val = elm.getPropertyValue(attr);
- if (val == null) return defaultValue;
- if (UDA_TRUE.equals(val)) return true;
- return false;
- }
-
- /**
- * Set the text value of the given attribute.
- * Specify a default value to return if the attribute is not found
- */
- public String getAttribute(String attr, String defaultValue) {
- String value = elm.getPropertyValue(attr);
- if (value == null) value = defaultValue;
- return value;
- }
-
- /**
- * Set the text value of the given attribute to a given value
- */
- public void setAttribute(String attr, String value) {
- if (value != null)
- {
- IProperty property = elm.getProperty(attr);
- if (property == null)
- {
- elm.addProperty(attr, value);
- }
- else
- {
- property.setValue(value);
- }
- }
- else
- {
- elm.removeProperty(attr);
- }
- database.setChanged(profile);
- }
-
- /**
- * For unique-name checking.
- * If this is a domain element, returns all child action names.
- * If this is an action/tag element, returns all sibling action names, minus this one.
- * Always returns a non-null vector, although it may be empty
- */
- public Vector getExistingNames() {
- IPropertySet parentElement = null;
- String currName = null;
- if (isDomain())
- parentElement = this.getElement();
- else {
- parentElement = getParentElement();
- currName = getName();
- }
- Vector nameList = getExistingNames(parentElement, getDocument());
- if (currName != null) nameList.remove(currName);
- return nameList;
- }
-
- /**
- * For unique-name checking.
- * Given a parent element XML node, returns all child action names.
- * Always returns a non-null vector, although it may be empty
- */
- public Vector getExistingNames(IPropertySet parentElement, IPropertySet xdoc) {
- return getExistingNames(parentElement, xdoc, getTagName());
- }
-
- /**
- * For unique-name checking.
- * Given a parent UDA node, returns all child action names.
- * Always returns a non-null vector of Strings, although it may be empty
- */
- public static Vector getExistingNames(IPropertySet parentElement, IPropertySet xdoc, String tagName) {
- Vector nameList = new Vector();
- IPropertySet[] subList = null;
- if (parentElement != null)
- subList = parentElement.getPropertySets();
- else if (xdoc != null)
- subList = xdoc.getPropertySets();
- if (subList != null) {
- for (int idx = 0; idx < subList.length; idx++) {
- IPropertySet sn = subList[idx];
- if (sn.getPropertyValue(ISystemUDAConstants.TYPE_ATTR).equals(tagName))
- {
- nameList.add(sn.getPropertyValue(ISystemUDAConstants.NAME_ATTR));
- }
- } // end for all subnodes
- } // end if sublist != null
- return nameList;
- }
-
- /**
- * Given a parent element XML node, returns wrappers of all child tags of which we are interested
- * Always returns a non-null vector, although it may be empty
- */
- public Vector getChildren(Vector children, IPropertySet parentElement, IPropertySet xdoc, ISystemProfile profile) {
- return getChildren(children, parentElement, xdoc, profile, database, getDomain());
- }
-
- /**
- * Given a parent element XML node, returns wrappers all child tag elements with the given tag name
- * Always returns a non-null vector, although it may be empty.
- * If the parentElement is null, uses the roots of the given document. Should only be true if domains not supported!
- * @return Vector of SystemXMLElementWrapper objects
- */
- public static Vector getChildren(Vector children, IPropertySet parentElement, IPropertySet xdoc, ISystemProfile profile, ISystemXMLElementWrapperFactory factory, int domain) {
- if (children == null) children = new Vector();
- Vector ordered = new Vector();
- String tagName = factory.getTagName();
-
- IPropertySet[] subList = null;
- if (parentElement != null)
- subList = parentElement.getPropertySets();
- else if (xdoc != null)
- subList = xdoc.getPropertySets();
- if (subList != null) {
- Vector unordered = new Vector();
- for (int idx = 0; idx < subList.length; idx++) {
- IPropertySet sn = subList[idx];
- if (sn.getPropertyValue(ISystemUDAConstants.TYPE_ATTR).equals(tagName))
- {
- unordered.add(sn);
- }
- } // end for all subnodes
- ordered.setSize(unordered.size());
- for (int i = 0; i < unordered.size(); i++) {
- int order = i;
- // get the ordering
- IPropertySet sn = ((IPropertySet) unordered.get(i));
- IProperty orderProperty = sn.getProperty(ISystemUDAConstants.ORDER_ATTR);
- if (orderProperty != null) {
- order = Integer.valueOf(orderProperty.getValue()).intValue();
- }
-
- SystemXMLElementWrapper thisWrapper = factory.createElementWrapper(sn, profile, domain);
- try {
- ordered.remove(order);
- ordered.add(order, thisWrapper);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- } // end if sublist != null
- // Set the order position of all attributes to handle 3.0 where we didn't have the order attribute
- for (int i = 0; i < ordered.size(); i++) {
- if (ordered.get(i) instanceof SystemXMLElementWrapper) {
- SystemXMLElementWrapper element = (SystemXMLElementWrapper) ordered.get(i);
- if (element != null)
- element.setOrder(i);
- }
- children.add(ordered.get(i));
- }
- return children;
- }
-
- /**
- * For unique-name checking.
- * Given a parent element XML node, returns the xml Element node with the given name attribute,
- * or null if not found.
- */
- public static IPropertySet findChildByName(IPropertySet parentElement, IPropertySet xdoc, String tagName, String searchName) {
- IPropertySet match = null;
- IPropertySet[] subList = null;
- if (parentElement != null)
- subList = parentElement.getPropertySets();
- else
- subList = xdoc.getPropertySets();
- if (subList != null) {
- for (int idx = 0; (match == null) && (idx < subList.length); idx++) {
- IPropertySet sn = subList[idx];
- if (sn.getName().equals(searchName))
- {
- IProperty typeProperty = sn.getProperty(ISystemUDAConstants.TYPE_ATTR);
- if (typeProperty.getValue().equals(tagName))
- {
- match = sn;
- }
- }
- } // end for all subnodes
- } // end if sublist != null
- return match;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java
deleted file mode 100644
index 343b53c4e..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda.actions;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Xuan Chen (IBM) - [225617] [useraction][api] Remove Team view support inside user action.
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- *******************************************************************************/
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemWorkWithUDTypeDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action that displays the Work With File Types GUI
- */
-public class SystemWorkWithFileTypesAction extends SystemBaseDialogAction {
- private ISubSystem subsystem = null;
- private ISubSystemConfiguration subsystemFactory = null;
- private SystemUDActionSubsystem udaActionSubsystem;
- private ISystemProfile profile;
- private SystemWorkWithUDTypeDialog ourDlg = null;
- private String typeToPreSelect = null;
- private int preSelectTypeDomain;
- private String outputSelectedType;
- private int outputSelectedDomain = -1;
-
- /**
- * Constructor when we have a subsystem
- * @param parent The Shell of the parent UI for this dialog
- * @param udaActionSubsystem The User Define Action subsystem we are launching this from/for
- */
- public SystemWorkWithFileTypesAction(Shell parent, SystemUDActionSubsystem udaActionSubsystem) {
- this(parent);
- this.udaActionSubsystem = udaActionSubsystem;
- this.subsystem = udaActionSubsystem.getSubsystem();
- if (subsystem != null) {
- this.subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = subsystem.getSystemProfile();
- }
- setAvailableOffline(true);
- }
-
- /**
- * Constructor when we have a subsystem factory and profile
- * @param parent The Shell of the parent UI for this dialog
- * @param subSystemFactory The subsystem factory we are launching this from/for
- * @param profile The profile we are launching this from/for
- */
- public SystemWorkWithFileTypesAction(Shell parent, ISubSystemConfiguration subSystemFactory, ISystemProfile profile) {
- this(parent);
- this.subsystemFactory = subSystemFactory;
- this.profile = profile;
- }
-
- /**
- * Constructor when we don't have anything
- * At run time, the input is deduced from the first selected object.
- * @param parent The Shell of the parent UI for this dialog
- */
- public SystemWorkWithFileTypesAction(Shell parent) {
- super(SystemUDAResources.ACTION_WORKWITH_NAMEDTYPES_LABEL, SystemUDAResources.ACTION_WORKWITH_NAMEDTYPES_TOOLTIP, Activator.getDefault().getImageDescriptor(
- IUserActionsImageIds.WORK_WITH_NAMED_TYPES_1), parent);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0046"); //$NON-NLS-1$
- }
-
- /**
- * Set a type to preselect in the dialog.
- * If domains are supported, specify the domain number, else
- * pass -1.
- */
- public void preSelectType(int domain, String type) {
- this.typeToPreSelect = type;
- this.preSelectTypeDomain = domain;
- }
-
- /**
- * 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;
- }
-
- /**
- * 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) {
- if ((subsystem == null) && (getFirstSelection() instanceof ISubSystem))
- subsystem = (ISubSystem) getFirstSelection();
- if (subsystem != null)
- ourDlg = new SystemWorkWithUDTypeDialog(parent, subsystem, udaActionSubsystem);
- else
- ourDlg = new SystemWorkWithUDTypeDialog(parent, subsystemFactory, profile);
- if (typeToPreSelect != null) ourDlg.preSelectType(preSelectTypeDomain, typeToPreSelect);
- return ourDlg;
- }
-
- /**
- * Required by parent. After the dialog closes, its output
- * object contains the type that was selected at the time
- * of the close. This might be of interest to someone, so
- * we scoop it out here, and return it in the
- * getSelectedTypeName() method.
- */
- protected Object getDialogValue(Dialog dlg) {
- outputSelectedType = ((SystemWorkWithUDTypeDialog) dlg).getSelectedTypeName();
- if ((outputSelectedType != null) && (outputSelectedType.length() == 0)) outputSelectedType = null;
- return outputSelectedType;
- }
-
- /**
- * Return the name of the type that was selected at the
- * time of exiting the dialog. Might be null!
- */
- public String getSelectedTypeName() {
- outputSelectedType = ourDlg.getSelectedTypeName();
- //System.out.println("outputSelectedType = " + outputSelectedType);
- if ((outputSelectedType != null) && (outputSelectedType.length() == 0)) outputSelectedType = null;
- return outputSelectedType;
- }
-
- /**
- * Return the domain of the type that was selected at the
- * time of exiting the dialog. Might be -1!
- */
- public int getSelectedTypeDomain() {
- outputSelectedDomain = ourDlg.getSelectedTypeDomain();
- //System.out.println("outputSelectedDomain = " + outputSelectedDomain);
- return outputSelectedDomain;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java
deleted file mode 100644
index 517e86fcb..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda.actions;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * Xuan Chen (IBM) - [225617] [useraction][api] Remove Team view support inside user action.
- * Kevin Doyle (IBM) - [222828] Icons for some Actions Missing
- * Kevin Doyle (IBM) - [252296] Work With User Actions action is not available in offline mode
- *******************************************************************************/
-//import java.util.Iterator;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemWorkWithUDAsDialog;
-import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * The action that displays the Work With User-Defined Actions GUI
- */
-public class SystemWorkWithUDAsAction extends SystemBaseDialogAction {
- private ISubSystem subsystem = null;
- private ISubSystemConfiguration subsystemFactory = null;
- private ISystemProfile profile;
- private SystemUDActionSubsystem udaActionSubsystem = null;
-
- /**
- * Constructor when starting with a subsystem (such as in RS view)
- * @param parent The Shell of the parent UI for this dialog
- * @param subSystem The subsystem we are launching this from/for
- */
- public SystemWorkWithUDAsAction(Shell parent, ISubSystem subSystem, SystemUDActionSubsystem udaActionSubsystem) {
- this(parent);
- setSubSystem(subSystem);
- setActionSubsystem(udaActionSubsystem);
- setAvailableOffline(true);
- }
-
- /**
- * Constructor when starting with a subsystem factory (such as in Team view)
- * @param parent The Shell of the parent UI for this dialog
- * @param subSystemFactory The subsystem factory we are launching this from/for
- */
- public SystemWorkWithUDAsAction(Shell parent, ISubSystemConfiguration subSystemFactory, ISystemProfile profile, SystemUDActionSubsystem udaActionSubsystem) {
- this(parent);
- setSubSystemFactory(subsystemFactory, profile);
- setActionSubsystem(udaActionSubsystem);
- }
-
- /**
- * Constructor when we don't have anything.
- * At run time, the input is deduced from the first selected object.
- * @param parent The Shell of the parent UI for this dialog
- */
- public SystemWorkWithUDAsAction(Shell parent) {
- super(SystemUDAResources.ACTION_WORKWITH_UDAS_LABEL, SystemUDAResources.ACTION_WORKWITH_UDAS_TOOLTIP, Activator.getDefault().getImageDescriptor(
- IUserActionsImageIds.WORK_WITH_USER_ACTIONS_1), parent);
- allowOnMultipleSelection(false);
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0045"); //$NON-NLS-1$
- }
-
- /**
- * Constructor when we don't have anything, and we want to choose between "Work with->User Actions" and "Work With User Actions".
- * At run time, the input is deduced from the first selected object.
- * @param parent The Shell of the parent UI for this dialog
- * @param fromCascadingCompileAction true to get "Work with Compile Commands" label, false to get "Compile Commands" label.
- */
- public SystemWorkWithUDAsAction(Shell parent, boolean fromCascadingCompileAction) {
- super(fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWUDAS_LABEL : SystemUDAResources.ACTION_WORKWITH_UDAS_LABEL,
- fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWUDAS_TOOLTIP : SystemUDAResources.ACTION_WORKWITH_UDAS_TOOLTIP, Activator.getDefault().getImageDescriptor(
- IUserActionsImageIds.WORK_WITH_USER_ACTIONS_1), parent);
- allowOnMultipleSelection(false);
- if (!fromCascadingCompileAction)
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
- else
- setContextMenuGroup(ISystemContextMenuConstants.GROUP_REORGANIZE);
- setHelp(RSEUIPlugin.HELPPREFIX + "actn0045"); //$NON-NLS-1$
- setAvailableOffline(true);
- }
-
- /**
- * Reset between runs
- */
- public void reset() {
- subsystem = null;
- subsystemFactory = null;
- profile = null;
- }
-
- /**
- * Set the subsystem which is the input to this action. You either call this,
- * or setSubSystemFactory, or the input is deduced from the selection when the action is run.
- */
- public void setSubSystem(ISubSystem subsystem) {
- this.subsystem = subsystem;
- if (subsystem != null) {
- this.subsystemFactory = subsystem.getSubSystemConfiguration();
- this.profile = subsystem.getSystemProfile();
- }
- }
-
- /**
- * Set the subsystem factory and profile, which are the input to this action. You either call this,
- * or setSubSystem, or the input is deduced from the selection when the action is run.
- */
- public void setSubSystemFactory(ISubSystemConfiguration subsystemFactory, ISystemProfile profile) {
- this.subsystemFactory = subsystemFactory;
- this.profile = profile;
- }
-
- public void setActionSubsystem(SystemUDActionSubsystem udaActionSubsystem) {
- this.udaActionSubsystem = udaActionSubsystem;
- }
- /**
- * Called by SystemBaseAction when selection is set.
- * Our opportunity to verify we are allowed for this selected type.
- */
- public boolean updateSelection(IStructuredSelection selection) {
- return true;
- }
-
- /**
- * 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) {
- Object element = getFirstSelection();
- //System.out.println("First selection: "+element);
- if ((subsystem == null) && (element instanceof ISubSystem)) {
- subsystem = (ISubSystem) element;
- }
- //Don't think we need to support invoking Work With User Action dialog from Team view
- /*
- else if ((subsystemFactory == null) && (element instanceof SystemTeamViewSubSystemConfigurationNode)) {
- SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode) element;
- subsystemFactory = ssfNode.getSubSystemConfiguration();
- profile = ssfNode.getProfile();
- //System.out.println("Profile is: "+profile);
- }
- */
- SystemWorkWithUDAsDialog dlg = null;
- if (subsystem != null)
- dlg = new SystemWorkWithUDAsDialog(parent, subsystem, udaActionSubsystem);
- else
- dlg = new SystemWorkWithUDAsDialog(parent, subsystemFactory, profile, udaActionSubsystem);
- return dlg;
- }
-
- /**
- * Required by parent. We use it to return the new name.
- * In our case, we don't need it, so we return null.
- */
- protected Object getDialogValue(Dialog dlg) {
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/MatchStr.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/MatchStr.java
deleted file mode 100644
index a0cc154db..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/MatchStr.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda.util;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-public class MatchStr {
- private String matchStr;
- private Vector mStrTokens;
- private boolean splatAtEnd;
-
- public MatchStr(String p_matchStr) {
- matchStr = p_matchStr;
- StringTokenizer st = new StringTokenizer(matchStr, "*"); //$NON-NLS-1$
- int n = st.countTokens();
- mStrTokens = new Vector();
- for (int i = 0; i < n; i++) {
- mStrTokens.addElement(st.nextToken());
- }
- splatAtEnd = matchStr.charAt(matchStr.length() - 1) == '*';
- }
-
- public boolean isMatch(String str) {
- if (str.indexOf("*") == 0) //$NON-NLS-1$
- {
- str = str.substring(1);
- }
- if (mStrTokens.size() == 0) {
- return true;
- }
- if (!str.startsWith((String) mStrTokens.elementAt(0))) {
- return false;
- }
- if (!splatAtEnd) {
- if (mStrTokens.size() == 1) {
- return str.equals(mStrTokens.elementAt(0));
- } else if (!str.endsWith((String) mStrTokens.elementAt(mStrTokens.size() - 1))) {
- return false;
- }
- }
- int i = ((String) mStrTokens.elementAt(0)).length();
- int j = 1;
- while (i < str.length() && j < mStrTokens.size()) {
- String tempStr = str.substring(i);
- if (tempStr.startsWith((String) mStrTokens.elementAt(j))) {
- i = i + tempStr.length();
- j++;
- }
- i++;
- }
- return mStrTokens.size() == j;
- }
- /* public static void main(String[] args)
- {
- MatchStr matchStr = new MatchStr("AB*");
-
- if (matchStr.isMatch("ABaasBdddd"))
- {
- System.out.println("true");
- }
- else
- {
- System.out.println("false");
- }
-
- matchStr = new MatchStr("*");
- boolean one = matchStr.isMatch("lskda");
- boolean two = matchStr.isMatch("");
- boolean three = matchStr.isMatch("1");
-
-
- matchStr = new MatchStr("abc");
- boolean four = matchStr.isMatch("abcdabc");
- boolean five = matchStr.isMatch("abc");
-
-
- matchStr = new MatchStr("abc*");
- boolean six = matchStr.isMatch("abcdabc");
- boolean seven = matchStr.isMatch("abc");
-
-
- try {
- System.in.read();
- } catch (Exception e)
- {
- }
- }*/
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAFileTypesForName.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAFileTypesForName.java
deleted file mode 100644
index f4eb9c8e3..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAFileTypesForName.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda.util;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-public class UDAFileTypesForName {
- String name;
- String types;
-
- public UDAFileTypesForName(String p_name, String p_types) {
- name = p_name;
- types = p_types;
- }
-
- public String getName() {
- return name;
- }
-
- public String getTypes() {
- return types;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAResolvedTypes.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAResolvedTypes.java
deleted file mode 100644
index 49dc88533..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/util/UDAResolvedTypes.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.rse.internal.useractions.ui.uda.util;
-
-/*******************************************************************************
- * Copyright (c) 2002, 2007 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
- *******************************************************************************/
-import java.util.Vector;
-
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeElement;
-import org.eclipse.rse.internal.useractions.ui.uda.SystemUDTypeManager;
-
-public class UDAResolvedTypes {
- protected Vector previousTypes = null;
-
- public UDAResolvedTypes() {
- previousTypes = null;
- }
-
- protected void addTypesToVector(Vector v, Object[] objElems) {
- for (int i = 0; i < objElems.length; i++) {
- SystemUDTypeElement typeElem = (SystemUDTypeElement) objElems[i];
- String name = typeElem.toString();
- resolveType(name, v, objElems);
- }
- }
-
- protected String resolveTypes(String types, Vector v, Object[] objElems) {
- int i = types.indexOf("<"); //$NON-NLS-1$
- if (i < 0) return types;
- int j = types.indexOf(">"); //$NON-NLS-1$
- if (i >= j) return types;
- String type = types.substring(i + 1, j);
- String resolvedType = resolveType(type, v, objElems);
- return types.substring(0, i) + " " + resolvedType + " " + resolveTypes(types.substring(j + 1), v, objElems); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected String resolveType(String type, Vector v, Object[] objElems) {
- if (previousTypes.contains(type)) {
- return ""; //$NON-NLS-1$
- }
- String resolvedTypes = resolveType(type, v);
- if (resolvedTypes != null) return resolvedTypes;
- for (int i = 0; i < objElems.length; i++) {
- SystemUDTypeElement typeElem = (SystemUDTypeElement) objElems[i];
- if (type.equals(typeElem.toString())) {
- previousTypes.addElement(type);
- resolvedTypes = resolveTypes(typeElem.getTypes(), v, objElems);
- previousTypes.remove(type);
- v.addElement(new UDAFileTypesForName(type, resolvedTypes));
- return resolvedTypes;
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- protected String resolveType(String type, Vector v) {
- for (int i = 0; i < v.size(); i++) {
- UDAFileTypesForName typesForName = (UDAFileTypesForName) v.elementAt(i);
- if (type.equals(typesForName.getName())) {
- return typesForName.getTypes();
- }
- }
- return null;
- }
-
- public String getFileTypesForTypeName(String name, int type, SystemUDTypeManager typeMgr) {
- // ?? Implement for non NFS types???
- return null;
- }
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java
deleted file mode 100644
index c5e33fd44..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.validators;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-
-/**
- * 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 list of existing labels.
- * The collection will not be modified by the validator.
- */
- public ValidatorCompileCommandLabel(Collection 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() {
- String msg1Txt = UserActionsResources.MSG_VALIDATE_COMPILELABEL_EMPTY;
- String msg1Details = UserActionsResources.MSG_VALIDATE_COMPILELABEL_EMPTY_DETAILS;
-
- SystemMessage msg1 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_COMPILELABEL_EMPTY,
- IStatus.ERROR, msg1Txt, msg1Details);
-
- String msg2Txt = UserActionsResources.MSG_VALIDATE_COMPILELABEL_NOTUNIQUE;
- String msg2Details = UserActionsResources.MSG_VALIDATE_COMPILELABEL_NOTUNIQUE_DETAILS;
-
- SystemMessage msg2 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_COMPILELABEL_NOTUNIQUE,
- IStatus.ERROR, msg2Txt, msg2Details);
-
- super.setErrorMessages(msg1, msg2);
- fUnique = true;
-
- String msg3Txt = UserActionsResources.MSG_VALIDATE_COMPILELABEL_NOTVALID;
- String msg3Details= UserActionsResources.MSG_VALIDATE_COMPILELABEL_NOTVALID_DETAILS;
-
- msg_Invalid = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_COMPILELABEL_NOTVALID,
- IStatus.ERROR, msg3Txt, msg3Details);
- }
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java
deleted file mode 100644
index 557f2f02a..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.validators;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-
-/**
- * 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() {
- String msg1Txt = UserActionsResources.MSG_VALIDATE_UDACMD_EMPTY;
- String msg1Details = UserActionsResources.MSG_VALIDATE_UDACMD_EMPTY_DETAILS;
-
- SystemMessage msg1 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDACMD_EMPTY,
- IStatus.ERROR, msg1Txt, msg1Details);
-
- String msg2Txt = UserActionsResources.MSG_VALIDATE_UDACMD_NOTVALID;
- String msg2Details = UserActionsResources.MSG_VALIDATE_UDACMD_NOTVALID_DETAILS;
-
- SystemMessage msg2 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDACMD_NOTVALID,
- IStatus.ERROR, msg2Txt, msg2Details);
- setErrorMessages(msg1,msg2);
- }
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java
deleted file mode 100644
index 676f1303d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.validators;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-
-/**
- * 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() {
- String msg1Txt = UserActionsResources.MSG_VALIDATE_UDACMT_EMPTY;
- String msg1Details = UserActionsResources.MSG_VALIDATE_UDACMT_EMPTY_DETAILS;
-
- SystemMessage msg1 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDACMT_EMPTY,
- IStatus.ERROR, msg1Txt, msg1Details);
-
- String msg2Txt = UserActionsResources.MSG_VALIDATE_UDACMT_NOTVALID;
- String msg2Details = UserActionsResources.MSG_VALIDATE_UDACMT_NOTVALID_DETAILS;
-
- SystemMessage msg2 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDACMT_NOTVALID,
- IStatus.ERROR, msg2Txt, msg2Details);
-
- setErrorMessages(msg1, msg2);
- }
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java
deleted file mode 100644
index 93106c986..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.validators;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-
-/**
- * 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.
- * @param existingNameList a collection of existing names to compare against.
- * The collection will not be modified by the validator.
- */
- public ValidatorUserActionName(Collection 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() {
- String msg1Txt = UserActionsResources.MSG_VALIDATE_UDANAME_EMPTY;
- String msg1Details = UserActionsResources.MSG_VALIDATE_UDANAME_EMPTY_DETAILS;
-
- SystemMessage msg1 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDANAME_EMPTY,
- IStatus.ERROR, msg1Txt, msg1Details);
-
- String msg2Txt = UserActionsResources.MSG_VALIDATE_UDANAME_NOTUNIQUE;
- String msg2Details = UserActionsResources.MSG_VALIDATE_UDANAME_NOTUNIQUE_DETAILS;
-
- SystemMessage msg2 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDANAME_NOTUNIQUE,
- IStatus.ERROR, msg2Txt, msg2Details);
-
-
- super.setErrorMessages(msg1, msg2);
- fUnique = true;
-
- String msg3Txt = UserActionsResources.MSG_VALIDATE_UDANAME_NOTVALID;
- String msg3Details = UserActionsResources.MSG_VALIDATE_UDANAME_NOTVALID_DETAILS;
-
- SystemMessage msg3 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDANAME_NOTVALID,
- IStatus.ERROR, msg3Txt, msg3Details);
- msg_Invalid = msg3;
- }
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java
deleted file mode 100644
index 2968df96d..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.validators;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUniqueString;
-
-/**
- * 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() {
- String msg1Txt = UserActionsResources.MSG_VALIDATE_UDTNAME_EMPTY;
- String msg1Details = UserActionsResources.MSG_VALIDATE_UDTNAME_EMPTY_DETAILS;
-
- SystemMessage msg1 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTNAME_EMPTY,
- IStatus.ERROR, msg1Txt, msg1Details);
-
- String msg2Txt = UserActionsResources.MSG_VALIDATE_UDTNAME_NOTUNIQUE;
- String msg2Details = UserActionsResources.MSG_VALIDATE_UDTNAME_NOTUNIQUE_DETAILS;
-
- SystemMessage msg2 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTNAME_NOTUNIQUE,
- IStatus.ERROR, msg2Txt, msg2Details);
-
- super.setErrorMessages(msg1, msg2);
-
- String msg3Txt = UserActionsResources.MSG_VALIDATE_UDTNAME_NOTVALID;
- String msg3Details = UserActionsResources.MSG_VALIDATE_UDTNAME_NOTVALID_DETAILS;
-
- SystemMessage msg3 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTNAME_NOTVALID,
- IStatus.ERROR, msg3Txt, msg3Details);
- msg_Invalid = msg3;
- }
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java
deleted file mode 100644
index 1e38769d4..000000000
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2008 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:
- * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
- * API to the user actions plugin
- * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
- *******************************************************************************/
-
-package org.eclipse.rse.internal.useractions.ui.validators;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.rse.internal.useractions.Activator;
-import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
-import org.eclipse.rse.internal.useractions.UserActionsResources;
-import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-
-/**
- * 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() {
- String msg1Txt = UserActionsResources.MSG_VALIDATE_UDTTYPES_EMPTY;
- String msg1Details = UserActionsResources.MSG_VALIDATE_UDTTYPES_EMPTY_DETAILS;
-
- SystemMessage msg1 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_EMPTY,
- IStatus.ERROR, msg1Txt, msg1Details);
-
- String msg2Txt = UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID;
- String msg2Details = UserActionsResources.MSG_VALIDATE_UDTTYPES_NOTVALID_DETAILS;
-
- SystemMessage msg2 = new SimpleSystemMessage(Activator.PLUGIN_ID,
- IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID,
- IStatus.ERROR, msg2Txt, msg2Details);
-
-
- setErrorMessages(msg1, msg2);
- }
-
- /**
- * 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;
- }
-
-}
diff --git a/rse/plugins/org.eclipse.rse/.classpath b/rse/plugins/org.eclipse.rse/.classpath
deleted file mode 100644
index b7464f3ca..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.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/.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 381fc6eb0..000000000
--- a/rse/plugins/org.eclipse.rse/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/plugins/org.eclipse.rse/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse/META-INF/MANIFEST.MF
deleted file mode 100644
index b11ea745c..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: 3.2.0.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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 75bf5897d..000000000
--- a/rse/plugins/org.eclipse.rse/about.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-################################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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 End-User Runtime\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright IBM Corporation and others 2000, 2009. 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 e3ada70b7..000000000
--- a/rse/plugins/org.eclipse.rse/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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) - Use eclipse32.png feature image
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- dsdp32.png,\
- plugin.properties
-src.includes = about.html
-
-# No source bundle because this contains just branding
-generateSourceBundle=false
diff --git a/rse/plugins/org.eclipse.rse/dsdp32.png b/rse/plugins/org.eclipse.rse/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/plugins/org.eclipse.rse/dsdp32.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 5a2225712..000000000
--- a/rse/plugins/org.eclipse.rse/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 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_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName = Remote System Explorer End-User Runtime
-providerName = Eclipse.org - DSDP \ 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/readme.txt b/rse/readme.txt
deleted file mode 100644
index e217ba6a9..000000000
--- a/rse/readme.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is the Eclipse Target Management Project RSE Repository.
-It holds plugins, features, tests and release engineering scripts
-for the Remote System Explorer (RSE).
-
-Some code depends on the org.eclipse.tm.core repository.
-See http://www.eclipse.org/dsdp/tm
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 2ec5929ed..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 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
-src.includes = epl-v10.html,\
- license.html
-root=rootfiles
-generate.plugin@org.eclipse.rse.tests.source=org.eclipse.rse.tests
-generate.plugin@org.eclipse.rse.tests.framework.source=org.eclipse.rse.tests.framework
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 9321f4082..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 1bec1a7f0..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 83ce051c1..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/feature.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.tests"
- label="%featureName"
- version="3.1.1.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.tests.framework" version="2.0.0" match="compatible"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.services.files.ftp" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.ftp" version="2.1.0" match="compatible"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.help"/>
- <!-- org.junit either comes with the JDT feature (org.eclipse.jdt), -->
- <!-- or with the eclipse-test-framework download. So, don't put a -->
- <!-- feature dependency here since it is no hard dependency -->
- <!-- (although it would help Europa users to get their stuff, but -->
- <!-- it could invalidate the configuration for Platform users: -->
- <!-- bug 151797) -->
- <import plugin="org.junit" version="3.8.1" match="compatible"/>
- <import plugin="org.apache.ant"/>
- </requires>
-
- <plugin
- id="org.eclipse.test"
- download-size="26"
- install-size="35"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.ant.optional.junit"
- download-size="3"
- install-size="4"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.tests"
- download-size="70"
- install-size="186"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.rse.tests.framework"
- download-size="131"
- install-size="176"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.tests.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.tests.framework.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</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/rootfiles/epl-v10.html b/rse/tests/org.eclipse.rse.tests-feature/rootfiles/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/rootfiles/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests-feature/rootfiles/notice.html b/rse/tests/org.eclipse.rse.tests-feature/rootfiles/notice.html
deleted file mode 100644
index a9b560f44..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/rootfiles/notice.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 e7b57cfff..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 5, 2007</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 991cd175e..000000000
--- a/rse/tests/org.eclipse.rse.tests-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
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 381fc6eb0..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 7dbbb0048..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.100.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.junit,
- org.eclipse.rse.tests.framework;bundle-version="[2.0.0,3.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.rse.tests.framework.examples
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 d4cc693f9..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 5, 2007</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 d9f021b95..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
- \ 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 d37eff098..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework.examples/plugin.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.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
- -->
-
-<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 686cb5dca..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 4abae3e8f..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/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.tests.framework;singleton:=true
-Bundle-Version: 2.0.200.qualifier
-Bundle-Activator: org.eclipse.rse.internal.tests.framework.TestFrameworkPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.rse.internal.tests.framework;x-internal:=true,
- org.eclipse.rse.internal.tests.framework.actions;x-internal:=true,
- org.eclipse.rse.internal.tests.framework.scripting;x-internal:=true,
- org.eclipse.rse.internal.tests.framework.ui;x-internal:=true,
- org.eclipse.rse.tests.framework
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.jface.text,
- org.eclipse.help,
- org.eclipse.core.resources,
- org.junit
-Bundle-ActivationPolicy: lazy
-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 d4cc693f9..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 5, 2007</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 5eb7416d3..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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/,\
- .,\
- about.html
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-src.includes = about.html,\
- schema/
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.png b/rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.png
deleted file mode 100644
index 51c774e10..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/ResultsPane.png
+++ /dev/null
Binary files differ
diff --git a/rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.png b/rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.png
deleted file mode 100644
index 68116c257..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/SampleWindow.png
+++ /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 070be70b2..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>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>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 2115f2584..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/html/plugging.html
+++ /dev/null
@@ -1,82 +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>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>
- <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.</p>
- <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>
- <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.</p>
-</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 6d286d6b0..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 framework 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 19b87ff7d..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>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>Using The Test Suite View</h2> <p><img src="SampleWindow.png" 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.</p> <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.png" 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.</p> </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 8e3c6a454..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/plugin.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 - DSDP
-
-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 54ab3fa56..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/plugin.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?> <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<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.internal.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.internal.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.internal.tests.framework.actions.ResetHolderDelegate"
- menubarPath="additions"
- id="org.eclipse.rse.tests.framework.ResetHolder"/>
- <action
- enablesFor="+"
- label="%RunHolderDelegate.label"
- class="org.eclipse.rse.internal.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.internal.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.internal.tests.framework.StandardTestSuiteHolder"
- name="standard"/>
- <type
- class="org.eclipse.rse.internal.tests.framework.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 f06e3644e..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 suite types and test suites with the framework. Test suite types define holders for test suites that allow them to participate in the test suite view and perhaps interact with the user. Test suites are registered to a test suite type. See the &lt;code&gt;suite&lt;/code&gt; element for information on the pre-defined test suite types.
- </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 type of the test suite. Types are defined using the &lt;code&gt;type&lt;/code&gt; element of this extension point. The basic implementation defines two types: &lt;code&gt;standard&lt;/code&gt; and &lt;code&gt;generated&lt;/code&gt;. Standard suites typically just subclass org.junit.TestSuite. Generated suites will implement &lt;code&gt;org.eclipse.rse.tests.framework.ITestSuiteProvider&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>
- The name of the argument given to a test suite provider.
- </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>
- The name of the type of test suite.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class that implements the holder for this test suite. A holder wraps the suite for the purposes of running within the RSE test framework. This class must extend &lt;code&gt;org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder&lt;/code&gt;. Once a type is defined, it can be referenced by a test suite defined in this extension.
- </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 2004, 2007 IBM Corporation and others.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java
deleted file mode 100644
index ad7f31914..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.tests.framework;
-
-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;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java
deleted file mode 100644
index c3b0755a7..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.tests.framework;
-
-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/internal/tests/framework/TestFrameworkPlugin.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java
deleted file mode 100644
index 543447f41..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/TestSuiteGeneratorHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java
deleted file mode 100644
index fc5a4cf7c..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.tests.framework;
-
-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/internal/tests/framework/actions/ResetHolderDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java
deleted file mode 100644
index 747a22d03..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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) {
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java
deleted file mode 100644
index cd9c04513..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.tests.framework.TestFrameworkPlugin;
-import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
-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;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java
deleted file mode 100644
index dee007f25..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.tests.framework.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.rse.internal.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;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java
deleted file mode 100644
index 140d8f2f7..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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/internal/tests/framework/scripting/ConsoleContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java
deleted file mode 100644
index 92bbf34a8..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/PerspectiveContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java
deleted file mode 100644
index 761601966..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.tests.framework.scripting;
-
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.rse.internal.tests.framework.ui.TestSuiteConsoleView;
-import org.eclipse.rse.internal.tests.framework.ui.TestSuiteHolderView;
-import org.eclipse.rse.internal.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/internal/tests/framework/scripting/Script.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java
deleted file mode 100644
index ee5be4148..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java
deleted file mode 100644
index a283bb43a..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.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/internal/tests/framework/scripting/ScriptInterpreter.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java
deleted file mode 100644
index 4fccefb80..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptParser.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java
deleted file mode 100644
index cdb021766..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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();
- }
-
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java
deleted file mode 100644
index 29c93ba5f..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptParserMessageList.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java
deleted file mode 100644
index 192e537dc..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptPause.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java
deleted file mode 100644
index 91a406388..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptShow.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java
deleted file mode 100644
index 657202bde..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java
deleted file mode 100644
index d59d37fcd..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptTell.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java
deleted file mode 100644
index 9ecbd5f1f..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java
deleted file mode 100644
index 03aa23dd0..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/ScriptTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java
deleted file mode 100644
index 38185ce8b..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/SyntaxNode.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java
deleted file mode 100644
index 1f34fe8b7..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/scripting/SyntaxTreeVisitor.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java
deleted file mode 100644
index c4f38f969..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/ui/TestPerspectiveFactory.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java
deleted file mode 100644
index d4d17cfdd..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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/internal/tests/framework/ui/TestSuiteConsoleView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java
deleted file mode 100644
index 92337f978..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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();
- }
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java
deleted file mode 100644
index d406cd0a6..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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.internal.tests.framework.TestFrameworkPlugin;
-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.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);
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java
deleted file mode 100644
index d5f3ca8dd..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.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();
- }
-
-}
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/toc.xml b/rse/tests/org.eclipse.rse.tests.framework/toc.xml
deleted file mode 100644
index 6fabae5f1..000000000
--- a/rse/tests/org.eclipse.rse.tests.framework/toc.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
- <!--
- Copyright (c) 2005, 2007 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
- -->
-
-<toc label="RSE 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 d4cc693f9..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 5, 2007</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 5a81d914d..000000000
--- a/rse/tests/org.eclipse.rse.tests/.classpath
+++ /dev/null
@@ -1,11 +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">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/rse/internal/**"/>
- </accessrules>
- </classpathentry>
- <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.core.resources.prefs b/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 418192e35..000000000
--- a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Thu Aug 06 17:22:00 CEST 2009
-eclipse.preferences.version=1
-encoding//GVT/chs/test.txt=MS936
-encoding//GVT/cht/test.txt=MS950
-encoding//GVT/jpn/test.txt=MS932
-encoding//GVT/kor/test.txt=MS949
-encoding/<project>=ISO-8859-1
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 7a97eac73..000000000
--- a/rse/tests/org.eclipse.rse.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=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/GVT/bra/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/bra/test.txt
deleted file mode 100644
index 316636cac..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/bra/test.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in BRA *
- * The text should appear same on the client as the host *
- *****************************************************************
- * *
- * O próximo vôo à noite sobre o Atlântico, põe freqüentemente o *
- * médico. *
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- File@#$ if f 80 disk
- File#$@ if f 80 disk \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/chs/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/chs/test.txt
deleted file mode 100644
index df5845bd8..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/chs/test.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in dbcs *
- * The text should appear same on the client as the host *
- *****************************************************************
- * £ô£è£é£ó¡¡£é£ó¡¡£Ä£Â£Ã£Ó¡¡£Ô£Å£Ø£Ô
- * ÎÒÄÜÍÌϲ£Á§¶ø²»ÉËÉíÌå¡£
- ***************************************************************** \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/cht/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/cht/test.txt
deleted file mode 100644
index 86bf15a73..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/cht/test.txt
+++ /dev/null
@@ -1,19 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in DBCS *
- * The text should appear same on the client as the host *
- *****************************************************************
- * ¢â¢ð¢ñ¢û¡@¢ñ¢û¡@¢û¢÷¢õ¢í¡@¢Ò¢Ð¢Ñ¢á
- * ³±¶§¾Ç»¡¬O¥j¤H»{ÃÑÆ[¹î¦ÛµMªº²z©Êª¾ÃÑ¡C
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- File@#$ if f 80 disk
- File#$@ if f 80 disk \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/deu/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/deu/test.txt
deleted file mode 100644
index c9b812a86..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/deu/test.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-*****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in DEU *
- * The text should appear same on the client as the host *
- *****************************************************************
- * *
- * Falsches Üben von Xylophonmusik quält jeden größeren Zwerg. *
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- File§#$ if f 80 disk
- File#$§ if f 80 disk \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/esp/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/esp/test.txt
deleted file mode 100644
index 651a115dc..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/esp/test.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in ESP *
- * The text should appear same on the client as the host *
- *****************************************************************
- * *
- * El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío,
- * AÑORABA a su querido cachorro. *
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- File@Ñ$ if f 80 disk
- FileÑ$@ if f 80 disk \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/fre/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/fre/test.txt
deleted file mode 100644
index 7966192aa..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/fre/test.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in FRE *
- * The text should appear same on the client as the host *
- *****************************************************************
- * *
- * Les naïfs ægithales hâtifs pondant à Noël où il gèle sont sûrs
- * d'être déçus et de voir leurs drôles d'oeufs abîmés. *
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- Fileà£$ if f 80 disk
- File£$à if f 80 disk \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/instructions.txt b/rse/tests/org.eclipse.rse.tests/GVT/instructions.txt
deleted file mode 100644
index 050fe8d51..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/instructions.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-The GVT folder has resources that can be used to run Globalization tests. The folder consists of a subfolder for each language
-that is to be tested.
-
-Below are the folder names and the corresponding language:
-
-bra = Brazilian Portuguese
-chs = Simplified Chinese
-cht = Traditional Chinese
-deu = German
-esp = Spanish
-fre = French
-ita = Italian
-jpn = Japanese
-kor = Korean \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/ita/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/ita/test.txt
deleted file mode 100644
index 47e8110e3..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/ita/test.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with text in ITA *
- * The text should appear same on the client as the host *
- *****************************************************************
- * *
- * El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío,
- * AÑORABA a su querido cachorro. *
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- File@Ñ$ if f 80 disk
- FileÑ$@ if f 80 disk \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/jpn/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/jpn/test.txt
deleted file mode 100644
index 698308fed..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/jpn/test.txt
+++ /dev/null
@@ -1,34 +0,0 @@
- *****************************************************************
- * THE PROGRAM CONTAINS SOURCE TO BE USED FOR NL TESTING. *
- *****************************************************************
-
- *****************************************************************
- * THE FOLLOWING LINES ARE COMMENTS WITH TEXT IN NL *
- * THE TEXT SHOULD APPEAR SAME ON THE CLIENT AS THE HOST *
- *****************************************************************
- * ¶±Ã¹ÂÓ ±Ä´ ¶È¹µÄ´Í ¸Ï´´Âµ´ ¹Ä ± ³Å´ ȱ¹Ä ÅÄ Î¸µ ÍÎ. ÀŸÄ'Í
- * ѱεȶÈÅÄÎ
- * Îϵʹ±Ó ¶ÅÈ Î¸µ ÏÄе¹Â¹Ä· Ŷ ± ÃÅÄÏõÄÎ ÅÄ Î¸µ ÍÆÅΠѸµÈµ εÈÈÓ ¶ÅÒ
- * ²µ·±Ä ¸¹Í ñȱθÅÄ Å¶ ¸ÅƵ 25 Óµ±ÈÍ ±·Å ÎŠθµ ´±Ó.
- *****************************************************************
-
- *****************************************************************
- * THE FOLLOWING LINES ARE COMMENTS WITH TEXT IN DBCS *
- * THE TEXT SHOULD APPEAR SAME ON THE CLIENT AS THE HOST *
- *****************************************************************
- *‚s‚ˆ‚‰‚“@‚‰‚“@‚“‚‚‚…@‚c‚a‚b‚r@‚”‚…‚˜‚”
- *‚s‚ˆ‚‰‚“@‚‰‚“@‚“‚‚‚…@‚„‚‚‚ƒ‚“@‚”‚…‚˜‚”
- *****************************************************************
- * ‚¢‚ë‚Í‚É‚Ù‚Ö‚Ç@‚¿‚è‚Ê‚é‚ð
- * ‚킪‚悽‚ꂼ@‚‚˂Ȃç‚Þ
- * ‚¤‚î‚Ì‚¨‚­‚â‚Ü@‚¯‚Ó‚±‚¦‚Ä
- * ‚ ‚³‚«‚ä‚ß‚Ý‚¶@‚ï‚Ð‚à‚¹‚¸
- *****************************************************************
-
- *****************************************************************
- * THE FOLLOWING LINES DEFINE FSPECS WITH THE "SPECIAL CHARS" *
- * THERE SHOULD BE NO SYNTAX OR VERYFY ERRORS ON THESE LINES *
- * DUE TO THE SPECIAL CHARS *
- *****************************************************************
- FILE@#\ IF F 80 DISK
- FILE#\@ IF F 80 DISK \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/GVT/kor/test.txt b/rse/tests/org.eclipse.rse.tests/GVT/kor/test.txt
deleted file mode 100644
index 57078297f..000000000
--- a/rse/tests/org.eclipse.rse.tests/GVT/kor/test.txt
+++ /dev/null
@@ -1,21 +0,0 @@
- *****************************************************************
- * The program contains source to be used for NL testing. *
- *****************************************************************
-
- *****************************************************************
- * The following lines are comments with DBCS text
- * The text should appear same on the client as the host *
- *****************************************************************
- * £Ô£È£É£Ó¡¡£É£Ó¡¡£Ó£Ï£Í£Å¡¡£Ä£Â£Ã£Ó¡¡£Ô£Å£Ø£Ô *
- *£ä£â£ã£ó
- *
- *³ª´Â À¯¸®¸¦ ¸ÔÀ» ¼ö ÀÖ¾î¿ä. ±×·¡µµ ¾ÆÇÁÁö ¾Ê¾Æ¿ä
- *****************************************************************
-
- *****************************************************************
- * The following lines define Fspecs with the "special chars" *
- * There should be no syntax or veryfy errors on these lines *
- * due to the special chars *
- *****************************************************************
- File@#$ if f 80 disk
- File#$@ if f 80 disk \ No newline at end of file
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 ca3242151..000000000
--- a/rse/tests/org.eclipse.rse.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,52 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.tests;singleton:=true
-Bundle-Version: 3.1.1.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.core.filesystem,
- org.eclipse.team.core,
- org.eclipse.ui,
- org.eclipse.ui.views,
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.local;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.subsystems.processes.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.rse.services.files.ftp;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.services.ssh;bundle-version="[3.0.0,3.1.0)",
- org.eclipse.rse.subsystems.files.ftp;bundle-version="[2.1.0,3.0.0)",
- org.eclipse.rse.importexport;bundle-version="[1.2.0,1.3.0)",
- org.eclipse.rse.files.ui,
- org.eclipse.rse.efs,
- org.eclipse.rse.tests.framework;bundle-version="[2.0.0,3.0.0)",
- org.apache.commons.net;bundle-version="[1.4.1,3.0.0)",
- org.eclipse.rse.subsystems.terminals.core;bundle-version="[1.0.0,2.0.0)"
-Bundle-ActivationPolicy: lazy
-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.core.passwords,
- org.eclipse.rse.tests.core.registries,
- org.eclipse.rse.tests.initialization,
- org.eclipse.rse.tests.internal;x-internal:=true,
- org.eclipse.rse.tests.internal.testsubsystem;x-internal:=true,
- org.eclipse.rse.tests.persistence,
- org.eclipse.rse.tests.preferences,
- org.eclipse.rse.tests.profiles,
- org.eclipse.rse.tests.subsystems.files,
- org.eclipse.rse.tests.subsystems.testsubsystem,
- org.eclipse.rse.tests.testsubsystem,
- org.eclipse.rse.tests.testsubsystem.interfaces,
- org.eclipse.rse.tests.ui.mnemonics,
- org.eclipse.rse.tests.ui.preferences
-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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 214e378b2..000000000
--- a/rse/tests/org.eclipse.rse.tests/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=RSE Unit Tests\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2006, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
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 8b2f10cce..000000000
--- a/rse/tests/org.eclipse.rse.tests/build.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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,\
- dsdp32.png,\
- icons/,\
- GVT/,\
- teamConfig/
-
-# build with "assert" keyword enabled
-javacSource = 1.4
-javacTarget = 1.4
-source.rsetests.jar = src/
-src.includes = teamConfig/,\
- about.html,\
- .settings/,\
- build.properties
diff --git a/rse/tests/org.eclipse.rse.tests/dsdp32.png b/rse/tests/org.eclipse.rse.tests/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/rse/tests/org.eclipse.rse.tests/dsdp32.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 4a00a34a1..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 015831ddb..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 feef8bc92..000000000
--- a/rse/tests/org.eclipse.rse.tests/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2009 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 - DSDP
-
-testSubSystemName = Tests
-testSubSystemDescription = Test Subsystem
-
-testSubSystem2Name = Tests2
-testSubSystem2Description = Test Subsystem 2
-
-testSubSystem3Name = Tests3
-testSubSystem3Description = Test Subsystem 3
-
-testSystemTypeLabel = Tests Only
-testSystemTypeDescription = RSE Test plugin internal system type
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 b17c8b0b9..000000000
--- a/rse/tests/org.eclipse.rse.tests/plugin.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?> <!--
- Copyright (c) 2005, 2008 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
- -->
-
-<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.subsystems.files.RSEFileSubsystemTestSuite" name="RSEFileSubsystemTestSuite"/>
- <type name="org.eclipse.rse.tests.subsystems.files.RSEFileSubsystemTestSuite" class="org.eclipse.rse.tests.subsystems.files.RSEFileSubsystemTestSuite" />
-
- <suite type="org.eclipse.rse.tests.subsystems.shells.RSEShellSubsystemTestSuite" name="RSEShellSubsystemTestSuite"/>
- <type name="org.eclipse.rse.tests.subsystems.shells.RSEShellSubsystemTestSuite" class="org.eclipse.rse.tests.subsystems.shells.RSEShellSubsystemTestSuite" />
-
- <suite type="org.eclipse.rse.tests.persistence.PersistenceTestSuite" name="RSE Persistence Test Suite"/>
- <type name="org.eclipse.rse.tests.persistence.PersistenceTestSuite" class="org.eclipse.rse.tests.persistence.PersistenceTestSuite" />
- </extension>
-
- <!-- Do not replace the use of systemTypes here as long it only deprecated! -->
- <extension point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- id="org.eclipse.rse.tests.subsystems.TestSubSystem"
- systemTypeIds="org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.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>
-
- <configuration
- id="org.eclipse.rse.tests.subsystems.TestSubSystem2"
- systemTypeIds="org.eclipse.rse.tests.*"
- name="%testSubSystem2Name"
- class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
- category="users"
- vendor="%providerName"
- description="%testSubSystem2Description"
- iconlive="icons/systemconnectionlive.gif"
- icon="icons/systemconnection.gif"
- priority="100000">
- </configuration>
-
- <!-- Do not replace the use of systemTypes here as long it only deprecated! -->
- <configuration
- id="org.eclipse.rse.tests.subsystems.TestSubSystem3"
- systemTypeIds="org.eclipse.rse.systemtype.*n?x"
- name="%testSubSystem3Name"
- class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
- category="users"
- vendor="%providerName"
- description="%testSubSystem3Description"
- iconlive="icons/systemconnectionlive.gif"
- icon="icons/systemconnection.gif"
- priority="2000">
- </configuration>
-
- <configuration
- id="org.eclipse.rse.tests.subsystems.ftp.windows"
- systemTypeIds="org.eclipse.rse.tests.systemType.ftp.windows"
- name="FTP Windows"
- description="FTP Windows Description"
- category="files"
- class="org.eclipse.rse.tests.subsystems.files.FTPWindowsFileSubSystemConfiguration"
- priority="100"
- vendor="Tests"
- serviceType="_ftp._tcp">
- </configuration>
-
- </extension>
-
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <systemType
- label="%testSystemTypeLabel"
- description="%testSystemTypeDescription"
- enableOffline="false"
- id="org.eclipse.rse.tests.testSystemType"
- name="Tests Only">
- </systemType>
- <systemType
- enableOffline="false"
- id="org.eclipse.rse.tests.systemType.ftp.windows"
- label="FTP Windows"
- name="FTP Windows">
- <property
- name="isWindows"
- value="true">
- </property>
- </systemType>
- <systemType
- description="Linux without shells subsystem"
- id="org.eclipse.rse.tests.systemType.sshTerminal"
- label="Ssh without shells"
- name="Ssh without shells"
- subsystemConfigurationIds="ssh.terminals;ssh.files;processes.shell.linux">
- </systemType>
- <systemType
- description="FTP with SSH Shell"
- id="org.eclipse.rse.tests.systemType.ftpSsh"
- label="FTP with SSH shell"
- name="FTP with SSH shell"
- subsystemConfigurationIds="ssh.shells;ftp.files">
- </systemType>
- </extension>
-
- <extension point="org.eclipse.rse.core.modelInitializers">
- <modelInitializer class="org.eclipse.rse.tests.initialization.GoodInitializer"/>
- <modelInitializer class="org.eclipse.rse.tests.initialization.BadInitializer"/>
- <modelInitializer class="org.eclipse.rse.tests.initialization.UglyInitializer"/>
- <modelInitializer class="org.eclipse.rse.tests.initialization.ListenerInitializer"/>
- </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 3304f12de..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - organize, enable and tag test cases
- *******************************************************************************/
-package org.eclipse.rse.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-/**
- * 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(org.eclipse.rse.tests.core.AllTests.suite());
- suite.addTest(org.eclipse.rse.tests.core.connection.RSEConnectionTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.core.registries.RSERegistriesTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.internal.RSEInternalFrameworkTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.persistence.PersistenceTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.preferences.RSEPreferencesTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.subsystems.files.RSEFileSubsystemTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.subsystems.shells.RSEShellSubsystemTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.subsystems.testsubsystem.RSETestSubsystemTestSuite.suite());
- suite.addTestSuite(org.eclipse.rse.tests.synchronize.RSESynchronizeTest.class);
- suite.addTest(org.eclipse.rse.tests.ui.mnemonics.MnemonicsTestSuite.suite());
- suite.addTest(org.eclipse.rse.tests.ui.preferences.PreferencesTestSuite.suite());
- // //Manual test below -- cannot be run in unattended builds
- // suite.addTest(org.eclipse.rse.tests.ui.connectionwizard.RSENewConnectionWizardTestSuite.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 767eb2cf1..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsPlugin.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2007 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
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- ********************************************************************************/
-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.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.eclipse.rse.ui.SystemBasePlugin;
-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 465dfb7a4..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSETestsResources.properties
+++ /dev/null
@@ -1,66 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2008 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
-# Martin Oberhuber (Wind River) - [240729] More flexible disabling of testcases
-###############################################################################
-
-#
-# 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
-
-FileServiceTest.testCaseSensitive=true
-FileServiceTest.testCreateFile=true
-FileServiceTest.testCreateCaseSensitive=true
-FTPFileSubsystemTestCase.testFTPReadAccessToRemoteHost=true
-
-TestSubsystemTestCase.testAddAndDeleteDeepNodes=true
-TestSubsystemTestCase.testAddAndDeleteFlatNodes=true
-TestSubsystemTestCase.testBugzilla170728=true
-
-RSENewConnectionWizardTestCase.testRestrictToSystemType=true
-
-#
-# The following section controls enablement of test cases by target or client platform.
-# Uncomment a line to disable running unit tests on the specified target connection.
-# Target connections refer to connection properties files, e.g. ftp --> ftpConnection.properties
-# For active target connections, the Properties file must contain valid connection properties.
-#
-*.ftp=true
-*.ftpWindows=true
-*.linux=true
-*.local=true
-*.ssh=true
-*.windows=true
-
-Windows_XP.x86.*=true
-Linux.x86.*=true
-Linux.ppc.*=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/AllTests.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/AllTests.java
deleted file mode 100644
index 8adab9619..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/AllTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.core;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.core.connection.RSEConnectionTestSuite;
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-/**
- * Suite for RSE Core Model test cases.
- */
-public class AllTests extends DelegatingTestSuiteHolder {
-
- /** Run this test suite stand-alone. Only makes sense if no plugin test */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- // add the single test suites to the overall one here.
- suite.addTestSuite(HostMoveTest.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/core/HostMoveTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/HostMoveTest.java
deleted file mode 100644
index 54a73570c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/HostMoveTest.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- ********************************************************************************/
-
-package org.eclipse.rse.tests.core;
-
-import java.util.Properties;
-
-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.ISystemRegistry;
-import org.eclipse.rse.tests.core.connection.IRSEConnectionProperties;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-/**
- * Tests for host move in the host pool.
- * Each testcase method should leave the host pool as it was prior to running the method.
- */
-public class HostMoveTest extends RSEBaseConnectionTestCase {
-
- static final int NUMBER_OF_HOSTS = 6; // number of hosts
- private IHost hostArray[] = null;
- private ISystemRegistry registry = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- registry = RSECorePlugin.getTheSystemRegistry();
- createHosts();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- deleteHosts();
- super.tearDown();
- }
-
- public void testMoveOneUp() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost host = hostArray[NUMBER_OF_HOSTS - 1];
- IHost[] hosts = new IHost[] {host};
- registry.moveHosts("TestProfile", hosts, -1);
- assertEquals(NUMBER_OF_HOSTS - 2, registry.getHostPosition(host));
- flushEventQueue();
- assertEquals(NUMBER_OF_HOSTS - 2, registry.getHostPosition(host));
- registry.moveHosts("TestProfile", hosts, 1);
- assertEquals(NUMBER_OF_HOSTS - 1, registry.getHostPosition(host));
- }
-
- public void testMoveManyUp() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost[] hosts = new IHost[] {hostArray[NUMBER_OF_HOSTS - 1], hostArray[NUMBER_OF_HOSTS - 2]};
- registry.moveHosts("TestProfile", hosts, -2);
- assertEquals(NUMBER_OF_HOSTS - 3, registry.getHostPosition(hostArray[NUMBER_OF_HOSTS - 1]));
- assertEquals(NUMBER_OF_HOSTS - 4, registry.getHostPosition(hostArray[NUMBER_OF_HOSTS - 2]));
- flushEventQueue();
- assertEquals(NUMBER_OF_HOSTS - 3, registry.getHostPosition(hostArray[NUMBER_OF_HOSTS - 1]));
- assertEquals(NUMBER_OF_HOSTS - 4, registry.getHostPosition(hostArray[NUMBER_OF_HOSTS - 2]));
- registry.moveHosts("TestProfile", hosts, 2);
- assertEquals(NUMBER_OF_HOSTS - 1, registry.getHostPosition(hostArray[NUMBER_OF_HOSTS - 1]));
- assertEquals(NUMBER_OF_HOSTS - 2, registry.getHostPosition(hostArray[NUMBER_OF_HOSTS - 2]));
- }
-
- public void testMoveFirstUp() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost host = hostArray[0];
- assertEquals(0, registry.getHostPosition(host));
- IHost[] hosts = new IHost[] {host};
- registry.moveHosts("TestProfile", hosts, -1); // should not actually move
- assertEquals(0, registry.getHostPosition(host));
- }
-
- public void testMoveOneDown() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost host = hostArray[1]; // second in the list
- assertEquals(1, registry.getHostPosition(host));
- IHost[] hosts = new IHost[] {host};
- registry.moveHosts("TestProfile", hosts, 1);
- assertEquals(2, registry.getHostPosition(host));
- registry.moveHosts("TestProfile", hosts, -1);
- assertEquals(1, registry.getHostPosition(host));
- }
-
- public void testMoveManyDown() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost[] hosts = new IHost[] {hostArray[0], hostArray[2], hostArray[4]};
- assertEquals(0, registry.getHostPosition(hostArray[0]));
- assertEquals(2, registry.getHostPosition(hostArray[2]));
- assertEquals(4, registry.getHostPosition(hostArray[4]));
- registry.moveHosts("TestProfile", hosts, 1);
- assertEquals(1, registry.getHostPosition(hostArray[0]));
- assertEquals(3, registry.getHostPosition(hostArray[2]));
- assertEquals(5, registry.getHostPosition(hostArray[4]));
- registry.moveHosts("TestProfile", hosts, -1);
- assertEquals(0, registry.getHostPosition(hostArray[0]));
- assertEquals(2, registry.getHostPosition(hostArray[2]));
- assertEquals(4, registry.getHostPosition(hostArray[4]));
- }
-
- public void testMoveLastDown() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost host = hostArray[NUMBER_OF_HOSTS - 1];
- assertEquals(NUMBER_OF_HOSTS - 1, registry.getHostPosition(host));
- IHost[] hosts = new IHost[] {host};
- registry.moveHosts("TestProfile", hosts, 1); // should not actually move
- assertEquals(NUMBER_OF_HOSTS - 1, registry.getHostPosition(host));
- }
-
- public void testNoHost() throws Exception {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- checkPrecondition();
- IHost[] hosts = new IHost[] {};
- registry.moveHosts("TestProfile", hosts, -1); // should not fail
- }
-
- /**
- * Create the test hosts.
- */
- private void createHosts() throws Exception {
-
- hostArray = new IHost[NUMBER_OF_HOSTS];
-
- /* Common host properties */
- Properties properties = new Properties();
- properties.setProperty(IRSEConnectionProperties.ATTR_PROFILE_NAME, "TestProfile"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_ADDRESS, "localhost"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID, IRSESystemType.SYSTEMTYPE_UNIX_ID);
- properties.setProperty(IRSEConnectionProperties.ATTR_USERID, "userid"); //$NON-NLS-1$
- properties.setProperty(IRSEConnectionProperties.ATTR_PASSWORD, "password"); //$NON-NLS-1$
- IRSEConnectionProperties props = getConnectionManager().loadConnectionProperties(properties, false);
-
- for (int i = 0; i < hostArray.length; i++) {
- String hostName = getHostName(i);
- properties.setProperty(IRSEConnectionProperties.ATTR_NAME, hostName);
- hostArray[i] = getConnectionManager().findOrCreateConnection(props);
- assertNotNull("Failed to create connection " + props.getProperty(IRSEConnectionProperties.ATTR_NAME), hostArray[i]); //$NON-NLS-1$
- }
-
- }
-
- private void deleteHosts() {
- for (int i = 1; i < hostArray.length; i++) {
- registry.deleteHost(hostArray[i]);
- }
- }
-
- private void checkPrecondition() {
- for (int i = 0; i < hostArray.length; i++) {
- assertEquals("Precondition check failed", i, registry.getHostPosition(hostArray[i]));
- }
- }
-
- private String getHostName(int i) {
- String hostName = "TestHost" + Integer.toString(i);
- return hostName;
- }
-
-}
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 d77b49cd2..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/IRSEViews.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 perspective id.
- */
- public final String RSE_PERSPECTIVE_ID = "org.eclipse.rse.ui.view.SystemPerspective"; //$NON-NLS-1$
-
- /**
- * 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 a97b441cc..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSECoreTestCase.java
+++ /dev/null
@@ -1,954 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- * Martin Oberhuber (Wind River) - [219086] flush event queue to shield tests from each other
- * Martin Oberhuber (Wind River) - [240729] More flexible disabling of testcases
- ********************************************************************************/
-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.core.RSECorePlugin;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil.IInterruptCondition;
-import org.eclipse.rse.ui.SystemBasePlugin;
-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.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.osgi.framework.Bundle;
-
-/**
- * Core RSE test case infrastructure implementation.
- */
-public class RSECoreTestCase extends TestCase {
- // Test properties storage.
- private final Properties properties = new Properties();
-
- // Internal. Used to remember view zoom state changes.
- private final String PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED = "rseSystemsViewZoomStateChanged"; //$NON-NLS-1$
-
- // Target name, if set.
- private String targetName = null;
-
- // Client name, if set.
- private static final String defaultClientName = (System.getProperty("os.name") + '.' + System.getProperty("os.arch")).replace(' ', '_');
- private String clientName = defaultClientName;
-
- /**
- * 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();
- }
-
- /**
- * Set the name of the target platform against which this test runs. Must be
- * done from Constructor. Used to filter tests in {@link #isTestDisabled()}.
- *
- * @param targetName target platform name.
- */
- public void setTargetName(String targetName) {
- this.targetName = targetName;
- }
-
- /**
- * Set the name of the client platform on which this test runs. Usually not
- * necessary, since the default is computed automatically. If set, this must
- * be done from the Constructor. Used to filter tests in
- * {@link #isTestDisabled()}.
- *
- * @param clientName client platform name.
- */
- public void setClientName(String clientName) {
- this.clientName = clientName;
- }
-
- // ***** 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, IRSEViews.RSE_PERSPECTIVE_ID);
- setProperty(IRSECoreTestCaseProperties.PROP_FORCE_BACKGROUND_EXECUTION, false);
- setProperty(IRSECoreTestCaseProperties.PROP_PERFORMANCE_TIMING_INCLUDE_SETUP_TEARDOWN, false);
- setProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, 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);
- }
-
- /**
- * Return the fully qualified name of the unit test currently running. Used
- * for pattern matching against enablement rules. Qualification is
- * "OS_Name"."OS_Arch"."Testclass"."methodname"."connectiontype" where the
- * connectiontype may be empty if not specified.
- *
- * @return the fully qualified name of the unit test currently running.
- */
- protected String getTestNameForCheck() {
- String testName = getName();
- String testClass = getClass().getName();
- String testPackage = getClass().getPackage().getName();
- String testClassSimpleName = testClass.substring(testPackage.length() + 1);
- String checkName = testClassSimpleName + '.' + testName;
- if (targetName != null) {
- checkName = checkName + '.' + targetName;
- }
- if (clientName != null) {
- checkName = clientName + '.' + checkName;
- }
- return checkName;
- }
-
- /**
- * Check whether this test is currently disabled. Uses Introspection and
- * JUnit Test Name to check against user-specified Properties file. Note
- * that by default, all tests are enabled.
- *
- * @return true if this test should run, false otherwise.
- */
- protected boolean isTestDisabled() {
- String testName = getName();
- String testClass = getClass().getName();
- String testPackage = getClass().getPackage().getName();
- String testClassSimpleName = testClass.substring(testPackage.length() + 1);
- String checkName = testClassSimpleName + '.' + testName;
- String checkString = checkName;
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- checkString = testClassSimpleName + ".*";
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- checkString = "*." + testName;
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- if (targetName != null) {
- checkString = "*." + targetName;
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- checkString = checkName + '.' + targetName;
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- if (clientName != null) {
- checkString = getTestNameForCheck();
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- }
- }
- if (clientName != null) {
- checkString = clientName + ".*";
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- checkString = clientName + '.' + checkName;
- if (!RSETestsPlugin.isTestCaseEnabled(checkString)) {
- System.out.println("--> disabled due to rule: " + checkString);
- return true;
- }
- }
- return false;
- }
-
- // ***** 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$
- }
- }
-
- /**
- * Wait until the SystemProfileManager has finished loading all "autoload" profiles,
- * and the RSEUIPlugin InitRSEJob has finished filling it with the default connections.
- * @throws InterruptedException when initialization is interrupted e.g. by shutting down Eclipse.
- */
- protected void waitForRSEWorkspaceInit() throws InterruptedException {
- //RSEUIPlugin is loaded automatically because RSETestsPlugins extends SystemBasePlugin,
- //which is defined in org.eclipse.rse.ui, so we KNOW org.eclipse.rse.ui is started.
- //TODO: At one point we want the tests to run headless, so then RSETestsPlugins should
- //not extend SystemBasePlugin any more.
- Job[] jobs = Job.getJobManager().find(null);
- for(int i=0; i<jobs.length; i++) {
- if ("Initialize RSE".equals(jobs[i].getName())) { //$NON-NLS-1$
- System.out.println("Waiting for InitRSEJob"); //$NON-NLS-1$
- jobs[i].join();
- break;
- }
- }
- //The code below would never be necessary during normal initialization,
- //Since the InitRSEJob takes care of loading the profiles already.
- //We still wait here, in order to ensure that unit tests are really
- //separate from each other.
- final IRSEPersistenceManager pm = RSECorePlugin.getThePersistenceManager();
- while (!pm.isRestoreComplete() || pm.isBusy()) {
- System.err.println("Waiting for Persistence Manager"); //$NON-NLS-1$
- Thread.sleep(100);
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- waitForRSEWorkspaceInit();
- switchMaximizeSystemsView();
- }
-
- /**
- * Flush the event queue in order to ensure that no left-over events influence later test cases.
- * <p>
- * Unhandled exceptions in the event loop event are caught as follows:
- * In case multiple events from the event loop throw exceptions these are printed
- * to stdout. The first exception found in the event loop is thrown to the caller.
- *
- * @throws Exception in case an unhandled event loop exception was found.
- */
- protected void flushEventQueue() throws Exception {
- Display display = Display.getCurrent();
- if (display!=null) {
- //on the dispatch thread already
- Exception eventLoopException = null;
- while(!display.isDisposed()) {
- //loop until event queue is flushed
- try {
- if (!display.readAndDispatch()) {
- break;
- }
- } catch(Exception e) {
- if (eventLoopException==null) {
- eventLoopException = e;
- } else {
- System.out.println("Multiple unhandled event loop exceptions:");
- e.printStackTrace();
- }
- }
- }
- if (eventLoopException!=null) {
- throw eventLoopException;
- }
- } else {
- //calling from background thread
- final Exception[] ex = new Exception[1];
- display = Display.getDefault();
- display.syncExec(new Runnable() {
- public void run() {
- try {
- flushEventQueue();
- } catch(Exception e) {
- ex[0] = e;
- }
- }
- });
- if (ex[0]!=null) throw ex[0];
- }
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- restoreMaximizeSystemsView();
- //if running on main thread: wait until all asynchronous events are fired,
- //in order to ensure that individual test cases do not influence each other
- //See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=219086
- flushEventQueue();
- super.tearDown();
- }
-
- // ***** View and perspective management and support methods *****
-
- /**
- * Bring the RSE SystemsView to front, and toggle its "maximized" state based on what
- * the {@link IRSECoreTestCaseProperties#PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW} property
- * requires for the given test case.
- * In case a Workbench Intro View is hiding every else because this is the first
- * product launch, it is hidden.
- */
- protected void switchMaximizeSystemsView() {
- final String perspectiveId = getProperty(IRSECoreTestCaseProperties.PROP_SWITCH_TO_PERSPECTIVE);
- assertNotNull("Invalid null-value for test case perspective id!", perspectiveId); //$NON-NLS-1$
-
- // all view management must happen in the UI thread!
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- // 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.
- setProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, 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);
- setProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, true);
- } else if (reference.getPage().getPartState(reference) == IWorkbenchPage.STATE_MAXIMIZED
- && isProperty(IRSECoreTestCaseProperties.PROP_MAXIMIZE_REMOTE_SYSTEMS_VIEW, false)) {
- reference.getPage().toggleZoom(reference);
- setProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, true);
- }
- }
- });
-
- // Give the UI a chance to repaint if the view zoom state changed
- if (isProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, true)) {
- System.err.println("Waiting for UI to repaint"); //$NON-NLS-1$
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
- }
- }
-
- /**
- * Restore the RSE SystemsView to its previous state, in case the view state
- * has been changed by {@link #switchMaximizeSystemsView()}.
- */
- protected void restoreMaximizeSystemsView() {
- // restore the original view zoom state
- if (isProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, true)) {
- final String perspectiveId = getProperty(IRSECoreTestCaseProperties.PROP_SWITCH_TO_PERSPECTIVE);
- assertNotNull("Invalid null-value for test case perspective id!", perspectiveId); //$NON-NLS-1$
-
- // all view management must happen in the UI thread!
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- 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);
- }
- setProperty(PROP_RSE_SYSTEMS_VIEW_ZOOM_STATE_CHANGED, false);
- }
- });
- }
- }
-
- /**
- * 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.
- */
- public final IViewReference findView(String viewId, String perspectiveId) {
- 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 = workbench.getActiveWorkbenchWindow();
- assertNotNull("Failed to query currently active workbench window!", window); //$NON-NLS-1$
-
- // Now we have to switch to the specified perspecitve
- try {
- workbench.showPerspective(perspectiveId, window);
- } catch (WorkbenchException e) {
- SystemBasePlugin.logError("Failed to switch to requested perspective (id = " + perspectiveId + ")!", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // 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.
- */
- public final IViewPart showView(String viewId, String perspectiveId) {
- 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
- try {
- workbench.showPerspective(perspectiveId, window);
- } catch (WorkbenchException e) {
- SystemBasePlugin.logError("Failed to switch to requested perspective (id = " + perspectiveId + ")!", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // 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$
-
- IViewPart part = null;
- try {
- part = page.showView(viewId);
- } catch (PartInitException e) {
- SystemBasePlugin.logError("Failed to show view (id = " + viewId + ")!", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return part;
- }
-
- /**
- * 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>.
- */
- public final void hideView(String viewId, String perspectiveId) {
- 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 b9445e747..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/RSEWaitAndDispatchUtil.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 instantiated as all provided methods
- * are declared static!
- */
-public final class RSEWaitAndDispatchUtil {
-
- /**
- * Private constructor.
- */
- private RSEWaitAndDispatchUtil() {
- // nothing to do. The class cannot be instantiated.
- }
-
- /**
- * 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 immediately if any time out less or equal
- * to 0 is specified.
- *
- * @param timeout The time to wait till the method return in milliseconds. Must be larger than 0.
- */
- public static void waitAndDispatch(long timeout) {
- assert timeout > 0;
- if (timeout > 0) {
- long start = System.currentTimeMillis();
- final 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 && !display.isDisposed()) {
- //See EventLoopProgressMonitor.runEventLoop():
- //Usually, we should embed the display.readAndDispatch() inside a
- //try...catch construct in order to continue running the loop even
- //if an exception occurs, since that exception is not necessarlily
- //related to the test code.
- //Here, however, we deliberately let exception fall through in the
- //hope that seeing it in the test helps finding the issue that causes
- //the unhandled event loop exception.
- 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 immediately 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 milliseconds. 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();
- final 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 && !display.isDisposed()) {
- 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 98b5a21d3..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, 2008 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 artifacts) 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 6e449bbf8..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/IRSEConnectionProperties.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - Support REXEC launch type for dstore
- *******************************************************************************/
-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_ID = "system_type_id"; //$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$
- public final String ATTR_DAEMON_PORT = "daemon_port"; //$NON-NLS-1$
- public final String ATTR_REXEC_PORT = "rexec_port"; //$NON-NLS-1$
- public final String ATTR_SERVER_LAUNCH_TYPE = "launch_type"; //$NON-NLS-1$
- public final String ATTR_SERVER_PATH = "dstore_server_path"; //$NON-NLS-1$
- public final String ATTR_SERVER_SCRIPT = "dstore_server_script"; //$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 f576e9fb3..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEBaseConnectionTestCase.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Xuan Chen (IBM) - [198859] Update the API doc for getRemoteSystemConnection.
- * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
- *******************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.rse.tests.internal.RSEConnectionManager;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * 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_ID, IRSESystemType.SYSTEMTYPE_LOCAL_ID);
- 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() {
- setTargetName("local");
- if (isTestDisabled())
- return null;
- 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;
- }
-
- protected IHost getSSHHost()
- {
- setTargetName("ssh");
- if (isTestDisabled())
- return null;
- return getHost("sshConnection.properties");
- }
-
- protected IHost getFTPHost()
- {
- setTargetName("ftp");
- if (isTestDisabled())
- return null;
- return getHost("ftpConnection.properties");
- }
-
- protected IHost getLinuxHost()
- {
- setTargetName("linux");
- if (isTestDisabled())
- return null;
- return getHost("linuxConnection.properties");
- }
-
- protected IHost getWindowsHost()
- {
- setTargetName("windows");
- if (isTestDisabled())
- return null;
- return getHost("windowsConnection.properties");
- }
-
- protected IHost getHost(String propertiesFileName) {
- IHost host;
-
- // Calculate the location of the test connection properties
- IPath location = getTestDataLocation("", false); //$NON-NLS-1$
- assertNotNull("Cannot locate test data! Missing test data location?", location); //$NON-NLS-1$
- location = location.append(propertiesFileName);
- 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 properties from the calculated location without backing up defaults
- IRSEConnectionProperties properties = getConnectionManager().loadConnectionProperties(location, false);
- assertNotNull("Failed to load test connection properties from location " + location.toOSString(), properties); //$NON-NLS-1$
-
- // Lookup and create the connection now if necessary
- host = getConnectionManager().findOrCreateConnection(properties);
- assertNotNull("Failed to create connection " + properties.getProperty(IRSEConnectionProperties.ATTR_NAME), host); //$NON-NLS-1$
-
- // For connections with dstore, need to disable SSL alerts
- // since the UI messagebox on connect would make the test hang
- ISubSystem[] ss = host.getSubSystems();
- for (int i = 0; i < ss.length; i++) {
- String id = ss[i].getSubSystemConfiguration().getId();
- if (id.indexOf("dstore.") >= 0) {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- ////Ensure that the SSL acknowledge dialog does not show up.
- ////We no longer need to setDefault first in order to set the value of a preference.
- ////Since this is now in connectorservice.dstore/Activator, and it's sure to be active here
- // store.setDefault(ISystemPreferencesConstants.ALERT_SSL,ISystemPreferencesConstants.DEFAULT_ALERT_SSL);
- // store.setDefault(ISystemPreferencesConstants.ALERT_NONSSL, ISystemPreferencesConstants.DEFAULT_ALERT_NON_SSL);
- store.setValue(ISystemPreferencesConstants.ALERT_SSL, false);
- store.setValue(ISystemPreferencesConstants.ALERT_NONSSL, false);
- break;
- }
- }
-
- return host;
- }
-
- /**
- * Lookup/create and return the remote system connection according to the list of system parameters.
- * @param systemTypeID The type id string of the remote system.
- * @param systemAddress The address of the remote system.
- * @param systemName The connection name.
- * @param userID The user id used to logon to the remote system.
- * @param password The password of the user id to logon to the remote system.
- *
- * @return The remote system connection or <code>null</code> if the lookup/creation fails.
- */
- protected IHost getRemoteSystemConnection(String systemTypeID, String systemAddress, String systemName, String userID, String password) {
-
- Exception exception = null;
- String cause = null;
- // Pre-create the local system connection properties
- Properties properties = new Properties();
- properties.setProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID, systemTypeID);
- properties.setProperty(IRSEConnectionProperties.ATTR_ADDRESS, systemAddress);
- properties.setProperty(IRSEConnectionProperties.ATTR_NAME, systemName);
- properties.setProperty(IRSEConnectionProperties.ATTR_USERID, userID);
- if (password != null)
- properties.setProperty(IRSEConnectionProperties.ATTR_PASSWORD, password);
-
- IRSEConnectionProperties remoteSystemConnectionProperties;
- remoteSystemConnectionProperties = getConnectionManager().loadConnectionProperties(properties, false);
-
- IHost connection = null;
- try {
- connection = getConnectionManager().findOrCreateConnection(remoteSystemConnectionProperties);
- } catch (Exception e) {
- exception = e;
- cause = exception.getLocalizedMessage();
- }
- assertNull("Failed to find and create remote system connection! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("Failed to find and create remote system connection! Cause unknown!", connection); //$NON-NLS-1$
-
- return connection;
- }
-
- protected IProgressMonitor getDefaultProgressMonitor() {
- return new NullProgressMonitor();
- }
-}
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 2b0d6fd39..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/connection/RSEConnectionTestCase.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- ********************************************************************************/
-package org.eclipse.rse.tests.core.connection;
-
-import java.util.Properties;
-
-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.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * Basic connection tests.
- */
-public class RSEConnectionTestCase extends RSEBaseConnectionTestCase {
-
- public RSEConnectionTestCase(String name) {
- super(name);
- }
-
- /**
- * Check whether connections are case sensitive
- */
- public void testConnectionCaseInSensitive() throws Exception {
- // -test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile prof = RSECorePlugin.getTheSystemProfileManager().getDefaultPrivateSystemProfile();
- ISystemProfile testprof = RSECorePlugin.getTheSystemProfileManager().cloneSystemProfile(prof, "testConnectionCaseInSensitive");
- IHost h1 = sr.createLocalHost(testprof, "TestConn", "mober");
- assertNotNull(h1);
- assertEquals(h1.getAliasName(), "TestConn");
-
- // Case variant of connection is found in profile
- IHost h2 = sr.getHost(testprof, "testCONN");
- assertNotNull(h2);
- assertEquals(h1, h2);
-
- sr.deleteSystemProfile(testprof);
- }
-
- /**
- * Creating/disposing elements in the systemView can lead
- * to "Widget is disposed" exception when Refresh is called
- * rarely so there is much to refresh. This might be due to
- * the elementComparer only comparing by absolute name.
- */
- public void testBug255023() throws Exception {
- // -test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- Job j = new Job("testBug255023") {
-
- protected IStatus run(IProgressMonitor monitor) {
- try {
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile prof = sr.createSystemProfile("Foo", true);
- IRSESystemType st = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID);
- IHost h1 = sr.createHost("Foo", st, "vxsim0", "localhost", "vxsim0");
- IHost h2 = sr.createHost("Foo", st, "vxsim1", "localhost", "vxsim1");
- IHost h3 = sr.createHost("Foo", st, "vxsim2", "localhost", "vxsim2");
- sr.fireEvent(new SystemResourceChangeEvent(sr, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- // flushEventQueue();
- Thread.sleep(10000);
- sr.deleteHost(h1);
- sr.deleteHost(h2);
- sr.deleteHost(h3);
- // // Firing a refresh event here, after deleting the hosts
- // // but before adding the new one, makes the bug
- // disappear.
- // // Perhaps a correct fix would be that our content
- // provider
- // // refreshes the view right away by means of a listener,
- // // instead of relying on forced manual refresh only.
- // sr.fireEvent(new SystemResourceChangeEvent(sr,
- // ISystemResourceChangeEvents.EVENT_REFRESH, null));
- IHost h4 = sr.createHost("Foo", st, "vxsim1", "localhost", "vxsim1");
- sr.fireEvent(new SystemResourceChangeEvent(sr, ISystemResourceChangeEvents.EVENT_REFRESH, null));
- // flushEventQueue(); // will throw exception in main Thread!
- Thread.sleep(10000);
- sr.deleteSystemProfile(prof);
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- return Status.OK_STATUS;
- }
- };
- j.schedule();
- while (j.getState() != Job.NONE) {
- flushEventQueue();
- }
- }
-
- /**
- * Test creation of connections.
- */
- public void testConnectionCreation() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
-
- 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_ID, IRSESystemType.SYSTEMTYPE_UNIX_ID);
- 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$
-
- props.setProperty(IRSEConnectionProperties.ATTR_NAME, "vxsim_128.11.75.12/4_Cores"); //$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() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
-
- 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$
- getConnectionManager().removeConnection(profileName, "vxsim_128.11.75.12/4_Cores"); //$NON-NLS-1$
- }
-
- /**
- * Test the connect and disconnect methods
- */
- public void testConnect() {
- //-test-author-:DavidDykstal
- IHost connection = getLocalSystemConnection();
- if (isTestDisabled())
- return;
-
- Exception exception = null;
- String cause = null;
-
- 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(false, null);
- } 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() {
- //-test-author-:DavidDykstal
- IHost connection = getLocalSystemConnection();
- if (isTestDisabled())
- return;
-
- Exception exception = null;
- String cause = null;
-
- 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(false, null);
- } 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("/bin/*", null); //$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/core/passwords/PasswordsTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/passwords/PasswordsTest.java
deleted file mode 100644
index 8f5ff871a..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/passwords/PasswordsTest.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 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) - [210474] Deny save password function missing
- ********************************************************************************/
-
-package org.eclipse.rse.tests.core.passwords;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.core.model.SystemSignonInformation;
-import org.eclipse.rse.internal.core.RSECoreRegistry;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-
-/**
- * Tests for {@link PasswordPersistenceManager}.
- * Test various aspects of mnemonic generation and assignment.
- */
-public class PasswordsTest extends RSECoreTestCase {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testAddRemove() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- IRSESystemType systemType = RSECoreRegistry.getInstance().getSystemType(IRSESystemType.SYSTEMTYPE_UNIX_ID);
- IRSESystemType defaultSystemType = PasswordPersistenceManager.DEFAULT_SYSTEM_TYPE;
- String hostAddress = "somesystem.mycompany.com";
- boolean deny = RSEPreferencesManager.getDenyPasswordSave(systemType, hostAddress);
- assertFalse("the initial value of this preference should be false", deny);
-
- String password = "password";
- String userId = "me";
- SystemSignonInformation info = new SystemSignonInformation(hostAddress, userId, password, systemType);
- PasswordPersistenceManager ppm = PasswordPersistenceManager.getInstance();
-
- // save a password
- int result = ppm.add(info, true, true);
- assertEquals("result of add was not what was expected", PasswordPersistenceManager.RC_OK, result);
- SystemSignonInformation returnedInfo = ppm.find(systemType, hostAddress, userId);
- assertEquals("passwords are not equal", password, returnedInfo.getPassword());
- assertEquals("system type not what was expected", systemType, returnedInfo.getSystemType());
-
- // remove the password for the system type
- ppm.remove(systemType, hostAddress, userId); // removes only the entry for the system type
- returnedInfo = ppm.find(systemType, hostAddress, userId, true);
- assertEquals("passwords are not equal", password, returnedInfo.getPassword());
- assertEquals("system type not what was expected", defaultSystemType, returnedInfo.getSystemType());
- returnedInfo = ppm.find(systemType, hostAddress, userId, false);
- assertNull("signon info was found but should not be", returnedInfo);
-
- // remove the password for the default system type
- ppm.remove(defaultSystemType, hostAddress, userId);
- returnedInfo = ppm.find(systemType, hostAddress, userId, true);
- assertNull("signon info was found but should not be", returnedInfo);
- returnedInfo = ppm.find(systemType, hostAddress, userId, false);
- assertNull("signon info was found but should not be", returnedInfo);
-
- // save a password just for the system type
- result = ppm.add(info, true, false);
- assertEquals("result of add was not what was expected", PasswordPersistenceManager.RC_OK, result);
- returnedInfo = ppm.find(systemType, hostAddress, userId);
- assertEquals("passwords are not equal", password, returnedInfo.getPassword());
- assertEquals("system type not what was expected", systemType, returnedInfo.getSystemType());
- returnedInfo = ppm.find(defaultSystemType, hostAddress, userId);
- assertNull("signon info was found but should not be", returnedInfo);
-
- // remove the password
- ppm.remove(systemType, hostAddress, userId);
- returnedInfo = ppm.find(systemType, hostAddress, userId, true);
- assertNull("signon info was found but should not be", returnedInfo);
- returnedInfo = ppm.find(systemType, hostAddress, userId, false);
- assertNull("signon info was found but should not be", returnedInfo);
- }
-
- public void testSaveDenial() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- IRSESystemType systemType = RSECoreRegistry.getInstance().getSystemType(IRSESystemType.SYSTEMTYPE_UNIX_ID);
- String hostAddress = "somesystem.mycompany.com";
- boolean deny = RSEPreferencesManager.getDenyPasswordSave(systemType, hostAddress);
- assertFalse("the initial value of this preference should be false", deny);
-
- String password = "password";
- String userId = "me";
- SystemSignonInformation info = new SystemSignonInformation(hostAddress, userId, password, systemType);
- PasswordPersistenceManager ppm = PasswordPersistenceManager.getInstance();
-
- // save a password
- int result = ppm.add(info, true, true);
- assertEquals("result of add was not what was expected", PasswordPersistenceManager.RC_OK, result);
- SystemSignonInformation returnedInfo = ppm.find(systemType, hostAddress, userId);
- assertEquals("passwords are not equal", password, returnedInfo.getPassword());
- assertEquals("system type not what was expected", systemType, returnedInfo.getSystemType());
-
- // change the preference for this system type, should erase all the passwords, including the default system type
- RSEPreferencesManager.setDenyPasswordSave(systemType, hostAddress, true);
- returnedInfo = ppm.find(systemType, hostAddress, userId);
- assertNull("signon info was found but should not be", returnedInfo);
- returnedInfo = ppm.find(systemType, hostAddress, userId, true);
- assertNull("signon info was found but should not be", returnedInfo);
- returnedInfo = ppm.find(systemType, hostAddress, userId, false);
- assertNull("signon info was found but should not be", returnedInfo);
-
- // try to save one
- result = ppm.add(info, true, true);
- assertEquals("result of add was not what was expected", PasswordPersistenceManager.RC_DENIED, result);
-
- // should still not be there
- returnedInfo = ppm.find(systemType, hostAddress, userId);
- assertNull("signon info was found but should not be", returnedInfo);
- returnedInfo = ppm.find(systemType, hostAddress, userId, true);
- assertNull("signon info was found but should not be", returnedInfo);
- returnedInfo = ppm.find(systemType, hostAddress, userId, false);
- assertNull("signon info was found but should not be", returnedInfo);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/passwords/PasswordsTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/passwords/PasswordsTestSuite.java
deleted file mode 100644
index 99eadf4b0..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/passwords/PasswordsTestSuite.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [210474] Deny save password function missing
- *******************************************************************************/
-package org.eclipse.rse.tests.core.passwords;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class PasswordsTestSuite 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 Passwords Test Suite"); //$NON-NLS-1$
- suite.addTestSuite(PasswordsTest.class);
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)PasswordsTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/RSERegistriesTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/RSERegistriesTestSuite.java
deleted file mode 100644
index d4fdf6087..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/RSERegistriesTestSuite.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.registries;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSERegistriesTestSuite 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 Registries Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(SubSystemConfigurationProxyTestCase.class);
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSERegistriesTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java
deleted file mode 100644
index 63a246326..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemConfigurationProxyTestCase.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- *******************************************************************************/
-package org.eclipse.rse.tests.core.registries;
-
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-
-/**
- * Tests the subsystem configuration proxy functionality.
- */
-public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
-
- private void assertProxyApplicable(ISubSystemConfigurationProxy proxy, IRSESystemType systemType, boolean isApplicable) {
- if (proxy.appliesToSystemType(systemType) != isApplicable) {
- StringBuffer buf = new StringBuffer(120);
- buf.append("Proxy \""); //$NON-NLS-1$
- buf.append(proxy.getId());
- buf.append("\" is expected "); //$NON-NLS-1$
- if (!isApplicable)
- buf.append("not "); //$NON-NLS-1$
- buf.append("to be applicable to systemType \""); //$NON-NLS-1$
- buf.append(systemType.getId());
- buf.append("\", but returned "); //$NON-NLS-1$
- if (isApplicable)
- buf.append("not "); //$NON-NLS-1$
- buf.append("to be!"); //$NON-NLS-1$
- assertTrue(buf.toString(), false);
- }
- }
-
- public void testSubSystemConfigurationProxy() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
- ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
- assertNotNull("Failed to fetch RSE system registry instance!", systemRegistry); //$NON-NLS-1$
-
- // get all subsystem configuration proxies and pick out the ones from our
- // tests plugin.
- ISubSystemConfigurationProxy[] proxies = systemRegistry.getSubSystemConfigurationProxies();
- for (int i = 0; i < proxies.length; i++) {
- ISubSystemConfigurationProxy proxy = proxies[i];
- if (proxy.getDeclaringBundle().equals(RSETestsPlugin.getDefault().getBundle())) {
- // Thats one of the subsystem configurations declared in our test subsystem
- assertNotNull("Unexpected retrun value null for proxy.toString()!", proxy.toString()); //$NON-NLS-1$
- assertEquals("Proxy object changed hash code between two calls!", proxy.hashCode(), proxy.hashCode()); //$NON-NLS-1$
- assertFalse("Unexpected return value true for proxy.equals(null)!", proxy.equals(null)); //$NON-NLS-1$
- assertTrue("Unexpected return value false for proxy.equals(proxy)!", proxy.equals(proxy)); //$NON-NLS-1$
-
- // a few specific value we test only for one well known test subsystem
- if ("org.eclipse.rse.tests.subsystems.TestSubSystem".equals(proxy.getId())) { //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getName()!", "Tests", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.windows", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
- assertFalse("Unexpected return value true for proxy.supportsAllSystemTypes()!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getPriority()!", 50000, proxy.getPriority()); //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
- assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
-
- // walk through all known system types. Only "Local" and "Windows" should match!
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- assertNotNull("Failed to fetch list of registered system types!", systemTypes); //$NON-NLS-1$
- for (int j = 0; j < systemTypes.length; j++) {
- IRSESystemType systemType = systemTypes[j];
- assertNotNull("Invalid null value in list of registered system types!", systemType); //$NON-NLS-1$
- if (systemType.getId().equals(IRSESystemType.SYSTEMTYPE_LOCAL_ID) || systemType.getId().equals(IRSESystemType.SYSTEMTYPE_WINDOWS_ID)) {
- assertProxyApplicable(proxy, systemType, true);
- } else {
- assertProxyApplicable(proxy, systemType, false);
- }
- }
- }
-
- if ("org.eclipse.rse.tests.subsystems.TestSubSystem2".equals(proxy.getId())) { //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem 2", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getName()!", "Tests2", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.tests.*", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
- assertFalse("Unexpected return value true for proxy.supportsAllSystemTypes()!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getPriority()!", 100000, proxy.getPriority()); //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
- assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
-
- // walk through all known system types. All system types declared by the tests plugin are expected to match
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- assertNotNull("Failed to fetch list of registered system types!", systemTypes); //$NON-NLS-1$
- for (int j = 0; j < systemTypes.length; j++) {
- IRSESystemType systemType = systemTypes[j];
- assertNotNull("Invalid null value in list of registered system types!", systemType); //$NON-NLS-1$
- if (systemType.getId().startsWith("org.eclipse.rse.tests.")) { //$NON-NLS-1$
- assertProxyApplicable(proxy, systemType, true);
- } else {
- assertProxyApplicable(proxy, systemType, false);
- }
- }
- }
-
- if ("org.eclipse.rse.tests.subsystems.TestSubSystem3".equals(proxy.getId())) { //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem 3", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getName()!", "Tests3", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.systemtype.*n?x", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
- assertFalse("Unexpected return value true for proxy.supportsAllSystemTypes()!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getPriority()!", 2000, proxy.getPriority()); //$NON-NLS-1$
- assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
- assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
-
- // walk through all known system types. Only "Unix" and "Linux" should match!
- IRSESystemType[] systemTypes = RSECorePlugin.getTheCoreRegistry().getSystemTypes();
- assertNotNull("Failed to fetch list of registered system types!", systemTypes); //$NON-NLS-1$
- for (int j = 0; j < systemTypes.length; j++) {
- IRSESystemType systemType = systemTypes[j];
- assertNotNull("Invalid null value in list of registered system types!", systemType); //$NON-NLS-1$
- if ("Unix".equalsIgnoreCase(systemType.getName()) || "Linux".equalsIgnoreCase(systemType.getName())) { //$NON-NLS-1$ //$NON-NLS-2$
- assertProxyApplicable(proxy, systemType, true);
- } else {
- assertProxyApplicable(proxy, systemType, false);
- }
- }
- }
- }
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemInterfacesTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemInterfacesTest.java
deleted file mode 100644
index 19d258c57..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/core/registries/SubSystemInterfacesTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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 implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.core.registries;
-
-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.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.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-
-/**
- * Tests the subsystem interfaces.
- */
-public class SubSystemInterfacesTest extends RSECoreTestCase {
-
- public void testSubSystemFinding() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- assertNotNull("system registry not found", registry); //$NON-NLS-1$
- ISystemProfileManager profileManager = registry.getSystemProfileManager();
- // create an empty profile (profile1)
- ISystemProfile profile = profileManager.createSystemProfile("profile1", true);
- // populate profile1 with a connection (host1)
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_UNIX_ID);
- IHost host = registry.createHost(profile.getName(), systemType, "host1", "localhost", "host1", true);
- // find all of its subsystems one way
- ISubSystem[] subsystems = registry.getSubSystems(host);
- int n = subsystems.length;
- // find all of its subsystems another way
- subsystems = registry.getSubsystems(host, ISubSystem.class);
- assertEquals(n, subsystems.length);
- // find its file subsystem
- subsystems = registry.getSubsystems(host, IRemoteFileSubSystem.class);
- assertEquals(1, subsystems.length);
- // find its process subsystem
- subsystems = registry.getSubsystems(host, IRemoteProcessSubSystem.class);
- assertEquals(1, subsystems.length);
- // find its shell subsystem
- subsystems = registry.getSubsystems(host, IRemoteCmdSubSystem.class);
- assertEquals(1, subsystems.length);
- // remove the profile
- registry.deleteSystemProfile(profile);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/BadInitializer.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/BadInitializer.java
deleted file mode 100644
index 9e6a7f458..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/BadInitializer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [197167] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.tests.initialization;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.IRSEModelInitializer;
-
-/**
- * An initializer that returns a warning status
- */
-public class BadInitializer implements IRSEModelInitializer {
-
- private static BadInitializer instance = null;
- private boolean wasRun = false;
-
- public static BadInitializer getInstance() {
- return instance;
- }
-
- public BadInitializer() {
- instance = this;
- }
-
- public boolean wasRun() {
- return wasRun;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSEModelInitializer#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus run(IProgressMonitor monitor) {
- IStatus result = new Status(IStatus.WARNING, "org.eclipse.rse.tests", "testing warnings generated during RSE initialization");
- wasRun = true;
- return result;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/GoodInitializer.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/GoodInitializer.java
deleted file mode 100644
index 8edbcd6e7..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/GoodInitializer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [197167] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.tests.initialization;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.IRSEModelInitializer;
-
-/**
- * A plain vanilla initializer that does its thing without exceptions.
- */
-public class GoodInitializer implements IRSEModelInitializer {
-
- private static GoodInitializer instance = null;
- private boolean wasRun = false;
-
- public static GoodInitializer getInstance() {
- return instance;
- }
-
- public GoodInitializer() {
- instance = this;
- }
-
- public boolean wasRun() {
- return wasRun;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSEModelInitializer#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus run(IProgressMonitor monitor) {
- wasRun = true;
- return Status.OK_STATUS;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitListener.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitListener.java
deleted file mode 100644
index e75106676..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [197167] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.tests.initialization;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.rse.core.IRSEInitListener;
-
-/**
- * A listener for initialization
- */
-public class InitListener implements IRSEInitListener {
-
- Set phases = new HashSet();
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSEInitListener#phaseComplete(int)
- */
- public void phaseComplete(int phase) {
- phases.add(new Integer(phase));
- }
-
- public boolean sawPhase(int phase) {
- return phases.contains(new Integer(phase));
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTest.java
deleted file mode 100644
index e3fe516e1..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [197167] initial contribution.
- * David Dykstal (IBM) = [226958] add status values to waitForInitCompletion(phase)
- *******************************************************************************/
-
-package org.eclipse.rse.tests.initialization;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.IRSEInitListener;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.tests.RSETestsPlugin;
-
-/**
- * Should be run on a clean workspace.
- */
-public class InitializationTest extends TestCase {
-
- public InitializationTest(String name) {
- super(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- RSECorePlugin.addInitListener(new IRSEInitListener() {
- public void phaseComplete(int phase) {
- System.out.println("I see phase " + phase);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testInitialization() {
- //-test-author-:DavidDykstal
- if (!RSETestsPlugin.isTestCaseEnabled("InitializationTest.testInitialization"))return; //$NON-NLS-1$
- try {
- IStatus status = null;
- status = RSECorePlugin.waitForInitCompletion(RSECorePlugin.INIT_MODEL);
- assertEquals(Status.OK_STATUS, status);
- status = RSECorePlugin.waitForInitCompletion(RSECorePlugin.INIT_INITIALIZER);
- assertEquals(IStatus.WARNING, status.getSeverity()); // because of BadInitializer
- status = RSECorePlugin.waitForInitCompletion(RSECorePlugin.INIT_ALL);
- assertEquals(IStatus.WARNING, status.getSeverity()); // because of BadInitializer
- status = RSECorePlugin.waitForInitCompletion();
- assertEquals(IStatus.WARNING, status.getSeverity()); // because of BadInitializer
- } catch (InterruptedException e) {
- fail("interrupted");
- } catch (RuntimeException e) {
- throw e;
- }
- System.out.println("Init job should be done");
- assertTrue("not indicating complete", RSECorePlugin.isInitComplete(RSECorePlugin.INIT_ALL));
- GoodInitializer goodInitializer = GoodInitializer.getInstance();
- BadInitializer badInitializer = BadInitializer.getInstance();
- UglyInitializer uglyInitializer = UglyInitializer.getInstance();
- ListenerInitializer listenerInitializer = ListenerInitializer.getInstance();
- assertTrue("good initializer not run", goodInitializer.wasRun());
- assertTrue("bad initializer not run", badInitializer.wasRun());
- assertTrue("ugly initializer not run", uglyInitializer.wasRun());
- assertTrue("listener initializer not run", listenerInitializer.wasRun());
- InitListener listener = listenerInitializer.getListener();
- assertFalse("listener saw phase INIT_MODEL", listener.sawPhase(RSECorePlugin.INIT_MODEL)); // shouldn't see this since it occurs before the listener is added
- assertTrue("listener missed phase INIT_ALL", listener.sawPhase(RSECorePlugin.INIT_ALL));
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTestSuite.java
deleted file mode 100644
index 4641bd4c1..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/InitializationTestSuite.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [197167] initial contribution
- *******************************************************************************/
-package org.eclipse.rse.tests.initialization;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class InitializationTestSuite extends TestSuite {
- /**
- * 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 tests 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 Initialization Test Suite"); //$NON-NLS-1$
- suite.addTest(new InitializationTest("testInitialization"));
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)InitializationTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/ListenerInitializer.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/ListenerInitializer.java
deleted file mode 100644
index 0881d5256..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/ListenerInitializer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [197167] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.tests.initialization;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.IRSEModelInitializer;
-import org.eclipse.rse.core.RSECorePlugin;
-
-/**
- * An initializer that adds a listener to the initialization job.
- */
-public class ListenerInitializer implements IRSEModelInitializer {
-
- private static ListenerInitializer instance = null;
- private boolean wasRun = false;
- private InitListener listener = new InitListener();
-
- public static ListenerInitializer getInstance() {
- return instance;
- }
-
- public ListenerInitializer() {
- instance = this;
- }
-
- public boolean wasRun() {
- return wasRun;
- }
-
- public InitListener getListener() {
- return listener;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSEModelInitializer#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus run(IProgressMonitor monitor) {
- RSECorePlugin.addInitListener(listener);
- wasRun = true;
- return Status.OK_STATUS;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/UglyInitializer.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/UglyInitializer.java
deleted file mode 100644
index ccaa6f844..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/initialization/UglyInitializer.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * 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) - [197167] initial contribution.
- *********************************************************************************/
-
-package org.eclipse.rse.tests.initialization;
-
-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.core.IRSEModelInitializer;
-
-/**
- * An initializer that does asynchronous work.
- */
-public class UglyInitializer implements IRSEModelInitializer {
-
- private static UglyInitializer instance = null;
- volatile boolean wasRun = false;
-
- public static UglyInitializer getInstance() {
- return instance;
- }
-
- public UglyInitializer() {
- instance = this;
- }
-
- public boolean wasRun() {
- return wasRun;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.IRSEModelInitializer#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus run(IProgressMonitor monitor) {
- Job job1 = new Job("test initializer job 1") {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- Thread.sleep(3000); // sleep for a bit
- } catch (InterruptedException e) {
- // eat the exception
- }
- return Status.OK_STATUS;
- }
- };
- Job job2 = new Job("test initializer job 2") {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- Thread.sleep(3000); // sleep for a bit
- } catch (InterruptedException e) {
- // eat the exception
- }
- return Status.OK_STATUS;
- }
- };
- job1.schedule(1000);
- job2.schedule(2000);
- wasRun = true;
- return Status.OK_STATUS;
- }
-
-}
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 82f336470..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEConnectionManager.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David Dykstal (IBM) - [217556] remove service subsystem types
- * Martin Oberhuber (Wind River) - [219086] flush event queue to shield tests from each other
- * David Dykstal (IBM) - [210474] Deny save password function missing
- * Martin Oberhuber (Wind River) - Support REXEC launch type for dstore
- *******************************************************************************/
-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.IRSESystemType;
-import org.eclipse.rse.core.IRSEUserIdConstants;
-import org.eclipse.rse.core.PasswordPersistenceManager;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-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.IRemoteServerLauncher;
-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.ServerLaunchType;
-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.swt.widgets.Display;
-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;
-
- ISystemRegistry systemRegistry = RSECorePlugin.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;
-
- ISystemRegistry systemRegistry = RSECorePlugin.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$
- }
- profileName = profile.getName();
- 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.assertFalse("FAILED(findOrCreateConnection): Invalid host name!", "unknown".equals(name)); //$NON-NLS-1$ //$NON-NLS-2$
- connection = systemRegistry.getHost(profile, name);
- if (connection == null) {
- String userId = properties.getProperty(IRSEConnectionProperties.ATTR_USERID);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid user id name!", "unknown".equals(userId)); //$NON-NLS-1$ //$NON-NLS-2$
- String password = properties.getProperty(IRSEConnectionProperties.ATTR_PASSWORD);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid user password name!", "unknown".equals(password)); //$NON-NLS-1$ //$NON-NLS-2$
- String address = properties.getProperty(IRSEConnectionProperties.ATTR_ADDRESS);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid remote system ip address or dns name!", "unknown".equals(address)); //$NON-NLS-1$ //$NON-NLS-2$
- String systemTypeId = properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid system type!", "unknown".equals(systemTypeId)); //$NON-NLS-1$ //$NON-NLS-2$
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(systemTypeId);
- String daemonPort = properties.getProperty(IRSEConnectionProperties.ATTR_DAEMON_PORT);
- Assert.assertFalse("FAILED(findOrCreateConnection): Invalid port!", "unknown".equals(daemonPort)); //$NON-NLS-1$ //$NON-NLS-2$
- String rexecPort = properties.getProperty(IRSEConnectionProperties.ATTR_REXEC_PORT);
- String serverLaunchType = properties.getProperty(IRSEConnectionProperties.ATTR_SERVER_LAUNCH_TYPE);
- String serverPath = properties.getProperty(IRSEConnectionProperties.ATTR_SERVER_PATH);
- String serverScript = properties.getProperty(IRSEConnectionProperties.ATTR_SERVER_SCRIPT);
-
- exception = null;
- cause = null;
-
- try {
- connection = systemRegistry.createHost(profileName, systemType, name, address, null, userId, IRSEUserIdConstants.USERID_LOCATION_HOST, 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, false);
- }
-
- IServerLauncherProperties connProperties = connection.getConnectorServices()[0].getRemoteServerLauncherProperties();
- if (connProperties instanceof IRemoteServerLauncher) {
- IRemoteServerLauncher launcher = (IRemoteServerLauncher) connProperties;
- if (daemonPort != null) {
- int daemonPortNum = Integer.parseInt(daemonPort);
- launcher.setDaemonPort(daemonPortNum);
- }
- if (serverLaunchType != null) {
- launcher.setServerLaunchType(ServerLaunchType.get(serverLaunchType));
- }
- if (rexecPort != null) {
- int rexecPortNum = Integer.parseInt(rexecPort);
- launcher.setRexecPort(rexecPortNum);
- }
- if (serverPath != null) {
- launcher.setServerPath(serverPath);
- }
- if (serverScript != null) {
- launcher.setServerScript(serverScript);
- }
- }
- }
- Assert.assertNotNull("FAILED(findOrCreateConnection): Failed to find and/or create connection IHost object!", connection); //$NON-NLS-1$
- final Display display = Display.getCurrent();
- if (display!=null) {
- while(!display.isDisposed() && display.readAndDispatch()) {
- //running on main thread: wait until all async events are fired
- }
- }
-
- 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.getTheSystemRegistry();
- ISubSystemConfiguration desiredConfiguration = registry.getSubSystemConfiguration(desiredConfigurationId);
- if (subsystem.canSwitchTo(desiredConfiguration)) {
- subsystem.switchServiceFactory(desiredConfiguration);
- }
- }
- 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 = RSECorePlugin.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 = RSECorePlugin.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 1e90715b3..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSEInternalFrameworkTestCase.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- *******************************************************************************/
-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.core.IRSESystemType;
-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() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
-
- // 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() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
-
- // 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() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
-
- // 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() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
-
- // 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!", IRSESystemType.SYSTEMTYPE_WINDOWS_ID, properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID)); //$NON-NLS-1$
- 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_ID, IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID);
- 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!", IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID, properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID)); //$NON-NLS-1$
- 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!", IRSESystemType.SYSTEMTYPE_SSH_ONLY_ID, properties.getProperty(IRSEConnectionProperties.ATTR_SYSTEM_TYPE_ID)); //$NON-NLS-1$
- 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 b3c44217f..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/RSETestsPluginTestCase.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - organize, enable and tag test cases
- *******************************************************************************/
-
-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() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
-
- 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 fc9957e0d..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystem.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
- * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
- * David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
- *******************************************************************************/
-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.services.clientserver.messages.SystemMessageException;
-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 leaves. Further children can be added
- * or removed via context menu actions.
- */
-public class TestSubSystem extends SubSystem implements ITestSubSystem {
-
- private ArrayList fChildren = new ArrayList();
-
- /**
- * Constructor.
- *
- * @param host the host to connect
- * @param connectorService connector service to use
- */
- 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) throws SystemMessageException {
- super.initializeSubSystem(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();
- super.uninitializeSubSystem(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#getObjectWithAbsoluteName(java.lang.String)
- */
- public Object getObjectWithAbsoluteName(String key, IProgressMonitor monitor) throws Exception {
- ITestSubSystemNode[] childs = getChildNodes();
- for (int i = 0; i < childs.length; i++) {
- if (childs[i].getName().equalsIgnoreCase(key)) {
- return childs[i];
- }
- }
- return super.getObjectWithAbsoluteName(key, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
- */
- protected Object[] internalResolveFilterString(String filterString, IProgressMonitor monitor) 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(Object parent, String filterString, IProgressMonitor monitor) 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 99299a9fb..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemAdapter.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveHelpers;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewSubSystemAdapter;
-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.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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) 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 1ae19461b..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.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
-
- String[] strings = new String[] { ".*" }; //$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$
- }
-
-}
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 29754a15f..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, 2007 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 2fbfc0d44..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConnectorService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
- *******************************************************************************/
-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.BasicConnectorService;
-
-public class TestSubSystemConnectorService extends BasicConnectorService {
-
- 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 {
- connected = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void internalDisconnect(IProgressMonitor monitor) throws Exception {
- connected = 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 f7ef5e586..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemNodeAdapter.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
- *******************************************************************************/
-package org.eclipse.rse.tests.internal.testsubsystem;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.rse.internal.ui.view.SystemPerspectiveHelpers;
-import org.eclipse.rse.internal.ui.view.SystemView;
-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.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.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
- */
- public String getAbsoluteName(Object element) {
- assert 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;
- }
-
- /* (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(IAdaptable 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(IAdaptable element, IProgressMonitor monitor) {
- 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(Object element, IProgressMonitor monitor) 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(Object element, IProgressMonitor monitor) 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, IProgressMonitor)
- */
- public boolean doRename(Shell shell, Object element, String name, IProgressMonitor monitor) 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);
- }
-
- /**
- * This is a local RSE artifact so returning false
- *
- * @param element the object to check
- * @return false since this is not remote
- */
- public boolean isRemote(Object element) {
- return false;
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/ExportImportTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/ExportImportTest.java
deleted file mode 100644
index e76a56d7c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/ExportImportTest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 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.
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- * David Dykstal (IBM) - [232126] add test for filter type persistence
- * Martin Oberhuber (Wind River) - [240729] More flexible disabling of testcases
- *********************************************************************************/
-
-package org.eclipse.rse.tests.persistence;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.IRSESystemType;
-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.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.persistence.RSEEnvelope;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.persistence.IRSEPersistenceProvider;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-
-/**
- *
- */
-public class ExportImportTest extends RSECoreTestCase {
-
- ISystemProfile sourceProfile = null;
- ISystemRegistry registry = null;
- IRSEPersistenceManager manager = null;
- ISubSystemConfiguration configuration = null;
-
- public ExportImportTest(String name) {
- super(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- // get the registry and persistence provider
- manager = RSECorePlugin.getThePersistenceManager();
- registry = RSECorePlugin.getTheSystemRegistry();
- // create the first profile and populate it
- ISystemProfileManager profileManager = registry.getSystemProfileManager();
- sourceProfile = profileManager.createSystemProfile("profile1", true);
- // populate profile1 with a connection (host1)
- IRSESystemType systemType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_UNIX_ID);
- IHost host1 = registry.createHost(sourceProfile.getName(), systemType, "host1", "localhost", "host1", true);
- // find its file subsystem
- ISubSystem[] subsystems = registry.getSubsystems(host1, IRemoteFileSubSystem.class);
- ISubSystem host1FileSubsystem = subsystems[0];
- // create a connection-private filter (hostFilter1)
- String[] filterStrings = new String[] { "*.txt" };
- ISystemFilterPool host1FilterPool = host1FileSubsystem.getUniqueOwningSystemFilterPool(true);
- ISystemFilter hostFilter1 = host1FilterPool.createSystemFilter("hostFilter1", filterStrings);
- hostFilter1.setType("hostFilter1Type");
- // create a connection-private filter (hostFilter2)
- filterStrings = new String[] { "*.c" };
- host1FilterPool.createSystemFilter("hostFilter2", filterStrings);
- // create a shared filter pool
- configuration = host1FileSubsystem.getSubSystemConfiguration();
- ISystemFilterPoolManager filterPoolManager = configuration.getFilterPoolManager(sourceProfile, true);
- ISystemFilterPool sharedFilterPool = filterPoolManager.createSystemFilterPool("sharedFilterPool", true);
- // create a shared filter (sharedFilter)
- filterStrings = new String[] { "*.java", "*.txt", "*.c" };
- ISystemFilter sharedFilter = sharedFilterPool.createSystemFilter("sharedFilter", filterStrings);
- sharedFilter.setType("sharedFilterType");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- * Export a single filter pool and import it into an empty profile.
- */
- public void testFilterPool1() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- // find the provider
- IRSEPersistenceProvider persistenceProvider = manager.getPersistenceProvider("org.eclipse.rse.persistence.PropertyFileProvider");
- // find a shared filter pool
- ISystemFilterPoolManager fpm = configuration.getFilterPoolManager(sourceProfile);
- ISystemFilterPool fp = fpm.getSystemFilterPool("sharedFilterPool");
- // export the filter pool
- RSEEnvelope envelope = new RSEEnvelope();
- envelope.add(fp);
- IProgressMonitor monitor = new NullProgressMonitor();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- envelope.put(out, persistenceProvider, monitor);
- // create an empty profile
- ISystemProfile targetProfile = registry.createSystemProfile("profileFilterPool1", true);
- // import into the profile
- ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
- monitor = new NullProgressMonitor();
- envelope.get(in, monitor);
- envelope.mergeWith(targetProfile);
- // verify the contents
- assertEquals(0, registry.getHostCount(targetProfile));
- fpm = configuration.getFilterPoolManager(targetProfile);
- assertNotNull(fpm);
- ISystemFilterPool[] pools = fpm.getSystemFilterPools();
- assertEquals(1, pools.length);
- fp = pools[0];
- assertNotNull(fp);
- assertEquals("sharedFilterPool", fp.getName());
- ISystemFilter[] filters = fp.getFilters();
- assertEquals(1, filters.length);
- ISystemFilter filter = filters[0];
- assertEquals("sharedFilter", filter.getName());
- assertEquals("sharedFilterType", filter.getType());
- String[] strings = filter.getFilterStrings();
- assertEquals(3, strings.length);
- assertEquals("*.java", strings[0]);
- assertEquals("*.txt", strings[1]);
- assertEquals("*.c", strings[2]);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Export a single host and import it into an empty profile.
- */
- public void testHost1() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- // find the provider
- IRSEPersistenceProvider persistenceProvider = manager.getPersistenceProvider("org.eclipse.rse.persistence.PropertyFileProvider");
- // create an empty profile
- ISystemProfile targetProfile = registry.createSystemProfile("profile2", true);
- // export a host to a stream this export all connection private pools as well.
- IHost host1 = registry.getHost(sourceProfile, "host1");
- RSEEnvelope envelope = new RSEEnvelope();
- envelope.add(host1);
- IProgressMonitor monitor = new NullProgressMonitor();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- envelope.put(out, persistenceProvider, monitor);
- // import from the newly created stream
- ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
- monitor = new NullProgressMonitor();
- envelope.get(in, monitor);
- envelope.mergeWith(targetProfile);
- // verify the contents
- IHost[] hosts = targetProfile.getHosts();
- assertEquals(1, hosts.length);
- IHost host = hosts[0];
- assertEquals("host1", host.getAliasName());
- ISubSystem[] subsystems = registry.getSubsystems(host, IRemoteFileSubSystem.class);
- assertEquals(1, subsystems.length);
- ISubSystem subsystem = subsystems[0];
- ISystemFilterPool fp = subsystem.getUniqueOwningSystemFilterPool(false);
- assertNotNull(fp);
- ISystemFilter[] filters = fp.getFilters();
- assertEquals(2, filters.length);
- ISystemFilter filter = filters[0];
- assertEquals("hostFilter1", filter.getName());
- String[] strings = filter.getFilterStrings();
- assertEquals(1, strings.length);
- assertEquals("*.txt", strings[0]);
- filter = filters[1];
- assertEquals("hostFilter2", filter.getName());
- strings = filter.getFilterStrings();
- assertEquals(1, strings.length);
- assertEquals("*.c", strings[0]);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public void testPropertySet() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/MigrationTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/MigrationTest.java
deleted file mode 100644
index 853f62af4..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/MigrationTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*********************************************************************************
- * Copyright (c) 2008 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.
- * Martin Oberhuber (Wind River) - [240729] More flexible disabling of testcases
- *********************************************************************************/
-
-package org.eclipse.rse.tests.persistence;
-
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-
-/**
- *
- */
-public class MigrationTest extends RSECoreTestCase {
-
- public MigrationTest(String name) {
- super(name);
- }
-
- public void testProfileMigration() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- // create a new profile
- // set its persistence manager to PM1
- // populate the profile
- // migrate profile to PM2
- // test for migration
- // ensure that the old profile has been locked
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java
deleted file mode 100644
index 6e69611f6..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTest.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [217715] [api] RSE property sets should support nested property sets
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * David Dykstal (IBM) [219069] test is failing
- * David Dykstal (IBM) - [232126] test found to be failing when testing filter type persistence
- *******************************************************************************/
-
-package org.eclipse.rse.tests.persistence;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.core.runtime.jobs.Job;
-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.IPropertySet;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.PropertySet;
-import org.eclipse.rse.persistence.IRSEPersistenceManager;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-
-/**
- * Tests for {@link SystemPreferencesManager}.
- * Since these are persistence tests they will play with the creation and deletion of
- * profiles, hosts, filters, and other model objects. You should run this only in a
- * clean workspace.
- */
-public class PersistenceTest extends RSECoreTestCase {
-
- public PersistenceTest(String name) {
- super(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testPersistenceManagerStartup() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- IRSEPersistenceManager m = RSECorePlugin.getThePersistenceManager();
- for (int i = 0; i < 5; i++) {
- if (m.isRestoreComplete()) break;
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- assertTrue("Restore not complete", m.isRestoreComplete());
- }
-
- public void testProfilePersistence() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- /*
- * Set up this particular test.
- */
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- int n = registry.getSystemProfileManager().getSystemProfiles().length;
-
- /*
- * Create a new profile in this profile manager. This will be the second
- * profile created. Creating a profile causes a commit.
- */
- try {
- ISystemProfile bogus = registry.getSystemProfile("bogus");
- if (bogus == null) {
- registry.createSystemProfile("bogus", true); //$NON-NLS-1$
- n += 1;
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
-// reload(); // reload not yet working
-
- /*
- * There should be one more profile
- */
- ISystemProfile[] profiles = registry.getSystemProfileManager().getSystemProfiles();
- assertEquals(n, profiles.length);
-
- /*
- * One should be default private profile
- */
- boolean found = false;
- for (int i = 0; i < profiles.length && !found; i++) {
- ISystemProfile p = profiles[i];
- found = p.isDefaultPrivate();
- }
- assertTrue("Default private profile not found", found);
-
- /*
- * One should be the test profile
- */
- found = false;
- for (int i = 0; i < profiles.length && !found; i++) {
- ISystemProfile p = profiles[i];
- found = p.getName().equals("bogus");
- }
- assertTrue("bogus profile not found", found);
-
- /*
- * Get the test profile and check its properties.
- */
- ISystemProfile bogus = registry.getSystemProfile("bogus");
- assertNotNull(bogus);
- assertFalse(bogus.isDefaultPrivate());
- assertTrue(bogus.isActive());
- IPropertySet[] pSets = bogus.getPropertySets();
- assertNotNull(pSets);
- assertEquals(0, pSets.length);
-
- /*
- * Add a property set to the profile.
- */
- IPropertySet bogusProperties = new PropertySet("bogus_properties");
- bogusProperties.addProperty("bp1", "1");
- bogusProperties.addProperty("bp2", "2");
- bogus.addPropertySet(bogusProperties);
-
- // nested property set
- IPropertySet bogusNestedProperties = new PropertySet("bogus_nested_properties");
- bogusNestedProperties.addProperty("bnpa", "a");
- bogusNestedProperties.addProperty("bnpb", "b");
- bogusProperties.addPropertySet(bogusNestedProperties);
-
- bogus.commit();
-
- /*
- * Refresh the profile manager.
- */
-// reload(); // reload not yet working
-
- /*
- * Check to see if everything is still OK and that the properties are restored.
- */
- bogus = registry.getSystemProfile("bogus");
- assertNotNull(bogus);
- assertFalse(bogus.isDefaultPrivate());
- assertTrue(bogus.isActive());
- pSets = bogus.getPropertySets();
- assertNotNull(pSets);
- assertEquals(1, pSets.length);
- bogusProperties = bogus.getPropertySet("bogus_properties");
- assertNotNull(bogusProperties);
- assertEquals("1", bogusProperties.getProperty("bp1").getValue());
- assertEquals("2", bogusProperties.getProperty("bp2").getValue());
-
- bogusNestedProperties = bogusProperties.getPropertySet("bogus_nested_properties");
- assertNotNull(bogusNestedProperties);
- assertEquals("a", bogusNestedProperties.getProperty("bnpa").getValue());
- assertEquals("b", bogusNestedProperties.getProperty("bnpb").getValue());
-
- try {
- registry.deleteSystemProfile(bogus);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
-// reload(); // reload not yet working
-
- }
-
- public void testHostPersistence() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- /*
- * Set up this particular test.
- */
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
-
- /*
- * Create a new profile in this profile manager. This will be the third
- * profile created. Creating a profile causes a commit.
- */
- try {
- registry.createSystemProfile("bogus", true); //$NON-NLS-1$
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- ISystemProfile profile = registry.getSystemProfile("bogus");
- assertNotNull(profile);
-
- try {
- IRSESystemType linuxType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LINUX_ID);
- registry.createHost("bogus", linuxType, "myhost", "myhost.mynet.mycompany.net", null);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- IHost host = registry.getHost(profile, "myhost");
- assertNotNull(host);
- host.setDescription("description");
- IPropertySet props = new PropertySet("host_props");
- props.addProperty("bp1", "1");
- props.addProperty("bp2", "2");
- host.addPropertySet(props);
- host.commit();
-
-// reload(); // reload not yet working
-
- /*
- * Get the test profile and check its properties.
- */
- profile = registry.getSystemProfile("bogus");
- assertNotNull(profile);
- host = registry.getHost(profile, "myhost");
- assertNotNull(host);
- props = host.getPropertySet("host_props");
- assertNotNull(props);
- assertEquals("1", props.getProperty("bp1").getValue());
- assertEquals("2", props.getProperty("bp2").getValue());
-
- }
-
- private void reload() {
- /*
- * Set up this particular test. The persistence manager acts as the family for all
- * Jobs that are created for reading and writing the persistent form of the model.
- */
- IRSEPersistenceManager persistenceManager = RSECorePlugin.getThePersistenceManager();
-
- /*
- * Pause while the background job completes the save of the profile.
- */
- IJobManager jobManager = Job.getJobManager();
- try {
- jobManager.join(persistenceManager, null);
- } catch (OperationCanceledException e) {
- throw new RuntimeException(e);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
-
- /*
- * restore the profile manager
- */
- RSEUIPlugin.getDefault().restart();
-
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTestSuite.java
deleted file mode 100644
index d1a4054bc..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/persistence/PersistenceTestSuite.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation
- * David Dykstal (IBM) - [189274] provide import and export operations for profiles
- *******************************************************************************/
-package org.eclipse.rse.tests.persistence;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class PersistenceTestSuite 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 tests 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 Persistence Test Suite"); //$NON-NLS-1$
-// suite.addTestSuite(PersistenceTest.class); // use this when running all tests
- suite.addTest(new PersistenceTest("testPersistenceManagerStartup"));
- suite.addTest(new PersistenceTest("testProfilePersistence"));
- suite.addTest(new PersistenceTest("testHostPersistence"));
- suite.addTest(new ExportImportTest("testHost1"));
- suite.addTest(new ExportImportTest("testFilterPool1"));
- suite.addTest(new ExportImportTest("testPropertySet"));
- suite.addTest(new MigrationTest("testProfileMigration"));
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)PersistenceTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java
deleted file mode 100644
index fba940067..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/PreferencesTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 API and implementation.
- * David McKnight (IBM) - initial API and implementation.
- * Kushal Munir (IBM) - initial API and implementation.
- * David Dykstal (IBM) - moved SystemPreferencesManager to a new package
- * - created and used RSEPreferencesManager
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- *******************************************************************************/
-
-package org.eclipse.rse.tests.preferences;
-
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.RSEPreferencesManager;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-
-/**
- * Tests for {@link SystemPreferencesManager}.
- */
-public class PreferencesTest extends RSECoreTestCase {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testActiveProfiles() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- RSEPreferencesManager.addActiveProfile("bogus01"); //$NON-NLS-1$
- RSEPreferencesManager.addActiveProfile("bogus02"); //$NON-NLS-1$
- String[] profiles = RSEPreferencesManager.getActiveProfiles();
- assertTrue(profiles.length >= 2);
- assertEquals("bogus02", profiles[RSEPreferencesManager.getActiveProfilePosition("bogus02")]); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("bogus01", profiles[RSEPreferencesManager.getActiveProfilePosition("bogus01")]); //$NON-NLS-1$ //$NON-NLS-2$
- RSEPreferencesManager.renameActiveProfile("bogus02", "bogus99"); //$NON-NLS-1$ //$NON-NLS-2$
- profiles = RSEPreferencesManager.getActiveProfiles();
- assertEquals("bogus99", profiles[RSEPreferencesManager.getActiveProfilePosition("bogus99")]); //$NON-NLS-1$ //$NON-NLS-2$
- RSEPreferencesManager.deleteActiveProfile("bogus01"); //$NON-NLS-1$
- RSEPreferencesManager.deleteActiveProfile("bogus99"); //$NON-NLS-1$
- assertEquals(-1, RSEPreferencesManager.getActiveProfilePosition("bogus02")); //$NON-NLS-1$
- assertEquals(-1, RSEPreferencesManager.getActiveProfilePosition("bogus01")); //$NON-NLS-1$
- assertEquals(-1, RSEPreferencesManager.getActiveProfilePosition("bogus99")); //$NON-NLS-1$
- }
-
- public void testUserIds() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- RSEPreferencesManager.setUserId("a.b.c", "bogusUser"); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("bogusUser", RSEPreferencesManager.getUserId("a.b.c")); //$NON-NLS-1$ //$NON-NLS-2$
- RSEPreferencesManager.clearUserId("a.b.c"); //$NON-NLS-1$
- assertNull(RSEPreferencesManager.getUserId("a.b.c")); //$NON-NLS-1$
- }
-
- public void testDefaultUserIds() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- IRSECoreRegistry registry = RSECorePlugin.getTheCoreRegistry();
- //TODO should we test deprecated methods as well? Probably yes...
- IRSESystemType systemTypeDeprecated = registry.getSystemType("Local"); //$NON-NLS-1$
- IRSESystemType systemType = registry.getSystemTypeById("org.eclipse.rse.systemtype.local"); //$NON-NLS-1$
- assertEquals(systemType, systemTypeDeprecated);
- String oldValue = RSEPreferencesManager.getDefaultUserId(systemType);
- RSEPreferencesManager.setDefaultUserId(systemType, "bogus1"); //$NON-NLS-1$
- assertEquals("bogus1", RSEPreferencesManager.getDefaultUserId(systemType)); //$NON-NLS-1$
- IRSESystemType localType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(IRSESystemType.SYSTEMTYPE_LOCAL_ID);
- RSEPreferencesManager.setDefaultUserId(localType, "bogus2"); //$NON-NLS-1$
- assertEquals("bogus2", RSEPreferencesManager.getDefaultUserId(systemType)); //$NON-NLS-1$
- RSEPreferencesManager.setDefaultUserId(systemType, oldValue);
- assertEquals(oldValue, RSEPreferencesManager.getDefaultUserId(systemType));
- }
-
- public void testShowLocalConnection() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- assertTrue(SystemPreferencesManager.getShowLocalConnection());
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/RSEPreferencesTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/RSEPreferencesTestSuite.java
deleted file mode 100644
index 2a41632f2..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/preferences/RSEPreferencesTestSuite.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.preferences;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSEPreferencesTestSuite 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 Preferences Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(PreferencesTest.class);
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSEPreferencesTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTest.java
deleted file mode 100644
index ab4c0c375..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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 implementation.
- *******************************************************************************/
-
-package org.eclipse.rse.tests.profiles;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.rse.core.RSECorePlugin;
-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.tests.core.RSECoreTestCase;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-
-/**
- * Tests for {@link SystemPreferencesManager}.
- * Since these are persistence tests they will play with the creation and deletion of
- * profiles, hosts, filters, and other model objects. You should run this only in a
- * clean workspace.
- */
-public class ProfileTest extends RSECoreTestCase {
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfileManager manager = registry.getSystemProfileManager();
- ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
-
- public ProfileTest(String name) {
- super(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testDefaultProfileMarking() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- assertNotNull("default profile is null", defaultProfile);
- assertTrue("default profile is not active - 1", defaultProfile.isActive());
- assertTrue("default profile is not marked as default", defaultProfile.isDefaultPrivate());
- }
-
- public void testDefaultProfileActivation() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- registry.setSystemProfileActive(defaultProfile, true);
- assertTrue("default profile is not active - 2", defaultProfile.isActive());
- registry.setSystemProfileActive(defaultProfile, false); // this should be ignored
- assertTrue("default profile is not active - 3", defaultProfile.isActive());
- }
-
- public void testDefaultProfileRename() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- ISystemProfile profile = registry.getSystemProfile("bogus");
- assertNull(profile);
- String oldName = defaultProfile.getName();
- registry.renameSystemProfile(defaultProfile, "bogus");
- assertEquals("bogus", defaultProfile.getName());
- assertSame(defaultProfile, manager.getDefaultPrivateSystemProfile());
- profile = registry.getSystemProfile("bogus");
- assertSame(profile, manager.getDefaultPrivateSystemProfile());
- registry.renameSystemProfile(defaultProfile, oldName);
- assertEquals(oldName, defaultProfile.getName());
- assertSame(defaultProfile, manager.getDefaultPrivateSystemProfile());
- profile = registry.getSystemProfile(oldName);
- assertSame(profile, manager.getDefaultPrivateSystemProfile());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public void testProfileActivation() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- ISystemProfile profile = registry.getSystemProfile("bogus");
- assertNull(profile);
- profile = registry.createSystemProfile("bogus", true);
- assertNotNull(profile);
- assertTrue("profile is not active, but should be", profile.isActive());
- registry.setSystemProfileActive(profile, false);
- assertFalse("profile is active, but should not be", profile.isActive());
- registry.setSystemProfileActive(profile, true);
- assertTrue("profile is not active, but should be", profile.isActive());
- registry.deleteSystemProfile(profile);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public void testDefaultProfileDeletion() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- registry.deleteSystemProfile(defaultProfile); // this should be ignored
- List profiles = Arrays.asList(manager.getSystemProfiles());
- assertTrue("default profile was deleted", profiles.contains(defaultProfile));
- assertTrue("default profile is not registered with manager", manager.getDefaultPrivateSystemProfile() == defaultProfile);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public void testProfileDeletion() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- try {
- ISystemProfile profile = registry.getSystemProfile("bogus");
- assertNull(profile);
- profile = registry.createSystemProfile("bogus", true);
- assertNotNull(profile);
- registry.deleteSystemProfile(profile);
- List profiles = Arrays.asList(manager.getSystemProfiles());
- assertFalse("profile was not deleted", profiles.contains(profile));
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTestSuite.java
deleted file mode 100644
index b325b55b8..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/profiles/ProfileTestSuite.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.profiles;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class ProfileTestSuite 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 tests 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 Profile Test Suite"); //$NON-NLS-1$
- suite.addTest(new ProfileTest("testDefaultProfileMarking"));
- suite.addTest(new ProfileTest("testDefaultProfileActivation"));
- suite.addTest(new ProfileTest("testDefaultProfileDeletion"));
- suite.addTest(new ProfileTest("testDefaultProfileRename"));
- suite.addTest(new ProfileTest("testProfileActivation"));
- suite.addTest(new ProfileTest("testProfileDeletion"));
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)ProfileTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/CreateFileTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/CreateFileTestCase.java
deleted file mode 100644
index 4a35cf48e..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/CreateFileTestCase.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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: Kevin Doyle.
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * Martin Oberhuber (Wind River) - [195402] Add constructor with test name
- ********************************************************************************/
-
-package org.eclipse.rse.tests.subsystems.files;
-
-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.model.SystemStartHere;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-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;
-
-public class CreateFileTestCase extends FileServiceBaseTest {
-
- private IHost host;
- //TODO: See if additional characters in the name should work.
- // Also make sure if there are that they can be entered in the New
- // File Dialog. This string can be so using this for base test.
- private String fileName = "a !@#${a}'%^&()_ =[]~+-'`;,.txt"; //$NON-NLS-1$
- private IRemoteFile tempDirectory = null;
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public CreateFileTestCase(String name) {
- super(name);
- }
-
- private IRemoteFileSubSystem getRemoteFileSubSystem(IHost host) {
- IRemoteFileSubSystem fss = null;
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(host, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof FileServiceSubSystem) {
- fss = (IRemoteFileSubSystem)ss[i];
- return fss;
- }
- }
- return null;
- }
-
- public void testCreateFileFTP() throws Exception {
- //-test-author-:KevinDoyle
- host = getFTPHost();
- if (isTestDisabled())
- return;
- createFileAndAssertProperties();
- }
-
- public void testCreateFileLinux() throws Exception {
- //-test-author-:KevinDoyle
- host = getLinuxHost();
- if (isTestDisabled())
- return;
- createFileAndAssertProperties();
- }
-
- public void testCreateFileSSH() throws Exception {
- //-test-author-:KevinDoyle
- host = getSSHHost();
- if (isTestDisabled())
- return;
- createFileAndAssertProperties();
- }
-
- public void testCreateFileWindows() throws Exception {
- //-test-author-:KevinDoyle
- host = getWindowsHost();
- if (isTestDisabled())
- return;
- createFileAndAssertProperties();
- }
-
- public void createFileAndAssertProperties() throws Exception {
- String SYSTEM_TYPE = host.getSystemType().getLabel();
- FileServiceSubSystem inputFss = (FileServiceSubSystem) getRemoteFileSubSystem(host);
-
- // Need to create a temporary directory for the new file to be created in.
- // this is to ensure we don't overwrite any previous files.
- inputFss.connect(new NullProgressMonitor(), false);
- IRemoteFile homeDirectory = inputFss.getRemoteFileObject(".", new NullProgressMonitor());
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(inputFss, homeFolderName, baseFolderName, new NullProgressMonitor());
- tempDirectory = createFileOrFolder(inputFss, homeFolderName, testFolderName, true);
-
- tempDirPath = tempDirectory.getAbsolutePath();
- IHostFile hostfile = inputFss.getFileService().createFile(tempDirPath, fileName, new NullProgressMonitor());
- assertTrue(SYSTEM_TYPE + ": hostfile doesn't exist.", hostfile.exists());
- assertTrue(SYSTEM_TYPE + ": hostfile canRead returns false", hostfile.canRead());
- assertTrue(SYSTEM_TYPE + ": hostfile canWrite returns false", hostfile.canWrite());
- assertEquals(SYSTEM_TYPE + ": filename does not match.", fileName, hostfile.getName());
- assertEquals(SYSTEM_TYPE + ": path's to file do not match.", tempDirPath, hostfile.getParentPath());
- // Make sure the file is empty
- assertEquals(SYSTEM_TYPE + ": file size's do not match.", 0, hostfile.getSize());
- long modDate = hostfile.getModifiedDate();
- assertTrue(SYSTEM_TYPE + ": modification date is not greater than 0.", modDate > 0);
-
- // perform cleanup, so EFS uses the right file service next time
- cleanup();
- }
-
- public void cleanup() throws Exception {
- if (host != null) {
- if (tempDirectory != null) {
- IRemoteFileSubSystem fss = getRemoteFileSubSystem(host);
- fss.delete(tempDirectory, new NullProgressMonitor());
- fss.disconnect();
- tempDirectory = null;
- }
- getConnectionManager().removeConnection(host.getSystemProfile().getName(), host.getName());
- host = null;
- }
- }
-
- public void tearDown() throws Exception {
- cleanup();
- super.tearDown();
- }
-}
-
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPFileSubsystemTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPFileSubsystemTestCase.java
deleted file mode 100644
index 4dcf1c80c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPFileSubsystemTestCase.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [186773] split ISystemRegistryUI from ISystemRegistry
- * David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.IOException;
-
-import org.apache.commons.net.ftp.FTPClient;
-import org.apache.commons.net.ftp.FTPFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IPropertySet;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.PropertySet;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-import org.eclipse.rse.internal.services.files.ftp.FTPService;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
-import org.eclipse.rse.subsystems.files.ftp.FTPFileSubSystemConfiguration;
-import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil;
-import org.eclipse.rse.tests.core.connection.IRSEConnectionProperties;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-/**
- * Test cases for FTP based remote host access.
- */
-public class FTPFileSubsystemTestCase extends RSEBaseConnectionTestCase {
- private ISubSystem subSystem;
- private IHost connection;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- if (subSystem != null && subSystem.isConnected()) {
- subSystem.disconnect(true);
- }
- if (connection != null) {
- getConnectionManager().removeConnection(connection.getSystemProfileName(), connection.getName());
- }
-
- subSystem = null;
- connection = null;
-
- super.tearDown();
- }
-
- /**
- * Test the FTP read access to a real remote FTP host.
- */
- public void testFTPReadAccessToRemoteHost() {
- //-test-author-:UweStieber
- if (isTestDisabled())
- return;
-
- ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
- assertNotNull("Failed to get RSE system registry instance!", systemRegistry); //$NON-NLS-1$
-
- // Calculate the location of the test connection properties
- IPath location = getTestDataLocation("testFTPReadAccessToRemoteHost", 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 properties from the calculated location without backing up defaults
- IRSEConnectionProperties properties = getConnectionManager().loadConnectionProperties(location, false);
- assertNotNull("Failed to load test connection properties from location " + location.toOSString(), properties); //$NON-NLS-1$
-
- // Lookup and create the connection now if necessary
- connection = getConnectionManager().findOrCreateConnection(properties);
- assertNotNull("Failed to create connection " + properties.getProperty(IRSEConnectionProperties.ATTR_NAME), connection); //$NON-NLS-1$
- // expand the connection in the UI
- RSEUIPlugin.getTheSystemRegistryUI().expandHost(connection);
-
- Exception exception = null;
- String cause = null;
-
- subSystem = null;
- try {
- subSystem = getConnectionManager().getFileSubSystem(connection, "ftp.files"); //$NON-NLS-1$
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to get ftp.files subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("No ftp.files subystem", subSystem); //$NON-NLS-1$
-
- ISubSystemConfiguration configuration = subSystem.getSubSystemConfiguration();
- assertNotNull("Failed to get ftp.files subsystem configuration instance!", configuration); //$NON-NLS-1$
-
- // The ftp.files subsystem supports filtering, therefor ISubSystem.getChildren() is expected
- // to return a non null value.
- assertTrue("Unexpected return value false for ftp.files subsystem configuration supportFilters()!", configuration.supportsFilters()); //$NON-NLS-1$
- assertNotNull("Unexpected return value null for ftp.files subsystem getChildren()!", subSystem.getChildren()); //$NON-NLS-1$
-
- // get access to the services
- assertTrue("ftp.files subsystem configuration instance is not of expected type FileServiceSubSystemConfiguration!", configuration instanceof FTPFileSubSystemConfiguration); //$NON-NLS-1$
- FTPFileSubSystemConfiguration ftpConfiguration = (FTPFileSubSystemConfiguration)configuration;
- IFileService service = ftpConfiguration.getFileService(connection);
- assertNotNull("Failed to get IFileService instance from ftp.files subsystem configuration!", service); //$NON-NLS-1$
- assertTrue("IFileService instance is not of expected type FTPService!", service instanceof FTPService); //$NON-NLS-1$
- final FTPService ftpService = (FTPService)service;
-
- // configure the service to use passive ftp
- IPropertySet set = new PropertySet("testFTPReadAccessToRemoteHost"); //$NON-NLS-1$
- set.addProperty("passive", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- ftpService.setPropertySet(set);
-
- // we expect that the subsystem is not connected yet
- assertFalse("ftp.files subsystem is unexpectedly connected!", subSystem.isConnected()); //$NON-NLS-1$
- try {
- subSystem.connect(false, null);
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to connect ftp.files subsystem to host " + properties.getProperty(IRSEConnectionProperties.ATTR_NAME) + "! Possible cause: " + cause, exception); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Wait hard-coded 10 seconds to get around asynchronous connection problems.
- RSEWaitAndDispatchUtil.waitAndDispatch(10000);
-
- // if we could not connect in 10 sec. we give up here. The server might be not reachable
- // or exceeded the max number of connection or ... or ... or ... Just do not fail in this case.
- if (!subSystem.isConnected() || !ftpService.isConnected()) return;
-
- // expand the subsystem
- RSEUIPlugin.getTheSystemRegistryUI().expandSubSystem(subSystem);
-
- // now we have the service reference and can start reading things from the server
- IHostFile[] roots = ftpService.getRoots(new NullProgressMonitor());
- assertNotNull("Failed to get root nodes from ftp.files service!", roots); //$NON-NLS-1$
-
- FTPClient ftpClient = ftpService.getFTPClient();
- assertNotNull("Failed to get FTPClient instance!", ftpClient); //$NON-NLS-1$
-
- exception = null;
- cause = null;
-
- FTPFile[] files = null;
- try {
- files = ftpClient.listFiles();
- } catch (IOException e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to list the files from ftp server " + properties.getProperty(IRSEConnectionProperties.ATTR_NAME) + "! Possible cause: " + cause, exception); //$NON-NLS-1$ //$NON-NLS-2$
- assertNotNull("Unexpected return value null for FTPClient.listFiles()!", files); //$NON-NLS-1$
-
- if (ftpService.isConnected()) ftpService.disconnect();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPWindowsFileSubSystemConfiguration.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPWindowsFileSubSystemConfiguration.java
deleted file mode 100644
index 903b5cc9c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FTPWindowsFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.subsystems.files;
-
-import org.eclipse.rse.subsystems.files.ftp.FTPFileSubSystemConfiguration;
-
-public class FTPWindowsFileSubSystemConfiguration extends FTPFileSubSystemConfiguration {
-
- public FTPWindowsFileSubSystemConfiguration() {
- super();
- setIsUnixStyle(false);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileOutputStreamTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileOutputStreamTestCase.java
deleted file mode 100644
index 68382a292..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileOutputStreamTestCase.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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: Kevin Doyle
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * Martin Oberhuber (Wind River) - [195402] Add constructor with test name
- ********************************************************************************/
-
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-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.model.SystemStartHere;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.efs.RSEFileStore;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.files.IFileService;
-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;
-
-public class FileOutputStreamTestCase extends FileServiceBaseTest {
-
- private IHost host = null;
- private IRemoteFile tempDirectory;
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public FileOutputStreamTestCase(String name) {
- super(name);
- }
-
- private IRemoteFileSubSystem getRemoteFileSubSystem(IHost host) {
- IRemoteFileSubSystem fss = null;
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(host, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof FileServiceSubSystem) {
- fss = (IRemoteFileSubSystem)ss[i];
- return fss;
- }
- }
- return null;
- }
-
- public void testRSEFileStoreAppendOutputStreamLocal() throws Exception {
- //-test-author-:KevinDoyle
- host = getLocalSystemConnection();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.APPEND);
- }
-
- public void testRSEFileStoreAppendOutputStreamFTP() throws Exception {
- //-test-author-:KevinDoyle
- host = getFTPHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.APPEND);
- }
-
- public void testRSEFileStoreAppendOutputStreamLinux() throws Exception {
- //-test-author-:KevinDoyle
- host = getLinuxHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.APPEND);
- }
-
- public void testRSEFileStoreAppendOutputStreamWindows() throws Exception {
- //-test-author-:KevinDoyle
- host = getWindowsHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.APPEND);
- }
-
- public void testRSEFileStoreAppendOutputStreamSSH() throws Exception {
- //-test-author-:KevinDoyle
- host = getSSHHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.APPEND);
- }
-
- public void testRSEFileStoreOverwriteOutputStreamLocal() throws Exception {
- //-test-author-:KevinDoyle
- host = getLocalSystemConnection();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.NONE);
- }
-
- public void testRSEFileStoreOverwriteOutputStreamFTP() throws Exception {
- //-test-author-:KevinDoyle
- host = getFTPHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.NONE);
- }
-
- public void testRSEFileStoreOverwriteOutputStreamLinux() throws Exception {
- //-test-author-:KevinDoyle
- host = getLinuxHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.NONE);
- }
-
- public void testRSEFileStoreOverwriteOutputStreamWindows() throws Exception {
- //-test-author-:KevinDoyle
- host = getWindowsHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.NONE);
- }
-
- public void testRSEFileStoreOverwriteOutputStreamSSH() throws Exception {
- //-test-author-:KevinDoyle
- host = getSSHHost();
- if (isTestDisabled())
- return;
- outputStreamFileWriting(EFS.NONE);
- }
-
- public void outputStreamFileWriting(int options) throws Exception {
- // RSE URI: rse://SYSTEM_ADDRESS/PATH_TO_FIlE
- OutputStream outputStream = null;
- InputStream inputStream = null;
-
- // Create temporary folder
- FileServiceSubSystem inputFss = (FileServiceSubSystem) getRemoteFileSubSystem(host);
- inputFss.connect(new NullProgressMonitor(), false);
- IRemoteFile homeDirectory = inputFss.getRemoteFileObject(".", new NullProgressMonitor());
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(inputFss, homeFolderName, baseFolderName, new NullProgressMonitor());
- IRemoteFile targetDir = createFileOrFolder(inputFss, homeFolderName, testFolderName, true);
- tempDirectory = targetDir;
-
- String path = targetDir.getAbsolutePath();
-
- String systemType = host.getSystemType().getLabel();
- if (host.getSystemType().isWindows()) {
- path = path.replace('\\', '/');
- }
- path = fixPathForURI(path);
- URI uri = new URI("rse", host.getHostName(), path, null);
-
- IFileStore parentFS = RSEFileStore.getInstance(uri);
- createDir(parentFS, true);
-
- IFileStore childFS = parentFS.getChild("append.txt");
-
- outputStream = childFS.openOutputStream(options, new NullProgressMonitor());
-
- String contents = getRandomString();
- byte[] readBytes = new byte[contents.length()];
- outputStream.write(contents.getBytes());
- outputStream.close();
-
- inputStream = childFS.openInputStream(EFS.NONE, new NullProgressMonitor());
- inputStream.read(readBytes);
-
- String input = new String(readBytes);
- inputStream.close();
- assertTrue(systemType + ": Contents incorrect writing to an empty file. Expected Contents: " + contents + " Actual Contents: " + input, contents.equals(input));
-
- outputStream = childFS.openOutputStream(options, new NullProgressMonitor());
-
- String write = " " + getRandomString();
- if ((options & EFS.APPEND) != 0) {
- contents += write;
- } else {
- contents = write;
- }
- outputStream.write(write.getBytes());
- outputStream.close();
-
- readBytes = new byte[contents.length()];
- inputStream = childFS.openInputStream(EFS.NONE, new NullProgressMonitor());
- inputStream.read(readBytes);
-
- input = new String(readBytes);
- inputStream.close();
- assertTrue(systemType + ": Contents incorrect writing to a non-empty file. Expected Contents: " + contents + " Actual Contents: " + input, contents.equals(input));
- // Cleanup, so IFileStore uses the correct connection next time.
- cleanup();
- }
-
- /**
- * Adapt a local file system path such that it can be used as
- * path in an URI. Converts path delimiters do '/' default
- * delimiter, and adds a slash in front if necessary.
- *
- * Copied from RSEFileSystemContributor as it's private
- * @param path the path to adapt
- * @return adapted path
- */
- private String fixPathForURI(String path) {
- String sep = PathUtility.getSeparator(path);
- if (!sep.equals("/")) { //$NON-NLS-1$
- path = path.replace(sep.charAt(0), '/');
- }
- //<adapted from org.eclipse.core.filesystem.URIUtil.toURI() Copyright(c) 2005, 2006 IBM>
- final int length = path.length();
- StringBuffer pathBuf = new StringBuffer(length + 3);
- //There must be a leading slash in a hierarchical URI
- if (length > 0 && (path.charAt(0) != '/'))
- pathBuf.append('/');
- //additional double-slash for UNC paths to distinguish from host separator
- if (path.startsWith("//")) //$NON-NLS-1$
- pathBuf.append('/').append('/');
- pathBuf.append(path);
- //</adapted from org.eclipse.core.filesystem.URIUtil.toURI() Copyright(c) 2005, 2006 IBM>
- return pathBuf.toString();
- }
-
- public void cleanup() throws Exception {
- if (host != null) {
- if (tempDirectory != null) {
- IRemoteFileSubSystem fss = getRemoteFileSubSystem(host);
- fss.delete(tempDirectory, new NullProgressMonitor());
- fss.disconnect();
- tempDirectory = null;
- }
- getConnectionManager().removeConnection(host.getSystemProfile().getName(), host.getName());
- host = null;
- }
- }
-
- public void tearDown() throws Exception {
- cleanup();
- super.tearDown();
- }
-} \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveBaseTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveBaseTest.java
deleted file mode 100644
index 61577561c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveBaseTest.java
+++ /dev/null
@@ -1,953 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Johnson Ma (Wind River) - [195402] Extracted from FileServiceArchiveTest
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.File;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-public abstract class FileServiceArchiveBaseTest extends FileServiceBaseTest {
-
- protected String folderToCopyName1 = "RemoteSystemsConnections";
- protected String folderToCopyName2 = "6YLT5Xa";
- protected String folderToCopyName3 = "folderToCopy";
-
- protected String tarSourceFileName1;
- protected String tarSourceFileName2;
-
- protected String tarSourceFolderName1 = "META-INF";
- protected String tarSourceFolderName2 = "org";
-
- protected String tarSourceForOpenTest;
- protected String tarSourceForOpenFolderName1 = "META-INF";
- protected String tarSourceForOpenFolderName2 = "org";
-
- protected String testName;
-
- protected String fileContentString1 = "this is just some dummy content \n to a remote file \n to test an open operation";
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public FileServiceArchiveBaseTest(String name) {
- super(name);
- }
-
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- public void createSourceFolders() throws Exception
- {
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
- String content = getRandomString();
-
- // create the source folder used for copy or move
- IFileStore folderToCopy = temp.getChild(folderToCopyName3);
- createDir(folderToCopy, true);
- //Now, populate the contents in the folderToCopy.
- IFileStore aaaaaaaa = folderToCopy.getChild("aaaaaaaa");
- createDir(aaaaaaaa, true);
- //create file inside the aaaaaaaa folder.
- IFileStore adsf = aaaaaaaa.getChild("adsf");
- content = getRandomString();
- createFile(adsf, content);
- IFileStore eclipse_SDK_3_3M6_win32_zip = aaaaaaaa.getChild("eclipse-SDK-3.3M6-win32.zip");
- createFile(eclipse_SDK_3_3M6_win32_zip, "");
- IFileStore epdcdump01_hex12 = aaaaaaaa.getChild("epdcdump01.hex12");
- content = getRandomString();
- createFile(epdcdump01_hex12, content);
- IFileStore epdcdump01_hex12aaaa = aaaaaaaa.getChild("epdcdump01.hex12aaaa");
- content = getRandomString();
- createFile(epdcdump01_hex12aaaa, content);
-
- IFileStore aaaab = folderToCopy.getChild("aaaab");
- createDir(aaaab, true);
- IFileStore features = aaaab.getChild("features");
- createDir(features, true);
- IFileStore dummyFile = features.getChild("dummy.txt");
- content = getRandomString();
- createFile(dummyFile, content);
- //create file inside the aaaab folder.
- content = "this is just a simple content \n to a simple file \n to test a 'simple' copy";
- IFileStore epdcdump01_hex12a = aaaab.getChild("epdcdump01.hex12a");
- content = getRandomString();
- createFile(epdcdump01_hex12a, content);
-
- IFileStore epdcdump01_hex12a1 = folderToCopy.getChild("epdcdump01.hex12a");
- content = getRandomString();
- createFile(epdcdump01_hex12a1, content);
-
- IFileStore RSE_SDK_2_0RC1_zip = folderToCopy.getChild("RSE-SDK-2.0RC1.zip");
- content = getRandomString();
- createFile(RSE_SDK_2_0RC1_zip, content);
-
- //now, copy folderToCopy into the folder in the remote system
- IRemoteFile sourceFolderToCopy3 = localFss.getRemoteFileObject(tempPath + '\\' + folderToCopyName3, mon);
- ISystemDragDropAdapter srcAdapter3 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy3).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter3);
- fromSet3.addResource(sourceFolderToCopy3);
- ISystemResourceSet tempObjects3 = srcAdapter3.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, tempDir, mon, true);
-
- //Then, we need to retrieve children of the tempDir to cache their information.
- fss.resolveFilterString(tempDir, null, mon);
-
- //Then, delete the temp folder in the junit workspace.
- temp.delete(EFS.NONE, mon);
- }
-
-
- protected void createSuperTransferFolder(IFileStore temp) throws Exception
- {
-
- String content = getRandomString();
-
- // create the source folder used for copy or move
- IFileStore folderToCopy = temp.getChild(folderToCopyName3);
- createDir(folderToCopy, true);
- //Now, populate the contents in the folderToCopy.
- IFileStore aaaaaaaa = folderToCopy.getChild("aaaaaaaa");
- createDir(aaaaaaaa, true);
- //create file inside the aaaaaaaa folder.
- IFileStore adsf = aaaaaaaa.getChild("adsf");
- content = getRandomString();
- createFile(adsf, content);
- IFileStore eclipse_SDK_3_3M6_win32_zip = aaaaaaaa.getChild("eclipse-SDK-3.3M6-win32.zip");
- createFile(eclipse_SDK_3_3M6_win32_zip, "");
- IFileStore epdcdump01_hex12 = aaaaaaaa.getChild("epdcdump01.hex12");
- content = getRandomString();
- createFile(epdcdump01_hex12, content);
- IFileStore epdcdump01_hex12aaaa = aaaaaaaa.getChild("epdcdump01.hex12aaaa");
- content = getRandomString();
- createFile(epdcdump01_hex12aaaa, content);
-
- IFileStore aaaab = folderToCopy.getChild("aaaab");
- createDir(aaaab, true);
- IFileStore features = aaaab.getChild("features");
- createDir(features, true);
- IFileStore dummyFile = features.getChild("dummy.txt");
- content = getRandomString();
- createFile(dummyFile, content);
- //create file inside the aaaab folder.
- content = "this is just a simple content \n to a simple file \n to test a 'simple' copy";
- IFileStore epdcdump01_hex12a = aaaab.getChild("epdcdump01.hex12a");
- content = getRandomString();
- createFile(epdcdump01_hex12a, content);
-
- IFileStore epdcdump01_hex12a1 = folderToCopy.getChild("epdcdump01.hex12a");
- content = getRandomString();
- createFile(epdcdump01_hex12a1, content);
-
- IFileStore RSE_SDK_2_0RC1_zip = folderToCopy.getChild("RSE-SDK-2.0RC1.zip");
- content = getRandomString();
- createFile(RSE_SDK_2_0RC1_zip, content);
-
- return;
-
- }
-
- public void createTarSourceForOpen() throws Exception
- {
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
- String content = getRandomString();
-
- //Now, we need to construct a "source.tar" archive file
- //We will construct the content of the tar file in folders "META-INF" and "org"
- //Then we copy this folder into a tar file by RSE API.
- IFileStore META_INF = temp.getChild(tarSourceForOpenFolderName1);
- createDir(META_INF, true);
- //Now, populate the contents in the folder.
- IFileStore MANIFEST_MF = META_INF.getChild("MANIFEST.MF");
- content = fileContentString1;
- createFile(MANIFEST_MF, content);
-
- //create folder "org"
- IFileStore org = temp.getChild("org");
- createDir(org, true);
- IFileStore eclipse = org.getChild("eclipse");
- createDir(eclipse, true);
- //create "dstore" folder inside "org"
- IFileStore dstore = eclipse.getChild("dstore");
- createDir(dstore, true);
- //Now, create a few folders inside the dstore folder.
- IFileStore core = dstore.getChild("core");
- createDir(core, true);
- IFileStore internal = dstore.getChild("internal");
- createDir(internal, true);
-
- //now create directory inside "core":
- IFileStore client = core.getChild("client");
- createDir(client, true);
- IFileStore java = core.getChild("java");
- createDir(java, true);
- IFileStore miners = core.getChild("miners");
- createDir(miners, true);
- IFileStore model = core.getChild("model");
- createDir(model, true);
- IFileStore server = core.getChild("server");
- createDir(server, true);
- IFileStore util = core.getChild("util");
- createDir(util, true);
- IFileStore Activator_java = core.getChild("Activator.java");
- content = fileContentString1;
- createFile(Activator_java, content);
-
- //now, some contents on client folder
- IFileStore ClientConnection_java = client.getChild("ClientConnection.java");
- content = getRandomString();
- createFile(ClientConnection_java, content);
- IFileStore ConnectionStatus_java = client.getChild("ConnectionStatus.java");
- content = fileContentString1;
- createFile(ConnectionStatus_java, content);
-
- //now, some contents in java folder
- IFileStore ClassByteStreamHandler$ReceiveClassInstanceThread_java = java.getChild("ClassByteStreamHandler$ReceiveClassInstanceThread.java");
- content = getRandomString();
- createFile(ClassByteStreamHandler$ReceiveClassInstanceThread_java, content);
-
- //now, some contents in miners folder
- IFileStore Miner_java = miners.getChild("Miner.java");
- content = getRandomString();
- createFile(Miner_java, content);
- IFileStore MinerThread_java = miners.getChild("MinerThread.java");
- content = getRandomString();
- createFile(MinerThread_java, content);
-
- //now, some contents in model folder
- IFileStore ByteStreamHandler_java = model.getChild("ByteStreamHandler.java");
- content = getRandomString();
- createFile(ByteStreamHandler_java, content);
- IFileStore DE_java = model.getChild("DE.java");
- content = getRandomString();
- createFile(DE_java, content);
- IFileStore Handler_java = model.getChild("Handler.java");
- content = getRandomString();
- createFile(Handler_java, content);
-
- //now, some contents in server folder
- IFileStore Server_java = server.getChild("Server.java");
- content = getRandomString();
- createFile(Server_java, content);
-
- //now, some contents in util folder
- IFileStore StringCompare_java = util.getChild("StringCompare.java");
- content = fileContentString1;
- createFile(StringCompare_java, content);
-
- //now, create the contents in "internal" folder
- IFileStore core1 = internal.getChild("core");
- createDir(core1, true);
-
- //then create some folder in this "core" folder
- IFileStore client1 = core1.getChild("client");
- createDir(client1, true);
- IFileStore model1 = core1.getChild("model");
- createDir(model1, true);
- IFileStore server1 = core1.getChild("server");
- createDir(server1, true);
- IFileStore util1 = core1.getChild("util");
- createDir(util1, true);
-
- //now, some contents on client folder
- IFileStore ClientConnection_java1 = client1.getChild("ClientConnection.java");
- content = getRandomString();
- createFile(ClientConnection_java1, content);
- IFileStore ConnectionStatus_java1 = client1.getChild("ConnectionStatus.java");
- content = getRandomString();
- createFile(ConnectionStatus_java1, content);
-
-
- //now, some contents in model folder
- IFileStore ByteStreamHandler_java1 = model1.getChild("ByteStreamHandler.java");
- content = getRandomString();
- createFile(ByteStreamHandler_java1, content);
- IFileStore DE_java1 = model1.getChild("DE.java");
- content = getRandomString();
- createFile(DE_java1, content);
- IFileStore Handler_java1 = model1.getChild("Handler.java");
- content = getRandomString();
- createFile(Handler_java1, content);
-
- //now, some contents in server folder
- IFileStore Server_java1 = server1.getChild("Server.java");
- content = getRandomString();
- createFile(Server_java1, content);
-
- //now, some contents in util folder
- IFileStore StringCompare_java1 = util1.getChild("StringCompare.java");
- content = getRandomString();
- createFile(StringCompare_java1, content);
-
- //now, copy META_INF into the folder in the remote system
- IRemoteFile META_INF_folder = localFss.getRemoteFileObject(tempPath + '\\' + tarSourceForOpenFolderName1, mon);
- assertNotNull(META_INF_folder);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) META_INF_folder).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet.addResource(META_INF_folder);
- ISystemResourceSet tempObjects1 = srcAdapter1.doDrag(fromSet, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects1, tempDir, mon, true);
-
- //now, copy org into the folder in the remote system
- IRemoteFile org_folder = localFss.getRemoteFileObject(tempPath + '\\' + tarSourceForOpenFolderName2, mon);
- assertNotNull(org_folder);
- ISystemDragDropAdapter srcAdapter2 = (ISystemDragDropAdapter) ((IAdaptable) org_folder).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet2 = new SystemRemoteResourceSet(localFss, srcAdapter2);
- fromSet2.addResource(org_folder);
- ISystemResourceSet tempObjects2 = srcAdapter2.doDrag(fromSet2, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects2, tempDir, mon, true);
-
- //now, create tar file in the host
- IRemoteFile tarSource = createFileOrFolder(tempDir.getAbsolutePath(), tarSourceForOpenTest, false);
- assertNotNull(tarSource);
- IRemoteFile tarSourceFolder1 = (IRemoteFile)getChildFromFolder(tempDir, tarSourceForOpenFolderName1);
- assertNotNull(tarSourceFolder1);
- IRemoteFile tarSourceFolder2 = (IRemoteFile)getChildFromFolder(tempDir, tarSourceForOpenFolderName2);
- fss.copy(tarSourceFolder1, tarSource, tarSourceForOpenFolderName1, mon);
- fss.copy(tarSourceFolder2, tarSource, tarSourceForOpenFolderName2, mon);
-
- //Then, we need to retrieve children of the tempDir to cache their information.
- fss.resolveFilterString(tempDir, null, mon);
-
- //Then, delete the temp folder in the junit workspace.
- temp.delete(EFS.NONE, mon);
- }
-
-
-
- public void createSourceTarFiles() throws Exception
- {
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
- String content = getRandomString();
-
- //Now, we need to construct a "source.tar" archive file
- //We will construct the content of the tar file in folders "META-INF" and "org"
- //Then we copy this folder into a tar file by RSE API.
- IFileStore META_INF = temp.getChild(tarSourceFolderName1);
- createDir(META_INF, true);
- //Now, populate the contents in the folder.
- IFileStore MANIFEST_MF = META_INF.getChild("MANIFEST.MF");
- content = getRandomString();
- createFile(MANIFEST_MF, content);
- //create folder "org"
- IFileStore org = temp.getChild(tarSourceFolderName2);
- createDir(org, true);
- IFileStore eclipse = org.getChild("eclipse");
- createDir(eclipse, true);
- //create "dstore" folder inside "org"
- IFileStore dstore = eclipse.getChild("dstore");
- createDir(dstore, true);
- //Now, create a few folders inside the dstore folder.
- IFileStore core = dstore.getChild("core");
- createDir(core, true);
- IFileStore internal = dstore.getChild("internal");
- createDir(internal, true);
-
- //now create directory inside "core":
- IFileStore client = core.getChild("client");
- createDir(client, true);
- IFileStore java = core.getChild("java");
- createDir(java, true);
- IFileStore miners = core.getChild("miners");
- createDir(miners, true);
- IFileStore model = core.getChild("model");
- createDir(model, true);
- IFileStore server = core.getChild("server");
- createDir(server, true);
- IFileStore util = core.getChild("util");
- createDir(util, true);
- IFileStore Activator_java = core.getChild("Activator.java");
- content = getRandomString();
- createFile(Activator_java, content);
-
- //now, some contents on client folder
- IFileStore ClientConnection_java = client.getChild("ClientConnection.java");
- content = getRandomString();
- createFile(ClientConnection_java, content);
- IFileStore ConnectionStatus_java = client.getChild("ConnectionStatus.java");
- content = getRandomString();
- createFile(ConnectionStatus_java, content);
-
- //now, some contents in java folder
- IFileStore ClassByteStreamHandler$ReceiveClassInstanceThread_java = java.getChild("ClassByteStreamHandler$ReceiveClassInstanceThread.java");
- content = getRandomString();
- createFile(ClassByteStreamHandler$ReceiveClassInstanceThread_java, content);
-
- //now, some contents in miners folder
- IFileStore Miner_java = miners.getChild("Miner.java");
- content = getRandomString();
- createFile(Miner_java, content);
- IFileStore MinerThread_java = miners.getChild("MinerThread.java");
- content = getRandomString();
- createFile(MinerThread_java, content);
-
- //now, some contents in model folder
- IFileStore ByteStreamHandler_java = model.getChild("ByteStreamHandler.java");
- content = getRandomString();
- createFile(ByteStreamHandler_java, content);
- IFileStore DE_java = model.getChild("DE.java");
- content = getRandomString();
- createFile(DE_java, content);
- IFileStore Handler_java = model.getChild("Handler.java");
- content = getRandomString();
- createFile(Handler_java, content);
-
- //now, some contents in server folder
- IFileStore Server_java = server.getChild("Server.java");
- content = getRandomString();
- createFile(Server_java, content);
-
- //now, some contents in util folder
- IFileStore StringCompare_java = util.getChild("StringCompare.java");
- content = getRandomString();
- createFile(StringCompare_java, content);
-
- //now, create the contents in "internal" folder
- IFileStore core1 = internal.getChild("core");
- createDir(core1, true);
-
- //then create some folder in this "core" folder
- IFileStore client1 = core1.getChild("client");
- createDir(client1, true);
- IFileStore model1 = core1.getChild("model");
- createDir(model1, true);
- IFileStore server1 = core1.getChild("server");
- createDir(server1, true);
- IFileStore util1 = core1.getChild("util");
- createDir(util1, true);
-
- //now, some contents on client folder
- IFileStore ClientConnection_java1 = client1.getChild("ClientConnection.java");
- content = getRandomString();
- createFile(ClientConnection_java1, content);
- IFileStore ConnectionStatus_java1 = client1.getChild("ConnectionStatus.java");
- content = getRandomString();
- createFile(ConnectionStatus_java1, content);
-
-
- //now, some contents in model folder
- IFileStore ByteStreamHandler_java1 = model1.getChild("ByteStreamHandler.java");
- content = getRandomString();
- createFile(ByteStreamHandler_java1, content);
- IFileStore DE_java1 = model1.getChild("DE.java");
- content = getRandomString();
- createFile(DE_java1, content);
- IFileStore Handler_java1 = model1.getChild("Handler.java");
- content = getRandomString();
- createFile(Handler_java1, content);
-
- //now, some contents in server folder
- IFileStore Server_java1 = server1.getChild("Server.java");
- content = getRandomString();
- createFile(Server_java1, content);
-
- //now, some contents in util folder
- IFileStore StringCompare_java1 = util1.getChild("StringCompare.java");
- content = getRandomString();
- createFile(StringCompare_java1, content);
-
- //now, copy META_INF into the folder in the remote system
- IRemoteFile META_INF_folder = localFss.getRemoteFileObject(tempPath + '\\' + tarSourceFolderName1, mon);
- assertNotNull(META_INF_folder);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) META_INF_folder).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet.addResource(META_INF_folder);
- ISystemResourceSet tempObjects1 = srcAdapter1.doDrag(fromSet, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects1, tempDir, mon, true);
-
- //now, copy org into the folder in the remote system
- IRemoteFile org_folder = localFss.getRemoteFileObject(tempPath + '\\' + tarSourceFolderName2, mon);
- assertNotNull(org_folder);
- ISystemDragDropAdapter srcAdapter2 = (ISystemDragDropAdapter) ((IAdaptable) org_folder).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet2 = new SystemRemoteResourceSet(localFss, srcAdapter2);
- fromSet2.addResource(org_folder);
- ISystemResourceSet tempObjects2 = srcAdapter2.doDrag(fromSet2, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects2, tempDir, mon, true);
-
- //now, create tar file in the host
- IRemoteFile tarSource = createFileOrFolder(tempDir.getAbsolutePath(), tarSourceFileName1, false);
- assertNotNull(tarSource);
- IRemoteFile tarSourceFolder1 = (IRemoteFile)getChildFromFolder(tempDir, tarSourceFolderName1);
- assertNotNull(tarSourceFolder1);
- IRemoteFile tarSourceFolder2 = (IRemoteFile)getChildFromFolder(tempDir, tarSourceFolderName2);
- fss.copy(tarSourceFolder1, tarSource, tarSourceFolderName1, mon);
- fss.copy(tarSourceFolder2, tarSource, tarSourceFolderName2, mon);
- }
-
- public void testCreateTarFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip file first.
- IRemoteFile newArchiveFile = createFileOrFolder(tempDirPath, testName, false);
- assertNotNull(newArchiveFile);
- assertTrue(newArchiveFile.exists());
- assertTrue(newArchiveFile.canRead());
- assertTrue(newArchiveFile.canWrite());
- assertEquals(newArchiveFile.getName(), testName);
- assertEquals(newArchiveFile.getParentPath(), tempDirPath);
-
- //fss.resolveFilterString(filterString, monitor)
-
- //Now, we want to create a text file inside.
- String childName = "aaa.txt";
- IRemoteFile file1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file1);
-
- childName = "bbb.txt";
- IRemoteFile file2 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file2);
-
- //Create a folder
- childName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, true);
- assertNotNull(folder1);
-
- //Now, check the contents
- String[] namesToCheck = {"aaa.txt", "bbb.txt", "folder1"};
- int[] typesToCheck = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(newArchiveFile, namesToCheck, typesToCheck);
-
- //Now, create some files inside the folder.
- String secondLevelChildName = "ccc.exe";
- IRemoteFile levelTwoChild1 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild1);
-
- secondLevelChildName = "ddd.bat";
- IRemoteFile levelTwoChild2 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild2);
-
- secondLevelChildName = "another Folder"; //folder with space
- IRemoteFile levelTwoChild3 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, true);
- assertNotNull(levelTwoChild3);
-
- //Now, check the contents
- String[] namesToCheck1 = {"ccc.exe", "ddd.bat", "another Folder"};
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(folder1, namesToCheck1, typesToCheck1);
- }
-
- public void testCopyToTarArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into copiedTargetZipFile
- fss.copy(sourceFolder, targetTarFile, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(targetTarFile, sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
-
-
- public void testCopyTarVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
-
- String sourceFileName = tarSourceFileName1;
- IRemoteFile sourceTarFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceTarFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Get one of its fourth level children, and copy the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceTarFile, tarSourceFolderName1);
- assertNotNull(firstLevelChild);
-
- fss.copy(firstLevelChild, folder1, tarSourceFolderName1, mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, tarSourceFolderName1);
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"MANIFEST.MF"};
- int[] typesToCheck = {TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
- }
-
-
- public void testMoveToTarArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- fss.move(sourceFolder, targetTarFile, sourceFolder.getName(), mon);
-
- Object theMovedChild = getChildFromFolder(targetTarFile, sourceFolderName);
-
- assertNotNull(theMovedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theMovedChild, childrenToCheck, typesToCheck);
-
- //make sure the original folder is gone.
- Object originalSource = getChildFromFolder(tempDir, sourceFolderName);
- assertNull(originalSource);
- }
-
-
-
- public void testMoveTarVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
-
- String sourceFileName = tarSourceFileName1;
- IRemoteFile sourceTarFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceTarFile);
-
- //then, create a folder inside the tempDir
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the folder from the zip file into folder1
- String movedFolderName = tarSourceFolderName1;
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceTarFile, tarSourceFolderName1);
- assertNotNull(firstLevelChild);
- fss.move(firstLevelChild, folder1, movedFolderName, mon);
-
- Object movedVirtualFolder = getChildFromFolder(folder1, movedFolderName);
-
- assertNotNull(movedVirtualFolder);
-
- String[] contents = {"MANIFEST.MF"};
- int[] typesToCheck = {TYPE_FILE};
- checkFolderContents((IRemoteFile)movedVirtualFolder, contents, typesToCheck);
-
- //Now, make sure the moved virtual folder is gone from its original zip file
- IRemoteFile tmp = (IRemoteFile)getChildFromFolder(sourceTarFile, tarSourceFolderName1);
- assertNull(tmp);
- }
-
-
- public void testRenameTarVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip file first.
- IRemoteFile newArchiveFile = createFileOrFolder(tempDirPath, testName, false);
-
- //Now, we want to create a text file inside.
- String childName = "aaa.txt";
- IRemoteFile file1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file1);
-
- childName = "bbb.txt";
- IRemoteFile file2 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file2);
-
- //Create a folder
- childName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, true);
- assertNotNull(folder1);
-
- //Now, check the contents
- String[] levelOneNamesToCheck = {"aaa.txt", "bbb.txt", "folder1"};
- int[] levalOneTypesToCheck = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(newArchiveFile, levelOneNamesToCheck, levalOneTypesToCheck);
-
- //Now, create some files inside the folder.
- String secondLevelChildName = "ccc.exe";
- IRemoteFile levelTwoChild1 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild1);
-
- secondLevelChildName = "ddd.bat";
- IRemoteFile levelTwoChild2 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild2);
-
- secondLevelChildName = "another Folder"; //folder with space
- IRemoteFile levelTwoChild3 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, true);
- assertNotNull(levelTwoChild3);
-
- //Now, check the contents
- String[] levelTwoNamesToCheck = {"ccc.exe", "ddd.bat", "another Folder"};
- int[] levalTwoTypesToCheck = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(folder1, levelTwoNamesToCheck, levalTwoTypesToCheck);
-
- //Now rename one of the text file in the first level:
- IRemoteFile childToRename = (IRemoteFile)getChildFromFolder(newArchiveFile, "aaa.txt");
- fss.rename(childToRename, "aaa1.txt", mon);
- //Now rename one of the folder in the first level
- childToRename = (IRemoteFile)getChildFromFolder(newArchiveFile, "folder1");
- fss.rename(childToRename, "folder2", mon);
-
- //Check the result of rename
- String[] newLevelOneNamesToCheck = {"aaa1.txt", "bbb.txt", "folder2"};
- checkFolderContents(newArchiveFile, newLevelOneNamesToCheck, levalOneTypesToCheck);
-
- //Now rename one of the text file in the second level:
- IRemoteFile thisFolder = (IRemoteFile)getChildFromFolder(newArchiveFile, "folder2");
- childToRename = (IRemoteFile)getChildFromFolder(thisFolder, "ddd.bat");
- fss.rename(childToRename, "ddd1.bat", mon);
- //Now rename one of the folder in the second level
- childToRename = (IRemoteFile)getChildFromFolder(thisFolder, "another Folder");
- fss.rename(childToRename, "some folder$", mon);
-
- //Check the result of rename
- String[] newLevelTwoNamesToCheck = {"ccc.exe", "ddd1.bat", "some folder$"};
- checkFolderContents(thisFolder, newLevelTwoNamesToCheck, levalTwoTypesToCheck);
- }
-
- public void testDeleteTarVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
-
- String sourceFileName = tarSourceFileName1;
- IRemoteFile sourceTarFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceTarFile);
-
- //delete a file from level 2
- String parentForFileToDeleteName ="META-INF";
- IRemoteFile parentForFileToDelete = (IRemoteFile)getChildFromFolder(sourceTarFile, parentForFileToDeleteName);
- assertNotNull(parentForFileToDelete);
- String deleteFileName = "MANIFEST.MF";
- IRemoteFile fileToToDelete = (IRemoteFile)getChildFromFolder(parentForFileToDelete, deleteFileName);
- assertNotNull(fileToToDelete);
- //Now, delete this file
- fss.delete(fileToToDelete, mon);
- fileToToDelete = (IRemoteFile)getChildFromFolder(parentForFileToDelete, deleteFileName);
- assertNull(fileToToDelete);
-
- //then, get directory "java" under org/eclipse/dstore/core
- String parentForDirectoryToDeleteName ="org";
- IRemoteFile parentForDirectoryToDelete = (IRemoteFile)getChildFromFolder(sourceTarFile, parentForDirectoryToDeleteName);
- assertNotNull(parentForDirectoryToDelete);
-
- parentForDirectoryToDeleteName ="eclipse";
- parentForDirectoryToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, parentForDirectoryToDeleteName);
- assertNotNull(parentForDirectoryToDelete);
-
- parentForDirectoryToDeleteName ="dstore";
- parentForDirectoryToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, parentForDirectoryToDeleteName);
- assertNotNull(parentForDirectoryToDelete);
-
- parentForDirectoryToDeleteName ="core";
- parentForDirectoryToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, parentForDirectoryToDeleteName);
- assertNotNull(parentForDirectoryToDelete);
-
- String directoryToDeleteName = "java";
- IRemoteFile directoryToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, directoryToDeleteName);
- //Now, delete this directory
- fss.delete(directoryToDelete, mon);
- directoryToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, directoryToDeleteName);
-
- //check result of this operation
- String[] contents = {"client", "miners", "model", "server", "util", "Activator.java"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(parentForDirectoryToDelete, contents, typesToCheck);
-
- //And check this directory is not there any more.
- directoryToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, directoryToDeleteName);
- assertNull(directoryToDelete);
-
- //Now, delete some files and folder inside the a virtual folder.
- parentForFileToDelete = (IRemoteFile)getChildFromFolder(parentForDirectoryToDelete, "model");
- deleteFileName = "DE.java";
- fileToToDelete = (IRemoteFile)getChildFromFolder(parentForFileToDelete, deleteFileName);
- assertNotNull(fileToToDelete);
-
- fss.delete(fileToToDelete, mon);
-
- //check the result
- fileToToDelete = (IRemoteFile)getChildFromFolder(parentForFileToDelete, deleteFileName);
-
- assertNull(fileToToDelete);
- }
-
-
-
- public void testCopyBatchToTarArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- //Now, copy the source folder.
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir,sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into copiedTargetZipFile
- IRemoteFile[] sourceFiles = new IRemoteFile[3];
- //Also add some of its children into the batch.
- String childToCopyName1 = "aaaaaaaa";
- sourceFiles[0] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName1);
- String childToCopyName2 = "aaaab";
- sourceFiles[1] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName2);
- String childToCopyName3 = "epdcdump01.hex12a";
- sourceFiles[2] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName3);
- fss.copyBatch(sourceFiles, targetTarFile, mon);
-
- //Checking the first copied folder
- Object theCopiedChild = getChildFromFolder(targetTarFile, childToCopyName1);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck1 = {"adsf", "eclipse-SDK-3.3M6-win32.zip", "epdcdump01.hex12", "epdcdump01.hex12aaaa"};
-
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck1, typesToCheck1);
-
- //Checking the second copied folder
- theCopiedChild = getChildFromFolder(targetTarFile, childToCopyName2);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck2 = {"features"};
-
- int[] typesToCheck2 = {TYPE_FOLDER};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck2, typesToCheck2);
-
- //Checking the third copied file
- theCopiedChild = getChildFromFolder(targetTarFile, childToCopyName3);
- assertNotNull(theCopiedChild);
- assertTrue(((IRemoteFile)theCopiedChild).isDirectory() != true);
- }
-
-
-
-
- public void testOpenFileFromTarArchive() throws Exception {
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createTarSourceForOpen();
-
- String tarTargetFileName = tarSourceForOpenTest;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- //Now get the contents of the virtual file we want to download:
- String fileContentToVerifyName1 = "MANIFEST.MF";
-
- //Get its parent first.
- IRemoteFile itsParentFolder = (IRemoteFile)getChildFromFolder(tempDir,tarSourceForOpenFolderName1);
- assertNotNull(itsParentFolder);
-
- //Then get this file:
- IRemoteFile thisVirtualFile = (IRemoteFile)getChildFromFolder(itsParentFolder, fileContentToVerifyName1);
- assertNotNull(thisVirtualFile);
-
- //Now, we want to download the content of this file
- //We could just construct a dummy localpath for it.
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
- String localPath = tempPath + File.separator + fileContentToVerifyName1;
- fss.download(thisVirtualFile, localPath, thisVirtualFile.getEncoding(), mon);
-
- //now, verify the content of the local file
- IFileStore localFile = temp.getChild(fileContentToVerifyName1);
- //Check the content of the download file:
- boolean sameContent = compareContent(getContents(fileContentString1), localFile.openInputStream(EFS.NONE, null));
- assertTrue(sameContent);
-
-
- //now, we got the contents of another virtual file we want to download:
- String fileContentToVerifyName2 = "Activator.java";
- itsParentFolder = (IRemoteFile)getChildFromFolder(tempDir,tarSourceForOpenFolderName2);
- assertNotNull(itsParentFolder);
- itsParentFolder = (IRemoteFile)getChildFromFolder(itsParentFolder,"eclipse");
- assertNotNull(itsParentFolder);
- itsParentFolder = (IRemoteFile)getChildFromFolder(itsParentFolder,"dstore");
- assertNotNull(itsParentFolder);
- itsParentFolder = (IRemoteFile)getChildFromFolder(itsParentFolder,"core");
- assertNotNull(itsParentFolder);
- thisVirtualFile = (IRemoteFile)getChildFromFolder(itsParentFolder, fileContentToVerifyName2);
- assertNotNull(thisVirtualFile);
- localPath = tempPath + File.separator + fileContentToVerifyName2;
- fss.download(thisVirtualFile, localPath, thisVirtualFile.getEncoding(), mon);
-
- //now, verify the content of the local file
- localFile = temp.getChild(fileContentToVerifyName2);
- //Check the content of the download file:
- sameContent = compareContent(getContents(fileContentString1), localFile.openInputStream(EFS.NONE, null));
- assertTrue(sameContent);
- }
-
-
-
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTest.java
deleted file mode 100644
index 64e27794f..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTest.java
+++ /dev/null
@@ -1,1527 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Xuan Chen (IBM) - initial API and implementation
- * Martin Oberhuber (Wind River) - Fix Javadoc warnings
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * Johnson Ma (Wind River) - [195402] Add tar.gz archive support
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-public class FileServiceArchiveTest extends FileServiceArchiveBaseTest {
-
-
- protected String zipSourceFileName1 = "closedBefore.zip";
- protected String zipSourceFileName2 = "mynewzip.zip";
-
- protected String ZIP_SOURCE_DIR = "";
- protected String TEST_DIR = "";
- protected String SYSTEM_TYPE_ID = IRSESystemType.SYSTEMTYPE_LOCAL_ID;
- protected String SYSTEM_ADDRESS = "";
- protected String SYSTEM_NAME = "";
- protected String USER_ID = "";
- protected String PASSWORD = "";
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public FileServiceArchiveTest(String name) {
- super(name);
- tarSourceFileName1 = "source.tar";
- tarSourceFileName2 = "mynewtar.tar";
- tarSourceForOpenTest = "tarSourceForOpen.tar";
- testName = "dummy.tar";
- }
-
- public void createSourceZipFiles() throws Exception
- {
- createSourceZipFiles(fss);
- }
- public IRemoteFile createSourceZipFiles(IFileServiceSubSystem inputFss) throws Exception
- {
- /* build scenario */
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
- String content = getRandomString();
-
- //Now, we need to construct a "closeBefore.zip" archive file
- //We will construct the content of the zip file in folder "RemoteSystemsConnections"
- //Then we copy this folder into a zip file by RSE API.
- IFileStore RemoteSystemsConnections = temp.getChild(folderToCopyName1);
- createDir(RemoteSystemsConnections, true);
- //Now, populate the contents in the folderToCopy.
- IFileStore Team = RemoteSystemsConnections.getChild("Team");
- createDir(Team, true);
- //create folder inside the Team folder.
- IFileStore Connections = Team.getChild("Connections");
- createDir(Connections, true);
- IFileStore dummyFile = Connections.getChild("dummy.txt");
- content = getRandomString();
- createFile(dummyFile, content);
- IFileStore Filters = Team.getChild("Filters");
- createDir(Filters, true);
- //Now, create a few folders inside the Filters folder.
- IFileStore ibm_cmds = Filters.getChild("ibm.cmds");
- createDir(ibm_cmds, true);
- IFileStore ibm_cmds400 = Filters.getChild("ibm.cmds400");
- createDir(ibm_cmds400, true);
- //create another directory inside this one
- IFileStore filter_pool1 = ibm_cmds400.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool1, true);
- //create a file inside this folder
- IFileStore filter_pool1_xml = filter_pool1.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool1_xml, content);
-
- IFileStore ibm_cmdsIFS = Filters.getChild("ibm.cmdsIFS");
- createDir(ibm_cmdsIFS, true);
- IFileStore ibm_cmdsLocal = Filters.getChild("ibm.cmdsLocal");
- createDir(ibm_cmdsLocal, true);
-
- IFileStore ibm_files = Filters.getChild("ibm.files");
- createDir(ibm_files, true);
- //create another directory inside this one
- IFileStore filter_pool2 = ibm_files.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool2, true);
- //create a file inside this folder
- IFileStore filter_pool2_xml = filter_pool2.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool2_xml, content);
-
- IFileStore ibm_files_aix = Filters.getChild("ibm.files.aix");
- createDir(ibm_files_aix, true);
- //create another directory inside this one
- IFileStore filter_pool3 = ibm_files_aix.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool3, true);
- //create a file inside this folder
- IFileStore filter_pool3_xml = filter_pool3.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool3_xml, content);
-
- IFileStore ibm_iles_powerlinux = Filters.getChild("ibm.files.powerlinux");
- createDir(ibm_iles_powerlinux, true);
- //create another directory inside this one
- IFileStore filter_pool4 = ibm_iles_powerlinux.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool4, true);
- //create a file inside this folder
- IFileStore filter_pool4_xml = filter_pool4.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool4_xml, content);
-
- IFileStore ibm_files400 = Filters.getChild("ibm.files400");
- createDir(ibm_files400, true);
- //create another directory inside this one
- IFileStore filter_pool5 = ibm_files400.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool5, true);
- //create a file inside this folder
- IFileStore filter_pool5_xml = filter_pool5.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool5_xml, content);
-
- IFileStore ibm_filesLocal = Filters.getChild("ibm.filesLocal");
- createDir(ibm_filesLocal, true);
- //create another directory inside this one
- IFileStore filter_pool6 = ibm_filesLocal.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool6, true);
- //create a file inside this folder
- IFileStore filter_pool6_xml = filter_pool6.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool6_xml, content);
-
- IFileStore ibm_filesIFS = Filters.getChild("ibm.filesIFS");
- createDir(ibm_filesIFS, true);
- //create another directory inside this one
- IFileStore filter_pool7 = ibm_filesIFS.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool7, true);
- //create a file inside this folder
- IFileStore filter_pool7_xml = filter_pool7.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool7_xml, content);
-
- IFileStore ibm_filesWindows = Filters.getChild("ibm.filesWindows");
- createDir(ibm_filesWindows, true);
- //create another directory inside this one
- IFileStore filter_pool8 = ibm_filesWindows.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool8, true);
- //create a file inside this folder
- IFileStore filter_pool8_xml = filter_pool8.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool8_xml, content);
-
- IFileStore ibm_jobs400 = Filters.getChild("ibm.jobs400");
- createDir(ibm_jobs400, true);
- //create another directory inside this one
- IFileStore filter_pool9 = ibm_jobs400.getChild("FilterPool_Team Filter Pool");
- createDir(filter_pool9, true);
- //create a file inside this folder
- IFileStore filter_pool9_xml = filter_pool9.getChild("filterPool_Team Filter Pool.xmi");
- content = getRandomString();
- createFile(filter_pool9_xml, content);
-
- //create file inside the Team folder.
- IFileStore profile_xml = Team.getChild("profile.xmi");
- content = getRandomString();
- createFile(profile_xml, content);
-
- //Now create another folder TypeFilters in the RemoteSystemsConnections folder
- IFileStore TypeFilters = RemoteSystemsConnections.getChild("TypeFilters");
- createDir(TypeFilters, true);
- dummyFile = TypeFilters.getChild("dummy.txt");
- content = getRandomString();
- createFile(dummyFile, content);
- //Now create another folder xuanchentp in the RemoteSystemsConnections folder
- IFileStore xuanchentp = RemoteSystemsConnections.getChild("xuanchentp");
- createDir(xuanchentp, true);
- //Create some files and folder inside the xuanchentp folder
- IFileStore Connections1 = xuanchentp.getChild("Connections");
- createDir(Connections1, true);
- dummyFile = Connections1.getChild("dummy.txt");
- content = getRandomString();
- createFile(dummyFile, content);
- IFileStore Filters1 = xuanchentp.getChild("Filters");
- createDir(Filters1, true);
- dummyFile = Filters1.getChild("dummy.txt");
- content = getRandomString();
- createFile(dummyFile, content);
- IFileStore profile_xml1 = xuanchentp.getChild("profile.xmi");
- content = getRandomString();
- createFile(profile_xml1, content);
- //now create two other files inside folder RemoteSystemConnections
- IFileStore compatibility = RemoteSystemsConnections.getChild(".compatibility");
- content = getRandomString();
- createFile(compatibility, content);
- IFileStore project = RemoteSystemsConnections.getChild(".project");
- createFile(project, content);
-
- //Now, we need to create the content of mynewzip.zip file
- IFileStore folder_6YLT5Xa = temp.getChild(folderToCopyName2);
- createDir(folder_6YLT5Xa, true);
- IFileStore folder_20070315a = folder_6YLT5Xa.getChild("20070315a");
- createDir(folder_20070315a, true);
- IFileStore QB5ROUTaadd = folder_20070315a.getChild("QB5ROUTaadd");
- content = getRandomString();
- createFile(QB5ROUTaadd, content);
- IFileStore folder_20070319 = folder_6YLT5Xa.getChild("20070319");
- createDir(folder_20070319, true);
- content = getRandomString();
- IFileStore QB5ROUTERa = folder_20070319.getChild("QB5ROUTERa");
- content = getRandomString();
- createFile(QB5ROUTERa, content);
- IFileStore folder_20070320a = folder_6YLT5Xa.getChild("20070320a");
- createDir(folder_20070320a, true);
- IFileStore QB5ROupdfasd = folder_20070320a.getChild("QB5ROupdfasd");
- content = getRandomString();
- createFile(QB5ROupdfasd, content);
- IFileStore folder_20070404a = folder_6YLT5Xa.getChild("20070404a");
- createDir(folder_20070404a, true);
- IFileStore qb5routeraad = folder_20070404a.getChild("qb5routeraad");
- content = getRandomString();
- createFile(qb5routeraad, content);
- IFileStore dummyFolder = folder_6YLT5Xa.getChild("dummyFolder");
- createDir(dummyFolder, true);
- IFileStore folder_20070404a1 = dummyFolder.getChild("20070404a");
- createDir(folder_20070404a1, true);
- IFileStore qb5routeraa = folder_20070404a1.getChild("qb5routeraa");
- content = getRandomString();
- createFile(qb5routeraa, content);
- IFileStore epdcdump01_hex12ab = dummyFolder.getChild("epdcdump01.hex12ab");
- content = getRandomString();
- createFile(epdcdump01_hex12ab, content);
-
- IRemoteFile targetDir = null;
- if (inputFss != fss)
- {
- //Create the tempDir inside the inputFss
- try
- {
- IRemoteFile homeDirectory = inputFss.getRemoteFileObject(".", mon);
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(localFss, homeFolderName, baseFolderName, mon);
- targetDir = createFileOrFolder(localFss, homeFolderName, testFolderName, true);
- }
- catch (Exception e)
- {
- fail("Problem encountered: " + e.getStackTrace().toString());
- }
- }
- else
- {
- targetDir = tempDir;
- }
- //now, copy folderToCopy into the folder in the remote system
- IRemoteFile sourceFolderToCopy1 = localFss.getRemoteFileObject(tempPath + '\\' + folderToCopyName1, mon);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy1).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet.addResource(sourceFolderToCopy1);
- ISystemResourceSet tempObjects1 = srcAdapter1.doDrag(fromSet, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects1, targetDir, mon, true);
-
- IRemoteFile sourceFolderToCopy2 = localFss.getRemoteFileObject(tempPath + '\\' + folderToCopyName2, mon);
- ISystemDragDropAdapter srcAdapter2 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy2).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet2 = new SystemRemoteResourceSet(localFss, srcAdapter2);
- fromSet2.addResource(sourceFolderToCopy2);
- ISystemResourceSet tempObjects2 = srcAdapter2.doDrag(fromSet2, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects2, targetDir, mon, true);
-
- IRemoteFile zipSource1 = createFileOrFolder(inputFss, targetDir.getAbsolutePath(), zipSourceFileName1, false);
- assertNotNull(zipSource1);
- IRemoteFile zipSourceFolder = (IRemoteFile)getChildFromFolder(inputFss, targetDir, folderToCopyName1);
- inputFss.copy(zipSourceFolder, zipSource1, folderToCopyName1, mon);
-
- IRemoteFile zipSource2 = createFileOrFolder(inputFss, targetDir.getAbsolutePath(), zipSourceFileName2, false);
- assertNotNull(zipSource2);
- IRemoteFile zipSourceFolder2 = (IRemoteFile)getChildFromFolder(inputFss, targetDir, folderToCopyName2);
- inputFss.copy(zipSourceFolder2, zipSource2, folderToCopyName2, mon);
-
- //Then, we need to retrieve children of the tempDir to cache their information.
- inputFss.resolveFilterString(targetDir, null, mon);
-
- //Then, delete the temp folder in the junit workspace.
- temp.delete(EFS.NONE, mon);
-
- return targetDir;
- }
-
-
-
- public void testCreateZipFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip file first.
- String testName = "dummy.zip";
- IRemoteFile newArchiveFile = createFileOrFolder(tempDirPath, testName, false);
- assertNotNull(newArchiveFile);
- assertTrue(newArchiveFile.exists());
- assertTrue(newArchiveFile.canRead());
- assertTrue(newArchiveFile.canWrite());
- assertEquals(newArchiveFile.getName(), testName);
-
- //fss.resolveFilterString(filterString, monitor)
-
- //Now, we want to create a text file inside.
- String childName = "aaa.txt";
- IRemoteFile file1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file1);
-
- childName = "bbb.txt";
- IRemoteFile file2 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file2);
-
- //Create a folder
- childName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, true);
- assertNotNull(folder1);
-
- //Now, check the contents
- String[] namesToCheck = {"aaa.txt", "bbb.txt", "folder1"};
- int[] typesToCheck = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(newArchiveFile, namesToCheck, typesToCheck);
-
- //Now, create some files inside the folder.
- String secondLevelChildName = "ccc.exe";
- IRemoteFile levelTwoChild1 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild1);
-
- secondLevelChildName = "ddd.bat";
- IRemoteFile levelTwoChild2 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild2);
-
- secondLevelChildName = "another Folder"; //folder with space
- IRemoteFile levelTwoChild3 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, true);
- assertNotNull(levelTwoChild3);
-
- //Now, check the contents
- String[] namesToCheck1 = {"ccc.exe", "ddd.bat", "another Folder"};
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(folder1, namesToCheck1, typesToCheck1);
-
- return;
-
- }
-
- public void testRenameVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip file first.
- String testName = "dummy.zip";
- IRemoteFile newArchiveFile = createFileOrFolder(tempDirPath, testName, false);
-
- //Now, we want to create a text file inside.
- String childName = "aaa.txt";
- IRemoteFile file1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file1);
-
- childName = "bbb.txt";
- IRemoteFile file2 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, false);
- assertNotNull(file2);
-
- //Create a folder
- childName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(newArchiveFile.getAbsolutePath(), childName, true);
- assertNotNull(folder1);
-
- //Now, check the contents
- String[] levelOneNamesToCheck = {"aaa.txt", "bbb.txt", "folder1"};
- int[] levalOneTypesToCheck = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(newArchiveFile, levelOneNamesToCheck, levalOneTypesToCheck);
-
- //Now, create some files inside the folder.
- String secondLevelChildName = "ccc.exe";
- IRemoteFile levelTwoChild1 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild1);
-
- secondLevelChildName = "ddd.bat";
- IRemoteFile levelTwoChild2 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, false);
- assertNotNull(levelTwoChild2);
-
- secondLevelChildName = "another Folder"; //folder with space
- IRemoteFile levelTwoChild3 = createFileOrFolder(folder1.getAbsolutePath(), secondLevelChildName, true);
- assertNotNull(levelTwoChild3);
-
- //Now, check the contents
- String[] levelTwoNamesToCheck = {"ccc.exe", "ddd.bat", "another Folder"};
- int[] levalTwoTypesToCheck = {TYPE_FILE, TYPE_FILE, TYPE_FOLDER};
- checkFolderContents(folder1, levelTwoNamesToCheck, levalTwoTypesToCheck);
-
- //Now rename one of the text file in the first level:
- IRemoteFile childToRename = (IRemoteFile)getChildFromFolder(newArchiveFile, "aaa.txt");
- fss.rename(childToRename, "aaa1.txt", mon);
- //Now rename one of the folder in the first level
- childToRename = (IRemoteFile)getChildFromFolder(newArchiveFile, "folder1");
- fss.rename(childToRename, "folder2", mon);
-
- //Check the result of rename
- String[] newLevelOneNamesToCheck = {"aaa1.txt", "bbb.txt", "folder2"};
- checkFolderContents(newArchiveFile, newLevelOneNamesToCheck, levalOneTypesToCheck);
-
- //Now rename one of the text file in the second level:
- IRemoteFile thisFolder = (IRemoteFile)getChildFromFolder(newArchiveFile, "folder2");
- childToRename = (IRemoteFile)getChildFromFolder(thisFolder, "ddd.bat");
- fss.rename(childToRename, "ddd1.bat", mon);
- //Now rename one of the folder in the second level
- childToRename = (IRemoteFile)getChildFromFolder(thisFolder, "another Folder");
- fss.rename(childToRename, "some folder$", mon);
-
- //Check the result of rename
- String[] newLevelTwoNamesToCheck = {"ccc.exe", "ddd1.bat", "some folder$"};
- checkFolderContents(thisFolder, newLevelTwoNamesToCheck, levalTwoTypesToCheck);
-
- return;
-
- }
-
- public void testMoveVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the source data needed for testing
- createSourceZipFiles();
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
-
- //Now, copy one of the folder from the zip file into folder1
- Object[] children = fss.resolveFilterString(sourceZipFile, null, mon);
- IRemoteFile originalVirtualFolder = (IRemoteFile)children[0];
- String movedFolderName = originalVirtualFolder.getName();
- fss.move(originalVirtualFolder, folder1, movedFolderName, mon);
-
-
- Object movedVirtualFolder = getChildFromFolder(folder1, movedFolderName);
-
- assertNotNull(movedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)movedVirtualFolder, contents, typesToCheck);
-
- //Now, make sure the moved virtual folder is gone from its original zip file
- children = fss.resolveFilterString(sourceZipFile, null, mon);
- assertTrue(children.length == 0);
- }
-
- public void testMoveVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //Now, move one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "Team");
- String movedFolderName = secondLevelChild.getName();
-
- //copy this level two childer into folder1
- fss.move(secondLevelChild, folder1, movedFolderName, mon);
-
- Object movedVirtualFolder = getChildFromFolder(folder1, movedFolderName);
-
- assertNotNull(movedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)movedVirtualFolder, contents, typesToCheck);
-
- //Now, make sure the moved virtual folder is gone from its original zip file
- Object originalVirtualFolder = getChildFromFolder(firstLevelChild, movedFolderName);
-
- assertNull(originalVirtualFolder); //we should not be able to find it.
- }
-
- public void testMoveToArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String targetZipFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, targetZipFileName);
- assertNotNull(targetZipFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, move one of the folder from the sourceFolder into copiedTargetZipFile
- fss.move(sourceFolder, targetZipFile, sourceFolder.getName(), mon);
-
- Object theMovedChild = getChildFromFolder(targetZipFile, sourceFolderName);
- assertNotNull(theMovedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theMovedChild, childrenToCheck, typesToCheck);
-
- //make sure the original folder is gone.
- //make sure the original folder is gone.
- IRemoteFile tempDirRemoteFile = fss.getRemoteFileObject(tempDirPath, mon);
- Object originalSource = getChildFromFolder(tempDirRemoteFile, sourceFolderName);
- assertNull(originalSource);
- }
-
- public void testMoveToVirtualFileLevelOne() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String targetZipFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, targetZipFileName);
- assertNotNull(targetZipFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, move one of the folder from the sourceFolder into a first level virtual file in targetZipFile
- //Get one of its first level children, and move the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetZipFile, folderToCopyName1);
-
- fss.move(sourceFolder, firstLevelChild, sourceFolderName, mon);
-
- Object theMovedChild = getChildFromFolder(firstLevelChild, sourceFolderName);
-
- assertNotNull(theMovedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theMovedChild, childrenToCheck, typesToCheck);
-
- //make sure the original folder is gone.
- IRemoteFile tempDirRemoteFile = fss.getRemoteFileObject(tempDirPath, mon);
- Object originalSource = getChildFromFolder(tempDirRemoteFile, sourceFolderName);
- assertNull(originalSource);
- }
-
- public void testMoveToVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String targetZipFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, targetZipFileName);
- assertTrue(targetZipFile != null);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertTrue(sourceFolder != null);
-
- //Get one of its second level children, and move the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "Team");
-
- fss.move(sourceFolder, secondLevelChild, sourceFolder.getName(), mon);
-
- Object theMovedChild = getChildFromFolder(secondLevelChild, sourceFolderName);
-
- assertNotNull(theMovedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theMovedChild, childrenToCheck, typesToCheck);
-
- //make sure the original folder is gone.
- IRemoteFile tempDirRemoteFile = fss.getRemoteFileObject(tempDirPath, mon);
- Object originalSource = getChildFromFolder(tempDirRemoteFile, sourceFolderName);
- assertNull(originalSource);
- }
-
-
- public void testCopyVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- fss.copy(firstLevelChild, folder1, folderToCopyName1, mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
- }
-
- public void testCopyVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- //copy the zip file first.
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "Team");
- //copy this level two children into folder1
- fss.copy(secondLevelChild, folder1, secondLevelChild.getName(), mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, secondLevelChild.getName());
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
- }
-
-
- public void testCopyToArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String targetZipFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, targetZipFileName);
- assertNotNull(targetZipFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into copiedTargetZipFile
- fss.copy(sourceFolder, targetZipFile, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(targetZipFile, sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
-
-
- public void testCopyToVirtualFileLevelOne() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String targetZipFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, targetZipFileName);
- assertNotNull(targetZipFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into a first level virtual file in targetZipFile
- //Get one of its first level children, and copy the folder to there.
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetZipFile, folderToCopyName1);
-
- fss.copy(sourceFolder, firstLevelChild, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(firstLevelChild, sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
-
- public void testCopyToVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, zipTargetFileName);
- assertNotNull(targetZipFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, folderToCopyName3);
- assertNotNull(sourceFolder);
-
- //Get one of its second level children, and copy the folder to there.
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "TypeFilters");
-
- fss.copy(sourceFolder, secondLevelChild, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(secondLevelChild, sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
- public void testCopyBatchToArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir,zipTargetFileName);
- assertNotNull(targetZipFile);
-
- //Now, copy the source folder.
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir,sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into copiedTargetZipFile
- IRemoteFile[] sourceFiles = new IRemoteFile[3];
- //Also add some of its children into the batch.
- String childToCopyName1 = "aaaaaaaa";
- sourceFiles[0] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName1);
- String childToCopyName2 = "aaaab";
- sourceFiles[1] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName2);
- String childToCopyName3 = "epdcdump01.hex12a";
- sourceFiles[2] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName3);
- fss.copyBatch(sourceFiles, targetZipFile, mon);
-
- //Checking the first copied folder
- Object theCopiedChild = getChildFromFolder(targetZipFile, childToCopyName1);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck1 = {"adsf", "eclipse-SDK-3.3M6-win32.zip", "epdcdump01.hex12", "epdcdump01.hex12aaaa"};
-
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck1, typesToCheck1);
-
- //Checking the second copied folder
- theCopiedChild = getChildFromFolder(targetZipFile, childToCopyName2);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck2 = {"features"};
-
- int[] typesToCheck2 = {TYPE_FOLDER};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck2, typesToCheck2);
-
- //Checking the third copied file
- theCopiedChild = getChildFromFolder(targetZipFile, childToCopyName3);
- assertNotNull(theCopiedChild);
- assertTrue(((IRemoteFile)theCopiedChild).isDirectory() != true);
- }
-
- public void testCopyBatchToVirtualFileLevelOne() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, zipTargetFileName);
- assertNotNull(targetZipFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into a first level virtual file in targetZipFile
- //Get one of its first level children, and copy the folder to there.
- Object[] childrenOfTargetZipFile = fss.resolveFilterString(targetZipFile, null, mon);
-
- IRemoteFile[] sourceFiles = new IRemoteFile[1];
- sourceFiles[0] = sourceFolder;
- fss.copyBatch(sourceFiles, ((IRemoteFile)childrenOfTargetZipFile[0]), mon);
-
- Object theCopiedChild = getChildFromFolder(((IRemoteFile)childrenOfTargetZipFile[0]), sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
- public void testCopyBatchToVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
- createSourceFolders();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, zipTargetFileName);
- assertNotNull(targetZipFile);
-
- //Now, copy the source folder.
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Get one of its second level children, and copy the folder to there.
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "TypeFilters");
-
- IRemoteFile[] sourceFiles = new IRemoteFile[3];
- //Also add some of its children into the batch.
- String childToCopyName1 = "aaaaaaaa";
- sourceFiles[0] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName1);
- String childToCopyName2 = "aaaab";
- sourceFiles[1] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName2);
- String childToCopyName3 = "epdcdump01.hex12a";
- sourceFiles[2] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName3);
- fss.copyBatch(sourceFiles, secondLevelChild, mon);
-
-
- //Checking the first copied folder
- Object theCopiedChild = getChildFromFolder(secondLevelChild, childToCopyName1);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck1 = {"adsf", "eclipse-SDK-3.3M6-win32.zip", "epdcdump01.hex12", "epdcdump01.hex12aaaa"};
-
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck1, typesToCheck1);
-
- //Checking the second copied folder
- theCopiedChild = getChildFromFolder(secondLevelChild, childToCopyName2);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck2 = {"features"};
-
- int[] typesToCheck2 = {TYPE_FOLDER};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck2, typesToCheck2);
-
- //Checking the third copied file
- theCopiedChild = getChildFromFolder(secondLevelChild, childToCopyName3);
- assertNotNull(theCopiedChild);
- assertTrue(((IRemoteFile)theCopiedChild).isDirectory() != true);
- }
-
- public void testCopyBatchVirtualFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String sourceFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir,sourceFileName);
- assertNotNull(sourceZipFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the folder from the zip file into folder1
- Object[] children = fss.resolveFilterString(sourceZipFile, null, mon);
- IRemoteFile[] sourceFiles = new IRemoteFile[3];
- String childToCopyName1 = "Team";
- sourceFiles[0] = (IRemoteFile)getChildFromFolder((IRemoteFile)children[0], childToCopyName1);
- assertNotNull(sourceFiles[0]);
- String childToCopyName2 = "xuanchentp";
- sourceFiles[1] = (IRemoteFile)getChildFromFolder((IRemoteFile)children[0], childToCopyName2);
- assertNotNull(sourceFiles[1]);
- String childToCopyName3 = ".compatibility";
- sourceFiles[2] = (IRemoteFile)getChildFromFolder((IRemoteFile)children[0], childToCopyName3);
- assertNotNull(sourceFiles[2]);
- fss.copyBatch(sourceFiles, folder1, mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, childToCopyName1);
- assertNotNull(copiedVirtualFolder);
- String[] contents1 = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck1 = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents1, typesToCheck1);
-
- copiedVirtualFolder = getChildFromFolder(folder1, childToCopyName2);
- assertNotNull(copiedVirtualFolder);
- String[] contents2 = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck2 = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents2, typesToCheck2);
-
- Object copiedVirtualFile = getChildFromFolder(folder1, childToCopyName3);
- assertNotNull(copiedVirtualFile);
- assertTrue(((IRemoteFile)copiedVirtualFile).isDirectory() != true);
- }
-
- public void testCopyBatchVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String sourceFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceZipFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "Team");
-
- IRemoteFile[] sourceFiles = new IRemoteFile[1];
- sourceFiles[0] = secondLevelChild;
- //copy this level two childer into folder1
- fss.copyBatch(sourceFiles, folder1, mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, secondLevelChild.getName());
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
- }
-
- public void testCopyVirtualBatchToArchiveFile() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, zipTargetFileName);
- assertNotNull(targetZipFile);
-
- String sourcefileName = zipSourceFileName2;
- IRemoteFile sourceFile = (IRemoteFile)getChildFromFolder(tempDir, sourcefileName);
- assertNotNull(sourceFile);
-
- //Now, copy one of the folder from the sourceFile into copiedTargetZipFile
- IRemoteFile[] sourceFiles = new IRemoteFile[1];
- String virutalFolderToCopyName = "6YLT5Xa";
- IRemoteFile virtualFolderToCopy = (IRemoteFile)getChildFromFolder(sourceFile, virutalFolderToCopyName);
- sourceFiles[0] = virtualFolderToCopy;
- fss.copyBatch(sourceFiles, targetZipFile, mon);
-
- Object theCopiedChild = getChildFromFolder(targetZipFile, virutalFolderToCopyName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"20070315a", "20070319", "20070320a", "20070404a", "dummyFolder"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
- public void testCopyVirtualBatchToVirtualFileLevelOne() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, zipTargetFileName);
- assertNotNull(targetZipFile);
-
- String sourcefileName = zipSourceFileName2;
- IRemoteFile sourceFile = (IRemoteFile)getChildFromFolder(tempDir, sourcefileName);
- assertNotNull(sourceFile);
-
- //Now, copy one of the folder from the sourceFolder into a first level virtual file in targetZipFile
- //Get one of its first level children, and copy the folder to there.
- Object[] childrenOfTargetZipFile = fss.resolveFilterString(targetZipFile, null, mon);
-
- IRemoteFile[] sourceFiles = new IRemoteFile[3];
-
- String parentOfVirutalFolderToCopyName = "6YLT5Xa";
- IRemoteFile parentOfVirtualFolderToCopy = (IRemoteFile)getChildFromFolder(sourceFile, parentOfVirutalFolderToCopyName);
- String virtualChildToCopyName1 = "20070315a";
- String virtualChildToCopyName2 = "20070319";
- String virtualChildToCopyName3 = "dummyFolder";
-
- sourceFiles[0] = (IRemoteFile)getChildFromFolder(parentOfVirtualFolderToCopy, virtualChildToCopyName1);
- assertNotNull(sourceFiles[0]);
- sourceFiles[1] = (IRemoteFile)getChildFromFolder(parentOfVirtualFolderToCopy, virtualChildToCopyName2);
- assertNotNull(sourceFiles[1]);
- sourceFiles[2] = (IRemoteFile)getChildFromFolder(parentOfVirtualFolderToCopy, virtualChildToCopyName3);
- assertNotNull(sourceFiles[2]);
- fss.copyBatch(sourceFiles, ((IRemoteFile)childrenOfTargetZipFile[0]), mon);
-
-
- Object theCopiedChild = getChildFromFolder(((IRemoteFile)childrenOfTargetZipFile[0]), virtualChildToCopyName1);
- assertNotNull(theCopiedChild);
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck1 = {"QB5ROUTaadd"};
- int[] typesToCheck1 = {TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck1, typesToCheck1);
-
- theCopiedChild = getChildFromFolder(((IRemoteFile)childrenOfTargetZipFile[0]), virtualChildToCopyName2);
- assertNotNull(theCopiedChild);
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck2 = {"QB5ROUTERa"};
- int[] typesToCheck2 = {TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck2, typesToCheck2);
-
- theCopiedChild = getChildFromFolder(((IRemoteFile)childrenOfTargetZipFile[0]), virtualChildToCopyName3);
- assertNotNull(theCopiedChild);
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck3 = {"20070404a", "epdcdump01.hex12ab"};
- int[] typesToCheck3 = {TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck3, typesToCheck3);
- }
-
- public void testCopyVirtualBatchToVirtualFileLevelTwo() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String zipTargetFileName = zipSourceFileName1;
- IRemoteFile targetZipFile = (IRemoteFile)getChildFromFolder(tempDir, zipTargetFileName);
- assertNotNull(targetZipFile);
-
- String sourcefileName = zipSourceFileName2;
- IRemoteFile sourceFile = (IRemoteFile)getChildFromFolder(tempDir, sourcefileName);
- assertNotNull(sourceFile);
-
- //Get one of its second level children, and copy the folder to there.
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "TypeFilters");
-
- IRemoteFile[] sourceFiles = new IRemoteFile[1];
-
- String parentOfVirutalFolderToCopyName = "6YLT5Xa";
- IRemoteFile parentOfVirtualFolderToCopy = (IRemoteFile)getChildFromFolder(sourceFile, parentOfVirutalFolderToCopyName);
- String virtualFolderToCopyName = "dummyFolder";
- IRemoteFile virtualFolderToCopy = (IRemoteFile)getChildFromFolder(parentOfVirtualFolderToCopy, virtualFolderToCopyName);
-
- sourceFiles[0] = virtualFolderToCopy;
-
- fss.copyBatch(sourceFiles, secondLevelChild, mon);
-
- Object theCopiedChild = getChildFromFolder(parentOfVirtualFolderToCopy, virtualFolderToCopyName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"20070404a", "epdcdump01.hex12ab"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
-
-
-
- public void testCopyToTarVirtualFileLevelOne() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into a first level virtual file in targetZipFile
- //Get one of its first level children, and copy the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetTarFile, "org");
- assertNotNull(firstLevelChild);
-
- fss.copy(sourceFolder, firstLevelChild, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(firstLevelChild, sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
- public void testCopyToTarVirtualFileLevelFour() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Get one of its fourth level children, and copy the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetTarFile, "org");
- assertNotNull(firstLevelChild);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "eclipse");
- assertNotNull(secondLevelChild);
- IRemoteFile thirdLevelChild = (IRemoteFile)getChildFromFolder(secondLevelChild, "dstore");
- assertNotNull(thirdLevelChild);
- IRemoteFile fourLevelChild = (IRemoteFile)getChildFromFolder(thirdLevelChild, "core");
- assertNotNull(fourLevelChild);
-
- //Object[] children = fss.resolveFilterString(sourceZipFile, null, mon);
- fss.copy(sourceFolder, fourLevelChild, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(fourLevelChild, sourceFolderName);
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
- }
-
-
- public void testCopyTarVirtualFileLevelFour() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
-
- String sourceFileName = tarSourceFileName1;
- IRemoteFile sourceTarFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceTarFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the level four folder from the zip file into folder1
- //The folder is org/eclipse/dstore/core
- //then, get directory "java" under org/eclipse/dstore/core
- String parentForDirectoryToCopyName ="org";
- IRemoteFile parentForDirectoryToCopy = (IRemoteFile)getChildFromFolder(sourceTarFile, parentForDirectoryToCopyName);
- assertNotNull(parentForDirectoryToCopy);
-
- parentForDirectoryToCopyName ="eclipse";
- parentForDirectoryToCopy = (IRemoteFile)getChildFromFolder(parentForDirectoryToCopy, parentForDirectoryToCopyName);
- assertNotNull(parentForDirectoryToCopy);
-
- parentForDirectoryToCopyName ="dstore";
- parentForDirectoryToCopy = (IRemoteFile)getChildFromFolder(parentForDirectoryToCopy, parentForDirectoryToCopyName);
- assertNotNull(parentForDirectoryToCopy);
-
- String directoryToCopyName ="core";
- IRemoteFile directoryToCopy = (IRemoteFile)getChildFromFolder(parentForDirectoryToCopy, directoryToCopyName);
- assertNotNull(directoryToCopy);
-
-
- //copy this level four children into folder1
- fss.copy(directoryToCopy, folder1, directoryToCopyName, mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, directoryToCopyName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"client", "java", "miners", "model", "server", "util", "Activator.java"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
- }
-
-
- public void testMoveToTarVirtualFileLevelOne() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Now, copy one of the folder from the sourceFolder into a first level virtual file in targetZipFile
- //Get one of its first level children, and copy the folder to there.
- Object[] childrenOfTargetZipFile = fss.resolveFilterString(targetTarFile, null, mon);
-
- //Object[] children = fss.resolveFilterString(sourceZipFile, null, mon);
- fss.move(sourceFolder, ((IRemoteFile)childrenOfTargetZipFile[0]), sourceFolderName, mon);
-
- Object theMovedChild = getChildFromFolder(((IRemoteFile)childrenOfTargetZipFile[0]), sourceFolderName);
-
- assertNotNull(theMovedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theMovedChild, childrenToCheck, typesToCheck);
-
- //make sure the original folder is gone.
- Object originalSource = getChildFromFolder(tempDir, sourceFolderName);
- assertNull(originalSource);
- }
-
- public void testMoveToVirtualFileLevelFour() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Get one of its fourth level children, and copy the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetTarFile, "org");
- assertNotNull(firstLevelChild);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "eclipse");
- assertNotNull(secondLevelChild);
- IRemoteFile thirdLevelChild = (IRemoteFile)getChildFromFolder(secondLevelChild, "dstore");
- assertNotNull(thirdLevelChild);
- IRemoteFile fourLevelChild = (IRemoteFile)getChildFromFolder(thirdLevelChild, "core");
- assertNotNull(fourLevelChild);
-
- //Object[] children = fss.resolveFilterString(sourceZipFile, null, mon);
- fss.move(sourceFolder, fourLevelChild, sourceFolder.getName(), mon);
-
- Object theCopiedChild = getChildFromFolder(fourLevelChild, sourceFolderName);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the moved child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck, typesToCheck);
-
- //make sure the original folder is gone.
- Object originalSource = getChildFromFolder(tempDir, sourceFolderName);
- assertNull(originalSource);
- }
-
-
- public void testMoveTarVirtualFileLevelFour() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //create the source for testing first
- createSourceTarFiles();
-
- String sourceFileName = tarSourceFileName1;
- IRemoteFile sourceTarFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceTarFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Get one of its fourth level children, and move it to the folder
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceTarFile, "org");
- assertNotNull(firstLevelChild);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "eclipse");
- assertNotNull(secondLevelChild);
- IRemoteFile thirdLevelChild = (IRemoteFile)getChildFromFolder(secondLevelChild, "dstore");
- assertNotNull(thirdLevelChild);
- IRemoteFile fourthLevelChild = (IRemoteFile)getChildFromFolder(thirdLevelChild, "core");
- assertNotNull(fourthLevelChild);
- String movedFolderName = fourthLevelChild.getName();
-
- //copy this level four children into folder1
- fss.move(fourthLevelChild, folder1, movedFolderName, mon);
-
- Object copiedVirtualFolder = getChildFromFolder(folder1, movedFolderName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"client", "java", "miners", "model", "server", "util", "Activator.java"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, make sure the moved virtual folder is gone from its original zip file
- //children = fss.resolveFilterString(sourceTarFile, null, mon);
- Object result = getChildFromFolder(thirdLevelChild, movedFolderName);
- assertNull(result); //we should not be able to find it.
- }
-
-
-
- public void testCopyBatchToTarVirtualFileLevelFour() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceTarFiles();
- createSourceFolders();
-
- String tarTargetFileName = tarSourceFileName1;
- IRemoteFile targetTarFile = (IRemoteFile)getChildFromFolder(tempDir, tarTargetFileName);
- assertNotNull(targetTarFile);
-
- //Now, copy the source folder.
- String sourceFolderName = folderToCopyName3;
- IRemoteFile sourceFolder = (IRemoteFile)getChildFromFolder(tempDir, sourceFolderName);
- assertNotNull(sourceFolder);
-
- //Get one of its fourth level children, and copy the folder to there.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(targetTarFile, "org");
- assertNotNull(firstLevelChild);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "eclipse");
- assertNotNull(secondLevelChild);
- IRemoteFile thirdLevelChild = (IRemoteFile)getChildFromFolder(secondLevelChild, "dstore");
- assertNotNull(thirdLevelChild);
- IRemoteFile fourthLevelChild = (IRemoteFile)getChildFromFolder(thirdLevelChild, "core");
- assertNotNull(fourthLevelChild);
-
- IRemoteFile[] sourceFiles = new IRemoteFile[3];
- //Also add some of its children into the batch.
- String childToCopyName1 = "aaaaaaaa";
- sourceFiles[0] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName1);
- String childToCopyName2 = "aaaab";
- sourceFiles[1] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName2);
- String childToCopyName3 = "epdcdump01.hex12a";
- sourceFiles[2] = (IRemoteFile)getChildFromFolder(sourceFolder, childToCopyName3);
- fss.copyBatch(sourceFiles, fourthLevelChild, mon);
-
-
- //Checking the first copied folder
- Object theCopiedChild = getChildFromFolder(fourthLevelChild, childToCopyName1);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck1 = {"adsf", "eclipse-SDK-3.3M6-win32.zip", "epdcdump01.hex12", "epdcdump01.hex12aaaa"};
-
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck1, typesToCheck1);
-
- //Checking the second copied folder
- theCopiedChild = getChildFromFolder(fourthLevelChild, childToCopyName2);
-
- assertNotNull(theCopiedChild);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck2 = {"features"};
-
- int[] typesToCheck2 = {TYPE_FOLDER};
- checkFolderContents((IRemoteFile)theCopiedChild, childrenToCheck2, typesToCheck2);
-
- //Checking the third copied file
- theCopiedChild = getChildFromFolder(fourthLevelChild, childToCopyName3);
- assertNotNull(theCopiedChild);
- assertTrue(((IRemoteFile)theCopiedChild).isDirectory() != true);
- }
-
-
-
- public void testCopyBatchTarVirtualFileLevelFive() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceTarFiles();
-
- String sourceFileName = tarSourceFileName1;
- IRemoteFile sourceTarFile = (IRemoteFile)getChildFromFolder(tempDir, sourceFileName);
- assertNotNull(sourceTarFile);
-
- //then, create a folder inside the tempDir
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(tempDirPath, folderName, true);
- assertNotNull(folder1);
-
- //Get several of its fifth level children, and them into the folder.
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceTarFile, "org");
- assertNotNull(firstLevelChild);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "eclipse");
- assertNotNull(secondLevelChild);
- IRemoteFile thirdLevelChild = (IRemoteFile)getChildFromFolder(secondLevelChild, "dstore");
- assertNotNull(thirdLevelChild);
- IRemoteFile fourthLevelChild = (IRemoteFile)getChildFromFolder(thirdLevelChild, "core");
- assertNotNull(fourthLevelChild);
-
- IRemoteFile[] fifLevelChildrenToCopy = new IRemoteFile[3];
-
- String firstToCopyName = "client";
- fifLevelChildrenToCopy[0] = (IRemoteFile)getChildFromFolder(fourthLevelChild, firstToCopyName);
- assertNotNull(fifLevelChildrenToCopy[0]);
- String secondToCopyName = "miners";
- fifLevelChildrenToCopy[1] = (IRemoteFile)getChildFromFolder(fourthLevelChild, secondToCopyName);
- assertNotNull(fifLevelChildrenToCopy[1]);
- String thirdToCopyName = "Activator.java";
- fifLevelChildrenToCopy[2] = (IRemoteFile)getChildFromFolder(fourthLevelChild, thirdToCopyName);
- assertNotNull(fifLevelChildrenToCopy[2]);
-
-
- fss.copyBatch(fifLevelChildrenToCopy, folder1, mon);
-
- Object copiedVirtualFolder1 = getChildFromFolder(folder1, firstToCopyName);
- assertNotNull(copiedVirtualFolder1);
- String[] contents1 = {"ClientConnection.java", "ConnectionStatus.java"};
- int[] typesToCheck1 = {TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder1, contents1, typesToCheck1);
-
- Object copiedVirtualFolder2 = getChildFromFolder(folder1, secondToCopyName);
- assertNotNull(copiedVirtualFolder2);
- String[] contents2 = {"Miner.java", "MinerThread.java"};
- int[] typesToCheck2 = {TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)copiedVirtualFolder2, contents2, typesToCheck2);
-
- Object copiedVirtualFolder3 = getChildFromFolder(folder1, thirdToCopyName);
- assertNotNull(copiedVirtualFolder3);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStore.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStore.java
deleted file mode 100644
index f6afe8ae7..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStore.java
+++ /dev/null
@@ -1,1006 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Xuan Chen (IBM) - initial API and implementation
- * Martin Oberhuber (Wind River) - Fix Javadoc warnings
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * Martin Oberhuber (Wind River) - [195402] Add constructor with test name
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.ISystemResourceSet;
-import org.eclipse.rse.core.model.SystemRemoteResourceSet;
-import org.eclipse.rse.core.model.SystemStartHere;
-import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.core.subsystems.ISystemDragDropAdapter;
-import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
-import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-public class FileServiceArchiveTestDStore extends FileServiceArchiveTest {
-
- private boolean fPreference_ALERT_SSL;
- private boolean fPreference_ALERT_NONSSL;
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public FileServiceArchiveTestDStore(String name) {
- super(name);
- setTargetName("linux");
- }
-
- public static junit.framework.Test suite() {
- TestSuite suite = new TestSuite("FileServiceArchiveTestDStore");
-
- //zip file testing
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualBatchToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualBatchToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualBatchToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCreateZipFile")); //$NON-NLS-1$
- //suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testDeleteVirtualFileBigZip")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testRenameVirtualFile")); //$NON-NLS-1$
- //suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testRenameVirtualFileBigZip")); //$NON-NLS-1$
-
- //tar file testing
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCreateTarFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyTarVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyTarVirtualFileLevelFour")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyToTarArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyToTarVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyToTarVirtualFileLevelFour")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testDeleteTarVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveTarVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveTarVirtualFileLevelFour")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveToTarArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveToTarVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testMoveToVirtualFileLevelFour")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testRenameTarVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchTarVirtualFileLevelFive"));
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchToTarArchiveFile"));
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyBatchToTarVirtualFileLevelFour"));
-
- //super transfer
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testSuperTransferLocalToRemote"));
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testSuperTransferDStoreWindowsAndDStore"));
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testSuperTransferDStoreToLocal"));
- //open a virtual file in tar archive
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testOpenFileFromTarArchive")); //$NON-NLS-1$
-
- //copy the virtual folder across connections
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualFileFromDStoreToLocal")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualFileLevelTwoFromDStoreToLocal")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualFileFromLocalToDStore")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVirtualFileLevelTwoFromLocalToDStore")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFLevelTwoToArchiveFromDStoreToLocal")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFLevelTwoToArchiveFromLocalToDStore")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFToArchiveFromDStoreToLocal")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFToArchiveFromLocalToDStore")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFToVFFromDStoreToLocal")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFToVFLevelTwoFromDStoreToLocal")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFToVFFromLocalToDStore")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testCopyVFToVFLevelTwoFromLocalToDStore")); //$NON-NLS-1$
-
- return suite;
- }
-
-
-
- protected void setupFileSubSystem() {
-
- IHost dstoreHost = getLinuxHost();
- assertNotNull(dstoreHost);
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(dstoreHost, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- fss = (IFileServiceSubSystem)ss[i];
- fs = fss.getFileService();
- }
- }
-
- IHost localHost = getLocalSystemConnection();
- sr = SystemStartHere.getSystemRegistry();
- ss = sr.getServiceSubSystems(localHost, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- localFss = (IFileServiceSubSystem)ss[i];
- }
- }
-
- try
- {
- IConnectorService connectionService = fss.getConnectorService();
-
- //If you want to connect to a running server, uncomment the following statements
- /*
- IServerLauncherProperties properties = connectionService.getRemoteServerLauncherProperties();
-
- if (properties instanceof IRemoteServerLauncher)
- {
- IRemoteServerLauncher sl = (IRemoteServerLauncher)properties;
- sl.setServerLaunchType(ServerLaunchType.get(ServerLaunchType.RUNNING));
- fss.getSubSystemConfiguration().updateSubSystem(fss, false, "tester", true, 4033);
- }
- */
- //end here
-
- connectionService.acquireCredentials(false);
- connectionService.connect(mon);
-
- } catch(Exception e) {
- assertTrue("Exception creating temp dir " + e.getStackTrace().toString(), false); //$NON-NLS-1$
- }
- }
-
- public void tearDown() throws Exception {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.ALERT_SSL, fPreference_ALERT_SSL);
- store.setValue(ISystemPreferencesConstants.ALERT_NONSSL, fPreference_ALERT_NONSSL);
- super.tearDown();
- }
-
- public void testSuperTransferLocalToRemote() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
-
- createSuperTransferFolder(temp);
-
- //Set the superTransfer preference on
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- boolean preference_DOSUPERTRANSFER = store.getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- store.setValue(ISystemFilePreferencesConstants.DOSUPERTRANSFER, true);
-
-
- //now, copy folderToCopy into the folder in the remote system
- IRemoteFile sourceFolderToCopy1 = localFss.getRemoteFileObject(tempPath + '\\' + folderToCopyName3, mon);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy1).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(sourceFolderToCopy1);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, tempDir, mon, true);
-
- //Then, we need to retrieve children of the tempDir to cache their information.
- Object[] children = fss.resolveFilterString(tempDir, null, mon);
- //Make sure there is no temp archive file left
- assertTrue(children.length == 1);
-
- Object theCopiedFolder = getChildFromFolder(tempDir, folderToCopyName3);
- assertNotNull(theCopiedFolder);
-
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents((IRemoteFile)theCopiedFolder, childrenToCheck, typesToCheck);
-
- //Then, set the preference back to its original value
- store.setValue(ISystemFilePreferencesConstants.DOSUPERTRANSFER, preference_DOSUPERTRANSFER);
-
- //Then, delete the temp folder in the junit workspace.
- temp.delete(EFS.NONE, mon);
- }
-
- public void testSuperTransferDStoreWindowsAndDStore() throws Exception {
- //-test-author-:XuanChen
- getWindowsHost();
- if (isTestDisabled())
- return;
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
-
- createSuperTransferFolder(temp);
-
- //Set the superTransfer preference on
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- boolean preference_DOSUPERTRANSFER = store.getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- store.setValue(ISystemFilePreferencesConstants.DOSUPERTRANSFER, true);
-
- //now, copy folderToCopy into the folder in the remote system
- IRemoteFile sourceFolderToCopy1 = localFss.getRemoteFileObject(tempPath + '\\' + folderToCopyName3, mon);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy1).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet1 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet1.addResource(sourceFolderToCopy1);
- ISystemResourceSet tempObjects1 = srcAdapter1.doDrag(fromSet1, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects1, tempDir, mon, true);
-
- //Then, we need to retrieve children of the tempDir to cache their information.
- fss.resolveFilterString(tempDir, null, mon);
-
- IHost dstoreHost = getWindowsHost();
- assertNotNull(dstoreHost);
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(dstoreHost, IFileService.class);
- IFileServiceSubSystem dstoreWindowsFss = null;
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- dstoreWindowsFss = (IFileServiceSubSystem)ss[i];
- }
- }
- assertNotNull(dstoreWindowsFss);
- IConnectorService dstoreWindowsConnectionService = dstoreWindowsFss.getConnectorService();
- dstoreWindowsConnectionService.acquireCredentials(false);
- dstoreWindowsConnectionService.connect(mon);
-
- //Then, create a temparory directory the My Home of the DStore Windows
- //Create a temparory directory in My Home
- IRemoteFile dstoreWindowsTempDir = null;
- //String dstoreWindowsTempDirPath = null;
- try
- {
- IRemoteFile homeDirectory = dstoreWindowsFss.getRemoteFileObject(".", mon);
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(dstoreWindowsFss, homeFolderName, baseFolderName, mon);
- dstoreWindowsTempDir = createFileOrFolder(dstoreWindowsFss, homeFolderName, testFolderName, true);
- }
- catch (Exception e)
- {
- fail("Problem encountered: " + e.getStackTrace().toString());
- }
-
- //now, copy that folder in the Dstore connection into the folder in DStore Windows connection
- IRemoteFile sourceFolderToCopy2 = (IRemoteFile)getChildFromFolder(tempDir, folderToCopyName3);
- ISystemDragDropAdapter srcAdapter2 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy2).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet2 = new SystemRemoteResourceSet(fss, srcAdapter2);
- fromSet2.addResource(sourceFolderToCopy2);
- ISystemResourceSet tempObjects2 = srcAdapter2.doDrag(fromSet2, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects2, dstoreWindowsTempDir, mon, true);
-
- Object[] children = dstoreWindowsFss.resolveFilterString(dstoreWindowsTempDir, null, mon);
- //Make sure there is no temp archive file left
- assertTrue(children.length == 1);
-
- //then verify the result of copy
- Object theCopiedFolder = getChildFromFolder(dstoreWindowsFss, dstoreWindowsTempDir, folderToCopyName3);
- assertNotNull(theCopiedFolder);
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(dstoreWindowsFss, (IRemoteFile)theCopiedFolder, childrenToCheck, typesToCheck);
-
- //Then, set the preference back to its original value
- store.setValue(ISystemFilePreferencesConstants.DOSUPERTRANSFER, preference_DOSUPERTRANSFER);
-
- //delete the windows dstore temp file just created
- try {
- dstoreWindowsFss.delete(dstoreWindowsTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- //Then, delete the temp folder in the junit workspace.
- temp.delete(EFS.NONE, mon);
- }
-
- public void testSuperTransferDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
- String tempPath = getWorkspace().getRoot().getLocation().append("temp").toString();
- IFileStore temp = createDir(tempPath, true);
-
- createSuperTransferFolder(temp);
-
- //Set the superTransfer preference on
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- boolean preference_DOSUPERTRANSFER = store.getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER);
- store.setValue(ISystemFilePreferencesConstants.DOSUPERTRANSFER, true);
-
- //now, copy folderToCopy into the folder in the remote system
- IRemoteFile sourceFolderToCopy1 = localFss.getRemoteFileObject(tempPath + '\\' + folderToCopyName3, mon);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy1).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet1 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet1.addResource(sourceFolderToCopy1);
- ISystemResourceSet tempObjects1 = srcAdapter1.doDrag(fromSet1, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects1, tempDir, mon, true);
-
- //Then, we need to retrieve children of the tempDir to cache their information.
- fss.resolveFilterString(tempDir, null, mon);
-
-
- //Then, create a temparory directory the My Home of the Local connection
- //Create a temparory directory in My Home
- IRemoteFile localTempDir = null;
- try
- {
- IRemoteFile homeDirectory = localFss.getRemoteFileObject(".", mon);
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(localFss, homeFolderName, baseFolderName, mon);
- localTempDir = createFileOrFolder(localFss, homeFolderName, testFolderName, true);
- }
- catch (Exception e)
- {
- fail("Problem encountered: " + e.getStackTrace().toString());
- }
-
- //now, copy that folder in the Dstore connection into the folder in local connection
- IRemoteFile sourceFolderToCopy2 = (IRemoteFile)getChildFromFolder(tempDir, folderToCopyName3);
- ISystemDragDropAdapter srcAdapter2 = (ISystemDragDropAdapter) ((IAdaptable) sourceFolderToCopy2).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet2 = new SystemRemoteResourceSet(fss, srcAdapter2);
- fromSet2.addResource(sourceFolderToCopy2);
- ISystemResourceSet tempObjects2 = srcAdapter2.doDrag(fromSet2, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects2, localTempDir, mon, true);
-
- Object[] localChildren = localFss.resolveFilterString(localTempDir, null, mon);
- //Make sure there is no temp archive file left
- assertTrue(localChildren.length == 1);
-
- //then verify the result of copy
- Object theCopiedFolderLocal = getChildFromFolder(localFss, localTempDir, folderToCopyName3);
- assertNotNull(theCopiedFolderLocal);
- //Also make sure the copied child has the right contents.
- String[] childrenToCheck = {"aaaaaaaa", "aaaab", "epdcdump01.hex12a", "RSE-SDK-2.0RC1.zip"};
-
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)theCopiedFolderLocal, childrenToCheck, typesToCheck);
-
- //Then, set the preference back to its original value
- store.setValue(ISystemFilePreferencesConstants.DOSUPERTRANSFER, preference_DOSUPERTRANSFER);
-
- //delete the windows dstore temp file just created
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- //Then, delete the temp folder in the junit workspace.
- temp.delete(EFS.NONE, mon);
- }
-
- public void testCopyVirtualFileFromDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //Create the tempDir inside the Local connection first.
- IRemoteFile localTempDir = null;
- try
- {
- IRemoteFile homeDirectory = localFss.getRemoteFileObject(".", mon);
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(localFss, homeFolderName, baseFolderName, mon);
- localTempDir = createFileOrFolder(localFss, homeFolderName, testFolderName, true);
- }
- catch (Exception e)
- {
- fail("Problem encountered: " + e.getStackTrace().toString());
- }
- //then, create a folder inside the tempDir inside the Local connection
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(localFss, localTempDir.getAbsolutePath(), folderName, true);
- assertNotNull(folder1);
-
-
- //Now, copy one of the folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) firstLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(fss, srcAdapter1);
- fromSet3.addResource(firstLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, folder1, mon, true);
-
- //make sure some delay before checking the result
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(localFss, folder1, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
-
-
- public void testCopyVirtualFileLevelTwoFromDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- createSourceZipFiles();
-
- //copy the zip file first.
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //Create the tempDir inside the Local connection first.
- IRemoteFile localTempDir = null;
- try
- {
- IRemoteFile homeDirectory = localFss.getRemoteFileObject(".", mon);
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(localFss, homeFolderName, baseFolderName, mon);
- localTempDir = createFileOrFolder(localFss, homeFolderName, testFolderName, true);
- }
- catch (Exception e)
- {
- fail("Problem encountered: " + e.getStackTrace().toString());
- }
- //then, create a folder inside the tempDir inside the Local connection
- String folderName = "folder1";
- String secondLeveChildName = "Team";
- IRemoteFile folder1 = createFileOrFolder(localFss, localTempDir.getAbsolutePath(), folderName, true);
- assertNotNull(folder1);
-
- //Now, copy one of the level two folder from the zip file into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(firstLevelChild, "Team");
-
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) secondLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(fss, srcAdapter1);
- fromSet3.addResource(secondLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, folder1, mon, true);
-
- Thread.sleep(50);
-
- Object copiedVirtualFolder = getChildFromFolder(localFss, folder1, secondLeveChildName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVirtualFileFromLocalToDStore() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- IRemoteFile sourceZipLocation = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(localFss, sourceZipLocation, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //then, create a folder inside the tempDir inside the DStore connection
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(fss, tempDir.getAbsolutePath(), folderName, true);
- assertNotNull(folder1);
-
-
- //Now, copy one of the folder from the zip file in Local connection into folder1
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(localFss, sourceZipFile, folderToCopyName1);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) firstLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(firstLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, folder1, mon, true);
-
- Object copiedVirtualFolder = getChildFromFolder(fss, folder1, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(fss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(sourceZipLocation, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVirtualFileLevelTwoFromLocalToDStore() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- IRemoteFile sourceZipLocation = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(localFss, sourceZipLocation, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //then, create a folder inside the tempDir inside the DStore connection
- String folderName = "folder1";
- IRemoteFile folder1 = createFileOrFolder(fss, tempDir.getAbsolutePath(), folderName, true);
- assertNotNull(folder1);
-
-
- //Now, copy one of the folder from the zip file in Local connection into folder1
- //Now, copy one of the level two folder from the zip file into folder1
- String secondLeveChildName = "Team";
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(localFss, sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(localFss, firstLevelChild, secondLeveChildName);
-
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) secondLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(secondLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, folder1, mon, true);
-
- Object copiedVirtualFolder = getChildFromFolder(fss, folder1, secondLeveChildName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(fss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(sourceZipLocation, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
-
- }
-
- public void testCopyVFToArchiveFromDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the first level virtual child of a zip file
- //in local temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, zipSourceFileName2);
- //IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(localFss, destinationArchiveFile, folderToCopyName2);
-
- //Now, copy one of the folder from the zip file in dstore into destinationVirtualFolder
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) firstLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(fss, srcAdapter1);
- fromSet3.addResource(firstLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationArchiveFile, mon, true);
-
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(localFss, destinationArchiveFile, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFLevelTwoToArchiveFromDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the second level virtual child of a zip file
- //in local temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, zipSourceFileName2);
- //IRemoteFile firstChild = (IRemoteFile)getChildFromFolder(localFss, destinationArchiveFile, folderToCopyName2);
- //IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(localFss, firstChild, "20070319");
-
- //the source is a second level child of a zip file in dstore connection temp dir
- String secondLeveChildName = "Team";
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(fss, sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(fss, firstLevelChild, secondLeveChildName);
-
-
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) secondLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(fss, srcAdapter1);
- fromSet3.addResource(secondLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationArchiveFile, mon, true);
-
- Thread.sleep(50);
-
- Object copiedVirtualFolder = getChildFromFolder(localFss, destinationArchiveFile, secondLeveChildName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFToArchiveFromLocalToDStore() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- //Source zip file is from Local connection
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the first level virtual child of a zip file
- //in dstore temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(fss, tempDir, zipSourceFileName2);
- //IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(fss, destinationArchiveFile, folderToCopyName2);
-
- //Now, copy one of the folder from the zip file in local into destinationVirtualFolder
- //First, drag the virtual folder from the local zip file
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(localFss, sourceZipFile, folderToCopyName1);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) firstLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(firstLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- //The drop to the destination virtual folder in dstore connection.
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationArchiveFile, mon, true);
-
- //The result is in the dstore connection
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(fss, destinationArchiveFile, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(fss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFLevelTwoToArchiveFromLocalToDStore() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- //Source zip file is in local connection
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the second level virtual child of a zip file
- //in dstore temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(fss, tempDir, zipSourceFileName2);
- //IRemoteFile firstChild = (IRemoteFile)getChildFromFolder(fss, destinationArchiveFile, folderToCopyName2);
- //IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(fss, firstChild, "20070319");
-
- //the source is a second level child of a zip file in local connection temp dir
- String secondLeveChildName = "Team";
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(localFss, sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(localFss, firstLevelChild, secondLeveChildName);
-
- //Now, copy one of the folder from the zip file in local into destinationVirtualFolder
- //First, drag the virtual folder from the local zip file
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) secondLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(secondLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationArchiveFile, mon, true);
-
- //The result is in the dstore connection
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(fss, destinationArchiveFile, secondLeveChildName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(fss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFToVFFromDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the first level virtual child of a zip file
- //in local temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, zipSourceFileName2);
- IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(localFss, destinationArchiveFile, folderToCopyName2);
-
- //Now, copy one of the folder from the zip file in dstore into destinationVirtualFolder
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(sourceZipFile, folderToCopyName1);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) firstLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(fss, srcAdapter1);
- fromSet3.addResource(firstLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationVirtualFolder, mon, true);
-
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(localFss, destinationVirtualFolder, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFToVFLevelTwoFromDStoreToLocal() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(tempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the second level virtual child of a zip file
- //in local temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, zipSourceFileName2);
- IRemoteFile firstChild = (IRemoteFile)getChildFromFolder(localFss, destinationArchiveFile, folderToCopyName2);
- IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(localFss, firstChild, "20070319");
-
- //the source is a second level child of a zip file in dstore connection temp dir
- String secondLeveChildName = "Team";
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(fss, sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(fss, firstLevelChild, secondLeveChildName);
-
-
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) secondLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(fss, srcAdapter1);
- fromSet3.addResource(secondLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationVirtualFolder, mon, true);
-
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(localFss, destinationVirtualFolder, secondLeveChildName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(localFss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFToVFFromLocalToDStore() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- //Source zip file is from Local connection
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the first level virtual child of a zip file
- //in dstore temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(fss, tempDir, zipSourceFileName2);
- IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(fss, destinationArchiveFile, folderToCopyName2);
-
- //Now, copy one of the folder from the zip file in local into destinationVirtualFolder
- //First, drag the virtual folder from the local zip file
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(localFss, sourceZipFile, folderToCopyName1);
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) firstLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(firstLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- //The drop to the destination virtual folder in dstore connection.
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationVirtualFolder, mon, true);
-
- //The result is in the dstore connection
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(fss, destinationVirtualFolder, folderToCopyName1);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Team", "TypeFilters", "xuanchentp", ".compatibility", ".project"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE, TYPE_FILE};
- checkFolderContents(fss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
- public void testCopyVFToVFLevelTwoFromLocalToDStore() throws Exception {
- //-test-author-:XuanChen
- if (isTestDisabled())
- return;
-
- //Create the zip files in dstore connection.
- createSourceZipFiles();
-
- //Create the zip files in local connection
- IRemoteFile localTempDir = createSourceZipFiles(localFss);
-
- String sourceZipFileName = zipSourceFileName1;
- //Source zip file is in local connection
- IRemoteFile sourceZipFile = (IRemoteFile)getChildFromFolder(localFss, localTempDir, sourceZipFileName);
- assertNotNull(sourceZipFile);
-
- //The destination is the second level virtual child of a zip file
- //in dstore temp dir
- IRemoteFile destinationArchiveFile = (IRemoteFile)getChildFromFolder(fss, tempDir, zipSourceFileName2);
- IRemoteFile firstChild = (IRemoteFile)getChildFromFolder(fss, destinationArchiveFile, folderToCopyName2);
- IRemoteFile destinationVirtualFolder = (IRemoteFile)getChildFromFolder(fss, firstChild, "20070319");
-
- //the source is a second level child of a zip file in local connection temp dir
- String secondLeveChildName = "Team";
- IRemoteFile firstLevelChild = (IRemoteFile)getChildFromFolder(localFss, sourceZipFile, folderToCopyName1);
- IRemoteFile secondLevelChild = (IRemoteFile)getChildFromFolder(localFss, firstLevelChild, secondLeveChildName);
-
- //Now, copy one of the folder from the zip file in local into destinationVirtualFolder
- //First, drag the virtual folder from the local zip file
- ISystemDragDropAdapter srcAdapter1 = (ISystemDragDropAdapter) ((IAdaptable) secondLevelChild).getAdapter(ISystemDragDropAdapter.class);
- SystemRemoteResourceSet fromSet3 = new SystemRemoteResourceSet(localFss, srcAdapter1);
- fromSet3.addResource(secondLevelChild);
- ISystemResourceSet tempObjects3 = srcAdapter1.doDrag(fromSet3, mon);
- UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)tempObjects3, destinationVirtualFolder, mon, true);
-
- //The result is in the dstore connection
- Thread.sleep(50);
- Object copiedVirtualFolder = getChildFromFolder(fss, destinationVirtualFolder, secondLeveChildName);
-
- assertNotNull(copiedVirtualFolder);
-
- String[] contents = {"Connections", "Filters", "profile.xmi"};
- int[] typesToCheck = {TYPE_FOLDER, TYPE_FOLDER, TYPE_FILE};
- checkFolderContents(fss, (IRemoteFile)copiedVirtualFolder, contents, typesToCheck);
-
- //Now, need to delete the temp dir in the Local connection
- try {
- localFss.delete(localTempDir, mon);
- } catch(SystemMessageException msg) {
- //ensure that super.tearDown() can run
- System.err.println("Exception on deleting local temp dir: "+msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStoreWindows.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStoreWindows.java
deleted file mode 100644
index ded8f07d1..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceArchiveTestDStoreWindows.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Xuan Chen (IBM) - initial API and implementation
- * Martin Oberhuber (Wind River) - Fix Javadoc warnings
- * Martin Oberhuber (Wind River) - [195402] Add constructor with test name
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.model.SystemStartHere;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-public class FileServiceArchiveTestDStoreWindows extends FileServiceArchiveTest {
-
- private boolean fPreference_ALERT_SSL;
- private boolean fPreference_ALERT_NONSSL;
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public FileServiceArchiveTestDStoreWindows(String name) {
- super(name);
- setTargetName("windows");
- }
-
- public static junit.framework.Test suite() {
-
- TestSuite suite = new TestSuite("FileServiceArchiveTestDStoreWindows");
-
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyBatchToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyBatchToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyBatchToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyBatchVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyBatchVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyVirtualBatchToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyVirtualBatchToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyVirtualBatchToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCopyVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testCreateZipFile")); //$NON-NLS-1$
- //suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testDeleteVirtualFileBigZip")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testMoveToArchiveFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testMoveToVirtualFileLevelOne")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testMoveToVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testMoveVirtualFile")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testMoveVirtualFileLevelTwo")); //$NON-NLS-1$
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testRenameVirtualFile")); //$NON-NLS-1$
- //suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testRenameVirtualFileBigZip")); //$NON-NLS-1$
-
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStoreWindows.class, "testSuperTransferLocalToRemote"));
- suite.addTest(TestSuite.createTest(FileServiceArchiveTestDStore.class, "testSuperTransferDStoreToLocal"));
- return suite;
- }
-
- protected void setupFileSubSystem() {
-
- IHost dstoreHost = getWindowsHost();
- assertTrue(dstoreHost != null);
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(dstoreHost, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- fss = (IFileServiceSubSystem)ss[i];
- fs = fss.getFileService();
- }
- }
-
- IHost localHost = getLocalSystemConnection();
- sr = SystemStartHere.getSystemRegistry();
- ss = sr.getServiceSubSystems(localHost, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- localFss = (IFileServiceSubSystem)ss[i];
- }
- }
-
- try
- {
- IConnectorService connectionService = fss.getConnectorService();
-
- //If you want to connect to a running server, uncomment the following statements
- /*
- IServerLauncherProperties properties = connectionService.getRemoteServerLauncherProperties();
-
- if (properties instanceof IRemoteServerLauncher)
- {
- IRemoteServerLauncher sl = (IRemoteServerLauncher)properties;
- sl.setServerLaunchType(ServerLaunchType.get(ServerLaunchType.RUNNING));
- fss.getSubSystemConfiguration().updateSubSystem(fss, false, "xuanchen", true, 4033);
- }
- */
- //End here.
-
- connectionService.acquireCredentials(false);
- connectionService.connect(mon);
-
- } catch(Exception e) {
- assertTrue("Exception creating temp dir " + e.getStackTrace().toString(), false); //$NON-NLS-1$
- }
- }
-
- public void tearDown() throws Exception {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.ALERT_SSL, fPreference_ALERT_SSL);
- store.setValue(ISystemPreferencesConstants.ALERT_NONSSL, fPreference_ALERT_NONSSL);
- super.tearDown();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceBaseTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceBaseTest.java
deleted file mode 100644
index 42c1f59e8..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceBaseTest.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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:
- * Xuan Chen (IBM) - initial API and implementation
- * - <copied code from org.eclipse.core.tests.internal.localstore/LocalStoreTest (Copyright IBM)>
- * - <copied code from org.eclipse.core.tests.harness/CoreTest (Copyright IBM)>
- * - <copied code from org.eclipse.core.tests.resources/ResourceTest (Copyright IBM)>
- * - <copied code from org.eclipse.core.tests.harness/CoreTest (Copyright IBM)>
- * Martin Oberhuber (Wind River) - [195402] Add constructor with test name
- * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.RSECorePlugin;
-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.archiveutils.ArchiveHandlerManager;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-/**
- * Base class for file subsystem / file service unit tests.
- * Contains helper methods for test environment setup.
- */
-public class FileServiceBaseTest extends RSEBaseConnectionTestCase {
-
- protected IFileServiceSubSystem fss;
- protected IFileServiceSubSystem localFss;
- protected IFileService fs;
- protected IRemoteFile tempDir;
- protected String tempDirPath;
- protected IProgressMonitor mon = new NullProgressMonitor();
-
- public static int TYPE_FILE = 0;
- public static int TYPE_FOLDER = 1;
-
- /**
- * Constructor with specific test name.
- * @param name test to execute
- */
- public FileServiceBaseTest(String name) {
- super(name);
- setTargetName("local");
- }
-
- public void setUp() throws Exception {
- super.setUp();
- setupFileSubSystem();
- if (isTestDisabled())
- return;
- //Create a temparory directory in My Home
- try
- {
- IRemoteFile homeDirectory = fss.getRemoteFileObject(".", mon);
- String baseFolderName = "rsetest";
- String homeFolderName = homeDirectory.getAbsolutePath();
- String testFolderName = FileServiceHelper.getRandomLocation(fss, homeFolderName, baseFolderName, mon);
- tempDir = createFileOrFolder(homeFolderName, testFolderName, true);
- tempDirPath = tempDir.getAbsolutePath();
- }
- catch (Exception e)
- {
- fail("Problem encountered: " + e.getStackTrace().toString());
- }
- }
-
- public void tearDown() throws Exception {
- if (fss != null) {
- try {
- fss.delete(tempDir, mon);
- } catch (SystemMessageException msg) {
- // ensure that super.tearDown() can run
- System.err.println("Exception on tearDown: " + msg.getLocalizedMessage()); //$NON-NLS-1$
- }
- }
- super.tearDown();
- }
-
- public boolean isWindows() {
- return fss.getHost().getSystemType().isWindows();
- }
-
- 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 IRemoteFile copySourceFileOrFolder(String sourceFullName, String sourceName, String targetFolderFullName) throws Exception
- {
- IRemoteFile result = null;
- IRemoteFile originalTargetArchiveFile = fss.getRemoteFileObject(sourceFullName, mon);
- IRemoteFile targetFolder = fss.getRemoteFileObject(targetFolderFullName, mon);
- fss.copy(originalTargetArchiveFile, targetFolder, sourceName, mon);
- result = fss.getRemoteFileObject(getNewAbsoluteName(targetFolder, sourceName), mon);
- //Need to call resolveFilterString of the parent to make sure the newly copied child
- //is added to the DStore map. Otherwise, next time when query it, it will just created a
- //default filter string. And the dstore server cannot handler it correctly.
- fss.resolveFilterString(targetFolder, null, mon);
- return result;
- }
-
- public IRemoteFile createFileOrFolder(String targetFolderName, String fileOrFolderName, boolean isFolder) throws Exception
- {
- return createFileOrFolder(fss, targetFolderName, fileOrFolderName, isFolder);
- }
-
- public IRemoteFile createFileOrFolder(IFileServiceSubSystem inputFss, String targetFolderName, String fileOrFolderName, boolean isFolder) throws Exception
- {
- IRemoteFile result = null;
- //System.out.println("createFileOrFolder: targetFolderName is " + targetFolderName);
- IRemoteFile targetFolder = inputFss.getRemoteFileObject(targetFolderName, mon);
- String fileOrFolderAbsName = getNewAbsoluteName(targetFolder, fileOrFolderName);
- IRemoteFile newFileOrFolderPath = inputFss.getRemoteFileObject(fileOrFolderAbsName, mon);
- if (isFolder)
- {
- result = inputFss.createFolder(newFileOrFolderPath, mon);
- }
- else
- {
- result = inputFss.createFile(newFileOrFolderPath, mon);
- }
- //Need to call resolveFilterString of the parent to make sure the newly created child
- //is added to the DStore map. Otherwise, next time when query it, it will just created a
- //default filter string. And the dstore server cannot handler it correctly.
- inputFss.resolveFilterString(targetFolder, null, mon);
- return result;
- }
-
- public Object getChildFromFolder(IRemoteFile folderToCheck, String childName) throws Exception
- {
- return getChildFromFolder(fss, folderToCheck, childName);
- }
-
- public Object getChildFromFolder(IFileServiceSubSystem inputFss, IRemoteFile folderToCheck, String childName) throws Exception
- {
- //then check the result of copy
- Object[] children = null;
- Object foundChild = null;
- children = inputFss.resolveFilterString(folderToCheck, null, mon);
- for (int i=0; i<children.length; i++)
- {
- String thisName = ((IRemoteFile)children[i]).getName();
- if (thisName.equals(childName))
- {
- foundChild = children[i];
- break;
- }
- }
- return foundChild;
- }
-
- public void checkFolderContents(IRemoteFile folderToCheck, String[] names, int[] types) throws Exception
- {
- checkFolderContents(fss, folderToCheck, names, types);
- }
-
- public void checkFolderContents(IFileServiceSubSystem inputFss, IRemoteFile folderToCheck, String[] names, int[] types) throws Exception
- {
- //the folder returned by the create API did not get the right attributes.
- //We need to call getRemoteFileObject to get its attribute updated.
- //Otherwise, will get error "directory not readable"
- folderToCheck = inputFss.getRemoteFileObject(folderToCheck.getAbsolutePath(), mon);
- System.out.println("verifying the contents for folder: " + folderToCheck.getAbsolutePath());
- Object[] children = inputFss.resolveFilterString(folderToCheck, null, mon);
- //Make sure the children array includes the copied folder.
- HashMap childrenMap = new HashMap();
- //Add children name into the map
- for (int i=0; i<children.length; i++)
- {
- String thisName = ((IRemoteFile)children[i]).getName();
- childrenMap.put(thisName, children[i]);
- }
- //Check contents are in the array list
- for (int i=0; i<names.length; i++)
- {
- IRemoteFile found = (IRemoteFile)(childrenMap.get(names[i]));
- assertTrue("Could not find " + names[i], found != null);
- assertTrue(found.exists());
- if (types != null && types.length != 0)
- {
- //If input array of types, we also need to check if the type is correct.
- if (types[i] == TYPE_FILE)
- {
- assertTrue(found.isFile());
- }
- else if (types[i] == TYPE_FOLDER)
- {
- assertTrue(found.isDirectory());
- }
- }
- }
- }
-
- 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;
- }
-
- if ((parentFolderPath.length()==1) && (parentFolderPath.charAt(0)=='/') &&
- (parentFolderPath.charAt(0)==sep))
- newAbsName = sep + newName;
- else
- newAbsName = parentFolderPath + sep + newName;
- return newAbsName;
- }
-
- //----------------------------------------------------------------------
- // <copied code from org.eclipse.core.tests.internal.localstore/LocalStoreTest (Copyright IBM)>
- //----------------------------------------------------------------------
- protected IFileStore createDir(IFileStore store, boolean clear) throws CoreException {
- if (clear && store.fetchInfo().exists())
- store.delete(EFS.NONE, new NullProgressMonitor());
- store.mkdir(EFS.NONE, new NullProgressMonitor());
- IFileInfo info = store.fetchInfo();
- assertTrue("createDir.1", info.exists());
- assertTrue("createDir.1", info.isDirectory());
- return store;
- }
-
- //----------------------------------------------------------------------
- // <copied code from org.eclipse.core.tests.internal.localstore/LocalStoreTest (Copyright IBM)>
- //----------------------------------------------------------------------
- protected IFileStore createDir(String string, boolean clear) throws CoreException {
- return createDir(EFS.getFileSystem(EFS.SCHEME_FILE).getStore(new Path(string)), clear);
- }
-
- /**
- * Create a file with random content. If a resource exists in the same path,
- * the resource is deleted.
- * <copied code from org.eclipse.core.tests.internal.localstore/LocalStoreTest (Copyright IBM)>
- *
- * @param target the file to create
- * @param content content of the new file
- * @throws CoreException in case of failure
- */
- protected void createFile(IFileStore target, String content) throws CoreException {
- target.delete(EFS.NONE, null);
- InputStream input = new ByteArrayInputStream(content.getBytes());
- transferData(input, target.openOutputStream(EFS.NONE, null));
- IFileInfo info = target.fetchInfo();
- assertTrue(info.exists() && !info.isDirectory());
- }
-
- /**
- * <copied code from org.eclipse.core.tests.harness/CoreTest (Copyright IBM)>
- * Asserts that a stream closes successfully. Null streams
- * are ignored, but failure to close the stream is reported as
- * an assertion failure.
- * @param stream the input stream to close
- */
- protected void assertClose(InputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- fail("Failed close in assertClose");
- }
- }
-
- /**
- * <copied code from org.eclipse.core.tests.harness/CoreTest (Copyright IBM)>
- * Return an input stream with some the specified text to use
- * as contents for a file resource.
- * @param text the input text
- * @return the input stream of the input text
- */
- public InputStream getContents(String text) {
- return new ByteArrayInputStream(text.getBytes());
- }
-
- /**
- * <copied code from org.eclipse.core.tests.resources/ResourceTest.java (Copyright IBM) >
- *
- * Returns a boolean value indicating whether or not the contents
- * of the given streams are considered to be equal. Closes both input streams.
- * @param a input stream a
- * @param b input stream b
- * @return if both stream are consider to be equal
- */
- public boolean compareContent(InputStream a, InputStream b) {
- int c, d;
- if (a == null && b == null)
- return true;
- try {
- if (a == null || b == null)
- return false;
- while ((c = a.read()) == (d = b.read()) && (c != -1 && d != -1)) {
- //body not needed
- }
- return (c == -1 && d == -1);
- } catch (IOException e) {
- return false;
- } finally {
- assertClose(a);
- assertClose(b);
- }
- }
-
- /**
- * Copy the data from the input stream to the output stream.
- * Close both streams when finished.
- * <copied code from org.eclipse.core.tests.harness/CoreTest (Copyright IBM)>
- *
- * @param input input stream
- * @param output output stream
- */
- protected void transferData(InputStream input, OutputStream output) {
- try {
- try {
- int c = 0;
- while ((c = input.read()) != -1)
- output.write(c);
- } finally {
- input.close();
- output.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- assertTrue(e.toString(), false);
- }
- }
-
- /**
- * Return String with some random text to use
- * as contents for a file resource.
- * <copied code from org.eclipse.core.tests.harness/CoreTest (Copyright IBM)>
- *
- * @return the result random string
- */
- protected String getRandomString() {
- switch ((int) Math.round(Math.random() * 10)) {
- case 0 :
- return "este e' o meu conteudo (portuguese)";
- case 1 :
- return "ho ho ho";
- case 2 :
- return "I'll be back";
- case 3 :
- return "don't worry, be happy";
- case 4 :
- return "there is no imagination for more sentences";
- case 5 :
- return "customize yours";
- case 6 :
- return "foo";
- case 7 :
- return "bar";
- case 8 :
- return "foobar";
- case 9 :
- return "case 9";
- default :
- return "these are my contents";
- }
- }
-
- /**
- * Setup the file subsystem used for this testcase
- */
- protected void setupFileSubSystem()
- {
- IHost localHost = getLocalSystemConnection();
- if (isTestDisabled())
- return;
- ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(localHost, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IFileServiceSubSystem) {
- fss = (IFileServiceSubSystem)ss[i];
- fs = fss.getFileService();
- }
- }
- localFss = fss; //Used for creating test source data.
- assertNotNull(localFss);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceHelper.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceHelper.java
deleted file mode 100644
index c630e6ffb..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceHelper.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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:
- * Xuan Chen (IBM) - copied and adapted from org.eclipse.core.tests.harness/FileSystemHelper
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * Home for file system-related utility methods.
- */
-public class FileServiceHelper {
- /** counter for generating unique random file system locations */
- protected static int nextLocationCounter = 0;
- private static final long MASK = 0x00000000FFFFFFFFL;
-
- /*
- * Return the root directory for the temp dir.
- */
- public static IPath getTempDir() {
- String tempPath = System.getProperty("java.io.tmpdir");
- try {
- tempPath = new java.io.File(tempPath).getCanonicalPath();
- } catch (IOException e) {
- //ignore and use non-canonical path
- }
- return new Path(tempPath);
- }
-
- /**
- * Returns a unique location on the remote file system. It is guaranteed that no file currently
- * exists at that location. The returned location will be unique with respect
- * to all other locations generated by this method in the current session.
- * If the caller creates a folder or file at this location, they are responsible for
- * deleting it when finished.
- * @param fss The FileServiceSubSystem where we want to get this location
- * @param parentPath The path of the parent folder
- * @param baseName the name where the calculated extension will be appended to
- * @param mon Progress Monitor needed for necessary remote query
- * @return the generated name of this location
- */
- public static String getRandomLocation(IFileServiceSubSystem fss, String parentPath, String baseName, IProgressMonitor mon) {
- String resultName = computeRandomLocation(fss, baseName);
- try
- {
- IRemoteFile remoteFile = fss.getRemoteFileObject(parentPath + fss.getSeparator() + resultName, mon);
- boolean fileExist = (remoteFile != null) && remoteFile.exists();
- while (fileExist)
- {
- try
- {
- Thread.sleep(10);
- } catch (InterruptedException e) {
- // ignore
- }
- resultName = computeRandomLocation(fss, baseName);
- remoteFile = fss.getRemoteFileObject(parentPath + fss.getSeparator() + resultName, mon);
- fileExist = (remoteFile != null) && remoteFile.exists();
- }
- }
- catch (Exception e)
- {
- return null;
- }
- return resultName;
-
- }
-
- public static String computeRandomLocation(IFileServiceSubSystem fss, String path) {
- long segment = (((long) ++nextLocationCounter) << 32) | (System.currentTimeMillis() & MASK);
- return path +(Long.toString(segment));
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
deleted file mode 100644
index de0a6f956..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTest.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
- * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * Martin Oberhuber (Wind River) - [235360][ftp][ssh] Return proper "Root" IHostFile
- * Patrick Tassé (Ericsson) - [285226] Empty directory shown as an error message
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.File;
-import java.lang.reflect.Method;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-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.ISubSystem;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.clientserver.PathUtility;
-import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundException;
-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.RemoteFileException;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-import org.eclipse.rse.tests.subsystems.shells.ShellOutputListener;
-
-public class FileServiceTest extends RSEBaseConnectionTestCase {
-
- private String fPropertiesFileName;
- // For testing the test: verify methods on Local
- public static String fDefaultPropertiesFile = "localConnection.properties";
-
- private IFileServiceSubSystem fss;
- private IFileService fs;
- private IRemoteFile fHomeDirectory;
- private IRemoteFile remoteTempDir;
- private String tempDirPath;
- private IProgressMonitor mon = new NullProgressMonitor();
-
- /**
- * Constructor with specific test name.
- *
- * @param name test to execute
- */
- public FileServiceTest(String name) {
- this(name, fDefaultPropertiesFile);
- }
-
- /**
- * Constructor with connection type and specific test name.
- *
- * @param name test to execute
- * @param propertiesFileName file with connection properties to use
- */
- public FileServiceTest(String name, String propertiesFileName) {
- super(name);
- fPropertiesFileName = propertiesFileName;
- if (propertiesFileName != null) {
- int idx = propertiesFileName.indexOf("Connection.properties");
- String targetName = propertiesFileName.substring(0, idx);
- setTargetName(targetName);
- }
- }
-
- public static Test suite() {
- String baseName = FileServiceTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
-
- // // Add a test suite for each connection type
- String[] connTypes = { "local", "ssh", "ftpWindows", "ftpSsh", "linux", "windows", "unix" };
- //String[] connTypes = { "unix" };
- //String[] connTypes = { "local" };
- // String[] connTypes = { "ssh" };
-
- for (int i = 0; i < connTypes.length; i++) {
- String suiteName = connTypes[i] == null ? "EFS" : connTypes[i];
- String propFileName = connTypes[i] == null ? null : connTypes[i] + "Connection.properties";
- TestSuite subSuite = new TestSuite(baseName + "." + suiteName);
- Method[] m = FileServiceTest.class.getMethods();
- for (int j = 0; j < m.length; j++) {
- String testName = m[j].getName();
- if (testName.startsWith("test")) {
- subSuite.addTest(new FileServiceTest(testName, propFileName));
- }
- }
- suite.addTest(subSuite);
- }
- return suite;
- }
-
-
- public void setUp() throws Exception {
- super.setUp();
- IHost host = getHost(fPropertiesFileName);
- fss = (IFileServiceSubSystem) RemoteFileUtility.getFileSubSystem(host);
- fs = fss.getFileService();
- fss.checkIsConnected(getDefaultProgressMonitor());
- fHomeDirectory = fss.getRemoteFileObject(".", getDefaultProgressMonitor());
- remoteTempDir = fss.getRemoteFileObject(fHomeDirectory, "rsetest" + System.currentTimeMillis(), getDefaultProgressMonitor());
- fss.createFolder(remoteTempDir, getDefaultProgressMonitor());
- tempDirPath = remoteTempDir.getAbsolutePath();
- }
-
- public void tearDown() throws Exception {
- fss.delete(remoteTempDir, getDefaultProgressMonitor());
- super.tearDown();
- }
-
- public boolean isWindows() {
- return fss.getHost().getSystemType().isWindows();
- }
-
- public String getTestFileName() {
- //Return a filename for testing that exposes all characters valid on the file system
- if (!isWindows()) {
- //UNIX TODO: test embedded newlines
- String testName = "a !@#${a}\"\' fi\tle\b\\%^&*()?_ =[]~+-'`;:,.|<>"; //$NON-NLS-1$
- // Bug 235492: DStore is designed to treat '\' and '/' the same way, so do not
- // test this.
- if (fss.getSubSystemConfiguration().getServiceImplType().getName().equals("org.eclipse.rse.services.dstore.IDStoreService")) { //$NON-NLS-1$
- testName.replace('\\', ' ');
- }
- }
- //Fallback: Windows TODO: test unicode
- //Note: The trailing dot ('.') is really unfair on Windows because the file
- //system doesn't seem to ever store trailing dots
- //return "a !@#${a}'` file%^&()_ =[]~+-;,."; //$NON-NLS-1$
- return "a !@#${a}'` file%^&()_ =[]~+-;.,"; //$NON-NLS-1$
- }
-
- /**
- * Find the first IShellServiceSubSystem service associated with the host.
- *
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- public IShellService getRelatedShellService() {
- IHost host = fss.getHost();
- ISubSystem[] subSystems = host.getSubSystems();
- IShellService ssvc = null;
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- IService svc = subSystems[i].getSubSystemConfiguration().getService(host);
- if (svc != null) {
- ssvc = (IShellService) svc.getAdapter(IShellService.class);
- if (ssvc != null) {
- try {
- subSystems[i].checkIsConnected(getDefaultProgressMonitor());
- return ssvc;
- } catch (SystemMessageException e) {
- e.printStackTrace();
- }
- }
- }
- }
- return null;
- }
-
- public void testGetRootProperties() throws Exception {
- //-test-author-:MartinOberhuber
- if (isTestDisabled()) return;
- IHostFile[] roots = fs.getRoots(new NullProgressMonitor());
- assertNotNull(roots);
- assertTrue(roots.length > 0);
- for (int i = 0; i < roots.length; i++) {
- assertTrue(roots[i].isRoot());
- assertTrue(roots[i].exists());
- assertNull(roots[i].getParentPath());
- String rootName = roots[i].getName();
- assertNotNull(rootName);
- System.out.println(rootName);
- IHostFile newHf = fs.getFile(null, rootName, new NullProgressMonitor());
- assertTrue(newHf.isRoot());
- assertTrue(newHf.exists());
- assertEquals(newHf.getName(), rootName);
- newHf = fs.getFile("", rootName, new NullProgressMonitor());
- assertTrue(newHf.isRoot());
- assertTrue(newHf.exists());
- assertEquals(newHf.getName(), rootName);
- }
- }
-
- public void testCaseSensitive() {
- //-test-author-:MartinOberhuber
- if (isTestDisabled()) return;
-
- if (isWindows()) {
- assertFalse(fs.isCaseSensitive());
- assertFalse(fss.isCaseSensitive());
- assertFalse(fss.getSubSystemConfiguration().isCaseSensitive());
- } else {
- assertTrue(fs.isCaseSensitive());
- assertTrue(fss.isCaseSensitive());
- assertTrue(fss.getSubSystemConfiguration().isCaseSensitive());
- }
- }
-
- public void testCreateFile() throws SystemMessageException {
- //-test-author-:MartinOberhuber
- if (isTestDisabled()) return;
-
- String testName = getTestFileName();
- IHostFile hf = fs.createFile(tempDirPath, testName, mon);
- 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);
- if (fss.getHost().getSystemType().isLocal()) {
- File theFile = new File(remoteTempDir.getAbsolutePath(), testName);
- assertTrue(theFile.exists());
- assertTrue(modDate == theFile.lastModified());
- }
- }
-
- public void testCreateCaseSensitive() throws SystemMessageException {
- //-test-author-:MartinOberhuber
- if (isTestDisabled()) return;
-
- String testName = getTestFileName();
- String testName2 = testName.toUpperCase();
- IHostFile hf = fs.createFile(tempDirPath, testName, mon);
- if (fss.isCaseSensitive()) {
- //UNIX: uppercase version must be distinct
- IHostFile hf2 = fs.getFile(tempDirPath, testName2, mon);
- assertFalse(hf2.exists());
- hf2 = fs.createFolder(tempDirPath, testName2, mon);
- assertTrue(hf2.exists());
- assertTrue(hf2.isDirectory());
- assertFalse(hf.equals(hf2));
- } else {
- //Windows: uppercase version must be the same
- IHostFile hf2 = fs.getFile(tempDirPath, testName2, mon);
- assertTrue(hf2.exists());
- try {
- hf2 = fs.createFolder(tempDirPath, testName2, mon);
- } 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));
- ////While the file handles were created with different names,
- ////resolving them should return the same name (the one that's on disk)
- ////But Local and java.io.File do not work that way
- //assertEquals(hf.getName(), hf2.getName());
- assertEquals(hf, hf2); //bug 168591, bug 235489: no equals() for IHostFile
- }
- }
-
- public String[] runRemoteCommand(IShellService shellService, String workingDirectory, String cmd) throws SystemMessageException, InterruptedException {
- IHostShell hostShell = null;
- hostShell = shellService.runCommand(workingDirectory, cmd, null, mon);
- ShellOutputListener outputListener = new ShellOutputListener();
- hostShell.addOutputListener(outputListener);
- hostShell.writeToShell("exit");
- assertNotNull(hostShell);
- assertNotNull(hostShell.getStandardOutputReader());
- while (hostShell.isActive()) {
- Thread.sleep(1000);
- }
- Object[] allOutput = outputListener.getAllOutput();
- if (allOutput!=null) {
- String[] sOutput = new String[allOutput.length];
- for (int i = 0; i < allOutput.length; i++) {
- if (allOutput[i] instanceof IHostOutput) {
- sOutput[i] = ((IHostOutput) allOutput[i]).getString();
- } else {
- sOutput[i] = allOutput[i].toString();
- }
- }
- return sOutput;
- }
- return null;
- }
-
- /**
- * Create a symbolic link in the context of tempDirPath.
- *
- * @param source source file to link from
- * @param target target file to link to
- * @return <code>true</code> if link was successfully created.
- */
- public boolean mkSymLink(String source, String target) {
- if (!fss.getHost().getSystemType().isWindows()) {
- IShellService ss = getRelatedShellService();
- if (ss != null) {
- String[] allOutput;
- try {
- String src = PathUtility.enQuoteUnix(source);
- String tgt = PathUtility.enQuoteUnix(target);
- String cmd = "ln -s " + src + " " + tgt;
- allOutput = runRemoteCommand(ss, tempDirPath, cmd);
- IHostFile hf = fs.getFile(tempDirPath, target, mon);
- if (hf.exists()) {
- return true;
- }
- allOutput = new String[] { "Failed to symlink: " + cmd };
- } catch (Exception e) {
- allOutput = new String[] { "Exception thrown: " + e };
- }
- System.out.println("WARNING: Could not create symlink");
- if (allOutput != null) {
- for (int i = 0; i < allOutput.length; i++) {
- System.out.println(allOutput[i]);
- }
- }
- }
- }
- return false;
- }
-
- public void testListEmptyFolder() throws SystemMessageException {
- // -test-author-:PatrickTassé
- if (isTestDisabled()) return;
-
- String testName = "empty";
- IHostFile hf = fs.createFolder(tempDirPath, testName, mon);
- assertTrue(hf.exists());
- assertTrue(hf.isDirectory());
- assertTrue(hf.canRead());
- assertTrue(hf.canWrite());
- assertEquals(testName, hf.getName());
- assertEquals(tempDirPath, hf.getParentPath());
- long modDate = hf.getModifiedDate();
- assertTrue(modDate > 0);
- if (fss.getHost().getSystemType().isLocal()) {
- File theFile = new File(remoteTempDir.getAbsolutePath(), testName);
- assertTrue(theFile.exists());
- assertTrue(modDate == theFile.lastModified());
- }
- IHostFile[] hfa = fs.list(hf.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
- assertEquals(0, hfa.length);
- // check for symlink-to-empty-folder case
- if (mkSymLink(testName, "lto" + testName)) {
- IHostFile hf2 = fs.getFile(tempDirPath, "lto" + testName, mon);
- assertTrue(hf2.isDirectory());
- hfa = fs.list(hf2.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
- assertEquals(0, hfa.length);
- }
- }
-
- public void testListNonExistentFolder() throws SystemMessageException, InterruptedException {
- // -test-author-:PatrickTassé
- if (isTestDisabled()) return;
-
- String testPath = tempDirPath + "/non/existent";
- try {
- IHostFile[] hfa = fs.list(testPath, "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
- // Bug 285942: LocalFileService and DStoreFileService return empty array today
- // Assert something impossible since an exception is expected
- assertEquals("Exception expected on list nonexistent", -1, hfa.length);
- } catch (SystemMessageException e) {
- assertTrue(e instanceof SystemElementNotFoundException);
- }
- // check for symlink-to-non-existent case
- if (mkSymLink("non/existent", "ltononex")) {
- IHostFile hf2 = fs.getFile(tempDirPath, "ltononex", mon);
- try {
- IHostFile[] hfa = fs.list(hf2.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
- assertEquals("Exception expected on list broken symlink", -1, hfa.length);
- } catch (SystemMessageException e) {
- assertTrue(e instanceof SystemElementNotFoundException);
- }
- }
- }
-
- public void testListNotAFolder() throws SystemMessageException {
- // -test-author-:PatrickTassé
- if (isTestDisabled()) return;
-
- String testName = getTestFileName();
- IHostFile hf = fs.createFile(tempDirPath, testName, mon);
- 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);
- if (fss.getHost().getSystemType().isLocal()) {
- File theFile = new File(remoteTempDir.getAbsolutePath(), testName);
- assertTrue(theFile.exists());
- assertTrue(modDate == theFile.lastModified());
- }
- try {
- IHostFile[] hfa = fs.list(hf.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
- // Bug 285942: LocalFileService and DStoreFileService return empty array today
- // Assert something impossible since an exception is expected
- assertEquals("Exception expected on list not-a-folder", -1, hfa.length);
- } catch (SystemMessageException e) {
- assertTrue(e instanceof RemoteFileException);
- }
- // check for symlink-to-not-a-folder case
- if (mkSymLink(testName, "lto" + testName)) {
- try {
- IHostFile hf2 = fs.getFile(tempDirPath, "lto" + testName, mon);
- assertTrue(hf2.isFile());
- IHostFile[] hfa = fs.list(hf2.getAbsolutePath(), "*", IFileService.FILE_TYPE_FILES_AND_FOLDERS, mon);
- // Assert something impossible since an exception is expected
- assertEquals("Exception expected on list symlink-to-folder", -1, hfa.length);
- } catch (SystemMessageException e) {
- assertTrue(e instanceof RemoteFileException);
- }
- }
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTgzArchiveTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTgzArchiveTest.java
deleted file mode 100644
index bb9497246..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileServiceTgzArchiveTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Johnson Ma (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-/**
- * this class is used to test tgz and .tar.gz archive function
- */
-public class FileServiceTgzArchiveTest extends FileServiceArchiveBaseTest {
-
- public FileServiceTgzArchiveTest(String name) {
- super(name);
- //-test-author-:JohnsonMa:9
- tarSourceFileName1 = "source.tar.gz";
- tarSourceFileName2 = "mynewtar.tgz";
- tarSourceForOpenTest = "tarSourceForOpen.TAR.gz";
- testName = "dummy.tGz";
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileSubsystemConsistencyTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileSubsystemConsistencyTestCase.java
deleted file mode 100644
index 1592c43ad..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/FileSubsystemConsistencyTestCase.java
+++ /dev/null
@@ -1,501 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006, 2008 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 McKnight (IBM) - [207095] test case to compare same op between subsystems
- * David McKnight (IBM) - [162195] new APIs for upload multi and download multi
- * David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
- * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- * Martin Oberhuber (Wind River) - [240729] More flexible disabling of testcases
- * Martin Oberhuber (Wind River) - [240704] Protect against illegal API use of getRemoteFileObject() with relative path as name
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-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.model.SystemStartHere;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-/**
- * Test cases for comparing various file subsystem operations
- */
-public class FileSubsystemConsistencyTestCase extends RSEBaseConnectionTestCase {
-
- private List _subSystems;
- private List _connections;
- private List _samplePaths;
-
- private String LOCALTEMPDIR = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- if (_subSystems != null) {
- for (int i = 0; i < _subSystems.size(); i++) {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)_subSystems.get(i);
- if (ss != null && ss.isConnected()) {
- ss.disconnect(true);
- }
-
- }
- _subSystems.clear();
- }
-
- if (_connections != null)
- {
- for (int j = 0; j < _connections.size(); j++) {
- IHost host = (IHost)_connections.get(j);
- if (host != null) {
- getConnectionManager().removeConnection(host.getSystemProfileName(), host.getName());
- }
- }
- _connections.clear();
- }
-
- _subSystems = null;
- _connections = null;
-
- super.tearDown();
- }
-
-
-
- protected void setupConnections() {
- if (_connections == null)
- {
- _connections = new ArrayList();
- _subSystems = new ArrayList();
-
- //TODO Support Windows style connections
- //String[] connTypes = { "local", "ssh", "ftpWindows", "ftp", "linux", "windows" };
- String[] connTypes = { "ssh", "ftp", "linux" };
- for (int i = 0; i < connTypes.length; i++) {
- setTargetName(connTypes[i]);
- if (!isTestDisabled()) {
- addSystem(getHost(connTypes[i] + "Connection.properties"));
- }
- }
- setTargetName(null);
-
- _samplePaths = new ArrayList();
- _samplePaths.add("/usr");
- _samplePaths.add("/usr/lib");
- _samplePaths.add("/usr/bin");
- _samplePaths.add("/bin");
- _samplePaths.add("/etc");
- _samplePaths.add("/home");
- _samplePaths.add("/sbin");
-
- }
- }
-
- private void addSystem(IHost host) {
- IRemoteFileSubSystem fss = null;
- ISystemRegistry sr = SystemStartHere.getSystemRegistry();
- ISubSystem[] ss = sr.getServiceSubSystems(host, IFileService.class);
- for (int i=0; i<ss.length; i++) {
- if (ss[i] instanceof IRemoteFileSubSystem) {
- fss = (IRemoteFileSubSystem)ss[i];
- }
- }
- _subSystems.add(fss);
- _connections.add(host);
- }
-
- /**
- * Test the implicit connect of each connection when calling getRemoteFileObject().
- */
- public void testImplicitConnectViaFileSubSystem() {
- //-test-author-:DaveMcKnight
- if (isTestDisabled())
- return;
- setupConnections();
-
- String testPath = "/usr/lib";
-
- for (int i = 0; i < _subSystems.size(); i++) {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)_subSystems.get(i);
-
- // ensure that the system is NOT connected
- if (ss.isConnected()) {
- try {
- ss.disconnect(true);
- }
- catch (Exception e) {
- // disconnect failed
- }
- }
-
-
-
- String systemType = ss.getConfigurationId();
-
- Exception exception = null;
- String cause = null;
- IRemoteFile remoteFile = null;
-
- try {
- remoteFile = ss.getRemoteFileObject(testPath, new NullProgressMonitor());
- }
- catch (Exception e){
- exception = e;
- cause = e.getLocalizedMessage();
- }
-
- assertNull(systemType + ":Exception getting remote file! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertTrue(ss.isConnected());
- assertNotNull(systemType + ":Unexpected return value for getRemoteFile(). Remote file is null!", remoteFile);
- }
- }
- public void testSingleFileQuery() {
- //-test-author-:DaveMcKnight
- if (isTestDisabled())
- return;
- setupConnections();
-
-
- String[] testPaths = (String[])_samplePaths.toArray(new String[_samplePaths.size()]);
-
- for (int i = 0; i < _subSystems.size(); i++) {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)_subSystems.get(i);
-
- // ensure that the system is connected
- if (!ss.isConnected()) {
- try {
- ss.connect(new NullProgressMonitor(), false);
- }
- catch (Exception e) {
- // connect failed
- }
- }
-
- String systemType = ss.getConfigurationId();
-
- Exception exception = null;
- String cause = null;
- IRemoteFile[] remoteFiles = new IRemoteFile[testPaths.length];
-
- long t1 = System.currentTimeMillis();
- for (int f = 0; f < testPaths.length; f++)
- {
- try
- {
- remoteFiles[f] = ss.getRemoteFileObject(testPaths[f], new NullProgressMonitor());
- }
- catch (Exception e){
- exception = e;
- cause = e.getLocalizedMessage();
- }
- }
-
- long t2 = System.currentTimeMillis();
-
- System.out.println(systemType + ": get files time = "+ (t2 - t1) + " milliseconds");
-
- // query folders
- IRemoteFile[] results = null;
- List consolidatedResults = new ArrayList();
- long t3 = System.currentTimeMillis();
- for (int q = 0; q < remoteFiles.length; q++)
- {
- try
- {
- IRemoteFile[] children = ss.list(remoteFiles[q], IFileService.FILE_TYPE_FILES_AND_FOLDERS, new NullProgressMonitor());
- for (int c = 0; c < children.length; c++)
- {
- consolidatedResults.add(children[c]);
- }
- }
- catch (Exception e){
- exception = e;
- cause = e.getLocalizedMessage();
- }
- }
- results = (IRemoteFile[])consolidatedResults.toArray(new IRemoteFile[consolidatedResults.size()]);
- long t4 = System.currentTimeMillis();
-
- System.out.println(systemType + ": query time = "+ (t4 - t3) + " milliseconds");
-
- assertNull(systemType + ":Exception getting remote files! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertTrue(ss.isConnected());
-
- System.out.println(systemType + ": results size="+results.length);
- /*
- for (int r = 0; r < remoteFiles.length; r++)
- {
- IRemoteFile rfile = remoteFiles[r];
- boolean exists = rfile.exists();
- if (!exists){
- System.out.println(rfile.getAbsolutePath() + " doesn't exist!");
- }
- assertTrue(exists);
- }
- */
-
- }
- }
-
- /**
- * Test the multi file query
- */
- public void testMultiFileQuery() {
- //-test-author-:DaveMcKnight
- if (isTestDisabled())
- return;
- setupConnections();
-
-
-
- String[] testPaths = (String[])_samplePaths.toArray(new String[_samplePaths.size()]);
-
- for (int i = 0; i < _subSystems.size(); i++) {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)_subSystems.get(i);
-
- // ensure that the system is connected
- if (!ss.isConnected()) {
- try {
- ss.connect(new NullProgressMonitor(), false);
- }
- catch (Exception e) {
- // connect failed
- }
- }
-
- String systemType = ss.getConfigurationId();
-
- Exception exception = null;
- String cause = null;
- IRemoteFile[] remoteFiles = null;
-
- // get folders to query
- long t1 = System.currentTimeMillis();
- try
- {
- remoteFiles = ss.getRemoteFileObjects(testPaths, new NullProgressMonitor());
- }
- catch (Exception e){
- exception = e;
- e.printStackTrace();
- cause = e.getLocalizedMessage();
- }
-
- long t2 = System.currentTimeMillis();
-
- System.out.println(systemType + ": get files time = "+ (t2 - t1) + " milliseconds");
-
- // query folders
- IRemoteFile[] results = null;
- long t3 = System.currentTimeMillis();
- try
- {
- results = ss.listMultiple(remoteFiles, IFileService.FILE_TYPE_FILES_AND_FOLDERS, new NullProgressMonitor());
- }
- catch (Exception e){
- exception = e;
- e.printStackTrace();
- cause = e.getLocalizedMessage();
- }
- long t4 = System.currentTimeMillis();
-
- System.out.println(systemType + ": query time = "+ (t4 - t3) + " milliseconds");
-
- assertNull(systemType + ":Exception getting remote files! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertTrue(ss.isConnected());
-
- System.out.println(systemType + ":results size="+results.length);
- }
- }
-
- /**
- * Test the single file download
- */
- public void testSingleFileDownload() {
- //-test-author-:DaveMcKnight
- if (isTestDisabled())
- return;
- setupConnections();
- internalFileDownload(false);
- }
-
- /**
- * Test the multi file download
- */
- public void testMultiFileDownload() {
- //-test-author-:DaveMcKnight
- if (isTestDisabled())
- return;
- setupConnections();
- internalFileDownload(true);
- }
-
- protected void internalFileDownload(boolean multi)
- {
- String remoteParentDir = "/usr/include";
- File tempDir = new File(LOCALTEMPDIR);
- if (!tempDir.exists())
- {
- tempDir.mkdirs();
- }
-
- for (int i = 0; i < _subSystems.size(); i++) {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem)_subSystems.get(i);
-
- // ensure that the system is connected
- if (!ss.isConnected()) {
- try {
- ss.connect(new NullProgressMonitor(), false);
- }
- catch (Exception e) {
- // connect failed
- }
- }
-
- String systemType = ss.getConfigurationId();
-
- File subTempDir = new File(tempDir, systemType + (multi ? "_multi" : "_single"));
- if (subTempDir.exists())
- {
- // delete old contents
- try
- {
- String[] children = subTempDir.list();
- for (int c = 0; c < children.length; c++)
- {
- new File(children[c]).delete();
- }
- }
- catch (Exception e)
- {
- /*ignore*/
- }
- }
- else
- {
- subTempDir.mkdirs();
- }
-
- Exception exception = null;
- String cause = null;
- //IRemoteFile[] remoteFiles = null;
-
- try
- {
- IProgressMonitor monitor = new NullProgressMonitor();
- IRemoteFile includeDir = ss.getRemoteFileObject(remoteParentDir, monitor);
-
- // get all the files
- IRemoteFile[] files = ss.list(includeDir, IFileService.FILE_TYPE_FILES, monitor);
-
- System.out.println(systemType + ": downloading "+files.length+ " files");
-
-
- // determine local locations for each
- String[] destinations = new String[files.length];
- String[] encodings = new String[files.length];
- long[] fileSizes = new long[files.length];
-
-
-
- for (int d = 0; d < files.length; d++)
- {
- IRemoteFile file = files[d];
- destinations[d] = subTempDir.getAbsolutePath() + File.separatorChar + file.getName();
- encodings[d] = file.getEncoding();
- fileSizes[d] = file.getLength();
- }
-
- long t1 = System.currentTimeMillis();
- if (multi) // multi file download
- {
- System.out.println(systemType + ":Starting multi-file Download");
-
- // transfer the files
- ss.downloadMultiple(files, destinations, encodings, monitor);
- }
- else // single file download
- {
- System.out.println(systemType + ":Starting single file Download");
-
- for (int s = 0; s < files.length; s++)
- {
- // transfer the files
- ss.download(files[s], destinations[s], encodings[s], monitor);
- }
- }
- long t2 = System.currentTimeMillis();
- System.out.println(systemType + ": download time = "+ (t2 - t1) + " milliseconds");
-
-
- assertNull(systemType + ":Exception getting remote files! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertTrue(ss.isConnected());
-
- // examine results
- for (int r = 0; r < destinations.length; r++)
- {
- // check results and compare their sizes
- long expectedSize = fileSizes[r];
-
- File destination = new File(destinations[r]);
- long actualSize = destination.length();
-
- boolean goodDownload = expectedSize == actualSize;
-
- if (!goodDownload)
- {
- System.out.println("bad download of "+ destination.getAbsolutePath());
- System.out.println("expected size:"+expectedSize);
- System.out.println("actual size:"+actualSize);
- }
- assertTrue(goodDownload);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- }
- }
-
- public void testGetRemoteFileRelativePath() throws Exception {
- // for bug 240704
- // -test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- setupConnections();
- for (int i = 0; i < _subSystems.size(); i++) {
- IRemoteFileSubSystem ss = (IRemoteFileSubSystem) _subSystems.get(i);
- ss.checkIsConnected(getDefaultProgressMonitor());
- IRemoteFile homeDir = ss.getRemoteFileObject(".", getDefaultProgressMonitor());
- assertTrue(homeDir.exists());
- assertTrue(homeDir.isDirectory());
- String sep = homeDir.getSeparator();
- String relativePath = "rsetest" + System.currentTimeMillis() + sep + "foo" + sep + "bar";
- try {
- IRemoteFile subDir = ss.getRemoteFileObject(homeDir, relativePath, getDefaultProgressMonitor());
- assertTrue(subDir.isDescendantOf(homeDir));
- assertEquals("bar", subDir.getName());
- assertFalse(subDir.exists());
- assertFalse(subDir.isDirectory());
- } catch (IllegalArgumentException e) {
- // Expected here: IllegalArgumentException is OK
- }
- }
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileStoreTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileStoreTest.java
deleted file mode 100644
index 2d1ea3abf..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileStoreTest.java
+++ /dev/null
@@ -1,655 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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) - [240729] More flexible disabling of testcases
- *******************************************************************************/
-
-package org.eclipse.rse.tests.subsystems.files;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Method;
-import java.net.URI;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-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.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.efs.RSEFileSystem;
-import org.eclipse.rse.services.shells.IShellService;
-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.SimpleCommandOperation;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-
-/**
- * Testcase for RSEFileStore
- */
-public class RSEFileStoreTest extends FileServiceBaseTest {
-
- private String fPropertiesFileName;
- //For testing the test: verify methods on Eclipse Local Filesystem
- public static String fDefaultPropertiesFile = null;
- //public static String fDefaultPropertiesFile = "sshConnection.properties"; //$NON-NLS-1$
-
- private IRemoteFile fHomeDirectory;
- private String fTestStorePath;
- private IFileStore fTestStore;
- private InputStream fIS;
- private OutputStream fOS;
-
- /**
- * Constructor with specific test name.
- *
- * @param name test to execute
- */
- public RSEFileStoreTest(String name) {
- this(name, fDefaultPropertiesFile);
- }
-
- /**
- * Constructor with connection type and specific test name.
- *
- * @param name test to execute
- * @param propertiesFileName file with connection properties to use
- */
- public RSEFileStoreTest(String name, String propertiesFileName) {
- super(name);
- fPropertiesFileName = propertiesFileName;
- if (propertiesFileName != null) {
- int idx = propertiesFileName.indexOf("Connection.properties");
- String targetName = propertiesFileName.substring(0, idx);
- setTargetName(targetName);
- }
- }
-
- public static Test suite() {
- String baseName = RSEFileStoreTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
-
- //// Add a test suite for each connection type
- //String[] connTypes = { null, "local", "ssh", "ftp", "linux", "windows" };
- String[] connTypes = { null, "local" };
- //String[] connTypes = { "ssh" };
-
- for (int i = 0; i < connTypes.length; i++) {
- String suiteName = connTypes[i] == null ? "EFS" : connTypes[i];
- String propFileName = connTypes[i] == null ? null : connTypes[i] + "Connection.properties";
- TestSuite subSuite = new TestSuite(baseName + "." + suiteName);
- Method[] m = RSEFileStoreTest.class.getMethods();
- for (int j = 0; j < m.length; j++) {
- String testName = m[j].getName();
- if (testName.startsWith("test")) {
- subSuite.addTest(new RSEFileStoreTest(testName, propFileName));
- }
- }
- suite.addTest(subSuite);
- }
- return suite;
- }
-
-
- protected IShellServiceSubSystem getShellServiceSubSystem() {
- if (fPropertiesFileName == null) {
- return null;
- }
- IHost host = getHost(fPropertiesFileName);
- ISubSystem[] ss = RSECorePlugin.getTheSystemRegistry().getServiceSubSystems(host, IShellService.class);
- for (int i = 0; i < ss.length; i++) {
- if (ss[i] instanceof ShellServiceSubSystem) {
- return (ShellServiceSubSystem) ss[i];
- }
- }
- return null;
- }
-
- public void setUp() throws Exception {
- super.setUp();
- if (fPropertiesFileName == null) {
- //For testing the test: Use Eclipse EFS.getLocalFileSystem()
- String homePath = System.getProperty("user.home");
- IPath testPath = new Path(homePath + "/rseTest" + System.currentTimeMillis());
- fTestStorePath = testPath.toOSString();
- fTestStore = EFS.getLocalFileSystem().getStore(testPath);
- fTestStore.mkdir(EFS.NONE, getDefaultProgressMonitor());
- } else {
- //RSE method
- IHost host = getHost(fPropertiesFileName);
- IRemoteFileSubSystem fss = RemoteFileUtility.getFileSubSystem(host);
- fss.checkIsConnected(getDefaultProgressMonitor());
- fHomeDirectory = fss.getRemoteFileObject(".", getDefaultProgressMonitor());
- IPath testPath = new Path(fHomeDirectory.getAbsolutePath() + "/rseTest" + System.currentTimeMillis());
- fTestStorePath = testPath.toString();
- URI testURI = RSEFileSystem.getURIFor(host.getHostName(), fTestStorePath);
- fTestStore = RSEFileSystem.getInstance().getStore(testURI);
- fTestStore.mkdir(EFS.NONE, getDefaultProgressMonitor());
- }
- }
-
- public void tearDown() throws Exception {
- if (fIS != null) {
- try {
- fIS.close();
- } catch (IOException e) {
- System.err.println("Exception in tearDown.closeInputStream:");
- e.printStackTrace();
- }
- }
- if (fOS != null) {
- try {
- fOS.close();
- } catch (IOException e) {
- System.err.println("Exception in tearDown.closeOutputStream:");
- e.printStackTrace();
- }
- }
- //Try..catch to allow super.tearDown() to run
- try {
- fTestStore.delete(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.err.println("Exception in tearDown.deleteTestStore:");
- ce.printStackTrace();
- }
- super.tearDown();
- }
-
- protected IFileStore createFile(String name) throws Exception {
- IFileStore store = fTestStore.getChild(name);
- fOS = store.openOutputStream(EFS.NONE, getDefaultProgressMonitor());
- fOS.write(name.getBytes());
- fOS.flush();
- fOS.close();
- fOS = null;
- return store;
- }
-
- public void testRecursiveGetParent() {
- //-test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- IFileStore store = fTestStore;
- String homePath = store.toURI().getPath();
- assertTrue("exists: " + store, store.fetchInfo().exists());
- IFileStore newStore = store.getParent();
- while (newStore != null && newStore.isParentOf(store)) {
- assertTrue("exists: " + newStore, newStore.fetchInfo().exists());
- store = newStore;
- }
- String newPath = store.toURI().getPath();
- assertTrue("newPath not empty: " + newPath, newPath.length() > 0);
- assertTrue("newPath < homePath " + homePath, newPath.length() < homePath.length());
- }
-
- public void testAppendOutputStream() throws Exception {
- //-test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- IFileStore f = createFile("foo");
- fOS = f.openOutputStream(EFS.APPEND, getDefaultProgressMonitor());
- fOS.write("bar".getBytes());
- fOS.flush();
- fOS.close();
- fOS = null;
- fIS = f.openInputStream(EFS.NONE, getDefaultProgressMonitor());
- byte[] b = "foobar".getBytes();
- for (int i = 0; i < b.length; i++) {
- assertTrue("Reading byte " + i, b[i] == fIS.read());
- }
- assertTrue("EOF", fIS.read() == -1);
- fIS.close();
- fIS = null;
- }
-
- public void testPutInfo() throws Exception {
- //-test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- IFileInfo testInfo = fTestStore.fetchInfo();
- assertTrue("1.1", testInfo.exists());
- assertTrue("1.2", testInfo.isDirectory());
- // if (fPropertiesFileName != null) {
- // // bug 249316: fails on EFS localstore linux nfs
- // assertTrue("1.3", testInfo.getLength() == 0);
- // }
- long parentModified = testInfo.getLastModified();
-
- IFileStore f = createFile("testReadOnly.txt");
- IFileInfo info = f.fetchInfo();
- assertFalse("2.1", info.isDirectory());
- assertFalse("2.2", info.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
- assertTrue("2.3", info.getLastModified() >= parentModified);
-
- info.setLastModified(parentModified - 120000); // 2 minutes earlier
- f.putInfo(info, EFS.SET_LAST_MODIFIED, getDefaultProgressMonitor());
- info = f.fetchInfo();
- assertTrue("2.4", info.getLastModified() < parentModified);
-
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true);
- f.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- info = f.fetchInfo();
- assertTrue("2.5", info.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
-
- //Modifying modtime of read-only file: expected to fail
- info.setLastModified(parentModified + 120000); // 2 minutes later
- assertTrue("2.6.1", info.getLastModified() > parentModified);
- try {
- f.putInfo(info, EFS.SET_LAST_MODIFIED, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- //TODO: Not specified by EFS whether putInfo modtime of a read-only file should throw an exception
- //EFS.getLocalFileSystem() does not throw an exception, but also doesn't change the modtime
- System.out.println("OK: Exception on putInfo to read-only: " + ce.getLocalizedMessage());
- }
- info = f.fetchInfo();
- //SSH is capable of modifying modtime of read-only files
- //assertTrue("2.6.2", info.getLastModified() <= parentModified); //not actually changed
- }
-
- public void testDeleteSpecialCases() throws Exception {
- //-test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- String testFileName = "noPerm.txt"; //$NON-NLS-1$
- boolean exceptionThrown = false;
-
- //delete file without read permissions on parent
- IFileStore store = createFile(testFileName);
- IFileInfo info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true);
- store.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- info = fTestStore.fetchInfo();
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true);
- info.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, false);
- fTestStore.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- try {
- store.delete(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- exceptionThrown = true;
- System.out.println("Good! " + ce);
- assertTrue("1.1.1", ce.getStatus().getCode() == EFS.ERROR_DELETE);
- }
- if (fPropertiesFileName != null || File.separatorChar != '\\') {
- // On Windows, no exception is thrown (read-only stuff can be deleted)
- if (fHomeDirectory == null || fHomeDirectory.getSeparatorChar() != '\\') {
- assertTrue("1.1", exceptionThrown);
- IFileInfo info2 = store.fetchInfo();
- assertTrue(info2.exists());
- }
- }
-
- // restore deletable
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, false);
- info.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, true);
- fTestStore.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- store.delete(EFS.NONE, getDefaultProgressMonitor());
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.2", !info.exists());
-
- if (fHomeDirectory != null && fHomeDirectory.getSeparatorChar() == '/' && fHomeDirectory.getParentRemoteFileSubSystem().isCaseSensitive()) {
- //IRemoteFileSubSystem rfss = fHomeDirectory.getParentRemoteFileSubSystem();
- IRemoteCmdSubSystem rcmd = getShellServiceSubSystem();
- //SimpleCommandOperation op = new SimpleCommandOperation(rcmd, fHomeDirectory, false);
- SimpleCommandOperation op = new SimpleCommandOperation(rcmd, fHomeDirectory, true);
- op.runCommand("ln -s notExisting2.txt \"" + fTestStorePath + "/" + testFileName + "\"", true);
- while (op.isActive()) {
- Thread.sleep(200);
- }
- //delete symbolic link pointing to nowhere
- store.delete(EFS.NONE, getDefaultProgressMonitor());
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.3", !info.exists());
-
- SimpleCommandOperation op2 = new SimpleCommandOperation(rcmd, fHomeDirectory, true);
- op2.runCommand("ln -s . \"" + fTestStorePath + "/" + testFileName + "\"", true);
- while (op2.isActive()) {
- Thread.sleep(200);
- }
- // delete symbolic link pointing to current folder
- store.delete(EFS.NONE, getDefaultProgressMonitor());
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.4", !info.exists());
-
- //Delete without even read permission on parent folder
- store = createFile(testFileName);
- SimpleCommandOperation op3 = new SimpleCommandOperation(rcmd, fHomeDirectory, true);
- op3.runCommand("chmod 000 \"" + fTestStorePath + "\"", true);
- while (op3.isActive()) {
- Thread.sleep(200);
- }
- exceptionThrown = false;
- try {
- store.delete(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- exceptionThrown = true;
- System.out.println("Good! " + ce);
- assertTrue("1.5.1", ce.getStatus().getCode() == EFS.ERROR_DELETE);
- }
- assertTrue("1.5", exceptionThrown);
-
- exceptionThrown = false;
- try {
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- exceptionThrown = true;
- System.out.println("Good! " + ce);
- assertTrue("1.6.1", ce.getStatus().getCode() == EFS.ERROR_READ);
- }
- assertTrue("1.6", exceptionThrown);
- SimpleCommandOperation op4 = new SimpleCommandOperation(rcmd, fHomeDirectory, true);
- op4.runCommand("chmod 777 \"" + fTestStorePath + "\"", true);
- while (op3.isActive()) {
- Thread.sleep(200);
- }
- //Experience shows that we need to wait a little longer until the filesystem calms down
- Thread.sleep(500);
- info = store.fetchInfo();
- assertTrue(info.exists());
- }
- }
-
- public void testModifyNonExisting() throws Exception {
- // -test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- IFileStore store = fTestStore.getChild("nonExisting.txt");
- IFileInfo info;
- boolean exceptionThrown = false;
-
- // fetchInfo on non-Existing
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.1", !info.exists());
-
- // delete non-Existing
- store.delete(EFS.NONE, getDefaultProgressMonitor());
- // TODO IFileStore.delete() does not specify whether deleting a
- // non-existing file should throw an Exception.
- // EFS.getLocalFileSystem() does not throw the exception.
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.2", !info.exists());
-
- // putInfo on non-Existing
- exceptionThrown = false;
- try {
- info = new FileInfo();
- store.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! putInfo attrib non-existing: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- assertTrue("1.3.1", ce.getStatus().getCode() == EFS.ERROR_NOT_EXISTS);
- }
- assertTrue("1.3", exceptionThrown);
-
- // putInfo on non-Existing
- exceptionThrown = false;
- try {
- info = new FileInfo();
- store.putInfo(info, EFS.SET_LAST_MODIFIED, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! putInfo lastMod non-existing: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- assertTrue("1.4.1", ce.getStatus().getCode() == EFS.ERROR_NOT_EXISTS);
- }
- assertTrue("1.4", exceptionThrown);
-
- // fetchInfo on non-Existing
- exceptionThrown = false;
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.5", !info.exists());
-
- // openInputStream on non-Existing
- exceptionThrown = false;
- try {
- fIS = store.openInputStream(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! openInputStream non-existing: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- //FIXME EFS.getLocalFileSystem() uses EFS.ERROR_READ but should ERROR_NOT_EXISTS
- int code = ce.getStatus().getCode();
- assertTrue("1.6.1", code == EFS.ERROR_NOT_EXISTS || code == EFS.ERROR_READ);
- }
- assertTrue("1.6", exceptionThrown);
-
- // fetchInfo on non-Existing
- exceptionThrown = false;
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.7", !info.exists());
-
- // openOutputStream append on non-Existing
- // IFileStore specifies that this method succeeds in case of non-existing files.
- fOS = store.openOutputStream(EFS.APPEND, getDefaultProgressMonitor());
- fOS.write('a');
- fOS.close();
- fOS = null;
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.8.1", info.exists());
- assertTrue("1.8.2", info.getLength() == 1);
-
- // openOutputStream overwrite
- fOS = store.openOutputStream(EFS.NONE, getDefaultProgressMonitor());
- fOS.write('b');
- fOS.close();
- fOS = null;
- info = store.fetchInfo(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1.9.1", info.exists());
- assertTrue("1.9.2", info.getLength() == 1);
- }
-
- public void testModifyReadOnly() throws Exception {
- //-test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
- IFileStore store = createFile("readOnly.txt");
- IFileInfo info = store.fetchInfo();
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true);
- store.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
-
- boolean exceptionThrown = false;
- try {
- fOS = store.openOutputStream(EFS.APPEND, getDefaultProgressMonitor());
- fOS.write('a');
- fOS.close();
- fOS = null;
- } catch (CoreException ce) {
- System.out.println("Good! appendReadOnly: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- int code = ce.getStatus().getCode();
- //assertTrue("1.1.1", ce.getStatus().getCode() == EFS.ERROR_READ_ONLY);
- assertTrue("1.1.1", code == EFS.ERROR_WRITE);
- assertTrue(fOS==null);
- }
- assertTrue("1.1", exceptionThrown);
-
- //set writable again
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, false);
- store.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
-
- //append, but KEEP STORE OPEN
- fOS = store.openOutputStream(EFS.APPEND, getDefaultProgressMonitor());
- fOS.write('a');
- fOS.flush();
-
- // set read-only WHILE FILE IS OPEN
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true);
- exceptionThrown = false;
- try {
- store.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! setOpenFileReadOnly: " + ce.getLocalizedMessage());
- int code = ce.getStatus().getCode();
- assertTrue("2.1", code == EFS.ERROR_WRITE);
- }
- //FIXME Platform EFS.getLocalFileSystem() doesn't throw exception here
- //assertTrue("2.2", exceptionThrown);
- if (!exceptionThrown) {
- info = store.fetchInfo();
- assertTrue("2.2", info.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
- }
-
- // continue appending now that the file is read-only
- fOS.write('b');
- fOS.flush();
-
- // set read-only AFTER CLOSING
- fOS.close();
- store.putInfo(info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
- }
-
- public void testMakeDeleteTree() throws Exception {
- // -test-author-:MartinOberhuber
- // Create folder
- if (isTestDisabled())
- return;
- IFileStore treeStore = fTestStore.getChild("treeTest");
- treeStore.mkdir(EFS.SHALLOW, getDefaultProgressMonitor());
-
- // Neg: Create folder where file already exists
- boolean exceptionThrown = false;
- IFileStore treeNegStore = createFile("treeNegTest");
- treeNegStore = fTestStore.getChild("treeNegTest");
- try {
- treeNegStore.mkdir(EFS.SHALLOW, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! treeNegStore.mkdir: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- int code = ce.getStatus().getCode();
- assertTrue("1.1", code == EFS.ERROR_WRONG_TYPE);
- }
- assertTrue("1.2", exceptionThrown);
-
- // Neg: Create deep folder with EFS.SHALLOW
- exceptionThrown = false;
- //IFileStore store = treeStore.getFileStore(new Path("foo/bar/baz"));
- IFileStore store = treeStore.getChild("foo").getChild("bar").getChild("baz");
- try {
- store.mkdir(EFS.SHALLOW, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! mkdirsShallow: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- int code = ce.getStatus().getCode();
- //assertTrue("2.1", code == EFS.ERROR_NOT_EXISTS);
- assertTrue("2.1", code == EFS.ERROR_WRITE);
- }
- assertTrue("2.2", exceptionThrown);
-
- // Create deep folder
- store.mkdir(EFS.NONE, getDefaultProgressMonitor());
-
- // Neg: openInputStream on a folder
- exceptionThrown = false;
- try {
- fIS = store.openInputStream(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! openInputStream on folder: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- int code = ce.getStatus().getCode();
- //FIXME would expect EFS.ERROR_WRONG_TYPE, but EFS.getLocalFileSystem() throws EFS.ERROR_READ
- assertTrue("3.1", code == EFS.ERROR_READ || code == EFS.ERROR_WRONG_TYPE);
- }
- assertTrue("3.2", exceptionThrown);
-
- // Neg: openOutputStream on a folder
- exceptionThrown = false;
- try {
- fOS = store.openOutputStream(EFS.NONE, getDefaultProgressMonitor());
- } catch (CoreException ce) {
- System.out.println("Good! openOutputStream on folder: " + ce.getLocalizedMessage());
- exceptionThrown = true;
- int code = ce.getStatus().getCode();
- //FIXME expected ERROR_WRONG_TYPE, but EFS.getLocalFileSystem() throws EFS.ERROR_WRITE
- assertTrue("4.1", code == EFS.ERROR_WRITE || code == EFS.ERROR_WRONG_TYPE);
- }
- assertTrue("4.2", exceptionThrown);
-
- // Create file in deep folder but READ-ONLY
- IFileStore child1 = store.getChild("readOnlyFile.txt");
- fOS = child1.openOutputStream(EFS.NONE, getDefaultProgressMonitor());
- fOS.write("foobar\nbaz\n".getBytes());
- fOS.flush();
- fOS.close();
- fOS = null;
- IFileInfo child1info = child1.fetchInfo();
- child1info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true);
- child1.putInfo(child1info, EFS.SET_ATTRIBUTES, getDefaultProgressMonitor());
-
- // Create file in deep folder but LEAVE IT OPEN
- IFileStore child2 = store.getChild("openFile.txt");
- fOS = child2.openOutputStream(EFS.NONE, getDefaultProgressMonitor());
- fOS.write("foobar\nbaz\n".getBytes());
- fOS.flush();
-
- // Delete tree
- exceptionThrown = false;
- try {
- treeStore.delete(EFS.NONE, getDefaultProgressMonitor());
- fOS.close();
- fOS = null;
- } catch (CoreException ce) {
- System.out.println("Good! Exception while deleting tree with open File: " + ce.getLocalizedMessage());
- int code = ce.getStatus().getCode();
- assertTrue(code == EFS.ERROR_DELETE);
- exceptionThrown = true;
- fOS.close();
- fOS = null;
- treeStore.delete(EFS.NONE, getDefaultProgressMonitor());
- }
- //We don't care about exception thrown or not, as long as tree is gone
- //assertTrue("5", exceptionThrown);
-
- IFileInfo treeInfo = treeStore.fetchInfo();
- assertFalse("5.1", treeInfo.exists());
- assertFalse("5.2", child1.fetchInfo().exists());
- assertFalse("5.3", child2.fetchInfo().exists());
- }
-
- public static Test suite255files() {
- String baseName = RSEFileStoreTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
- suite.addTest(new RSEFileStoreTest("test255files", "sshConnection.properties"));
- suite.addTest(new RSEFileStoreTest("test255files", "linuxConnection.properties"));
- suite.addTest(new RSEFileStoreTest("test255files", "sshConnection.properties"));
- suite.addTest(new RSEFileStoreTest("test255files", "linuxConnection.properties"));
- return suite;
- }
-
- public void test255files() throws Exception {
- if (isTestDisabled())
- return;
- IFileStore f = fTestStore.getChild("f");
- f.mkdir(EFS.SHALLOW, getDefaultProgressMonitor());
- for (int i = 0; i < 255; i++) {
- IFileStore store = f.getChild("f" + i);
- fOS = store.openOutputStream(EFS.NONE, getDefaultProgressMonitor());
- fOS.write(String.valueOf(i).getBytes());
- fOS.flush();
- fOS.close();
- fOS = null;
- }
- IFileInfo[] infos = f.childInfos(EFS.NONE, getDefaultProgressMonitor());
- assertTrue("1", infos.length == 255);
- for (int i = 0; i < 255; i++) {
- assertTrue("1.1", infos[i].exists());
- assertFalse("1.2", infos[i].isDirectory());
- }
- f.delete(EFS.NONE, getDefaultProgressMonitor());
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileSubsystemTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileSubsystemTestSuite.java
deleted file mode 100644
index 3e2dc6b98..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/files/RSEFileSubsystemTestSuite.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - organize, enable and tag test cases
- * Johnson Ma (Wind River) - [195402] Add tar.gz archive support
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.files;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSEFileSubsystemTestSuite 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("RSEFileSubsystemTestSuite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- //-test-disabled-//suite.addTestSuite(CreateFileTestCase.class);
- //-test-disabled-//suite.addTestSuite(FileOutputStreamTestCase.class);
- suite.addTestSuite(FileServiceArchiveTest.class);
- //-test-disabled-//suite.addTest(FileServiceArchiveTestDStore.suite());
- //-test-disabled-//suite.addTest(FileServiceArchiveTestDStoreWindows.suite());
- suite.addTestSuite(FileServiceTest.class);
- //-test-disabled-//suite.addTestSuite(FileSubsystemConsistencyTestCase.class);
-
- // Do not include the ftp sub system test case within the automated tests.
- // Most server seems to limit the amount of connections per IP-address, so
- // we run in problems with that. The test needs to be executed manually with
- // the ftp server to use possibly changed to whatever host will do.
- suite.addTestSuite(FTPFileSubsystemTestCase.class);
- suite.addTestSuite(FileServiceTgzArchiveTest.class);
- suite.addTest(RSEFileStoreTest.suite());
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSEFileSubsystemTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/RSEShellSubsystemTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/RSEShellSubsystemTestSuite.java
deleted file mode 100644
index 9c30e273d..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/RSEShellSubsystemTestSuite.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Anna Dushistova (MontaVista) - adapted from RSEFileSubsystemTestSuite
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.shells;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSEShellSubsystemTestSuite 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("RSEShellSubsystemTestSuite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(ShellServiceTest.class);
- suite.addTestSuite(ShellSubSystemTest.class);
- return suite;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite) RSEShellSubsystemTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellOutputListener.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellOutputListener.java
deleted file mode 100644
index aab1be8d0..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellOutputListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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:
- * Anna Dushistova (MontaVista) - [249102][testing] Improve ShellService Unittests
- ********************************************************************************/
-package org.eclipse.rse.tests.subsystems.shells;
-
-import java.util.ArrayList;
-
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.IHostShellOutputListener;
-
-public class ShellOutputListener implements IHostShellOutputListener {
-
- private ArrayList outputs;
-
- public ShellOutputListener() {
- outputs = new ArrayList();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.rse.services.shells.IHostShellOutputListener#shellOutputChanged
- * (org.eclipse.rse.services.shells.IHostShellChangeEvent)
- */
- public void shellOutputChanged(IHostShellChangeEvent event) {
- IHostOutput[] output = event.getLines();
- for (int i = 0; i < output.length; i++)
- outputs.add(output[i]);
- }
-
- /**
- * @return
- */
- public Object[] getAllOutput() {
- return outputs.toArray();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java
deleted file mode 100644
index 81a1ed553..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellServiceTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Anna Dushistova (MontaVista) - adapted from FileServiceTest
- * Anna Dushistova (MontaVista) - [249102][testing] Improve ShellService Unittests
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.shells;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.lang.reflect.Method;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-public class ShellServiceTest extends RSEBaseConnectionTestCase {
-
- protected String fPropertiesFileName;
- // For testing the test: verify methods on Local
- public static String fDefaultPropertiesFile = "localConnection.properties";
-
- protected IShellServiceSubSystem shellSubSystem;
- protected IShellService shellService;
- protected IProgressMonitor mon = new NullProgressMonitor();
-
- /**
- * Constructor with specific test name.
- *
- * @param name
- * test to execute
- */
- public ShellServiceTest(String name) {
- this(name, fDefaultPropertiesFile);
- }
-
- /**
- * Constructor with connection type and specific test name.
- *
- * @param name
- * test to execute
- * @param propertiesFileName
- * file with connection properties to use
- */
- public ShellServiceTest(String name, String propertiesFileName) {
- super(name);
- fPropertiesFileName = propertiesFileName;
- if (propertiesFileName != null) {
- int idx = propertiesFileName.indexOf("Connection.properties");
- String targetName = propertiesFileName.substring(0, idx);
- setTargetName(targetName);
- }
- }
-
- public static Test suite() {
- String baseName = ShellServiceTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
-
- // // Add a test suite for each connection type
- String[] connTypes = { "local", "ssh", "telnet" };
-
- for (int i = 0; i < connTypes.length; i++) {
- String suiteName = connTypes[i];
- String propFileName = connTypes[i] == null ? null : connTypes[i]
- + "Connection.properties";
- TestSuite subSuite = new TestSuite(baseName + "." + suiteName);
- Method[] m = ShellServiceTest.class.getMethods();
- for (int j = 0; j < m.length; j++) {
- String testName = m[j].getName();
- if (testName.startsWith("test")) {
- subSuite.addTest(new ShellServiceTest(testName,
- propFileName));
- }
- }
- suite.addTest(subSuite);
- }
- return suite;
- }
-
- protected IShellServiceSubSystem getShellServiceSubSystem() {
- if (fPropertiesFileName == null) {
- return null;
- }
- IHost host = getHost(fPropertiesFileName);
- ISubSystem[] ss = RSECorePlugin.getTheSystemRegistry()
- .getServiceSubSystems(host, IShellService.class);
- for (int i = 0; i < ss.length; i++) {
- if (ss[i] instanceof ShellServiceSubSystem) {
- return (ShellServiceSubSystem) ss[i];
- }
- }
- return null;
- }
-
- public void setUp() throws Exception {
- super.setUp();
- initShellService();
- }
-
- protected void initShellService() throws SystemMessageException {
- shellSubSystem = getShellServiceSubSystem();
- shellService = shellSubSystem.getShellService();
- shellSubSystem.checkIsConnected(getDefaultProgressMonitor());
- }
-
- public void tearDown() throws Exception {
- super.tearDown();
- }
-
- public boolean isWindows() {
- return shellSubSystem.getHost().getSystemType().isWindows();
- }
-
- public void testLaunchShell() throws Exception {
- Object[] allOutput = launchShell("", "echo test", new String[] {});
- boolean matchFound = false;
- for (int i = 0; i < allOutput.length; i++) {
- matchFound = ((IHostOutput) allOutput[i]).getString()
- .equals("test");
- System.out.println(((IHostOutput) allOutput[i]).getString());
- if (matchFound)
- break;
- }
- assertTrue(matchFound);
- // now set working directory -- Linux only
- allOutput = launchShell("/", "echo test", new String[] {});
- matchFound = false;
- for (int i = 0; i < allOutput.length; i++) {
- matchFound = ((IHostOutput) allOutput[i]).getString()
- .equals("test");
- System.out.println(((IHostOutput) allOutput[i]).getString());
- if (matchFound)
- break;
- }
- }
-
- public Object[] launchShell(String workingDirectory, String cmd,
- String[] env) throws SystemMessageException, InterruptedException {
- IHostShell hostShell = shellService.launchShell(workingDirectory, env,
- mon);
- assertNotNull(hostShell);
- assertNotNull(hostShell.getStandardOutputReader());
- ShellOutputListener outputListener = new ShellOutputListener();
- hostShell.addOutputListener(outputListener);
- // run command
- hostShell.writeToShell(cmd);
- hostShell.writeToShell("exit");
- while (hostShell.isActive()) {
- Thread.sleep(1000);
- }
- Object[] allOutput = outputListener.getAllOutput();
- return allOutput;
- }
-
- public void testRunCommand() throws Exception {
- Object[] allOutput = runCommand("", "echo test", new String[] {});
- boolean matchFound = false;
- for (int i = 0; i < allOutput.length; i++) {
- System.out.println(((IHostOutput) allOutput[i]).getString());
- matchFound = ((IHostOutput) allOutput[i]).getString()
- .equals("test");
- if (matchFound)
- break;
- }
- assertTrue("Failed without changing initial working directory",matchFound);
- //set initial working directory -- Linux only
- allOutput = runCommand("/", "echo test", new String[] {});
- matchFound = false;
- for (int i = 0; i < allOutput.length; i++) {
- System.out.println(((IHostOutput) allOutput[i]).getString());
- matchFound = ((IHostOutput) allOutput[i]).getString()
- .equals("test");
- if (matchFound)
- break;
- }
- assertTrue("Failed with changing initial working directory",matchFound);
- }
-
- public Object[] runCommand(String workingDirectory, String cmd, String[] env)
- throws SystemMessageException, InterruptedException {
- IHostShell hostShell = null;
- hostShell = shellService.runCommand(workingDirectory, cmd, env, mon);
- ShellOutputListener outputListener = new ShellOutputListener();
- hostShell.addOutputListener(outputListener);
- hostShell.writeToShell("exit");
- assertNotNull(hostShell);
- assertNotNull(hostShell.getStandardOutputReader());
- while (hostShell.isActive()) {
- Thread.sleep(1000);
- }
- Object[] allOutput = outputListener.getAllOutput();
- return allOutput;
- }
-
- public void testRunCommandViaHostShellProcessAdapter() throws Exception {
- IHostShell hostShell = null;
- String commandSeparator = (shellSubSystem!=null)?shellSubSystem.getParentRemoteCmdSubSystemConfiguration()
- .getCommandSeparator():"\r\n";
- hostShell = shellService.runCommand("", "echo test"
- + commandSeparator + " exit", new String[] {}, mon);
- HostShellProcessAdapter p = null;
- try {
- p = new HostShellProcessAdapter(hostShell);
- } catch (Exception e) {
- fail(e.getMessage());
- return;
- }
- BufferedReader bufferReader = new BufferedReader(new InputStreamReader(
- p.getInputStream()));
-
- String nextLine;
- boolean matchFound = false;
- try {
- while ((nextLine = bufferReader.readLine()) != null) {
- System.out.println(nextLine);
- matchFound = nextLine.equals("test");
- if(matchFound)
- break;
- }
- bufferReader.close();
- } catch (IOException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
- assertTrue(matchFound);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellSubSystemTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellSubSystemTest.java
deleted file mode 100644
index 7965b0d2c..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/ShellSubSystemTest.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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:
- * Anna Dushistova (MontaVista) - adapted from FileServiceTest
- * Anna Dushistova (MontaVista) - [249102][testing] Improve ShellService Unittests
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.shells;
-
-import java.lang.reflect.Method;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-public class ShellSubSystemTest extends RSEBaseConnectionTestCase {
-
- private String fPropertiesFileName;
- // For testing the test: verify methods on Local
- public static String fDefaultPropertiesFile = "localConnection.properties";
-
- private IShellServiceSubSystem shellSubSystem;
- private IProgressMonitor mon = new NullProgressMonitor();
-
- /**
- * Constructor with specific test name.
- *
- * @param name
- * test to execute
- */
- public ShellSubSystemTest(String name) {
- this(name, fDefaultPropertiesFile);
- }
-
- /**
- * Constructor with connection type and specific test name.
- *
- * @param name
- * test to execute
- * @param propertiesFileName
- * file with connection properties to use
- */
- public ShellSubSystemTest(String name, String propertiesFileName) {
- super(name);
- fPropertiesFileName = propertiesFileName;
- if (propertiesFileName != null) {
- int idx = propertiesFileName.indexOf("Connection.properties");
- String targetName = propertiesFileName.substring(0, idx);
- setTargetName(targetName);
- }
- }
-
- public static Test suite() {
- String baseName = ShellSubSystemTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
-
- // // Add a test suite for each connection type
- String[] connTypes = { "local", "ssh" };
- // String[] connTypes = { "local" };
- // String[] connTypes = { "ssh" };
-
- for (int i = 0; i < connTypes.length; i++) {
- String suiteName = connTypes[i];
- String propFileName = connTypes[i] == null ? null : connTypes[i]
- + "Connection.properties";
- TestSuite subSuite = new TestSuite(baseName + "." + suiteName);
- Method[] m = ShellSubSystemTest.class.getMethods();
- for (int j = 0; j < m.length; j++) {
- String testName = m[j].getName();
- if (testName.startsWith("test")) {
- subSuite.addTest(new ShellSubSystemTest(testName,
- propFileName));
- }
- }
- suite.addTest(subSuite);
- }
- return suite;
- }
-
- protected IShellServiceSubSystem getShellServiceSubSystem() {
- if (fPropertiesFileName == null) {
- return null;
- }
- IHost host = getHost(fPropertiesFileName);
- ISubSystem[] ss = RSECorePlugin.getTheSystemRegistry()
- .getServiceSubSystems(host, IShellService.class);
- for (int i = 0; i < ss.length; i++) {
- if (ss[i] instanceof ShellServiceSubSystem) {
- return (ShellServiceSubSystem) ss[i];
- }
- }
- return null;
- }
-
- public void setUp() throws Exception {
- super.setUp();
- shellSubSystem = getShellServiceSubSystem();
- shellSubSystem.checkIsConnected(getDefaultProgressMonitor());
- }
-
- public void tearDown() throws Exception {
- super.tearDown();
- }
-
- public boolean isWindows() {
- return shellSubSystem.getHost().getSystemType().isWindows();
- }
-
- public void testRunShell() throws Exception {
- // the IRemoteCommandShell returned should have getOutputAt() and
- // similar methods
- if (shellSubSystem.canRunShell()) {
- IRemoteCommandShell cmd = shellSubSystem.runShell(null, mon);
- assertNotNull(cmd);
- shellSubSystem.sendCommandToShell("echo test"+shellSubSystem.getParentRemoteCmdSubSystemConfiguration().getCommandSeparator()+" exit", cmd, mon);
- while (cmd.isActive()) {
- Thread.sleep(200);
- }
- assertNotNull(cmd.getOutputAt(0));
- shellSubSystem.removeShell(cmd);
- }
-
- }
-
- public void testRunCommand() throws Exception {
- if (shellSubSystem.canRunCommand()) {
- Object[] results = shellSubSystem
- .runCommand("echo test\r\nexit", null, mon);
-
- boolean matchFound = false;
- Object cmdObject = results[0];
- assertTrue(cmdObject instanceof IRemoteCommandShell);
-
- while (((IRemoteCommandShell)cmdObject).isActive()) {
- Thread.sleep(200);
- }
- Object[] result = ((IRemoteCommandShell) cmdObject)
- .listOutput();
- for (int i = 0; i < result.length; i++) {
- System.out.println(((IRemoteOutput) result[i]).getText());
- matchFound = ((IRemoteOutput) result[i]).getText().equals(
- "test");
- if (matchFound)
- break;
- }
-
- assertTrue(matchFound);
- }
- }
-
- public void testCancelShell() throws Exception {
- if (shellSubSystem.canRunShell()) {
- IRemoteCommandShell cmd = shellSubSystem.runShell(null, mon);
- shellSubSystem.cancelShell(cmd, mon);
- assertFalse(cmd.isActive());
-
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/TerminalShellServiceTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/TerminalShellServiceTest.java
deleted file mode 100644
index 1dc1a645a..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/shells/TerminalShellServiceTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 MontaVista Software, 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:
- * Anna Dushistova (MontaVista)- initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.rse.tests.subsystems.shells;
-
-import java.lang.reflect.Method;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.terminals.core.TerminalServiceSubSystem;
-
-public class TerminalShellServiceTest extends ShellServiceTest{
-
- protected ITerminalService terminalService;
- protected TerminalServiceSubSystem terminalSubSystem;
-
- /**
- * @param name
- * @param propertiesFileName
- */
- public TerminalShellServiceTest(String name, String propertiesFileName) {
- super(name, propertiesFileName);
- }
-
- /**
- * @param name
- */
- public TerminalShellServiceTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- String baseName = TerminalShellServiceTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
-
- // // Add a test suite for each connection type
- String[] connTypes = { "sshTerminal" };
- // String[] connTypes = { "local" };
- // String[] connTypes = { "ssh" };
-
- for (int i = 0; i < connTypes.length; i++) {
- String suiteName = connTypes[i];
- String propFileName = connTypes[i] == null ? null : connTypes[i]
- + "Connection.properties";
- TestSuite subSuite = new TestSuite(baseName + "." + suiteName);
- Method[] m = TerminalShellServiceTest.class.getMethods();
- for (int j = 0; j < m.length; j++) {
- String testName = m[j].getName();
- if (testName.startsWith("test")) {
- subSuite.addTest(new TerminalShellServiceTest(testName,
- propFileName));
- }
- }
- suite.addTest(subSuite);
- }
- return suite;
- }
-
- protected TerminalServiceSubSystem getTerminalServiceSubSystem() {
- if (fPropertiesFileName == null) {
- return null;
- }
- IHost host = getHost(fPropertiesFileName);
- ISubSystem[] ss = RSECorePlugin.getTheSystemRegistry()
- .getServiceSubSystems(host, ITerminalService.class);
- for (int i = 0; i < ss.length; i++) {
- if (ss[i] instanceof TerminalServiceSubSystem) {
- return (TerminalServiceSubSystem) ss[i];
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.subsystems.shells.ShellServiceTest#initShellService()
- */
- protected void initShellService() throws SystemMessageException {
- terminalSubSystem = getTerminalServiceSubSystem();
- terminalService = terminalSubSystem.getTerminalService();
- terminalSubSystem.checkIsConnected(getDefaultProgressMonitor());
- shellService = (IShellService) terminalService.getAdapter(IShellService.class);
- }
-
- public boolean isWindows() {
- return terminalSubSystem.getHost().getSystemType().isWindows();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/RSETestSubsystemTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/RSETestSubsystemTestSuite.java
deleted file mode 100644
index a2e9122ed..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/RSETestSubsystemTestSuite.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.subsystems.testsubsystem;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSETestSubsystemTestSuite 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 Test Subsystem Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- suite.addTestSuite(TestSubsystemTestCase.class);
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSETestSubsystemTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java
deleted file mode 100644
index 62f367116..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.
- * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- *******************************************************************************/
-package org.eclipse.rse.tests.subsystems.testsubsystem;
-
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
-import org.eclipse.rse.core.events.SystemResourceChangeEvent;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.internal.ui.view.SystemView;
-import org.eclipse.rse.internal.ui.view.SystemViewPart;
-import org.eclipse.rse.tests.core.IRSEViews;
-import org.eclipse.rse.tests.core.RSEWaitAndDispatchUtil;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-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.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-public class TestSubsystemTestCase extends RSEBaseConnectionTestCase {
- private ITestSubSystem testSubSystem;
- SystemView rseSystemView;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- // all view management must happen in the UI thread!
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- // For the test subsystem test case we need the RSE remote systems view
- IViewPart viewPart = showView(IRSEViews.RSE_REMOTE_SYSTEMS_VIEW_ID, IRSEViews.RSE_PERSPECTIVE_ID);
- assertNotNull("Failed to show required RSE remote systems view!", viewPart); //$NON-NLS-1$
- if (viewPart instanceof SystemViewPart) {
- rseSystemView = ((SystemViewPart)viewPart).getSystemView();
- }
- }
- });
- assertNotNull("Failed to get remote system viewer instance from RSE remote systems view!", rseSystemView); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- rseSystemView = null;
- testSubSystem = null;
-
- super.tearDown();
- }
-
- public void testAddAndDeleteDeepNodes() {
- //-test-author-:TobiasSchwarz
- if (isTestDisabled())
- return;
- // these test _must_ run in UI thread
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- internalTestAddAndDeleteNodes(true);
- }
- });
- }
-
- public void testAddAndDeleteFlatNodes() {
- //-test-author-:TobiasSchwarz
- if (isTestDisabled())
- return;
- // these test _must_ run in UI thread
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- internalTestAddAndDeleteNodes(false);
- }
- });
- }
-
- public void internalTestAddAndDeleteNodes(boolean deep) {
- IHost connection = getLocalSystemConnection();
- assertNotNull("Failed to get local system connection", connection); //$NON-NLS-1$
-
- Exception exception = null;
- String cause = null;
-
- testSubSystem = null;
- try {
- testSubSystem = getConnectionManager().getTestSubSystem(connection);
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to get test subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("No test subystem", testSubSystem); //$NON-NLS-1$
-
- testSubSystem.removeAllChildNodes();
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.invalidateFiltersFor(testSubSystem);
-
- TestSubSystemContainerNode node = null;
- for (int i=0; i<100; i++) {
- if (node == null) {
- node = new TestSubSystemContainerNode("node "+i); //$NON-NLS-1$
- testSubSystem.addChildNode(node);
- }
- else {
- TestSubSystemContainerNode parentNode = node;
- node = new TestSubSystemContainerNode("node "+i); //$NON-NLS-1$
- if (deep) {
- parentNode.addChildNode(node);
- }
- else {
- testSubSystem.addChildNode(node);
- }
- }
- }
- rseSystemView.refresh(testSubSystem);
- rseSystemView.expandToLevel(testSubSystem, AbstractTreeViewer.ALL_LEVELS);
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
-
- testSubSystem.removeAllChildNodes();
- //registry.invalidateFiltersFor(testSubSystem);
-
- //SystemPerspectiveHelpers.findRSEView().refresh(testSubSystem);
- registry.fireEvent(new SystemResourceChangeEvent(testSubSystem, ISystemResourceChangeEvents.EVENT_REFRESH, testSubSystem));
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
- }
-
- public void testBugzilla170728() {
- //-test-author-:TobiasSchwarz
- if (isTestDisabled())
- return;
- // these test _must_ run in UI thread
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- internalTestBugzilla170728();
- }
- });
- }
-
- public void internalTestBugzilla170728() {
- IHost connection = getLocalSystemConnection();
- assertNotNull("Failed to get local system connection", connection); //$NON-NLS-1$
-
- Exception exception = null;
- String cause = null;
-
- testSubSystem = null;
- try {
- testSubSystem = getConnectionManager().getTestSubSystem(connection);
- } catch(Exception e) {
- exception = e;
- cause = e.getLocalizedMessage();
- }
- assertNull("Failed to get test subsystem! Possible cause: " + cause, exception); //$NON-NLS-1$
- assertNotNull("No test subystem", testSubSystem); //$NON-NLS-1$
-
- RSECorePlugin.getTheSystemRegistry().invalidateFiltersFor(testSubSystem);
- rseSystemView.refresh(testSubSystem);
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
- rseSystemView.expandToLevel(testSubSystem, AbstractTreeViewer.ALL_LEVELS);
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
-
- ISystemFilterPoolManager mgr = testSubSystem.getFilterPoolReferenceManager().getDefaultSystemFilterPoolManager();
- String[] strings = new String[] { "Node.*" }; //$NON-NLS-1$
-
- try {
- mgr.createSystemFilter(mgr.getFirstDefaultSystemFilterPool(), "Node*", strings, "Node*"); //$NON-NLS-1$ //$NON-NLS-2$
-
- TestSubSystemNode node = new TestSubSystemNode("Node 1"); //$NON-NLS-1$
- testSubSystem.addChildNode(node);
- testSubSystem.addChildNode(new TestSubSystemNode("Node 2")); //$NON-NLS-1$
- testSubSystem.addChildNode(new TestSubSystemNode("Node 3")); //$NON-NLS-1$
- testSubSystem.addChildNode(new TestSubSystemNode("Node 4")); //$NON-NLS-1$
-
- RSECorePlugin.getTheSystemRegistry().invalidateFiltersFor(testSubSystem);
- rseSystemView.refresh(testSubSystem);
-
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
- rseSystemView.expandToLevel(testSubSystem, AbstractTreeViewer.ALL_LEVELS);
- rseSystemView.refresh(testSubSystem);
- RSEWaitAndDispatchUtil.waitAndDispatch(1000);
-
- node.setName("Node 1 (changed)"); //$NON-NLS-1$
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- registry.fireEvent(new SystemResourceChangeEvent(node, ISystemResourceChangeEvents.EVENT_REFRESH, node));
-
- RSEWaitAndDispatchUtil.waitAndDispatch(10000);
- }
- catch (Exception e) {
- //We cannot have the Exception forwarded to the test framework, because
- //it happens in the dispatch thread and our Runnable.run() method does
- //not allow checked exceptions. Therefore, convert the exception into
- //an Error that the test framework can handle, but make sure that the
- //cause of the Error (the original exception) is maintained by calling
- //initCause(). This will allow seeing it in the JUnit runner later on.
- Error err = new AssertionFailedError("Unhandled event loop exception");
- err.initCause(e);
- throw err;
- }
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/RSESynchronizeTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/RSESynchronizeTest.java
deleted file mode 100644
index 6a429a633..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/RSESynchronizeTest.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - Adapted from org.eclipse.rse.tests / FileServiceTest
- *******************************************************************************/
-package org.eclipse.rse.tests.synchronize;
-
-import java.lang.reflect.Method;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.rse.internal.synchronize.SynchronizeData;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizeConnectionManager;
-import org.eclipse.rse.internal.synchronize.provisional.ISynchronizer;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeConnectionManager;
-import org.eclipse.rse.internal.synchronize.provisional.SynchronizeOperation;
-import org.eclipse.rse.internal.synchronize.provisional.Synchronizer;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-public class RSESynchronizeTest extends SynchronizeTestBase {
-
- /**
- * Constructor with specific test name.
- *
- * @param name test to execute
- */
- public RSESynchronizeTest(String name) {
- super(name);
- }
-
- /**
- * Constructor with connection type and specific test name.
- *
- * @param name test to execute
- * @param propertiesFileName file with connection properties to use
- */
- public RSESynchronizeTest(String name, String propertiesFileName) {
- super(name, propertiesFileName);
- }
-
- public static Test suite() {
- String baseName = RSESynchronizeTest.class.getName();
- TestSuite suite = new TestSuite(baseName);
-
- // // Add a test suite for each connection type
- // String[] connTypes = { "local", "ssh", "ftpWindows", "ftp", "linux",
- // "windows" };
- String[] connTypes = { "local" };
- // String[] connTypes = { "ssh" };
-
- for (int i = 0; i < connTypes.length; i++) {
- String suiteName = connTypes[i] == null ? "EFS" : connTypes[i];
- String propFileName = connTypes[i] == null ? null : connTypes[i] + "Connection.properties";
- TestSuite subSuite = new TestSuite(baseName + "." + suiteName);
- Method[] m = RSESynchronizeTest.class.getMethods();
- for (int j = 0; j < m.length; j++) {
- String testName = m[j].getName();
- if (testName.startsWith("test")) {
- subSuite.addTest(new RSESynchronizeTest(testName, propFileName));
- }
- }
- suite.addTest(subSuite);
- }
- return suite;
- }
-
- public void testConnectDisconnect() throws Exception {
- // -test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
-
- // Create a local test project with some files and folders in it
- IProject project = getProject(getUniqueString());
- IResource[] resources = new IResource[] { project };
- ensureExistsInWorkspace(resources, true);
-
- ISynchronizeConnectionManager connection = new SynchronizeConnectionManager();
- assertTrue("1.1", !connection.isConnected(project));
- // FIXME not a good idea to throw TeamException here -- this is the only
- // reason why I need to import org.eclipse.team.core here
- connection.connect(project);
- assertTrue("1.2", connection.isConnected(project));
-
- connection.disconnect(project);
- assertTrue("1.3", !connection.isConnected(project));
-
- // What happens if a connected project is deleted?
- ensureDoesNotExistInWorkspace(project);
- assertTrue("2.1", !connection.isConnected(project));
- }
-
-
- public void testExport() throws Exception {
- // -test-author-:MartinOberhuber
- if (isTestDisabled())
- return;
-
- // Create a local test project with some files and folders in it
- IProject project = getProject(getUniqueString());
- IFolder folder = project.getFolder("folder");
- IFile file = project.getFile("file.txt");
- IFile subFile = folder.getFile("subfile.txt");
- IResource[] resources = new IResource[] { project, folder, file, subFile };
- ensureExistsInWorkspace(resources, true);
-
- // Initial export of test project to remote folder
- SynchronizeData sd = new SynchronizeData();
- // //What to do here?
- // sd.addChild(new SynchronizeDataNode());
- ISynchronizer synchronizer = new Synchronizer(sd);
- synchronizer.run(new SynchronizeOperation());
-
- // Check file files and folders exist on the remote
- IRemoteFile rFolder = fss.getRemoteFileObject(remoteTempDir, "folder", getDefaultProgressMonitor());
- assertTrue("1.1", rFolder.exists());
- assertTrue("1.2", rFolder.isDirectory());
- IRemoteFile rFile = fss.getRemoteFileObject(remoteTempDir, "file.txt", getDefaultProgressMonitor());
- assertTrue("2.1", rFile.exists());
- assertTrue("2.2", rFile.isFile());
- IRemoteFile rSubFile = fss.getRemoteFileObject(rFolder, "subfile.txt", getDefaultProgressMonitor());
- assertTrue("3.1", rSubFile.exists());
- assertTrue("3.2", rSubFile.isFile());
-
- // TODO: Check file contents, timestamp etc
-
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/SynchronizeTestBase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/SynchronizeTestBase.java
deleted file mode 100644
index 631224469..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/synchronize/SynchronizeTestBase.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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) - Adapted from org.eclipse.rse.tests / FileServiceTest
- * - Portions adapted from org.eclipse.core.tests.resources / ResourceTest
- * - Portions adapted from org.eclipse.core.tests.harness / CoreTest
- *******************************************************************************/
-package org.eclipse.rse.tests.synchronize;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-
-import org.eclipse.core.internal.utils.UniversalUniqueIdentifier;
-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.IWorkspace;
-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.IStatus;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.tests.core.connection.RSEBaseConnectionTestCase;
-
-/**
- * Base class for RSE Synchronization Tests. Contains utility methods copied
- * from org.eclipse.core.resources.tests
- */
-public class SynchronizeTestBase extends RSEBaseConnectionTestCase {
-
- private String fPropertiesFileName;
- // For testing the test: verify methods on Local
- public static String fDefaultPropertiesFile = "localConnection.properties";
-
- protected IFileServiceSubSystem fss;
- protected IFileService fs;
- private IRemoteFile fHomeDirectory;
- protected IRemoteFile remoteTempDir;
- private String tempDirPath;
-
- /**
- * Constructor with specific test name.
- *
- * @param name test to execute
- */
- public SynchronizeTestBase(String name) {
- this(name, fDefaultPropertiesFile);
- }
-
- /**
- * Constructor with connection type and specific test name.
- *
- * @param name test to execute
- * @param propertiesFileName file with connection properties to use
- */
- public SynchronizeTestBase(String name, String propertiesFileName) {
- super(name);
- fPropertiesFileName = propertiesFileName;
- if (propertiesFileName != null) {
- int idx = propertiesFileName.indexOf("Connection.properties");
- String targetName = propertiesFileName.substring(0, idx);
- setTargetName(targetName);
- }
- }
-
- public void setUp() throws Exception {
- super.setUp();
- IHost host = getHost(fPropertiesFileName);
- fss = (IFileServiceSubSystem) RemoteFileUtility.getFileSubSystem(host);
- fs = fss.getFileService();
- fss.checkIsConnected(getDefaultProgressMonitor());
- fHomeDirectory = fss.getRemoteFileObject(".", getDefaultProgressMonitor());
- remoteTempDir = fss.getRemoteFileObject(fHomeDirectory, "rsetest" + System.currentTimeMillis(), getDefaultProgressMonitor());
- fss.createFolder(remoteTempDir, getDefaultProgressMonitor());
- tempDirPath = remoteTempDir.getAbsolutePath();
- }
-
- public void tearDown() throws Exception {
- fss.delete(remoteTempDir, getDefaultProgressMonitor());
- super.tearDown();
- }
-
- public boolean isWindows() {
- return fss.getHost().getSystemType().isWindows();
- }
-
- public IProgressMonitor getMonitor() {
- return getDefaultProgressMonitor();
- }
-
- public String getTempDirPath() {
- return tempDirPath;
- }
-
- // <Copied from org.eclipse.core.tests.harness / CoreTest>
- /**
- * Fails the test due to the given throwable.
- */
- public static void fail(String message, Throwable e) {
- // If the exception is a CoreException with a multistatus
- // then print out the multistatus so we can see all the info.
- if (e instanceof CoreException) {
- IStatus status = ((CoreException) e).getStatus();
- //if the status does not have an exception, print the stack for this one
- if (status.getException() == null)
- e.printStackTrace();
- write(status, 0);
- } else
- e.printStackTrace();
- fail(message + ": " + e);
- }
- private static void write(IStatus status, int indent) {
- PrintStream output = System.out;
- indent(output, indent);
- output.println("Severity: " + status.getSeverity());
-
- indent(output, indent);
- output.println("Plugin ID: " + status.getPlugin());
-
- indent(output, indent);
- output.println("Code: " + status.getCode());
-
- indent(output, indent);
- output.println("Message: " + status.getMessage());
-
- if (status.getException() != null) {
- indent(output, indent);
- output.print("Exception: ");
- status.getException().printStackTrace(output);
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- write(children[i], indent + 1);
- }
- }
- private static void indent(OutputStream output, int indent) {
- for (int i = 0; i < indent; i++)
- try {
- output.write("\t".getBytes());
- } catch (IOException e) {
- // ignore
- }
- }
- // </Copied from org.eclipse.core.tests.harness / CoreTest (Copyright (c) IBM)>
-
- // <Copied from org.eclipse.core.tests.resources / ResourceTest (Copyright (c) IBM)>
- public String getUniqueString() {
- return new UniversalUniqueIdentifier().toString();
- }
- protected void create(final IResource resource, boolean local) throws CoreException {
- if (resource == null || resource.exists())
- return;
- if (!resource.getParent().exists())
- create(resource.getParent(), local);
- switch (resource.getType()) {
- case IResource.FILE :
- ((IFile) resource).create(local ? new ByteArrayInputStream(new byte[0]) : null, true, getMonitor());
- break;
- case IResource.FOLDER :
- ((IFolder) resource).create(true, local, getMonitor());
- break;
- case IResource.PROJECT :
- ((IProject) resource).create(getMonitor());
- ((IProject) resource).open(getMonitor());
- break;
- }
- }
- /**
- * Create each element of the resource array in the workspace resource
- * info tree.
- */
- public void ensureExistsInWorkspace(final IResource[] resources, final boolean local) {
- IWorkspaceRunnable body = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- for (int i = 0; i < resources.length; i++)
- create(resources[i], local);
- }
- };
- try {
- getWorkspace().run(body, null);
- } catch (CoreException e) {
- fail("#ensureExistsInWorkspace(IResource[])", e);
- }
- }
- /**
- * Delete the given resource from the workspace resource tree.
- */
- public void ensureDoesNotExistInWorkspace(IResource resource) {
- try {
- if (resource.exists())
- resource.delete(true, null);
- } catch (CoreException e) {
- fail("#ensureDoesNotExistInWorkspace(IResource): " + resource.getFullPath(), e);
- }
- }
- // </Copied from org.eclipse.core.tests.resources / ResourceTest>
-
- // <Copied from org.eclipse.core.tests.resources / ProjectPreferencesTest (Copyright (c) IBM)>
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
- protected static IProject getProject(String name) {
- return getWorkspace().getRoot().getProject(name);
- }
- // </Copied from org.eclipse.core.tests.resources / ProjectPreferencesTest (Copyright (c) IBM)>
-
-}
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/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestCase.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestCase.java
deleted file mode 100644
index 841e66df8..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.connectionwizard;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.tests.RSETestsPlugin;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests the RSE new connection wizard functionality.
- *
- * This is a manual test! Users need to manually make some selections and close
- * the dialog for the test to complete. Therefore this test cannot be run in
- * unattended nightly builds.
- *
- * What testers should check:
- * <ul>
- * <li>On 1st wizard page, select a type and press next</li>
- * <li>On 2nd page, selected type should be visible.</li>
- * <li>Select type again on that page -- next should be enabled, press next</li>
- * <li>Press back, select a different type, press next -- correct type should be
- * shown</li> </li> For details, see
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=237816
- *
- * @author uwe.stieber@windriver.com
- */
-public class RSENewConnectionWizardTestCase extends RSECoreTestCase {
-
- /* Test restrictToSystemType functionality. See bug 237816 */
- public void testRestrictToSystemType() {
- //-test-author-:UweStieber
- if (!RSETestsPlugin.isTestCaseEnabled("RSENewConnectionWizardTestCase.testRestrictToSystemType")) return; //$NON-NLS-1$
-
- IRSECoreRegistry coreRegistry = RSECorePlugin.getTheCoreRegistry();
- assertNotNull("Failed to fetch RSE core registry instance!", coreRegistry); //$NON-NLS-1$
-
- // Construct the wizard
- RSENewConnectionWizardTestWizard wizard = new RSENewConnectionWizardTestWizard();
-
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.open();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSimpleWizardPage.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSimpleWizardPage.java
deleted file mode 100644
index a67e0d8e2..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSimpleWizardPage.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.connectionwizard;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rse.core.IRSECoreRegistry;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.ui.wizards.newconnection.RSEMainNewConnectionWizard;
-import org.eclipse.rse.ui.wizards.newconnection.RSENewConnectionWizardRegistry;
-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.Composite;
-import org.eclipse.swt.widgets.List;
-
-/**
- * Simple wizard page listing the available system types in a simple text list.
- *
- * @author uwe.stieber@windriver.com
- */
-public class RSENewConnectionWizardTestSimpleWizardPage extends WizardPage {
- private List fList;
- private IRSESystemType[] fSystemTypes;
- RSEMainNewConnectionWizard fMainWizard;
- /**
- * Constructor.
- *
- * @param wizardRegistry The wizard registry to use. Must not be <code>null</code>
- * @param pageName the name of the page
- */
- public RSENewConnectionWizardTestSimpleWizardPage(RSENewConnectionWizardRegistry wizardRegistry, String pageName) {
- super(pageName);
- assert wizardRegistry != null;
- }
-
- /**
- * Constructor.
- *
- * @param wizardRegistry The wizard registry to use. Must not be <code>null</code>
- * @param pageName the name of the page
- * @param title the title for this wizard page,
- * or <code>null</code> if none
- * @param titleImage the image descriptor for the title of this wizard page,
- * or <code>null</code> if none
- */
- public RSENewConnectionWizardTestSimpleWizardPage(RSENewConnectionWizardRegistry wizardRegistry, String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- assert wizardRegistry != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
- public void dispose() {
- fSystemTypes = null;
-
- fList = null;
-
- if (fMainWizard != null) { fMainWizard.dispose(); fMainWizard = null; }
-
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- setControl(composite);
-
- fList = new List(composite, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
- fList.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- IRSECoreRegistry coreRegistry = RSECorePlugin.getTheCoreRegistry();
- fSystemTypes = coreRegistry.getSystemTypes();
- for (int i = 0; i < fSystemTypes.length; i++) {
- fList.add(fSystemTypes[i].getLabel());
- }
-
- fList.addSelectionListener(new SelectionAdapter() {
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- // Update the main wizard if already created
- if (fMainWizard != null && getSelectedSystemType() != null) fMainWizard.restrictToSystemType(getSelectedSystemType());
- setPageComplete(getSelectedSystemType() != null);
- }
- });
-
- setPageComplete(false);
- }
-
- /**
- * Returns the selected system type instance. This method will
- * return <code>null</code> if the page hasn't been visible yet or
- * got already disposed.
- *
- * @return The selected RSE system type instance or <code>null</code>.
- */
- public IRSESystemType getSelectedSystemType() {
- if (fList != null && !fList.isDisposed() && fList.getSelectionIndex() != -1) {
- return fSystemTypes[fList.getSelectionIndex()];
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- return super.canFlipToNextPage() && (fList != null && !fList.isDisposed() && fList.getSelectionIndex() != -1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
- */
- public IWizardPage getNextPage() {
- if (fMainWizard == null) {
- // Create a new instance
- fMainWizard = new RSEMainNewConnectionWizard();
- // Create the pages
- fMainWizard.addPages();
- // Restrict the wizard to the selected system type
- if (getSelectedSystemType() != null) fMainWizard.restrictToSystemType(getSelectedSystemType());
- }
- return fMainWizard.getStartingPage();
- }
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSuite.java
deleted file mode 100644
index 59860ff15..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestSuite.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.connectionwizard;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class RSENewConnectionWizardTestSuite 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 New Connection Wizard Test Suite"); //$NON-NLS-1$
- // add the single test suites to the overall one here.
- //Attention: MANUAL testcase below! Not for unattended nightly builds!
- suite.addTestSuite(RSENewConnectionWizardTestCase.class);
-
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)RSENewConnectionWizardTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestWizard.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestWizard.java
deleted file mode 100644
index 3c9401eba..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/connectionwizard/RSENewConnectionWizardTestWizard.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.connectionwizard;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.ui.wizards.newconnection.RSENewConnectionWizardRegistry;
-
-/**
- * Simple test wizard implementation.
- *
- * @author uwe.stieber@windriver.com
- */
-public class RSENewConnectionWizardTestWizard extends Wizard {
- private final RSENewConnectionWizardRegistry fWizardRegisty;
-
- /**
- * Constructor.
- *
- */
- public RSENewConnectionWizardTestWizard() {
- super();
-
- fWizardRegisty = new RSENewConnectionWizardRegistry();
-
- setNeedsProgressMonitor(false);
- setForcePreviousAndNextButtons(true);
- }
-
- /**
- * Returns the RSE new connection wizard registry instance.
- *
- * @return The new connection wizard registry.
- */
- public RSENewConnectionWizardRegistry getWizardRegistry() {
- return fWizardRegisty;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- addPage(new RSENewConnectionWizardTestSimpleWizardPage(getWizardRegistry(), "Simple Selection Page")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- return true;
- }
-
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTest.java
deleted file mode 100644
index ae4d3d4f1..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation.
- * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
- * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
- * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- ********************************************************************************/
-
-package org.eclipse.rse.tests.ui.mnemonics;
-
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-
-/**
- * Tests for {@link SystemPreferencesManager}.
- * Test various aspects of mnemonic generation and assignment.
- */
-public class MnemonicsTest extends RSECoreTestCase {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testDefaultGeneration() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- Mnemonics mn = new Mnemonics();
- mn.clear("abcde");
- String result = mn.setUniqueMnemonic("A...");
- assertEquals("A...", result);
- result = mn.setUniqueMnemonic("F...");
- assertEquals("&F...", result);
- }
-
- public void testAppendPolicies() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- setLocalePattern(".*"); // match all locales
- Mnemonics mn = new Mnemonics();
- mn.clear("abcde");
- String result = mn.setUniqueMnemonic("A...");
- assertEquals("A(&F)...", result);
- result = mn.setUniqueMnemonic("F...");
- assertEquals("F(&G)...", result);
- result = mn.setUniqueMnemonic("H...");
- assertEquals("&H...", result);
- }
-
- private void setLocalePattern(String pattern) {
- RSEUIPlugin.getDefault().getPluginPreferences().setValue(Mnemonics.APPEND_MNEMONICS_PATTERN_PREFERENCE, pattern);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTestSuite.java
deleted file mode 100644
index 89dc526c4..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/mnemonics/MnemonicsTestSuite.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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 API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.ui.mnemonics;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class MnemonicsTestSuite 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 Mnemonics Test Suite"); //$NON-NLS-1$
- suite.addTestSuite(MnemonicsTest.class);
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)MnemonicsTestSuite.suite();
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTest.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTest.java
deleted file mode 100644
index 1c36f304e..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation.
- * Martin Oberhuber (Wind River) - organize, enable and tag test cases
- ********************************************************************************/
-
-package org.eclipse.rse.tests.ui.preferences;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.rse.tests.core.RSECoreTestCase;
-import org.eclipse.rse.ui.ISystemPreferencesConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemPreferencesManager;
-
-/**
- * Tests for {@link SystemPreferencesManager}.
- * Test various aspects of mnemonic generation and assignment.
- */
-public class PreferencesTest extends RSECoreTestCase {
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.core.RSECoreTestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testShowLists() {
- //-test-author-:DavidDykstal
- if (isTestDisabled())
- return;
- Preferences store = RSEUIPlugin.getDefault().getPluginPreferences();
- boolean showLists = store.getBoolean(ISystemPreferencesConstants.SHOW_EMPTY_LISTS);
- assertTrue(showLists);
- }
-
-}
diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTestSuite.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTestSuite.java
deleted file mode 100644
index f8abeb8b9..000000000
--- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/ui/preferences/PreferencesTestSuite.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 API and implementation
- *******************************************************************************/
-package org.eclipse.rse.tests.ui.preferences;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
-
-public class PreferencesTestSuite 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("UI Preferences Test Suite"); //$NON-NLS-1$
- suite.addTestSuite(PreferencesTest.class);
- return suite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
- */
- public TestSuite getTestSuite() {
- return (TestSuite)PreferencesTestSuite.suite();
- }
-
-}
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 0035a2abb..000000000
--- a/rse/tests/org.eclipse.rse.tests/teamConfig/RSE Combined Test Suite.launch
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="org.eclipse.ui.workbench"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-test-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.rse.tests/src/org/eclipse/rse/tests/RSECombinedTestSuite.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.rse.tests.RSECombinedTestSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -debug -clean -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.rse.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -esa -Dcom.sun.management.jmxremote"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.ui.workbench/debug" value="true"/>
-</mapAttribute>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</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 9b273a710..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/connectionDefault.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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.
-# Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
-###############################################################################
-
-# 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
-system_type_id = org.eclipse.rse.systemtype.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/ftpConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/ftpConnection.properties
deleted file mode 100644
index 23cb2e200..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/ftpConnection.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-# name/label for this ftp connection
-name = test_ftp_only
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# FTP system ID
-system_type_id = org.eclipse.rse.systemtype.ftp
-
-# Address of ftp connection
-address = unknown
-
-# userid to connect to ftp connection
-#userid =
-
-# password to connect to ftp connection
-#password = \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/ftpSshConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/ftpSshConnection.properties
deleted file mode 100644
index 9e62a720d..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/ftpSshConnection.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Wind River Systems, Inc. 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:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-
-# name/label for this ftp connection
-name = test_ftp_with_ssh
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# FTP system ID
-system_type_id = org.eclipse.rse.tests.systemType.ftpSsh
-
-# Address of ftp connection
-address = unknown
-
-# userid to connect to ftp connection
-userid = unknown
-
-# password to connect to ftp connection
-password = unknown \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/ftpWindowsConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/ftpWindowsConnection.properties
deleted file mode 100644
index 56a977805..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/ftpWindowsConnection.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-# name/label for this ftp connection
-name = test_ftp_only_windows
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# FTP system ID
-system_type_id = org.eclipse.rse.tests.systemType.ftp.windows
-
-# Address of ftp connection
-address = 127.0.0.1
-
-# userid to connect to ftp connection
-userid = d
-
-# password to connect to ftp connection
-password = d \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/linuxConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/linuxConnection.properties
deleted file mode 100644
index cc22636db..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/linuxConnection.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-# Martin Oberhuber (Wind River) - Support REXEC launch type for dstore
-###############################################################################
-
-# name/label for this linux connection
-name = test_linux
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# Linux System ID
-system_type_id = org.eclipse.rse.systemtype.linux
-
-# Address of windows connection
-address = unknown
-
-# userid to connect to linux connection
-userid = unknown
-
-# password to connect to linux connection
-password = unknown
-
-# daemon port used for connecting to this linux connection
-#daemon_port =
-
-# REXEC port used in case of REXEC server launcher
-#rexec_port =
-
-# DStore launch type: one of Daemon, Rexec, Running, Telnet, SSH, FTP, HTTP
-#launch_type = Rexec
-
-# Path to the dstore server.sh on the remote host (for REXEC)
-#dstore_server_path = /folk/mober/RSETest/I20090806-1212/server-unix
-
-# Script to use for launching server.sh on the remote host (need to find a JVM!)
-#dstore_server_script = sh ./server.sh
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/localConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/localConnection.properties
deleted file mode 100644
index 6bcd75c4f..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/localConnection.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-# name/label for this local connection
-name = test_local
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# Local System ID
-system_type_id = org.eclipse.rse.systemtype.local
-
-# Address of local system
-address = localhost \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/sshConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/sshConnection.properties
deleted file mode 100644
index 89b9f113d..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/sshConnection.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-# name/label for this windows connection
-name = test_ssh_only
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# SSH system ID
-system_type_id = org.eclipse.rse.systemtype.ssh
-
-# Address of ssh connection
-address = unknown
-
-# userid to connect to ssh connection
-#userid =
-
-# password to connect to ssh connection
-#password = \ No newline at end of file
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties
deleted file mode 100644
index 3208d4c66..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/sshTerminalConnection.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-
-# name/label for this windows connection
-name = test_ssh_terminals_only
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# SSH system ID
-system_type_id = org.eclipse.rse.tests.systemType.sshTerminal
-
-# Address of ssh connection
-address = unknown
-
-# userid to connect to ssh connection
-userid = unknown
-
-# password to connect to ssh connection
-#password =
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/telnetConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/telnetConnection.properties
deleted file mode 100644
index 603f669af..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/telnetConnection.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-# name/label for this windows connection
-name = test_telnet_only
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# SSH system ID
-system_type_id = org.eclipse.rse.systemtype.telnet
-
-# Address of ssh connection
-address = unknown
-
-# userid to connect to ssh connection
-#userid =
-
-# password to connect to ssh connection
-#password =
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 b43a5f92d..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/testConnectionManager/connection.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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.
-# Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
-###############################################################################
-
-# 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
-system_type_id = org.eclipse.rse.systemtype.windows
-address = 128.0.0.1
-userid = test_user
-password = test_passwd
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/testFTPReadAccessToRemoteHost/connection.properties b/rse/tests/org.eclipse.rse.tests/test.data/testFTPReadAccessToRemoteHost/connection.properties
deleted file mode 100644
index 04c088fc5..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/testFTPReadAccessToRemoteHost/connection.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2007 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.
-# Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
-###############################################################################
-
-# Do not change the properties within this file without changing
-# the consuming unittest too!
-name = test_remote_ftp_only
-profile_name = junit_test_profile
-#system_type = FTP Only
-system_type_id = org.eclipse.rse.systemtype.ftp
-address = gd.tuwien.ac.at
-userid = anonymous
-password = rseunittest@eclipse.org
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/unixConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/unixConnection.properties
deleted file mode 100644
index 35b20f5ce..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/unixConnection.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-# Martin Oberhuber (Wind River) - adapted from Linux
-###############################################################################
-
-# name/label for this dstore-unix connection
-name = test_unix
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# UNIX system ID
-system_type_id = org.eclipse.rse.systemtype.unix
-
-# Address of unix connection
-address = unknown
-
-# userid to connect to unix connection
-userid = unknown
-
-# password to connect to unix connection
-password = unknown
-
-# daemon port used for connecting to this unix connection
-#daemon_port =
-
-# REXEC port used in case of REXEC server launcher
-#rexec_port =
-
-# DStore launch type: one of Daemon, Rexec, Running, Telnet, SSH, FTP, HTTP
-launch_type = Rexec
-
-# Path to the dstore server.sh on the remote host (for REXEC)
-dstore_server_path = /folk/mober/RSETest/I20090806-1212/server-unix
-
-# Script to use for launching server.sh on the remote host (need to find a JVM!)
-dstore_server_script = sh ./server.sh
diff --git a/rse/tests/org.eclipse.rse.tests/test.data/windowsConnection.properties b/rse/tests/org.eclipse.rse.tests/test.data/windowsConnection.properties
deleted file mode 100644
index 57cab23f0..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.data/windowsConnection.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-# name/label for this windows connection
-name = test_windows
-
-# profile name this connection should be created for
-profile_name = junit_test_profile
-
-# Windows system ID
-system_type_id = org.eclipse.rse.systemtype.windows
-
-# Address of windows connection
-address = unknown
-
-# userid to connect to windows connection
-#userid =
-
-# password to connect to windows connection
-#password =
-
-# daemon port used for connecting to this windows connection
-#daemon_port = \ No newline at end of file
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 c1abdb9c3..000000000
--- a/rse/tests/org.eclipse.rse.tests/test.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
- <!--
- Copyright (c) 2005, 2008 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
- -->
-
-<!--
-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="location" value="${eclipse-home}/rse_test_workspace"/>
- <delete dir="${location}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.rse.tests.RSECombinedTestSuite"/>
- </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 the tests -->
- <!-- have been run. You can use this to delete temporary files that are 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>
-
- <!-- This target runs the performance test suites. -->
- <target name="performance">
- </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/rse/tools/org.eclipse.rse.tools.workspace/.project b/rse/tools/org.eclipse.rse.tools.workspace/.project
deleted file mode 100644
index 44a779587..000000000
--- a/rse/tools/org.eclipse.rse.tools.workspace/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.tools.workspace</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/rse/tools/org.eclipse.rse.tools.workspace/extract-source/.cvsignore b/rse/tools/org.eclipse.rse.tools.workspace/extract-source/.cvsignore
deleted file mode 100644
index 6d878c738..000000000
--- a/rse/tools/org.eclipse.rse.tools.workspace/extract-source/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-results
-working \ No newline at end of file
diff --git a/rse/tools/org.eclipse.rse.tools.workspace/extract-source/build.xml b/rse/tools/org.eclipse.rse.tools.workspace/extract-source/build.xml
deleted file mode 100644
index 2e89ac082..000000000
--- a/rse/tools/org.eclipse.rse.tools.workspace/extract-source/build.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-This Ant script will extract the source for projects used by IBM.
-To run this bring the synchronize the workspace with the version you wish to extract
-and run "Ant Build" on this script.
-
-You may wish to modify the zip-file property below prior to running to name the resulting
-zip file appropriately. Be sure to keep it in the results directory.
-
-Results are generated into the workspace, but team support is told to ignore them during
-synchronization so they will not end up in the repository.
--->
-
-<project name="extract" default="main">
-
- <property name="zip-file" value="results/source30_GMa.zip"/>
-
- <target name="main">
- <delete file="#{zip-file}"/>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.core-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.dstore-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.ftp-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.local-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.sdk-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.ssh-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.apache.commons.net"/></antcall>
- <antcall target="process-element"><param name="element" value="org.apache.oro"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.dstore.core"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.dstore.doc.isv"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.dstore.extra"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.connectorservice.dstore"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.connectorservice.local"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.connectorservice.ssh"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.core"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.doc.isv"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.doc.user"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.dstore.security"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.efs"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.efs.ui"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.files.ui"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.importexport"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.processes.ui"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.sdk"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.services"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.services.dstore"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.services.files.ftp"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.services.local"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.services.ssh"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.shells.ui"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.files.core"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.files.dstore"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.files.ftp"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.files.local"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.files.ssh"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.processes.core"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.processes.dstore"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.processes.local"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.processes.shell.linux"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.shells.core"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.shells.dstore"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.shells.local"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.subsystems.shells.ssh"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.useractions"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.useractions-feature"/></antcall>
- <antcall target="process-element"><param name="element" value="org.eclipse.rse.ui"/></antcall>
- </target>
-
- <target name="process-element">
- <echo message="processing ${element}"/>
- <zip destfile="${zip-file}" basedir="../.." update="true">
- <include name="${element}/**"/>
- <exclude name="**/*.gif"/>
- <exclude name="**/*.jpg"/>
- <exclude name="**/*.png"/>
- <exclude name="**/*.zip"/>
- <exclude name="**/*.class"/>
- <exclude name="**/CVS/**"/>
- <exclude name="${element}/bin/**"/>
- </zip>
- </target>
-
-</project>
diff --git a/rse/tools/org.eclipse.rse.tools.workspace/readme.txt b/rse/tools/org.eclipse.rse.tools.workspace/readme.txt
deleted file mode 100644
index efcedf6fc..000000000
--- a/rse/tools/org.eclipse.rse.tools.workspace/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-The purpose of the org.eclipse.rse.tools.meta project is to be a collection point for scripts that
-extract information from the workspace.
-
-Each tool/script should be in its own folder. Results generated from that tool should be stored in the
-results subfolder of that folder.
-
-The working and results subfolders of a tool folder will not be synchronized. \ 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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 6f950b435..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Widget
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal widget \
-with RCP-only dependencies.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 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(TM) 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 b2858e5bc..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/feature.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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:
- Wind River - initial API and implementation
- Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- -->
-<feature
- id="org.eclipse.tm.terminal"
- label="%featureName"
- version="3.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- </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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 b5545ef25..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Widget Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 d309a5158..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Widget Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. 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 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.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 a98d3f1b5..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Widget Source
-providerName=Eclipse.org - DSDP
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 89790a04e..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 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.plugin@org.eclipse.tm.terminal.source=org.eclipse.tm.terminal
-generate.plugin@org.eclipse.tm.terminal.serial.source=org.eclipse.tm.terminal.serial
-generate.plugin@org.eclipse.tm.terminal.ssh.source=org.eclipse.tm.terminal.ssh
-generate.plugin@org.eclipse.tm.terminal.telnet.source=org.eclipse.tm.terminal.telnet
-generate.plugin@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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 467e9854f..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal including \
-plug-ins for Serial, SSH and Telnet connections. Includes Source Code.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 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(TM) 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 1114a8f96..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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:
- Wind River - initial API and implementation
- Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- -->
-<feature
- id="org.eclipse.tm.terminal.sdk"
- label="%featureName"
- version="3.0.100.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.tm.terminal"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.serial"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.ssh"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.telnet"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.view"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.tm.terminal.source"
- download-size="103"
- install-size="107"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.serial.source"
- download-size="117"
- install-size="122"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.ssh.source"
- download-size="133"
- install-size="139"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.telnet.source"
- download-size="155"
- install-size="163"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.view.source"
- download-size="182"
- install-size="191"
- version="0.0.0"
- unpack="false"/>
-
-</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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 c59e11bf1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Serial Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A serial line connector for the Terminal using RXTX API
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 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(TM) 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 9f7902fc1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2006, 2009 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: Wind River - initial API and implementation -->
-<feature
- id="org.eclipse.tm.terminal.serial"
- label="%featureName"
- version="2.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- </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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 9e108fe70..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Serial Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A serial line connector for the Terminal using RXTX API
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 c6566a212..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Serial Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. 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 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.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 f104744aa..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Serial Connector Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.serial/.classpath b/terminal/org.eclipse.tm.terminal.serial/.classpath
deleted file mode 100644
index b978e78e1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.classpath
+++ /dev/null
@@ -1,11 +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">
- <accessrules>
- <accessrule kind="accessible" pattern="gnu/io/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.serial/.cvsignore b/terminal/org.eclipse.tm.terminal.serial/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.serial/.project b/terminal/org.eclipse.tm.terminal.serial/.project
deleted file mode 100644
index a06d0caec..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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 da92ee74f..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/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.terminal.serial;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-Localization: plugin
-Import-Package: gnu.io;resolution:=optional
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Eclipse-BuddyPolicy: ext
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.tm.internal.terminal.serial.Activator
-Export-Package: org.eclipse.tm.internal.terminal.serial;x-internal:=true
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 188bc8f49..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/README.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-Important note:
----------------
-This README is for terminal.serial version 1.0.0 and later, corresponding
-to RSE downloads after 2.0M4. Instructions for previous versions (using
-Sun javacomm / javax.comm package instead of gnu.io) are still available from
-http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial/README.txt?root=DSDP_Project&view=markup&pathrev=R1_0_1
-
-
-Prerequisites:
---------------
-In order to compile and run this plugin, RXTX has to be installed.
-There are two options: Either installing RXTX as an Eclipse plugin,
-or installing RXTX as a JVM extension. For installation as plugin,
-you can download a ZIP archive or use the Update Manager; if an
-Eclipse plugin is not available for your Platform, you'll need
-to install RXTX into the JVM (option B, below).
-
-In either case, once RXTX is installed, you'll need to quit and
-re-start Eclipse PDE in order to recompute the classpath.
-
-
-Option A.1: Installation as an Eclipse Plugin via Update Manager:
------------------------------------------------------------------
-* In Eclipse, choose Help > Software Updates...
- - Add New Remote Site:
- Name = RXTX
- URL = http://rxtx.qbang.org/eclipse/
- - Finish, select proper version, Install All
-
-
-Option A.2: Installation as an Eclipse Plugin via Download:
------------------------------------------------------------
-* Download RXTX SDK or Runtime ZIP from
- http://rxtx.qbang.org/eclipse/downloads/
- and extract it into your Eclipse installation. The download
- link mentioned also has a README with version and licensing
- information.
-
-
-Option B: Installation as a JVM Extension:
-------------------------------------------
-* Get RXTX binaries from
- ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
-* Copy RXTXcomm.jar into $JRE/lib/ext
-* Copy the native libs for your Platform (*.so, *.jnilib, *.dll)
- into the respective native lib folder of your RSE
-* More installation instructions are at
- http://rxtx.qbang.org/wiki/index.php/Main_Page
-* More downloads for other platforms (currently about 30)
- are available from the "ToyBox" link on
- http://users.frii.com/jarvi/rxtx/download.html
-
-
-For help, contact the RXTX mailing list available via the
-RXTX website at http://www.rxtx.org or see the notes on
-https://bugs.eclipse.org/bugs/show_bug.cgi?id=175336
-
-
-Changelog:
-----------
-2.0.1 - Revised Update Site text to comply with P2 in Eclipse 3.4
-1.0.1 - Added options for installing RXTX as an Eclipse Plugin
-0.9.100 - switched from Sun javax.comm to rxtx gnu.io for serial support
-0.9.0 - first version \ 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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 cff34a190..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Serial Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. 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 04e032215..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/build.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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,\
- dsdp32.png
-src.includes = README.txt,\
- about.html
diff --git a/terminal/org.eclipse.tm.terminal.serial/dsdp32.png b/terminal/org.eclipse.tm.terminal.serial/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/dsdp32.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 7d1e22823..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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 = Target Management Terminal Serial Connector
-providerName = Eclipse.org - DSDP
-serialConnection = Serial \ No newline at end of file
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 9fe07138d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006, 2008 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.terminalConnectors">
- <connector name="%serialConnection"
- id="org.eclipse.tm.internal.terminal.serial.SerialConnector"
- class="org.eclipse.tm.internal.terminal.serial.SerialConnector"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java
deleted file mode 100644
index 2fb604714..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.terminal.serial;
-
-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.terminal.serial"; //$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);
- String prop = System.getProperty("gnu.io.rxtx.NoVersionOutput"); //$NON-NLS-1$
- if (prop==null) {
- System.setProperty("gnu.io.rxtx.NoVersionOutput", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /*
- * (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/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java
deleted file mode 100644
index 5fc3a0290..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.terminal.serial;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public interface ISerialSettings {
-
- String getSerialPort();
- int getBaudRate();
- int getDataBits();
- int getStopBits();
- int getParity();
- int getFlowControl();
- int getTimeout();
- String getSummary();
- 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/internal/terminal/serial/SerialConnectWorker.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java
deleted file mode 100644
index 673f1111e..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- * Martin Oberhuber (Wind River) - [207158] improve error message when port not available
- * Martin Oberhuber (Wind River) - [208029] COM port not released after quick disconnect/reconnect
- * Martin Oberhuber (Wind River) - [206884] Update Terminal Ownership ID to "org.eclipse.tm.terminal.serial"
- * Martin Oberhuber (Wind River) - [221184] Redesign Serial Terminal Ownership Handling
- * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.CommPortIdentifier;
-import gnu.io.NoSuchPortException;
-import gnu.io.PortInUseException;
-import gnu.io.SerialPort;
-
-import java.util.Arrays;
-import java.util.Enumeration;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.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;
- }
-
- /**
- * Adds the named port to the name of known ports to rxtx
- * @param name
- */
- void addPort(String name) {
- // Rxtx either takes the connection from the properties OR using
- // the port scan.
- // Unfortunately, setting gnu.io.rxtx.SerialPorts only temporarily does not
- // work, because rxtx closes connections that are unknown.
- // The only solution I could come up with: add the known connections
- // to the gnu.io.rxtx.SerialPorts property....
- final String GNU_IO_RXTX_SERIAL_PORTS = "gnu.io.rxtx.SerialPorts"; //$NON-NLS-1$
- String sep = System.getProperty("path.separator", ":"); //$NON-NLS-1$//$NON-NLS-2$
- // get the existing names
- String names = System.getProperty(GNU_IO_RXTX_SERIAL_PORTS);
- if (names == null) {
- StringBuffer buffer=new StringBuffer();
- boolean sepNeeded=false;
- // When we add a port to this property, rxtx forgets the
- // ports it finds by scanning the system.
-
- // iterate over the known ports and add them to the property
- Enumeration portIdEnum= CommPortIdentifier.getPortIdentifiers();
- while (portIdEnum.hasMoreElements()) {
- CommPortIdentifier identifier = (CommPortIdentifier) portIdEnum.nextElement();
- if (identifier.getPortType() == CommPortIdentifier.PORT_SERIAL) {
- if(sepNeeded)
- buffer.append(sep);
- else
- sepNeeded=true;
- buffer.append(identifier.getName());
- }
- }
- // append our new port
- if(sepNeeded)
- buffer.append(sep);
- buffer.append(name);
-
- System.setProperty(GNU_IO_RXTX_SERIAL_PORTS,buffer.toString());
- } else if (!Arrays.asList(names.split(sep)).contains(name)) {
- // the list does not contain the name, therefore we add it
- // since there is at least one name in the list, we append it
- System.setProperty(GNU_IO_RXTX_SERIAL_PORTS, names + sep + name);
- } else {
- // nothing to do -- should never happen...
- return;
- }
- // Reinitialize the ports because we have changed the list of known ports
- CommPortIdentifier.getPortIdentifiers();
- }
-
- /**
- * Return the ID that this connector uses for RXTX Comm Ownership Handling.
- *
- * Note that this was changed in Terminal 2.0 as per
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=206884 - previous versions
- * of the serial terminal connector used a different string,
- * "org.eclipse.tm.internal.terminal.serial".
- *
- * @since org.eclipse.tm.terminal.serial 2.0
- * @return ownership ID, "org.eclipse.tm.terminal.serial"
- */
- public static final String getOwnershipId() {
- return "org.eclipse.tm.terminal.serial"; //$NON-NLS-1$
- }
-
- public void run() {
- String portName=null;
- final String strID = getOwnershipId();
- SerialPort serialPort = null;
- try {
- ISerialSettings s=fConn.getSerialSettings();
- portName=s.getSerialPort();
- try {
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(portName));
- } catch (NoSuchPortException e) {
- // let's try
- addPort(portName);
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(portName));
- }
- fConn.setSerialPortHandler(new SerialPortHandler(fConn,fControl));
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(portName));
-
- //Bug 221184: Warn about serial port already in use
- String currentOwner = fConn.getSerialPortIdentifier().getCurrentOwner();
- if (strID.equals(currentOwner)) {
- currentOwner = SerialMessages.ANOTHER_TERMINAL;
- }
- final int[] answer = { SWT.YES };
- final String fPortName = portName;
- final String fCurrentOwner = currentOwner;
- if (currentOwner != null) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageBox mb = new MessageBox(fControl.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
- mb.setText(SerialMessages.PROP_TITLE);
- mb.setMessage(NLS.bind(SerialMessages.PORT_IN_USE, fPortName, fCurrentOwner));
- answer[0] = mb.open();
- }
- });
- }
-
- if (answer[0] != SWT.YES) {
- // don't try to steal the port
- fControl.setState(TerminalState.CLOSED);
- fConn.setSerialPortHandler(null);
- return;
- } else {
- // Try to steal the port -- may throw PortInUseException
- int timeoutInMs = s.getTimeout() * 1000;
- 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);
- if (fCurrentOwner != null) {
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.PORT_STOLEN, fPortName, fCurrentOwner));
-
- }
- fControl.setState(TerminalState.CONNECTED);
- }
-
- } catch (PortInUseException portInUseException) {
- fControl.setState(TerminalState.CLOSED);
- String theOwner = portInUseException.currentOwner;
- if (strID.equals(theOwner)) {
- theOwner = SerialMessages.ANOTHER_TERMINAL;
- }
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.PORT_NOT_STOLEN, portName, theOwner));
- } catch (NoSuchPortException e) {
- fControl.setState(TerminalState.CLOSED);
- String msg=e.getMessage();
- if(msg==null)
- msg=portName;
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.NO_SUCH_PORT, msg));
-
- } catch (Exception exception) {
- Logger.logException(exception);
- if (serialPort!=null) {
- //Event listener is removed as part of close(),
- //but exceptions need to be caught to ensure that close() really succeeds
- try {
- serialPort.removeEventListener();
- Thread.sleep(50); //allow a little time for RXTX Native to catch up - makes stuff more stable
- } catch(Exception e) {
- Logger.logException(e);
- }
- serialPort.close();
- fConn.getSerialPortIdentifier().removePortOwnershipListener(fConn.getSerialPortHandler());
- }
- fControl.setState(TerminalState.CLOSED);
- } finally {
- fConn.doneConnect();
- }
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java
deleted file mode 100644
index 9d4314990..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Martin Oberhuber (Wind River) - [206892] Don't connect if already connecting
- * Martin Oberhuber (Wind River) - [208029] COM port not released after quick disconnect/reconnect
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.CommPortIdentifier;
-import gnu.io.SerialPort;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class SerialConnector extends TerminalConnectorImpl {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private SerialPort fSerialPort;
- private CommPortIdentifier fSerialPortIdentifier;
- private SerialPortHandler fTerminalSerialPortHandler;
- private SerialSettings fSettings;
- private SerialConnectWorker fConnectWorker = null;
- private volatile boolean fDisconnectGoingOn = false;
-
- public SerialConnector() {
- }
- public SerialConnector(SerialSettings settings) {
- fSettings=settings;
- }
- public void initialize() throws Exception {
- try {
- fSettings=new SerialSettings();
- } catch (NoClassDefFoundError e) {
- // tell the user how to install the library
- throw new CoreException(new Status(IStatus.WARNING,Activator.PLUGIN_ID,0, SerialMessages.ERROR_LIBRARY_NOT_INSTALLED,e));
- }
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- synchronized(this) {
- if (fConnectWorker!=null || fDisconnectGoingOn) {
- //avoid multiple background connect/disconnect threads at the same time
- return;
- }
- fConnectWorker = new SerialConnectWorker(this, control);
- }
- fControl.setState(TerminalState.CONNECTING);
- fConnectWorker.start();
- }
- /**
- * Indicate that the connectWorker is finished.
- */
- void doneConnect() {
- synchronized(this) {
- fConnectWorker = null;
- }
- }
- public void doDisconnect() {
- synchronized(this) {
- //avoid multiple background connect/disconnect threads at the same time
- if (fConnectWorker!=null) {
- fConnectWorker.interrupt();
- return;
- } else if (fDisconnectGoingOn) {
- return;
- }
- fDisconnectGoingOn = true;
- }
-
- // 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() {
- try {
- if (getSerialPortIdentifier() != null) {
- try {
- getSerialPortIdentifier()
- .removePortOwnershipListener(getSerialPortHandler());
- } catch(Exception e) {
- Logger.logException(e);
- }
- }
-
- if (getSerialPort() != null) {
- //Event listener is removed as part of close(),
- //but exceptions need to be caught to ensure that close() really succeeds
- try {
- getSerialPort().removeEventListener();
- Thread.sleep(50); //allow a little time for RXTX Native to catch up - makes stuff more stable
- } catch(Exception e) {
- Logger.logException(e);
- }
- 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 (getTerminalToRemoteStream() != null) {
- try {
- getTerminalToRemoteStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- setSerialPortIdentifier(null);
- cleanSerialPort();
- setSerialPortHandler(null);
- } catch(Exception e) {
- Logger.logException(e);
- } finally {
- fDisconnectGoingOn = false;
- }
- }
-
- }.start();
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
- private void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- private void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- 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) {
- //System.out.println("setSerialPortId: "+Thread.currentThread().getName()+ " - "+serialPortIdentifier + " - "+System.currentTimeMillis());
- fSerialPortIdentifier = serialPortIdentifier;
- }
- void setSerialPortHandler(SerialPortHandler serialPortHandler) {
- fTerminalSerialPortHandler=serialPortHandler;
- }
- SerialPortHandler getSerialPortHandler() {
- return fTerminalSerialPortHandler;
- }
- /**
- * Return the Serial Settings.
- *
- * @return the settings for a concrete connection.
- */
- public ISerialSettings getSerialSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new SerialSettingsPage(fSettings);
- }
- public String getSettingsSummary() {
- return fSettings.getSummary();
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java
deleted file mode 100644
index 001c6f8be..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Martin Oberhuber (Wind River) - [221184] Redesign Serial Terminal Ownership Handling
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import org.eclipse.osgi.util.NLS;
-public class SerialMessages extends NLS {
- static {
- NLS.initializeMessages(SerialMessages.class.getName(), SerialMessages.class);
- }
- 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 TIMEOUT;
-
- public static String ERROR_LIBRARY_NOT_INSTALLED;
-
- public static String PORT_IN_USE;
- public static String ANOTHER_TERMINAL;
- public static String PORT_STOLEN;
- public static String PORT_NOT_STOLEN;
- public static String NO_SUCH_PORT;
-
- public static String OWNERSHIP_GRANTED;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties
deleted file mode 100644
index e12c88fe3..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-# Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
-# Martin Oberhuber (Wind River) - [221184] Redesign Serial Terminal Ownership Handling
-###############################################################################
-PROP_TITLE = Terminal
-PORT = Port
-BAUDRATE = Baud Rate
-DATABITS = Data Bits
-STOPBITS = Stop Bits
-PARITY = Parity
-FLOWCONTROL = Flow Control
-TIMEOUT = Timeout (sec)
-ERROR_LIBRARY_NOT_INSTALLED = The RXTX library has not been installed properly! \n\
-\n\
-Installation:\n\
--------------\n\
-* Either (a) Use Help > Software Updates, Add Site and install from:\n\
-\ \ \ http://rxtx.qbang.org/eclipse/\n\
-* Or (b) Download and install RXTX for Eclipse from:\n\
-\ \ \ http://rxtx.qbang.org/eclipse/downloads/\n\
-\n\
-For other Platforms, more info and help see\n\
-\ \ \ http://www.rxtx.org/\n\
-\ \ \ https://bugs.eclipse.org/bugs/show_bug.cgi?id=175336#c6\n\
-\n\
-This message is also available in your Error Log for Copy & Paste.
-
-# Port Ownership Handling
-PORT_IN_USE = Serial port \''{0}\'' is currently in use by {1}\!\nDo you want to try and steal the port?
-ANOTHER_TERMINAL = another Terminal View
-PORT_STOLEN = Port \''{0}\'' successfully obtained from {1}\r\n
-PORT_NOT_STOLEN = Connection Error!\r\n \''{0}\'' is already in use by {1}.\r\n
-NO_SUCH_PORT = No such port: \''{0}\''\r\n
-
-OWNERSHIP_GRANTED = Connection canceled due to ownership request from {0}.\r\n \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java
deleted file mode 100644
index 7778b896e..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
- * Martin Oberhuber (Wind River) - [221184] Redesign Serial Terminal Ownership Handling
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.CommPortOwnershipListener;
-import gnu.io.SerialPortEvent;
-import gnu.io.SerialPortEventListener;
-
-import java.io.IOException;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-
-/**
- * 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.getRemoteToTerminalOutputStream().write(bytes, 0, nBytes);
- }
- } catch (IOException ex) {
- fControl.displayTextInTerminal(ex.getMessage());
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- public void onSerialOwnershipRequested(Object data) {
- //Bug 221184: We immediately release the port on any ownership request
- try {
- throw new Exception();
- } catch (Exception e) {
- StackTraceElement[] elems = e.getStackTrace();
- final String requester = elems[elems.length - 4].getClassName();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fConn.disconnect();
- String req = requester;
- String myPackage = this.getClass().getPackage().getName();
- if (req.startsWith(myPackage)) {
- req = SerialMessages.ANOTHER_TERMINAL;
- }
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.OWNERSHIP_GRANTED, req));
- }
- });
- fConn.disconnect();
- }
- }
-
- // 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/internal/terminal/serial/SerialProperties.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java
deleted file mode 100644
index 8be28ba67..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.terminal.serial;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-
-import gnu.io.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/internal/terminal/serial/SerialSettings.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java
deleted file mode 100644
index 7980b7afe..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.terminal.serial;
-
-import gnu.io.SerialPort;
-
-import org.eclipse.tm.internal.terminal.provisional.api.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 getSummary() {
- return getSerialPort() + ", " + //$NON-NLS-1$
- getBaudRateString() + ", " + //$NON-NLS-1$
- getDataBitsString() + ", " + //$NON-NLS-1$
- getStopBitsString() + ", " + //$NON-NLS-1$
- getParityString() + ", " + //$NON-NLS-1$
- getFlowControlString();
- }
-
- 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/internal/terminal/serial/SerialSettingsPage.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java
deleted file mode 100644
index c896ed508..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.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.internal.terminal.provisional.api.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) {
- if((combo.getStyle() & SWT.READ_ONLY)==0) {
- combo.add(value);
- nIndex = combo.indexOf(value);
- } else {
- return;
- }
- }
-
- combo.select(nIndex);
-
- }
- private String getComboValue(Combo combo) {
- int nIndex = combo.getSelectionIndex();
- if (nIndex == -1) {
- if((combo.getStyle() & SWT.READ_ONLY)!=0)
- return ""; //$NON-NLS-1$
- return combo.getText();
- }
-
- return combo.getItem(nIndex);
-
- }
- public boolean validateSettings() {
- try {
- int p = Integer.parseInt(fTimeout.getText().trim());
- if (p < 0) {
- return false;
- }
- } catch (Exception e) {
- return false;
- }
- 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 + ":",false); //$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) {
- return addLabeledCombo(composite, label, true);
- }
- private Combo addLabeledCombo(Composite composite, String label,boolean readonly) {
- new Label(composite, SWT.RIGHT).setText(label);
- int flags=SWT.DROP_DOWN;
- if(readonly)
- flags|=SWT.READ_ONLY;
- Combo combo = new Combo(composite, flags);
- 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);
- }
- }
-}
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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 ef63e8978..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal SSH Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 eeea67e4c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.tm.terminal.ssh"
- label="%featureName"
- version="2.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- <import plugin="org.eclipse.jsch.core" version="1.0.0" match="compatible"/>
- <import plugin="com.jcraft.jsch" version="0.1.31" match="compatible"/>
- </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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 11ec4bab6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal SSH Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 5854f2d18..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal SSH Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2000, 2009. 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 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.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 2e5e7e961..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal SSH Connector Source
-providerName=Eclipse.org - DSDP
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/.cvsignore b/terminal/org.eclipse.tm.terminal.ssh/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.project b/terminal/org.eclipse.tm.terminal.ssh/.project
deleted file mode 100644
index f5d184b60..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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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 ac99ae314..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/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.terminal.ssh;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)",
- com.jcraft.jsch;bundle-version="[0.1.31,1.0.0)",
- org.eclipse.jsch.core;bundle-version="[1.0.0,2.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.tm.internal.terminal.ssh;x-internal:=true
-Bundle-Activator: org.eclipse.tm.internal.terminal.ssh.Activator
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 b4eb8f46c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal SSH Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2000, 2009. 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 cf1dcd3d2..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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,\
- dsdp32.png
-src.includes = about.html
diff --git a/terminal/org.eclipse.tm.terminal.ssh/dsdp32.png b/terminal/org.eclipse.tm.terminal.ssh/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/dsdp32.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 251b02faf..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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 = Target Management Terminal SSH Connector
-providerName = Eclipse.org - DSDP
-sshConnection = SSH \ No newline at end of file
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 f6f2a6f5b..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006, 2008 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.terminalConnectors">
- <connector name="%sshConnection"
- id="org.eclipse.tm.internal.terminal.ssh.SshConnector"
- class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/>
- </extension>
-
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java
deleted file mode 100644
index 09dbc26c6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - [175686] Adapted to new IJSchService API
- * - copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- public static final String PLUGIN_ID = "org.eclipse.tm.terminal.ssh"; //$NON-NLS-1$
- private static Activator plugin;
-
- // ServiceTracker for IJschService
- private ServiceTracker tracker;
-
- /**
- * The constructor
- */
- public Activator() {
- super();
- plugin = this;
- }
-
- //---------------------------------------------------------------------------
- //<copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)>
- //---------------------------------------------------------------------------
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
- tracker.open();
- }
-
- public void stop(BundleContext context) throws Exception {
- try {
- SshConnection.shutdown();
- tracker.close();
- } finally {
- plugin = null;
- super.stop(context);
- }
- }
-
- /**
- * Returns an instance of IJSchService from the OSGi Registry.
- * @return An instance of IJSchService, or <code>null</code> if no
- * IJschService service is available.
- */
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-
- //---------------------------------------------------------------------------
- //</copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)>
- //---------------------------------------------------------------------------
-
- /**
- * 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/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java
deleted file mode 100644
index 0638da25c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 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
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-
-/**
- * Defines the constants used by the terminal.ssh Plugin
- */
-public interface ISshConstants {
-
- // 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/internal/terminal/ssh/ISshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java
deleted file mode 100644
index 4c389be56..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public interface ISshSettings {
- /**
- * Get the host name or IP address of remote system to connect.
- * @return host name or IP address of the remote system.
- */
- String getHost();
-
- /**
- * Get the login name for connecting to the remote system.
- * @return remote login name
- */
- String getUser();
-
- /**
- * Get the password for connecting to the remote system.
- * May be empty if connecting via SSH public key authentication
- * (with or without passphrase).
- * @return password to use
- */
- String getPassword();
-
- /**
- * Get the timeout (in seconds) after which the SSH connection is assumed dead.
- * @return timeout (in seconds) for the SSH connection.
- */
- int getTimeout();
-
- /**
- * Get the keepalive interval (in seconds).
- * After this time of inactivity, the SSH connector will send a message to the
- * remote system in order to avoid timeouts on the remote. A maximum of 6
- * keepalive messages will be sent if enabled. When set to 0, the keepalive
- * feature is disabled.
- * @return interval (in seconds) for keepalive messages.
- */
- int getKeepalive();
-
- /**
- * Get the TCP/IP port on the remote system to use.
- * @return TCP/IP port on the remote system to use.
- */
- int getPort();
-
- /**
- * Return a human-readable String summarizing all relevant connection data.
- * This String can be displayed in the Terminal caption, for instance.
- * @return a human-readable String summarizing relevant connection data.
- */
- String getSummary();
-
- /**
- * Load connection data from a settings store.
- * @param store the settings store to access.
- */
- void load(ISettingsStore store);
-
- /**
- * Store connection data into a settings store.
- * @param store the settings store to access.
- */
- void save(ISettingsStore store);
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java
deleted file mode 100644
index 4b64189af..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.internal.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 cancelled.
- *
- * @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/internal/terminal/ssh/SshConnection.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java
deleted file mode 100644
index 38d9608cb..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- * - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
- * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
- * Mikhail Kalugin <fourdman@xored.com> - [201864] Fix Terminal SSH keyboard interactive authentication
- * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [225792] Rename SshConnector.getTelnetSettings() to getSshSettings()
- * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
- * Martin Oberhuber (Wind River) - [205674][ssh] Terminal remains "connecting" when authentication is cancelled
- * Michael Scharf (Wind River) - 240420: [terminal][ssh]Channel is not closed when the connection is closed with the close button
- * Martin Oberhuber (Wind River) - [206919] Improve SSH Terminal Error Reporting
- * Andrei Sobolev (Xored) - [250456] Ssh banner message causes IllegalArgumentException popup
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
-
-class SshConnection extends Thread {
- private static int fgNo;
- private final ITerminalControl fControl;
- private final SshConnector fConn;
- private Session fSession;
- private boolean fDisconnectHasBeenCalled;
- protected SshConnection(SshConnector conn,ITerminalControl control) {
- super("SshConnection-"+fgNo++); //$NON-NLS-1$
- fControl = control;
- fConn = conn;
- fControl.setState(TerminalState.CONNECTING);
- }
-
- //----------------------------------------------------------------------
- // <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
- //----------------------------------------------------------------------
-
- /**
- * Create a Jsch session.
- * Subclasses can override in order to replace the UserInfo wrapper
- * (for non-interactive usage, for instance), or in order to change
- * the Jsch config (for instance, in order to switch off strict
- * host key checking or in order to add specific ciphers).
- */
- protected Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
- IJSchService service = Activator.getDefault().getJSchService();
- if (service == null)
- return null;
- Session session = service.createSession(hostname, port, username);
- //session.setTimeout(getSshTimeoutInMillis());
- session.setTimeout(0); //never time out on the session
- session.setServerAliveCountMax(6); //give up after 6 tries (remote will be dead after 30 min)
- if (password != null)
- session.setPassword(password);
- session.setUserInfo(wrapperUI);
- return session;
- }
-
- static void shutdown() {
- //TODO: Store all Jsch sessions in a pool and disconnect them on shutdown
- }
-
- //----------------------------------------------------------------------
- // </copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
- //----------------------------------------------------------------------
-
- public void run() {
- boolean connectSucceeded = false;
- String host = ""; //$NON-NLS-1$
- int port = 22;
- try {
- int nTimeout = fConn.getSshSettings().getTimeout() * 1000;
- int nKeepalive = fConn.getSshSettings().getKeepalive() * 1000;
- host = fConn.getSshSettings().getHost();
- String user = fConn.getSshSettings().getUser();
- String password = fConn.getSshSettings().getPassword();
- port = fConn.getSshSettings().getPort();
-
- ////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 session = createSession(user, password, host, port,
- ui, new NullProgressMonitor());
- synchronized (this) {
- fSession = session;
- }
-
- //java.util.Hashtable config=new java.util.Hashtable();
- //config.put("StrictHostKeyChecking", "no");
- //session.setConfig(config);
- //ui.aboutToConnect();
- if (nKeepalive > 0) {
- session.setServerAliveInterval(nKeepalive); //default is 5 minutes
- }
- // dont try to connect if disconnect has been requested already
- synchronized (this) {
- if (fDisconnectHasBeenCalled)
- return;
- }
-
- session.connect(nTimeout); // making connection with timeout.
- // if we got disconnected, do not continue
- if(!isSessionConnected())
- return;
- ChannelShell channel=(ChannelShell) session.openChannel("shell"); //$NON-NLS-1$
- channel.setPtyType("ansi"); //$NON-NLS-1$
- channel.connect();
-
- // maybe the terminal was disconnected while we were connecting
- if (isSessionConnected() && channel.isConnected()) {
- connectSucceeded = true;
- fConn.setInputStream(channel.getInputStream());
- fConn.setOutputStream(channel.getOutputStream());
- fConn.setChannel(channel);
- fControl.setState(TerminalState.CONNECTED);
- try {
- // read data until the connection gets terminated
- readDataForever(fConn.getInputStream());
- } catch (InterruptedIOException e) {
- // we got interrupted: we are done...
- }
- }
- } catch (Exception e) {
- Throwable cause = e;
- while (cause.getCause() != null) {
- cause = cause.getCause();
- }
- String origMsg = cause.getMessage();
- String msg = SshMessages.getMessageFor(cause);
- if ((cause instanceof JSchException) && origMsg != null && origMsg.startsWith("Auth")) { //$NON-NLS-1$
- if (origMsg.indexOf("cancel") >= 0) { //$NON-NLS-1$
- msg = SshMessages.SSH_AUTH_CANCEL;
- } else if (origMsg.indexOf("fail") >= 0) { //$NON-NLS-1$
- msg = SshMessages.SSH_AUTH_FAIL;
- }
- }
- if (!connectSucceeded) {
- String hostPort = host;
- if (port != 22) {
- hostPort = hostPort + ':' + port;
- }
- msg = NLS.bind(SshMessages.ERROR_CONNECTING, hostPort, msg);
- }
- connectFailed(msg, msg);
- } finally {
- // make sure the terminal is disconnected when the thread ends
- try {
- disconnect();
- } finally {
- // when reading is done, we set the state to closed
- fControl.setState(TerminalState.CLOSED);
- }
- }
- }
-
- private synchronized boolean isSessionConnected() {
- return !fDisconnectHasBeenCalled && fSession != null && fSession.isConnected();
- }
-
- /**
- * disconnect the ssh session
- */
- void disconnect() {
- interrupt();
- synchronized (this) {
- fDisconnectHasBeenCalled=true;
- if(fSession!=null) {
- try {
- fSession.disconnect();
- } catch (Exception e) {
- // Ignore NPE due to bug in JSch if disconnecting
- // while not yet authenticated
- }
- fSession=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];
- int n;
- // read until the thread gets interrupted....
- while( (n=in.read(bytes))!=-1) {
- fControl.getRemoteToTerminalOutputStream().write(bytes,0,n);
- }
- }
-
- protected static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if( display==null ) {
- display = Display.getDefault();
- }
- return display;
- }
-
- private class MyUserInfo implements UserInfo, UIKeyboardInteractive {
- 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() {
- // [168197] Replace JFace MessagDialog by SWT MessageBox
- //retval[0] = MessageDialog.openQuestion(null, SshMessages.WARNING, str);
- if (isSessionConnected()) {
- MessageBox mb = new MessageBox(fControl.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
- mb.setText(SshMessages.WARNING);
- mb.setMessage(str);
- retval[0] = (mb.open() == SWT.YES);
- } else {
- retval[0] = false;
- }
- }
- });
- return retval[0];
- }
- private String promptSecret(final String message) {
- final String[] retval = new String[1];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- if (isSessionConnected()) {
- UserValidationDialog uvd = new UserValidationDialog(null, fConnectionId, fUser, message);
- uvd.setUsernameMutable(false);
- if (uvd.open() == Window.OK) {
- retval[0] = uvd.getPassword();
- } else {
- retval[0] = null;
- }
- } 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() {
- // [168197] Replace JFace MessagDialog by SWT MessageBox
- // MessageDialog.openInformation(null, SshMessages.INFO, message);
- if (isSessionConnected()) {
- MessageBox mb = new MessageBox(fControl.getShell(), SWT.ICON_INFORMATION | SWT.OK);
- mb.setText(SshMessages.INFO);
- mb.setMessage(message);
- mb.open();
- }
- }
- });
- }
- 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() {
- if (isSessionConnected()) {
- KeyboardInteractiveDialog dialog = new KeyboardInteractiveDialog(null, fConnectionId, destination, name, instruction, prompt, echo);
- dialog.open();
- finResult[0] = dialog.getResult();
- } else {
- finResult[0] = null; // indicate cancel to JSch
- }
- }
- });
- String[] result=finResult[0];
- if (result == null)
- return null; // cancelled
- 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;
- }
- }
- }
-
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- // fControl.setMsg(msg);
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java
deleted file mode 100644
index 0ebfb5968..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Martin Oberhuber (Wind River) - [225792] Rename SshConnector.getTelnetSettings() to getSshSettings()
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.JSch;
-
-public class SshConnector extends TerminalConnectorImpl {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private JSch fJsch;
- private ChannelShell fChannel;
- private SshConnection fConnection;
- private final SshSettings fSettings;
- private int fWidth;
- private int fHeight;
- public SshConnector() {
- this(new SshSettings());
- }
- public SshConnector(SshSettings settings) {
- fSettings=settings;
- }
- public void initialize() throws Exception {
- fJsch=new JSch();
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fConnection = new SshConnection(this,control);
- fConnection.start();
- }
- synchronized public void doDisconnect() {
- fConnection.disconnect();
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getTerminalToRemoteStream() != null) {
- try {
- getTerminalToRemoteStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- if(fChannel!=null && (newWidth!=fWidth || newHeight!=fHeight)) {
- //avoid excessive communications due to change size requests by caching previous size
- fChannel.setPtySize(newWidth, newHeight, 8*newWidth, 8*newHeight);
- fWidth=newWidth;
- fHeight=newHeight;
- }
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
- void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- /**
- * Return the SSH Settings.
- *
- * @return the settings for a concrete connection.
- * @since org.eclipse.tm.terminal.ssh 2.0 renamed from getTelnetSettings()
- */
- public ISshSettings getSshSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new SshSettingsPage(fSettings);
- }
- public String getSettingsSummary() {
- return fSettings.getSummary();
- }
- 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;
- fWidth=-1;
- fHeight=-1;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java
deleted file mode 100644
index 85a1a0fd1..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [206919] Improve SSH Terminal Error Reporting (Adopting code from org.eclipse.team.cvs.core)
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import java.lang.reflect.Field;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshMessages extends NLS {
- static {
- NLS.initializeMessages(SshMessages.class.getName(), SshMessages.class);
- }
- public static String USER;
- public static String HOST;
- public static String PORT;
- public static String PASSWORD;
- public static String TIMEOUT;
- public static String KEEPALIVE;
- public static String KEEPALIVE_Tooltip;
- 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;
-
- public static String ERROR_CONNECTING;
- public static String TerminalCommunicationException_io;
- public static String SSH_AUTH_CANCEL;
- public static String SSH_AUTH_FAIL;
- public static String com_jcraft_jsch_JSchException;
- public static String java_io_IOException;
- public static String java_io_EOFException;
- public static String java_io_InterruptedIOException;
- public static String java_net_UnknownHostException;
- public static String java_net_ConnectException;
- public static String java_net_SocketException;
- public static String java_net_NoRouteToHostException;
-
- // <Copied from org.eclipse.team.cvs.core / CVSCommunicationException (c) IBM 2000, 2007>
-
- public static String getMessageFor(Throwable throwable) {
- String message = getMessage(getMessageKey(throwable));
- if (message == null) {
- message = NLS.bind(SshMessages.TerminalCommunicationException_io, (new Object[] { throwable.toString() }));
- } else {
- message = NLS.bind(message, (new Object[] { throwable.getMessage() }));
- }
- return message;
- }
-
- private static String getMessageKey(Throwable t) {
- String name = t.getClass().getName();
- name = name.replace('.', '_');
- return name;
- }
-
- // </Copied from org.eclipse.team.cvs.core / CVSCommunicationException>
- // <Copied from org.eclipse.team.cvs.core / Policy (c) IBM 2000, 2005>
-
- public static String getMessage(String key) {
- try {
- Field f = SshMessages.class.getDeclaredField(key);
- Object o = f.get(null);
- if (o instanceof String)
- return (String) o;
- } catch (SecurityException e) {
- } catch (NoSuchFieldException e) {
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- }
- return null;
- }
-
- // </Copied from org.eclipse.team.cvs.core / Policy>
-
- }
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties
deleted file mode 100644
index c28524f46..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 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
-# Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
-# Martin Oberhuber (Wind River) - [206919] Improve SSH Terminal Error Reporting (Adopting code from org.eclipse.team.cvs.core)
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-HOST = Host
-USER = User
-PORT = Port
-PASSWORD = Password
-TIMEOUT = Timeout (sec)
-KEEPALIVE = KeepAlive (sec)
-KEEPALIVE_Tooltip=Interval for sending keepalive messages in case of inactivity. Enter 0 to disable keepalives.
-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}
-
-#<Copied> from org.eclipse.team.cvs.core/messages.properties (c) IBM 2000, 2007
-ERROR_CONNECTING=Error connecting {0} : {1}
-TerminalCommunicationException_io=Communication error: {0}
-SSH_AUTH_CANCEL=SSH Authentication cancelled.
-SSH_AUTH_FAIL=SSH Authentication failed.
-com_jcraft_jsch_JSchException=SSH client error: {0}
-java_io_IOException=I/O exception occurred: {0}
-java_io_EOFException=End of file encountered: {0}
-java_io_InterruptedIOException=I/O has been interrupted.
-java_net_UnknownHostException=Cannot locate host: {0}
-java_net_ConnectException=Cannot connect to host: {0}
-java_net_SocketException=Socket Exception: {0}
-java_net_NoRouteToHostException={0}
-#</Copied> from org.eclipse.team.cvs.core
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java
deleted file mode 100644
index 3aa995368..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Mikhail Kalugin <fourdman@xored.com> - [201867] Improve Terminal SSH connection summary string
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public class SshSettings implements ISshSettings {
- protected String fHost;
- protected String fUser;
- protected String fPassword;
- protected String fPort;
- protected String fTimeout;
- protected String fKeepalive;
- public String getHost() {
- return fHost;
- }
-
- public void setHost(String strHost) {
- fHost = strHost;
- }
-
- public String getSummary() {
- String settings = getUser()+'@'+getHost();
- if(getPort()!=22) {
- settings += ':' + getPort();
- }
- return settings;
- }
-
- 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$
- fKeepalive = store.get("Keepalive");//$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$
- store.put("Keepalive", fKeepalive);//$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 int getKeepalive() {
- try {
- return Integer.parseInt(fKeepalive);
- } catch (NumberFormatException numberFormatException) {
- return 300;
- }
- }
- public String getKeepaliveString() {
- return fKeepalive;
- }
-
- public void setKeepalive(String keepalive) {
- fKeepalive = keepalive;
- }
-
- 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/internal/terminal/ssh/SshSettingsPage.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java
deleted file mode 100644
index bf21bc467..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- *******************************************************************************/
-package org.eclipse.tm.internal.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.internal.terminal.provisional.api.ISettingsPage;
-
-public class SshSettingsPage implements ISettingsPage {
- private Text fHostText;
- private Text fUser;
- private Text fTimeout;
- private Text fKeepalive;
- 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());
- fTerminalSettings.setKeepalive(fKeepalive.getText());
- }
-
- public void loadSettings() {
- if(fTerminalSettings!=null) {
- fHostText.setText(get(fTerminalSettings.getHost(),""));//$NON-NLS-1$
- fTimeout.setText(get(fTerminalSettings.getTimeoutString(),"0"));//$NON-NLS-1$
- fKeepalive.setText(get(fTerminalSettings.getKeepaliveString(),"300"));//$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() {
- if (fHostText.getText().trim().length() == 0) {
- return false;
- }
- if (fUser.getText().trim().length() == 0) {
- return false;
- }
- try {
- int p = Integer.parseInt(fPort.getText().trim());
- if (p <= 0 || p > 65535) {
- return false;
- }
- p = Integer.parseInt(fTimeout.getText().trim());
- if (p < 0) {
- return false;
- }
- p = Integer.parseInt(fKeepalive.getText().trim());
- if (p < 0) {
- return false;
- }
- } catch (Exception e) {
- return false;
- }
- 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);
- fKeepalive = createTextField(composite, SshMessages.KEEPALIVE);
- fKeepalive.setToolTipText(SshMessages.KEEPALIVE_Tooltip);
- 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);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java
deleted file mode 100644
index c7c05c040..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.internal.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 cancelled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the username entered by the user, or null
- * if the user cancelled.
- *
- * @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.telnet-feature/.project b/terminal/org.eclipse.tm.terminal.telnet-feature/.project
deleted file mode 100644
index c78da8d1f..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.telnet-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.telnet-feature/build.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/build.properties
deleted file mode 100644
index f3dfb1541..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 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.telnet-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties
deleted file mode 100644
index a69e34e5e..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Telnet Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A Telnet connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 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(TM) 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.telnet-feature/feature.xml b/terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml
deleted file mode 100644
index 3df4148f4..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2007, 2009 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: Wind River - initial API and implementation --> <feature
- id="org.eclipse.tm.terminal.telnet"
- label="%featureName"
- version="2.0.101.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.telnet"
- download-size="19"
- install-size="35"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/license.html b/terminal/org.eclipse.tm.terminal.telnet-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-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.telnet-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index c20c9c045..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Telnet Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A Telnet connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 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(TM) 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.telnet-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-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.telnet-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-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 5, 2007</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.telnet-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-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=dsdp32.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.telnet-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-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.telnet-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index e33b8bcca..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Telnet Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 43d853d8c..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Telnet Connector Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.telnet/.classpath b/terminal/org.eclipse.tm.terminal.telnet/.classpath
deleted file mode 100644
index 73022aacf..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/.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/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.telnet/.cvsignore b/terminal/org.eclipse.tm.terminal.telnet/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.telnet/.project b/terminal/org.eclipse.tm.terminal.telnet/.project
deleted file mode 100644
index 157186542..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.telnet</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 64e23de57..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,75 +0,0 @@
-#Fri Apr 11 02:37:35 CEST 2008
-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.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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.4
diff --git a/terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.ui.prefs b/terminal/org.eclipse.tm.terminal.telnet/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 9a20fca52..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/.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.telnet/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.telnet/META-INF/MANIFEST.MF
deleted file mode 100644
index 18c918a31..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/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.telnet;singleton:=true
-Bundle-Version: 2.0.101.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.tm.internal.terminal.telnet;x-internal:=true
diff --git a/terminal/org.eclipse.tm.terminal.telnet/about.html b/terminal/org.eclipse.tm.terminal.telnet/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/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 5, 2007</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.telnet/about.ini b/terminal/org.eclipse.tm.terminal.telnet/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/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=dsdp32.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.telnet/about.mappings b/terminal/org.eclipse.tm.terminal.telnet/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/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.telnet/about.properties b/terminal/org.eclipse.tm.terminal.telnet/about.properties
deleted file mode 100644
index c42eab9cb..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Telnet Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.telnet/build.properties b/terminal/org.eclipse.tm.terminal.telnet/build.properties
deleted file mode 100644
index 6fc5d7df7..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/build.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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,\
- about.html,about.ini,about.mappings,about.properties,\
- dsdp32.png
-
-source.. = src/
-output.. = bin/
-src.includes = about.html
-
diff --git a/terminal/org.eclipse.tm.terminal.telnet/dsdp32.png b/terminal/org.eclipse.tm.terminal.telnet/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.telnet/plugin.properties b/terminal/org.eclipse.tm.terminal.telnet/plugin.properties
deleted file mode 100644
index b299fb87f..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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 = Target Management Terminal Telnet Connector
-providerName = Eclipse.org - DSDP
-telnetConnection = Telnet
diff --git a/terminal/org.eclipse.tm.terminal.telnet/plugin.xml b/terminal/org.eclipse.tm.terminal.telnet/plugin.xml
deleted file mode 100644
index 342c1f227..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-# Copyright (c) 2006, 2008 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.terminalConnectors">
- <connector name="%telnetConnection"
- id="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"
- class="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/ITelnetSettings.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/ITelnetSettings.java
deleted file mode 100644
index c18879d45..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/ITelnetSettings.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.terminal.telnet;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public interface ITelnetSettings {
- String getHost();
- int getNetworkPort();
- int getTimeout();
- String getSummary();
- void load(ISettingsStore store);
- void save(ISettingsStore store);
-}
diff --git a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/NetworkPortMap.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/NetworkPortMap.java
deleted file mode 100644
index 66e4e7786..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/NetworkPortMap.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.terminal.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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetCodes.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetCodes.java
deleted file mode 100644
index 1b9055c20..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetCodes.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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.internal.terminal.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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java
deleted file mode 100644
index 4c1dcc42e..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnectWorker.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- * Uwe Stieber (Wind River) - [287158][terminal][telnet] Connect worker is giving up to early
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.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.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.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() {
- // Retry the connect with after a little pause in case the
- // remote telnet server isn't ready. ConnectExceptions might
- // happen if the telnet server process did not initialized itself.
- // This is seen especially if the telnet server is a process
- // providing it's input and output via a built in telnet server.
- int remaining = 10;
-
- while (remaining >= 0) {
- // Pause before we re-try if the remaining tries are less than the initial value
- if (remaining < 10) try { Thread.sleep(500); } catch (InterruptedException e) { /* ignored on purpose */ }
-
- 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);
-
- // If we get to this point, the connect succeeded and we will
- // force the remaining counter to be 0.
- remaining = 0;
-
- // 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) {
- // No re-try in case of UnknownHostException, there is no indication that
- // the DNS will fix itself
- remaining = 0;
- //Construct error message and signal failed
- 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) {
- // Time out occurred. No re-try in this case either. Time out can
- // be increased by the user. Multiplying the timeout with the remaining
- // counter is not desired.
- remaining = 0;
- // Construct error message and signal failed
- connectFailed(socketTimeoutException.getMessage(), "Connection Error!\n" + socketTimeoutException.getMessage()); //$NON-NLS-1$
- } catch (ConnectException connectException) {
- // In case of a ConnectException, do a re-try. The server could have been
- // simply not ready yet and the worker would give up to early.
- if (remaining == 0) connectFailed(connectException.getMessage(),"Connection refused!"); //$NON-NLS-1$
- } catch (Exception exception) {
- // Any other exception on connect. No re-try in this case either
- remaining = 0;
- // Log the exception
- Logger.logException(exception);
- // And signal failed
- connectFailed(exception.getMessage(),""); //$NON-NLS-1$
- } finally {
- remaining--;
- }
- }
- }
-
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- fConn.cleanSocket();
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg(msg);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java
deleted file mode 100644
index 492b57285..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnection.java
+++ /dev/null
@@ -1,690 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Michael Scharf (Wind River) - [209665] Add ability to log byte streams from terminal
- * Alex Panchenko (Xored) - [277061] TelnetConnection.isConnected() should check if socket was not closed
- * Uwe Stieber (Wind River) - [281329] Telnet connection not handling "SocketException: Connection reset" correct
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.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.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.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() && !socket.isClosed();
- }
-
- /**
- * 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 displayTextInTerminal(String string) {
- terminalControl.displayTextInTerminal(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.
-
- displayTextInTerminal(TelnetMessages.CONNECTION_CLOSED_BY_FOREIGN_HOST);
-
- // Tell the ITerminalControl object that the connection is
- // closed.
- terminalControl.setState(TerminalState.CLOSED);
- break;
- } else {
- // 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) {
- terminalControl.getRemoteToTerminalOutputStream().write(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.equalsIgnoreCase("Socket closed") && !message.equalsIgnoreCase("Connection reset")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- Logger.logException(ex);
- }
-
- // Tell the ITerminalControl object that the connection is
- // closed.
- terminalControl.setState(TerminalState.CLOSED);
- } 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 sub-negotiation is delegated to instances of TelnetOption.
- *
- * @return The number of bytes remaining in the buffer after removing all
- * TELNET protocol bytes.
- */
- //TELNET option state is stored in instances of TelnetOption.
- 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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java
deleted file mode 100644
index d9e57a070..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetConnector.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- * Sean Adams (Cisco) - [231959][terminal][telnet] NPE in TelnetConnector.java
- * David Sciamma (Anyware-Tech) - [288254][telnet] local echo is always disabled
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.telnet;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class TelnetConnector extends TerminalConnectorImpl {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private Socket fSocket;
- private TelnetConnection fTelnetConnection;
- private final TelnetSettings fSettings;
- private int fWidth = -1;
- private int fHeight = -1;
-
- public TelnetConnector() {
- this(new TelnetSettings());
- }
- public TelnetConnector(TelnetSettings settings) {
- fSettings=settings;
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fWidth=-1;
- fHeight=-1;
- TelnetConnectWorker worker = new TelnetConnectWorker(this,control);
- worker.start();
- }
- public void doDisconnect() {
- 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 (getTerminalToRemoteStream() != null) {
- try {
- getTerminalToRemoteStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- cleanSocket();
- }
- public boolean isLocalEcho() {
- if(fTelnetConnection==null)
- return false;
- return fTelnetConnection.localEcho();
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- if(fTelnetConnection!=null && (newWidth!=fWidth || newHeight!=fHeight)) {
- //avoid excessive communications due to change size requests by caching previous size
- fTelnetConnection.setTerminalSize(newWidth, newHeight);
- fWidth=newWidth;
- fHeight=newHeight;
- }
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getTerminalToRemoteStream() {
- 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 displayTextInTerminal(String text) {
- fControl.displayTextInTerminal(text);
- }
- public OutputStream getRemoteToTerminalOutputStream () {
- return fControl.getRemoteToTerminalOutputStream();
- }
- public void setState(TerminalState state) {
- fControl.setState(state);
- }
- public ITelnetSettings getTelnetSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new TelnetSettingsPage(fSettings);
- }
- public String getSettingsSummary() {
- return fSettings.getSummary();
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.java
deleted file mode 100644
index a30525005..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.terminal.telnet;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TelnetMessages extends NLS {
- static {
- NLS.initializeMessages(TelnetMessages.class.getName(), TelnetMessages.class);
- }
- 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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.properties b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.properties
deleted file mode 100644
index 31bf348bd..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetMessages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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 = Port
-HOST = Host
-CONNECTION_CLOSED_BY_FOREIGN_HOST= Connection closed by foreign host.
-TIMEOUT = Timeout (sec)
diff --git a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetOption.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetOption.java
deleted file mode 100644
index 76596a430..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetOption.java
+++ /dev/null
@@ -1,703 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Martin Oberhuber (Wind River) - [267181] Fix telnet option negotiation loop
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.telnet;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Date;
-
-import org.eclipse.tm.internal.terminal.provisional.api.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 labeled 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 negotiation
- * 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).
-
- Thread t=new Thread() {
- public void run() {
- try {
- outputStream.write(NAWSDataFinal);
- } catch (IOException ex) {
- Logger.log("IOException sending NAWS subnegotiation!"); //$NON-NLS-1$
- Logger.logException(ex);
- }
- }
- };
- t.setDaemon(true);
- t.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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetProperties.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetProperties.java
deleted file mode 100644
index 7c0a378f2..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetProperties.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.terminal.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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettings.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettings.java
deleted file mode 100644
index 0518b25d6..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettings.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.terminal.telnet;
-
-import org.eclipse.tm.internal.terminal.provisional.api.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 getSummary() {
- return getHost() + ":" + getNetworkPortString(); //$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.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettingsPage.java b/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettingsPage.java
deleted file mode 100644
index 526b355a2..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet/src/org/eclipse/tm/internal/terminal/telnet/TelnetSettingsPage.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.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.internal.terminal.provisional.api.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() {
- if (fHostText.getText().trim().length() == 0) {
- return false;
- }
- try {
- int p = Integer.parseInt(getNetworkPort().trim());
- if (p <= 0 || p > 65535) {
- return false;
- }
- p = Integer.parseInt(fTimeout.getText().trim());
- if (p < 0) {
- return false;
- }
- } catch (Exception e) {
- return false;
- }
- 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);
- }
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/.project b/terminal/org.eclipse.tm.terminal.test-feature/.project
deleted file mode 100644
index e5464802a..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.test-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.test-feature/build.properties b/terminal/org.eclipse.tm.terminal.test-feature/build.properties
deleted file mode 100644
index 1d1df4013..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-src.includes = epl-v10.html,\
- license.html
-root=rootfiles
-generate.plugin@org.eclipse.tm.terminal.test.source=org.eclipse.tm.terminal.test
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/feature.properties b/terminal/org.eclipse.tm.terminal.test-feature/feature.properties
deleted file mode 100644
index aff961def..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Unit Tests
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=TM Terminal Unit Tests. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2007, 2009 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(TM) 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.test-feature/feature.xml b/terminal/org.eclipse.tm.terminal.test-feature/feature.xml
deleted file mode 100644
index 781d47732..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/feature.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2008, 2009 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: Wind River - initial API and implementation --> <feature
- id="org.eclipse.tm.terminal.test"
- label="%featureName"
- version="2.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- <import plugin="org.junit" version="3.8.1" match="compatible"/>
- <import plugin="org.apache.ant"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.test"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.test.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/license.html b/terminal/org.eclipse.tm.terminal.test-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.test-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.test-feature/rootfiles/epl-v10.html b/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html b/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html
deleted file mode 100644
index a9b560f44..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.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.test-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.test-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 5, 2007</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.test-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 52b7dcea9..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2007, 2008 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/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 3955f58c1..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal Unit Tests Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.test/.classpath b/terminal/org.eclipse.tm.terminal.test/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.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/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.test/.cvsignore b/terminal/org.eclipse.tm.terminal.test/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.test/.project b/terminal/org.eclipse.tm.terminal.test/.project
deleted file mode 100644
index 492f603b4..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.test</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/terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ac884dbd2..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,83 +0,0 @@
-#Fri Apr 11 20:49:09 CEST 2008
-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.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-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=warning
-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.fatalOptionalError=enabled
-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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=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.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-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.unusedParameterIncludeDocCommentReference=enabled
-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.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.4
diff --git a/terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 25e38ba28..000000000
--- a/terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.test;singleton:=true
-Bundle-Version: 2.0.101.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.junit,
- org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)",
- org.eclipse.core.runtime,
- org.eclipse.ui
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.tm.internal.terminal.connector;x-internal:=true,
- org.eclipse.tm.internal.terminal.emulator;x-internal:=true,
- org.eclipse.tm.internal.terminal.model;x-internal:=true,
- org.eclipse.tm.internal.terminal.speedtest;x-internal:=true,
- org.eclipse.tm.internal.terminal.test.terminalcanvas;x-internal:=true,
- org.eclipse.tm.internal.terminal.test.ui;x-internal:=true,
- org.eclipse.tm.internal.terminal.textcanvas;x-internal:=true,
- org.eclipse.tm.terminal.model,
- org.eclipse.tm.terminal.test
diff --git a/terminal/org.eclipse.tm.terminal.test/about.html b/terminal/org.eclipse.tm.terminal.test/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal.test/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 5, 2007</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.test/about.ini b/terminal/org.eclipse.tm.terminal.test/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.test/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=dsdp32.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.test/about.mappings b/terminal/org.eclipse.tm.terminal.test/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.test/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.test/about.properties b/terminal/org.eclipse.tm.terminal.test/about.properties
deleted file mode 100644
index 360731b9e..000000000
--- a/terminal/org.eclipse.tm.terminal.test/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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=TM Terminal Unit Tests\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2007, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.test/build.properties b/terminal/org.eclipse.tm.terminal.test/build.properties
deleted file mode 100644
index b31722e0c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/build.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- about.properties,\
- about.mappings,\
- about.ini,\
- dsdp32.png,\
- test.xml,\
- about.html
-javacSource=1.4
-javacTarget=1.4
-src.includes = .settings/,\
- build.properties,\
- teamConfig/,\
- about.html
diff --git a/terminal/org.eclipse.tm.terminal.test/dsdp32.png b/terminal/org.eclipse.tm.terminal.test/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.test/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.test/plugin.properties b/terminal/org.eclipse.tm.terminal.test/plugin.properties
deleted file mode 100644
index 5c9a30b72..000000000
--- a/terminal/org.eclipse.tm.terminal.test/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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) - initial API and implementation
-###############################################################################
-pluginName = Target Management Terminal Tests
-providerName = Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.test/plugin.xml b/terminal/org.eclipse.tm.terminal.test/plugin.xml
deleted file mode 100644
index b70f3319b..000000000
--- a/terminal/org.eclipse.tm.terminal.test/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006, 2008 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
-# Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
--->
-<plugin>
- <extension
- point="org.eclipse.tm.terminal.terminalConnectors">
- <connector
- class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
- id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
- name="Speed Test"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
deleted file mode 100644
index 105b43e55..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class TerminalConnectorFactoryTest extends TestCase {
- public class SettingsMock implements ISettingsStore {
-
- public String get(String key) {
- return null;
- }
-
- public String get(String key, String defaultValue) {
- return null;
- }
-
- public void put(String key, String value) {
- }
-
- }
- public static class TerminalControlMock implements ITerminalControl {
-
- public void setEncoding(String encoding) {
- }
-
- public String getEncoding() {
- return "ISO-8859-1"; //$NON-NLS-1$
- }
-
- public void displayTextInTerminal(String text) {
- }
-
- public OutputStream getRemoteToTerminalOutputStream() {
- return null;
- }
-
- public Shell getShell() {
- return null;
- }
-
- public TerminalState getState() {
- return null;
- }
-
- public void setMsg(String msg) {
- }
-
- public void setState(TerminalState state) {
- }
-
- public void setTerminalTitle(String title) {
- }
-
- }
- static class ConnectorMock extends TerminalConnectorImpl {
-
- public boolean fEcho;
- public int fWidth;
- public int fHeight;
- public ITerminalControl fControl;
- public ISettingsStore fSaveStore;
- public ISettingsStore fLoadStore;
- public boolean fDisconnect;
-
- public boolean isLocalEcho() {
- return fEcho;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- fWidth=newWidth;
- fHeight=newHeight;
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fControl = control;
- }
- public void doDisconnect() {
- fDisconnect=true;
- }
-
- public OutputStream getTerminalToRemoteStream() {
- return null;
- }
-
- public String getSettingsSummary() {
- return "Summary";
- }
-
- public void load(ISettingsStore store) {
- fLoadStore=store;
- }
-
- public ISettingsPage makeSettingsPage() {
- return new ISettingsPage(){
- public void createControl(Composite parent) {
- }
- public void loadSettings() {
- }
- public void saveSettings() {
- }
- public boolean validateSettings() {
- return false;
- }};
- }
-
- public void save(ISettingsStore store) {
- fSaveStore=store;
- }
- }
- protected TerminalConnector makeTerminalConnector() {
- return makeTerminalConnector(new ConnectorMock());
- }
-
- protected TerminalConnector makeTerminalConnector(final TerminalConnectorImpl mock) {
- TerminalConnector c=new TerminalConnector(new TerminalConnector.Factory(){
- public TerminalConnectorImpl makeConnector() throws Exception {
- return mock;
- }
- },"xID","xName", false);
- return c;
- }
-
- public void testGetInitializationErrorMessage() {
- TerminalConnector c=makeTerminalConnector();
- c.connect(new TerminalControlMock());
- assertNull(c.getInitializationErrorMessage());
-
- c=makeTerminalConnector(new ConnectorMock(){
- public void initialize() throws Exception {
- throw new Exception("FAILED");
- }});
- c.connect(new TerminalControlMock());
- assertEquals("FAILED",c.getInitializationErrorMessage());
-
- }
-
- public void testGetIdAndName() {
- TerminalConnector c=makeTerminalConnector();
- assertEquals("xID", c.getId());
- assertEquals("xName", c.getName());
- }
-
- public void testIsInitialized() {
- TerminalConnector c=makeTerminalConnector();
- assertFalse(c.isInitialized());
- c.getId();
- assertFalse(c.isInitialized());
- c.getName();
- assertFalse(c.isInitialized());
- c.getSettingsSummary();
- assertFalse(c.isInitialized());
- c.setTerminalSize(10,10);
- assertFalse(c.isInitialized());
- c.load(null);
- assertFalse(c.isInitialized());
- c.save(null);
- assertFalse(c.isInitialized());
- if (!Platform.isRunning()) return;
- c.getAdapter(ConnectorMock.class);
- assertFalse(c.isInitialized());
- }
-
- public void testConnect() {
- TerminalConnector c=makeTerminalConnector();
- assertFalse(c.isInitialized());
- c.connect(new TerminalControlMock());
- assertTrue(c.isInitialized());
-
- }
-
- public void testDisconnect() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- c.disconnect();
- assertTrue(mock.fDisconnect);
- }
-
- public void testGetTerminalToRemoteStream() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- assertSame(mock.fControl,control);
- }
- public void testGetSettingsSummary() {
- TerminalConnector c=makeTerminalConnector();
- assertEquals("Not Initialized", c.getSettingsSummary());
- c.connect(new TerminalControlMock());
- assertEquals("Summary", c.getSettingsSummary());
- }
-
- public void testIsLocalEcho() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- assertFalse(c.isLocalEcho());
- mock.fEcho=true;
- assertTrue(c.isLocalEcho());
- }
-
- public void testLoad() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- ISettingsStore s=new SettingsMock();
- c.load(s);
- // the load is called after the connect...
- assertNull(mock.fLoadStore);
- c.connect(new TerminalControlMock());
- assertSame(s,mock.fLoadStore);
- }
-
- public void testSave() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- ISettingsStore s=new SettingsMock();
- c.save(s);
- assertNull(mock.fSaveStore);
- c.connect(new TerminalControlMock());
- c.save(s);
- assertSame(s,mock.fSaveStore);
- }
-
- public void testMakeSettingsPage() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- assertNotNull(c.makeSettingsPage());
- }
-
- public void testSetTerminalSize() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- c.setTerminalSize(100, 200);
-
- }
-
- public void testGetAdapter() {
- if (!Platform.isRunning()) return;
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- assertNull(c.getAdapter(ConnectorMock.class));
- // the load is called after the connect...
- c.connect(new TerminalControlMock());
-
- assertSame(mock, c.getAdapter(ConnectorMock.class));
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
deleted file mode 100644
index 799bd2bc1..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-
-package org.eclipse.tm.internal.terminal.connector;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnectorTest.ConnectorMock;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnectorTest.SimpleFactory;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnectorTest.TerminalControlMock;
-
-/**
- * Testcase for TerminalConnector that must run as a JUnit plug-in test.
- */
-public class TerminalConnectorPluginTest extends TestCase {
-
- public void testIsInitialized() {
- if (!Platform.isRunning())
- return;
- TerminalConnector c = new TerminalConnector(new SimpleFactory(new ConnectorMock()), "xID", "xName", false);
- assertFalse(c.isInitialized());
- c.getId();
- assertFalse(c.isInitialized());
- c.getName();
- assertFalse(c.isInitialized());
- c.isHidden();
- assertFalse(c.isInitialized());
- c.getSettingsSummary();
- assertFalse(c.isInitialized());
- c.setTerminalSize(10, 10);
- assertFalse(c.isInitialized());
- c.load(null);
- assertFalse(c.isInitialized());
- c.save(null);
- assertFalse(c.isInitialized());
- c.getAdapter(ConnectorMock.class);
- assertFalse(c.isInitialized());
- }
-
- public void testGetAdapter() {
- if (!Platform.isRunning())
- return;
- ConnectorMock mock = new ConnectorMock();
- TerminalConnector c = new TerminalConnector(new SimpleFactory(mock), "xID", "xName", false);
- assertNull(c.getAdapter(ConnectorMock.class));
- // the load is called after the connect...
- c.connect(new TerminalControlMock());
-
- assertSame(mock, c.getAdapter(ConnectorMock.class));
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
deleted file mode 100644
index 93d555572..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnector.Factory;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class TerminalConnectorTest extends TestCase {
- public class SettingsMock implements ISettingsStore {
-
- public String get(String key) {
- return null;
- }
-
- public String get(String key, String defaultValue) {
- return null;
- }
-
- public void put(String key, String value) {
- }
-
- }
- public static class TerminalControlMock implements ITerminalControl {
-
- public void setEncoding(String encoding) {
- }
-
- public String getEncoding() {
- return "ISO-8859-1"; //$NON-NLS-1$
- }
-
- public void displayTextInTerminal(String text) {
- }
-
- public OutputStream getRemoteToTerminalOutputStream() {
- return null;
- }
-
- public Shell getShell() {
- return null;
- }
-
- public TerminalState getState() {
- return null;
- }
-
- public void setMsg(String msg) {
- }
-
- public void setState(TerminalState state) {
- }
-
- public void setTerminalTitle(String title) {
- }
-
- }
- static class ConnectorMock extends TerminalConnectorImpl {
-
- public boolean fEcho;
- public int fWidth;
- public int fHeight;
- public ITerminalControl fControl;
- public ISettingsStore fSaveStore;
- public ISettingsStore fLoadStore;
- public boolean fDisconnect;
-
- public boolean isLocalEcho() {
- return fEcho;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- fWidth=newWidth;
- fHeight=newHeight;
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fControl = control;
- }
- public void doDisconnect() {
- fDisconnect=true;
- }
-
- public OutputStream getTerminalToRemoteStream() {
- return null;
- }
-
- public String getSettingsSummary() {
- return "Summary";
- }
-
- public void load(ISettingsStore store) {
- fLoadStore=store;
- }
-
- public ISettingsPage makeSettingsPage() {
- return new ISettingsPage(){
- public void createControl(Composite parent) {
- }
- public void loadSettings() {
- }
- public void saveSettings() {
- }
- public boolean validateSettings() {
- return false;
- }};
- }
-
- public void save(ISettingsStore store) {
- fSaveStore=store;
- }
- }
- static class SimpleFactory implements Factory {
- final TerminalConnectorImpl fConnector;
- public SimpleFactory(TerminalConnectorImpl connector) {
- fConnector = connector;
- }
- public TerminalConnectorImpl makeConnector() throws Exception {
- // TODO Auto-generated method stub
- return fConnector;
- }
- }
- public void testGetInitializationErrorMessage() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- c.connect(new TerminalControlMock());
- assertNull(c.getInitializationErrorMessage());
-
- c=new TerminalConnector(new SimpleFactory(new ConnectorMock(){
- public void initialize() throws Exception {
- throw new Exception("FAILED");
- }}),"xID","xName", false);
- c.connect(new TerminalControlMock());
- assertEquals("FAILED",c.getInitializationErrorMessage());
-
- }
-
- public void testGetIdAndName() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- assertEquals("xID", c.getId());
- assertEquals("xName", c.getName());
- }
-
- public void testConnect() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- assertFalse(c.isInitialized());
- c.connect(new TerminalControlMock());
- assertTrue(c.isInitialized());
-
- }
-
- public void testDisconnect() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- c.disconnect();
- assertTrue(mock.fDisconnect);
- }
-
- public void testGetTerminalToRemoteStream() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- assertSame(mock.fControl,control);
- }
-
- public void testGetSettingsSummary() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- assertEquals("Not Initialized", c.getSettingsSummary());
- c.connect(new TerminalControlMock());
- assertEquals("Summary", c.getSettingsSummary());
- }
-
- public void testIsLocalEcho() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- assertFalse(c.isLocalEcho());
- mock.fEcho=true;
- assertTrue(c.isLocalEcho());
- }
-
- public void testLoad() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- ISettingsStore s=new SettingsMock();
- c.load(s);
- // the load is called after the connect...
- assertNull(mock.fLoadStore);
- c.connect(new TerminalControlMock());
- assertSame(s,mock.fLoadStore);
- }
-
- public void testSave() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- ISettingsStore s=new SettingsMock();
- c.save(s);
- assertNull(mock.fSaveStore);
- c.connect(new TerminalControlMock());
- c.save(s);
- assertSame(s,mock.fSaveStore);
- }
-
- public void testMakeSettingsPage() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- assertNotNull(c.makeSettingsPage());
- }
-
- public void testSetTerminalSize() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- c.setTerminalSize(100, 200);
-
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java
deleted file mode 100644
index eb5ea8417..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.terminal.connector;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-import junit.framework.TestCase;
-
-public class TerminalToRemoteInjectionOutputStreamTest extends TestCase {
- final static String ENCODING="UTF-8";
- /**
- * This class escapes strings coming on the original
- * terminal..
- *
- */
- class CleverInterceptor extends TerminalToRemoteInjectionOutputStream.Interceptor {
-
- public void close() throws IOException {
- }
- public void write(int b) throws IOException {
- fOriginal.write('[');
- fOriginal.write(b);
- fOriginal.write(']');
- }
- public void write(byte[] b, int off, int len) throws IOException {
- fOriginal.write('[');
- fOriginal.write(b,off,len);
- fOriginal.write(']');
- }
-
- }
- class NullInterceptor extends TerminalToRemoteInjectionOutputStream.Interceptor {
- }
- public void testClose() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- OutputStream os1=s.grabOutput();
- os1.write('x');
- s.write('A');
- os1.write('y');
- s.write('B');
- os1.close();
-
- s.write('-');
- OutputStream os=s.grabOutput();
- // make sure the closed output does not inject anything
- try {
- os1.write('k');
- fail("...");
- } catch (Exception e) {
- }
- os.write('X');
- s.write('a');
- os.write('Y');
- // make sure the closed output does not inject anything
- try {
- os1.write('l');
- fail("...");
- } catch (Exception e) {
- }
- s.write('b');
- os.close();
- assertEquals("begin:xyAB-XYab", new String(bs.toByteArray(),ENCODING));
- }
-
- public void testFlush() {
- }
-
- public void testWriteInt() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- OutputStream os=s.grabOutput();
- os.write('x');
- s.write('A');
- os.write('y');
- s.write('B');
- s.close();
- assertEquals("begin:xyAB", new String(bs.toByteArray(),ENCODING));
-
- }
-
- public void testWriteByteArray() {
- }
-
- public void testWriteByteArrayIntInt() {
- }
- public void testGrabOutput() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- OutputStream os1=s.grabOutput();
- OutputStream os2;
- try {
- os2=s.grabOutput();
- fail("should fail until the foirst output is closed");
- } catch (IOException e) {
- }
- os1.close();
- os2=s.grabOutput();
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- os2.write("Test".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- s.write(" west".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- os2.write(" the".getBytes(ENCODING));
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- os2.close();
- assertEquals("begin:Test the west", new String(bs.toByteArray(),ENCODING));
- s.write('!');
- assertEquals("begin:Test the west!", new String(bs.toByteArray(),ENCODING));
-
- }
- public void testGrabOutputWithCleverInterceptor() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- // the injector escapes the output coming from the main stream
- OutputStream os=s.grabOutput(new CleverInterceptor());
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- os.write("Test".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- s.write(" west".getBytes(ENCODING));
- assertEquals("begin:Test[ west]", new String(bs.toByteArray(),ENCODING));
- os.write(" the".getBytes(ENCODING));
- assertEquals("begin:Test[ west] the", new String(bs.toByteArray(),ENCODING));
- s.write('x');
- assertEquals("begin:Test[ west] the[x]", new String(bs.toByteArray(),ENCODING));
- os.close();
- assertEquals("begin:Test[ west] the[x]", new String(bs.toByteArray(),ENCODING));
- s.write('!');
- assertEquals("begin:Test[ west] the[x]!", new String(bs.toByteArray(),ENCODING));
-
- }
- public void testGrabOutputWithNullInterceptor() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- // bytes written to the main stream are ignored while the injector
- // is active
- OutputStream os=s.grabOutput(new NullInterceptor());
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- os.write("Test".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- s.write(" west".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- os.write(" the".getBytes(ENCODING));
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- s.write('x');
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- os.close();
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- s.write('!');
- assertEquals("begin:Test the!", new String(bs.toByteArray(),ENCODING));
-
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java
deleted file mode 100644
index 9817ae968..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.tm.internal.terminal.emulator;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Terminal emulator test cases.
- * Runs in emulator package to allow access to default visible items.
- */
-public class AllTests extends TestCase {
- public AllTests() {
- super(null);
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(VT100EmulatorBackendTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java
deleted file mode 100644
index 9e711db97..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java
+++ /dev/null
@@ -1,1237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.emulator;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.internal.terminal.model.TerminalTextDataStore;
-import org.eclipse.tm.internal.terminal.model.TerminalTextTestHelper;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.Style;
-
-public class VT100EmulatorBackendTest extends TestCase {
-
- protected IVT100EmulatorBackend makeBakend(ITerminalTextData term) {
- return new VT100EmulatorBackend(term);
- }
-
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataStore();
- }
-
- protected String toSimple(ITerminalTextData term) {
- return TerminalTextTestHelper.toSimple(term);
- }
- protected String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
-
- protected void fill(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fill(term,s);
- }
-
- protected void fillSimple(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fillSimple(term, s);
- }
-
-
- /**
- * Used for multi line text
- * @param expected
- * @param actual
- */
- protected void assertEqualsTerm(String expected,String actual) {
- assertEquals(expected.replace(' ', '.'), actual.replace('\000', '.'));
- }
- /**
- * Used for simple text
- * @param expected
- * @param actual
- */
- protected void assertEqualsSimple(String expected,String actual) {
- assertEquals(-1,actual.indexOf('\n'));
- assertEquals(expected, actual);
- }
- public void testClearAll() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- fill(term, "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555");
- vt100.clearAll();
- assertEqualsTerm(
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
- }
- public void testSetDimensions() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- fill(term, s);
- vt100.setDimensions(3, 4);
- assertEquals(3,vt100.getLines());
- assertEquals(4,vt100.getColumns());
- assertEqualsTerm(s,toMultiLineText(term));
-
- vt100.setCursor(0, 2);
- vt100.setDimensions(2, 4);
- assertEquals(0, vt100.getCursorLine());
- assertEquals(2, vt100.getCursorColumn());
-
- vt100.setCursor(0, 2);
- vt100.setDimensions(5, 4);
- assertEquals(3, vt100.getCursorLine());
- assertEquals(2, vt100.getCursorColumn());
-
- assertEqualsTerm(s,toMultiLineText(term));
-
- vt100.setCursor(0, 3);
- vt100.setDimensions(5, 2);
- assertEquals(0, vt100.getCursorLine());
- assertEquals(1, vt100.getCursorColumn());
- }
-
- public void testToAbsoluteLine() {
- ITerminalTextData term=makeITerminalTextData();
- VT100EmulatorBackend vt100=new VT100EmulatorBackend(term);
- vt100.setDimensions(2, 3);
- assertEquals(vt100.toAbsoluteLine(0),0);
- // TODO
- term=makeITerminalTextData();
- vt100=new VT100EmulatorBackend(term);
- vt100.setDimensions(1, 10);
- assertEquals(vt100.toAbsoluteLine(0),0);
- }
-
- public void testInsertCharacters() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4567\n" +
- "9012";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " 123\n" +
- "4567\n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.insertCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4 56\n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.insertCharacters(2);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4 5\n" +
- "9012",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.insertCharacters(10);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.insertCharacters(14);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.insertCharacters(14);
- assertEqualsTerm("012 ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.insertCharacters(0);
- assertEqualsTerm("0123456789",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.insertCharacters(2);
- assertEqualsTerm("012 34567",toMultiLineText(term));
- }
-
- public void testEraseToEndOfScreen() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "8901";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseToEndOfScreen();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- " \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(1,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4 \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 4);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "456.\n" +
- " ",toMultiLineText(term));
-
-
- fill(term, s);
- vt100.setCursor(1, 5);
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "456.\n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseToEndOfScreen();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "890 ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 5);
- vt100.eraseToEndOfScreen();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "890.",toMultiLineText(term));
- }
-
- public void testEraseToCursor() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "8901";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseToCursor();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " 123\n" +
- "4567\n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " 567\n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(1,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " 67\n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 4);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- "8901",toMultiLineText(term));
-
-
- fill(term, s);
- vt100.setCursor(1, 5);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 5);
- vt100.eraseToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
- }
-
- public void testEraseAll() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- fill(term, "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555");
- vt100.eraseAll();
- assertEqualsTerm("0000\n" +
- "1111\n" +
- "2222\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
- }
-
- public void testEraseLine() {
- String s =
- "abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGHI";
-
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 3);
- vt100.eraseLine();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " \n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseLine();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " ", toMultiLineText(term));
- }
-
- public void testEraseLineToEnd() {
- String s =
- "abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGHI";
-
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 3);
- vt100.eraseLineToEnd();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvw \n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseLineToEnd();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " \n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseLineToEnd();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFG ", toMultiLineText(term));
- vt100.setDimensions(3, 5);
- fill(term, s);
-
- vt100.setCursor(2, 4);
- vt100.eraseLineToEnd();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGH ", toMultiLineText(term));
-
- vt100.setCursor(2, 5);
- vt100.eraseLineToEnd();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGH ", toMultiLineText(term));
-
- }
-
- public void testEraseLineToCursor() {
- String s =
- "abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGHI";
-
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 3);
- vt100.eraseLineToCursor();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " y\n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseLineToCursor();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " vwxy\n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseLineToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " I", toMultiLineText(term));
- vt100.setDimensions(3, 5);
- fill(term, s);
-
- vt100.setCursor(2, 4);
- vt100.eraseLineToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " ", toMultiLineText(term));
-
- vt100.setCursor(2, 5);
- vt100.eraseLineToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " ", toMultiLineText(term));
-
- }
-
- public void testInsertLines() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- vt100.setDimensions(3, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- " \n" +
- "3333\n" +
- "4444", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.insertLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- "4444", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.insertLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.insertLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.insertLines(2);
- assertEqualsTerm(
- "0000\n" +
- " \n" +
- " \n" +
- "1111\n" +
- "2222\n" +
- "3333", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.insertLines(7);
- assertEqualsTerm(
- "0000\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertLines(7);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertLines(5);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- "0000", toMultiLineText(term));
- }
-
- public void testDeleteCharacters() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4567\n" +
- "9012";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "234 \n" +
- "4567\n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.deleteCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "467 \n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.deleteCharacters(2);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "47 \n" +
- "9012",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.deleteCharacters(10);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.deleteCharacters(14);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.deleteCharacters(0);
- assertEqualsTerm("0123456789",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.deleteCharacters(2);
- assertEqualsTerm("01256789 ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.deleteCharacters(14);
- assertEqualsTerm("012 ",toMultiLineText(term));
-
- }
-
- public void testDeleteLines() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- vt100.setDimensions(3, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "4444\n" +
- "5555\n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.deleteLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "5555\n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.deleteLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.deleteLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.deleteLines(2);
- assertEqualsTerm(
- "0000\n" +
- "3333\n" +
- "4444\n" +
- "5555\n" +
- " \n" +
- " ", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.deleteLines(7);
- assertEqualsTerm(
- "0000\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteLines(7);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteLines(5);
- assertEqualsTerm(
- "5555\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
- }
-
- public void testGetDefaultStyle() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- Style style=Style.getStyle("white", "black");
- vt100.setDefaultStyle(style);
- assertSame(style, vt100.getDefaultStyle());
- Style style2=style.setBold(true);
- vt100.setDefaultStyle(style2);
- assertSame(style2, vt100.getDefaultStyle());
- }
-
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- Style style=Style.getStyle("white", "black");
- vt100.setStyle(style);
- assertSame(style, vt100.getStyle());
- Style style2=style.setBold(true);
- vt100.setStyle(style2);
- assertSame(style2, vt100.getStyle());
- }
-
- public void testAppendString() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- vt100.setCursor(0, 0);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
- vt100.appendString("012");
- assertEqualsTerm(
- "012 \n" +
- " \n" +
- " ", toMultiLineText(term));
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- vt100.appendString("3");
- assertEqualsTerm(
- "0123\n" +
- " \n" +
- " ", toMultiLineText(term));
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
-
- vt100.appendString("567890");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90 ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
-
- vt100.appendString("a");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90a ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
-
- vt100.appendString("b");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90ab\n" +
- " ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
-
- vt100.appendString("cd");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90ab\n" +
- "cd ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
- vt100.appendString("efgh");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90ab\n" +
- "cdef\n" +
- "gh ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
- vt100.appendString("ijklmnopqrstuvwx");
- assertEqualsTerm(
- "cdef\n" +
- "ghij\n" +
- "klmn\n" +
- "opqr\n" +
- "stuv\n" +
- "wx ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
- vt100.setCursor(1, 1);
- vt100.appendString("123");
- assertEqualsTerm(
- "cdef\n" +
- "ghij\n" +
- "klmn\n" +
- "opqr\n" +
- "s123\n" +
- "wx ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
-
- vt100.setCursor(1, 1);
- vt100.appendString("ABCDEFGHIJKL");
- assertEqualsTerm(
- "klmn\n" +
- "opqr\n" +
- "sABC\n" +
- "DEFG\n" +
- "HIJK\n" +
- "L ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(1,vt100.getCursorColumn());
-
- }
-
- public void testProcessNewline() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- vt100.setCursor(0, 0);
- fill(term,s);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.processNewline();
- assertEqualsTerm(s, toMultiLineText(term));
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursorColumn(3);
- vt100.processNewline();
- assertEqualsTerm(s, toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
-
- vt100.processNewline();
- assertEqualsTerm(
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555\n" +
- " ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
-
-
- vt100.processNewline();
- assertEqualsTerm(
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555\n" +
- " \n" +
- " ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
- public void testSetCursorLine() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- // the cursor still at the beginning....
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(0, 2);
- vt100.setCursorLine(1);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
- vt100.setCursor(0, -2);
- vt100.setCursorLine(-1);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(0, 10);
- vt100.setCursorLine(10);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
- public void testSetCursorAndSetDimensions() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(10);
- vt100.setDimensions(3, 4);
- // the cursor still at the beginning....
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setDimensions(6, 4);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(2, 3);
- vt100.setDimensions(8, 4);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
- public void testSetCursorColumn() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(1, 0);
- vt100.setCursorColumn(2);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
- vt100.setCursor(-1, -2);
- vt100.setCursorColumn(-2);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(10, 0);
- vt100.setCursorColumn(10);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
- public void testSetCursor() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(0, 0);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(1, 2);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
- vt100.setCursor(-1, -2);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(10, 10);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java
deleted file mode 100644
index 493547a54..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java
+++ /dev/null
@@ -1,817 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-abstract public class AbstractITerminalTextDataTest extends TestCase {
- abstract protected ITerminalTextData makeITerminalTextData();
-
- protected void setUp() throws Exception {
- try {
- assert false;
- throw new Error("No Assertions! Run this code with assertions enabled! (vmargs: -ea)");
- } catch(AssertionError e) {
- // OK, assertions are enabled!
- }
- super.setUp();
- }
- protected String toSimple(ITerminalTextData term) {
- return TerminalTextTestHelper.toSimple(term);
- }
- protected String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
-
- protected void fill(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fill(term,s);
- }
-
- protected void fill(ITerminalTextData term, int i, int j, String s) {
- TerminalTextTestHelper.fill(term,i,j,s);
- }
-
- protected void fillSimple(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fillSimple(term, s);
- }
-
-
- /**
- * Used for multi line text
- * @param expected
- * @param actual
- */
- protected void assertEqualsTerm(String expected,String actual) {
- assertEquals(expected, actual);
- }
- /**
- * Used for simple text
- * @param expected
- * @param actual
- */
- protected void assertEqualsSimple(String expected,String actual) {
- assertEquals(-1,actual.indexOf('\n'));
- assertEquals(expected, actual);
- }
- public void testGetWidth() {
- ITerminalTextData term=makeITerminalTextData();
- assertEquals(0, term.getWidth());
- term.setDimensions(term.getHeight(), 10);
- assertEquals(10, term.getWidth());
- term.setDimensions(term.getHeight(), 0);
- assertEquals(0, term.getWidth());
- }
-
- public void testAddLine() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- term.setMaxHeight(5);
- term.addLine();
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000", toMultiLineText(term));
- }
- public void testCleanLine() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- term.cleanLine(0);
- assertEqualsTerm(
- "\000\000\000\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555", toMultiLineText(term));
-
- fill(term, s);
- term.cleanLine(4);
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "\000\000\000", toMultiLineText(term));
- }
-
- public void testMaxSize() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- term.setMaxHeight(8);
- fill(term, s);
- assertEquals(5, term.getHeight());
- assertEquals(8, term.getMaxHeight());
- term.addLine();
- assertEquals(6, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(7, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- }
- public void testGetHeight() {
- ITerminalTextData term=makeITerminalTextData();
- assertEquals(0, term.getHeight());
- term.setDimensions(10, term.getWidth());
- assertEquals(10, term.getHeight());
- term.setDimensions(0, term.getWidth());
- assertEquals(0, term.getHeight());
- }
-
- public void testSetDimensions() {
- ITerminalTextData term=makeITerminalTextData();
- assertEquals(0, term.getHeight());
- term.setDimensions(10, 5);
- assertEquals(5, term.getWidth());
- assertEquals(10, term.getHeight());
- term.setDimensions(5, 10);
- assertEquals(10, term.getWidth());
- assertEquals(5, term.getHeight());
- term.setDimensions(15, 0);
- assertEquals(0, term.getWidth());
- assertEquals(15, term.getHeight());
- term.setDimensions(0, 12);
- assertEquals(12, term.getWidth());
- assertEquals(0, term.getHeight());
- term.setDimensions(0, 0);
- assertEquals(0, term.getWidth());
- assertEquals(0, term.getHeight());
- }
- public void testResize() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 5);
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- fill(term,0,0,s);
- assertEqualsTerm(s, toMultiLineText(term));
- term.setDimensions(3, 4);
- assertEqualsTerm(
- "1234\n" +
- "abcd\n" +
- "ABCD", toMultiLineText(term));
- // the columns should be restored
- term.setDimensions(3, 5);
- assertEqualsTerm(
- "12345\n" +
- "abcde\n" +
- "ABCDE", toMultiLineText(term));
- term.setDimensions(3, 6);
- assertEqualsTerm(
- "12345\000\n" +
- "abcde\000\n" +
- "ABCDE\000", toMultiLineText(term));
- term.setChar(0, 5, 'x', null);
- term.setChar(1, 5, 'y', null);
- term.setChar(2, 5, 'z', null);
- assertEqualsTerm(
- "12345x\n" +
- "abcdey\n" +
- "ABCDEz", toMultiLineText(term));
- term.setDimensions(2, 4);
- assertEqualsTerm(
- "1234\n" +
- "abcd", toMultiLineText(term));
- }
-
- public void testResizeFailure() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 5);
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- fill(term,0,0,s);
- assertEqualsTerm(s, toMultiLineText(term));
- try {
- term.setDimensions(-3, 4);
- fail();
- } catch (RuntimeException e) {
- // OK
- }
-// assertEquals(5, term.getWidth());
-// assertEquals(3, term.getHeight());
-// assertEquals(s, toSimpleText(term));
- }
-
- public void testGetLineSegments() {
- Style s1=getDefaultStyle();
- Style s2=s1.setBold(true);
- Style s3=s1.setUnderline(true);
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(8, 8);
- LineSegment[] segments;
-
- term.setChars(0, 0,"0123".toCharArray(), s1);
- term.setChars(0, 4,"abcd".toCharArray(), null);
- segments=term.getLineSegments(0, 0, term.getWidth());
- assertEquals(2, segments.length);
- assertSegment(0, "0123", s1, segments[0]);
- assertSegment(4, "abcd", null, segments[1]);
-
-
- segments=term.getLineSegments(0, 4, term.getWidth()-4);
- assertEquals(1, segments.length);
- assertSegment(4, "abcd", null, segments[0]);
-
- segments=term.getLineSegments(0, 3, 2);
- assertEquals(2, segments.length);
- assertSegment(3, "3", s1, segments[0]);
- assertSegment(4, "a", null, segments[1]);
-
- segments=term.getLineSegments(0, 7, 1);
- assertEquals(1, segments.length);
- assertSegment(7, "d", null, segments[0]);
-
- segments=term.getLineSegments(0, 0, 1);
- assertEquals(1, segments.length);
- assertSegment(0, "0", s1, segments[0]);
-
- // line 1
- term.setChars(1, 0,"x".toCharArray(), s1);
- term.setChars(1, 1,"y".toCharArray(), s2);
- term.setChars(1, 2,"z".toCharArray(), s3);
-
- segments=term.getLineSegments(1, 0, term.getWidth());
- assertEquals(4, segments.length);
- assertSegment(0, "x", s1, segments[0]);
- assertSegment(1, "y", s2, segments[1]);
- assertSegment(2, "z", s3, segments[2]);
- assertSegment(3, "\000\000\000\000\000", null, segments[3]);
-
- // line 2
- term.setChars(2, 4,"klm".toCharArray(), s1);
- segments=term.getLineSegments(2, 0, term.getWidth());
- assertEquals(3, segments.length);
- assertSegment(0, "\000\000\000\000", null, segments[0]);
- assertSegment(4, "klm", s1, segments[1]);
- assertSegment(7, "\000", null, segments[2]);
-
- // line 3
- segments=term.getLineSegments(3, 0, term.getWidth());
- assertEquals(1, segments.length);
- assertSegment(0, "\000\000\000\000\000\000\000\000", null, segments[0]);
-
- }
- public void testGetLineSegmentsNull() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(8, 8);
- LineSegment[] segments=term.getLineSegments(0, 0, term.getWidth());
- assertEquals(1, segments.length);
- }
- public void testGetLineSegmentsOutOfBounds() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(1, 8);
- term.setChars(0,0,"xx".toCharArray(),null);
- LineSegment[] segments=term.getLineSegments(0, 5, 2);
- assertEquals(1, segments.length);
-
-
- }
- void assertSegment(int col,String text, Style style,LineSegment segment) {
- assertEquals(col, segment.getColumn());
- assertEqualsTerm(text, segment.getText());
- assertEquals(style, segment.getStyle());
-
- }
- public void testGetChar() {
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- assertEquals('1', term.getChar(0,0));
- assertEquals('2', term.getChar(0,1));
- assertEquals('3', term.getChar(0,2));
- assertEquals('4', term.getChar(0,3));
- assertEquals('5', term.getChar(0,4));
- assertEquals('a', term.getChar(1,0));
- assertEquals('b', term.getChar(1,1));
- assertEquals('c', term.getChar(1,2));
- assertEquals('d', term.getChar(1,3));
- assertEquals('e', term.getChar(1,4));
- assertEquals('A', term.getChar(2,0));
- assertEquals('B', term.getChar(2,1));
- assertEquals('C', term.getChar(2,2));
- assertEquals('D', term.getChar(2,3));
- assertEquals('E', term.getChar(2,4));
- try {
- term.getChar(0,-1);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(-1,-1);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(-1,0);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(0,5);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(3,5);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(3,0);
- fail();
- } catch (RuntimeException e) {
- }
- }
-
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- Style style=getDefaultStyle();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- term.setChar(line, column, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertSame(style.setForground(StyleColor.getStyleColor(""+c)), term.getStyle(line, column));
- }
- }
-
- }
-
- protected Style getDefaultStyle() {
- return Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- }
-
- public void testSetChar() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- term.setChar(line, column, (char)('a'+column+line), null);
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- }
- public void testSetChars() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- char[] chars=new char[term.getWidth()];
- for (int column = 0; column < term.getWidth(); column++) {
- chars[column]=(char)('a'+column+line);
- }
- term.setChars(line, 0, chars, null);
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
-
- term.setChars(3, 1, new char[]{'1','2'}, null);
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "d12\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- try {
- // check if we cannot exceed the range
- term.setChars(4, 1, new char[]{'1','2','3','4','5'}, null);
- fail();
- } catch (RuntimeException e) {}
-
- }
- public void testSetCharsLen() {
- ITerminalTextData term=makeITerminalTextData();
- String s= "ZYXWVU\n"
- + "abcdef\n"
- + "ABCDEF";
- fill(term, s);
- char[] chars=new char[]{'1','2','3','4','5','6','7','8'};
- term.setChars(1, 0, chars, 0, 6,null);
- assertEqualsTerm(
- "ZYXWVU\n"
- + "123456\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 0, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "12345f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 1, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "23456f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 1, chars, 1, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "a2345f\n"
- + "ABCDEF", toMultiLineText(term));
-
-
-
- fill(term, s);
- term.setChars(1, 2, chars, 3, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "ab4567\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- try {
- term.setChars(1, 0, chars, 7, 10, null);
- fail();
- } catch (RuntimeException e) {}
- fill(term, s);
- try {
- term.setChars(1, -1, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
- try {
- term.setChars(-1, 1, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
- try {
- term.setChars(1, 10, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
- try {
- term.setChars(10, 1, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
-// assertEquals(s, toSimpleText(term));
- }
- public void testSetCopyInto() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 5);
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- fill(term,0,0,s);
- ITerminalTextData termCopy=makeITerminalTextData();
- termCopy.copy(term);
- assertEqualsTerm(s, toMultiLineText(termCopy));
- assertEqualsTerm(s, toMultiLineText(term));
-
- termCopy.setChar(1, 1, 'X', null);
- assertEqualsTerm(s, toMultiLineText(term));
- term.setDimensions(2, 4);
- assertEquals(5, termCopy.getWidth());
- assertEquals(3, termCopy.getHeight());
-
- assertEqualsTerm("12345\n" +
- "aXcde\n" +
- "ABCDE", toMultiLineText(termCopy));
-
- assertEquals(4, term.getWidth());
- assertEquals(2, term.getHeight());
- }
- public void testSetCopyLines() {
- ITerminalTextData term=makeITerminalTextData();
- String s="012345";
- fillSimple(term, s);
- ITerminalTextData termCopy=makeITerminalTextData();
- String sCopy="abcde";
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,0);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple(sCopy, toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,5);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01cde", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a01de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a12de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a1234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,2,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a2345", toSimple(termCopy));
-
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,5);
- fail();
- } catch (RuntimeException e) {}
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,6);
- fail();
- } catch (RuntimeException e) {}
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,7,0,1);
- fail();
- } catch (RuntimeException e) {}
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,7,1);
- fail();
- } catch (RuntimeException e) {}
- }
- public void testCopyLine() {
- ITerminalTextData term=makeITerminalTextData();
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- fill(term, s);
- ITerminalTextData dest=makeITerminalTextData();
- String sCopy=
- "aaa\n" +
- "bbb\n" +
- "ccc\n" +
- "ddd\n" +
- "eee";
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,false,false,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "ccc\n" +
- "ddd\n" +
- "555", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,true,true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(s, toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{false,false,false,false,false});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(sCopy, toMultiLineText(dest));
- }
- protected void copySelective(ITerminalTextData dest, ITerminalTextData source, int sourceStartLine, int destStartLine, boolean[] linesToCopy) {
- for (int i = 0; i < linesToCopy.length; i++) {
- if(linesToCopy[i]) {
- dest.copyLine(source, i+sourceStartLine, i+destStartLine);
- }
- }
- }
-
- public void testCopyLineWithOffset() {
- ITerminalTextData term=makeITerminalTextData();
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- fill(term, s);
- ITerminalTextData dest=makeITerminalTextData();
- String sCopy=
- "aaa\n" +
- "bbb\n" +
- "ccc\n" +
- "ddd\n" +
- "eee";
- fill(dest, sCopy);
- copySelective(dest,term,1,0,new boolean []{true,false,false,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "222\n" +
- "bbb\n" +
- "ccc\n" +
- "555\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,2,0,new boolean []{true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "333\n" +
- "444\n" +
- "ccc\n" +
- "ddd\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,true,true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(s, toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{false,false,false,false,false});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(sCopy, toMultiLineText(dest));
- }
- public void testScrollNoop() {
- scrollTest(0,0,0, "012345","012345");
- scrollTest(0,1,0, "012345","012345");
- scrollTest(0,6,0, "012345","012345");
- }
- public void testScrollAll() {
- scrollTest(0,6,1, "012345"," 01234");
- scrollTest(0,6,-1, "012345","12345 ");
- scrollTest(0,6,2, "012345"," 0123");
- scrollTest(0,6,-2, "012345","2345 ");
- }
- public void testScrollNegative() {
- scrollTest(0,2,-1,"012345","1 2345");
- scrollTest(0,1,-1,"012345"," 12345");
- scrollTest(0,6,-1,"012345","12345 ");
- scrollTest(0,6,-6,"012345"," ");
- scrollTest(0,6,-7,"012345"," ");
- scrollTest(0,6,-8,"012345"," ");
- scrollTest(0,6,-2,"012345","2345 ");
- scrollTest(1,1,-1,"012345","0 2345");
- scrollTest(1,1,-1,"012345","0 2345");
- scrollTest(1,2,-1,"012345","02 345");
- scrollTest(5,1,-1,"012345","01234 ");
- scrollTest(5,1,-1,"012345","01234 ");
- }
- public void testScrollNegative2() {
- scrollTest(0,2,-1," 23 "," 23 ");
- scrollTest(0,1,-1," 23 "," 23 ");
- scrollTest(0,6,-1," 23 "," 23 ");
- scrollTest(0,6,-6," 23 "," ");
- scrollTest(0,6,-7," 23 "," ");
- scrollTest(0,6,-8," 23 "," ");
- scrollTest(0,6,-2," 23 ","23 ");
- scrollTest(1,1,-1," 23 "," 23 ");
- scrollTest(1,2,-1," 23 "," 2 3 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- }
- public void testScrollNegative3() {
- scrollTest(1,5,-7,"012345","0 ");
- }
- public void testScrollPositive2() {
- scrollTest(2,8,20, "0123456789", "01 ");
- }
- public void testScrollPositive() {
- scrollTest(0,2,1, "012345", " 02345");
- scrollTest(0,2,2, "012345", " 2345");
- scrollTest(2,4,2, "012345", "01 23");
- scrollTest(2,4,2, "0123456", "01 236");
- scrollTest(0,7,6, "0123456", " 0");
- scrollTest(0,7,8, "0123456", " ");
- scrollTest(0,7,9, "0123456", " ");
- scrollTest(2,4,2, "0123456", "01 236");
- scrollTest(2,5,3, "0123456789", "01 23789");
- scrollTest(2,7,3, "0123456789", "01 23459");
- scrollTest(2,8,3, "0123456789", "01 23456");
- scrollTest(2,8,5, "0123456789", "01 234");
- scrollTest(2,8,9, "0123456789", "01 ");
- scrollTest(0,10,9,"0123456789", " 0");
- scrollTest(0,6,6, "012345", " ");
- }
- public void testScrollFail() {
- try {
- scrollTest(5,2,-1,"012345","012345");
- fail();
- } catch (RuntimeException e) {
- }
- try {
- scrollTest(0,7,1,"012345"," ");
- fail();
- } catch (RuntimeException e) {
- }
- }
- /**
- * Makes a simple shift test
- * @param line scroll start
- * @param n number of lines to be scrolled
- * @param shift amount of lines to be shifted
- * @param start the original data
- * @param result the expected result
- */
- void scrollTest(int line,int n, int shift, String start,String result) {
- ITerminalTextData term=makeITerminalTextData();
- fillSimple(term,start);
- term.scroll(line, n, shift);
- assertEqualsSimple(result, toSimple(term));
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java
deleted file mode 100644
index f0101879f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.tm.internal.terminal.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Internal Terminal Model test cases.
- * Runs in internal model package to allow access to default visible items.
- */
-public class AllTests extends TestCase {
- public AllTests() {
- super(null);
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(SnapshotChangesTest.class);
- suite.addTestSuite(SynchronizedTerminalTextDataTest.class);
- suite.addTestSuite(TerminalTextDataFastScrollTest.class);
- suite.addTestSuite(TerminalTextDataFastScrollTestMaxHeigth.class);
- suite.addTestSuite(TerminalTextDataPerformanceTest.class);
- suite.addTestSuite(TerminalTextDataSnapshotTest.class);
- suite.addTestSuite(TerminalTextDataSnapshotWindowTest.class);
- suite.addTestSuite(TerminalTextDataStoreTest.class);
- suite.addTestSuite(TerminalTextDataTest.class);
- suite.addTestSuite(TerminalTextDataWindowTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java
deleted file mode 100644
index 464f0d711..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java
+++ /dev/null
@@ -1,679 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-import junit.framework.TestCase;
-
-public class SnapshotChangesTest extends TestCase {
- /**
- * @param change
- * @param expected a string of 0 and 1 (1 means changed)
- */
- void assertChangedLines(ISnapshotChanges change, String expected) {
- StringBuffer buffer=new StringBuffer();
- for (int line = 0; line < expected.length(); line++) {
- if(change.hasLineChanged(line))
- buffer.append('1');
- else
- buffer.append('0');
- }
- assertEquals(expected, buffer.toString());
- }
-
- public void testSnapshotChanges() {
- SnapshotChanges changes=new SnapshotChanges(1);
- assertEquals(0, changes.getInterestWindowStartLine());
- assertEquals(0, changes.getInterestWindowSize());
- }
- public void testSnapshotChangesWithWindow() {
- SnapshotChanges changes=new SnapshotChanges(2,5);
- assertEquals(2, changes.getInterestWindowStartLine());
- assertEquals(5, changes.getInterestWindowSize());
- }
-
- public void testIsInInterestWindowIntInt() {
- SnapshotChanges changes=new SnapshotChanges(2,5);
- assertFalse(changes.isInInterestWindow(0, 1));
- assertFalse(changes.isInInterestWindow(0, 2));
- assertTrue(changes.isInInterestWindow(0, 3));
- assertTrue(changes.isInInterestWindow(0, 4));
- assertTrue(changes.isInInterestWindow(0, 5));
- assertTrue(changes.isInInterestWindow(0, 6));
- assertTrue(changes.isInInterestWindow(0, 10));
- assertTrue(changes.isInInterestWindow(2, 5));
- assertTrue(changes.isInInterestWindow(6, 0));
- assertTrue(changes.isInInterestWindow(6, 1));
- assertTrue(changes.isInInterestWindow(6, 10));
- assertFalse(changes.isInInterestWindow(7, 0));
- assertFalse(changes.isInInterestWindow(7, 1));
- assertFalse(changes.isInInterestWindow(8, 10));
- }
- public void testIsInInterestWindowIntIntNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(3);
- for (int i = 0; i < 5; i++) {
- for (int j = 0; j < 5; j++) {
- assertTrue(changes.isInInterestWindow(i,j));
- }
- }
- }
-
- public void testIsInInterestWindowInt() {
- SnapshotChanges changes=new SnapshotChanges(3,1);
- assertFalse(changes.isInInterestWindow(0));
- assertFalse(changes.isInInterestWindow(1));
- assertFalse(changes.isInInterestWindow(2));
- assertTrue(changes.isInInterestWindow(3));
- assertFalse(changes.isInInterestWindow(4));
- assertFalse(changes.isInInterestWindow(5));
- }
-
- public void testIsInInterestWindowIntNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(3);
- for (int i = 0; i < 10; i++) {
- assertTrue(changes.isInInterestWindow(i));
- }
- }
-
- public void testFitLineToWindow() {
- SnapshotChanges changes=new SnapshotChanges(2,5);
- assertEquals(2, changes.fitLineToWindow(0));
- assertEquals(2, changes.fitLineToWindow(1));
- assertEquals(2, changes.fitLineToWindow(2));
- assertEquals(3, changes.fitLineToWindow(3));
-
- assertTrue(changes.isInInterestWindow(4));
- assertEquals(4, changes.fitLineToWindow(4));
-
- assertTrue(changes.isInInterestWindow(5));
- assertEquals(5, changes.fitLineToWindow(5));
-
- assertTrue(changes.isInInterestWindow(6));
- assertEquals(6, changes.fitLineToWindow(6));
-
- assertFalse(changes.isInInterestWindow(7));
- // value undefined!
- assertEquals(7, changes.fitLineToWindow(7));
-
- assertFalse(changes.isInInterestWindow(8));
- // value undefined!
- assertEquals(8, changes.fitLineToWindow(8));
- }
-
- public void testFitLineToWindowNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(5);
- assertEquals(0, changes.fitLineToWindow(0));
- assertEquals(1, changes.fitLineToWindow(1));
- assertEquals(2, changes.fitLineToWindow(2));
- assertEquals(3, changes.fitLineToWindow(3));
- assertEquals(4, changes.fitLineToWindow(4));
- assertEquals(5, changes.fitLineToWindow(5));
- assertEquals(6, changes.fitLineToWindow(6));
- assertEquals(7, changes.fitLineToWindow(7));
- }
- public void testFitSizeToWindow() {
- SnapshotChanges changes=new SnapshotChanges(2,3);
- assertFalse(changes.isInInterestWindow(0, 1));
- assertFalse(changes.isInInterestWindow(0, 2));
- assertTrue(changes.isInInterestWindow(0, 3));
- assertEquals(1, changes.fitSizeToWindow(0,3));
- assertEquals(2, changes.fitSizeToWindow(0,4));
- assertEquals(3, changes.fitSizeToWindow(0,5));
- assertEquals(3, changes.fitSizeToWindow(0,6));
- assertEquals(3, changes.fitSizeToWindow(0,7));
- assertEquals(3, changes.fitSizeToWindow(0,8));
- assertEquals(3, changes.fitSizeToWindow(0,9));
- assertEquals(3, changes.fitSizeToWindow(1,9));
- assertEquals(3, changes.fitSizeToWindow(2,9));
- assertEquals(3, changes.fitSizeToWindow(2,3));
- assertEquals(2, changes.fitSizeToWindow(2,2));
- assertEquals(1, changes.fitSizeToWindow(2,1));
- assertEquals(2, changes.fitSizeToWindow(3,9));
- assertEquals(2, changes.fitSizeToWindow(3,2));
- assertEquals(1, changes.fitSizeToWindow(3,1));
- assertEquals(2, changes.fitSizeToWindow(3,2));
- assertEquals(2, changes.fitSizeToWindow(3,3));
- assertEquals(1, changes.fitSizeToWindow(4,1));
- assertEquals(1, changes.fitSizeToWindow(4,2));
- assertFalse(changes.isInInterestWindow(5, 1));
-
- }
- public void testFitSizeToWindowNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(3);
- assertEquals(1, changes.fitSizeToWindow(0,1));
- assertEquals(2, changes.fitSizeToWindow(0,2));
- assertEquals(3, changes.fitSizeToWindow(0,3));
- assertEquals(4, changes.fitSizeToWindow(0,4));
- assertEquals(5, changes.fitSizeToWindow(0,5));
-
- assertEquals(5, changes.fitSizeToWindow(1,5));
- assertEquals(3, changes.fitSizeToWindow(2,3));
- assertEquals(2, changes.fitSizeToWindow(1,2));
- assertEquals(10, changes.fitSizeToWindow(5,10));
- }
-
- public void testMarkLineChanged() {
- SnapshotChanges changes=new SnapshotChanges(2,3);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(0);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(1);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(2);
- assertTrue(changes.hasChanged());
-
- changes=new SnapshotChanges(2,3);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(3);
- assertTrue(changes.hasChanged());
-
- assertLineChange(false,2,3,0);
- assertLineChange(false,2,3,1);
- assertLineChange(true,2,3,2);
- assertLineChange(true,2,3,3);
- assertLineChange(true,2,3,4);
- assertLineChange(false,2,3,5);
- assertLineChange(false,2,3,6);
-
- assertLineChange(true,2,4,5);
- }
- void assertLineChange(boolean expected, int windowStart, int windowSize, int changedLine) {
- SnapshotChanges changes=new SnapshotChanges(windowStart,windowSize);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(changedLine);
- if(expected) {
- assertEquals(changedLine, changes.getFirstChangedLine());
- assertEquals(changedLine, changes.getLastChangedLine());
- } else {
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
-
- }
- assertEquals(expected,changes.hasChanged());
- for (int i = 0; i < windowStart+windowSize+5; i++) {
- boolean e= i==changedLine && i>=windowStart && i<windowStart+windowSize;
- assertEquals(e, changes.hasLineChanged(i));
- }
-
- }
- public void testMarkLinesChanged() {
- SnapshotChanges changes=new SnapshotChanges(2,3);
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- changes.markLinesChanged(0, 1);
- assertChangedLines(changes, "00000000000");
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- changes.markLinesChanged(0, 2);
- assertChangedLines(changes, "00000000000");
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- changes.markLinesChanged(0, 3);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00100000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(1, 3);
- assertTrue(changes.hasChanged());
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertChangedLines(changes, "00110000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(1, 4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(1, 4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(2, 4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(3, 4);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00011000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(3, 1);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00010000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(4, 1);
- assertEquals(4, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00001000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(5, 1);
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- assertFalse(changes.hasChanged());
- assertChangedLines(changes, "00000000000");
- }
- public void testMarkLinesChangedNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(10);
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
-
- changes.markLinesChanged(0, 1);
- assertTrue(changes.hasChanged());
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(0, changes.getLastChangedLine());
- assertChangedLines(changes, "1000000000");
-
- changes=new SnapshotChanges(10);
- changes.markLinesChanged(0, 5);
- assertTrue(changes.hasChanged());
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertChangedLines(changes, "1111100000");
-
- changes=new SnapshotChanges(3);
- changes.markLinesChanged(1, 6);
- assertTrue(changes.hasChanged());
- assertEquals(1, changes.getFirstChangedLine());
- assertEquals(6, changes.getLastChangedLine());
- assertChangedLines(changes, "011");
-
-
- changes=new SnapshotChanges(10);
- changes.markLinesChanged(5, 6);
- assertTrue(changes.hasChanged());
- assertEquals(5, changes.getFirstChangedLine());
- assertEquals(10, changes.getLastChangedLine());
- assertChangedLines(changes, "0000011111");
-
- }
-
- public void testHasChanged() {
- SnapshotChanges changes=new SnapshotChanges(0);
- assertFalse(changes.hasChanged());
- changes=new SnapshotChanges(1);
- assertFalse(changes.hasChanged());
- changes=new SnapshotChanges(1,9);
- assertFalse(changes.hasChanged());
- }
-
- public void testSetAllChanged() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(10);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(3);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(5);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(6);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
- }
- public void testSetAllChangedNoWindow() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(5);
- changes.setAllChanged(10);
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(9, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "1111111111");
-
- changes=new SnapshotChanges(5);
- changes.setAllChanged(3);
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "1111111111");
-
- }
-
- public void testConvertScrollingIntoChanges() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 4, -1);
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "000100");
- changes.convertScrollingIntoChanges();
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertChangedLines(changes, "001100");
- }
-
- public void testConvertScrollingIntoChangesNoWindow() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(7);
- changes.scroll(0, 4, -1);
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "000100");
- changes.convertScrollingIntoChanges();
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertChangedLines(changes, "111100");
- }
- public void testScrollNoWindow() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(7);
- changes.scroll(0, 3, -2);
- assertEquals(1, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0110000");
-
- changes=new SnapshotChanges(7);
- changes.scroll(0, 3, -1);
- changes.scroll(0, 3, -1);
- assertEquals(1, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0110000");
-
- changes=new SnapshotChanges(7);
- changes.scroll(0, 7, -1);
- changes.scroll(0, 7, -1);
- assertEquals(5, changes.getFirstChangedLine());
- assertEquals(6, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(7, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0000011");
-
- // positive scrolls cannot be optimized at the moment
- changes=new SnapshotChanges(7);
- changes.scroll(0, 7, 1);
- changes.scroll(0, 7, 1);
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(6, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "1111111");
-
- }
- public void testScroll() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, -1);
- assertEquals(4, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(2, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-1, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0000100000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, -2);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(2, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0001100000");
- }
- public void testScrollNergative() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, -1);
- changes.scroll(0, 7, -1);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(2, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0001100000");
-
- }
- public void testScrollPositive() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, 1);
- changes.scroll(0, 7, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0011100000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 3, 1);
- changes.scroll(0, 3, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0010000000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 4, 1);
- changes.scroll(0, 4, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0011000000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 5, 1);
- changes.scroll(0, 5, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0011100000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(3, 5, 1);
- changes.scroll(3, 5, 1);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0001100000");
- }
-
- public void testCopyChangedLines() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.markLineChanged(3);
- ITerminalTextData source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01234567890");
- ITerminalTextData dest=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(dest, "abcdefghijk");
-
- changes.copyChangedLines(dest, source);
- assertEquals("abc3efghijk",TerminalTextTestHelper.toSimple(dest));
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(7);
- source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01234567890");
- dest=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(dest, "abcdefghijk");
-
- changes.copyChangedLines(dest, source);
- assertEquals("ab234fghijk",TerminalTextTestHelper.toSimple(dest));
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0,7,-1);
- source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01234567890");
- dest=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(dest, "abcdefghijk");
- // only one line has changed! The other lines are scrolled!
- assertChangedLines(changes,"00001000");
- changes.copyChangedLines(dest, source);
- assertEquals("abcd4fghijk",TerminalTextTestHelper.toSimple(dest));
- }
- public void testCopyChangedLinesWithSmallSource() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.markLineChanged(3);
- ITerminalTextData source=new TerminalTextDataStore();
- source.setDimensions(2, 2);
- TerminalTextDataWindow dest=new TerminalTextDataWindow();
- dest.setWindow(2, 2);
- changes.copyChangedLines(dest, source);
- }
- public void testCopyChangedLinesWithSmallSource1() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.markLineChanged(3);
- ITerminalTextData source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01");
- ITerminalTextData dest=new TerminalTextDataStore();
- changes.copyChangedLines(dest, source);
- }
-
- public void testSetInterestWindowSize() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(3, 3);
- // only one line has changed! The other lines are scrolled!
- assertEquals(3, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-1, changes.getScrollWindowShift());
-
- assertChangedLines(changes,"0000010");
- changes.convertScrollingIntoChanges();
- assertChangedLines(changes,"0001110");
-
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(3, 4);
- // only one line has changed! The other lines are scrolled!
- assertEquals(3, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-1, changes.getScrollWindowShift());
-
- assertChangedLines(changes,"0000011");
- changes.convertScrollingIntoChanges();
- assertChangedLines(changes,"0001111");
-
-
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(6, 3);
- // cannot scroll
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertChangedLines(changes,"000000111000");
-
- changes=new SnapshotChanges(2,3);
- // expand the window
- changes.setInterestWindow(2, 5);
- // cannot scroll
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
-
- assertChangedLines(changes,"0000011000");
- }
- public void testSetInterestWindowSize2() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(1, 3);
- assertChangedLines(changes,"0111000");
-
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(1, 4);
- assertChangedLines(changes,"01111000");
-
-
- changes=new SnapshotChanges(2,3);
- // expand the window
- changes.setInterestWindow(6, 3);
- assertChangedLines(changes,"000000111000");
-
- changes=new SnapshotChanges(2,3);
- // expand the window
- changes.setInterestWindow(1, 2);
- assertChangedLines(changes,"0110000");
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java
deleted file mode 100644
index 9b07bc7a2..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class SynchronizedTerminalTextDataTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new SynchronizedTerminalTextData(new TerminalTextData());
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java
deleted file mode 100644
index 7379e5410..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataFastScrollTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataFastScroll(3);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java
deleted file mode 100644
index f0cf227a7..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataFastScrollTestMaxHeigth extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataFastScroll(1);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java
deleted file mode 100644
index e010e77ab..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextDataPerformanceTest extends TestCase {
- long TIME=100;
- private void initPerformance(ITerminalTextData term) {
- term.setDimensions(300,200);
- }
- public void testPerformance0() {
- ITerminalTextData term=new TerminalTextData();
- method0(term,"0 ");
- }
- public void testPerformance0a() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- method0(term,"0a");
- snapshot.updateSnapshot(true);
- }
- public void testPerformance0b() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- N=0;
- snapshot.addListener(new ITerminalTextDataSnapshot.SnapshotOutOfDateListener(){
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }});
- method0(term,"0b");
- snapshot.updateSnapshot(true);
- }
- private void method0(ITerminalTextData term, String label) {
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- for (int i = 0; i < 10000000; i++) {
- char c=s.charAt(i%s.length());
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- term.setChar(line, column, c, style);
- n++;
- }
- }
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println(label+" "+(n*1000)/(System.currentTimeMillis()-t0)+" setChar()/sec "+ N);
- break;
- }
- }
- }
- public void testPerformance1() {
- ITerminalTextData term=new TerminalTextData();
- method1(term, "1 ");
- }
- public void testPerformance1a() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- method1(term, "1a");
- snapshot.updateSnapshot(true);
- }
- public void testPerformance1b() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- N=0;
- snapshot.addListener(new ITerminalTextDataSnapshot.SnapshotOutOfDateListener(){
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }});
- method1(term, "1b");
- snapshot.updateSnapshot(true);
- }
- private void method1(ITerminalTextData term, String label) {
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, style);
- n+=chars.length;
- }
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println(label+" "+(n*1000)/(System.currentTimeMillis()-t0)+" setChars()/sec "+ N);
- break;
- }
- }
- }
- public void testPerformance2() {
- TerminalTextData term=new TerminalTextData();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
-
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- copy.copy(term);
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec");
- return;
- }
- }
- }
- }
- public void testPerformance2a() {
- TerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
-
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- copy.copy(term);
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec");
- return;
- }
- }
- }
- snapshot.updateSnapshot(true);
- }
- int N=0;
- public void testPerformance2b() {
- TerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- N=0;
- snapshot.addListener(new ITerminalTextDataSnapshot.SnapshotOutOfDateListener(){
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }});
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
-
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- copy.copy(term);
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec "+n);
- return;
- }
- }
- }
- snapshot.updateSnapshot(true);
- }
- public void testPerformance3() {
- TerminalTextData term=new TerminalTextData();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- boolean[] linesToCopy=new boolean[term.getHeight()];
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- linesToCopy[line]=true;
- copy.copyLine(term,0,0);
- linesToCopy[line]=false;
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec");
- return;
- }
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java
deleted file mode 100644
index d6e68ef4e..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java
+++ /dev/null
@@ -1,1344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextDataSnapshotTest extends TestCase {
- String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
-
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextData();
- }
-
-
- public void testTerminalTextDataSnapshot() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- // new snapshots are fully changed
- assertEquals(0,snapshot.getFirstChangedLine());
- assertEquals(term.getHeight()-1,snapshot.getLastChangedLine());
- for (int line = 0; line <= snapshot.getLastChangedLine(); line++) {
- assertTrue(snapshot.hasLineChanged(line));
- }
- // nothing has scrolled
- assertEquals(0, snapshot.getScrollWindowSize());
- }
-
- public void testDetach() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- assertEquals(toMultiLineText(term),toMultiLineText(snapshot));
- snapshot.detach();
- // after detach changes to the term has no effect
- term.setChar(0, 0, '?', null);
- assertEquals(s, toMultiLineText(snapshot));
- term.setDimensions(2, 2);
- assertEquals(s, toMultiLineText(snapshot));
- }
- public void testIsOutOfDate() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
-
- assertFalse(snapshot.isOutOfDate());
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, -1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, 1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, -1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(true);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, 1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(true);
- assertFalse(snapshot.isOutOfDate());
-
- // setDimensions
- term.setDimensions(2, 2);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // setDimensions
- term.setDimensions(20, 20);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- }
- ITerminalTextDataSnapshot snapshot(String text, ITerminalTextData term) {
- TerminalTextTestHelper.fill(term,text);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- return snapshot;
-
- }
- public void testUpdateSnapshot() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
- String termString=toMultiLineText(term);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- assertEquals(termString,toMultiLineText(snapshot));
-
- // make changes and assert that the snapshot has not changed
- // then update the snapshot and expect it to be the
- // same as the changed terminal
-
- // make a change
- term.setChar(0, 0, '?', null);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // make a change
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(true);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(true);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // set dimensions
- term.setDimensions(2, 2);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // set dimensions
- term.setDimensions(20, 20);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
- }
-
- public void testMaxSize() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- term.setMaxHeight(8);
- TerminalTextTestHelper.fill(term, s);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- }
-
-
- public void testGetChar() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
- ITerminalTextData termUnchanged=makeITerminalTextData();
- TerminalTextTestHelper.fill(termUnchanged,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- for (int line = 0; line < snapshot.getHeight(); line++) {
- for (int column = 0; column < snapshot.getWidth(); column++) {
- assertEquals(term.getChar(line, column),snapshot.getChar(line, column));
- }
- }
- // make a change
- term.setChar(0, 0, '?', null);
- // check against unchanged data
- for (int line = 0; line < snapshot.getHeight(); line++) {
- for (int column = 0; column < snapshot.getWidth(); column++) {
- assertEquals(termUnchanged.getChar(line, column),snapshot.getChar(line, column));
- }
- }
- // update and compare against the terminal
- snapshot.updateSnapshot(true);
- for (int line = 0; line < snapshot.getHeight(); line++) {
- for (int column = 0; column < snapshot.getWidth(); column++) {
- assertEquals(term.getChar(line, column),snapshot.getChar(line, column));
- }
- }
-
- }
-
- public void testGetHeight() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- int expectedHeight=term.getHeight();
- assertEquals(expectedHeight, snapshot.getHeight());
- term.setDimensions(term.getHeight()-1, term.getWidth());
- assertEquals(expectedHeight, snapshot.getHeight());
-
- //
- snapshot.updateSnapshot(false);
- expectedHeight=term.getHeight();
- assertEquals(expectedHeight, snapshot.getHeight());
- term.setDimensions(term.getHeight()-1, term.getWidth());
- assertEquals(expectedHeight, snapshot.getHeight());
- }
-//
-// public void testGetLineSegments() {
-// fail("Not yet implemented");
-// }
-//
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- term.setChar(line, column, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
-
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertSame(style.setForground(StyleColor.getStyleColor(""+c)), snapshot.getStyle(line, column));
- }
- }
-
- }
-
- public void testGetWidth() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- int expectedWidth=term.getWidth();
- assertEquals(expectedWidth, snapshot.getWidth());
- term.setDimensions(term.getHeight(), term.getWidth()-1);
- assertEquals(expectedWidth, snapshot.getWidth());
-
- //
- snapshot.updateSnapshot(false);
- expectedWidth=term.getWidth();
- assertEquals(expectedWidth, snapshot.getWidth());
- term.setDimensions(term.getHeight(), term.getWidth()-1);
- assertEquals(expectedWidth, snapshot.getWidth());
- }
-
- public void testGetFirstChangedLine() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
-
- assertEquals(0, snapshot.getFirstChangedLine());
-
- // if nothing has changed the first changed line i height
- snapshot.updateSnapshot(false);
- assertEquals(Integer.MAX_VALUE, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(0, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(3, 0, 'x', null);
- term.setChar(4, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(3, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(0, 1, -1);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(false);
- assertEquals(2, snapshot.getFirstChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(true);
- assertEquals(3, snapshot.getFirstChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- term.setChar(1, 0, 'x', null);
- snapshot.updateSnapshot(true);
- assertEquals(1, snapshot.getFirstChangedLine());
-
- }
- public void testGetLastChangedLine() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
-
- assertEquals(4, snapshot.getLastChangedLine());
-
- // if nothing has changed the first changed line i height
- snapshot.updateSnapshot(false);
- assertEquals(-1, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(0, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.cleanLine(1);
- snapshot.updateSnapshot(false);
- assertEquals(1, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(3, 0, 'x', null);
- term.setChar(4, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(4, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(0, 1, -1);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(false);
- assertEquals(3, snapshot.getLastChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(true);
- assertEquals(3, snapshot.getLastChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- term.setChar(1, 0, 'x', null);
- snapshot.updateSnapshot(true);
- assertEquals(3, snapshot.getLastChangedLine());
-
- }
- /**
- * @param snapshot
- * @param expected a string of 0 and 1 (1 means changed)
- */
- void assertChangedLines(ITerminalTextDataSnapshot snapshot, String expected) {
- assertEquals(expected.length(),snapshot.getHeight());
- StringBuffer buffer=new StringBuffer();
- for (int line = 0; line < expected.length(); line++) {
- if(snapshot.hasLineChanged(line))
- buffer.append('1');
- else
- buffer.append('0');
- }
- assertEquals(expected, buffer.toString());
- }
- public void testHasLineChangedScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="00\n" +
- "11\n" +
- "22\n" +
- "33\n" +
- "44\n" +
- "55\n" +
- "66\n" +
- "77\n" +
- "88\n" +
- "99";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0000100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0001100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0000110000");
-
- term.scroll(2,3,1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,1);
- term.scroll(2,4,1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011110000");
-
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-2);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011110000");
- }
- public void testMultiScrollWithDifferentSizes() {
- ITerminalTextData term=makeITerminalTextData();
- String s="00\n" +
- "11\n" +
- "22\n" +
- "33\n" +
- "44\n" +
- "55\n" +
- "66\n" +
- "77\n" +
- "88\n" +
- "99";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(2,6,-1);
- term.scroll(2,5,-1);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011111100");
- assertEquals(2, snapshot.getFirstChangedLine());
- assertEquals(7, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- // scrolls with different ranges cause no scroll
- // optimization
- snapshot=snapshot(s,term);
- term.scroll(2,6,-1);
- term.scroll(2,5,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011111100");
- assertEquals(2, snapshot.getFirstChangedLine());
- assertEquals(7, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowShift());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- }
- public void testHasLineChanged() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-1);
- term.setChar(7, 0, '.', null);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0000100100");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-2);
- term.setChar(9, 0, '.', null);
- term.setChars(0, 0, new char[]{'.','!'}, null);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1001100001");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- term.setChars(2, 2, new char[]{'.','!','*'},1,1, null);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0010110000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,7,-1);
- term.setChar(5, 2, '.', null);
- term.scroll(2,7,-2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0001001110");
-
-
- snapshot=snapshot(s,term);
- term.scroll(2,7,-1);
- term.setChar(5, 2, '.', null);
- term.scroll(2,7,-2);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011111110");
-
- }
-
- public void testScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="00\n" +
- "11\n" +
- "22\n" +
- "33\n" +
- "44\n" +
- "55\n" +
- "66\n" +
- "77\n" +
- "88\n" +
- "99";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(true);
- assertEquals(2, snapshot.getScrollWindowStartLine());
- assertEquals(3, snapshot.getScrollWindowSize());
- assertEquals(-1, snapshot.getScrollWindowShift());
- assertEquals(4, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
-
- term.scroll(2,3,-2);
- snapshot.updateSnapshot(true);
- assertEquals(2, snapshot.getScrollWindowStartLine());
- assertEquals(3, snapshot.getScrollWindowSize());
- assertEquals(-2, snapshot.getScrollWindowShift());
- assertEquals(3, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
-
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- snapshot.updateSnapshot(true);
- assertEquals(2, snapshot.getScrollWindowStartLine());
- assertEquals(4, snapshot.getScrollWindowSize());
- assertEquals(-2, snapshot.getScrollWindowShift());
- assertEquals(4, snapshot.getFirstChangedLine());
- assertEquals(5, snapshot.getLastChangedLine());
-
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- assertEquals(2, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
-
- }
- public void testDisjointScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(0,2,-1);
- term.scroll(4,2,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1100110000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(0,3,-1);
- term.scroll(2,2,-2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(0,3,-1);
- term.scroll(2,2,-2);
- term.scroll(0,3,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(0,3,-1);
- term.scroll(2,2,-2);
- term.scroll(0,3,-10);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(1,3,-1);
- term.scroll(1,3,1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- }
- public void testResize() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.setDimensions(term.getHeight(), term.getWidth()+1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(3, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.setDimensions(term.getHeight()+1, term.getWidth());
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "11111");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.setDimensions(term.getHeight()-1, term.getWidth());
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "111");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(2, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.setDimensions(0, 0);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(-1, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- }
- public void testResizeAfterScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(1,2,-1);
- term.setDimensions(5, 4);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "11111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(1,2,-1);
- term.setDimensions(7, 2);
- term.scroll(4,2,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- snapshot=snapshot(s,term);
-
- term.scroll(1,2,-1);
- term.setDimensions(term.getHeight(),term.getWidth()+1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111111111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- }
- public void testScrollAfterResize() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.setDimensions(14, 6);
- term.scroll(0,14,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "11111111111111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- }
- private final class SnapshotListener implements ITerminalTextDataSnapshot.SnapshotOutOfDateListener {
- int N;
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }
- public void reset() {
- N=0;
- }
- }
-
- public void testAddListener() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- SnapshotListener listener=new SnapshotListener();
- snapshot.addListener(listener);
- assertEquals(0, listener.N);
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- assertEquals(1, listener.N);
- term.setChar(1, 1, '?', null);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener.N);
- term.setChars(2, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener.N);
- term.scroll(1, 2, 1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // setDimensions
- term.setDimensions(2, 2);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // setDimensions
- term.setDimensions(20, 20);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
- }
-
- public void testRemoveListener() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- SnapshotListener listener1=new SnapshotListener();
- SnapshotListener listener2=new SnapshotListener();
- SnapshotListener listener3=new SnapshotListener();
- snapshot.addListener(listener1);
- snapshot.addListener(listener2);
- snapshot.addListener(listener3);
- assertEquals(0, listener1.N);
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
- term.setChar(1, 1, '?', null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
- term.setChars(2, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
- snapshot.removeListener(listener2);
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(0, listener2.N);
- assertEquals(1, listener3.N);
-
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(0, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(0, listener2.N);
- assertEquals(1, listener3.N);
-
- snapshot.addListener(listener2);
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
-
- snapshot.removeListener(listener3);
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(0, listener3.N);
-
- term.scroll(1, 2, 1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(0, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(0, listener3.N);
-
- snapshot.addListener(listener3);
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
- // add listener multiple times
- snapshot.addListener(listener3);
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(2, listener3.N);
-
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(2, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(2, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
- // remove the duplicate listener
- snapshot.removeListener(listener3);
-
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
-
- // setDimensions
- term.setDimensions(2, 2);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
-
- // setDimensions
- term.setDimensions(20, 20);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
- }
- public void testWindowOfInterest() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
- snapshot.setInterestWindow(7, 4);
- snapshot.setInterestWindow(9, 4);
- snapshot.updateSnapshot(false);
- }
- public void testWindowOfInterest2() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
- term.scroll(7, 3,-1);
- snapshot.setInterestWindow(9, 4);
- snapshot.updateSnapshot(false);
- }
- public void testAddLine() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.updateSnapshot(false);
- assertEquals(10,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- assertFalse(snapshot.isOutOfDate());
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- assertEquals(11,term.getHeight());
- assertEquals(10,snapshot.getHeight());
- snapshot.updateSnapshot(false);
- assertEquals(11,term.getHeight());
- assertEquals(11,snapshot.getHeight());
- assertEquals(20,term.getMaxHeight());
-
- term.addLine();
- term.addLine();
- assertEquals(11,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(13,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- }
- public void testHasDimensionsChanged() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.setInterestWindow(3, 4);
- snapshot.updateSnapshot(false);
- assertEquals(10,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- assertFalse(snapshot.isOutOfDate());
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- assertEquals(11,term.getHeight());
- assertEquals(10,snapshot.getHeight());
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasDimensionsChanged());
- assertEquals(11,term.getHeight());
- assertEquals(11,snapshot.getHeight());
- assertEquals(20,term.getMaxHeight());
-
- term.addLine();
- term.addLine();
- assertEquals(11,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasDimensionsChanged());
- assertEquals(13,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- }
- public void testCursor() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.setInterestWindow(3, 4);
- snapshot.updateSnapshot(false);
- term.setCursorLine(2);
- term.setCursorColumn(1);
- snapshot.updateSnapshot(false);
- assertEquals(2, snapshot.getCursorLine());
- assertEquals(1, snapshot.getCursorColumn());
- term.setCursorLine(3);
- term.setCursorColumn(2);
- snapshot.updateSnapshot(false);
- assertEquals(3, snapshot.getCursorLine());
- assertEquals(2, snapshot.getCursorColumn());
- }
- public void testCursor2() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.setInterestWindow(3, 4);
- snapshot.updateSnapshot(false);
- term.setCursorLine(2);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- term.setCursorColumn(1);
- assertTrue(snapshot.isOutOfDate());
- }
- public void testHasTerminalChanged() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- assertTrue(snapshot.hasTerminalChanged());
- snapshot.updateSnapshot(false);
-
- assertTrue(snapshot.hasTerminalChanged());
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, -1);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, 1);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, -1);
- snapshot.updateSnapshot(true);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, 1);
- snapshot.updateSnapshot(true);
- assertTrue(snapshot.hasTerminalChanged());
-
- // setDimensions
- term.setDimensions(2, 2);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // setDimensions
- term.setDimensions(20, 20);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.hasTerminalChanged());
-
- // window of interest changes should NOT set hasTerminalChanged
- snapshot.updateSnapshot(false);
- snapshot.setInterestWindow(7, 4);
-
- assertFalse(snapshot.hasTerminalChanged());
- }
- public void testGetTerminalTextData() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- assertSame(term, snapshot.getTerminalTextData());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java
deleted file mode 100644
index 7ce515cc1..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-
-public class TerminalTextDataSnapshotWindowTest extends TestCase {
- String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
- String toSimpleText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toSimple(term);
- }
-
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextData();
- }
- ITerminalTextDataSnapshot snapshotSimple(String text, ITerminalTextData term) {
- TerminalTextTestHelper.fillSimple(term,text);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- return snapshot;
-
- }
- /**
- * @param snapshot
- * @param expected a string of 0 and 1 (1 means changed)
- */
- void assertChangedLines(ITerminalTextDataSnapshot snapshot, String expected) {
- assertEquals(expected.length(),snapshot.getHeight());
- StringBuffer buffer=new StringBuffer();
- for (int line = 0; line < expected.length(); line++) {
- if(snapshot.hasLineChanged(line))
- buffer.append('1');
- else
- buffer.append('0');
- }
- assertEquals(expected, buffer.toString());
- }
-
- public void testSetInterestWindow() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- assertEquals(0, snapshot.getInterestWindowStartLine());
- assertEquals(-1, snapshot.getInterestWindowSize());
- snapshot.setInterestWindow(2, 3);
- assertEquals(2, snapshot.getInterestWindowStartLine());
- assertEquals(3, snapshot.getInterestWindowSize());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
- public void testSetChar() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- snapshot.setInterestWindow(2, 3);
- snapshot.updateSnapshot(false);
- assertEquals(" 234 ", toSimpleText(snapshot));
-
- term.setChar(0, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000000000");
-
- term.setChar(1, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChar(2, 0, 'x', null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0010000000");
-
- term.setChar(3, 0, 'x', null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0001000000");
-
- term.setChar(4, 0, 'x', null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000100000");
-
- term.setChar(5, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChar(6, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
-
- for (int i = 0; i < 9; i++) {
- term.setChar(i, 0, (char)('a'+i), null);
- }
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
-
- public void testSetChars() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- snapshot.setInterestWindow(2, 3);
- snapshot.updateSnapshot(false);
- assertEquals(" 234 ", toSimpleText(snapshot));
-
- term.setChars(0, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000000000");
-
- term.setChars(1, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(2, 0, "x".toCharArray(), null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0010000000");
-
- term.setChars(3, 0, "x".toCharArray(), null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0001000000");
-
- term.setChars(4, 0, "x".toCharArray(), null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000100000");
-
- term.setChars(5, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(6, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
- for (int i = 0; i < 9; i++) {
- term.setChars(i, 0, (i+"").toCharArray(), null);
- }
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
- public void testSetChars2() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- snapshot.setInterestWindow(2, 3);
- snapshot.updateSnapshot(false);
- assertEquals(" 234 ", toSimpleText(snapshot));
-
- term.setChars(0, 0, "abcdef".toCharArray(),2,1, null);
- assertFalse(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000000000");
-
- term.setChars(1, 0, "abcdef".toCharArray(),2 ,1, null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(2, 0, "abcdef".toCharArray(),2 ,1, null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0010000000");
-
- term.setChars(3, 0, "abcdef".toCharArray(),2 ,1, null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0001000000");
-
- term.setChars(4, 0, "abcdef".toCharArray(),2 ,1, null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000100000");
-
- term.setChars(5, 0, "abcdef".toCharArray(),2 ,1, null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(6, 0, "abcdef".toCharArray(),2 ,1, null);
- assertFalse(snapshot.isOutOfDate());
- for (int i = 0; i < 9; i++) {
- term.setChars(i, 0, ("ab"+i+"def").toCharArray(),2 ,1, null);
- }
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java
deleted file mode 100644
index 743d17792..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataStoreTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataStore();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java
deleted file mode 100644
index 457e18d42..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextData();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java
deleted file mode 100644
index 5e739176c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import java.util.ArrayList;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextDataWindowTest extends AbstractITerminalTextDataTest {
- int fOffset;
- int fSize;
- public TerminalTextDataWindowTest() {
- fOffset=2;
- fSize=2;
- }
- protected ITerminalTextData makeITerminalTextData() {
- TerminalTextDataWindow term=new TerminalTextDataWindow();
- term.setWindow(fOffset,fSize);
- return term;
- }
- /**
- * Used for multi line text
- * @param expected
- * @param actual
- */
- protected void assertEqualsTerm(String expected,String actual) {
- assertEquals(stripMultiLine(expected), stripMultiLine(actual));
- }
- private String stripMultiLine(String s) {
- StringBuffer b=new StringBuffer();
- // String[] lines=s.split("\n");
- // <J2ME CDC-1.1 Foundation-1.1 variant>
- ArrayList l = new ArrayList();
- int j = 0;
- for (int k = 0; k < s.length(); k++) {
- if (s.charAt(k) == '\n') {
- l.add(s.substring(j, k));
- j = k;
- }
- }
- j = l.size() - 1;
- while (j >= 0 && "".equals(l.get(j))) {
- j--;
- }
- String[] lines = new String[j + 1];
- while (j >= 0) {
- lines[j] = (String) l.get(j);
- j--;
- }
- // </J2ME CDC-1.1 Foundation-1.1 variant>
- for (int i = 0; i < lines.length; i++) {
- if(i>0)
- b.append("\n"); //$NON-NLS-1$
- if(i>=fOffset && i<fOffset+fSize)
- b.append(lines[i]);
- else
- b.append(new String(new char[lines[i].length()]));
- }
- return b.toString();
- }
- /**
- * Used for simple text
- * @param expected
- * @param actual
- */
- protected void assertEqualsSimple(String expected,String actual) {
- assertEquals(stripSimple(expected), stripSimple(actual));
- }
- String stripSimple(String s) {
- StringBuffer b=new StringBuffer();
- for (int i = 0; i < s.length(); i++) {
- if(i>=fOffset && i<fOffset+fSize)
- b.append(s.charAt(i));
- else
- b.append(' ');
- }
- return b.toString();
- }
- public void testAddLine() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- term.addLine();
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "\0\0\0\n" +
- "\000\000\000", toMultiLineText(term));
- }
-
- public void testMaxSize() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- term.setMaxHeight(8);
- fill(term, s);
- assertEquals(5, term.getHeight());
- assertEquals(8, term.getMaxHeight());
- term.addLine();
- assertEquals(6, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(7, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- }
-
- public void testGetLineSegments() {
- Style s1=getDefaultStyle();
- Style s2=s1.setBold(true);
- Style s3=s1.setUnderline(true);
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(8, 8);
- LineSegment[] segments;
-
- term.setChars(2, 0,"0123".toCharArray(), s1);
- term.setChars(2, 4,"abcd".toCharArray(), null);
- segments=term.getLineSegments(2, 0, term.getWidth());
- assertEquals(2, segments.length);
- assertSegment(0, "0123", s1, segments[0]);
- assertSegment(4, "abcd", null, segments[1]);
-
-
- segments=term.getLineSegments(2, 4, term.getWidth()-4);
- assertEquals(1, segments.length);
- assertSegment(4, "abcd", null, segments[0]);
-
- segments=term.getLineSegments(2, 3, 2);
- assertEquals(2, segments.length);
- assertSegment(3, "3", s1, segments[0]);
- assertSegment(4, "a", null, segments[1]);
-
- segments=term.getLineSegments(2, 7, 1);
- assertEquals(1, segments.length);
- assertSegment(7, "d", null, segments[0]);
-
- segments=term.getLineSegments(2, 0, 1);
- assertEquals(1, segments.length);
- assertSegment(0, "0", s1, segments[0]);
-
- // line 1
- term.setChars(1, 0,"x".toCharArray(), s1);
- term.setChars(1, 1,"y".toCharArray(), s2);
- term.setChars(1, 2,"z".toCharArray(), s3);
-
- segments=term.getLineSegments(1, 0, term.getWidth());
- assertEquals(1, segments.length);
- assertSegment(0, "\000\000\000\000\000\000\000\000", null, segments[0]);
-
- // line 3
- segments=term.getLineSegments(3, 0, term.getWidth());
- assertEquals(1, segments.length);
- assertSegment(0, "\000\000\000\000\000\000\000\000", null, segments[0]);
-
- }
- public void testGetChar() {
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- assertEquals('\000', term.getChar(0,0));
- assertEquals('\000', term.getChar(0,1));
- assertEquals('\000', term.getChar(0,2));
- assertEquals('\000', term.getChar(0,3));
- assertEquals('\000', term.getChar(0,4));
- assertEquals('\000', term.getChar(1,0));
- assertEquals('\000', term.getChar(1,1));
- assertEquals('\000', term.getChar(1,2));
- assertEquals('\000', term.getChar(1,3));
- assertEquals('\000', term.getChar(1,4));
- assertEquals('A', term.getChar(2,0));
- assertEquals('B', term.getChar(2,1));
- assertEquals('C', term.getChar(2,2));
- assertEquals('D', term.getChar(2,3));
- assertEquals('E', term.getChar(2,4));
- }
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- Style style=getDefaultStyle();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- term.setChar(line, column, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- Style s=null;
- if(line>=fOffset&&line<fOffset+fSize)
- s=style.setForground(StyleColor.getStyleColor(""+c));
- assertSame(s, term.getStyle(line, column));
- }
- }
-
- }
- public void testSetChar() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- term.setChar(line, column, (char)('a'+column+line), null);
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=0;
- if(line>=fOffset&&line<fOffset+fSize)
- c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- }
-
- public void testSetChars() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- char[] chars=new char[term.getWidth()];
- for (int column = 0; column < term.getWidth(); column++) {
- chars[column]=(char)('a'+column+line);
- }
- term.setChars(line, 0, chars, null);
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=0;
- if(line>=fOffset&&line<fOffset+fSize)
- c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
-
- term.setChars(3, 1, new char[]{'1','2'}, null);
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "d12\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- // check if chars are correctly chopped
- term.setChars(4, 1, new char[]{'1','2','3','4','5'}, null);
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "d12\n"
- + "e12\n"
- + "fgh", toMultiLineText(term));
-
- }
- public void testSetCharsLen() {
- ITerminalTextData term=makeITerminalTextData();
- String s= "ZYXWVU\n"
- + "abcdef\n"
- + "ABCDEF";
- fill(term, s);
- char[] chars=new char[]{'1','2','3','4','5','6','7','8'};
- term.setChars(1, 0, chars, 0, 6,null);
- assertEqualsTerm(
- "ZYXWVU\n"
- + "123456\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 0, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "12345f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 1, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "23456f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 1, chars, 1, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "a2345f\n"
- + "ABCDEF", toMultiLineText(term));
-
-
-
- fill(term, s);
- term.setChars(1, 2, chars, 3, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "ab4567\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- }
- public void testSetCopyLines() {
- ITerminalTextData term=new TerminalTextDataStore();
- String s="012345";
- fillSimple(term, s);
- ITerminalTextData termCopy=makeITerminalTextData();
- String sCopy="abcde";
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,0);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple(sCopy, toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,5);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01cde", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a01de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a12de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a1234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,2,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a2345", toSimple(termCopy));
- }
- public void testScrollNegative() {
- scrollTest(0,2,-1," 23 "," 23 ");
- scrollTest(0,1,-1," 23 "," 23 ");
- scrollTest(0,6,-1," 23 "," 3 ");
- scrollTest(0,6,-6," 23 "," ");
- scrollTest(0,6,-7," 23 "," ");
- scrollTest(0,6,-8," 23 "," ");
- scrollTest(0,6,-2," 23 "," ");
- scrollTest(1,1,-1," 23 "," 23 ");
- scrollTest(1,2,-1," 23 "," 3 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- }
- public void testScrollAll() {
- scrollTest(0,6,1, " 2345"," 2 ");
- scrollTest(0,6,-1, " 2345"," 3 ");
- scrollTest(0,6,2, " 2345"," ");
- scrollTest(0,6,-2, " 2345"," ");
- }
- public void testCopyLineWithOffset() {
- ITerminalTextData term=makeITerminalTextData();
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- fill(term, s);
- ITerminalTextData dest=makeITerminalTextData();
- String sCopy=
- "aaa\n" +
- "bbb\n" +
- "ccc\n" +
- "ddd\n" +
- "eee";
- fill(dest, sCopy);
- copySelective(dest,term,1,0,new boolean []{true,false,false,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "222\n" +
- "bbb\n" +
- "ccc\n" +
- "\00\00\00\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,2,0,new boolean []{true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "333\n" +
- "444\n" +
- "ccc\n" +
- "ddd\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,true,true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(s, toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{false,false,false,false,false});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(sCopy, toMultiLineText(dest));
- }
- public void testCopy() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 1);
- ITerminalTextData data=new TerminalTextData();
- fillSimple(data,"abcd");
- term.copy(data);
-
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java
deleted file mode 100644
index 95a91f9b3..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextTestHelper {
- static public String toSimple(ITerminalTextDataReadOnly term) {
- return toSimple(toMultiLineText(term));
- }
- static public String toMultiLineText(ITerminalTextDataReadOnly term) {
- StringBuffer buff=new StringBuffer();
- int width=term.getWidth();
- for (int line = 0; line < term.getHeight(); line++) {
- if(line>0)
- buff.append("\n"); //$NON-NLS-1$
- for (int column = 0; column < width; column++) {
- buff.append(term.getChar(line, column));
- }
- }
- return buff.toString();
- }
- static public String toSimple(String str) {
- //return str.replaceAll("\000", " ").replaceAll("\n", "");
- // <J2ME CDC-1.1 Foundation-1.1 variant>
- StringBuffer buf = new StringBuffer(str.length());
- for (int i = 0; i < str.length(); i++) {
- char c = str.charAt(i);
- switch (c) {
- case '\000':
- buf.append(' ');
- break;
- case '\n':
- break;
- default:
- buf.append(c);
- break;
- }
- }
- return buf.toString();
- // </J2ME CDC-1.1 Foundation-1.1 variant>
- }
- /**
- * @param term
- * @param s each character is one line
- */
- static public void fillSimple(ITerminalTextData term, String s) {
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- term.setDimensions(s.length(), 1);
- for (int i = 0; i < s.length(); i++) {
- char c=s.charAt(i);
- term.setChar(i, 0, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- /**
- * @param term
- * @param s lines separated by \n. The terminal will automatically
- * resized to fit the text.
- */
- static public void fill(ITerminalTextData term, String s) {
- int width=0;
- int len=0;
- int height=0;
- for (int i = 0; i < s.length(); i++) {
- char c=s.charAt(i);
- if(c=='\n') {
- width=Math.max(width,len);
- len=0;
- } else {
- if(len==0)
- height++;
- len++;
- }
- }
- width=Math.max(width,len);
- term.setDimensions(height, width);
- fill(term,0,0,s);
- }
-
- static public void fill(ITerminalTextData term, int column, int line, String s) {
- int xx=column;
- int yy=line;
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- for (int i = 0; i < s.length(); i++) {
- char c=s.charAt(i);
- if(c=='\n') {
- yy++;
- xx=column;
- } else {
- term.setChar(yy, xx, c, style.setForground(StyleColor.getStyleColor(""+c)));
- xx++;
- }
- }
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java
deleted file mode 100644
index 115435b0f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.speedtest;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-public class SpeedTestConnection extends Thread {
- private static int fgNo;
- private final ITerminalControl fControl;
- private final InputStream fInputStream;
- private final SpeedTestSettings fSettings;
- protected SpeedTestConnection(InputStream inputStream, SpeedTestSettings settings,ITerminalControl control) {
- super("SpeedTestConnection-"+fgNo++);
- fControl = control;
- fInputStream=inputStream;
- fSettings=settings;
- }
- public void run() {
- fControl.setState(TerminalState.CONNECTED);
-
- try {
- readDataForever(fInputStream,fControl.getRemoteToTerminalOutputStream());
- } catch (IOException e) {
- connectFailed(e.getMessage(),e.getMessage());
- }
- // when reading is done, we set the state to closed
- fControl.setState(TerminalState.CLOSED);
- }
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg(msg);
- }
- /**
- * Read the data from the input file and display it in the terminal.
- * @param in
- * @throws IOException
- */
- private void readDataForever(InputStream in, OutputStream os) throws IOException {
- long N=0;
- long T=0;
- long tDisplay=0;
- int NCalls=0;
- int bufferSize=fSettings.getBufferSize();
- int throttle=fSettings.getThrottle();
- // read the data
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- // read until the thread gets interrupted....
- String info="";
- int n=0;
- byte[] crnl="\r\n".getBytes("UTF-8");
- long t0=System.currentTimeMillis();
- String line=null;
- do {
- line=reader.readLine();
-
- // read some bytes
- if(line!=null) {
- os.write(line.getBytes("UTF-8"));
- os.write(crnl);
- n+=line.length();
- }
- // process at least this number of characters to update the UI
- if(line==null || n>bufferSize) {
- if(throttle>0)
- sleep(throttle);
- // we assume we get ASCII UTF8 bytes
- long t=System.currentTimeMillis();
- T+=t-t0;
- N+=n;
- NCalls++;
- if(t-tDisplay>1000 && T>0) {
- long rate=(1000*N)/T;
- info=rate+" byte/s = "+rate*8+" baud "+"bytes/call="+N/NCalls;
- info=rate+" byte/s with buffer size "+fSettings.getBufferSize();
- setTitle(info);
- tDisplay=System.currentTimeMillis();
- }
- n=0;
- t0=System.currentTimeMillis();
- }
- } while(line!=null);
- }
- private void sleep(int ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- private void setTitle(final String title) {
- Display.getDefault().asyncExec(new Runnable(){
- public void run() {
- fControl.setTerminalTitle(title);
- }});
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java
deleted file mode 100644
index 88e9b5a5d..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.speedtest;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class SpeedTestConnector extends TerminalConnectorImpl {
- final SpeedTestSettings fSettings=new SpeedTestSettings();
- InputStream fInputStream;
- OutputStream fOutputStream;
- SpeedTestConnection fConnection;
- public SpeedTestConnector() {
- }
- synchronized public void connect(ITerminalControl control) {
- super.connect(control);
- fControl.setState(TerminalState.CONNECTING);
- String file=fSettings.getInputFile();
- try {
- fInputStream=new BufferedInputStream(new FileInputStream(file));
- } catch (FileNotFoundException e) {
- disconnect();
- fControl.setMsg(file+": "+e.getLocalizedMessage());
- return;
- }
- fOutputStream=System.out;
- fControl.setTerminalTitle(fSettings.getInputFile());
- fConnection=new SpeedTestConnection(fInputStream,fSettings,fControl);
- fConnection.start();
- }
-
- synchronized public void doDisconnect() {
- if(fConnection!=null){
- fConnection.interrupt();
- fConnection=null;
- }
- if (fInputStream != null) {
- try {
- fInputStream.close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- fInputStream=null;
- if (fOutputStream != null) {
- try {
- fOutputStream.close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- fOutputStream=null;
- }
- synchronized public InputStream getInputStream() {
- return fInputStream;
- }
-
- synchronized public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
-
- public String getSettingsSummary() {
- return fSettings.getInputFile();
- }
-
- public void initialize() {
- //throw new RuntimeException("XXX problems\nSpeedTest\nXXX!");
- }
-
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
-
- public ISettingsPage makeSettingsPage() {
- return new SpeedTestSettingsPage(fSettings);
- }
-
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java
deleted file mode 100644
index 84f94226c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.speedtest;
-
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public class SpeedTestSettings {
- String fInputFile="";
- String fBufferSize="";
- String fThrottle;
- String getInputFile() {
- return fInputFile;
- }
- public String getBufferSizeString() {
- return getBufferSize()+"";
- }
- public void setBufferSizeString(String bufferSize) {
- fBufferSize = bufferSize;
- }
- public int getBufferSize() {
- try {
- return Integer.parseInt(fBufferSize);
- } catch(RuntimeException e) {
- return 1024;
- }
- }
- void setInputFile(String testFile) {
- fInputFile = testFile;
- }
- public void load(ISettingsStore store) {
- fInputFile=store.get("inputFile");
- fBufferSize=store.get("bufferSize");
- fThrottle=store.get("throttle");
- }
- public void save(ISettingsStore store) {
- store.put("inputFile", fInputFile);
- store.put("bufferSize", fBufferSize);
- store.put("throttle", fThrottle);
- }
- public String getThrottleString() {
- return fThrottle;
- }
- public int getThrottle() {
- try {
- return Integer.parseInt(fThrottle);
- } catch(RuntimeException e) {
- return 0;
- }
- }
- public void setThrottleString(String throttle) {
- fThrottle = throttle;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java
deleted file mode 100644
index 1f0c5a234..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.speedtest;
-
-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.internal.terminal.provisional.api.ISettingsPage;
-
-public class SpeedTestSettingsPage implements ISettingsPage {
- final SpeedTestSettings fSettings;
- Text fInputFile;
- Text fBufferSize;
- private Text fThrottle;
- SpeedTestSettingsPage(SpeedTestSettings settings) {
- fSettings=settings;
- }
- 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));
- fInputFile=createTextField(composite, "Input File:");//$NON-NLS-1$
- fBufferSize=createTextField(composite, "Buffer Size:");//$NON-NLS-1$
- fThrottle=createTextField(composite, "Throttle:");//$NON-NLS-1$
- loadSettings();
- }
- private Text createTextField(Composite composite, String label) {
- new Label(composite, SWT.RIGHT).setText(label);
- Text text = new Text(composite, SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return text;
- }
-
- public void loadSettings() {
- setText(fInputFile, fSettings.getInputFile());
- setText(fBufferSize, fSettings.getBufferSizeString());
- setText(fThrottle, fSettings.getThrottleString());
- }
- private void setText(Text text, String value) {
- if(value==null)
- value="";
- text.setText(value);
- }
-
- public void saveSettings() {
- fSettings.setInputFile(fInputFile.getText());
- fSettings.setBufferSizeString(fBufferSize.getText());
- fSettings.setThrottleString(fThrottle.getText());
- }
-
- public boolean validateSettings() {
- return true;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java
deleted file mode 100644
index 6dde5a8bf..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.terminalcanvas;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- new TerminalTextCanvas(shell,SWT.NONE);
- shell.setSize (200, 150);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java
deleted file mode 100644
index 604d8b58b..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.internal.terminal.test.terminalcanvas;
-
-
-/*
- * Canvas example snippet: scroll an image (flicker free, no double buffering)
- *
- * For a list of all SWT example snippets see
- * http://www.eclipse.org/swt/snippets/
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet48 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- Image originalImage = null;
- FileDialog dialog = new FileDialog (shell, SWT.OPEN);
- dialog.setText ("Open an image file or cancel");
- String string = dialog.open ();
- if (string != null) {
- originalImage = new Image (display, string);
- }
- final Image image = originalImage;
- final Point origin = new Point (0, 0);
- final Canvas canvas = new Canvas (shell, SWT.NO_BACKGROUND |
- SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
- final ScrollBar hBar = canvas.getHorizontalBar ();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - origin.x;
- Rectangle rect = image.getBounds ();
- canvas.scroll (destX, 0, 0, 0, rect.width, rect.height, false);
- origin.x = -hSelection;
- }
- });
- final ScrollBar vBar = canvas.getVerticalBar ();
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - origin.y;
- Rectangle rect = image.getBounds ();
- canvas.scroll (0, destY, 0, 0, rect.width, rect.height, false);
- origin.y = -vSelection;
- }
- });
- canvas.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = image.getBounds ();
- Rectangle client = canvas.getClientArea ();
- hBar.setMaximum (rect.width);
- vBar.setMaximum (rect.height);
- hBar.setThumb (Math.min (rect.width, client.width));
- vBar.setThumb (Math.min (rect.height, client.height));
- int hPage = rect.width - client.width;
- int vPage = rect.height - client.height;
- int hSelection = hBar.getSelection ();
- int vSelection = vBar.getSelection ();
- if (hSelection >= hPage) {
- if (hPage <= 0) hSelection = 0;
- origin.x = -hSelection;
- }
- if (vSelection >= vPage) {
- if (vPage <= 0) vSelection = 0;
- origin.y = -vSelection;
- }
- canvas.redraw ();
- }
- });
- canvas.addListener (SWT.Paint, new Listener () {
- public void handleEvent (Event e) {
- GC gc = e.gc;
- gc.drawImage (image, origin.x, origin.y);
- Rectangle rect = image.getBounds ();
- Rectangle client = canvas.getClientArea ();
- int marginWidth = client.width - rect.width;
- if (marginWidth > 0) {
- gc.fillRectangle (rect.width, 0, marginWidth, client.height);
- }
- int marginHeight = client.height - rect.height;
- if (marginHeight > 0) {
- gc.fillRectangle (0, rect.height, client.width, marginHeight);
- }
- }
- });
- shell.setSize (200, 150);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- originalImage.dispose();
- display.dispose ();
-}
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java
deleted file mode 100644
index 8996bb966..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.terminalcanvas;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.ScrollBar;
-
-public class TerminalTextCanvas extends Canvas {
- Image image;
- Point origin = new Point (0, 0);
- public TerminalTextCanvas(Composite parent, int style) {
- super(parent, SWT.NO_BACKGROUND |
- SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL| style);
- loadImage(parent);
-
- final ScrollBar hBar = getHorizontalBar ();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - origin.x;
- Rectangle rect = image.getBounds ();
- scroll (destX, 0, 0, 0, rect.width, rect.height, false);
- origin.x = -hSelection;
- }
- });
- final ScrollBar vBar = getVerticalBar ();
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - origin.y;
- Rectangle rect = image.getBounds ();
- scroll (0, destY, 0, 0, rect.width, rect.height, false);
- origin.y = -vSelection;
- }
- });
- addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = image.getBounds ();
- Rectangle client = getClientArea ();
- hBar.setMaximum (rect.width);
- vBar.setMaximum (rect.height);
- hBar.setThumb (Math.min (rect.width, client.width));
- vBar.setThumb (Math.min (rect.height, client.height));
- int hPage = rect.width - client.width;
- int vPage = rect.height - client.height;
- int hSelection = hBar.getSelection ();
- int vSelection = vBar.getSelection ();
- if (hSelection >= hPage) {
- if (hPage <= 0) hSelection = 0;
- origin.x = -hSelection;
- }
- if (vSelection >= vPage) {
- if (vPage <= 0) vSelection = 0;
- origin.y = -vSelection;
- }
- redraw ();
- }
- });
- addListener (SWT.Paint, new Listener () {
- public void handleEvent (Event e) {
- GC gc = e.gc;
- System.out.println(gc.getClipping()+" "+origin);
- gc.drawImage (image, origin.x, origin.y);
- Rectangle rect = image.getBounds ();
- Rectangle client = getClientArea ();
- int marginWidth = client.width - rect.width;
- if (marginWidth > 0) {
- gc.fillRectangle (rect.width, 0, marginWidth, client.height);
- }
- int marginHeight = client.height - rect.height;
- if (marginHeight > 0) {
- gc.fillRectangle (0, rect.height, client.width, marginHeight);
- }
- }
- });
- }
- private void loadImage(Composite parent) {
- FileDialog dialog = new FileDialog (parent.getShell(), SWT.OPEN);
- dialog.setText ("Open an image file or cancel");
- String string = dialog.open ();
- if (string != null) {
- image = new Image (getDisplay(), string);
- }
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java
deleted file mode 100644
index 414622254..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.terminalcanvas;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-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.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.ScrollBar;
-
-/**
- * A <code>Canvas</code> showing a virtual object.
- * Virtual: the extent of the total canvas.
- * Screen: the visible client area in the screen.
- */
-public abstract class VirtualCanvas extends Canvas {
-
- private Rectangle fVirtualBounds = new Rectangle(0,0,0,0);
- private Rectangle fClientArea;
- private GC fPaintGC=null;
- public VirtualCanvas(Composite parent, int style) {
- super(parent, style|SWT.NO_BACKGROUND|SWT.NO_REDRAW_RESIZE);
- fPaintGC= new GC(this);
- addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event event) {
- paint(event.gc);
- }
- });
- addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- fClientArea=getClientArea();
- updateViewRectangle();
- }
- });
- getVerticalBar().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- scrollY((ScrollBar)e.widget);
- postScrollEventHandling(e);
-
- }
-
- });
- getHorizontalBar().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- scrollX((ScrollBar)e.widget);
- postScrollEventHandling(e);
-
- }
- });
- addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- if(fPaintGC!=null){
- fPaintGC.dispose();
- fPaintGC=null;
- }
- }
-
- });
- }
- public void setAutoSelect(boolean on) {
- }
- public boolean hasAutoSelect() {
- return false;
- }
- public void doAutoSelect() {
- }
-
- /** HACK: run an event loop if the scrollbar is dragged...*/
- private void postScrollEventHandling(Event e) {
- if(true&&e.detail==SWT.DRAG) {
- // TODO check if this is always ok???
- // used to process runnables while scrolling
- // This fixes the update problems when scrolling!
- // see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=47582#5
- // TODO investigate:
- // The alternative is to call redraw on the new visible area
- // redraw(expose.x, expose.y, expose.width, expose.height, true);
-
- while (!getDisplay().isDisposed() && getDisplay().readAndDispatch()) {
- // do nothing here...
- }
- }
- }
-
- protected void scrollX(ScrollBar hBar) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - fVirtualBounds.x;
- fVirtualBounds.x = -hSelection;
- scrollSmart(destX, 0);
- updateViewRectangle();
- }
- protected void scrollXDelta(int delta) {
- getHorizontalBar().setSelection(-fVirtualBounds.x+delta);
- scrollX(getHorizontalBar());
- }
-
- protected void scrollY(ScrollBar vBar) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - fVirtualBounds.y;
- fVirtualBounds.y = -vSelection;
- scrollSmart(0,destY);
- updateViewRectangle();
-
- }
- protected void scrollYDelta(int delta) {
- getVerticalBar().setSelection(-fVirtualBounds.y+delta);
- scrollY(getVerticalBar());
- }
-
-
- private void scrollSmart(int deltaX, int deltaY) {
- Rectangle rect = getBounds();
- scroll (deltaX, deltaY, 0, 0, rect.width, rect.height, false);
- }
-
- protected void revealRect(Rectangle rect) {
- Rectangle visibleRect=getScreenRectInVirtualSpace();
- // scroll the X part
- int deltaX=0;
- if(rect.x<visibleRect.x) {
- deltaX=rect.x-visibleRect.x;
- } else if(visibleRect.x+visibleRect.width<rect.x+rect.width){
- deltaX=(rect.x+rect.width)-(visibleRect.x+visibleRect.width);
- }
- if(deltaX!=0) {
- getHorizontalBar().setSelection(-fVirtualBounds.x+deltaX);
- scrollX(getHorizontalBar());
- }
-
- // scroll the Y part
- int deltaY=0;
- if(rect.y<visibleRect.y){
- deltaY=rect.y-visibleRect.y;
- } else if(visibleRect.y+visibleRect.height<rect.y+rect.height){
- deltaY=(rect.y+rect.height)-(visibleRect.y+visibleRect.height);
-
- }
- if(deltaY!=0) {
- getVerticalBar().setSelection(-fVirtualBounds.y+deltaY);
- scrollY(getVerticalBar());
- }
- }
-
- protected void repaint(Rectangle r) {
- if (fPaintGC!=null) {
- if(inClipping(r,fClientArea)) {
- fPaintGC.setClipping(r);
- paint(fPaintGC);
- }
- }
- }
-
- /**
- * @param gc
- */
- abstract protected void paint(GC gc);
- protected Color getBackgroundColor() {
- return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- }
- protected void paintUnoccupiedSpace(GC gc, Rectangle clipping) {
- int width=fVirtualBounds.width;
- int height=fVirtualBounds.height;
- int marginWidth = (clipping.x+clipping.width) - width;
- int marginHeight = (clipping.y+clipping.height) - height;
- if(marginWidth>0||marginHeight>0){
- Color bg=getBackground();
- gc.setBackground(getBackgroundColor());
- if (marginWidth > 0) {
- gc.fillRectangle (width, clipping.y, marginWidth, clipping.height);
- }
- if (marginHeight > 0) {
- gc.fillRectangle (clipping.x, height, clipping.width, marginHeight);
- }
- gc.setBackground(bg);
- }
- }
- /**
- * @private
- */
- protected boolean inClipping(Rectangle clipping, Rectangle r) {
- // TODO check if this is OK in all cases (the <=!)
- //
- if(r.x+r.width<=clipping.x)
- return false;
- if(clipping.x+clipping.width<=r.x)
- return false;
- if(r.y+r.height<=clipping.y)
- return false;
- if(clipping.y+clipping.height<=r.y)
- return false;
-
- return true;
- }
- /**
- * @return the screen rect in virtual space (starting with (0,0))
- * of the visible screen. (x,y>=0)
- */
- protected Rectangle getScreenRectInVirtualSpace() {
- return new Rectangle(fClientArea.x-fVirtualBounds.x,fClientArea.y-fVirtualBounds.y,fClientArea.width,fClientArea.height);
- }
- /**
- * @return the rect in virtual space (starting with (0,0))
- * of the visible screen. (x,y>=0)
- */
- protected Rectangle getRectInVirtualSpace(Rectangle r) {
- return new Rectangle(r.x-fVirtualBounds.x,r.y-fVirtualBounds.y,r.width,r.height);
- }
-
- /**
- * Sets the extend of the virtual dieplay ares
- * @param width
- * @param height
- */
- protected void setVirtualExtend(int width, int height) {
- fVirtualBounds.width=width;
- fVirtualBounds.height=height;
- updateScrollbars();
- updateViewRectangle();
- }
- /**
- * sets the scrolling origin. Also sets the scrollbars.
- * Does NOT redraw!
- * Use negative values (move the virtual origin to the top left
- * to see something in the screen (which is located at (0,0))
- * @param x
- * @param y
- */
- protected void setVirtualOrigin(int x, int y) {
- fVirtualBounds.x=x;
- fVirtualBounds.y=y;
- getHorizontalBar().setSelection(x);
- getVerticalBar().setSelection(y);
- updateViewRectangle();
- }
-
- /**
- * @param x
- * @return the virtual coordinate in scree space
- */
- protected int virtualXtoScreen(int x) {
- return x+fVirtualBounds.x;
- }
- protected int virtualYtoScreen(int y) {
- return y+fVirtualBounds.y;
- }
- protected int screenXtoVirtual(int x) {
- return x-fVirtualBounds.x;
- }
- protected int screenYtoVirtual(int y) {
- return y-fVirtualBounds.y;
- }
- /** called when the viewed part is changing */
- private Rectangle fViewRectangle=new Rectangle(0,0,0,0);
- void updateViewRectangle() {
- if(
- fViewRectangle.x==-fVirtualBounds.x
- && fViewRectangle.y==-fVirtualBounds.y
- && fViewRectangle.width==fClientArea.width
- && fViewRectangle.height==fClientArea.height
- )
- return;
- fViewRectangle.x=-fVirtualBounds.x;
- fViewRectangle.y=-fVirtualBounds.y;
- fViewRectangle.width=fClientArea.width;
- fViewRectangle.height=fClientArea.height;
- viewRectangleChanged(fViewRectangle.x,fViewRectangle.y,fViewRectangle.width,fViewRectangle.height);
- }
- protected Rectangle getViewRectangle() {
- return fViewRectangle;
- }
- /**
- * Called when the viewed part has changed.
- * Override when you need this information....
- * Is only called if the values change!
- * @param x visible in virtual space
- * @param y visible in virtual space
- * @param width
- * @param height
- */
- protected void viewRectangleChanged(int x, int y, int width, int height) {
-// System.out.println(x+" "+y+" "+width+" "+height);
- }
- /**
- * @private
- */
- private void updateScrollbars() {
- Point size= getSize();
- Rectangle clientArea= getClientArea();
-
- ScrollBar horizontal= getHorizontalBar();
- if (fVirtualBounds.width <= clientArea.width) {
- // TODO IMPORTANT in ScrollBar.setVisible comment out the line
- // that checks 'isvisible' and returns (at the beginning)
- horizontal.setVisible(false);
- horizontal.setSelection(0);
- } else {
- horizontal.setPageIncrement(clientArea.width - horizontal.getIncrement());
- int max= fVirtualBounds.width + (size.x - clientArea.width);
- horizontal.setMaximum(max);
- horizontal.setThumb(size.x > max ? max : size.x);
- horizontal.setVisible(true);
- }
-
- ScrollBar vertical= getVerticalBar();
- if (fVirtualBounds.height <= clientArea.height) {
- vertical.setVisible(false);
- vertical.setSelection(0);
- } else {
- vertical.setPageIncrement(clientArea.height - vertical.getIncrement());
- int max= fVirtualBounds.height + (size.y - clientArea.height);
- vertical.setMaximum(max);
- vertical.setThumb(size.y > max ? max : size.y);
- vertical.setVisible(true);
- }
- }
-}
-
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java
deleted file mode 100644
index f0c297511..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * Adds line by line
- *
- */
-abstract class AbstractLineOrientedDataSource implements IDataSource {
- abstract public char[] dataSource();
- abstract public Style getStyle();
-
- abstract public void next();
-
- public int step(ITerminalTextData terminal) {
- next();
- char[] chars=dataSource();
- Style style= getStyle();
- int len;
- // keep the synchronized block short!
- synchronized (terminal) {
- terminal.addLine();
- len=Math.min(terminal.getWidth(),chars.length);
- int line=terminal.getHeight()-1;
- terminal.setChars(line, 0, chars, 0, len, style);
- terminal.setCursorLine(line);
- terminal.setCursorColumn(len-1);
- }
- return len;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java
deleted file mode 100644
index 6d017f0bd..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-class DataReader implements Runnable {
- final Thread fThread;
- final IDataSource fDataSource;
- final ITerminalTextData fTerminal;
- volatile boolean fStart;
- volatile boolean fStop;
- volatile int fThrottleTime;
- final IStatus fStatus;
- final String fName;
- DataReader(String name, ITerminalTextData terminal, IDataSource dataSource, IStatus status) {
- fStatus=status;
- fName=name;
- fTerminal=terminal;
- fDataSource=dataSource;
- fThread=new Thread(this,name);
- fThread.setDaemon(true);
- fThread.start();
- }
- public void run() {
- long t0=System.currentTimeMillis()-1;
- long c=0;
- int lines=0;
- while(!Thread.interrupted()) {
- while(!fStart || fStop) {
- sleep(1);
- }
- if(fThrottleTime>0)
- sleep(fThrottleTime);
- // synchronize because we have to be sure the size does not change while
- // we add lines
- int len=fDataSource.step(fTerminal);
- // keep the synchronized block short!
- c+=len;
- lines++;
- if((fThrottleTime>0 || (lines%100==0))&&(System.currentTimeMillis()-t0)>1000) {
- long t=System.currentTimeMillis()-t0;
- final String s=(c*1000)/(t*1024)+"kb/s " + (lines*1000)/t+"lines/sec "+(c*1000*8)/t+" bits/s ";
- fStatus.setStatus(s);
- lines=0;
- t0=System.currentTimeMillis();
- c=0;
- }
- }
- }
- public int getThrottleTime() {
- return fThrottleTime;
- }
- public void setThrottleTime(int throttleTime) {
- fThrottleTime = throttleTime;
- }
- private void sleep(int ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- public boolean isStart() {
- return fStart;
- }
- public void setStart(boolean start) {
- fStart = start;
- }
- public String getName() {
- return fName;
- }
- public boolean isStop() {
- return fStop;
- }
- public void setStop(boolean stop) {
- fStop = stop;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java
deleted file mode 100644
index 2ffb33edb..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.Style;
-
-final class FastDataSource extends AbstractLineOrientedDataSource {
- char lines[][]=new char[][]{
- "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 ".toCharArray(),
- "abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi ".toCharArray(),
- };
-
-
- int pos;
-
- public char[] dataSource() {
- return lines[pos%lines.length];
- }
-
- public Style getStyle() {
- return null;
- }
-
- public void next() {
- pos++;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java
deleted file mode 100644
index 075393981..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-/**
- * Reads the file in an infinite loop.
- * Makes lines containing 'x' bold.
- *
- */
-final class FileDataSource extends AbstractLineOrientedDataSource {
- private final String fFile;
-
- BufferedReader reader;
-
- String line;
-
- Style style;
-
- Style styleNormal=Style.getStyle(StyleColor.getStyleColor("black"),StyleColor.getStyleColor("white"));
-
- Style styleBold=styleNormal.setBold(true);
-
- FileDataSource(String file) {
- fFile = file;
- }
-
- public char[] dataSource() {
- return line.toCharArray();
- }
-
- public Style getStyle() {
- return style;
- }
-
- public void next() {
- try {
- if(reader==null)
- reader = new BufferedReader(new FileReader(fFile));
- line=reader.readLine();
- if(line==null) {
- reader.close();
- reader=null;
- // reopen the file
- next();
- return;
- }
- if(line.lastIndexOf('x')>0)
- style=styleBold;
- else
- style=styleNormal;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java
deleted file mode 100644
index 938916d80..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-interface IDataSource {
- /**
- * @param terminal
- * @return number of characters changed
- */
- int step(ITerminalTextData terminal);
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java
deleted file mode 100644
index d060e779f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-public interface IStatus {
- void setStatus(String message);
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java
deleted file mode 100644
index 7a3dc3598..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-final class LineCountingDataSource extends AbstractLineOrientedDataSource {
- Style styleNormal=Style.getStyle(StyleColor.getStyleColor("black"),StyleColor.getStyleColor("red"));
-
- Style styles[]=new Style[] {
- styleNormal,
- styleNormal.setBold(true),
- styleNormal.setForground("blue"),
- styleNormal.setForground("yellow"),
- styleNormal.setBold(true).setUnderline(true),
- styleNormal.setReverse(true),
- styleNormal.setReverse(true).setBold(true),
- styleNormal.setReverse(true).setUnderline(true)
- };
-
- int pos;
-
- public char[] dataSource() {
- return (pos+" 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789").toCharArray();
- }
-
- public Style getStyle() {
- return styles[pos%styles.length];
- }
-
- public void next() {
- pos++;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java
deleted file mode 100644
index ee002861b..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import java.util.Random;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class RandomDataSource implements IDataSource {
- Random fRandom=new Random();
- Style styleNormal=Style.getStyle(StyleColor.getStyleColor("black"),StyleColor.getStyleColor("green"));
- Style styles[]=new Style[] {
- styleNormal,
- styleNormal.setBold(true),
- styleNormal.setForground("red"),
- styleNormal.setForground("yellow"),
- styleNormal.setBold(true).setUnderline(true),
- styleNormal.setReverse(true),
- styleNormal.setReverse(true).setBold(true),
- styleNormal.setReverse(true).setUnderline(true)
- };
-
- public int step(ITerminalTextData terminal) {
- int N=fRandom.nextInt(1000);
- int h=terminal.getHeight();
- int w=terminal.getWidth();
- synchronized (terminal) {
- for (int i = 0; i < N; i++) {
- int line=fRandom.nextInt(h);
- int col=fRandom.nextInt(w);
- char c=(char)('A'+fRandom.nextInt('z'-'A'));
- Style style=styles[fRandom.nextInt(styles.length)];
- terminal.setChar(line, col, c, style);
- }
- }
- return N;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java
deleted file mode 100644
index 7d9bdf91a..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.test.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-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.layout.RowData;
-import org.eclipse.swt.layout.RowLayout;
-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.tm.internal.terminal.textcanvas.ITextCanvasModel;
-import org.eclipse.tm.internal.terminal.textcanvas.PollingTextCanvasModel;
-import org.eclipse.tm.internal.terminal.textcanvas.TextCanvas;
-import org.eclipse.tm.internal.terminal.textcanvas.TextLineRenderer;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.TerminalTextDataFactory;
-
-/**
- * adjust columns when table gets resized....
- *
- */
-public class TerminalTextUITest {
- static TextCanvas fgTextCanvas;
- static ITextCanvasModel fgModel;
- static ITerminalTextData fTerminalModel;
- static Label fStatusLabel;
- static volatile int fHeight;
- static volatile int fWidth;
- static DataReader fDataReader;
- static List fDataReaders=new ArrayList();
- private static Text heightText;
- static class Status implements IStatus {
- public void setStatus(final String s) {
- if(!fStatusLabel.isDisposed())
- Display.getDefault().asyncExec(new Runnable(){
- public void run() {
- if(!fStatusLabel.isDisposed())
- fStatusLabel.setText(s);
- }});
- }
-
- }
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- Composite composite=new Composite(shell, SWT.NONE);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- RowLayout layout = new RowLayout(SWT.HORIZONTAL);
- layout.wrap = true;
- layout.fill = false;
- fTerminalModel=TerminalTextDataFactory.makeTerminalTextData();
- fHeight=24;
- fWidth=80;
- fTerminalModel.setDimensions(fHeight, fWidth);
- fTerminalModel.setMaxHeight(fHeight);
- ITerminalTextDataSnapshot snapshot=fTerminalModel.makeSnapshot();
- // TODO how to get the initial size correctly!
- snapshot.updateSnapshot(false);
- fgModel=new PollingTextCanvasModel(snapshot);
- fgTextCanvas=new TextCanvas(shell,fgModel, SWT.NONE,new TextLineRenderer(fgTextCanvas,fgModel));
- fgTextCanvas.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-
- composite.setLayout(layout);
- addAutorevealCursorButton(composite);
- Text maxHeightText = addMaxHeightInput(composite);
- addHeightInput(composite, maxHeightText);
- addWidthText(composite);
- Text throttleText = addThrottleText(composite);
-
- IStatus status=new Status();
- DataReader reader=new DataReader("Line Count",fTerminalModel,new LineCountingDataSource(),status);
- addDataReader(composite, reader);
- reader=new DataReader("Fast",fTerminalModel,new FastDataSource(),status);
- addDataReader(composite, reader);
- reader=new DataReader("Random",fTerminalModel,new RandomDataSource(),status);
- addDataReader(composite, reader);
- for (int i = 0; i < args.length; i++) {
- File file=new File(args[i]);
- reader=new DataReader(file.getName(),fTerminalModel,new VT100DataSource(args[i]),status);
- addDataReader(composite, reader);
- }
- addStopAllButton(composite, reader);
-
- fStatusLabel=new Label(shell,SWT.NONE);
- fStatusLabel.setLayoutData(new GridData(250,15));
- throttleText.setText("100");
- setThrottleForAll(100);
-
- if(args.length==0)
- addLabel(composite, "[Files can be added via commandline]");
- shell.setSize(600,300);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
- private static Text addMaxHeightInput(Composite composite) {
- addLabel(composite, "maxHeight:");
- final Text maxHeightText=new Text(composite,SWT.BORDER);
- setLayoutData(maxHeightText,30);
- maxHeightText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int height=textToInt(maxHeightText);
- if(height<1)
- return;
- if(fTerminalModel.getHeight()>height) {
- fTerminalModel.scroll(0, fTerminalModel.getHeight(), height-fTerminalModel.getHeight());
- fTerminalModel.setDimensions(height,fTerminalModel.getWidth());
- heightText.setText(height+"");
- }
- fTerminalModel.setMaxHeight(height);
- }
- }
- });
- maxHeightText.setText(fHeight+"");
- return maxHeightText;
- }
- private static void addHeightInput(Composite composite, final Text maxHeightText) {
- addLabel(composite,"heigth:");
- heightText=new Text(composite,SWT.BORDER);
- setLayoutData(heightText,30);
- heightText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int height=textToInt(heightText);
- if(height<1)
- return;
- maxHeightText.setText(""+height);
- fTerminalModel.setDimensions(height,fTerminalModel.getWidth());
- fTerminalModel.setMaxHeight(height);
- }
- }
- });
- heightText.setText(fHeight+"");
- }
- private static Text addWidthText(Composite composite) {
- addLabel(composite,"width:");
- final Text widthText=new Text(composite,SWT.BORDER);
- setLayoutData(widthText,30);
- widthText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int width=textToInt(widthText);
- if(width>1)
- fTerminalModel.setDimensions(fTerminalModel.getHeight(), width);
- }
- }
- });
- widthText.setText(fWidth+"");
- return widthText;
- }
- private static Text addThrottleText(Composite composite) {
- addLabel(composite,"throttle:");
- final Text throttleText=new Text(composite,SWT.BORDER);
- setLayoutData(throttleText,30);
- throttleText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int throttle=textToInt(throttleText);
- setThrottleForAll(throttle);
- }
- }});
- return throttleText;
- }
- private static void addStopAllButton(Composite composite, DataReader reader) {
- final Button stopAllButton=new Button(composite,SWT.CHECK);
- stopAllButton.setText("Stop ALL");
- stopAllButton.addSelectionListener(new SelectionAdapter(){
-
- public void widgetSelected(SelectionEvent e) {
- boolean stop=stopAllButton.getSelection();
- for (Iterator iterator = fDataReaders.iterator(); iterator.hasNext();) {
- DataReader reader = (DataReader) iterator.next();
- reader.setStop(stop);
-
- }}});
- stopAllButton.setSelection(reader.isStart());
- }
- private static void addAutorevealCursorButton(Composite composite) {
- final Button button=new Button(composite,SWT.CHECK);
- button.setText("ScrollLock");
- button.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- boolean scrollLock=button.getSelection();
- fgTextCanvas.setScrollLock(scrollLock);
- }
- });
- button.setSelection(fgTextCanvas.isScrollLock());
- }
- private static void addLabel(Composite composite,String message) {
- Label label;
- label=new Label(composite, SWT.NONE);
- label.setText(message);
- }
- private static void addDataReader(Composite composite, final DataReader reader) {
- fDataReaders.add(reader);
- final Button button=new Button(composite,SWT.CHECK);
- button.setText(reader.getName());
- button.addSelectionListener(new SelectionAdapter(){
-
- public void widgetSelected(SelectionEvent e) {
- reader.setStart(button.getSelection());
- }});
- button.setSelection(reader.isStart());
-
- }
- static private void setThrottleForAll(int throttle) {
- for (Iterator iterator = fDataReaders.iterator(); iterator.hasNext();) {
- DataReader reader = (DataReader) iterator.next();
- reader.setThrottleTime(throttle);
- }
- }
- static void setLayoutData(Control c,int width) {
- c.setLayoutData(new RowData(width,-1));
- }
- static int textToInt(Text text) {
- try {
- return Integer.valueOf(text.getText()).intValue();
- } catch (Exception ex) {
- return 0;
- }
- }
-}
-
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java
deleted file mode 100644
index 69e66b8af..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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) - [204796] Terminal should allow setting the encoding to use
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.test.ui;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.tm.internal.terminal.control.impl.ITerminalControlForText;
-import org.eclipse.tm.internal.terminal.emulator.VT100Emulator;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-/**
- * Reads the file in an infinite loop.
- * Makes lines containing 'x' bold.
- *
- */
-final class VT100DataSource implements IDataSource {
- VT100Emulator fEmulator;
- volatile int fAvailable;
- volatile int fRead;
- private final String fFile;
-
- VT100DataSource(String file) {
- fFile=file;
- }
- class InfiniteFileInputStream extends InputStream {
- public InfiniteFileInputStream() {
- try {
- fInputStream=new FileInputStream(fFile);
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- public int available() throws IOException {
- return fAvailable;
- }
- private InputStream fInputStream;
- public int read() throws IOException {
- throw new IOException();
- }
- public int read(byte[] b, int off, int len) throws IOException {
- while(fAvailable==0) {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- len=fAvailable;
- int n=fInputStream.read(b, off, len);
- if(n<=0) {
- fInputStream.close();
- fInputStream=new FileInputStream(fFile);
- n=fInputStream.read(b, off, len);
- }
- fAvailable-=n;
- return n;
- }
-
- }
- void init(ITerminalTextData terminal) {
- final Reader reader;
- try {
- reader = new InputStreamReader(new InfiniteFileInputStream(), "ISO-8859-1"); //$NON-NLS-1$
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- fEmulator=new VT100Emulator(terminal,new ITerminalControlForText() {
-
- public void disconnectTerminal() {
- // TODO Auto-generated method stub
-
- }
-
- public OutputStream getOutputStream() {
- return new ByteArrayOutputStream();
- }
-
- public TerminalState getState() {
- return TerminalState.CONNECTED;
- }
-
- public ITerminalConnector getTerminalConnector() {
- return null;
- }
-
- public void setState(TerminalState state) {
- }
-
- public void setTerminalTitle(String title) {
- }
- }, reader);
- }
- public int step(ITerminalTextData terminal) {
- synchronized(terminal) {
- if(fEmulator==null) {
- init(terminal);
-// fEmulator.setDimensions(48, 132);
- fEmulator.setDimensions(24, 80);
- fEmulator.setCrAfterNewLine(true);
-
- }
- fAvailable=80;
- fEmulator.processText();
- }
- return 80;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java
deleted file mode 100644
index dd105f603..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.internal.terminal.textcanvas;
-
-import java.io.OutputStream;
-
-public class PipedInputStreamPerformanceTest {
-
- /**
- * @param args
- * @throws InterruptedException
- */
- public static void main(String[] args) throws InterruptedException {
- runPerformanceTest();
- runPerformanceTest();
- }
-
- private static void runPerformanceTest() throws InterruptedException {
- PipedInputStream in=new PipedInputStream(1024);
- OutputStream out=in.getOutputStream();
- PipedStreamTest.runPipe("",in, out,100);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java
deleted file mode 100644
index 11e7ecfeb..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.internal.terminal.textcanvas;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-
-class PipedStreamTest {
- static class ReadThread extends Thread implements Runnable {
-
- InputStream pi = null;
-
- OutputStream po = null;
-
- ReadThread(String process, InputStream pi, OutputStream po) {
- this.pi = pi;
- this.po = po;
- setDaemon(true);
- }
-
- public void run() {
- byte[] buffer = new byte[2048];
- int bytes_read;
- try {
- for (;;) {
- bytes_read = pi.read(buffer);
- if (bytes_read == -1) {
- po.close();
- pi.close();
- return;
- }
- po.write(buffer, 0, bytes_read);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- }
- static class FakeInputStream extends InputStream {
- int N;
- FakeInputStream(int n) {
- N=n;
- }
- public int read(byte[] b, int off, int len) throws IOException {
- if(N==0)
- return -1;
- int n=Math.min(len,N);
- for (int i = off; i < off+n; i++) {
- b[i]='x';
- }
- N-=n;
- return n;
- }
- public int read() throws IOException {
- throw new UnsupportedOperationException();
- }
- /*
- * available has to be implemented!
- */
- public int available() throws IOException {
- return N;
- }
- }
- static class FakeOutputStream extends OutputStream {
- long N;
- public void write(int b) throws IOException {
- throw new UnsupportedOperationException();
- }
- public void write(byte[] b, int off, int len) throws IOException {
- N+=len;
- }
- }
- public static void main(String[] args) throws IOException, InterruptedException {
- while(true) {
- runSunTest();
- runMyTest();
- }
- }
- private static void runSunTest() throws IOException, InterruptedException {
- java.io.PipedInputStream in = new java.io.PipedInputStream();
- OutputStream out = new java.io.PipedOutputStream(in);
- runPipe("Sun ",in, out,10);
- }
- private static void runMyTest() throws IOException, InterruptedException {
- PipedInputStream in=new PipedInputStream(4*1024);
- OutputStream out=in.getOutputStream();
- runPipe("My ",in, out,99);
- }
- public static void runPipe(String what,InputStream writeIn, OutputStream readOut,int N) throws InterruptedException {
- FakeInputStream in=new FakeInputStream(N*1000*1000);
- FakeOutputStream out=new FakeOutputStream();
- ReadThread rt = new ReadThread("reader", in , readOut);
- ReadThread wt = new ReadThread("writer", writeIn, out);
- long t0=System.currentTimeMillis();
- rt.start();
- wt.start();
- wt.join();
- long t=System.currentTimeMillis();
- long n=out.N;
- System.out.println(what+n + " byte in " +(t-t0)+" ms -> "+(1000*n)/((t-t0+1)*1024)+" kb/sec");
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java
deleted file mode 100644
index 257c92a3a..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.tm.terminal.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Public Terminal Model test cases.
- * Runs in internal model package to allow access to default visible items.
- */
-public class AllTests extends TestCase {
- public AllTests() {
- super(null);
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(StyleColorTest.class);
- suite.addTestSuite(StyleTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java
deleted file mode 100644
index e641c74d7..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.model;
-
-import junit.framework.TestCase;
-
-public class StyleColorTest extends TestCase {
-
-
- public void testEqualsObject() {
- assertEquals(StyleColor.getStyleColor("foo"),StyleColor.getStyleColor("foo"));
- assertFalse(StyleColor.getStyleColor("foox").equals(StyleColor.getStyleColor("foo")));
- }
-
- public void testSameObject() {
- assertSame(StyleColor.getStyleColor("foo"),StyleColor.getStyleColor("foo"));
- assertNotSame(StyleColor.getStyleColor("foox"),StyleColor.getStyleColor("foo"));
- }
-
- public void testToString() {
- assertEquals("xxx", StyleColor.getStyleColor("xxx").toString());
- }
-
- public void testGetName() {
- assertEquals("xxx", StyleColor.getStyleColor("xxx").getName());
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java
deleted file mode 100644
index 9f0cd7517..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.model;
-
-import junit.framework.TestCase;
-
-public class StyleTest extends TestCase {
- final StyleColor c1=StyleColor.getStyleColor("c1");
- final StyleColor c2=StyleColor.getStyleColor("c2");
- final StyleColor c3=StyleColor.getStyleColor("c3");
-
- public void testGetStyle() {
- Style s1=Style.getStyle(c1, c2, true, false, true, false);
- Style s2=Style.getStyle(c1, c2, true, false, true, false);
- assertEquals(s1,s2);
- assertSame(s1,s2);
- s1=s1.setBlink(!s1.isBlink());
- assertNotSame(s1,s2);
- assertFalse(s1.equals(s2));
- s1=s1.setBlink(!s1.isBlink());
- assertSame(s1,s2);
- }
-
- public void testSetForground() {
- Style s1=Style.getStyle(c1, c2, true, false, true, false);
- Style s2=s1;
- s2=s1.setForground(c3);
- assertNotSame(s1,s2);
- assertFalse(s1.equals(s2));
- assertSame(s2.getForground(), c3);
- assertSame(s1.getForground(), c1);
- assertSame(s1.getBackground(), c2);
- assertSame(s2.getBackground(), c2);
- s2=s2.setForground(c1);
- assertSame(s1, s2);
- }
-
- public void testSetBackground() {
- Style s1=Style.getStyle(c1, c2, true, false, true, false);
- Style s2=s1;
- s2=s1.setBackground(c3);
- assertNotSame(s1,s2);
- assertFalse(s1.equals(s2));
- assertSame(s2.getForground(), c1);
- assertSame(s1.getForground(), c1);
- assertSame(s1.getBackground(), c2);
- assertSame(s2.getBackground(), c3);
- s2=s2.setBackground(c2);
- assertSame(s1, s2);
- }
-
- public void testSetBold() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isBold());
- s2=s2.setBold(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isBold());
- s2=s2.setBold(false);
- assertSame(s1,s2);
- assertFalse(s2.isBold());
- }
-
- public void testSetBlink() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isBlink());
- s2=s2.setBlink(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isBlink());
- s2=s2.setBlink(false);
- assertSame(s1,s2);
- assertFalse(s2.isBlink());
- }
-
- public void testSetUnderline() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isUnderline());
- s2=s2.setUnderline(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isUnderline());
- s2=s2.setUnderline(false);
- assertSame(s1,s2);
- assertFalse(s2.isUnderline());
- }
-
- public void testSetReverse() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isReverse());
- s2=s2.setReverse(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isReverse());
- s2=s2.setReverse(false);
- assertSame(s1,s2);
- assertFalse(s2.isReverse());
- }
-
- private Style getDefaultStyle() {
- return Style.getStyle(c1, c2, false, false, false, false);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java
deleted file mode 100644
index 4921b764f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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.tm.terminal.test;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Master Test Suite to run all Terminal plug-in tests.
- */
-public class AutomatedPluginTests extends TestCase {
- /**
- * Call each AllTests class from each of the test packages.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedPluginTests.class.getName());
- suite.addTestSuite(org.eclipse.tm.internal.terminal.connector.TerminalConnectorPluginTest.class);
- suite.addTestSuite(org.eclipse.tm.internal.terminal.connector.TerminalConnectorFactoryTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java
deleted file mode 100644
index 5b8ca6bb9..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.tm.terminal.test;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Master test suite to run all terminal unit tests.
- */
-public class AutomatedTests extends TestCase {
-
- public static final String PI_TERMINAL_TESTS = "org.eclipse.tm.terminal.test"; //$NON-NLS-1$
-
- public AutomatedTests() {
- super(null);
- }
-
- public AutomatedTests(String name) {
- super(name);
- }
-
- /**
- * Call each AllTests class from each of the test packages.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedTests.class.getName());
- suite.addTest(org.eclipse.tm.internal.terminal.emulator.AllTests.suite());
- suite.addTest(org.eclipse.tm.internal.terminal.model.AllTests.suite());
- suite.addTest(org.eclipse.tm.terminal.model.AllTests.suite());
- return suite;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch b/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch
deleted file mode 100644
index fd2e3ebb9..000000000
--- a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.tm.terminal.test/src"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="2"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.tm.terminal.test/src"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.tm.terminal.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-</launchConfiguration>
diff --git a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch b/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch
deleted file mode 100644
index 5def47264..000000000
--- a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.tm.terminal.test.AutomatedPluginTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.tm.terminal.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
diff --git a/terminal/org.eclipse.tm.terminal.test/test.xml b/terminal/org.eclipse.tm.terminal.test/test.xml
deleted file mode 100644
index d1e88b42c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/test.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
- <!--
- Copyright (c) 2006, 2009 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:
- Wind River - initial API and implementation
- -->
-
-<!--
-Run post build tests.
-Not yet complete.
-Needs to be updated and tested for org.eclipse.tm.terminal
--->
-
-<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.tm.terminal.test"/>
- <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.tm.terminal.test.*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/terminal_test_workspace"/>
- <delete dir="${location}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.tm.terminal.test.AutomatedTests"/>
- <property name="extraVMargs" value="-ea"/>
- </ant>
-
- <!-- UI Tests: Commented out until access to default visible methods works
- <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 the tests -->
- <!-- have been run. You can use this to delete temporary files that are 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>
-
- <!-- This target runs the performance test suites. -->
- <target name="performance">
- </target>
-
-</project>
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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 4306c3308..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal View
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 cee185162..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/feature.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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:
- Wind River - initial API and implementation
- Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- -->
-<feature
- id="org.eclipse.tm.terminal.view"
- label="%featureName"
- version="2.0.101.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.1" match="equivalent"/>
- </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 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</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 092106af3..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal View Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management 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, 2009 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(TM) 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 e7b57cfff..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 eafd81605..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal View Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. 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 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.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 577524679..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal View Source
-providerName=Eclipse.org - DSDP
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/.cvsignore b/terminal/org.eclipse.tm.terminal.view/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.view/.project b/terminal/org.eclipse.tm.terminal.view/.project
deleted file mode 100644
index b54e2fe95..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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 381fc6eb0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/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/HelpContexts.xml b/terminal/org.eclipse.tm.terminal.view/HelpContexts.xml
deleted file mode 100644
index 5ba920568..000000000
--- a/terminal/org.eclipse.tm.terminal.view/HelpContexts.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2008 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="terminal_page">
- <description>The Terminal View supports direct connections to remote systems via serial or network connections.
- </description>
- <topic label="Terminal View" href="doc/html/01_terminalview.html" />
- <topic label="Terminal Emulation" href="doc/html/04_terminal_emulation.html" />
- </context>
- <context id="terminal_settings">
- <description>The Terminal Settings Dialog provides the controls for making terminal connections.
- </description>
- <topic label="Terminal Settings Dialog" href="doc/html/03_terminal_settings.html#terminal_settings"/>
- <topic label="Terminal View Quick Reference" href="doc/html/02_terminal_page.html#terminal_page"/>
- </context>
-</contexts> \ No newline at end of file
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 85ac5a348..000000000
--- a/terminal/org.eclipse.tm.terminal.view/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.view;singleton:=true
-Bundle-Version: 2.0.101.qualifier
-Bundle-Activator: org.eclipse.tm.internal.terminal.view.TerminalViewPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.tm.internal.terminal.actions;x-internal:=true,
- org.eclipse.tm.internal.terminal.view;x-internal:=true
diff --git a/terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml b/terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml
deleted file mode 100644
index 387756f5c..000000000
--- a/terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2008 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="terminal_view">
- <topic label="Terminal View" href="doc/html/01_terminalview.html" />
- <topic label="Terminal Emulation" href="doc/html/04_terminal_emulation.html" />
- <topic label="Terminal View Quick Reference" href="doc/html/02_terminal_page.html#terminal_page"/>
- </context>
-</contexts> \ No newline at end of file
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 d4cc693f9..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 5, 2007</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 fbbb9f83d..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=dsdp32.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 9e7f3eb66..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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=Target Management Terminal View\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. 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 4d42cd2a2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/build.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-# Copyright (c) 2003, 2009 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,\
- dsdp32.png,\
- HelpContexts.xml,\
- doc/,\
- toc.xml,\
- TerminalContexts.xml
-src.includes = about.html
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/book.css b/terminal/org.eclipse.tm.terminal.view/doc/book.css
deleted file mode 100644
index faa4199fe..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/book.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "../../PRODUCT_PLUGIN/book.css";
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html b/terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html
deleted file mode 100644
index c423cbf8b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, 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="../book.css" />
-<title>Terminal View</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 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
--->
-<body id="terminalview"><a name="terminalview"><!-- --></a>
-
-<h1 class="topictitle1">Terminal View</h1>
-<div class="p">
-<p>
-The <b>Terminal</b> view provides a raw serial or network connection to your target board.
-This view is useful for monitoring output on a target's serial port or making a telnet
-connection to a device.
-</p><p>
-The Terminal view is activated by choosing <b>Window &gt; Show View &gt; Other &gt; Terminal &gt; Terminal</b>.
-</p></div>
-<ul>
- <li><a href="02_terminal_page.html">Terminal View Quick Reference</a></li>
- <li><a href="03_terminal_settings.html">Terminal Settings Dialog</a></li>
- <li><a href="04_terminal_emulation.html">Terminal Emulation</a></li>
- <li><a href="notice.html">Legal Notice</a></li>
-</ul>
-
-Multiple <b>Terminal</b> view instances can be active at the same time, connected
-to a number of remote systems or disconnected and just holding their settings
-ready for re-connect.
-
-<p></p>
-<div class="p">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| <a href="02_terminal_page.html">Next &gt;</a></div>
- </body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html b/terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html
deleted file mode 100644
index 62847cefc..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, 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="../book.css" />
-<title>Terminal View Quick Reference</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 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
--->
-<body><a name="terminal_page"><!-- --></a>
-<h2 class="topictitle2">Terminal View Quick Reference</h2>
-<div align="left">
-<table border="0" cellspacing="6">
- <caption></caption>
- <tr align="left" valign="top">
- <td><p><b>Button</b></p></td>
- <td><p><b>Description</b></p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/newterminal.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Open another Terminal connection in the current view, or in a new <b>Terminal</b> view instance.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/connect_co.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Connect to selected port.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/disconnect_co.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Disconnect from selected port.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/properties_tsk.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Open the <a href="03_terminal_settings.html"><b>Terminal Settings</b></a> dialog.
- While connected, only the connection's title can be changed.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/command_input_field.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Toggle the <a href="04_terminal_emulation.html"><b>Command Input</b></a> field,
- for editing complex command lines on dumb terminals.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/cview16/terminal_view.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Select a Terminal connection to show in this view instance.
- Only available when multiple connections have been defined in this view.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/dlcl16/rem_co.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Remove the currently selected Terminal Connection from this view.
- Only available when multiple connections have been defined in this view.</p></td>
- </tr>
-</table>
-</div>
-<p>
-</p>
-
-<table class="steptable"><tr><td>
- Each instance of the <b>Terminal</b> view can hold multiple connections, each of which can in
- turn be connected to a different remote endpoint
- (either serial or network). Of course, the number of serial connections is limited by the
- number of serial ports.
-</td></tr></table>
-
-<p></p>
-<div class="p"><a href="01_terminalview.html">&lt; Prev</a> | <a href="03_terminal_settings.html">Next &gt;</a></div>
-
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html b/terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html
deleted file mode 100644
index 953025ae0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, 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="../book.css" />
-<title>Terminal Settings Dialog</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 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
--->
-<body><a name="terminal_settings"><!-- --></a>
-<h2 class="topictitle2">Terminal Settings Dialog</h2>
-
-<table class="steptable"><tr><td class="S_step_text">
-Use the <b>Terminal Settings</b> dialog to configure your connection.
-</td></tr></table>
-<table class="steptable"><tr><td class="S_step_text">
-In the <b>Connection Type</b> field choose <b>Serial</b>, <b>SSH</b> or <b>Telnet</b>.
-</td></tr></table>
-<table class="steptable"><tr><td class="S_step_text">
-The <b>View Title</b> field allows giving a name to your <b>Terminal</b> View instance.
-</td></tr></table>
-
-<h4>Serial Connection</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-If you choose a serial connection, the <b>Settings</b> area has seven options:
- <b>Port</b>, <b>Baud Rate</b>, <b>Data Bits</b>, <b>Stop Bits</b>, <b>Parity</b>, <b>Flow Control</b>,
- and <b>Timeout</b>.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-When you have entered your settings, click <b>OK</b>. This initiates your connection.</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-Your connection information appears in the header of the <b>Terminal</b> view.
-A cursor appears in the view itself. Hit <b>ENTER</b> to get a <b>&gt;NET&gt;</b>
-prompt.</td></tr></table>
-
-<p></p>
-<div align="left">
-<table class="N1_note" border="0" cellpadding="0" cellspacing="6">
- <caption></caption>
- <tr align="left" valign="top"><td></td><td class="N1_note_content">
- <p><b>NOTE:</b>When using the <b>Terminal</b> view on Linux or Solaris,
- serial ports <b>ttyS0</b> and <b>ttyS1</b> must have appropriate permissions
- set in order to connect to them, unless you are running the Workbench as root.
- </p></td></tr>
- <tr align="left" valign="top"><td>&#160;</td><td>&#160;</td>
- </tr>
-</table>
-</div>
-
-<p></p>
-<h4>SSH Connection</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-If you choose an SSH connection, the <b>Settings</b> area has six options.
-In the <b>Host</b> and <b>Port</b> fields, enter the IP Address and port of the host
-you wish to connect to.
-The <b>User</b> field specifies the remote user id to use.
-The <b>Password</b> field is optional, since SSH can re-use your private keys
-as specified on the Eclipse Preferences, General, Network Page.
-The <b>Timeout</b> can be changed for very slow networks. The
-<b>KeepAlive</b> value specifies an interval in seconds, by which the Terminal
-automatically sends a packet to the remote host in order to keep the connection
-alive even in case of inactivity.
-<p>When all settings are specified, click
-<b>OK</b>. This initiates your connection.</p></td></tr></table>
-
-
-<p></p>
-<h4>Telnet Connection</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-If you choose a Telnet connection, the <b>Settings</b> area has three options.
-In the <b>Host</b> field, enter the IP Address of the host you wish to connect to.
-In the <b>Port</b> field, select the network port you wish to use.
-The <b>Timeout</b> can be changed for very slow networks. Then click
-<b>OK</b>. This initiates your connection.</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-Your connection information appears in the header of the <b>Terminal</b> view.
-A cursor appears in the view itself. Hit <b>ENTER</b> to get a <b>&gt;NET&gt; </b>prompt.
-</td></tr></table>
-
-<p></p>
-<div class="p"><a href="02_terminal_page.html">&lt; Prev</a> | <a href="04_terminal_emulation.html">Next &gt;</a></div>
-
- </body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html b/terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html
deleted file mode 100644
index 0b987d5e8..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, 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="../book.css" />
-<title>Terminal Emulation</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 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
--->
-<body><a name="terminal_emulation"><!-- --></a>
-<h2 class="topictitle2">Terminal Emulation</h2>
-
-<table class="steptable"><tr><td class="S_step_text">
-The <b>Terminal</b> view is an ANSI-conformant terminal emulator. You can use the
-<b>Terminal</b> view to telnet into a remote UNIX host.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-To do so, set the <b>TERM</b> environment variable on the remote host to <b>ansi</b>.
-This enables programs on the remote host, such as <b>vi</b> and <b>Emacs</b>,
-to display text properly.
-The <b>Terminal</b> view does not currently support other emulation modes, such as VT100.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-The <b>size</b> of the terminal window as understood by the remote is automatically
-adjusted as the size of your <b>Terminal</b> view changes.
-The <b>colors</b> and <b>font</b> used by the Terminal can be configured in the
-Eclipse Preferences, Appearance section. A separate <b>Terminal</b> Preference
-Page allows inverting the terminal colors easily if desired.
-</td></tr></table>
-
-<h4>Optional Command Input Field</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-The optional <b>Command Input Field</b> can be enabled when sending commands to a dumb
-terminal that does not support cursor keys for editing. In such a case, the <b>
-Command Input Field</b> provides a full editor that supports cursor navigation, copy
-and paste, as well as a history of previous commands that can be accessed by
-<b>Ctrl+Space</b> content assist.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-If more space than the default single editing line is needed for very complex commands,
-the <b>Command Input Field</b> can be enlarged by dragging its upper handle up with
-the mouse.
-</td></tr></table>
-
-<p></p>
-<div class="p"><a href="03_terminal_settings.html">&lt; Prev</a> | </div>
-
- </body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/notice.html b/terminal/org.eclipse.tm.terminal.view/doc/html/notice.html
deleted file mode 100644
index ce5f8a404..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/notice.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!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>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, 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="../book.css" />
-<title>Legal Notice</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 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
--->
-<body><a name="terminal_legal"><!-- --></a>
-<h2 class="topictitle2">Legal Notice</h2>
-<p>
-The material in this guide is Copyright (c) Wind River Systems, Inc. and others 2004, 2008.
-</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/terminal/org.eclipse.tm.terminal.view/dsdp32.png b/terminal/org.eclipse.tm.terminal.view/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.view/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gif
deleted file mode 100644
index 9e3a547c1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gif
+++ /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/lock_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/lock_co.gif
deleted file mode 100644
index 68fd6cf39..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/lock_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/command_input_field.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/command_input_field.gif
deleted file mode 100644
index f538ca707..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/command_input_field.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/lock_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/lock_co.gif
deleted file mode 100644
index b77647893..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/lock_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/dlcl16/rem_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/rem_co.gif
deleted file mode 100644
index 559e46298..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gif
deleted file mode 100644
index f538ca707..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.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/lock_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/lock_co.gif
deleted file mode 100644
index 68fd6cf39..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/lock_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/elcl16/rem_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/rem_co.gif
deleted file mode 100644
index 2cd9c5444..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/rem_co.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 cdcfdbfc2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-##########################################################################
-# Copyright (c) 2003, 2009 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 = Target Management Terminal View
-providerName = Eclipse.org - DSDP
-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
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 dbb050174..000000000
--- a/terminal/org.eclipse.tm.terminal.view/plugin.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-# Copyright (c) 2003, 2008 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.internal.terminal.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.internal.terminal.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.core.runtime.preferences">
- <initializer class="org.eclipse.tm.internal.terminal.view.TerminalPreferenceInitializer"/>
- </extension>
-
- <!-- ============================================ -->
- <!-- Define Help Context -->
- <!-- ============================================ -->
- <extension point="org.eclipse.help.contexts">
- <contexts file="HelpContexts.xml"/>
- <contexts file="TerminalContexts.xml" plugin="org.eclipse.tm.terminal"/>
- </extension>
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml"/>
- </extension>
-
- </plugin>
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java
deleted file mode 100644
index d4334bddc..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.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_CONNECTION;
- public static String NEW_TERMINAL_VIEW;
- public static String CONNECT;
- public static String TOGGLE_COMMAND_INPUT_FIELD;
- public static String DISCONNECT;
- public static String SETTINGS_ELLIPSE;
- public static String SCROLL_LOCK_0;
- public static String SCROLL_LOCK_1;
- public static String REMOVE;
-
- public static String ConsoleDropDownAction_0;
- public static String ConsoleDropDownAction_1;
-
- public static String SETTINGS;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties
deleted file mode 100644
index d28936dd0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-# Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
-# Michael Scharf (Wind River) - [172483] switch between connections
-# Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
-###############################################################################
-NEW_TERMINAL_CONNECTION = New Terminal Connection in Current View...
-NEW_TERMINAL_VIEW = New Terminal View
-CONNECT = Connect
-DISCONNECT = Disconnect
-SETTINGS_ELLIPSE = Settings...
-SCROLL_LOCK_0 = Scroll &Lock
-SCROLL_LOCK_1 = Scroll Lock
-SETTINGS = Settings
-TOGGLE_COMMAND_INPUT_FIELD= Toggle Command Input Field
-REMOVE = Remove Terminal
-
-ConsoleDropDownAction_0=Select Connection
-ConsoleDropDownAction_1=Display Selected Connections
-
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java
deleted file mode 100644
index cf4565617..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * Michael Scharf (Wind River) - [172483] Adapted from org.eclipse.ui.console/ShowConsoleAction
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnection;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager;
-
-/**
- * Shows a specific connection in the terminal view
- */
-public class ShowTerminalConnectionAction extends Action {
-
- private final ITerminalViewConnection fConnection;
- private final ITerminalViewConnectionManager fConnectionManager;
-
- /**
- * Constructs an action to display the given terminal.
- *
- * @param manager the terminal multi-view in which the given terminal connection is contained
- * @param connection the terminal view connection
- */
- public ShowTerminalConnectionAction(ITerminalViewConnectionManager manager, ITerminalViewConnection connection) {
- super(quoteName(buildName(manager,connection)), AS_RADIO_BUTTON);
- fConnection = connection;
- fConnectionManager = manager;
- setImageDescriptor(connection.getImageDescriptor());
- }
- /**
- * the tab at the end quotes '@' chars?!? see
- * {@link #setText(String)}
- * @param name
- * @return a quoted sting
- */
- private static String quoteName(String name) {
- return name+"\t"; //$NON-NLS-1$
- }
- /**
- * Builds the name. It uses the summary. If the connections have different
- * partNames (the names showed in the view title) then this name is prefixed.
- * @param m the connection manager
- * @param connection the connection for which the name should me extracted
- * @return The name to be displayed
- */
- private static String buildName(ITerminalViewConnectionManager m,ITerminalViewConnection connection) {
- String name = connection.getFullSummary();
- if(!checkIfAllPartNamesTheSame(m))
- name=connection.getPartName()+" - " +name; //$NON-NLS-1$
- return name;
- }
- /**
- * @param m the connection manager
- * @return true if the part names of all connections are the same
- */
- private static boolean checkIfAllPartNamesTheSame(ITerminalViewConnectionManager m) {
- ITerminalViewConnection[] connections = m.getConnections();
- if(connections.length>1) {
- String partName=connections[0].getPartName();
- for (int i = 1; i < connections.length; i++) {
- if(!partName.equals(connections[i].getPartName())) {
- return false;
- }
- }
-
- }
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- fConnectionManager.setActiveConnection(fConnection);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java
deleted file mode 100644
index 13b896fdb..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.terminal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.view.TerminalViewPlugin;
-
-abstract public class TerminalAction extends Action {
- protected final ITerminalView fTarget;
- public TerminalAction(ITerminalView target, String strId) {
- this(target,strId,0);
- }
- public TerminalAction(ITerminalView target, String strId, int style) {
- super("",style); //$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 strHoverImage, String strEnabledImage, String strDisabledImage,
- boolean bEnabled, ImageRegistry imageRegistry) {
- setupAction(strText,
- strToolTip,
- imageRegistry.getDescriptor(strHoverImage),
- imageRegistry.getDescriptor(strEnabledImage),
- imageRegistry.getDescriptor(strDisabledImage),
- bEnabled);
- }
- protected void setupAction(String strText, String strToolTip,
- ImageDescriptor hoverImage, ImageDescriptor enabledImage, ImageDescriptor disabledImage,
- boolean bEnabled) {
- setText(strText);
- setToolTipText(strToolTip);
- setEnabled(bEnabled);
- if (enabledImage != null) {
- setImageDescriptor(enabledImage);
- }
- if (disabledImage != null) {
- setDisabledImageDescriptor(disabledImage);
- }
- if (hoverImage != null) {
- setHoverImageDescriptor(hoverImage);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java
deleted file mode 100644
index 30901d6fa..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.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/internal/terminal/actions/TerminalActionDisconnect.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java
deleted file mode 100644
index ff0292f90..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.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/internal/terminal/actions/TerminalActionNewTerminal.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java
deleted file mode 100644
index 9e4586462..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
-*******************************************************************************/
-package org.eclipse.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-
-/**
- * UNDER CONSTRUCTION
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- */
-public class TerminalActionNewTerminal extends TerminalAction implements IMenuCreator {
- private Menu fMenu;
- public TerminalActionNewTerminal(ITerminalView target)
- {
- super(target, TerminalActionNewTerminal.class.getName());
-
- setupAction(ActionMessages.NEW_TERMINAL_CONNECTION,
- ActionMessages.NEW_TERMINAL_CONNECTION,
- ImageConsts.IMAGE_NEW_TERMINAL,
- ImageConsts.IMAGE_NEW_TERMINAL,
- ImageConsts.IMAGE_NEW_TERMINAL,
- true);
- setMenuCreator(this);
- }
- public void run() {
- fTarget.onTerminalNewTerminal();
- }
- public void dispose() {
- if (fMenu != null) {
- fMenu.dispose();
- }
- }
- public Menu getMenu(Control parent) {
- if(fMenu==null) {
- fMenu= new Menu(parent);
- addActionToMenu(fMenu,
- new Action(ActionMessages.NEW_TERMINAL_CONNECTION) {
- public void run() {
- fTarget.onTerminalNewTerminal();
- }
-
- });
- addActionToMenu(fMenu,
- new Action(ActionMessages.NEW_TERMINAL_VIEW) {
- public void run() {
- fTarget.onTerminalNewView();
- }
-
- });
- }
- return fMenu;
- }
- protected void addActionToMenu(Menu parent, IAction action) {
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(parent, -1);
- }
- public Menu getMenu(Menu parent) {
- return null;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java
deleted file mode 100644
index a3d6e3659..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener;
-
-public class TerminalActionRemove extends TerminalAction implements ITerminalViewConnectionListener
-{
- private final ITerminalViewConnectionManager fConnectionManager;
- public TerminalActionRemove(ITerminalViewConnectionManager target)
- {
- super(null,
- TerminalActionRemove.class.getName());
- fConnectionManager=target;
- setupAction(ActionMessages.REMOVE,
- ActionMessages.REMOVE,
- null,
- ImageConsts.IMAGE_ELCL_REMOVE,
- ImageConsts.IMAGE_DLCL_REMOVE,
- true);
- fConnectionManager.addListener(this);
- connectionsChanged();
- }
- public void run() {
- fConnectionManager.removeActive();
- }
- public void connectionsChanged() {
- setEnabled(fConnectionManager.size()>1);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java
deleted file mode 100644
index 39d023cf4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.terminal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-
-public class TerminalActionScrollLock extends TerminalAction
-{
- public TerminalActionScrollLock(ITerminalView target)
- {
- super(target,
- TerminalActionScrollLock.class.getName(),IAction.AS_RADIO_BUTTON);
-
- setupAction(ActionMessages.SCROLL_LOCK_0,
- ActionMessages.SCROLL_LOCK_1,
- ImageConsts.IMAGE_CLCL_SCROLL_LOCK,
- ImageConsts.IMAGE_ELCL_SCROLL_LOCK,
- ImageConsts.IMAGE_DLCL_SCROLL_LOCK,
- true);
- }
- public void run() {
- fTarget.setScrollLock(!fTarget.isScrollLock());
- setChecked(fTarget.isScrollLock());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java
deleted file mode 100644
index b5af7b6de..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * Michael Scharf (Wind River) - [172483] switch between connections
- * (Adapted from org.eclipse.ui.internal.console.ConsoleDropDownAction)
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.actions;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnection;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-import org.eclipse.tm.internal.terminal.view.TerminalViewPlugin;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener;
-
-/**
- * Drop down action in the console to select the console to display.
- */
-public class TerminalActionSelectionDropDown extends Action implements IMenuCreator, ITerminalViewConnectionListener {
- private ITerminalViewConnectionManager fConnections;
- private Menu fMenu;
- public TerminalActionSelectionDropDown(ITerminalViewConnectionManager view) {
- fConnections= view;
- setText(ActionMessages.ConsoleDropDownAction_0);
- setToolTipText(ActionMessages.ConsoleDropDownAction_1);
- setImageDescriptor(TerminalViewPlugin.getDefault().getImageRegistry().getDescriptor(ImageConsts.IMAGE_TERMINAL_VIEW));
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CONSOLE_DISPLAY_CONSOLE_ACTION);
- setMenuCreator(this);
- fConnections.addListener(this);
- connectionsChanged();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- if (fMenu != null) {
- fMenu.dispose();
- }
- fConnections.removeListener(this);
- fConnections= null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- if (fMenu != null) {
- fMenu.dispose();
- }
-
- fMenu= new Menu(parent);
- ITerminalViewConnection[] consoles= fConnections.getConnections();
- ITerminalViewConnection active = fConnections.getActiveConnection();
- for (int i = 0; i < consoles.length; i++) {
- ITerminalViewConnection console = consoles[i];
- Action action = new ShowTerminalConnectionAction(fConnections, console);
- action.setChecked(console.equals(active));
- addActionToMenu(fMenu, action, i + 1);
- }
- return fMenu;
- }
-
- private void addActionToMenu(Menu parent, Action action, int accelerator) {
- if (accelerator < 10) {
- StringBuffer label= new StringBuffer();
- //add the numerical accelerator
- label.append('&');
- label.append(accelerator);
- label.append(' ');
- label.append(action.getText());
- action.setText(label.toString());
- }
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- fConnections.swapConnection();
- }
-
- public void connectionsChanged() {
- setEnabled(fConnections.size() > 1);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java
deleted file mode 100644
index 9436abbb1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.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/internal/terminal/actions/TerminalActionToggleCommandInputField.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java
deleted file mode 100644
index 17a29b17d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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 implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-
-public class TerminalActionToggleCommandInputField extends TerminalAction
-{
- public TerminalActionToggleCommandInputField(ITerminalView target)
- {
- super(target,
- TerminalActionToggleCommandInputField.class.getName(),IAction.AS_RADIO_BUTTON);
-
- setupAction(ActionMessages.TOGGLE_COMMAND_INPUT_FIELD,
- ActionMessages.TOGGLE_COMMAND_INPUT_FIELD,
- ImageConsts.IMAGE_CLCL_COMMAND_INPUT_FIELD,
- ImageConsts.IMAGE_ELCL_COMMAND_INPUT_FIELD,
- ImageConsts.IMAGE_DLCL_COMMAND_INPUT_FIELD,
- true);
- setChecked(fTarget.hasCommandInputField());
- }
- public void run() {
- fTarget.setCommandInputField(!fTarget.hasCommandInputField());
- setChecked(fTarget.hasCommandInputField());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java
deleted file mode 100644
index 7fa9d2029..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - [227537] moved actions from terminal.view to terminal plugin
- * Michael Scharf (Wind River) - [172483] switch between connections
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-public interface ITerminalView {
-
- /**
- * Create a new terminal connection within the view.
- */
- void onTerminalNewTerminal();
- /**
- * Create a new Terminal view.
- */
- void onTerminalNewView();
- void onTerminalConnect();
- void onTerminalDisconnect();
- void onTerminalSettings();
- void onTerminalFontChanged();
- boolean hasCommandInputField();
- void setCommandInputField(boolean on);
- boolean isScrollLock();
- void setScrollLock(boolean b);
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java
deleted file mode 100644
index cc1423a8a..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.terminal.view;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-/**
- * Represents a connection. The connection might be connected
- * or not.
- *
- */
-public interface ITerminalViewConnection {
-
- /**
- * @return the summary shown in the status line and
- * in the drop down box of the connections
- */
- String getFullSummary();
-
- /**
- * @param name the name of the view
- */
- void setPartName(String name);
- /**
- * @return the name of the view (never null)
- */
- String getPartName();
-
- /**
- * @return an image that represents this connection
- */
- ImageDescriptor getImageDescriptor();
- /**
- * @return the control of this connection
- */
- ITerminalViewControl getCtlTerminal();
-
- void saveState(ISettingsStore store);
-
- void loadState(ISettingsStore store);
-
- /**
- * @return true if the input field is visible
- */
- boolean hasCommandInputField();
- /**
- * @param on turns the input field on
- */
- void setCommandInputField(boolean on);
-
- /**
- * @param state changes of the state (might change the summary)
- */
- void setState(TerminalState state);
-
- /**
- * @param title used in the summary. If null the summary
- * is created automatically
- */
- void setTerminalTitle(String title);
-
- /**
- * TODO: legacy (needed to read the old state)
- * @param summary
- */
- void setSummary(String summary);
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java
deleted file mode 100644
index 12348480d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.terminal.view;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-
-/**
- * Supports multiple connections
- *
- */
-public interface ITerminalViewConnectionManager {
- /**
- * Notifies any change in the state of the connections:
- * <ul>
- * <li> a connection is added or removed
- * <li> the active connection has changed
- * </ul>
- *
- */
- interface ITerminalViewConnectionListener {
- void connectionsChanged();
- }
- /**
- * Used to create instances of the ITerminalViewConnection
- * when the state is read from the {@link ISettingsStore}
- *
- */
- interface ITerminalViewConnectionFactory {
- ITerminalViewConnection create();
- }
- /**
- * @return a list of all connections this view can display
- */
- ITerminalViewConnection[] getConnections();
- /**
- * @return the number of connections
- */
- int size();
- /**
- * @return th connection the view is showing at the moment
- */
- ITerminalViewConnection getActiveConnection();
-
- /**
- * @param conn make this connection the active connection
- */
- void setActiveConnection(ITerminalViewConnection conn);
- /**
- * If more than two connections are available, remove the active connection
- */
- void removeActive();
-
- /**
- * @param conn adds a new connection
- */
- void addConnection(ITerminalViewConnection conn);
-
- /**
- * If there are more than two connections toggle between this and the
- * previously shown connection
- */
- void swapConnection();
-
- void addListener(ITerminalViewConnectionListener listener);
- void removeListener(ITerminalViewConnectionListener listener);
-
- void saveState(ISettingsStore store);
- /**
- * @param store
- * @param factory used to create new {@link ITerminalViewConnection}
- */
- void loadState(ISettingsStore store,ITerminalViewConnectionFactory factory);
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java
deleted file mode 100644
index 41cc51f16..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
- * Michael Scharf (Wind River) - [172483] added some more icons
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-public interface ImageConsts
-{
- public final static String IMAGE_DIR_ROOT = "icons/"; //$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_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_TERMINAL_VIEW = "TerminalView"; //$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_CLCL_SCROLL_LOCK = "ImageClclScrollLock"; //$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_DLCL_SCROLL_LOCK = "ImageDlclScrollLock"; //$NON-NLS-1$
- public static final String IMAGE_DLCL_REMOVE = "ImageDlclRemove"; //$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$
- public static final String IMAGE_ELCL_SCROLL_LOCK = "ImageElclScrollLock"; //$NON-NLS-1$
- public static final String IMAGE_ELCL_REMOVE = "ImageElclRemove"; //$NON-NLS-1$
- public static final String IMAGE_CLCL_COMMAND_INPUT_FIELD = "ImageClclCommandInputField";//$NON-NLS-1$
- public static final String IMAGE_ELCL_COMMAND_INPUT_FIELD = "ImageDlclCommandInputField";//$NON-NLS-1$
- public static final String IMAGE_DLCL_COMMAND_INPUT_FIELD = "ImageDlclCommandInputField";//$NON-NLS-1$
- }
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java
deleted file mode 100644
index 6b6532364..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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) - simplified implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * 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.
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class PageBook extends Composite {
- private StackLayout fLayout;
- public PageBook(Composite parent, int style) {
- super(parent, style);
- fLayout= new StackLayout();
- setLayout(fLayout);
- }
- public void showPage(Control page) {
- fLayout.topControl= page;
- layout();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java
deleted file mode 100644
index 0d7ccfad4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.terminal.view;
-
-import org.eclipse.tm.internal.terminal.provisional.api.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/internal/terminal/view/SettingsStore.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java
deleted file mode 100644
index f74f4a24b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.internal.terminal.view;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.ui.IMemento;
-
-/**
- * A {@link IDialogSettings} based {@link ISettingsStore}.
- *
- * Setting Store based on IMemento. IMemento documentations says only alpha numeric
- * values may 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_"; //$NON-NLS-1$
- 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(","); //$NON-NLS-1$
- 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("\\."); //$NON-NLS-1$
- 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.]+$")) //$NON-NLS-1$
- throw new IllegalArgumentException("Key '"+key+"' is not alpha numeric or '.'!"); //$NON-NLS-1$ //$NON-NLS-2$
- // 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 Memento to save state into.
- */
- 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("\\."); //$NON-NLS-1$
- 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(","); //$NON-NLS-1$
- 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/internal/terminal/view/TerminalPreferenceInitializer.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java
deleted file mode 100644
index b1f721e63..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.internal.terminal.view;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
-public class TerminalPreferenceInitializer extends AbstractPreferenceInitializer {
-
- public TerminalPreferenceInitializer() {
- }
-
- public void initializeDefaultPreferences() {
- Preferences store = TerminalViewPlugin.getDefault().getPluginPreferences();
- store.setDefault(TerminalPreferencePage.PREF_LIMITOUTPUT, TerminalPreferencePage.DEFAULT_LIMITOUTPUT);
- store.setDefault(TerminalPreferencePage.PREF_INVERT_COLORS, TerminalPreferencePage.DEFAULT_INVERT_COLORS);
- 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);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java
deleted file mode 100644
index c8e142bd2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.internal.terminal.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.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 String PREF_INVERT_COLORS = "TerminalPrefInvertColors"; //$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;
- public static final boolean DEFAULT_INVERT_COLORS = false;
-
-
- protected BooleanFieldEditor fInvertColors;
-
- protected IntegerFieldEditor fEditorBufferSize;
-
- protected IntegerFieldEditor fEditorSerialTimeout;
-
- protected IntegerFieldEditor fEditorNetworkTimeout;
- public TerminalPreferencePage() {
- super(GRID);
- }
- protected void createFieldEditors() {
- setupPage();
- }
- public void init(IWorkbench workbench) {
- // do nothing
- }
- protected void setupPage() {
- setupData();
- setupEditors();
- }
- protected void setupData() {
- TerminalViewPlugin plugin;
- IPreferenceStore preferenceStore;
-
- plugin = TerminalViewPlugin.getDefault();
- preferenceStore = plugin.getPreferenceStore();
- setPreferenceStore(preferenceStore);
- }
- protected void setupEditors() {
- fInvertColors = new BooleanFieldEditor(
- PREF_INVERT_COLORS, ViewMessages.INVERT_COLORS,
- 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(fInvertColors);
- addField(fEditorBufferSize);
- addField(fEditorSerialTimeout);
- addField(fEditorNetworkTimeout);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
deleted file mode 100644
index b934cea50..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
- * Martin Oberhuber (Wind River) - [168186] Add Terminal User Docs
- * Michael Scharf (Wind River) - [196454] Initial connection settings dialog should not be blank
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-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.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-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.Point;
-import org.eclipse.swt.graphics.Rectangle;
-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.Label;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.ui.PlatformUI;
-
-class TerminalSettingsDlg extends Dialog {
- private Combo fCtlConnTypeCombo;
- private Text fTerminalTitleText;
- private final ITerminalConnector[] fConnectors;
- private final ISettingsPage[] fPages;
- /**
- * Maps the fConnectors index to the fPages index
- */
- private final int[] fPageIndex;
- private int fNPages;
- private int fSelectedConnector;
- private PageBook fPageBook;
- private IDialogSettings fDialogSettings;
- private String fTerminalTitle;
- private String fTitle=ViewMessages.TERMINALSETTINGS;
-
- public TerminalSettingsDlg(Shell shell, ITerminalConnector[] connectors, ITerminalConnector connector) {
- super(shell);
- fConnectors=getValidConnectors(connectors);
- fPages=new ISettingsPage[fConnectors.length];
- fPageIndex=new int[fConnectors.length];
- fSelectedConnector=-1;
- for (int i = 0; i < fConnectors.length; i++) {
- if(fConnectors[i]==connector)
- fSelectedConnector=i;
- }
- }
- public void setTitle(String title) {
- fTitle=title;
- }
- /**
- * @param connectors
- * @return connectors excluding connectors with errors
- */
- private ITerminalConnector[] getValidConnectors(ITerminalConnector[] connectors) {
- List list=new ArrayList(Arrays.asList(connectors));
- for (Iterator iterator = list.iterator(); iterator.hasNext();) {
- ITerminalConnector info = (ITerminalConnector) iterator.next();
- if(info.isInitialized() && info.getInitializationErrorMessage()!=null || info.isHidden())
- iterator.remove();
- }
- connectors=(ITerminalConnector[]) list.toArray(new ITerminalConnector[list.size()]);
- return connectors;
- }
- ISettingsPage getPage(int i) {
- if(fPages[i]==null) {
- if(fConnectors[i].getInitializationErrorMessage()!=null) {
- // create a error message
- final ITerminalConnector conn=fConnectors[i];
- fPages[i]=new ISettingsPage(){
- public void createControl(Composite parent) {
- Label l=new Label(parent,SWT.WRAP);
- String error=NLS.bind(ViewMessages.CONNECTOR_NOT_AVAILABLE,conn.getName());
- l.setText(error);
- l.setForeground(l.getDisplay().getSystemColor(SWT.COLOR_RED));
- String msg = NLS.bind(ViewMessages.CANNOT_INITIALIZE, conn.getName(), conn.getInitializationErrorMessage());
- // [168197] Replace JFace MessagDialog by SWT MessageBox
- //MessageDialog.openError(getShell(), error, msg);
- MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK);
- mb.setText(error);
- mb.setMessage(msg);
- mb.open();
- }
- public void loadSettings() {}
- public void saveSettings() {}
- public boolean validateSettings() {return false;}
- };
- } else {
- fPages[i]=fConnectors[i].makeSettingsPage();
- }
- // TODO: what happens if an error occurs while
- // the control is partly created?
- fPages[i].createControl(fPageBook);
- fPageIndex[i]=fNPages++;
- resize();
- }
- return fPages[i];
-
- }
- void resize() {
- Point size=getShell().getSize();
- Point newSize=getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT,true);
- newSize.x=Math.max(newSize.x,size.x);
- newSize.y=Math.max(newSize.y,size.y);
- if(newSize.x!=size.x || newSize.y!=size.y) {
- setShellSize(newSize);
- } else {
- fPageBook.getParent().layout();
- }
- }
- /**
- * Increase the size of this dialog's <code>Shell</code> by the specified amounts.
- * Do not increase the size of the Shell beyond the bounds of the Display.
- */
- protected void setShellSize(Point size) {
- Rectangle bounds = getShell().getMonitor().getClientArea();
- getShell().setSize(Math.min(size.x, bounds.width), Math.min(size.y, bounds.height));
- }
-
- protected void okPressed() {
- if (!validateSettings()) {
- String strTitle = ViewMessages.TERMINALSETTINGS;
- MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK);
- mb.setText(strTitle);
- mb.setMessage(ViewMessages.INVALID_SETTINGS);
- mb.open();
- return;
- }
- if(fSelectedConnector>=0) {
- getPage(fSelectedConnector).saveSettings();
- }
- fTerminalTitle=fTerminalTitleText.getText();
- 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(fTitle);
- }
- protected Control createDialogArea(Composite parent) {
- Composite ctlComposite = (Composite) super.createDialogArea(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(ctlComposite, TerminalViewPlugin.HELPPREFIX + "terminal_settings"); //$NON-NLS-1$
-
- setupPanel(ctlComposite);
- setupListeners();
- initFields();
-
- return ctlComposite;
- }
- public void create() {
- super.create();
- // initialize the OK button after creating the all dialog elements
- updateOKButton();
- }
- private void initFields() {
- // Load controls
- for (int i = 0; i < fConnectors.length; i++) {
- fCtlConnTypeCombo.add(fConnectors[i].getName());
- }
- int selectedConnector=getInitialConnector();
- if(selectedConnector>=0) {
- fCtlConnTypeCombo.select(selectedConnector);
- selectPage(selectedConnector);
- }
- }
- /**
- * @return the connector to show when the dialog opens
- */
- private int getInitialConnector() {
- // if there is a selection, use it
- if(fSelectedConnector>=0)
- return fSelectedConnector;
- // try the telnet connector, because it is the cheapest
- for (int i = 0; i < fConnectors.length; i++) {
- if("org.eclipse.tm.internal.terminal.telnet.TelnetConnector".equals(fConnectors[i].getId())) //$NON-NLS-1$
- return i;
- }
- // if no telnet connector available, use the first one in the list
- if(fConnectors.length>0)
- return 0;
- return -1;
- }
- private boolean validateSettings() {
- if(fSelectedConnector<0)
- return true;
- return getPage(fSelectedConnector).validateSettings();
- }
- private void setupPanel(Composite wndParent) {
- setupSettingsTypePanel(wndParent);
- if(fConnectors.length>0) {
- setupConnTypePanel(wndParent);
- setupSettingsGroup(wndParent);
- }
- }
- private void setupSettingsTypePanel(Composite wndParent) {
- Group wndGroup;
- GridLayout gridLayout;
-
- wndGroup = new Group(wndParent, SWT.NONE);
- gridLayout = new GridLayout(2, false);
- wndGroup.setLayout(gridLayout);
- wndGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- wndGroup.setText(ViewMessages.VIEW_SETTINGS);
-
-
- Label label=new Label(wndGroup,SWT.NONE);
- label.setText(ViewMessages.VIEW_TITLE);
- label.setLayoutData(new GridData(GridData.BEGINNING));
-
- fTerminalTitleText = new Text(wndGroup, SWT.BORDER);
- fTerminalTitleText.setText(fTerminalTitle);
- fTerminalTitleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- 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);
- fPageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- private void setupListeners() {
- if(fCtlConnTypeCombo==null)
- return;
- 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;
- getPage(index);
- Control[] pages=fPageBook.getChildren();
- fPageBook.showPage(pages[fPageIndex[fSelectedConnector]]);
- updateOKButton();
-
- }
- /**
- * enables the OK button if the user can create a connection
- */
- private void updateOKButton() {
- // TODO: allow contributions to enable the OK button
- // enable the OK button if we have a valid connection selected
- if(getButton(IDialogConstants.OK_ID)!=null) {
- boolean enable=false;
- if(getConnector()!=null)
- enable=getConnector().getInitializationErrorMessage()==null;
- // enable the OK button if no connectors are available
- if(!enable && fConnectors.length==0)
- enable=true;
- getButton(IDialogConstants.OK_ID).setEnabled(enable);
- }
- }
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings ds=TerminalViewPlugin.getDefault().getDialogSettings();
- fDialogSettings = ds.getSection(getClass().getName());
- if (fDialogSettings == null) {
- fDialogSettings = ds.addNewSection(getClass().getName());
- }
- return fDialogSettings;
- }
- public void setTerminalTitle(String partName) {
- fTerminalTitle=partName;
-
- }
- public String getTerminalTitle() {
- return fTerminalTitle;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java
deleted file mode 100644
index 0ab125ae1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- * Martin Oberhuber (Wind River) - [206892] State handling: Only allow connect when CLOSED
- * Michael Scharf (Wind River) - [209656] ClassCastException in TerminalView under Eclipse-3.4M3
- * Michael Scharf (Wind River) - [189774] Ctrl+V does not work in the command input field.
- * Michael Scharf (Wind River) - [217999] Duplicate context menu entries in Terminal
- * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
- * Martin Oberhuber (Wind River) - [168186] Add Terminal User Docs
- * Michael Scharf (Wind River) - [172483] switch between connections
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- * Michael Scharf (Wind River) - [196454] Initial connection settings dialog should not be blank
- * Michael Scharf (Wind River) - [241096] Secondary terminals in same view do not observe the "invert colors" Preference
- * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.action.Action;
-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.SWT;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.tm.internal.terminal.actions.TerminalAction;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionConnect;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionDisconnect;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionNewTerminal;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionRemove;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionSelectionDropDown;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionSettings;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionToggleCommandInputField;
-import org.eclipse.tm.internal.terminal.control.ITerminalListener;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.control.TerminalViewControlFactory;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionClearAll;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCopy;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCut;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionPaste;
-import org.eclipse.tm.internal.terminal.control.actions.TerminalActionSelectAll;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.LayeredSettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.PreferenceSettingStore;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionFactory;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class TerminalView extends ViewPart implements ITerminalView, ITerminalViewConnectionListener {
- private static final String PREF_CONNECTORS = "Connectors."; //$NON-NLS-1$
-
- private static final String STORE_CONNECTION_TYPE = "ConnectionType"; //$NON-NLS-1$
-
- private static final String STORE_SETTING_SUMMARY = "SettingSummary"; //$NON-NLS-1$
-
- private static final String STORE_TITLE = "Title"; //$NON-NLS-1$
-
- public static final String FONT_DEFINITION = "terminal.views.view.font.definition"; //$NON-NLS-1$
-
- protected ITerminalViewControl fCtlTerminal;
-
- // TODO (scharf): this decorator is only there to deal wit the common
- // actions. Find a better solution.
- TerminalViewControlDecorator fCtlDecorator=new TerminalViewControlDecorator();
-
- protected TerminalAction fActionTerminalNewTerminal;
-
- protected TerminalAction fActionTerminalConnect;
-
-// private TerminalAction fActionTerminalScrollLock;
-
- protected TerminalAction fActionTerminalDisconnect;
-
- protected TerminalAction fActionTerminalSettings;
-
- protected TerminalActionCopy fActionEditCopy;
-
- protected TerminalActionCut fActionEditCut;
-
- protected TerminalActionPaste fActionEditPaste;
-
- protected TerminalActionClearAll fActionEditClearAll;
-
- protected TerminalActionSelectAll fActionEditSelectAll;
-
- protected TerminalAction fActionToggleCommandInputField;
-
- protected TerminalPropertyChangeHandler fPropertyChangeHandler;
-
- protected Action fActionTerminalDropDown;
- protected Action fActionTerminalRemove;
-
- protected boolean fMenuAboutToShow;
-
- private SettingsStore fStore;
-
- private final ITerminalViewConnectionManager fMultiConnectionManager=new TerminalViewConnectionManager();
- /**
- * Listens to changes in the preferences
- */
- private final IPropertyChangeListener fPreferenceListener=new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(TerminalPreferencePage.PREF_LIMITOUTPUT)
- || event.getProperty().equals(TerminalPreferencePage.PREF_BUFFERLINES)
- || event.getProperty().equals(TerminalPreferencePage.PREF_INVERT_COLORS)) {
- updatePreferences();
- }
- }
- };
-
- private PageBook fPageBook;
-
- /**
- * This listener updates both, the view and the
- * ITerminalViewConnection.
- *
- */
- class TerminalListener implements ITerminalListener {
- volatile ITerminalViewConnection fConnection;
- void setConnection(ITerminalViewConnection connection) {
- fConnection=connection;
- }
- public void setState(final TerminalState state) {
- runInDisplayThread(new Runnable() {
- public void run() {
- fConnection.setState(state);
- // if the active connection changes, update the view
- if(fConnection==fMultiConnectionManager.getActiveConnection()) {
- updateStatus();
- }
- }
- });
- }
- public void setTerminalTitle(final String title) {
- runInDisplayThread(new Runnable() {
- public void run() {
- fConnection.setTerminalTitle(title);
- // if the active connection changes, update the view
- if(fConnection==fMultiConnectionManager.getActiveConnection()) {
- updateSummary();
- }
- }
- });
- }
- /**
- * @param runnable run in display thread
- */
- private void runInDisplayThread(Runnable runnable) {
- if(Display.findDisplay(Thread.currentThread())!=null)
- runnable.run();
- else if(PlatformUI.isWorkbenchRunning())
- PlatformUI.getWorkbench().getDisplay().syncExec(runnable);
- // else should not happen and we ignore it...
- }
-
- }
-
- public TerminalView() {
- Logger
- .log("==============================================================="); //$NON-NLS-1$
- fMultiConnectionManager.addListener(this);
- }
-
- /**
- * @param title
- * @return a unique part name
- */
- String findUniqueTitle(String title) {
- IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();
- String id= getViewSite().getId();
- Set names=new HashSet();
- for (int i = 0; i < pages.length; i++) {
- IViewReference[] views = pages[i].getViewReferences();
- for (int j = 0; j < views.length; j++) {
- IViewReference view = views[j];
- // only look for views with the same ID
- if(id.equals(view.getId())) {
- String name=view.getTitle();
- if(name!=null)
- names.add(view.getPartName());
- }
- }
- }
- // find a unique name
- int i=1;
- String uniqueTitle=title;
- while(true) {
- if(!names.contains(uniqueTitle))
- return uniqueTitle;
- uniqueTitle=title+" "+i++; //$NON-NLS-1$
- }
- }
- /**
- * Update the text limits from the preferences
- */
- private void updatePreferences() {
- Preferences preferences = TerminalViewPlugin.getDefault().getPluginPreferences();
-// boolean limitOutput = preferences.getBoolean(TerminalPreferencePage.PREF_LIMITOUTPUT);
-// if(!limitOutput)
-// bufferLineLimit=-1;
- int bufferLineLimit = preferences.getInt(TerminalPreferencePage.PREF_BUFFERLINES);
- boolean invert=preferences.getBoolean(TerminalPreferencePage.PREF_INVERT_COLORS);
- // update the preferences for all controls
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- conn[i].getCtlTerminal().setBufferLineLimit(bufferLineLimit);
- conn[i].getCtlTerminal().setInvertedColors(invert);
- }
- }
- /**
- * 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$
- setupControls();
- if(newConnection(ViewMessages.NEW_TERMINAL_CONNECTION)==null) {
- fMultiConnectionManager.removeActive();
- }
- }
-
- public void onTerminalNewView() {
- 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 undesirable. Therefore, we append the active 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.
- IViewPart newTerminalView = getSite().getPage().showView(
- "org.eclipse.tm.terminal.view.TerminalView",//$NON-NLS-1$
- "SecondaryTerminal" + System.currentTimeMillis(), //$NON-NLS-1$
- IWorkbenchPage.VIEW_ACTIVATE);
- if(newTerminalView instanceof ITerminalView) {
- ITerminalConnector c = ((TerminalView)newTerminalView).newConnection(ViewMessages.NEW_TERMINAL_VIEW);
- // if there is no connector selected, hide the new view
- if(c==null) {
- getSite().getPage().hideView(newTerminalView);
- }
- }
- } catch (PartInitException ex) {
- Logger.logException(ex);
- }
- }
-
-
- public void onTerminalConnect() {
- //if (isConnected())
- if (fCtlTerminal.getState()!=TerminalState.CLOSED)
- return;
- if(fCtlTerminal.getTerminalConnector()==null)
- setConnector(showSettingsDialog(ViewMessages.TERMINALSETTINGS));
- fCtlTerminal.connectTerminal();
- }
-
- public void updateStatus() {
- updateTerminalConnect();
- updateTerminalDisconnect();
- updateTerminalSettings();
- fActionToggleCommandInputField.setChecked(hasCommandInputField());
- updateSummary();
- }
-
- public void updateTerminalConnect() {
- //boolean bEnabled = ((!isConnecting()) && (!fCtlTerminal.isConnected()));
- boolean bEnabled = (fCtlTerminal.getState()==TerminalState.CLOSED);
-
- fActionTerminalConnect.setEnabled(bEnabled);
- }
-
- private boolean isConnecting() {
- return fCtlTerminal.getState()==TerminalState.CONNECTING;
- }
-
- public void onTerminalDisconnect() {
- fCtlTerminal.disconnectTerminal();
- }
-
- public void updateTerminalDisconnect() {
- boolean bEnabled = ((isConnecting()) || (fCtlTerminal.isConnected()));
- fActionTerminalDisconnect.setEnabled(bEnabled);
- }
-
- public void onTerminalSettings() {
- newConnection(null);
- }
-
- private ITerminalConnector newConnection(String title) {
- ITerminalConnector c=showSettingsDialog(title);
- if(c!=null) {
- setConnector(c);
- onTerminalConnect();
- }
- return c;
- }
-
- private ITerminalConnector showSettingsDialog(String title) {
- // When the settings dialog is opened, load the Terminal settings from the
- // persistent settings.
-
- ITerminalConnector[] connectors = fCtlTerminal.getConnectors();
- if(fCtlTerminal.getState()!=TerminalState.CLOSED)
- connectors=new ITerminalConnector[0];
- // load the state from the settings
- // first load from fStore and then from the preferences.
- ITerminalConnector c = loadSettings(new LayeredSettingsStore(fStore,getPreferenceSettingsStore()), connectors);
- // if we have no connector show the one from the settings
- if(fCtlTerminal.getTerminalConnector()!=null)
- c=fCtlTerminal.getTerminalConnector();
- TerminalSettingsDlg dlgTerminalSettings = new TerminalSettingsDlg(getViewSite().getShell(),connectors,c);
- dlgTerminalSettings.setTerminalTitle(getActiveConnection().getPartName());
- if(title!=null)
- dlgTerminalSettings.setTitle(title);
- 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(fStore,dlgTerminalSettings.getConnector());
- // we also save it in the preferences. This will keep the last change
- // made to this connector as default...
- saveSettings(getPreferenceSettingsStore(), dlgTerminalSettings.getConnector());
-
- setViewTitle(dlgTerminalSettings.getTerminalTitle());
- return dlgTerminalSettings.getConnector();
- }
-
- private void setConnector(ITerminalConnector connector) {
- fCtlTerminal.setConnector(connector);
- }
-
- public void updateTerminalSettings() {
-// fActionTerminalSettings.setEnabled((fCtlTerminal.getState()==TerminalState.CLOSED));
- }
- private void setViewTitle(String title) {
- setPartName(title);
- getActiveConnection().setPartName(title);
- }
- private void setViewSummary(String summary) {
- setContentDescription(summary);
- getViewSite().getActionBars().getStatusLineManager().setMessage(
- summary);
- setTitleToolTip(getPartName()+": "+summary); //$NON-NLS-1$
-
- }
- public void updateSummary() {
- setViewSummary(getActiveConnection().getFullSummary());
- }
-
- public void onTerminalFontChanged() {
- // set the font for all
- Font font=JFaceResources.getFont(FONT_DEFINITION);
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- conn[i].getCtlTerminal().setFont(font);
- }
- }
-
- // ViewPart interface
-
- public void createPartControl(Composite wndParent) {
- // Bind plugin.xml key bindings to this plugin. Overrides global Control-W key
- // sequence.
-
- fPageBook=new PageBook(wndParent,SWT.NONE);
- ISettingsStore s=new SettingStorePrefixDecorator(fStore,"connectionManager"); //$NON-NLS-1$
- fMultiConnectionManager.loadState(s,new ITerminalViewConnectionFactory() {
- public ITerminalViewConnection create() {
- return makeViewConnection();
- }
- });
- // if there is no connection loaded, create at least one
- // needed to read old states from the old terminal
- if(fMultiConnectionManager.size()==0) {
- ITerminalViewConnection conn = makeViewConnection();
- fMultiConnectionManager.addConnection(conn);
- fMultiConnectionManager.setActiveConnection(conn);
- fPageBook.showPage(fCtlTerminal.getRootControl());
- }
- setTerminalControl(fMultiConnectionManager.getActiveConnection().getCtlTerminal());
- setViewTitle(findUniqueTitle(ViewMessages.PROP_TITLE));
- setupActions();
- setupLocalToolBars();
- // setup all context menus
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- setupContextMenus(conn[i].getCtlTerminal().getControl());
- }
- setupListeners(wndParent);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(wndParent, TerminalViewPlugin.HELPPREFIX + "terminal_page"); //$NON-NLS-1$
-
- legacyLoadState();
- legacySetTitle();
- // make sure we take the values defined in the preferences
- updatePreferences();
-
- refresh();
- onTerminalFontChanged();
-
- }
-
- public void dispose() {
- Logger.log("entered."); //$NON-NLS-1$
-
- TerminalViewPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPreferenceListener);
-
- JFaceResources.getFontRegistry().removeListener(fPropertyChangeHandler);
-
- // dispose all connections
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- conn[i].getCtlTerminal().disposeTerminal();
- }
- super.dispose();
- }
- /**
- * 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() {
- ITerminalViewConnection conn = makeViewConnection();
- fMultiConnectionManager.addConnection(conn);
- fMultiConnectionManager.setActiveConnection(conn);
- setupContextMenus(fCtlTerminal.getControl());
- // make sure we take the values defined in the preferences
- updatePreferences();
- }
-
- private ITerminalViewConnection makeViewConnection() {
- ITerminalConnector[] connectors = makeConnectors();
- TerminalListener listener=new TerminalListener();
- ITerminalViewControl ctrl = TerminalViewControlFactory.makeControl(listener, fPageBook, connectors);
- setTerminalControl(ctrl);
- ITerminalViewConnection conn = new TerminalViewConnection(fCtlTerminal);
- listener.setConnection(conn);
- conn.setPartName(getPartName());
- // load from settings
- ITerminalConnector connector = loadSettings(fStore,connectors);
- // set the connector....
- ctrl.setConnector(connector);
-
- TerminalViewPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPreferenceListener);
-
- return conn;
- }
-
- /**
- * @param store contains the data
- * @param connectors loads the data from store
- * @return null or the currently selected connector
- */
- private ITerminalConnector loadSettings(ISettingsStore store, ITerminalConnector[] connectors) {
- ITerminalConnector connector=null;
- String connectionType=store.get(STORE_CONNECTION_TYPE);
- for (int i = 0; i < connectors.length; i++) {
- connectors[i].load(getStore(store,connectors[i]));
- if(connectors[i].getId().equals(connectionType))
- connector=connectors[i];
- }
- return connector;
- }
-
- /**
- * @return a list of connectors this view can use
- */
- protected ITerminalConnector[] makeConnectors() {
- ITerminalConnector[] connectors=TerminalConnectorExtension.makeTerminalConnectors();
- return connectors;
- }
-
- /**
- * The preference setting store is used to save the settings that are
- * shared between all views.
- * @return the settings store for the connection based on the preferences.
- *
- */
- private PreferenceSettingStore getPreferenceSettingsStore() {
- return new PreferenceSettingStore(TerminalViewPlugin.getDefault().getPluginPreferences(),PREF_CONNECTORS);
- }
- /**
- * @param store the settings will be saved in this store
- * @param connector the connector that will be saved. Can be null.
- */
- private void saveSettings(ISettingsStore store, ITerminalConnector connector) {
- if(connector!=null) {
- connector.save(getStore(store, connector));
- // the last saved connector becomes the default
- store.put(STORE_CONNECTION_TYPE,connector.getId());
- }
-
- }
- 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.put(STORE_TITLE,getPartName());
- fMultiConnectionManager.saveState(new SettingStorePrefixDecorator(fStore,"connectionManager")); //$NON-NLS-1$
- fStore.saveState(memento);
- }
- private ISettingsStore getStore(ISettingsStore store, ITerminalConnector connector) {
- return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$
- }
-
- protected void setupActions() {
- fActionTerminalDropDown = new TerminalActionSelectionDropDown(fMultiConnectionManager);
- fActionTerminalRemove=new TerminalActionRemove(fMultiConnectionManager);
- fActionTerminalNewTerminal = new TerminalActionNewTerminal(this);
-// fActionTerminalScrollLock = new TerminalActionScrollLock(this);
- fActionTerminalConnect = new TerminalActionConnect(this);
- fActionTerminalDisconnect = new TerminalActionDisconnect(this);
- fActionTerminalSettings = new TerminalActionSettings(this);
- fActionEditCopy = new TerminalActionCopy(fCtlDecorator);
- fActionEditCut = new TerminalActionCut(fCtlDecorator);
- fActionEditPaste = new TerminalActionPaste(fCtlDecorator);
- fActionEditClearAll = new TerminalActionClearAll(fCtlDecorator);
- fActionEditSelectAll = new TerminalActionSelectAll(fCtlDecorator);
- fActionToggleCommandInputField = new TerminalActionToggleCommandInputField(this);
- }
- protected void setupLocalToolBars() {
- IToolBarManager toolBarMgr = getViewSite().getActionBars().getToolBarManager();
-
-// toolBarMgr.add(fActionTerminalScrollLock);
- toolBarMgr.add(fActionTerminalConnect);
- toolBarMgr.add(fActionTerminalDisconnect);
- toolBarMgr.add(fActionTerminalSettings);
- toolBarMgr.add(fActionToggleCommandInputField);
- toolBarMgr.add(new Separator("fixedGroup")); //$NON-NLS-1$
- toolBarMgr.add(fActionTerminalDropDown);
- toolBarMgr.add(fActionTerminalNewTerminal);
- toolBarMgr.add(fActionTerminalRemove);
- }
-
- protected void setupContextMenus(Control ctlText) {
- MenuManager menuMgr;
- Menu menu;
- TerminalContextMenuHandler contextMenuHandler;
-
- menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menu = menuMgr.createContextMenu(ctlText);
- loadContextMenus(menuMgr);
- contextMenuHandler = new TerminalContextMenuHandler();
-
- ctlText.setMenu(menu);
- 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);
- menuMgr.add(new Separator());
- menuMgr.add(fActionToggleCommandInputField);
-// menuMgr.add(fActionTerminalScrollLock);
-
-
- // 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);
- }
-
- protected class TerminalContextMenuHandler implements MenuListener, IMenuListener {
- public void menuHidden(MenuEvent event) {
- fMenuAboutToShow = false;
- fActionEditCopy.updateAction(fMenuAboutToShow);
- }
-
- public void menuShown(MenuEvent e) {
- //
- }
- public void menuAboutToShow(IMenuManager menuMgr) {
- fMenuAboutToShow = true;
- fActionEditCopy.updateAction(fMenuAboutToShow);
- fActionEditCut.updateAction(fMenuAboutToShow);
- fActionEditSelectAll.updateAction(fMenuAboutToShow);
- fActionEditPaste.updateAction(fMenuAboutToShow);
- fActionEditClearAll.updateAction(fMenuAboutToShow);
- }
- }
-
- protected class TerminalPropertyChangeHandler implements IPropertyChangeListener {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(FONT_DEFINITION)) {
- onTerminalFontChanged();
- }
- }
- }
-
- public boolean hasCommandInputField() {
- return getActiveConnection().hasCommandInputField();
- }
-
- public void setCommandInputField(boolean on) {
- getActiveConnection().setCommandInputField(on);
- }
-
- public boolean isScrollLock() {
- return fCtlTerminal.isScrollLock();
- }
-
- public void setScrollLock(boolean on) {
- fCtlTerminal.setScrollLock(on);
- }
-
- private ITerminalViewConnection getActiveConnection() {
- return fMultiConnectionManager.getActiveConnection();
- }
- /**
- * @param ctrl this control becomes the currently used one
- */
- private void setTerminalControl(ITerminalViewControl ctrl) {
- fCtlTerminal=ctrl;
- fCtlDecorator.setViewContoler(ctrl);
- }
- public void connectionsChanged() {
- if(getActiveConnection()!=null) {
- // update the active {@link ITerminalViewControl}
- ITerminalViewControl ctrl = getActiveConnection().getCtlTerminal();
- if(fCtlTerminal!=ctrl) {
- setTerminalControl(ctrl);
- refresh();
- }
- }
- }
-
- /**
- * Show the active {@link ITerminalViewControl} in the view
- */
- private void refresh() {
- fPageBook.showPage(fCtlTerminal.getRootControl());
- updateStatus();
- setPartName(getActiveConnection().getPartName());
- }
- /**
- * TODO REMOVE This code (added 2008-06-11)
- * Legacy code to real the old state. Once the state of the
- * terminal has been saved this method is not needed anymore.
- * Remove this code with eclipse 3.5.
- */
- private void legacyLoadState() {
- // TODO legacy: load the old title....
- String summary=fStore.get(STORE_SETTING_SUMMARY);
- if(summary!=null) {
- getActiveConnection().setSummary(summary);
- fStore.put(STORE_SETTING_SUMMARY,null);
- }
- }
- /**
- * TODO REMOVE This code (added 2008-06-11)
- * Legacy code to real the old state. Once the state of the
- * terminal has been saved this method is not needed anymore.
- * Remove this code with eclipse 3.5.
- */
- private void legacySetTitle() {
- // restore the title of this view
- String title=fStore.get(STORE_TITLE);
- if(title!=null && title.length()>0) {
- setViewTitle(title);
- fStore.put(STORE_TITLE, null);
- }
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java
deleted file mode 100644
index f919cf1fa..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Michael Scharf (Wind River) - [240097] Allow paste with the middle mouse button
- * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-/**
- *
- */
-package org.eclipse.tm.internal.terminal.view;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-/**
- * This class represents one connection. The connection might be
- * closed or open.
- *
- */
-class TerminalViewConnection implements ITerminalViewConnection {
- private static final String STORE_SUMMARY = "Summary"; //$NON-NLS-1$
- private static final String STORE_PART_NAME = "PartName"; //$NON-NLS-1$
- private static final String STORE_CONNECTION_TYPE = "ConnectionType"; //$NON-NLS-1$
- private static final String STORE_HAS_COMMAND_INPUT_FIELD = "HasCommandInputField"; //$NON-NLS-1$
- private static final String STORE_COMMAND_INPUT_FIELD_HISTORY = "CommandInputFieldHistory"; //$NON-NLS-1$
-
- final private ITerminalViewControl fCtlTerminal;
- private String fTitle;
- private String fSummary;
- private String fHistory;
- private CommandInputFieldWithHistory fCommandInputField;
- private String fPartName;
-
- public TerminalViewConnection(ITerminalViewControl ctl) {
- fCtlTerminal = ctl;
- fCtlTerminal.getControl().addMouseListener(new MouseAdapter(){
- public void mouseUp(MouseEvent e) {
- // paste when the middle button is clicked
- if(e.button==2) // middle button
- fCtlTerminal.paste();
- }});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.actions.ITerminalViewConnection#getName()
- */
- public String getFullSummary() {
- // if the title is set, then we return the title, else the summary
- if(fTitle==null)
- return makeSummary();
- return fTitle;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.view.ITerminalViewConnection#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return TerminalViewPlugin.getDefault().getImageRegistry().getDescriptor(ImageConsts.IMAGE_TERMINAL_VIEW);
- }
-
- public ITerminalViewControl getCtlTerminal() {
- return fCtlTerminal;
- }
- private ISettingsStore getStore(ISettingsStore store,ITerminalConnector connector) {
- return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$
- }
- public void loadState(ISettingsStore store) {
- fPartName=store.get(STORE_PART_NAME);
- fSummary=store.get(STORE_SUMMARY);
- fHistory=store.get(STORE_COMMAND_INPUT_FIELD_HISTORY);
-
- // load the state of the connection types
- ITerminalConnector[] connectors=fCtlTerminal.getConnectors();
- String connectionType=store.get(STORE_CONNECTION_TYPE);
- for (int i = 0; i < connectors.length; i++) {
- connectors[i].load(getStore(store,connectors[i]));
- // if this is active connection type
- if(connectors[i].getId().equals(connectionType))
- fCtlTerminal.setConnector(connectors[i]);
- }
-
- if("true".equals(store.get(STORE_HAS_COMMAND_INPUT_FIELD))) //$NON-NLS-1$
- setCommandInputField(true);
- }
-
- public void saveState(ISettingsStore store) {
- store.put(STORE_PART_NAME, fPartName);
- store.put(STORE_SUMMARY,fSummary);
- store.put(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory);
- if(fCommandInputField!=null)
- store.put(STORE_COMMAND_INPUT_FIELD_HISTORY, fCommandInputField.getHistory());
- else
- store.put(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory);
- store.put(STORE_HAS_COMMAND_INPUT_FIELD,hasCommandInputField()?"true":"false"); //$NON-NLS-1$//$NON-NLS-2$
- ITerminalConnector[] connectors=fCtlTerminal.getConnectors();
- for (int i = 0; i < connectors.length; i++) {
- connectors[i].save(getStore(store,connectors[i]));
- }
- if(fCtlTerminal.getTerminalConnector()!=null) {
- store.put(STORE_CONNECTION_TYPE,fCtlTerminal.getTerminalConnector().getId());
- }
- }
- public boolean hasCommandInputField() {
- return fCommandInputField!=null;
- }
- public void setCommandInputField(boolean on) {
- // save the old history
- if(fCommandInputField!=null) {
- fHistory= fCommandInputField.getHistory();
- fCommandInputField=null;
- }
- if(on) {
- // TODO make history size configurable
- fCommandInputField=new CommandInputFieldWithHistory(100);
- fCommandInputField.setHistory(fHistory);
- }
- fCtlTerminal.setCommandInputField(fCommandInputField);
- }
-
- public void setState(TerminalState state) {
- // update the title....
- fTitle=null;
- }
-
- public void setTerminalTitle(String title) {
- // When parameter 'title' 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.
- fTitle=title;
- }
-
- 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.CLOSED) {
- return ViewMessages.STATE_CLOSED;
- } else {
- throw new IllegalStateException(state.toString());
- }
- }
-
- private String makeSummary() {
- String strTitle = ""; //$NON-NLS-1$
- if(fCtlTerminal.getTerminalConnector()==null){
- strTitle=ViewMessages.NO_CONNECTION_SELECTED;
- } else {
- // When parameter 'data' is null, we construct a descriptive string to
- // display in the content description line.
- String strConnected = getStateDisplayName(fCtlTerminal.getState());
- String summary = getSettingsSummary();
- //TODO Title should use an NLS String and com.ibm.icu.MessageFormat
- //In order to make the logic of assembling, and the separators, better adapt to foreign languages
- if(summary.length()>0)
- summary=summary+" - "; //$NON-NLS-1$
- String name=fCtlTerminal.getTerminalConnector().getName();
- if(name.length()>0) {
- name+=": "; //$NON-NLS-1$
- }
- strTitle = name + "("+ summary + strConnected + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return strTitle;
- }
- /**
- * @return the setting summary. If there is no connection, or the connection
- * has not been initialized, use the last stored state.
- */
- private String getSettingsSummary() {
- if(fCtlTerminal.getTerminalConnector().isInitialized())
- fSummary=fCtlTerminal.getSettingsSummary();
- if(fSummary==null)
- return ""; //$NON-NLS-1$
- return fSummary;
- }
-
- public void setSummary(String summary) {
- fSummary=summary;
- }
-
- public String getPartName() {
- return fPartName==null?ViewMessages.PROP_TITLE:fPartName;
- }
-
- public void setPartName(String name) {
- fPartName=name;
-
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java
deleted file mode 100644
index 88af3056b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.terminal.view;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public class TerminalViewConnectionManager implements ITerminalViewConnectionManager {
- private static final String STORE_CONNECTION_PREFIX = "connection"; //$NON-NLS-1$
- private static final String STORE_SIZE = "size"; //$NON-NLS-1$
- private static final String STORE_ACTIVE_CONNECTION = "active"; //$NON-NLS-1$
- /**
- * The list of {@link ITerminalViewConnection} in the order they were cerated.
- * Ordered by creation time
- */
- private final List fConnections=new ArrayList();
- /**
- * The currently displayed connection
- */
- private ITerminalViewConnection fActiveConnection;
- /**
- * The list of {@link ITerminalViewConnection} in the order they
- * were made the active connection. The most recently accessed
- * connection is at the beginning of the list.
- */
- private final List fConnectionHistory=new ArrayList();
- /**
- * The {@link ITerminalViewConnectionListener}
- */
- private final List fListeners=new ArrayList();
-
- public ITerminalViewConnection[] getConnections() {
- return (ITerminalViewConnection[]) fConnections.toArray(new ITerminalViewConnection[fConnections.size()]);
- }
-
- public int size() { // TODO Auto-generated method stub
- return fConnections.size();
- }
-
- public ITerminalViewConnection getActiveConnection() {
- return fActiveConnection;
- }
- public void setActiveConnection(ITerminalViewConnection conn) {
- fActiveConnection=conn;
- // put the connection at the end of the history list
- fConnectionHistory.remove(conn);
- fConnectionHistory.add(0,conn);
-
- fireListeners();
- }
-
- public void swapConnection() {
- ITerminalViewConnection conn=getPreviousConnection();
- if(conn!=null)
- setActiveConnection(conn);
- }
-
- /**
- * @return the connection that was most recently the active connection or null if there is
- * no previous connection
- */
- private ITerminalViewConnection getPreviousConnection() {
- // find the first connection that is not the active connection in
- // the list
- for (Iterator iterator = fConnectionHistory.iterator(); iterator.hasNext();) {
- ITerminalViewConnection conn = (ITerminalViewConnection) iterator.next();
- if(conn!=fActiveConnection) {
- return conn;
- }
- }
- return null;
- }
-
- public void addConnection(ITerminalViewConnection conn) {
- fConnections.add(conn);
- fireListeners();
- }
- public void removeConnection(ITerminalViewConnection conn) {
- fConnections.remove(conn);
- fConnectionHistory.remove(conn);
- fireListeners();
- }
-
- public void addListener(ITerminalViewConnectionListener listener) {
- fListeners.add(listener);
- }
-
- public void removeListener(ITerminalViewConnectionListener listener) {
- fListeners.remove(listener);
- }
- protected void fireListeners() {
- ITerminalViewConnectionListener[] listeners=(ITerminalViewConnectionListener[]) fListeners.toArray(new ITerminalViewConnectionListener[fListeners.size()]);
- for (int i = 0; i < listeners.length; i++) {
- listeners[i].connectionsChanged();
- }
- }
-
- public void saveState(ISettingsStore store) {
- store.put(STORE_SIZE,""+fConnections.size()); //$NON-NLS-1$
- // save all connections
- int n=0;
- for (Iterator iterator = fConnections.iterator(); iterator.hasNext();) {
- ITerminalViewConnection connection = (ITerminalViewConnection) iterator.next();
- // the name under which we store the connection
- String prefix=STORE_CONNECTION_PREFIX+n;
- n++;
- // remember the active connection by its prefix
- if(connection.equals(fActiveConnection))
- store.put(STORE_ACTIVE_CONNECTION,prefix);
- connection.saveState(new SettingStorePrefixDecorator(store,prefix));
- }
- }
-
- public void loadState(ISettingsStore store,ITerminalViewConnectionFactory factory) {
- int size=0;
- try {
- size=Integer.parseInt(store.get(STORE_SIZE));
- } catch(Exception e) {
- // ignore
- }
- if(size>0) {
- // a slot for the connections
- String active=store.get(STORE_ACTIVE_CONNECTION);
- int n=0;
- for (int i=0;i<size;i++) {
- // the name under which we stored the connection
- String prefix=STORE_CONNECTION_PREFIX+n;
- n++;
- try {
- ITerminalViewConnection connection = factory.create();
- fConnections.add(connection);
- fConnectionHistory.add(connection);
- if(prefix.equals(active))
- fActiveConnection=connection;
- connection.loadState(new SettingStorePrefixDecorator(store,prefix));
- } catch(RuntimeException e) {
- // in case something goes wrong, make sure we can read the other
- // connections....
- TerminalViewPlugin.getDefault().getLog().log(
- new Status(
- IStatus.WARNING,
- TerminalViewPlugin.getDefault().getBundle().getSymbolicName(),
- 0,
- e.getLocalizedMessage(),
- e
- ));
- }
- }
- }
- }
-
- public void removeActive() {
- // don't remove the last connection -- we need at least one!
- if(fConnections.size()>1) {
- fConnections.remove(fActiveConnection);
- fConnectionHistory.remove(fActiveConnection);
-
- // make sure connection is not null....
- fActiveConnection=getPreviousConnection();
- // if there is no previous connection then make
- // the first connection the list the active connection
- if(fActiveConnection==null)
- fActiveConnection=(ITerminalViewConnection) fConnections.get(0);
-
- fireListeners();
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java
deleted file mode 100644
index dff2b367c..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.internal.terminal.view;
-
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.tm.internal.terminal.control.ICommandInputField;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-// TODO (scharf): this decorator is only there to deal with the common
-// actions. Find a better solution.
-public class TerminalViewControlDecorator implements ITerminalViewControl {
- ITerminalViewControl fViewContoler;
-
- public void clearTerminal() {
- fViewContoler.clearTerminal();
- }
-
- public void connectTerminal() {
- fViewContoler.connectTerminal();
- }
-
- public void copy() {
- fViewContoler.copy();
- }
-
- public void disconnectTerminal() {
- fViewContoler.disconnectTerminal();
- }
-
- public void disposeTerminal() {
- fViewContoler.disposeTerminal();
- }
-
- public int getBufferLineLimit() {
- return fViewContoler.getBufferLineLimit();
- }
-
- public Clipboard getClipboard() {
- return fViewContoler.getClipboard();
- }
-
- public ICommandInputField getCommandInputField() {
- return fViewContoler.getCommandInputField();
- }
-
- public ITerminalConnector[] getConnectors() {
- return fViewContoler.getConnectors();
- }
-
- public Control getControl() {
- return fViewContoler.getControl();
- }
-
- public String getEncoding() {
- return fViewContoler.getEncoding();
- }
-
- public Font getFont() {
- return fViewContoler.getFont();
- }
-
- public Control getRootControl() {
- return fViewContoler.getRootControl();
- }
-
- public String getSelection() {
- return fViewContoler.getSelection();
- }
-
- public String getSettingsSummary() {
- return fViewContoler.getSettingsSummary();
- }
-
- public TerminalState getState() {
- return fViewContoler.getState();
- }
-
- public ITerminalConnector getTerminalConnector() {
- return fViewContoler.getTerminalConnector();
- }
-
- public boolean isConnected() {
- return fViewContoler.isConnected();
- }
-
- public boolean isDisposed() {
- return fViewContoler.isDisposed();
- }
-
- public boolean isEmpty() {
- return fViewContoler.isEmpty();
- }
-
- public boolean isScrollLock() {
- return fViewContoler.isScrollLock();
- }
-
- public void paste() {
- fViewContoler.paste();
- }
-
- public boolean pasteString(String string) {
- return fViewContoler.pasteString(string);
- }
-
- public void selectAll() {
- fViewContoler.selectAll();
- }
-
- public void sendKey(char arg0) {
- fViewContoler.sendKey(arg0);
- }
-
- public void setBufferLineLimit(int bufferLineLimit) {
- fViewContoler.setBufferLineLimit(bufferLineLimit);
- }
-
- public void setCommandInputField(ICommandInputField inputField) {
- fViewContoler.setCommandInputField(inputField);
- }
-
- public void setConnector(ITerminalConnector connector) {
- fViewContoler.setConnector(connector);
- }
-
- public void setEncoding(String encoding) throws UnsupportedEncodingException {
- fViewContoler.setEncoding(encoding);
- }
-
- public void setFocus() {
- fViewContoler.setFocus();
- }
-
- public void setFont(Font font) {
- fViewContoler.setFont(font);
- }
-
- public void setInvertedColors(boolean invert) {
- fViewContoler.setInvertedColors(invert);
- }
-
- public void setScrollLock(boolean on) {
- fViewContoler.setScrollLock(on);
- }
-
- public ITerminalViewControl getViewContoler() {
- return fViewContoler;
- }
-
- public void setViewContoler(ITerminalViewControl viewContoler) {
- fViewContoler = viewContoler;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java
deleted file mode 100644
index 64938276d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 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
- * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
- * Martin Oberhuber (Wind River) - [168186] Add Terminal User Docs
- * Michael Scharf (Wind River) - [172483] switch between connections
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.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.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class TerminalViewPlugin extends AbstractUIPlugin {
- protected static TerminalViewPlugin fDefault;
-
- public static final String HELPPREFIX = "org.eclipse.tm.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$
- map.put(ImageConsts.IMAGE_CLCL_COMMAND_INPUT_FIELD, "command_input_field.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_CLCL_SCROLL_LOCK, "lock_co.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$
- map.put(ImageConsts.IMAGE_ELCL_COMMAND_INPUT_FIELD, "command_input_field.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_ELCL_SCROLL_LOCK, "lock_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_ELCL_REMOVE, "rem_co.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$
- map.put(ImageConsts.IMAGE_DLCL_COMMAND_INPUT_FIELD, "command_input_field.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_DLCL_SCROLL_LOCK, "lock_co.gif"); //$NON-NLS-1$
- map.put(ImageConsts.IMAGE_DLCL_REMOVE, "rem_co.gif"); //$NON-NLS-1$
-
- loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_DLCL, map);
-
- map.clear();
-
- map.put(ImageConsts.IMAGE_TERMINAL_VIEW, "terminal_view.gif"); //$NON-NLS-1$
-
- loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_EVIEW, map);
-
- map.clear();
-
- } catch (MalformedURLException malformedURLException) {
- malformedURLException.printStackTrace();
- }
- }
- /**
- * 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/internal/terminal/view/ViewMessages.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java
deleted file mode 100644
index 2e1beb1e5..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- * Martin Oberhuber (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ViewMessages extends NLS {
- static {
- NLS.initializeMessages(ViewMessages.class.getName(), ViewMessages.class);
- }
- public static String NO_CONNECTION_SELECTED;
- public static String PROP_TITLE;
- public static String SETTINGS;
-
- public static String TERMINALSETTINGS;
- public static String NEW_TERMINAL_CONNECTION;
- public static String NEW_TERMINAL_VIEW;
- public static String CONNECTIONTYPE;
- public static String VIEW_TITLE;
- public static String VIEW_SETTINGS;
- public static String INVALID_SETTINGS;
-
- public static String INVERT_COLORS;
- 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_CLOSED;
-
- public static String CANNOT_INITIALIZE;
- public static String CONNECTOR_NOT_AVAILABLE;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties
deleted file mode 100644
index e7a350c16..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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
-# Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button
-# Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
-# Martin Oberhuber (Wind River) - [262996] get rid of TerminalState.OPENED
-###############################################################################
-NO_CONNECTION_SELECTED = No Connection Selected
-PROP_TITLE = Terminal
-SETTINGS = Settings
-
-TERMINALSETTINGS = Terminal Settings
-NEW_TERMINAL_CONNECTION = New Terminal Connection
-NEW_TERMINAL_VIEW = New Terminal View
-CONNECTIONTYPE = Connection Type
-VIEW_TITLE = View Title:
-VIEW_SETTINGS = View Settings:
-INVALID_SETTINGS = The specified settings are invalid, please review or cancel.
-
-INVERT_COLORS = Invert terminal colors
-BUFFERLINES = Terminal buffer lines:
-SERIALTIMEOUT = Serial timeout (seconds):
-NETWORKTIMEOUT = Network timeout (seconds):
-
-STATE_CONNECTED = CONNECTED
-STATE_CONNECTING = CONNECTING...
-STATE_CLOSED = CLOSED
-
-CANNOT_INITIALIZE = Cannot initialize {0}:\n{1}
-CONNECTOR_NOT_AVAILABLE = Connector {0} not available!
diff --git a/terminal/org.eclipse.tm.terminal.view/toc.xml b/terminal/org.eclipse.tm.terminal.view/toc.xml
deleted file mode 100644
index 4409655e2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/toc.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!--
-Copyright (c) 2006, 2008 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="Terminal View">
- <topic label="Terminal View" href="doc/html/01_terminalview.html">
- <topic label="Terminal View Quick Reference" href="doc/html/02_terminal_page.html" />
- <topic label="Terminal Settings Page" href="doc/html/03_terminal_settings.html" />
- <topic label="Terminal Emulation" href="doc/html/04_terminal_emulation.html" />
- <topic label="Legal Notice" href="doc/html/notice.html" />
- </topic>
-</toc> \ No newline at end of file
diff --git a/terminal/readme.txt b/terminal/readme.txt
deleted file mode 100644
index 3a5490cd7..000000000
--- a/terminal/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The "terminal" folder holds the DSDP-TM Terminal Component.
-Its core depends on Eclipse RCP only and can be adapted to eRCP.
-All these CVS modules should be named "org.eclipse.tm.terminal.*".
-See http://www.eclipse.org/dsdp/tm
diff --git a/wince/org.eclipse.rse.subsystems.wince/.classpath b/wince/org.eclipse.rse.subsystems.wince/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/.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/wince/org.eclipse.rse.subsystems.wince/.cvsignore b/wince/org.eclipse.rse.subsystems.wince/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/wince/org.eclipse.rse.subsystems.wince/.project b/wince/org.eclipse.rse.subsystems.wince/.project
deleted file mode 100644
index 033bcd698..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.wince</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/wince/org.eclipse.rse.subsystems.wince/.settings/org.eclipse.jdt.core.prefs b/wince/org.eclipse.rse.subsystems.wince/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/wince/org.eclipse.rse.subsystems.wince/META-INF/MANIFEST.MF b/wince/org.eclipse.rse.subsystems.wince/META-INF/MANIFEST.MF
deleted file mode 100644
index a92fd8df2..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/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.wince;singleton:=true
-Bundle-Version: 0.1.100.qualifier
-Bundle-Activator: org.eclipse.rse.internal.subsystems.files.wince.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.tm.rapi;bundle-version="[0.1.0,1.0.0)"
-Export-Package: org.eclipse.rse.internal.connectorservice.wince;x-internal:=true,
- org.eclipse.rse.internal.services.wince;x-internal:=true,
- org.eclipse.rse.internal.services.wince.files;x-internal:=true,
- org.eclipse.rse.internal.subsystems.files.wince;x-internal:=true,
- org.eclipse.rse.subsystems.files.wince
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/wince/org.eclipse.rse.subsystems.wince/about.html b/wince/org.eclipse.rse.subsystems.wince/about.html
deleted file mode 100644
index 02520f4f1..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/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>March 27, 2008</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/wince/org.eclipse.rse.subsystems.wince/about.ini b/wince/org.eclipse.rse.subsystems.wince/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/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=dsdp32.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/wince/org.eclipse.rse.subsystems.wince/about.mappings b/wince/org.eclipse.rse.subsystems.wince/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/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/wince/org.eclipse.rse.subsystems.wince/about.properties b/wince/org.eclipse.rse.subsystems.wince/about.properties
deleted file mode 100644
index 366cdecad..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-# David Dykstal (IBM) - [232198] remove NLS MESSAGEFORMAT NONE
-################################################################################
-
-# NLS_ENCODING=UTF-8
-
-# 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=RSE WinCE Services (Incubation)\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Radoslav Gerganov and others 2008, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/wince/org.eclipse.rse.subsystems.wince/build.properties b/wince/org.eclipse.rse.subsystems.wince/build.properties
deleted file mode 100644
index 88bf4f87f..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 Radoslav Gerganov and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - Add feature branding files
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- icons/, \
- plugin.properties,\
- plugin.xml,\
- dsdp32.png
-src.includes = about.html
- \ No newline at end of file
diff --git a/wince/org.eclipse.rse.subsystems.wince/dsdp32.png b/wince/org.eclipse.rse.subsystems.wince/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.subsystems.wince/icons/systemfiles_obj.gif b/wince/org.eclipse.rse.subsystems.wince/icons/systemfiles_obj.gif
deleted file mode 100644
index 874c99262..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/icons/systemfiles_obj.gif
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.subsystems.wince/icons/systemfileslive_obj.gif b/wince/org.eclipse.rse.subsystems.wince/icons/systemfileslive_obj.gif
deleted file mode 100644
index 885b8a69e..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/icons/systemfileslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.subsystems.wince/icons/wince.gif b/wince/org.eclipse.rse.subsystems.wince/icons/wince.gif
deleted file mode 100644
index ecbea5e82..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/icons/wince.gif
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.subsystems.wince/icons/wincelive.gif b/wince/org.eclipse.rse.subsystems.wince/icons/wincelive.gif
deleted file mode 100644
index 2a550c98b..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/icons/wincelive.gif
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.subsystems.wince/plugin.properties b/wince/org.eclipse.rse.subsystems.wince/plugin.properties
deleted file mode 100644
index 93d77f68f..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 Radoslav Gerganov and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - Rename pluginName, add PII NLS tags
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-providerName = Eclipse.org - DSDP
-pluginName = RSE WinCE Services (Incubation)
-systemType.label.0 = WinCE
-configuration.description.0 = This configuration allows you to work with files on remote WinCE-based device using ActiveSync/RAPI2 connection.
-configuration.name.0 = WinCE Files
-configuration.vendor.0 = Eclipse.org
diff --git a/wince/org.eclipse.rse.subsystems.wince/plugin.xml b/wince/org.eclipse.rse.subsystems.wince/plugin.xml
deleted file mode 100644
index a90429963..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/plugin.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2008 Radoslav Gerganov
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
- Radoslav Gerganov - initial API and implementation
--->
-<?eclipse version="3.1"?>
-<plugin>
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <systemType
- icon="icons/wince.gif"
- iconLive="icons/wincelive.gif"
- id="org.eclipse.rse.systemType.wince"
- label="%systemType.label.0"
- name="WinCE">
- </systemType>
- </extension>
- <extension
- point="org.eclipse.rse.core.subsystemConfigurations">
- <configuration
- category="files"
- class="org.eclipse.rse.subsystems.files.wince.WinCEFileSubSystemConfiguration"
- description="%configuration.description.0"
- icon="icons/systemfiles_obj.gif"
- iconlive="icons/systemfileslive_obj.gif"
- id="wince.files"
- name="%configuration.name.0"
- priority="100"
- systemTypeIds="org.eclipse.rse.systemType.wince"
- vendor="%configuration.vendor.0">
- </configuration>
- </extension>
-</plugin>
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/IWinCESubSystem.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/IWinCESubSystem.java
deleted file mode 100644
index d243ffc05..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/IWinCESubSystem.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from ISshSubSystem
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.wince;
-
-/**
- * Markup Interface for subsystems using the <code>WinCEConnectorService</code>.
- *
- * By implementing this interface, subsystems can be recognized
- * as being able to share a single WinCE connector service between
- * multiple different subsystems.
- */
-public interface IWinCESubSystem {
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/Messages.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/Messages.java
deleted file mode 100644
index 40cd19dff..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/Messages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.wince;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.connectorservice.wince.messages"; //$NON-NLS-1$
- public static String WinCEConnectorService_0;
- public static String WinCEConnectorService_1;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorService.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorService.java
deleted file mode 100644
index 83f280b58..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorService.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SshConnectorService
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.wince;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.BasicConnectorService;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.internal.services.wince.IRapiSessionProvider;
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.IRapiDevice;
-import org.eclipse.tm.rapi.IRapiEnumDevices;
-import org.eclipse.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.RapiException;
-
-
-/**
- * Creates ActiveSync/RAPI2 connections to WinCE-based device.
- */
-public class WinCEConnectorService extends BasicConnectorService implements IRapiSessionProvider {
-
- IRapiDesktop desktop = null;
- IRapiEnumDevices enumDevices = null;
- IRapiDevice device = null;
- IRapiSession session = null;
-
- public WinCEConnectorService(IHost host) {
- super(Messages.WinCEConnectorService_0, Messages.WinCEConnectorService_1, host, 0);
- }
-
- protected void internalConnect(IProgressMonitor monitor) throws Exception {
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
- Rapi.initialize(Rapi.COINIT_MULTITHREADED);
- try {
- desktop = IRapiDesktop.getInstance();
- enumDevices = desktop.enumDevices();
- device = enumDevices.next();
- session = device.createSession();
- session.init();
- } catch (RapiException re) {
- //TODO externalize the error message
- throw new Exception("Cannot connect to the remote device (" + re.getMessage() + ")", re); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- protected void internalDisconnect(IProgressMonitor monitor) throws Exception {
- fireCommunicationsEvent(CommunicationsEvent.BEFORE_DISCONNECT);
- if (session != null) {
- session.uninit();
- session.release();
- session = null;
- }
- if (device != null) {
- device.release();
- device = null;
- }
- if (enumDevices != null) {
- enumDevices.release();
- enumDevices = null;
- }
- if (desktop != null) {
- desktop.release();
- desktop = null;
- }
- }
-
- public boolean isConnected() {
- if (device != null) {
- try {
- return device.isConnected();
- } catch (RapiException e) {
- //ignore
- }
- }
- return false;
- }
-
- public IRapiSession getSession() {
- return session;
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorServiceManager.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorServiceManager.java
deleted file mode 100644
index f9ec93bff..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/WinCEConnectorServiceManager.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SshConnectorServiceManager
- *******************************************************************************/
-package org.eclipse.rse.internal.connectorservice.wince;
-
-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;
-
-public class WinCEConnectorServiceManager extends AbstractConnectorServiceManager {
-
- private static WinCEConnectorServiceManager inst = null;
-
- private WinCEConnectorServiceManager() {
- super();
- }
-
- public static WinCEConnectorServiceManager getInstance() {
- if (inst == null) {
- inst = new WinCEConnectorServiceManager();
- }
- return inst;
- }
-
- public IConnectorService createConnectorService(IHost host) {
- IConnectorService connectorService = new WinCEConnectorService(host);
- return connectorService;
- }
-
- public Class getSubSystemCommonInterface(ISubSystem subsystem) {
- return IWinCESubSystem.class;
- }
-
- public boolean sharesSystem(ISubSystem otherSubSystem) {
- return (otherSubSystem instanceof IWinCESubSystem);
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/messages.properties b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/messages.properties
deleted file mode 100644
index 5fb52a0f2..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/connectorservice/wince/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 Radoslav Gerganov
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-###############################################################################
-WinCEConnectorService_0=WinCE Connector Service
-WinCEConnectorService_1=The WinCE Connector Service uses ActiveSync/RAPI2 to connect to the device.
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IRapiSessionProvider.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IRapiSessionProvider.java
deleted file mode 100644
index 8fec7f8d7..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IRapiSessionProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.services.wince;
-
-import org.eclipse.tm.rapi.IRapiSession;
-
-public interface IRapiSessionProvider {
-
- /**
- * Returns an active RAPI2 session from a ConnectorService.
- */
- public IRapiSession getSession();
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IWinCEService.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IWinCEService.java
deleted file mode 100644
index b6ab0c308..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/IWinCEService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from ISshService
- *******************************************************************************/
-package org.eclipse.rse.internal.services.wince;
-
-/**
- * Markup Interface for services using the <code>WinCEConnectorService</code>.
- *
- * By implementing this interface, services can be recognized
- * as operating against an <code>WinCEConnectorService</code>.
- * The interface is used as the key in a table for looking up the connector
- * service when needed.
- */
-public interface IWinCEService {
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/Messages.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/Messages.java
deleted file mode 100644
index 5b9c5dc3b..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/Messages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.services.wince.files;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.rse.internal.services.wince.files.messages"; //$NON-NLS-1$
- public static String WinCEFileService_0;
- public static String WinCEFileService_1;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEFileService.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEFileService.java
deleted file mode 100644
index 2dbaf21d2..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEFileService.java
+++ /dev/null
@@ -1,565 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SftpFileService and LocalFileService
- * Martin Oberhuber (Wind River) - [226262] Make IService IAdaptable
- * Radoslav Gerganov (ProSyst) - [221211] [api][breaking][files] need batch operations to indicate which operations were successful
- * Martin Oberhuber (Wind River) - [221211] Throw SystemUnsupportedOperationException for WinCE setLastModified() and setReadOnly()
- * Radoslav Gerganov (ProSyst) - [230850] [WinCE] Implement setLastModified and setReadOnly in WinCEFileService
- * Radoslav Gerganov (ProSyst) - [231425] [WinCE] Use the progress monitors in WinCEFileService
- * Radoslav Gerganov (ProSyst) - [230856] [WinCE] Improve the error handling in WinCEFileService
- * Radoslav Gerganov (ProSyst) - [230919] IFileService.delete() should not return a boolean
- * Radoslav Gerganov (ProSyst) - [235360] Return proper "Root" IHostFile
- *******************************************************************************/
-package org.eclipse.rse.internal.services.wince.files;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-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.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.rse.internal.services.wince.IRapiSessionProvider;
-import org.eclipse.rse.internal.services.wince.IWinCEService;
-import org.eclipse.rse.internal.subsystems.files.wince.Activator;
-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.SystemElementNotFoundException;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
-import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
-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.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.RapiException;
-import org.eclipse.tm.rapi.RapiFindData;
-
-public class WinCEFileService extends AbstractFileService implements IWinCEService {
-
- IRapiSessionProvider sessionProvider;
-
- public WinCEFileService(IRapiSessionProvider sessionProvider) {
- this.sessionProvider = sessionProvider;
- }
-
- String concat(String parentDir, String fileName) {
- String result = parentDir;
- if (!result.endsWith("\\")) { //$NON-NLS-1$
- result += "\\"; //$NON-NLS-1$
- }
- result += fileName;
- return result;
- }
-
- protected IHostFile[] internalFetch(String parentPath, String fileFilter,
- int fileType, IProgressMonitor monitor) 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();
- try {
- IRapiSession session = sessionProvider.getSession();
- RapiFindData[] foundFiles = session.findAllFiles(concat(parentPath,"*"), //$NON-NLS-1$
- Rapi.FAF_NAME | Rapi.FAF_ATTRIBUTES | Rapi.FAF_LASTWRITE_TIME |
- Rapi.FAF_SIZE_HIGH | Rapi.FAF_SIZE_LOW);
- for (int i = 0 ; i < foundFiles.length ; i++) {
- String fileName = foundFiles[i].fileName;
- if (fileMatcher.matches(fileName)) {
- WinCEHostFile hostFile = makeHostFile(parentPath, fileName, foundFiles[i]);
- if (isRightType(fileType, hostFile)) {
- results.add(hostFile);
- }
- }
- }
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- return (IHostFile[]) results.toArray(new IHostFile[results.size()]);
- }
-
- private WinCEHostFile makeHostFile(String parentPath, String fileName, RapiFindData findData) {
- boolean isDirectory = (findData.fileAttributes & Rapi.FILE_ATTRIBUTE_DIRECTORY) != 0;
- boolean isWritable = (findData.fileAttributes & Rapi.FILE_ATTRIBUTE_READONLY) == 0;
- long lastModified = (findData.lastWriteTime / 10000) - Rapi.TIME_DIFF;
- long size = findData.fileSize;
- return new WinCEHostFile(parentPath, fileName, isDirectory, false, isWritable, lastModified, size);
- }
-
- private boolean isDirectory(IRapiSession session, String fullPath) {
- int attr = session.getFileAttributes(fullPath);
- if (attr == -1) {
- return false;
- }
- return (attr & Rapi.FILE_ATTRIBUTE_DIRECTORY) != 0;
- }
-
- private boolean exist(IRapiSession session, String fileName) {
- return session.getFileAttributes(fileName) != -1;
- }
-
- public void copy(String srcParent, String srcName, String tgtParent,
- String tgtName, IProgressMonitor monitor) throws SystemMessageException {
- String srcFullPath = concat(srcParent, srcName);
- String tgtFullPath = concat(tgtParent, tgtName);
- if (srcFullPath.equals(tgtFullPath)) {
- // prevent copying file/folder to itself
- throw new SystemUnsupportedOperationException(Activator.PLUGIN_ID, "Cannot copy file or folder to itself"); //$NON-NLS-1$
- }
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- IRapiSession session = sessionProvider.getSession();
- try {
- if (isDirectory(session, srcFullPath)) {
- if (tgtFullPath.startsWith(srcFullPath + "\\")) { //$NON-NLS-1$
- // prevent copying \a to \a\b\c
- throw new SystemUnsupportedOperationException(Activator.PLUGIN_ID, "Cannot copy folder to its subfolder"); //$NON-NLS-1$
- }
- if (!exist(session, tgtFullPath)) {
- // the target path is a directory and it doesn't exist -> create it
- session.createDirectory(tgtFullPath);
- }
- RapiFindData[] allFiles = session.findAllFiles(concat(srcFullPath,"*"), Rapi.FAF_NAME); //$NON-NLS-1$
- for (int i = 0 ; i < allFiles.length ; i++) {
- String fileName = allFiles[i].fileName;
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- copy(srcFullPath, fileName, tgtFullPath, fileName, monitor);
- }
- } else {
- session.copyFile(srcFullPath, tgtFullPath);
- monitor.worked(1);
- }
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public void copyBatch(String[] srcParents, String[] srcNames,
- String tgtParent, IProgressMonitor monitor) throws SystemMessageException {
- for (int i = 0 ; i < srcParents.length ; i++) {
- copy(srcParents[i], srcNames[i], tgtParent, srcNames[i], monitor);
- }
- }
-
- public IHostFile createFile(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException {
- String fullPath = concat(remoteParent, fileName);
- IRapiSession session = sessionProvider.getSession();
- try {
- int handle = session.createFile(fullPath, Rapi.GENERIC_WRITE, Rapi.FILE_SHARE_READ,
- Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- session.closeHandle(handle);
- RapiFindData findData = new RapiFindData();
- handle = session.findFirstFile(fullPath, findData);
- session.findClose(handle);
- return makeHostFile(remoteParent, fileName, findData);
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException {
- String fullPath = concat(remoteParent, folderName);
- IRapiSession session = sessionProvider.getSession();
- try {
- session.createDirectory(fullPath);
- RapiFindData findData = new RapiFindData();
- int handle = session.findFirstFile(fullPath, findData);
- session.findClose(handle);
- return makeHostFile(remoteParent, folderName, findData);
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public void delete(String remoteParent, String fileName, IProgressMonitor monitor) throws SystemMessageException {
- String fullPath = concat(remoteParent, fileName);
- IRapiSession session = sessionProvider.getSession();
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- if (!exist(session, fullPath)) {
- throw new SystemElementNotFoundException(fullPath, "delete"); //$NON-NLS-1$
- }
- if (isDirectory(session, fullPath)) {
- // recursive delete if it is a directory
- RapiFindData[] allFiles = session.findAllFiles(concat(fullPath, "*"), Rapi.FAF_NAME); //$NON-NLS-1$
- for (int i = 0; i < allFiles.length; i++) {
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- delete(fullPath, allFiles[i].fileName, monitor);
- }
- session.removeDirectory(fullPath);
- } else {
- // it is a file
- session.deleteFile(fullPath);
- monitor.worked(1);
- }
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public void download(String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding,
- IProgressMonitor monitor) throws SystemMessageException {
-
- if (!localFile.exists()) {
- File localParentFile = localFile.getParentFile();
- if (!localParentFile.exists()) {
- if (!localParentFile.mkdirs()) {
- throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID);
- }
- }
- }
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- String fullPath = concat(remoteParent, remoteFile);
- IRapiSession session = sessionProvider.getSession();
- int handle = Rapi.INVALID_HANDLE_VALUE;
- BufferedOutputStream bos = null;
- try {
- handle = session.createFile(fullPath, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- long fileSize = session.getFileSize(handle);
- monitor.beginTask(fullPath, (int) fileSize);
- bos = new BufferedOutputStream(new FileOutputStream(localFile));
- // don't increase the buffer size! the native functions sometimes fail with large buffers, 4K always work
- byte[] buffer = new byte[4 * 1024];
- while (true) {
- int bytesRead = session.readFile(handle, buffer);
- if (bytesRead == -1) {
- break;
- }
- bos.write(buffer, 0, bytesRead);
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- monitor.worked(bytesRead);
- }
- bos.flush();
- monitor.done();
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- } catch (IOException e) {
- throw new RemoteFileIOException(e);
- } finally {
- if (handle != Rapi.INVALID_HANDLE_VALUE) {
- try {
- session.closeHandle(handle);
- } catch (RapiException e) {
- // ignore
- }
- }
- if (bos != null) {
- try {
- bos.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
-
- public IHostFile getFile(String remoteParent, String name, IProgressMonitor monitor) throws SystemMessageException {
- if (remoteParent == null || remoteParent.length() == 0) {
- // special case for root
- return getRoots(null)[0];
- }
- IRapiSession session = sessionProvider.getSession();
- try {
- RapiFindData findData = new RapiFindData();
- int h = session.findFirstFile(concat(remoteParent, name), findData);
- session.findClose(h);
- return makeHostFile(remoteParent, name, findData);
- } catch (RapiException e) {
- // ignore the exception and return dummy
- }
- // return dummy if the file doesn't exist
- WinCEHostFile dummy = new WinCEHostFile(remoteParent, name, false, false, false, 0, 0);
- dummy.setExists(false);
- return dummy;
- }
-
- public IHostFile[] getRoots(IProgressMonitor monitor) throws SystemMessageException {
- return new WinCEHostFile[] { new WinCEHostFile(null, "\\", true, true, true, 0, 0) }; //$NON-NLS-1$
- }
-
- public IHostFile getUserHome() {
- return new WinCEHostFile("\\", "My Documents", true, false, true, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public boolean isCaseSensitive() {
- return false;
- }
-
- public void move(String srcParent, String srcName, String tgtParent, String tgtName,
- IProgressMonitor monitor) throws SystemMessageException {
- copy(srcParent, srcName, tgtParent, tgtName, monitor);
- delete(srcParent, srcName, monitor);
- }
-
- public void rename(String remoteParent, String oldName, String newName,
- IProgressMonitor monitor) throws SystemMessageException {
- String oldFullPath = concat(remoteParent, oldName);
- String newFullPath = concat(remoteParent, newName);
- IRapiSession session = sessionProvider.getSession();
- try {
- session.moveFile(oldFullPath, newFullPath);
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public void rename(String remoteParent, String oldName, String newName, IHostFile oldFile,
- IProgressMonitor monitor) throws SystemMessageException {
- rename(remoteParent, oldName, newName, monitor);
- String newFullPath = concat(remoteParent, newName);
- oldFile.renameTo(newFullPath);
- }
-
- public void setLastModified(String parent, String name, long timestamp, IProgressMonitor monitor) throws SystemMessageException {
- IRapiSession session = sessionProvider.getSession();
- String fullPath = concat(parent, name);
- int handle = Rapi.INVALID_HANDLE_VALUE;
- try {
- handle = session.createFile(fullPath, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- session.setFileLastWriteTime(handle, timestamp);
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- } finally {
- if (handle != Rapi.INVALID_HANDLE_VALUE) {
- try {
- session.closeHandle(handle);
- } catch (RapiException e) {
- // ignore
- }
- }
- }
- }
-
- public void setReadOnly(String parent, String name, boolean readOnly, IProgressMonitor monitor) throws SystemMessageException {
- IRapiSession session = sessionProvider.getSession();
- String fullPath = concat(parent, name);
- int attr = session.getFileAttributes(fullPath);
- if (readOnly) {
- attr = attr | Rapi.FILE_ATTRIBUTE_READONLY;
- } else {
- attr = attr & (~Rapi.FILE_ATTRIBUTE_READONLY);
- }
- try {
- session.setFileAttributes(fullPath, attr);
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- private void internalUpload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary,
- String hostEncoding, long fileSize, IProgressMonitor monitor) throws SystemMessageException {
- BufferedInputStream bis = new BufferedInputStream(stream);
- IRapiSession session = sessionProvider.getSession();
- String fullPath = concat(remoteParent, remoteFile);
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- if (fileSize != -1) {
- monitor.beginTask(fullPath, (int) fileSize);
- }
- int handle = Rapi.INVALID_HANDLE_VALUE;
- try {
- handle = session.createFile(fullPath, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- // don't increase the buffer size! the native functions sometimes fail with large buffers, 4K always work
- byte[] buffer = new byte[4 * 1024];
- while (true) {
- int bytesRead = bis.read(buffer);
- if (bytesRead == -1) {
- break;
- }
- session.writeFile(handle, buffer, 0, bytesRead);
- if (monitor.isCanceled()) {
- throw new SystemOperationCancelledException();
- }
- monitor.worked(bytesRead);
- }
- monitor.done();
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- } catch (IOException e) {
- throw new RemoteFileIOException(e);
- } finally {
- if (handle != Rapi.INVALID_HANDLE_VALUE) {
- try {
- session.closeHandle(handle);
- } catch (RapiException e) {
- // ignore
- }
- }
- try {
- bis.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public void upload(InputStream stream, String remoteParent, String remoteFile, boolean isBinary,
- String hostEncoding, IProgressMonitor monitor) throws SystemMessageException {
- internalUpload(stream, remoteParent, remoteFile, isBinary, hostEncoding, -1, monitor);
- }
-
- public void upload(File localFile, String remoteParent, String remoteFile, boolean isBinary,
- String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException {
- long fileSize = localFile.length();
- FileInputStream fis = null;
- try {
- fis = new FileInputStream(localFile);
- } catch (FileNotFoundException e) {
- throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID);
- }
- //FIXME what to do with srcEncoding ?
- internalUpload(fis, remoteParent, remoteFile, isBinary, hostEncoding, fileSize, monitor);
- }
-
- public InputStream getInputStream(String remoteParent, String remoteFile,
- boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- String fullPath = concat(remoteParent, remoteFile);
- IRapiSession session = sessionProvider.getSession();
- try {
- int handle = session.createFile(fullPath, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- return new BufferedInputStream(new WinCEInputStream(session, handle));
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public OutputStream getOutputStream(String remoteParent, String remoteFile,
- int options, IProgressMonitor monitor) throws SystemMessageException {
- String fullPath = concat(remoteParent, remoteFile);
- IRapiSession session = sessionProvider.getSession();
- try {
- int cd = Rapi.CREATE_ALWAYS;
- if ((options & IFileService.APPEND) == 0) {
- cd = Rapi.CREATE_ALWAYS;
- } else {
- cd = Rapi.OPEN_EXISTING;
- }
- int handle = session.createFile(fullPath, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, cd, Rapi.FILE_ATTRIBUTE_NORMAL);
- return new BufferedOutputStream(new WinCEOutputStream(session, handle));
- } catch (RapiException e) {
- throw new RemoteFileIOException(e);
- }
- }
-
- public String getDescription() {
- return Messages.WinCEFileService_0;
- }
-
- public String getName() {
- return Messages.WinCEFileService_1;
- }
-
- private static class WinCEInputStream extends InputStream {
-
- private int handle;
- private IRapiSession session;
-
- public WinCEInputStream(IRapiSession session, int handle) {
- this.handle = handle;
- this.session = session;
- }
-
- public int read() throws IOException {
- byte[] b = new byte[1];
- try {
- int br = session.readFile(handle, b);
- return (br == -1) ? -1 : b[0];
- } catch (RapiException e) {
- throw new IOException(e.getMessage());
- }
- }
-
- public int read(byte[] b, int off, int len) throws IOException {
- try {
- return session.readFile(handle, b, off, len);
- } catch (RapiException e) {
- throw new IOException(e.getMessage());
- }
- }
-
- public void close() throws IOException {
- try {
- session.closeHandle(handle);
- } catch (RapiException e) {
- throw new IOException(e.getMessage());
- }
- }
-
- }
-
- private static class WinCEOutputStream extends OutputStream {
-
- private int handle;
- private IRapiSession session;
-
- public WinCEOutputStream(IRapiSession session, int handle) {
- this.session = session;
- this.handle = handle;
- }
-
- public void write(int b) throws IOException {
- try {
- session.writeFile(handle, new byte[] {(byte)b});
- } catch (RapiException e) {
- throw new IOException(e.getMessage());
- }
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- try {
- session.writeFile(handle, b, off, len);
- } catch (RapiException e) {
- throw new IOException(e.getMessage());
- }
- }
-
- public void close() throws IOException {
- try {
- session.closeHandle(handle);
- } catch (RapiException e) {
- throw new IOException(e.getMessage());
- }
- }
- }
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEHostFile.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEHostFile.java
deleted file mode 100644
index f30086da1..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/WinCEHostFile.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SftpHostFile
- * Radoslav Gerganov (ProSyst) - [230850] [WinCE] Implement setLastModified and setReadOnly in WinCEFileService
- *******************************************************************************/
-package org.eclipse.rse.internal.services.wince.files;
-
-import org.eclipse.rse.services.files.IHostFile;
-
-public class WinCEHostFile implements IHostFile {
-
- String name;
- String parentPath;
- boolean isDirectory;
- boolean isRoot;
- boolean isArchive = false;
- boolean isReadable = true;
- boolean isWritable = true;
- boolean exists = true;
- long lastModified = 0;
- long size = 0;
-
- public WinCEHostFile(String parentPath, String name, boolean isDirectory,
- boolean isRoot, boolean isWritable, long lastModified, long size) {
- this.parentPath = parentPath;
- this.name = name;
- this.isDirectory = isDirectory;
- this.isRoot = isRoot;
- this.isWritable = isWritable;
- this.lastModified = lastModified;
- this.size = size;
- }
-
- public boolean canRead() {
- return isReadable;
- }
-
- public boolean canWrite() {
- return isWritable;
- }
-
- public boolean exists() {
- return exists;
- }
-
- public void setExists(boolean exists) {
- this.exists = exists;
- }
-
- public String getAbsolutePath() {
- if (isRoot()) {
- return getName();
- }
- String path = parentPath;
- if (!parentPath.endsWith("\\")) { //$NON-NLS-1$
- path += "\\"; //$NON-NLS-1$
- }
- path += name;
- return path;
- }
-
- public long getModifiedDate() {
- return lastModified;
- }
-
- public String getName() {
- return name;
- }
-
- public String getParentPath() {
- return parentPath;
- }
-
- public long getSize() {
- return size;
- }
-
- public boolean isArchive() {
- return isArchive;
- }
-
- public boolean isDirectory() {
- return isDirectory;
- }
-
- public boolean isFile() {
- return !(isDirectory || isRoot);
- }
-
- public boolean isHidden() {
- return false;
- }
-
- public boolean isRoot() {
- return isRoot;
- }
-
- public void renameTo(String newAbsolutePath) {
- int ind = newAbsolutePath.lastIndexOf("\\"); //$NON-NLS-1$
- if (ind == -1) {
- name = newAbsolutePath;
- } else {
- parentPath = newAbsolutePath.substring(0, ind);
- name = newAbsolutePath.substring(ind+1);
- }
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/messages.properties b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/messages.properties
deleted file mode 100644
index 7252470b1..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/services/wince/files/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 Radoslav Gerganov
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-###############################################################################
-WinCEFileService_0=The WinCE File Service uses ActiveSync/RAPI2 to provide service to the Files subsystem on the device.
-WinCEFileService_1=WinCE File Service
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/Activator.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/Activator.java
deleted file mode 100644
index 47002f746..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/Activator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.rse.internal.subsystems.files.wince;
-
-import org.eclipse.rse.ui.SystemBasePlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends SystemBasePlugin {
-
- // The shared instance
- private static Activator plugin;
-
- public final static String PLUGIN_ID = "org.eclipse.rse.subsystems.wince"; //$NON-NLS-1$
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (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;
- }
-
- /*
- * (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;
- }
-
- protected void initializeImageRegistry() {
- //TODO
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCEFileAdapter.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCEFileAdapter.java
deleted file mode 100644
index 7a46518dc..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCEFileAdapter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SftpFileAdapter
- * Martin Oberhuber (Wind River) - [235363][api][breaking] IHostFileToRemoteFileAdapter methods should return AbstractRemoteFile
- *******************************************************************************/
-package org.eclipse.rse.internal.subsystems.files.wince;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.rse.internal.services.wince.files.WinCEHostFile;
-import org.eclipse.rse.services.files.IHostFile;
-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.IHostFileToRemoteFileAdapter;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
-
-
-public class WinCEFileAdapter implements IHostFileToRemoteFileAdapter {
-
- public AbstractRemoteFile convertToRemoteFile(FileServiceSubSystem ss,
- IRemoteFileContext context, IRemoteFile parent, IHostFile node) {
-
- WinCERemoteFile remoteFile = new WinCERemoteFile(ss, context, parent, (WinCEHostFile) node);
- ss.cacheRemoteFile(remoteFile);
- return remoteFile;
- }
-
- public AbstractRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss,
- IRemoteFileContext context, IRemoteFile parent, IHostFile[] nodes) {
-
- List results = new ArrayList();
- if (nodes != null) {
- for (int i = 0 ; i < nodes.length ; i++) {
- WinCEHostFile node = (WinCEHostFile) nodes[i];
- WinCERemoteFile remoteFile = new WinCERemoteFile(ss, context, parent, node);
- results.add(remoteFile);
- ss.cacheRemoteFile(remoteFile);
- }
- }
- return (WinCERemoteFile[]) results.toArray(new WinCERemoteFile[results.size()]);
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCERemoteFile.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCERemoteFile.java
deleted file mode 100644
index a93d618dd..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/internal/subsystems/files/wince/WinCERemoteFile.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SftpRemoteFile
- *******************************************************************************/
-package org.eclipse.rse.internal.subsystems.files.wince;
-
-import org.eclipse.rse.internal.services.wince.files.WinCEHostFile;
-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 WinCERemoteFile extends AbstractRemoteFile {
-
- public WinCERemoteFile(FileServiceSubSystem subSystem,
- IRemoteFileContext context, IRemoteFile parent, WinCEHostFile hostFile) {
- super(subSystem, context, parent, hostFile);
- }
-
- public String getCanonicalPath() {
- return getAbsolutePath();
- }
-
- public String getClassification() {
- // TODO
- return "unknown"; //$NON-NLS-1$
- }
-
- public String getEncoding() {
- // override the default implementation because it causes
- // infinite loop on WinCE, see bug #218947
- return getParentRemoteFileSubSystem().getRemoteEncoding();
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileServiceSubSystem.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileServiceSubSystem.java
deleted file mode 100644
index 2dedb1de8..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileServiceSubSystem.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from FileServiceSubSystem
- *******************************************************************************/
-package org.eclipse.rse.subsystems.files.wince;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-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.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.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-public class WinCEFileServiceSubSystem extends FileServiceSubSystem {
-
- public WinCEFileServiceSubSystem(IHost host, IConnectorService connectorService, IFileService hostFileService,
- IHostFileToRemoteFileAdapter fileAdapter, ISearchService searchService) {
- super(host, connectorService, hostFileService, fileAdapter, searchService);
- }
-
- public IRemoteFile getRemoteFileObject(String folderOrFileName, IProgressMonitor monitor) throws SystemMessageException {
- String fofName = folderOrFileName.replace('/', '\\');
- IRemoteFile file = getCachedRemoteFile(fofName);
- if (file != null && !file.isStale()) {
- return file;
- }
-
- // for bug 207095, implicit connect if the connection is not connected
- checkIsConnected(monitor);
-
- if (fofName.equals("\\")) { //$NON-NLS-1$
- try {
- return listRoots(null)[0];
- } catch (Exception e) {
- }
- }
-
- if (fofName.equals(".")) { //$NON-NLS-1$
- IRemoteFile userHome = getUserHome();
- if (userHome == null){
- // with 207095, it's possible that we could be trying to get user home when not connected
- SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
- throw new SystemMessageException(msg);
- }
- return userHome;
- }
-
- if (fofName.endsWith("\\")) { //$NON-NLS-1$
- fofName = fofName.substring(0, fofName.length() - 1);
- }
-
- int lastSep = fofName.lastIndexOf("\\"); //$NON-NLS-1$
- 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(parentPath, name, monitor);
- if (node != null) {
- IRemoteFile parent = null;
- if (!node.isRoot()) {
- //parent = getRemoteFileObject(parentPath);
- }
- return getHostFileToRemoteFileAdapter().convertToRemoteFile(this, getDefaultContext(), parent, node);
- }
- }
- return null;
- }
-
-}
diff --git a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileSubSystemConfiguration.java b/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileSubSystemConfiguration.java
deleted file mode 100644
index 499cb0868..000000000
--- a/wince/org.eclipse.rse.subsystems.wince/src/org/eclipse/rse/subsystems/files/wince/WinCEFileSubSystemConfiguration.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Radoslav Gerganov - derived from SftpFileSubSystemConfiguration
- *******************************************************************************/
-package org.eclipse.rse.subsystems.files.wince;
-
-import java.util.Vector;
-
-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.connectorservice.wince.WinCEConnectorService;
-import org.eclipse.rse.internal.connectorservice.wince.WinCEConnectorServiceManager;
-import org.eclipse.rse.internal.services.wince.IWinCEService;
-import org.eclipse.rse.internal.services.wince.files.WinCEFileService;
-import org.eclipse.rse.internal.subsystems.files.wince.WinCEFileAdapter;
-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.ILanguageUtilityFactory;
-import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-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.ui.SystemBasePlugin;
-
-public class WinCEFileSubSystemConfiguration extends FileServiceSubSystemConfiguration {
-
- IHostFileToRemoteFileAdapter hostFileAdapter;
-
- public IFileService createFileService(IHost host) {
- WinCEConnectorService connectorService = (WinCEConnectorService) getConnectorService(host);
- return new WinCEFileService(connectorService);
- }
-
- public ISubSystem createSubSystemInternal(IHost host) {
- WinCEConnectorService connectorService = (WinCEConnectorService) getConnectorService(host);
- return new WinCEFileServiceSubSystem(host, connectorService, getFileService(host), getHostFileAdapter(), getSearchService(host));
- }
-
- public IHostSearchResultConfiguration createSearchConfiguration(IHost host,
- IHostSearchResultSet resultSet, Object searchTarget,
- SystemSearchString searchString) {
- return null;
- }
-
- public ISearchService createSearchService(IHost host) {
- return null;
- }
-
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr) {
- ISystemFilterPool pool = null;
- try {
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true);
-
- // "My Home" filter
- Vector filterStrings = new Vector();
- RemoteFileFilterString myHomeFilterString = new RemoteFileFilterString(this);
- myHomeFilterString.setPath("\\My Documents\\"); //$NON-NLS-1$
- filterStrings.add(myHomeFilterString.toString());
- mgr.createSystemFilter(pool, "My Home", filterStrings); //$NON-NLS-1$
- //filter.setNonChangable(true);
- //filter.setSingleFilterStringOnly(true);
-
- // "Root Files" filter
- filterStrings = new Vector();
- RemoteFileFilterString rootFilesFilterString = new RemoteFileFilterString(this);
- filterStrings.add(rootFilesFilterString.toString());
- mgr.createSystemFilter(pool, "Root", filterStrings); //$NON-NLS-1$
- } catch (Exception exc) {
- SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
- }
- return pool;
- }
-
- public IHostFileToRemoteFileAdapter getHostFileAdapter() {
- if (hostFileAdapter == null) {
- hostFileAdapter = new WinCEFileAdapter();
- }
- return hostFileAdapter;
- }
-
- public ILanguageUtilityFactory getLanguageUtilityFactory(
- IRemoteFileSubSystem ss) {
- return null;
- }
-
- public boolean supportsSearch() {
- return false;
- }
-
- public boolean supportsArchiveManagement() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host) {
- return WinCEConnectorServiceManager.getInstance().getConnectorService(host, getServiceImplType());
- }
-
- public Class getServiceImplType() {
- return IWinCEService.class;
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService) {
- WinCEConnectorServiceManager.getInstance().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
-}
diff --git a/wince/org.eclipse.rse.wince-feature/.project b/wince/org.eclipse.rse.wince-feature/.project
deleted file mode 100644
index cb2348659..000000000
--- a/wince/org.eclipse.rse.wince-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.wince-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/wince/org.eclipse.rse.wince-feature/build.properties b/wince/org.eclipse.rse.wince-feature/build.properties
deleted file mode 100644
index 868ea64d5..000000000
--- a/wince/org.eclipse.rse.wince-feature/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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.subsystems.wince.source=org.eclipse.rse.subsystems.wince
-generate.plugin@org.eclipse.tm.rapi.source=org.eclipse.tm.rapi
- \ No newline at end of file
diff --git a/wince/org.eclipse.rse.wince-feature/eclipse_update_120.jpg b/wince/org.eclipse.rse.wince-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/wince/org.eclipse.rse.wince-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.wince-feature/epl-v10.html b/wince/org.eclipse.rse.wince-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/wince/org.eclipse.rse.wince-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/wince/org.eclipse.rse.wince-feature/feature.properties b/wince/org.eclipse.rse.wince-feature/feature.properties
deleted file mode 100644
index ab28a56bf..000000000
--- a/wince/org.eclipse.rse.wince-feature/feature.properties
+++ /dev/null
@@ -1,140 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# "featureName" property - name of the feature
-featureName=RSE WinCE Services (Incubation)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=Windows CE connectivity services for the Remote System Explorer (RSE). \
-Requires Microsoft RAPI libraries installed. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2009 Radoslav Gerganov 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(TM) 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/wince/org.eclipse.rse.wince-feature/feature.xml b/wince/org.eclipse.rse.wince-feature/feature.xml
deleted file mode 100644
index 13ce8c9ec..000000000
--- a/wince/org.eclipse.rse.wince-feature/feature.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 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
- id="org.eclipse.rse.wince"
- label="%featureName"
- version="0.2.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.rse.subsystems.wince"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.files.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.rse.subsystems.wince"
- download-size="20"
- install-size="40"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.rapi"
- download-size="14"
- install-size="26"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rse.subsystems.wince.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.rapi.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/wince/org.eclipse.rse.wince-feature/license.html b/wince/org.eclipse.rse.wince-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/wince/org.eclipse.rse.wince-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/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/epl-v10.html b/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!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>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">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.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" 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.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to 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.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-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.</p>
-
-<p class="list">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.</p>
-
-<p class="list">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.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">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;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">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.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>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.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>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
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-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.</p>
-
-<p>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.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" 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.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>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.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-<p>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.</p>
-
-</body></html> \ No newline at end of file
diff --git a/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/feature.properties b/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 2b07333d2..000000000
--- a/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# 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 WinCE Services Source (Incubation)
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=Windows CE connectivity services for the Remote System Explorer (RSE). \
-Requires Microsoft RAPI libraries installed.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2009 Radoslav Gerganov 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(TM) 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/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/license.html b/wince/org.eclipse.rse.wince-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/wince/org.eclipse.rse.wince-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/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.html b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index aa029c699..000000000
--- a/wince/org.eclipse.rse.wince-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>March 27, 2008</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/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.ini b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/wince/org.eclipse.rse.wince-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=dsdp32.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/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.mappings b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/wince/org.eclipse.rse.wince-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/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.properties b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index b556ffd2b..000000000
--- a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-# 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=RSE WinCE Services Source (Incubation)\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Radoslav Gerganov and others 2008, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/build.properties b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 377be2b46..000000000
--- a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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 = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/dsdp32.png b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/plugin.properties b/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 021a98196..000000000
--- a/wince/org.eclipse.rse.wince-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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
-################################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-pluginName=RSE WinCE Services Source (Incubation)
-providerName=Eclipse.org - DSDP
diff --git a/wince/org.eclipse.tm.rapi.examples/.classpath b/wince/org.eclipse.tm.rapi.examples/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/wince/org.eclipse.tm.rapi.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/wince/org.eclipse.tm.rapi.examples/.cvsignore b/wince/org.eclipse.tm.rapi.examples/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/wince/org.eclipse.tm.rapi.examples/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/wince/org.eclipse.tm.rapi.examples/.project b/wince/org.eclipse.tm.rapi.examples/.project
deleted file mode 100644
index 428fa5d15..000000000
--- a/wince/org.eclipse.tm.rapi.examples/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.rapi.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/wince/org.eclipse.tm.rapi.examples/.settings/org.eclipse.jdt.core.prefs b/wince/org.eclipse.tm.rapi.examples/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 675d29eb2..000000000
--- a/wince/org.eclipse.tm.rapi.examples/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.fatalOptionalError=enabled
-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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=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.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-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.unusedParameterIncludeDocCommentReference=enabled
-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.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/wince/org.eclipse.tm.rapi.examples/META-INF/MANIFEST.MF b/wince/org.eclipse.tm.rapi.examples/META-INF/MANIFEST.MF
deleted file mode 100644
index 51ca162d5..000000000
--- a/wince/org.eclipse.tm.rapi.examples/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.rapi.examples
-Bundle-Version: 0.1.0.qualifier
-Bundle-Activator: org.eclipse.tm.rapi.examples.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.tm.rapi;bundle-version="[0.1.0,1.0.0)"
-Export-Package: org.eclipse.tm.rapi.examples
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/wince/org.eclipse.tm.rapi.examples/about.html b/wince/org.eclipse.tm.rapi.examples/about.html
deleted file mode 100644
index 02520f4f1..000000000
--- a/wince/org.eclipse.tm.rapi.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>March 27, 2008</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/wince/org.eclipse.tm.rapi.examples/build.properties b/wince/org.eclipse.tm.rapi.examples/build.properties
deleted file mode 100644
index 2ccce9b24..000000000
--- a/wince/org.eclipse.tm.rapi.examples/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 Radoslav Gerganov and others
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - add about.html
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/wince/org.eclipse.tm.rapi.examples/plugin.properties b/wince/org.eclipse.tm.rapi.examples/plugin.properties
deleted file mode 100644
index 486d681ec..000000000
--- a/wince/org.eclipse.tm.rapi.examples/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 Radoslav Gerganov and others
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - Rename pluginName, add PII NLS tags
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-providerName = Eclipse.org - DSDP
-pluginName = RAPI2 Java wrapper examples (Incubation) \ No newline at end of file
diff --git a/wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/Activator.java b/wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/Activator.java
deleted file mode 100644
index 8428fb7de..000000000
--- a/wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/Activator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.examples;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.rapi.examples";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // run the examples when the bundle is started
- RapiExamples obj = new RapiExamples();
- obj.runExamples();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#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/wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/RapiExamples.java b/wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/RapiExamples.java
deleted file mode 100644
index cd6480a98..000000000
--- a/wince/org.eclipse.tm.rapi.examples/src/org/eclipse/tm/rapi/examples/RapiExamples.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.examples;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.IRapiDevice;
-import org.eclipse.tm.rapi.IRapiEnumDevices;
-import org.eclipse.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.ProcessInformation;
-import org.eclipse.tm.rapi.RapiConnectionInfo;
-import org.eclipse.tm.rapi.RapiDeviceInfo;
-import org.eclipse.tm.rapi.RapiException;
-import org.eclipse.tm.rapi.RapiFindData;
-
-/**
- * This class demonstrates example usage of RAPI2.
- *
- * @author Radoslav Gerganov
- */
-public class RapiExamples {
-
- IRapiDesktop desktop = null;
- IRapiEnumDevices enumDevices = null;
- IRapiDevice device = null;
- IRapiSession session = null;
-
- /**
- * Initialize the underlying natives.
- */
- public void initRapi() {
- Rapi.initialize(Rapi.COINIT_MULTITHREADED);
- }
-
- /**
- * Uninitialize the underlying natives.
- */
- public void uninitRapi() {
- if (desktop != null) {
- desktop.release();
- }
- if (enumDevices != null) {
- enumDevices.release();
- }
- if (device != null) {
- device.release();
- }
- if (session != null) {
- session.release();
- }
- Rapi.uninitialize();
- }
-
- /**
- * Prints various information about the device.
- */
- public void printDeviceInfo() throws RapiException {
- System.out.println(">>> printDeviceInfo()");
- RapiDeviceInfo deviceInfo = device.getDeviceInfo();
- System.out.println("Device id: " + deviceInfo.id);
- System.out.println("Device name: " + deviceInfo.name);
- System.out.println("Platform: " + deviceInfo.platform);
- System.out.println("Major version: " + deviceInfo.versionMajor);
- System.out.println("Minor version: " + deviceInfo.versionMinor);
- }
-
- /**
- * Prints information about how the device is connected.
- */
- public void printConnectionInfo() throws RapiException {
- System.out.println(">>> printConnectionInfo()");
- RapiConnectionInfo connectionInfo = device.getConnectionInfo();
- System.out.println("Connection type: " + connectionInfo);
- System.out.println("IsConnected: " + device.isConnected());
- }
-
- /**
- * Creates file on the device with the specified filename.
- */
- public void createFile(String fileName) throws RapiException {
- System.out.println(">>> createFile()");
- int handle = session.createFile(fileName, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- byte[] content = "Hello world!".getBytes();
- session.writeFile(handle, content);
- session.closeHandle(handle);
- }
-
- /**
- * Reads the specified file on the device and prints its content.
- */
- public void readFile(String fileName) throws RapiException {
- System.out.println(">>> readFile()");
- int handle = session.createFile(fileName, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- byte[] buf = new byte[256];
- int br = session.readFile(handle, buf);
- System.out.println("readFile: " + new String(buf, 0, br));
- System.out.println("bytesRead: " + br);
- session.closeHandle(handle);
- }
-
- /**
- * Utility method used to determine if the specified <code>RapiFindData</code>
- * describes a directory.
- */
- boolean isDirectory(RapiFindData findData) {
- return (findData.fileAttributes & Rapi.FILE_ATTRIBUTE_DIRECTORY) != 0;
- }
-
- /**
- * Utility method used for printing <code>RapiFindData</code> on the console.
- */
- void printFindData(RapiFindData findData, int indent) {
- for (int i = 0 ; i < indent ; i++) {
- System.out.print(" ");
- }
- String fileName = findData.fileName;
- if (isDirectory(findData)) {
- System.out.println("[" + fileName + "]");
- } else {
- System.out.println(fileName + " (" + findData.fileSize + ")");
- }
- }
-
- /**
- * List all files in the specified directory using
- * <code>IRapiSession.findFirstFile</code> and
- * <code>IRapiSession.findNextFile</code>
- */
- public void listFiles(String dir) throws RapiException {
- System.out.println(">>> listFiles()");
- RapiFindData findData = new RapiFindData();
- int fh = session.findFirstFile(dir + "*", findData);
- while (findData != null) {
- printFindData(findData, 0);
- findData = session.findNextFile(fh);
- }
- session.findClose(fh);
- }
-
- /**
- * List all files in the specified directory using
- * <code>IRapiSession.findAllFiles</code>
- */
- public void listFiles2(String dir) throws RapiException {
- System.out.println(">>> listFiles2()");
- RapiFindData[] fdArr = session.findAllFiles(dir + "*",
- Rapi.FAF_ATTRIBUTES | Rapi.FAF_NAME | Rapi.FAF_SIZE_LOW);
- for (int i = 0 ; i < fdArr.length ; i++) {
- printFindData(fdArr[i], 0);
- }
- }
-
- /**
- * Prints various information about the specified file.
- */
- public void statFile(String fileName) throws RapiException {
- System.out.println(">>> statFile()");
- int handle = session.createFile(fileName, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- int fileAttributes = session.getFileAttributes(fileName);
- System.out.println("fileAttributes: " + fileAttributes);
- long fileSize = session.getFileSize(handle);
- System.out.println("fileSize: " + fileSize);
- System.out.println("creationTime: " + session.getFileCreationTime(handle));
- System.out.println("lastAccessTime: " + session.getFileLastAccessTime(handle));
- System.out.println("lastWriteTime: " + session.getFileLastWriteTime(handle));
- session.closeHandle(handle);
- }
-
- /**
- * Recursively print the whole device tree on the console.
- */
- void printDeviceTree(String dir, int indent) throws RapiException {
- RapiFindData[] fdArr = session.findAllFiles(dir + "*",
- Rapi.FAF_ATTRIBUTES | Rapi.FAF_NAME | Rapi.FAF_SIZE_LOW);
- if (fdArr == null) {
- return;
- }
- for (int i = 0 ; i < fdArr.length ; i++) {
- if (isDirectory(fdArr[i])) {
- printDeviceTree(dir + fdArr[i].fileName + "\\", indent + 1);
- } else {
- printFindData(fdArr[i], indent);
- }
- }
- }
-
- /**
- * Opens the specified URL in a browser. The browser is started with
- * {@link IRapiSession#createProcess(String, String, int)} and the URL
- * is passed as command line argument.
- */
- void openUrl(String url) throws RapiException {
- System.out.println(">>> openUrl() url: " + url);
- ProcessInformation pi = session.createProcess("\\Windows\\iexplore.exe", url, 0);
- System.out.println("hProcess: " + Integer.toHexString(pi.hProcess));
- System.out.println("hThread: " + Integer.toHexString(pi.hThread));
- System.out.println("dwProcessId: " + Integer.toHexString(pi.dwProcessId));
- System.out.println("dwThreadId: " + Integer.toHexString(pi.dwThreadId));
- session.closeHandle(pi.hProcess);
- session.closeHandle(pi.hThread);
- }
-
- void runExamples() {
- try {
- initRapi();
- desktop = IRapiDesktop.getInstance();
- enumDevices = desktop.enumDevices();
- // get the first device
- device = enumDevices.next();
- printDeviceInfo();
- printConnectionInfo();
- // create session
- session = device.createSession();
- session.init();
- createFile("\\foo.txt");
- readFile("\\foo.txt");
- session.copyFile("\\foo.txt", "\\bar.txt");
- listFiles("\\");
- session.moveFile("\\bar.txt", "\\spam.txt");
- listFiles2("\\");
- session.deleteFile("\\spam.txt");
- statFile("\\foo.txt");
- System.out.println(">>> printDeviceTree()");
- printDeviceTree("\\", 0);
- openUrl("www.eclipse.org/dsdp/tm");
- session.uninit();
- } catch (RapiException e) {
- e.printStackTrace();
- } finally {
- uninitRapi();
- }
- }
-}
diff --git a/wince/org.eclipse.tm.rapi.tests/.classpath b/wince/org.eclipse.tm.rapi.tests/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/wince/org.eclipse.tm.rapi.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/wince/org.eclipse.tm.rapi.tests/.cvsignore b/wince/org.eclipse.tm.rapi.tests/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/wince/org.eclipse.tm.rapi.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/wince/org.eclipse.tm.rapi.tests/.project b/wince/org.eclipse.tm.rapi.tests/.project
deleted file mode 100644
index c7a68a143..000000000
--- a/wince/org.eclipse.tm.rapi.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.rapi.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/wince/org.eclipse.tm.rapi.tests/.settings/org.eclipse.jdt.core.prefs b/wince/org.eclipse.tm.rapi.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 675d29eb2..000000000
--- a/wince/org.eclipse.tm.rapi.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.fatalOptionalError=enabled
-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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=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.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-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.unusedParameterIncludeDocCommentReference=enabled
-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.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/wince/org.eclipse.tm.rapi.tests/META-INF/MANIFEST.MF b/wince/org.eclipse.tm.rapi.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index a66f58878..000000000
--- a/wince/org.eclipse.tm.rapi.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.rapi.tests
-Bundle-Version: 0.1.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.junit,
- org.eclipse.tm.rapi;bundle-version="[0.1.0,1.0.0)"
-Export-Package: org.eclipse.tm.rapi.tests
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/wince/org.eclipse.tm.rapi.tests/about.html b/wince/org.eclipse.tm.rapi.tests/about.html
deleted file mode 100644
index 02520f4f1..000000000
--- a/wince/org.eclipse.tm.rapi.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>March 27, 2008</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/wince/org.eclipse.tm.rapi.tests/build.properties b/wince/org.eclipse.tm.rapi.tests/build.properties
deleted file mode 100644
index 2ccce9b24..000000000
--- a/wince/org.eclipse.tm.rapi.tests/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 Radoslav Gerganov and others
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - add about.html
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/wince/org.eclipse.tm.rapi.tests/plugin.properties b/wince/org.eclipse.tm.rapi.tests/plugin.properties
deleted file mode 100644
index d9a9428e5..000000000
--- a/wince/org.eclipse.tm.rapi.tests/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 Radoslav Gerganov and others
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - Rename pluginName, add PII NLS tags
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-providerName = Eclipse.org - DSDP
-pluginName = RAPI2 Java wrapper unit tests (Incubation) \ No newline at end of file
diff --git a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/AllTests.java b/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/AllTests.java
deleted file mode 100644
index ff93fa92b..000000000
--- a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/AllTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Unit tests for the Java wrappers of RAPI2.
- * <b>
- * Establishing an ActiveSync connection with a device or emulator is needed
- * before running these tests.
- * </b>
- * @author Radoslav Gerganov
- */
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.tm.rapi");
- //$JUnit-BEGIN$
- suite.addTestSuite(RapiDesktopTest.class);
- suite.addTestSuite(RapiEnumDevicesTest.class);
- suite.addTestSuite(RapiDeviceTest.class);
- suite.addTestSuite(RapiSessionTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDesktopTest.java b/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDesktopTest.java
deleted file mode 100644
index bd0ebb3a5..000000000
--- a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDesktopTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.tests;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.RapiException;
-
-public class RapiDesktopTest extends RapiTestCase {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testGetInstance() throws RapiException {
- desktop = IRapiDesktop.getInstance();
- assertNotNull("IRapiDesktop.getInstance() returned null", desktop);
- }
-
- public void testEnumDevices() throws RapiException {
- desktop = IRapiDesktop.getInstance();
- enumDevices = desktop.enumDevices();
- assertNotNull("IRapiDesktop.enumDevices() returned null", enumDevices);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDeviceTest.java b/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDeviceTest.java
deleted file mode 100644
index 2c0eaaa58..000000000
--- a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiDeviceTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.tests;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.IRapiDevice;
-import org.eclipse.tm.rapi.RapiConnectionInfo;
-import org.eclipse.tm.rapi.RapiDeviceInfo;
-import org.eclipse.tm.rapi.RapiException;
-
-public class RapiDeviceTest extends RapiTestCase {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- IRapiDevice getDevice() throws RapiException {
- desktop = IRapiDesktop.getInstance();
- enumDevices = desktop.enumDevices();
- return enumDevices.next();
- }
-
- public void testCreateSession() throws RapiException {
- device = getDevice();
- session = device.createSession();
- assertNotNull("IRapiDevice.createSession() returned null", session);
- }
-
- public void testGetConnectionInfo() throws RapiException {
- device = getDevice();
- RapiConnectionInfo connectionInfo = device.getConnectionInfo();
- int connectionType = connectionInfo.connectionType;
- assertTrue("Unknown connectionType: " + connectionType,
- connectionType >= 0 && connectionType <= 3);
- }
-
- public void testGetDeviceInfo() throws RapiException {
- device = getDevice();
- RapiDeviceInfo deviceInfo = device.getDeviceInfo();
- assertNotNull("deviceInfo.id is null", deviceInfo.id);
- assertNotNull("deviceInfo.name is null", deviceInfo.name);
- assertNotNull("deviceInfo.platform is null", deviceInfo.platform);
- //TODO: make some reasonable checks for the version numbers
- }
-
- public void testIsConnected() throws RapiException {
- device = getDevice();
- boolean connected = device.isConnected();
- assertTrue("device should be connected", connected);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiEnumDevicesTest.java b/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiEnumDevicesTest.java
deleted file mode 100644
index 84216a356..000000000
--- a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiEnumDevicesTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.tests;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.RapiException;
-
-public class RapiEnumDevicesTest extends RapiTestCase {
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testNext() throws RapiException {
- desktop = IRapiDesktop.getInstance();
- enumDevices = desktop.enumDevices();
- device = enumDevices.next();
- assertNotNull("IRapiEnumDevices.next() returned null", device);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiSessionTest.java b/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiSessionTest.java
deleted file mode 100644
index 623639581..000000000
--- a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiSessionTest.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.tests;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.RapiException;
-import org.eclipse.tm.rapi.RapiFindData;
-
-public class RapiSessionTest extends RapiTestCase {
-
- private static final int TEMP_FILES_COUNT = 10;
- private static final int TEST_FILE_SIZE = 8 * 1024;
- private static final String TEST_FILE_NAME = "\\foo.bin";
- private static final int CHUNK_SIZE = 1024;
-
- private static final String TEST_DIR_NAME = "bar";
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /**
- * Creates and initialize RAPI2 session
- */
- void createInitSession() throws RapiException {
- desktop = IRapiDesktop.getInstance();
- enumDevices = desktop.enumDevices();
- device = enumDevices.next();
- session = device.createSession();
- session.init();
- }
-
- /**
- * Returns true if the first <code>len</code> bytes of the specified arrays
- * are equal.
- */
- boolean arraysEqual(byte[] arr1, byte[] arr2, int len) {
- for (int i = 0 ; i < len ; i++) {
- if (arr1[i] != arr2[i]) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns true if the specified <code>path</code> exists and it is a directory.
- */
- boolean isDirectory(String path) {
- int attr = session.getFileAttributes(path);
- if (attr == -1) {
- return false;
- }
- return (attr & Rapi.FILE_ATTRIBUTE_DIRECTORY) != 0;
- }
-
- /**
- * Returns true if the specified <code>path</code> exists and it is a file.
- */
- boolean isFile(String path) {
- int attr = session.getFileAttributes(path);
- if (attr == -1) {
- return false;
- }
- return (attr & Rapi.FILE_ATTRIBUTE_DIRECTORY) == 0;
- }
-
- /**
- * Tests reading and writing files on the device.
- */
- public void testReadWriteFiles() throws RapiException {
- createInitSession();
-
- // generate random file content
- byte[] content = new byte[TEST_FILE_SIZE];
- for (int i = 0 ; i < content.length ; i++) {
- content[i] = (byte)(Math.random() * 131);
- }
-
- // write the test file at once
- int handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- session.writeFile(handle, content);
- session.closeHandle(handle);
-
- // try to read the whole file
- handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- byte[] contentRead = new byte[TEST_FILE_SIZE];
- int br = session.readFile(handle, contentRead);
- session.closeHandle(handle);
- assertTrue("Different file content", arraysEqual(content, contentRead, br));
-
- // write the test file by chunks
- handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- int off = 0;
- for (int i = 0 ; i < TEST_FILE_SIZE / CHUNK_SIZE ; i++) {
- session.writeFile(handle, content, off, CHUNK_SIZE);
- off += CHUNK_SIZE;
- }
- session.closeHandle(handle);
-
- // read the test file by chunks
- handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- byte[] contentRead2 = new byte[TEST_FILE_SIZE];
- off = 0;
- int bytesToRead = TEST_FILE_SIZE;
- while (bytesToRead > 0) {
- int len = CHUNK_SIZE < bytesToRead ? CHUNK_SIZE : bytesToRead;
- br = session.readFile(handle, contentRead2, off, len);
- off += br;
- bytesToRead -= br;
- }
- session.closeHandle(handle);
- assertTrue("Different file content", arraysEqual(content, contentRead2, TEST_FILE_SIZE));
-
- // delete the test file
- session.deleteFile(TEST_FILE_NAME);
- }
-
- /**
- * Tests creating and removing directories on the device.
- */
- public void testCreateRemoveDirectories() throws RapiException {
- createInitSession();
- try {
- session.removeDirectory(TEST_DIR_NAME);
- } catch (RapiException re) {
- // ignore
- }
- session.createDirectory(TEST_DIR_NAME);
- assertTrue("Failed to create directory: " + TEST_DIR_NAME, isDirectory(TEST_DIR_NAME));
- session.removeDirectory(TEST_DIR_NAME);
- assertFalse("Failed to remove directory: " + TEST_DIR_NAME, isDirectory(TEST_DIR_NAME));
- }
-
- /**
- * Utility method for creating files.
- */
- void createFile(IRapiSession session, String fileName) throws RapiException {
- int handle = session.createFile(fileName, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- session.writeFile(handle, "spam".getBytes());
- session.closeHandle(handle);
- }
-
- /**
- * Tests copying, moving and deleting files on the device.
- */
- public void testCopyMoveDeleteFiles() throws RapiException {
- createInitSession();
-
- // create test file
- createFile(session, TEST_FILE_NAME);
-
- // make a copy
- String copy = TEST_FILE_NAME + "1";
- session.copyFile(TEST_FILE_NAME, copy);
- assertTrue("The copied file doesn't exist: " + copy, isFile(copy));
-
- // delete the test file
- session.deleteFile(TEST_FILE_NAME);
- assertFalse("Failed to delete file: " + TEST_FILE_NAME, isFile(TEST_FILE_NAME));
-
- // rename the copy
- session.moveFile(copy, TEST_FILE_NAME);
- assertTrue("Failed to move file, existing file: " + copy + " new file: " + TEST_FILE_NAME,
- isFile(TEST_FILE_NAME));
- assertFalse("Failed to move file, existing file: " + copy + " new file: " + TEST_FILE_NAME,
- isFile(copy));
-
- // delete test file
- session.deleteFile(TEST_FILE_NAME);
- }
-
- /**
- * Utility method for creating a bunch of files.
- */
- void createTempFiles() throws RapiException {
- for (int i = 0 ; i < TEMP_FILES_COUNT ; i++) {
- createFile(session, TEST_FILE_NAME + i);
- }
- }
-
- /**
- * Tests finding files using {@link IRapiSession#findFirstFile(String, RapiFindData)}
- */
- public void testFindFiles() throws RapiException {
- createInitSession();
- createTempFiles();
- int filesFound = 0;
- RapiFindData findData = new RapiFindData();
- int fh = session.findFirstFile(TEST_FILE_NAME + "?", findData);
- while (findData != null) {
- filesFound++;
- findData = session.findNextFile(fh);
- }
- session.findClose(fh);
- assertTrue("Found " + filesFound + " , expected " + TEMP_FILES_COUNT,
- filesFound == TEMP_FILES_COUNT);
- // clean up
- for (int i = 0 ; i < TEMP_FILES_COUNT ; i++) {
- session.deleteFile(TEST_FILE_NAME + i);
- }
- }
-
- /**
- * Tests finding files using {@link IRapiSession#findAllFiles(String, int)}
- */
- public void testFindAllFiles() throws RapiException {
- createInitSession();
- createTempFiles();
- RapiFindData[] faf = session.findAllFiles(TEST_FILE_NAME + "?", Rapi.FAF_NAME);
- int filesFound = faf.length;
- assertTrue("Found " + filesFound + " , expected " + TEMP_FILES_COUNT,
- filesFound == TEMP_FILES_COUNT);
- // clean up
- for (int i = 0 ; i < TEMP_FILES_COUNT ; i++) {
- session.deleteFile(TEST_FILE_NAME + i);
- }
- }
-
- /**
- * Tests getting and setting file attributes
- */
- public void testGetSetFileAttributes() throws RapiException {
- createInitSession();
- // create test file
- createFile(session, TEST_FILE_NAME);
-
- session.setFileAttributes(TEST_FILE_NAME, Rapi.FILE_ATTRIBUTE_READONLY);
- int attr = session.getFileAttributes(TEST_FILE_NAME);
- assertTrue("Wrong file attributes, expected FILE_ATTRIBUTE_READONLY",
- (attr & Rapi.FILE_ATTRIBUTE_READONLY) != 0);
-
- session.setFileAttributes(TEST_FILE_NAME, Rapi.FILE_ATTRIBUTE_ARCHIVE);
- attr = session.getFileAttributes(TEST_FILE_NAME);
- assertTrue("Wrong file attributes, expected FILE_ATTRIBUTE_ARCHIVE",
- (attr & Rapi.FILE_ATTRIBUTE_ARCHIVE) != 0);
-
- //clean up
- session.deleteFile(TEST_FILE_NAME);
- }
-
- /**
- * Tests getting file size using {@link IRapiSession#getFileSize(int)}
- */
- public void testGetFileSize() throws RapiException {
- createInitSession();
- // create test file
- int handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- session.writeFile(handle, "spam".getBytes());
- assertTrue("Wrong file size, expected size 4 bytes", 4 == session.getFileSize(handle));
- session.closeHandle(handle);
- //clean up
- session.deleteFile(TEST_FILE_NAME);
- }
-
- /**
- * Tests getting and setting file times
- */
- public void testGetSetFileTime() throws RapiException {
- createInitSession();
-
- // now + 1h
- long d = System.currentTimeMillis() + 3600000;
-
- // create file and set last access time to d
- int handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_WRITE,
- Rapi.FILE_SHARE_READ, Rapi.CREATE_ALWAYS, Rapi.FILE_ATTRIBUTE_NORMAL);
- session.writeFile(handle, "spam".getBytes());
- session.setFileLastWriteTime(handle, d);
- session.closeHandle(handle);
- // get file last write time and compare to d
- handle = session.createFile(TEST_FILE_NAME, Rapi.GENERIC_READ,
- Rapi.FILE_SHARE_READ, Rapi.OPEN_EXISTING, Rapi.FILE_ATTRIBUTE_NORMAL);
- long lwTime = session.getFileLastWriteTime(handle);
- // the precision of setLastWriteTime should be about 1-2sec
- assertTrue("Too big difference for lastWriteTime, expected: " + d
- + " returned: " + lwTime, Math.abs(lwTime - d) <= 5000);
- session.closeHandle(handle);
-
- //clean up
- session.deleteFile(TEST_FILE_NAME);
- }
-
- protected void tearDown() throws Exception {
- if (session != null) {
- session.uninit();
- }
- super.tearDown();
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiTestCase.java b/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiTestCase.java
deleted file mode 100644
index ec2d49404..000000000
--- a/wince/org.eclipse.tm.rapi.tests/src/org/eclipse/tm/rapi/tests/RapiTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi.tests;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.IRapiDevice;
-import org.eclipse.tm.rapi.IRapiEnumDevices;
-import org.eclipse.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-
-import junit.framework.TestCase;
-
-public class RapiTestCase extends TestCase {
-
- protected IRapiDesktop desktop = null;
- protected IRapiEnumDevices enumDevices = null;
- protected IRapiDevice device = null;
- protected IRapiSession session = null;
-
- protected void setUp() throws Exception {
- super.setUp();
- desktop = null;
- enumDevices = null;
- device = null;
- session = null;
- Rapi.initialize(Rapi.COINIT_MULTITHREADED);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- if (desktop != null) {
- desktop.release();
- }
- if (enumDevices != null) {
- enumDevices.release();
- }
- if (device != null) {
- device.release();
- }
- if (session != null) {
- session.release();
- }
- Rapi.uninitialize();
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi/.classpath b/wince/org.eclipse.tm.rapi/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/wince/org.eclipse.tm.rapi/.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/wince/org.eclipse.tm.rapi/.cvsignore b/wince/org.eclipse.tm.rapi/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/wince/org.eclipse.tm.rapi/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/wince/org.eclipse.tm.rapi/.project b/wince/org.eclipse.tm.rapi/.project
deleted file mode 100644
index 88b3e3586..000000000
--- a/wince/org.eclipse.tm.rapi/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.rapi</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>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/wince/org.eclipse.tm.rapi/.settings/org.eclipse.jdt.core.prefs b/wince/org.eclipse.tm.rapi/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/wince/org.eclipse.tm.rapi/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-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.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=warning
-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.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=disabled
-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=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-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=warning
-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=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=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/wince/org.eclipse.tm.rapi/META-INF/MANIFEST.MF b/wince/org.eclipse.tm.rapi/META-INF/MANIFEST.MF
deleted file mode 100644
index 4808b29a9..000000000
--- a/wince/org.eclipse.tm.rapi/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.rapi
-Bundle-Version: 0.2.0.qualifier
-Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86))
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tm.internal.rapi;x-internal:=true,
- org.eclipse.tm.rapi
-Bundle-NativeCode: /lib/os/win32/x86/jrapi.dll;osname="Win32";processor=x86
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/wince/org.eclipse.tm.rapi/about.html b/wince/org.eclipse.tm.rapi/about.html
deleted file mode 100644
index 02520f4f1..000000000
--- a/wince/org.eclipse.tm.rapi/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>March 27, 2008</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/wince/org.eclipse.tm.rapi/build.properties b/wince/org.eclipse.tm.rapi/build.properties
deleted file mode 100644
index c19a58536..000000000
--- a/wince/org.eclipse.tm.rapi/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 Radoslav Gerganov and others
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - add about.html
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- lib/,\
- plugin.properties
-src.includes = about.html,\
- build/,\
- native/
diff --git a/wince/org.eclipse.tm.rapi/build/README.txt b/wince/org.eclipse.tm.rapi/build/README.txt
deleted file mode 100644
index d55edf1a3..000000000
--- a/wince/org.eclipse.tm.rapi/build/README.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Instructions for building the native library (jrapi.dll) for win32-x86
-======================================================================
-
-Requirements:
- Windows 2000/XP/Vista,
- Visual Studio 2005 or newer,
- Windows Mobile (PocketPC/Smartphone) SDK 5.0 or newer,
- JDK 1.4 or newer
-
-Building the library:
- 1. Open the solution file (jrapi.sln) in Visual Studio.
-
- 2. Navigate to "Tools" -> "Options", and expand "Projects and Solutions",
- and click "VC++ Directories".
-
- 3. In "Show directories for:" select "Include files".
-
- 4. Add the Activesync include directory from your Windows Mobile SDK:
- <WinMobile-SDK-path>\Activesync\Inc
-
- 5. Add the JNI include directories from your JDK:
- <JDK-path>\include
- <JDK-path>\include\win32
-
- 6. In "Show directories for:" select "Library files".
-
- 7. Add the Activesync library directory from your Windows Mobile SDK:
- <WinMobile-SDK-path>\Activesync\Lib
-
- 8. Navigate to "Build", and click "Rebuild Solution" to rebuild the library.
- The output dll will be placed in \lib\os\win32\x86
-
-Environment used for building the committed jrapi.dll:
- Windows 2000 SP4
- Visual Studio 2005 Standard Edition
- Windows Mobile 5.0 Pocket PC SDK
- JDK 1.4.2_10
diff --git a/wince/org.eclipse.tm.rapi/build/build.xml b/wince/org.eclipse.tm.rapi/build/build.xml
deleted file mode 100644
index a98b4f130..000000000
--- a/wince/org.eclipse.tm.rapi/build/build.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2008 Radoslav Gerganov
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
- Radoslav Gerganov - initial API and implementation
--->
-<project name="jrapi" basedir=".." default="jni">
- <description>
- Java wrappers for RAPI2
- </description>
-
- <target name="clean">
- <delete dir="bin"/>
- </target>
-
- <target name="compile" depends="clean">
- <mkdir dir="bin"/>
- <javac srcdir="src" destdir="bin" debug="on" source="1.3" target="1.3"/>
- </target>
-
- <target name="jni" depends="compile">
- <javah destdir="native" classpath="bin" force="yes">
- <class name="org.eclipse.tm.rapi.OS"/>
- <class name="org.eclipse.tm.internal.rapi.RapiDesktop"/>
- <class name="org.eclipse.tm.internal.rapi.RapiDevice"/>
- <class name="org.eclipse.tm.internal.rapi.RapiEnumDevices"/>
- <class name="org.eclipse.tm.internal.rapi.RapiSession"/>
- </javah>
- </target>
-
-</project>
diff --git a/wince/org.eclipse.tm.rapi/build/jrapi.sln b/wince/org.eclipse.tm.rapi/build/jrapi.sln
deleted file mode 100644
index 359d1f7b9..000000000
--- a/wince/org.eclipse.tm.rapi/build/jrapi.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrapi", "jrapi.vcproj", "{7A9CC697-2EEB-40B9-B540-7FFC195B3D4F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7A9CC697-2EEB-40B9-B540-7FFC195B3D4F}.Debug|Win32.ActiveCfg = Debug|Win32
- {7A9CC697-2EEB-40B9-B540-7FFC195B3D4F}.Debug|Win32.Build.0 = Debug|Win32
- {7A9CC697-2EEB-40B9-B540-7FFC195B3D4F}.Release|Win32.ActiveCfg = Release|Win32
- {7A9CC697-2EEB-40B9-B540-7FFC195B3D4F}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/wince/org.eclipse.tm.rapi/build/jrapi.vcproj b/wince/org.eclipse.tm.rapi/build/jrapi.vcproj
deleted file mode 100644
index 40b7c3221..000000000
--- a/wince/org.eclipse.tm.rapi/build/jrapi.vcproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="jrapi"
- ProjectGUID="{7A9CC697-2EEB-40B9-B540-7FFC195B3D4F}"
- RootNamespace="jrapi"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JRAPI_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="rapiuuid.lib"
- OutputFile="..\lib\os\win32\x86\jrapi.dll"
- LinkIncremental="2"
- IgnoreDefaultLibraryNames="libc.lib"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JRAPI_EXPORTS"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="rapiuuid.lib"
- OutputFile="..\lib\os\win32\x86\jrapi.dll"
- LinkIncremental="1"
- IgnoreDefaultLibraryNames="libc.lib"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\native\Rapi.cpp"
- >
- </File>
- <File
- RelativePath="..\native\RapiDesktop.cpp"
- >
- </File>
- <File
- RelativePath="..\native\RapiDevice.cpp"
- >
- </File>
- <File
- RelativePath="..\native\RapiEnumDevices.cpp"
- >
- </File>
- <File
- RelativePath="..\native\RapiSession.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\native\org_eclipse_tm_internal_rapi_RapiDesktop.h"
- >
- </File>
- <File
- RelativePath="..\native\org_eclipse_tm_internal_rapi_RapiDevice.h"
- >
- </File>
- <File
- RelativePath="..\native\org_eclipse_tm_internal_rapi_RapiEnumDevices.h"
- >
- </File>
- <File
- RelativePath="..\native\org_eclipse_tm_internal_rapi_RapiSession.h"
- >
- </File>
- <File
- RelativePath="..\native\org_eclipse_tm_rapi_Rapi.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/wince/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll b/wince/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll
deleted file mode 100644
index 983e6b825..000000000
--- a/wince/org.eclipse.tm.rapi/lib/os/win32/x86/jrapi.dll
+++ /dev/null
Binary files differ
diff --git a/wince/org.eclipse.tm.rapi/native/Rapi.cpp b/wince/org.eclipse.tm.rapi/native/Rapi.cpp
deleted file mode 100644
index bc64b65b6..000000000
--- a/wince/org.eclipse.tm.rapi/native/Rapi.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-
-#define _WIN32_DCOM
-#include <WinSock2.h>
-#include <rapi2.h>
-
-#include "org_eclipse_tm_rapi_Rapi.h"
-
-#define RAPI_NATIVE(func) Java_org_eclipse_tm_rapi_Rapi_##func
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CoInitializeEx)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- return (jint)CoInitializeEx((LPVOID)arg0, arg1);
-}
-
-JNIEXPORT void JNICALL RAPI_NATIVE(CoUninitialize)
- (JNIEnv *env, jclass that)
-{
- CoUninitialize();
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CreateRapiDesktop)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint rc = 0;
- jint *lparg0 = NULL;
- if (arg0) {
- lparg0 = env->GetIntArrayElements(arg0, NULL);
- if (lparg0 == NULL) goto fail;
- }
- rc = CoCreateInstance(CLSID_RAPI, NULL, CLSCTX_INPROC_SERVER,
- IID_IRAPIDesktop, (void**)lparg0);
-fail:
- if (arg0 && lparg0) env->ReleaseIntArrayElements(arg0, lparg0, 0);
- return rc;
-}
-
-JNIEXPORT void JNICALL RAPI_NATIVE(ReleaseIUnknown)
- (JNIEnv *env, jclass that, jint arg0)
-{
- if (arg0 == 0) return;
- IUnknown *ptr = (IUnknown*) arg0;
- ptr->Release();
-}
diff --git a/wince/org.eclipse.tm.rapi/native/RapiDesktop.cpp b/wince/org.eclipse.tm.rapi/native/RapiDesktop.cpp
deleted file mode 100644
index f82e8a502..000000000
--- a/wince/org.eclipse.tm.rapi/native/RapiDesktop.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-
-#include <WinSock2.h>
-#include <rapi2.h>
-
-#include "org_eclipse_tm_internal_rapi_RapiDesktop.h"
-
-#define RAPI_NATIVE(func) Java_org_eclipse_tm_internal_rapi_RapiDesktop_##func
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(EnumDevices)
- (JNIEnv *env, jobject that, jint arg0, jintArray arg1)
-{
- jint rc = E_FAIL;
- jint *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetIntArrayElements(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPIDesktop *pDesktop = (IRAPIDesktop*) arg0;
- rc = pDesktop->EnumDevices((IRAPIEnumDevices**)lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseIntArrayElements(arg1, lparg1, 0);
- return rc;
-}
diff --git a/wince/org.eclipse.tm.rapi/native/RapiDevice.cpp b/wince/org.eclipse.tm.rapi/native/RapiDevice.cpp
deleted file mode 100644
index 7ce1fc70d..000000000
--- a/wince/org.eclipse.tm.rapi/native/RapiDevice.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-
-#include <WinSock2.h>
-#include <rapi2.h>
-
-#include "org_eclipse_tm_internal_rapi_RapiDevice.h"
-
-#define RAPI_NATIVE(func) Java_org_eclipse_tm_internal_rapi_RapiDevice_##func
-
-struct RAPI_DEVICEINFO_FID_CACHE
-{
- int cached;
- jclass clazz;
- jfieldID id, versionMajor, versionMinor, name, platform;
-};
-
-struct RAPI_CONNECTIONINFO_FID_CACHE
-{
- int cached;
- jclass clazz;
- jfieldID connectionType;
-};
-
-RAPI_DEVICEINFO_FID_CACHE RAPI_DEVICEINFOFc;
-RAPI_CONNECTIONINFO_FID_CACHE RAPI_CONNECTIONINFOFc;
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CreateSession)
- (JNIEnv *env, jobject that, jint arg0, jintArray arg1)
-{
- jint rc = E_FAIL;
- jint *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetIntArrayElements(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPIDevice *pDevice = (IRAPIDevice*) arg0;
- rc = pDevice->CreateSession((IRAPISession**)lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseIntArrayElements(arg1, lparg1, 0);
- return rc;
-}
-
-void cacheRAPI_DEVICEINFOFields(JNIEnv *env, jobject lpObject)
-{
- if (RAPI_DEVICEINFOFc.cached) return;
- RAPI_DEVICEINFOFc.clazz = env->GetObjectClass(lpObject);
- RAPI_DEVICEINFOFc.id = env->GetFieldID(RAPI_DEVICEINFOFc.clazz, "id", "Ljava/lang/String;");
- RAPI_DEVICEINFOFc.versionMajor = env->GetFieldID(RAPI_DEVICEINFOFc.clazz, "versionMajor", "I");
- RAPI_DEVICEINFOFc.versionMinor = env->GetFieldID(RAPI_DEVICEINFOFc.clazz, "versionMinor", "I");
- RAPI_DEVICEINFOFc.name = env->GetFieldID(RAPI_DEVICEINFOFc.clazz, "name", "Ljava/lang/String;");
- RAPI_DEVICEINFOFc.platform = env->GetFieldID(RAPI_DEVICEINFOFc.clazz, "platform", "Ljava/lang/String;");
- RAPI_DEVICEINFOFc.cached = 1;
-}
-
-void cacheRAPI_CONNECTIONINFOFields(JNIEnv *env, jobject lpObject)
-{
- if (RAPI_CONNECTIONINFOFc.cached) return;
- RAPI_CONNECTIONINFOFc.clazz = env->GetObjectClass(lpObject);
- RAPI_CONNECTIONINFOFc.connectionType = env->GetFieldID(RAPI_CONNECTIONINFOFc.clazz, "connectionType", "I");
- RAPI_CONNECTIONINFOFc.cached = 1;
-}
-
-void setRAPI_DEVICEINFOFields(JNIEnv *env, jobject lpObject, RAPI_DEVICEINFO *pDeviceInfo)
-{
- if (!RAPI_DEVICEINFOFc.cached) cacheRAPI_DEVICEINFOFields(env, lpObject);
- WCHAR *pwszGUID = NULL;
- if (StringFromCLSID(pDeviceInfo->DeviceId, &pwszGUID) == S_OK) {
- int idLen = lstrlen(pwszGUID);
- jstring id = env->NewString((const jchar*)pwszGUID, idLen);
- env->SetObjectField(lpObject, RAPI_DEVICEINFOFc.id, id);
- CoTaskMemFree(pwszGUID);
- }
- env->SetIntField(lpObject, RAPI_DEVICEINFOFc.versionMajor, (jint)pDeviceInfo->dwOsVersionMajor);
- env->SetIntField(lpObject, RAPI_DEVICEINFOFc.versionMinor, (jint)pDeviceInfo->dwOsVersionMinor);
- // create new String from the native BSTR
- UINT nameLen = SysStringLen(pDeviceInfo->bstrName);
- jstring name = env->NewString((const jchar*)pDeviceInfo->bstrName, nameLen);
- env->SetObjectField(lpObject, RAPI_DEVICEINFOFc.name, name);
- // create new String from the native BSTR
- UINT platformLen = SysStringLen(pDeviceInfo->bstrPlatform);
- jstring platform = env->NewString((const jchar*)pDeviceInfo->bstrPlatform, platformLen);
- env->SetObjectField(lpObject, RAPI_DEVICEINFOFc.platform, platform);
-}
-
-void setRAPI_CONNECTIONINFOFields(JNIEnv *env, jobject lpObject, RAPI_CONNECTIONINFO *pConnectionInfo)
-{
- if (!RAPI_CONNECTIONINFOFc.cached) cacheRAPI_CONNECTIONINFOFields(env, lpObject);
- env->SetIntField(lpObject, RAPI_CONNECTIONINFOFc.connectionType, (jint)pConnectionInfo->connectionType);
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(GetDeviceInfo)
- (JNIEnv *env, jobject that, jint arg0, jobject arg1)
-{
- jint rc = E_FAIL;
- RAPI_DEVICEINFO deviceInfo = {0};
-
- if (arg0 == 0) return rc;
- IRAPIDevice *pDevice = (IRAPIDevice*) arg0;
- rc = pDevice->GetDeviceInfo(&deviceInfo);
- if (rc != NOERROR) goto fail;
- if (arg1) setRAPI_DEVICEINFOFields(env, arg1, &deviceInfo);
-fail:
- FreeDeviceInfoData(&deviceInfo);
- return rc;
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(GetConnectionInfo)
- (JNIEnv *env, jobject that, jint arg0, jobject arg1)
-{
- jint rc = E_FAIL;
- RAPI_CONNECTIONINFO connectionInfo = {0};
-
- if (arg0 == 0) return rc;
- IRAPIDevice *pDevice = (IRAPIDevice*) arg0;
- rc = pDevice->GetConnectionInfo(&connectionInfo);
- if (rc != NOERROR) goto fail;
- if (arg1) setRAPI_CONNECTIONINFOFields(env, arg1, &connectionInfo);
-fail:
- return rc;
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(GetConnectStat)
- (JNIEnv *env, jobject that, jint arg0, jintArray arg1)
-{
- jint rc = E_FAIL;
- jint *lparg1 = NULL;
- RAPI_DEVICESTATUS devStatus;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetIntArrayElements(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPIDevice *pDevice = (IRAPIDevice*) arg0;
- rc = pDevice->GetConnectStat(&devStatus);
- lparg1[0] = (int)devStatus;
-fail:
- if (arg1 && lparg1) env->ReleaseIntArrayElements(arg1, lparg1, 0);
- return rc;
-} \ No newline at end of file
diff --git a/wince/org.eclipse.tm.rapi/native/RapiEnumDevices.cpp b/wince/org.eclipse.tm.rapi/native/RapiEnumDevices.cpp
deleted file mode 100644
index 40bdd6fcd..000000000
--- a/wince/org.eclipse.tm.rapi/native/RapiEnumDevices.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-
-#include <WinSock2.h>
-#include <rapi2.h>
-
-#include "org_eclipse_tm_internal_rapi_RapiEnumDevices.h"
-
-#define RAPI_NATIVE(func) Java_org_eclipse_tm_internal_rapi_RapiEnumDevices_##func
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(Next)
- (JNIEnv *env, jobject that, jint arg0, jintArray arg1)
-{
- jint rc = E_FAIL;
- jint *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetIntArrayElements(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPIEnumDevices *pEnumDevices = (IRAPIEnumDevices*) arg0;
- rc = pEnumDevices->Next((IRAPIDevice**)lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseIntArrayElements(arg1, lparg1, 0);
- return rc;
-}
diff --git a/wince/org.eclipse.tm.rapi/native/RapiSession.cpp b/wince/org.eclipse.tm.rapi/native/RapiSession.cpp
deleted file mode 100644
index e391cc4fe..000000000
--- a/wince/org.eclipse.tm.rapi/native/RapiSession.cpp
+++ /dev/null
@@ -1,611 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- * Radoslav Gerganov - [238773] [WinCE] Implement IRAPISession#CeRapiInvoke
- *******************************************************************************/
-
-#include <WinSock2.h>
-#include <rapi2.h>
-
-#include "org_eclipse_tm_internal_rapi_RapiSession.h"
-
-#define RAPI_NATIVE(func) Java_org_eclipse_tm_internal_rapi_RapiSession_##func
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeRapiInit)
- (JNIEnv *env, jobject that, jint arg0)
-{
- if (arg0 == 0) return E_FAIL;
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeRapiInit();
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeRapiUninit)
- (JNIEnv *env, jobject that, jint arg0)
-{
- if (arg0 == 0) return E_FAIL;
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeRapiUninit();
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeRapiGetError)
- (JNIEnv *env, jobject that, jint arg0)
-{
- if (arg0 == 0) return 0;
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeRapiGetError();
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeGetLastError)
- (JNIEnv *env, jobject that, jint arg0)
-{
- if (arg0 == 0) return 0;
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeGetLastError();
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeCreateFile)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jint arg2, jint arg3, jint arg4, jint arg5)
-{
- HANDLE h = INVALID_HANDLE_VALUE;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) goto fail;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- h = pSession->CeCreateFile((LPCWSTR)lparg1, arg2, arg3, NULL, arg4, arg5, 0);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return (jint)h;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeReadFile)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jbyteArray arg2, jint arg3, jintArray arg4)
-{
- jboolean rc = 0;
- jbyte *lparg2 = NULL;
- jint *lparg4 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg2) {
- lparg2 = env->GetByteArrayElements(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- if (arg4) {
- lparg4 = env->GetIntArrayElements(arg4, NULL);
- if (lparg4 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeReadFile((HANDLE)arg1, lparg2, arg3, (LPDWORD)lparg4, NULL);
-fail:
- if (arg2 && lparg2) env->ReleaseByteArrayElements(arg2, lparg2, 0);
- if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeWriteFile)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jbyteArray arg2, jint arg3, jintArray arg4)
-{
- jboolean rc = 0;
- jbyte *lparg2 = NULL;
- jint *lparg4 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg2) {
- lparg2 = env->GetByteArrayElements(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- if (arg4) {
- lparg4 = env->GetIntArrayElements(arg4, NULL);
- if (lparg4 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeWriteFile((HANDLE)arg1, lparg2, arg3, (LPDWORD)lparg4, NULL);
-fail:
- if (arg2 && lparg2) env->ReleaseByteArrayElements(arg2, lparg2, 0);
- if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeCloseHandle)
- (JNIEnv *env, jobject that, jint arg0, jint arg1)
-{
- if (arg0 == 0) return 0;
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeCloseHandle((HANDLE)arg1);
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeCopyFile)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jstring arg2, jboolean arg3)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
- const jchar *lparg2 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- if (arg2) {
- lparg2 = env->GetStringChars(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeCopyFile((LPCWSTR)lparg1, (LPCWSTR)lparg2, arg3);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- if (arg2 && lparg2) env->ReleaseStringChars(arg2, lparg2);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeDeleteFile)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeDeleteFile((LPCWSTR)lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeMoveFile)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jstring arg2)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
- const jchar *lparg2 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- if (arg2) {
- lparg2 = env->GetStringChars(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeMoveFile((LPCWSTR)lparg1, (LPCWSTR)lparg2);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- if (arg2 && lparg2) env->ReleaseStringChars(arg2, lparg2);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeCreateDirectory)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeCreateDirectory((LPCWSTR) lparg1, NULL);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeRemoveDirectory)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeRemoveDirectory((LPCWSTR) lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return rc;
-}
-
-struct FIND_DATA_FID_CACHE
-{
- int cached;
- jclass clazz;
- jfieldID fileAttributes, creationTime, lastAccessTime;
- jfieldID lastWriteTime, fileSize, oid, fileName;
-};
-
-FIND_DATA_FID_CACHE FIND_DATAFc;
-
-void cacheFIND_DATAFields(JNIEnv *env, jobject lpObject)
-{
- if (FIND_DATAFc.cached) return;
- FIND_DATAFc.clazz = env->GetObjectClass(lpObject);
- FIND_DATAFc.fileAttributes = env->GetFieldID(FIND_DATAFc.clazz, "fileAttributes", "I");
- FIND_DATAFc.creationTime = env->GetFieldID(FIND_DATAFc.clazz, "creationTime", "J");
- FIND_DATAFc.lastAccessTime = env->GetFieldID(FIND_DATAFc.clazz, "lastAccessTime", "J");
- FIND_DATAFc.lastWriteTime = env->GetFieldID(FIND_DATAFc.clazz, "lastWriteTime", "J");
- FIND_DATAFc.fileSize = env->GetFieldID(FIND_DATAFc.clazz, "fileSize", "J");
- FIND_DATAFc.oid = env->GetFieldID(FIND_DATAFc.clazz, "oid", "I");
- FIND_DATAFc.fileName = env->GetFieldID(FIND_DATAFc.clazz, "fileName", "Ljava/lang/String;");
- FIND_DATAFc.cached = 1;
-}
-
-jlong FILETIME2jlong(FILETIME ft)
-{
- jlong res = ft.dwHighDateTime;
- // well, this is a potential overflow since jlong is signed
- // we should take care about this in the java part
- res <<= 32;
- res |= ft.dwLowDateTime;
- return res;
-}
-
-LPFILETIME jlong2FILETIME(jlong jl, LPFILETIME ft)
-{
- ft->dwLowDateTime = (DWORD)jl;
- jl >>= 32;
- ft->dwHighDateTime = (DWORD)jl;
- return ft;
-}
-
-void setFIND_DATAFields(JNIEnv *env, jobject lpObject, CE_FIND_DATA *pFindData)
-{
- if (!FIND_DATAFc.cached) cacheFIND_DATAFields(env, lpObject);
- env->SetIntField(lpObject, FIND_DATAFc.fileAttributes, (jint)pFindData->dwFileAttributes);
-
- jlong creationTime = FILETIME2jlong(pFindData->ftCreationTime);
- env->SetLongField(lpObject, FIND_DATAFc.creationTime, creationTime);
-
- jlong lastAccessTime = FILETIME2jlong(pFindData->ftLastAccessTime);
- env->SetLongField(lpObject, FIND_DATAFc.lastAccessTime, lastAccessTime);
-
- jlong lastWriteTime = FILETIME2jlong(pFindData->ftLastWriteTime);
- env->SetLongField(lpObject, FIND_DATAFc.lastWriteTime, lastWriteTime);
-
- jlong fileSize = pFindData->nFileSizeHigh;
- fileSize <<= 32;
- fileSize |= pFindData->nFileSizeLow;
- env->SetLongField(lpObject, FIND_DATAFc.fileSize, fileSize);
-
- int fileNameLen = lstrlen(pFindData->cFileName);
- jstring fileName = env->NewString((const jchar*)pFindData->cFileName, fileNameLen);
- env->SetObjectField(lpObject, FIND_DATAFc.fileName, fileName);
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeFindFirstFile)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jobject arg2)
-{
- HANDLE h = INVALID_HANDLE_VALUE;
- CE_FIND_DATA findData;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) goto fail;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- h = pSession->CeFindFirstFile((LPCWSTR)lparg1, &findData);
- if (h != INVALID_HANDLE_VALUE && arg2) setFIND_DATAFields(env, arg2, &findData);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return (jint)h;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeFindNextFile)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jobject arg2)
-{
- jboolean rc = 0;
- CE_FIND_DATA findData;
-
- if (arg0 == 0) return 0;
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeFindNextFile((HANDLE)arg1, &findData);
- if (rc && arg2) setFIND_DATAFields(env, arg2, &findData);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeFindClose)
- (JNIEnv *env, jobject that, jint arg0, jint arg1)
-{
- if (arg0 == 0) return 0;
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeFindClose((HANDLE)arg1);
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeFindAllFiles)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jint arg2, jintArray arg3, jintArray arg4)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
- jint *lparg3 = NULL;
- jint *lparg4 = NULL;
-
- if (arg0 == 0) goto fail;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- if (arg3) {
- lparg3 = env->GetIntArrayElements(arg3, NULL);
- if (lparg3 == NULL) goto fail;
- }
- if (arg4) {
- lparg4 = env->GetIntArrayElements(arg4, NULL);
- if (lparg4 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeFindAllFiles((LPCWSTR)lparg1, arg2, (LPDWORD)lparg3, (LPLPCE_FIND_DATA)lparg4);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- if (arg3 && lparg3) env->ReleaseIntArrayElements(arg3, lparg3, 0);
- if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0);
- return rc;
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeFindAllFilesEx)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jint arg2, jobjectArray arg3)
-{
- if (arg0 == 0 || arg2 == 0 || arg3 == 0) return E_FAIL;
- LPCE_FIND_DATA findDataArray = (LPCE_FIND_DATA) arg2;
- for (int i = 0 ; i < arg1 ; i++) {
- jobject obj = env->GetObjectArrayElement(arg3, i);
- setFIND_DATAFields(env, obj, &findDataArray[i]);
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- return pSession->CeRapiFreeBuffer(findDataArray);
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeGetFileAttributes)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1)
-{
- jint rc = 0xFFFFFFFF;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeGetFileAttributes((LPCWSTR)lparg1);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeGetFileSize)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jintArray arg2)
-{
- jint rc = INVALID_FILE_SIZE;
- jint *lparg2 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg2) {
- lparg2 = env->GetIntArrayElements(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeGetFileSize((HANDLE)arg1, (LPDWORD)lparg2);
-fail:
- if (arg2 && lparg2) env->ReleaseIntArrayElements(arg2, lparg2, 0);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeGetFileTime)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
-{
- jboolean rc = 0;
- jlong *lparg2 = NULL;
- jlong *lparg3 = NULL;
- jlong *lparg4 = NULL;
- FILETIME crTime, laTime, lwTime;
-
- if (arg0 == 0) return rc;
- if (arg2) {
- lparg2 = env->GetLongArrayElements(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- if (arg3) {
- lparg3 = env->GetLongArrayElements(arg3, NULL);
- if (lparg3 == NULL) goto fail;
- }
- if (arg4) {
- lparg4 = env->GetLongArrayElements(arg4, NULL);
- if (lparg4 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeGetFileTime((HANDLE)arg1, &crTime, &laTime, &lwTime);
- if (!rc) goto fail;
- lparg2[0] = FILETIME2jlong(crTime);
- lparg3[0] = FILETIME2jlong(laTime);
- lparg4[0] = FILETIME2jlong(lwTime);
-fail:
- if (arg2 && lparg2) env->ReleaseLongArrayElements(arg2, lparg2, 0);
- if (arg3 && lparg3) env->ReleaseLongArrayElements(arg3, lparg3, 0);
- if (arg4 && lparg4) env->ReleaseLongArrayElements(arg4, lparg4, 0);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeSetFileAttributes)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jint arg2)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
-
- if (arg0 == 0) return rc;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeSetFileAttributes((LPCWSTR)lparg1, arg2);
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeSetFileTime)
- (JNIEnv *env, jobject that, jint arg0, jint arg1, jlongArray arg2, jlongArray arg3, jlongArray arg4)
-{
- jboolean rc = 0;
- FILETIME crTime, laTime, lwTime;
- LPFILETIME pcrTime = NULL, plaTime = NULL, plwTime = NULL;
- jlong *lparg2 = NULL, *lparg3 = NULL, *lparg4 = NULL;
-
- if (arg0 == 0) return 0;
- if (arg2) {
- lparg2 = env->GetLongArrayElements(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- pcrTime = jlong2FILETIME(lparg2[0], &crTime);
- }
- if (arg3) {
- lparg3 = env->GetLongArrayElements(arg3, NULL);
- if (lparg3 == NULL) goto fail;
- plaTime = jlong2FILETIME(lparg3[0], &laTime);
- }
- if (arg4) {
- lparg4 = env->GetLongArrayElements(arg4, NULL);
- if (lparg4 == NULL) goto fail;
- plwTime = jlong2FILETIME(lparg4[0], &lwTime);
- }
-
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeSetFileTime((HANDLE)arg1, pcrTime, plaTime, plwTime);
-fail:
- if (arg2 && lparg2) env->ReleaseLongArrayElements(arg2, lparg2, 0);
- if (arg3 && lparg3) env->ReleaseLongArrayElements(arg3, lparg3, 0);
- if (arg4 && lparg4) env->ReleaseLongArrayElements(arg4, lparg4, 0);
- return rc;
-}
-
-struct PROCESS_INFORMATION_FID_CACHE
-{
- int cached;
- jclass clazz;
- jfieldID hProcess, hThread;
- jfieldID dwProcessId, dwThreadId;
-};
-
-PROCESS_INFORMATION_FID_CACHE PROCESS_INFORMATIONFc;
-
-void cachePROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject)
-{
- if (PROCESS_INFORMATIONFc.cached) return;
- PROCESS_INFORMATIONFc.clazz = env->GetObjectClass(lpObject);
- PROCESS_INFORMATIONFc.hProcess = env->GetFieldID(PROCESS_INFORMATIONFc.clazz, "hProcess", "I");
- PROCESS_INFORMATIONFc.hThread = env->GetFieldID(PROCESS_INFORMATIONFc.clazz, "hThread", "I");
- PROCESS_INFORMATIONFc.dwProcessId = env->GetFieldID(PROCESS_INFORMATIONFc.clazz, "dwProcessId", "I");
- PROCESS_INFORMATIONFc.dwThreadId = env->GetFieldID(PROCESS_INFORMATIONFc.clazz, "dwThreadId", "I");
- PROCESS_INFORMATIONFc.cached = 1;
-}
-
-void setPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *pi)
-{
- if (!PROCESS_INFORMATIONFc.cached) cachePROCESS_INFORMATIONFields(env, lpObject);
- env->SetIntField(lpObject, PROCESS_INFORMATIONFc.hProcess, (jint)pi->hProcess);
- env->SetIntField(lpObject, PROCESS_INFORMATIONFc.hThread, (jint)pi->hThread);
- env->SetIntField(lpObject, PROCESS_INFORMATIONFc.dwProcessId, (jint)pi->dwProcessId);
- env->SetIntField(lpObject, PROCESS_INFORMATIONFc.dwThreadId, (jint)pi->dwThreadId);
-}
-
-JNIEXPORT jboolean JNICALL RAPI_NATIVE(CeCreateProcess)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jstring arg2, jint arg3, jobject arg4)
-{
- jboolean rc = 0;
- const jchar *lparg1 = NULL;
- const jchar *lparg2 = NULL;
- PROCESS_INFORMATION pi;
-
- if (arg0 == 0) return 0;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- if (arg2) {
- lparg2 = env->GetStringChars(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- rc = pSession->CeCreateProcess((LPCWSTR)lparg1, (LPCWSTR)lparg2, NULL, NULL, FALSE, arg3, NULL, NULL, NULL, &pi);
- if (!rc) goto fail;
- if (arg4) setPROCESS_INFORMATIONFields(env, arg4, &pi);
-
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- if (arg2 && lparg2) env->ReleaseStringChars(arg2, lparg2);
- return rc;
-}
-
-JNIEXPORT jint JNICALL RAPI_NATIVE(CeRapiInvoke)
- (JNIEnv *env, jobject that, jint arg0, jstring arg1, jstring arg2, jbyteArray arg3, jintArray arg4)
-{
- const jchar *lparg1 = NULL;
- const jchar *lparg2 = NULL;
- jbyte *lparg3 = NULL;
- jint *lparg4 = NULL;
- int res = -1;
- jsize cbInput = 0;
-
- if (arg0 == 0) return -1;
- if (arg1) {
- lparg1 = env->GetStringChars(arg1, NULL);
- if (lparg1 == NULL) goto fail;
- }
- if (arg2) {
- lparg2 = env->GetStringChars(arg2, NULL);
- if (lparg2 == NULL) goto fail;
- }
- if (arg3) {
- lparg3 = env->GetByteArrayElements(arg3, NULL);
- if (lparg3 == NULL) goto fail;
- cbInput = env->GetArrayLength(arg3);
- }
- if (arg4) {
- lparg4 = env->GetIntArrayElements(arg4, NULL);
- if (lparg4 == NULL) goto fail;
- }
- IRAPISession *pSession = (IRAPISession*) arg0;
- res = pSession->CeRapiInvoke((LPCWSTR)lparg1, (LPCWSTR)lparg2, cbInput,
- (BYTE*)lparg3, (DWORD*) lparg4, (BYTE**) (lparg4 + 1), NULL, 0);
-
-fail:
- if (arg1 && lparg1) env->ReleaseStringChars(arg1, lparg1);
- if (arg2 && lparg2) env->ReleaseStringChars(arg2, lparg2);
- if (arg3 && lparg3) env->ReleaseByteArrayElements(arg3, lparg3, 0);
- if (arg4 && lparg4) env->ReleaseIntArrayElements(arg4, lparg4, 0);
- return res;
-}
-
-JNIEXPORT void JNICALL RAPI_NATIVE(CeRapiInvokeEx)
- (JNIEnv *env, jobject that, jint arg0, jbyteArray arg1)
-{
- jbyte *lparg1 = NULL;
- jsize len = 0;
-
- if (arg1 == 0) return;
- lparg1 = env->GetByteArrayElements(arg1, NULL);
- if (lparg1 == NULL) return;
- len = env->GetArrayLength(arg1);
- memcpy(lparg1, (void*)arg0, len);
- env->ReleaseByteArrayElements(arg1, lparg1, 0);
-}
diff --git a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDesktop.h b/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDesktop.h
deleted file mode 100644
index fb29d46a4..000000000
--- a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDesktop.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_tm_internal_rapi_RapiDesktop */
-
-#ifndef _Included_org_eclipse_tm_internal_rapi_RapiDesktop
-#define _Included_org_eclipse_tm_internal_rapi_RapiDesktop
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiDesktop
- * Method: EnumDevices
- * Signature: (I[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiDesktop_EnumDevices
- (JNIEnv *, jobject, jint, jintArray);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDevice.h b/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDevice.h
deleted file mode 100644
index 5d52b7b75..000000000
--- a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiDevice.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_tm_internal_rapi_RapiDevice */
-
-#ifndef _Included_org_eclipse_tm_internal_rapi_RapiDevice
-#define _Included_org_eclipse_tm_internal_rapi_RapiDevice
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiDevice
- * Method: CreateSession
- * Signature: (I[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiDevice_CreateSession
- (JNIEnv *, jobject, jint, jintArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiDevice
- * Method: GetConnectionInfo
- * Signature: (ILorg/eclipse/tm/rapi/RapiConnectionInfo;)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiDevice_GetConnectionInfo
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiDevice
- * Method: GetDeviceInfo
- * Signature: (ILorg/eclipse/tm/rapi/RapiDeviceInfo;)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiDevice_GetDeviceInfo
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiDevice
- * Method: GetConnectStat
- * Signature: (I[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiDevice_GetConnectStat
- (JNIEnv *, jobject, jint, jintArray);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiEnumDevices.h b/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiEnumDevices.h
deleted file mode 100644
index dd5d14f56..000000000
--- a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiEnumDevices.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_tm_internal_rapi_RapiEnumDevices */
-
-#ifndef _Included_org_eclipse_tm_internal_rapi_RapiEnumDevices
-#define _Included_org_eclipse_tm_internal_rapi_RapiEnumDevices
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiEnumDevices
- * Method: Next
- * Signature: (I[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiEnumDevices_Next
- (JNIEnv *, jobject, jint, jintArray);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiSession.h b/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiSession.h
deleted file mode 100644
index cb8494d91..000000000
--- a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_internal_rapi_RapiSession.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- * Radoslav Gerganov - [238773] [WinCE] Implement IRAPISession#CeRapiInvoke
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_tm_internal_rapi_RapiSession */
-
-#ifndef _Included_org_eclipse_tm_internal_rapi_RapiSession
-#define _Included_org_eclipse_tm_internal_rapi_RapiSession
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeRapiInit
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeRapiInit
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeRapiUninit
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeRapiUninit
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeRapiGetError
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeRapiGetError
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeGetLastError
- * Signature: (I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeGetLastError
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeCreateFile
- * Signature: (ILjava/lang/String;IIII)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeCreateFile
- (JNIEnv *, jobject, jint, jstring, jint, jint, jint, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeReadFile
- * Signature: (II[BI[I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeReadFile
- (JNIEnv *, jobject, jint, jint, jbyteArray, jint, jintArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeWriteFile
- * Signature: (II[BI[I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeWriteFile
- (JNIEnv *, jobject, jint, jint, jbyteArray, jint, jintArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeCloseHandle
- * Signature: (II)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeCloseHandle
- (JNIEnv *, jobject, jint, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeCopyFile
- * Signature: (ILjava/lang/String;Ljava/lang/String;Z)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeCopyFile
- (JNIEnv *, jobject, jint, jstring, jstring, jboolean);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeDeleteFile
- * Signature: (ILjava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeDeleteFile
- (JNIEnv *, jobject, jint, jstring);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeMoveFile
- * Signature: (ILjava/lang/String;Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeMoveFile
- (JNIEnv *, jobject, jint, jstring, jstring);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeCreateDirectory
- * Signature: (ILjava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeCreateDirectory
- (JNIEnv *, jobject, jint, jstring);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeRemoveDirectory
- * Signature: (ILjava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeRemoveDirectory
- (JNIEnv *, jobject, jint, jstring);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeFindFirstFile
- * Signature: (ILjava/lang/String;Lorg/eclipse/tm/rapi/RapiFindData;)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeFindFirstFile
- (JNIEnv *, jobject, jint, jstring, jobject);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeFindNextFile
- * Signature: (IILorg/eclipse/tm/rapi/RapiFindData;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeFindNextFile
- (JNIEnv *, jobject, jint, jint, jobject);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeFindClose
- * Signature: (II)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeFindClose
- (JNIEnv *, jobject, jint, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeFindAllFiles
- * Signature: (ILjava/lang/String;I[I[I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeFindAllFiles
- (JNIEnv *, jobject, jint, jstring, jint, jintArray, jintArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeFindAllFilesEx
- * Signature: (III[Lorg/eclipse/tm/rapi/RapiFindData;)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeFindAllFilesEx
- (JNIEnv *, jobject, jint, jint, jint, jobjectArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeGetFileAttributes
- * Signature: (ILjava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeGetFileAttributes
- (JNIEnv *, jobject, jint, jstring);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeGetFileSize
- * Signature: (II[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeGetFileSize
- (JNIEnv *, jobject, jint, jint, jintArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeGetFileTime
- * Signature: (II[J[J[J)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeGetFileTime
- (JNIEnv *, jobject, jint, jint, jlongArray, jlongArray, jlongArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeSetFileAttributes
- * Signature: (ILjava/lang/String;I)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeSetFileAttributes
- (JNIEnv *, jobject, jint, jstring, jint);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeSetFileTime
- * Signature: (II[J[J[J)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeSetFileTime
- (JNIEnv *, jobject, jint, jint, jlongArray, jlongArray, jlongArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeCreateProcess
- * Signature: (ILjava/lang/String;Ljava/lang/String;ILorg/eclipse/tm/rapi/ProcessInformation;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeCreateProcess
- (JNIEnv *, jobject, jint, jstring, jstring, jint, jobject);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeRapiInvoke
- * Signature: (ILjava/lang/String;Ljava/lang/String;[B[I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeRapiInvoke
- (JNIEnv *, jobject, jint, jstring, jstring, jbyteArray, jintArray);
-
-/*
- * Class: org_eclipse_tm_internal_rapi_RapiSession
- * Method: CeRapiInvokeEx
- * Signature: (I[B)V
- */
-JNIEXPORT void JNICALL Java_org_eclipse_tm_internal_rapi_RapiSession_CeRapiInvokeEx
- (JNIEnv *, jobject, jint, jbyteArray);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_rapi_Rapi.h b/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_rapi_Rapi.h
deleted file mode 100644
index 23e71ae2d..000000000
--- a/wince/org.eclipse.tm.rapi/native/org_eclipse_tm_rapi_Rapi.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class org_eclipse_tm_rapi_Rapi */
-
-#ifndef _Included_org_eclipse_tm_rapi_Rapi
-#define _Included_org_eclipse_tm_rapi_Rapi
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef org_eclipse_tm_rapi_Rapi_NOERROR
-#define org_eclipse_tm_rapi_Rapi_NOERROR 0L
-#undef org_eclipse_tm_rapi_Rapi_GENERIC_READ
-#define org_eclipse_tm_rapi_Rapi_GENERIC_READ -2147483648L
-#undef org_eclipse_tm_rapi_Rapi_GENERIC_WRITE
-#define org_eclipse_tm_rapi_Rapi_GENERIC_WRITE 1073741824L
-#undef org_eclipse_tm_rapi_Rapi_FILE_SHARE_READ
-#define org_eclipse_tm_rapi_Rapi_FILE_SHARE_READ 1L
-#undef org_eclipse_tm_rapi_Rapi_FILE_SHARE_WRITE
-#define org_eclipse_tm_rapi_Rapi_FILE_SHARE_WRITE 2L
-#undef org_eclipse_tm_rapi_Rapi_CREATE_NEW
-#define org_eclipse_tm_rapi_Rapi_CREATE_NEW 1L
-#undef org_eclipse_tm_rapi_Rapi_CREATE_ALWAYS
-#define org_eclipse_tm_rapi_Rapi_CREATE_ALWAYS 2L
-#undef org_eclipse_tm_rapi_Rapi_OPEN_EXISTING
-#define org_eclipse_tm_rapi_Rapi_OPEN_EXISTING 3L
-#undef org_eclipse_tm_rapi_Rapi_OPEN_ALWAYS
-#define org_eclipse_tm_rapi_Rapi_OPEN_ALWAYS 4L
-#undef org_eclipse_tm_rapi_Rapi_TRUNCATE_EXISTING
-#define org_eclipse_tm_rapi_Rapi_TRUNCATE_EXISTING 5L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_ARCHIVE
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_ARCHIVE 32L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_COMPRESSED
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_COMPRESSED 2048L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_DIRECTORY
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_DIRECTORY 16L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_ENCRYPTED
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_ENCRYPTED 16384L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_HIDDEN
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_HIDDEN 2L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_INROM
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_INROM 64L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_NORMAL
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_NORMAL 128L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_READONLY
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_READONLY 1L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_REPARSE_POINT
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_REPARSE_POINT 1024L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_ROMMODULE
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_ROMMODULE 8192L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_SPARSE_FILE
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_SPARSE_FILE 512L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_SYSTEM
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_SYSTEM 4L
-#undef org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_TEMPORARY
-#define org_eclipse_tm_rapi_Rapi_FILE_ATTRIBUTE_TEMPORARY 256L
-#undef org_eclipse_tm_rapi_Rapi_FILE_FLAG_WRITE_THROUGH
-#define org_eclipse_tm_rapi_Rapi_FILE_FLAG_WRITE_THROUGH -2147483648L
-#undef org_eclipse_tm_rapi_Rapi_FILE_FLAG_OVERLAPPED
-#define org_eclipse_tm_rapi_Rapi_FILE_FLAG_OVERLAPPED 1073741824L
-#undef org_eclipse_tm_rapi_Rapi_FILE_FLAG_RANDOM_ACCESS
-#define org_eclipse_tm_rapi_Rapi_FILE_FLAG_RANDOM_ACCESS 268435456L
-#undef org_eclipse_tm_rapi_Rapi_FILE_FLAG_SEQUENTIAL_SCAN
-#define org_eclipse_tm_rapi_Rapi_FILE_FLAG_SEQUENTIAL_SCAN 134217728L
-#undef org_eclipse_tm_rapi_Rapi_FAF_ATTRIB_CHILDREN
-#define org_eclipse_tm_rapi_Rapi_FAF_ATTRIB_CHILDREN 4096L
-#undef org_eclipse_tm_rapi_Rapi_FAF_ATTRIB_NO_HIDDEN
-#define org_eclipse_tm_rapi_Rapi_FAF_ATTRIB_NO_HIDDEN 8192L
-#undef org_eclipse_tm_rapi_Rapi_FAF_FOLDERS_ONLY
-#define org_eclipse_tm_rapi_Rapi_FAF_FOLDERS_ONLY 16384L
-#undef org_eclipse_tm_rapi_Rapi_FAF_NO_HIDDEN_SYS_ROMMODULES
-#define org_eclipse_tm_rapi_Rapi_FAF_NO_HIDDEN_SYS_ROMMODULES 32768L
-#undef org_eclipse_tm_rapi_Rapi_FAF_GETTARGET
-#define org_eclipse_tm_rapi_Rapi_FAF_GETTARGET 65536L
-#undef org_eclipse_tm_rapi_Rapi_FAF_ATTRIBUTES
-#define org_eclipse_tm_rapi_Rapi_FAF_ATTRIBUTES 1L
-#undef org_eclipse_tm_rapi_Rapi_FAF_CREATION_TIME
-#define org_eclipse_tm_rapi_Rapi_FAF_CREATION_TIME 2L
-#undef org_eclipse_tm_rapi_Rapi_FAF_LASTACCESS_TIME
-#define org_eclipse_tm_rapi_Rapi_FAF_LASTACCESS_TIME 4L
-#undef org_eclipse_tm_rapi_Rapi_FAF_LASTWRITE_TIME
-#define org_eclipse_tm_rapi_Rapi_FAF_LASTWRITE_TIME 8L
-#undef org_eclipse_tm_rapi_Rapi_FAF_SIZE_HIGH
-#define org_eclipse_tm_rapi_Rapi_FAF_SIZE_HIGH 16L
-#undef org_eclipse_tm_rapi_Rapi_FAF_SIZE_LOW
-#define org_eclipse_tm_rapi_Rapi_FAF_SIZE_LOW 32L
-#undef org_eclipse_tm_rapi_Rapi_FAF_OID
-#define org_eclipse_tm_rapi_Rapi_FAF_OID 64L
-#undef org_eclipse_tm_rapi_Rapi_FAF_NAME
-#define org_eclipse_tm_rapi_Rapi_FAF_NAME 128L
-#undef org_eclipse_tm_rapi_Rapi_INVALID_HANDLE_VALUE
-#define org_eclipse_tm_rapi_Rapi_INVALID_HANDLE_VALUE -1L
-#undef org_eclipse_tm_rapi_Rapi_TIME_DIFF
-#define org_eclipse_tm_rapi_Rapi_TIME_DIFF 11644473600000i64
-#undef org_eclipse_tm_rapi_Rapi_COINIT_MULTITHREADED
-#define org_eclipse_tm_rapi_Rapi_COINIT_MULTITHREADED 0L
-#undef org_eclipse_tm_rapi_Rapi_COINIT_APARTMENTTHREADED
-#define org_eclipse_tm_rapi_Rapi_COINIT_APARTMENTTHREADED 2L
-#undef org_eclipse_tm_rapi_Rapi_COINIT_DISABLE_OLE1DDE
-#define org_eclipse_tm_rapi_Rapi_COINIT_DISABLE_OLE1DDE 4L
-#undef org_eclipse_tm_rapi_Rapi_COINIT_SPEED_OVER_MEMORY
-#define org_eclipse_tm_rapi_Rapi_COINIT_SPEED_OVER_MEMORY 8L
-/*
- * Class: org_eclipse_tm_rapi_Rapi
- * Method: CoInitializeEx
- * Signature: (II)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_rapi_Rapi_CoInitializeEx
- (JNIEnv *, jclass, jint, jint);
-
-/*
- * Class: org_eclipse_tm_rapi_Rapi
- * Method: CoUninitialize
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_org_eclipse_tm_rapi_Rapi_CoUninitialize
- (JNIEnv *, jclass);
-
-/*
- * Class: org_eclipse_tm_rapi_Rapi
- * Method: CreateRapiDesktop
- * Signature: ([I)I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_tm_rapi_Rapi_CreateRapiDesktop
- (JNIEnv *, jclass, jintArray);
-
-/*
- * Class: org_eclipse_tm_rapi_Rapi
- * Method: ReleaseIUnknown
- * Signature: (I)V
- */
-JNIEXPORT void JNICALL Java_org_eclipse_tm_rapi_Rapi_ReleaseIUnknown
- (JNIEnv *, jclass, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/wince/org.eclipse.tm.rapi/plugin.properties b/wince/org.eclipse.tm.rapi/plugin.properties
deleted file mode 100644
index 8c1531694..000000000
--- a/wince/org.eclipse.tm.rapi/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 Radoslav Gerganov and others
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Radoslav Gerganov - initial API and implementation
-# Martin Oberhuber (Wind River) - Rename pluginName, add PII NLS tags
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-# NLS_ENCODING=UTF-8
-
-providerName = Eclipse.org - DSDP
-pluginName = RAPI2 Java wrappers (Incubation) \ No newline at end of file
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDesktop.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDesktop.java
deleted file mode 100644
index 8b5c257af..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDesktop.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.rapi;
-
-import org.eclipse.tm.rapi.IRapiDesktop;
-import org.eclipse.tm.rapi.IRapiEnumDevices;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.RapiException;
-
-/**
- * Implementation of <code>IRapiDesktop</code>.
- *
- * @author Radoslav Gerganov
- */
-public class RapiDesktop extends IRapiDesktop {
-
- public RapiDesktop(int addr) {
- super(addr);
- }
-
- public IRapiEnumDevices enumDevices() throws RapiException {
- int[] ppIEnum = new int[1];
- int rc = EnumDevices(addr, ppIEnum);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("EnumDevices failed", rc); //$NON-NLS-1$
- }
- return new RapiEnumDevices(ppIEnum[0]);
- }
-
- public String toString() {
- return "[RapiDesktop] addr: " + Integer.toHexString(addr); //$NON-NLS-1$
- }
-
- private final native int EnumDevices(int addr, int[] ppIEnum);
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDevice.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDevice.java
deleted file mode 100644
index 0167a15e3..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiDevice.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.rapi;
-
-import org.eclipse.tm.rapi.IRapiDevice;
-import org.eclipse.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.RapiConnectionInfo;
-import org.eclipse.tm.rapi.RapiDeviceInfo;
-import org.eclipse.tm.rapi.RapiException;
-
-/**
- * Implementation of <code>IRapiDevice</code>.
- *
- * @author Radoslav Gerganov
- */
-public class RapiDevice extends IRapiDevice {
-
- public RapiDevice(int addr) {
- super(addr);
- }
-
- public IRapiSession createSession() throws RapiException {
- int[] ppISession = new int[1];
- int rc = CreateSession(addr, ppISession);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("CreateSession failed", rc); //$NON-NLS-1$
- }
- return new RapiSession(ppISession[0]);
- }
-
- public RapiConnectionInfo getConnectionInfo() throws RapiException {
- RapiConnectionInfo connInfo = new RapiConnectionInfo();
- int rc = GetConnectionInfo(addr, connInfo);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("GetConnectionInfo failed", rc); //$NON-NLS-1$
- }
- return connInfo;
- }
-
- public RapiDeviceInfo getDeviceInfo() throws RapiException {
- RapiDeviceInfo devInfo = new RapiDeviceInfo();
- int rc = GetDeviceInfo(addr, devInfo);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("GetDeviceInfo failed", rc); //$NON-NLS-1$
- }
- return devInfo;
- }
-
- public boolean isConnected() throws RapiException {
- int[] status = new int[1];
- int rc = GetConnectStat(addr, status);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("GetConnectStat failed", rc); //$NON-NLS-1$
- }
- return status[0] == 1;
- }
-
- public String toString() {
- return "[RapiDevice] addr: " + Integer.toHexString(addr); //$NON-NLS-1$
- }
-
- private final native int CreateSession(int addr, int[] ppISession);
- private final native int GetConnectionInfo(int addr, RapiConnectionInfo pConnInfo);
- private final native int GetDeviceInfo(int addr, RapiDeviceInfo pDevInfo);
- private final native int GetConnectStat(int addr, int[] status);
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiEnumDevices.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiEnumDevices.java
deleted file mode 100644
index 4e5ee04a4..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiEnumDevices.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.rapi;
-
-import org.eclipse.tm.rapi.IRapiDevice;
-import org.eclipse.tm.rapi.IRapiEnumDevices;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.RapiException;
-
-/**
- * Implementation of <code>IRapiEnumDevices</code>.
- *
- * @author Radoslav Gerganov
- */
-public class RapiEnumDevices extends IRapiEnumDevices {
-
- public RapiEnumDevices(int addr) {
- super(addr);
- }
-
- public IRapiDevice next() throws RapiException {
- int[] ppIDevice = new int[1];
- int rc = Next(addr, ppIDevice);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("Next failed", rc); //$NON-NLS-1$
- }
- return new RapiDevice(ppIDevice[0]);
- }
-
- public String toString() {
- return "[RapiEnumDevices] addr: " + Integer.toHexString(addr); //$NON-NLS-1$
- }
-
- private final native int Next(int addr, int[] ppIDevice);
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiSession.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiSession.java
deleted file mode 100644
index 31d21d850..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/internal/rapi/RapiSession.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- * Radoslav Gerganov - [238773] [WinCE] Implement IRAPISession#CeRapiInvoke
- *******************************************************************************/
-package org.eclipse.tm.internal.rapi;
-
-import org.eclipse.tm.rapi.IRapiSession;
-import org.eclipse.tm.rapi.Rapi;
-import org.eclipse.tm.rapi.ProcessInformation;
-import org.eclipse.tm.rapi.RapiException;
-import org.eclipse.tm.rapi.RapiFindData;
-
-
-/**
- * Implementation of <code>IRapiSession</code>.
- *
- * @author Radoslav Gerganov
- */
-public class RapiSession extends IRapiSession {
-
- private RapiFindData[] EMPTY_FIND_DATA_ARR = new RapiFindData[0];
-
- public RapiSession(int addr) {
- super(addr);
- }
-
- private int getError() {
- int err = CeRapiGetError(addr);
- if (err >= 0) {
- err = CeGetLastError(addr);
- }
- return err;
- }
-
- public void init() throws RapiException {
- int rc = CeRapiInit(addr);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("CeRapiInit failed", rc); //$NON-NLS-1$
- }
- }
-
- public void uninit() throws RapiException {
- int rc = CeRapiUninit(addr);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("CeRapiUninit failed", rc); //$NON-NLS-1$
- }
- }
-
- public int createFile(String fileName, int desiredAccess, int shareMode,
- int creationDisposition, int flagsAndAttributes) throws RapiException {
-
- int handle = CeCreateFile(addr, fileName, desiredAccess, shareMode,
- creationDisposition, flagsAndAttributes);
- if (handle == Rapi.INVALID_HANDLE_VALUE) {
- throw new RapiException("CeCreateFile failed", getError()); //$NON-NLS-1$
- }
- return handle;
- }
-
- public int readFile(int handle, byte[] b) throws RapiException {
- if (b.length == 0) {
- return 0;
- }
- int[] bytesRead = new int[1];
- boolean res = CeReadFile(addr, handle, b, b.length, bytesRead);
- if (!res) {
- throw new RapiException("CeReadFile failed", getError()); //$NON-NLS-1$
- }
- return bytesRead[0] > 0 ? bytesRead[0] : -1;
- }
-
- public int readFile(int handle, byte[] b, int off, int len)
- throws RapiException {
- if (off < 0 || len < 0 || off + len > b.length) {
- throw new IndexOutOfBoundsException("Incorrect offset/length"); //$NON-NLS-1$
- }
- if (len == 0) {
- return 0;
- }
- //TODO: add support for setting offset in the native code and remove this tmp array
- byte[] tmp = new byte[len];
- int[] bytesRead = new int[1];
- boolean res = CeReadFile(addr, handle, tmp, tmp.length, bytesRead);
- if (!res) {
- throw new RapiException("CeReadFile failed", getError()); //$NON-NLS-1$
- }
- System.arraycopy(tmp, 0, b, off, len);
- return bytesRead[0] > 0 ? bytesRead[0] : -1;
- }
-
- public void writeFile(int handle, byte[] b) throws RapiException {
- int[] bytesWritten = new int[1];
- boolean res = CeWriteFile(addr, handle, b, b.length, bytesWritten);
- if (!res) {
- throw new RapiException("CeWriteFile failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void writeFile(int handle, byte[] b, int off, int len)
- throws RapiException {
-
- if (off < 0 || len < 0 || off + len > b.length) {
- throw new IndexOutOfBoundsException("Incorrect offset/length"); //$NON-NLS-1$
- }
- //TODO: add support for setting offset in the native code and remove this tmp array
- byte[] tmp = new byte[len];
- System.arraycopy(b, off, tmp, 0, len);
- int[] bytesWritten = new int[1];
- boolean res = CeWriteFile(addr, handle, tmp, tmp.length, bytesWritten);
- if (!res) {
- throw new RapiException("CeWriteFile failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void closeHandle(int handle) throws RapiException {
- boolean res = CeCloseHandle(addr, handle);
- if (!res) {
- throw new RapiException("CeCloseHandle failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void copyFile(String existingFile, String newFile) throws RapiException {
- //overwrite by default
- boolean res = CeCopyFile(addr, existingFile, newFile, false);
- if (!res) {
- throw new RapiException("CeCopyFile failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void deleteFile(String fileName) throws RapiException {
- boolean res = CeDeleteFile(addr, fileName);
- if (!res) {
- throw new RapiException("CeDeleteFile failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void moveFile(String existingFileName, String newFileName) throws RapiException {
- boolean res = CeMoveFile(addr, existingFileName, newFileName);
- if (!res) {
- throw new RapiException("CeMoveFile failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void createDirectory(String pathName) throws RapiException {
- boolean res = CeCreateDirectory(addr, pathName);
- if (!res) {
- throw new RapiException("CeCreateDirectory failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void removeDirectory(String pathName) throws RapiException {
- boolean res = CeRemoveDirectory(addr, pathName);
- if (!res) {
- throw new RapiException("CeRemoveDirectory failed", getError()); //$NON-NLS-1$
- }
- }
-
- public int findFirstFile(String fileName, RapiFindData findData) throws RapiException {
- int handle = CeFindFirstFile(addr, fileName, findData);
- if (handle == Rapi.INVALID_HANDLE_VALUE) {
- throw new RapiException("CeFindFirstFile failed", getError()); //$NON-NLS-1$
- }
- return handle;
- }
-
- public RapiFindData findNextFile(int handle) {
- RapiFindData findData = new RapiFindData();
- boolean res = CeFindNextFile(addr, handle, findData);
- // just return null if findNext fail
- return res ? findData : null;
- }
-
- public void findClose(int handle) throws RapiException {
- boolean res = CeFindClose(addr, handle);
- if (!res) {
- throw new RapiException("CeFindClose failed", getError()); //$NON-NLS-1$
- }
- }
-
- public RapiFindData[] findAllFiles(String path, int flags) throws RapiException {
- int[] foundCount = new int[1];
- int[] dataArr = new int[1];
- boolean res = CeFindAllFiles(addr, path, flags, foundCount, dataArr);
- int count = foundCount[0];
- if (!res || count == 0) {
- // nothing found
- return EMPTY_FIND_DATA_ARR;
- }
- RapiFindData[] findDataArr = new RapiFindData[count];
- for (int i = 0 ; i < count ; i++) {
- findDataArr[i] = new RapiFindData();
- }
- int hRes = CeFindAllFilesEx(addr, count, dataArr[0], findDataArr);
- if (hRes != Rapi.NOERROR) {
- throw new RapiException("CeFindAllFilesEx failed", hRes); //$NON-NLS-1$
- }
- return findDataArr;
- }
-
- public int getFileAttributes(String fileName) {
- int attributes = CeGetFileAttributes(addr, fileName);
-// if (attributes == 0xFFFFFFFF) {
-// throw new RapiException("CeGetFileAttributes failed", getError());
-// }
- return attributes;
- }
-
- public long getFileSize(int handle) {
- int[] sizeHigh = new int[] {1};
- int sizeLow = CeGetFileSize(addr, handle, sizeHigh);
- return ( ((long)sizeHigh[0] << 32) | (sizeLow & 0xFFFFFFFF));
- }
-
- public long getFileCreationTime(int handle) throws RapiException {
- long[] crTime = new long[1];
- long[] laTime = new long[1];
- long[] lwTime = new long[1];
- boolean res = CeGetFileTime(addr, handle, crTime, laTime, lwTime);
- if (!res) {
- throw new RapiException("CeGetFileTime failed", getError()); //$NON-NLS-1$
- }
- return (crTime[0] / 10000) - Rapi.TIME_DIFF;
- }
-
- public long getFileLastAccessTime(int handle) throws RapiException {
- long[] crTime = new long[1];
- long[] laTime = new long[1];
- long[] lwTime = new long[1];
- boolean res = CeGetFileTime(addr, handle, crTime, laTime, lwTime);
- if (!res) {
- throw new RapiException("CeGetFileTime failed", getError()); //$NON-NLS-1$
- }
- return (laTime[0] / 10000) - Rapi.TIME_DIFF;
- }
-
- public long getFileLastWriteTime(int handle) throws RapiException {
- long[] crTime = new long[1];
- long[] laTime = new long[1];
- long[] lwTime = new long[1];
- boolean res = CeGetFileTime(addr, handle, crTime, laTime, lwTime);
- if (!res) {
- throw new RapiException("CeGetFileTime failed", getError()); //$NON-NLS-1$
- }
- return (lwTime[0] / 10000) - Rapi.TIME_DIFF;
- }
-
- public void setFileAttributes(String fileName, int fileAttributes) throws RapiException {
- boolean res = CeSetFileAttributes(addr, fileName, fileAttributes);
- if (!res) {
- throw new RapiException("CeSetFileAttributes failed", getError()); //$NON-NLS-1$
- }
- }
-
- public void setFileLastWriteTime(int handle, long lastWriteTime) throws RapiException {
- if (lastWriteTime < 0) {
- throw new IllegalArgumentException("Time cannot be negative"); //$NON-NLS-1$
- }
- long[] lwTime = new long[] {(lastWriteTime + Rapi.TIME_DIFF) * 10000};
- boolean res = CeSetFileTime(addr, handle, null, null, lwTime);
- if (!res) {
- throw new RapiException("CeSetFileTime failed", getError()); //$NON-NLS-1$
- }
- }
-
- public ProcessInformation createProcess(String appName, String commandLine, int creationFlags) throws RapiException {
- ProcessInformation pi = new ProcessInformation();
- if (!CeCreateProcess(addr, appName, commandLine, creationFlags, pi)) {
- throw new RapiException("CeCreateProcess failed", getError()); //$NON-NLS-1$
- }
- return pi;
- }
-
- public byte[] invoke(String dllPath, String funcName, byte[] input) throws RapiException {
- int[] output = new int[2];
- int res = CeRapiInvoke(addr, dllPath, funcName, input, output);
- if (res != 0) {
- throw new RapiException("CeRapiInvoke failed", res); //$NON-NLS-1$
- }
- int outputLength = output[0];
- int outputPtr = output[1];
- byte[] outputArr = new byte[outputLength];
- CeRapiInvokeEx(outputPtr, outputArr);
- return outputArr;
- }
-
- public String toString() {
- return "[RapiSession] addr: " + Integer.toHexString(addr); //$NON-NLS-1$
- }
-
- private final native int CeRapiInit(int addr);
-
- private final native int CeRapiUninit(int addr);
-
- private final native int CeRapiGetError(int addr);
-
- private final native int CeGetLastError(int addr);
-
- private final native int CeCreateFile(int addr, String lpFileName,
- int dwDesiredAccess, int dwShareMode, int dwCreationDisposition,
- int dwFlagsAndAttributes);
-
- private final native boolean CeReadFile(int addr, int hFile, byte[] lpBuffer,
- int nNumberOfBytesToRead, int[] lpNumberOfBytesRead);
-
- private final native boolean CeWriteFile(int addr, int hFile, byte[] lpBuffer,
- int nNumberOfBytesToWrite, int[] lpNumberOfBytesWritten);
-
- private final native boolean CeCloseHandle(int addr, int hObject);
-
- private final native boolean CeCopyFile(int addr, String lpExistingFileName,
- String lpNewFileName, boolean bFailIfExists);
-
- private final native boolean CeDeleteFile(int addr, String lpFileName);
-
- private final native boolean CeMoveFile(int addr, String lpExistingFileName,
- String lpNewFileName);
-
- private final native boolean CeCreateDirectory(int addr, String lpPathName);
-
- private final native boolean CeRemoveDirectory(int addr, String lpPathName);
-
- private final native int CeFindFirstFile(int addr, String lpFileName,
- RapiFindData lpFindFileData);
-
- private final native boolean CeFindNextFile(int addr, int hFindFile,
- RapiFindData lpFindFileData);
-
- private final native boolean CeFindClose(int addr, int hFindFile);
-
- private final native boolean CeFindAllFiles(int addr, String szPath,
- int dwFlags, int[] lpdwFoundCount, int[] ppFindDataArray);
-
- private final native int CeFindAllFilesEx(int addr, int foundCount,
- int dataArr, RapiFindData[] findDataArr);
-
- private final native int CeGetFileAttributes(int addr, String lpFileName);
-
- private final native int CeGetFileSize(int addr, int hFile, int[] lpFileSizeHigh);
-
- private final native boolean CeGetFileTime(int addr, int hFile,
- long[] lpCreationTime, long[] lpLastAccessTime, long[] lpLastWriteTime);
-
- private final native boolean CeSetFileAttributes(int addr, String lpFileName, int dwFileAttributes);
-
- private final native boolean CeSetFileTime(int addr, int hFile, long[] lpCreationTime,
- long[] lpLastAccessTime, long[] lpLastWriteTime);
-
- private final native boolean CeCreateProcess(int addr, String lpApplicationName,
- String lpCommandLine, int dwCreationFlags, ProcessInformation lpProcessInformation);
-
- private final native int CeRapiInvoke(int addr, String dllPath, String funcName,
- byte[] input, int[] output);
-
- /**
- * Initializes the outputArr with the memory pointed by outputPtr.
- */
- private final native void CeRapiInvokeEx(int outputPtr, byte[] outputArr);
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDesktop.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDesktop.java
deleted file mode 100644
index d8f8374e2..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDesktop.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-import org.eclipse.tm.internal.rapi.RapiDesktop;
-
-/**
- * This class is used to find connected WinCE-based remote devices.
- * <p> Use {@link IRapiDesktop#getInstance()} to obtain an instance.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @author Radoslav Gerganov
- */
-public abstract class IRapiDesktop extends IUnknown {
-
- public IRapiDesktop(int addr) {
- super(addr);
- }
-
- /**
- * Returns new instance of <code>IRapiDesktop</code>.
- * Use {@link IRapiDesktop#release()} to release this instance when it is
- * no longer needed.
- * @return new instance of <code>IRapiDesktop</code>
- * @throws RapiException if an error occurs.
- */
- public synchronized static IRapiDesktop getInstance() throws RapiException {
- int[] rapiDesktop = new int[1];
- int rc = Rapi.CreateRapiDesktop(rapiDesktop);
- if (rc != Rapi.NOERROR) {
- throw new RapiException("CreateRapiDesktop failed", rc); //$NON-NLS-1$
- }
- return new RapiDesktop(rapiDesktop[0]);
- }
-
- /**
- * Returns an instance of <code>IRapiEnumDevices</code>.
- * Use {@link IRapiEnumDevices#release()} to release this instance when it is
- * no longer needed.
- * @return an instance of <code>IRapiEnumDevices</code>
- * @throws RapiException if an error occurs.
- */
- public abstract IRapiEnumDevices enumDevices() throws RapiException;
-
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDevice.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDevice.java
deleted file mode 100644
index a7d0c6700..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiDevice.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class represents a connected WinCE-based remote device.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @author Radoslav Gerganov
- */
-public abstract class IRapiDevice extends IUnknown {
-
- public IRapiDevice(int addr) {
- super(addr);
- }
-
- /**
- * Returns an instance of <code>IRapiSession</code> for this remote device.
- * Use {@link IRapiSession#release()} to release this instance when it is
- * no longer needed.
- * @return an instance of <code>IRapiSession</code>
- * @throws RapiException if an error occurs.
- */
- public abstract IRapiSession createSession() throws RapiException;
-
- /**
- * Returns information about the connection between this remote device and the desktop.
- * @return <code>RapiConnectionInfo</code> object containing information about
- * the connection between this remote device and the desktop.
- * @throws RapiException if an error occurs.
- */
- public abstract RapiConnectionInfo getConnectionInfo() throws RapiException;
-
- /**
- * Returns information about this remote device.
- * @return <code>RapiDeviceInfo</code> object containing information about this remote
- * device.
- * @throws RapiException if an error occurs.
- */
- public abstract RapiDeviceInfo getDeviceInfo() throws RapiException;
-
- /**
- * Tests whether this device is connected.
- * @return <code>true</code> if this device is connected;<code>false</code> otherwise.
- * @throws RapiException if an error occurs.
- */
- public abstract boolean isConnected() throws RapiException;
-
-} \ No newline at end of file
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiEnumDevices.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiEnumDevices.java
deleted file mode 100644
index 8c0292281..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiEnumDevices.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class is used to enumerate the set of connected WinCE-based
- * remote devices which are represented by <code>IRapiDevice</code>
- * objects.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @author Radoslav Gerganov
- */
-public abstract class IRapiEnumDevices extends IUnknown {
-
- public IRapiEnumDevices(int addr) {
- super(addr);
- }
-
- /**
- * Returns an instance of <code>IRapiDevice</code>.
- * Use {@link IRapiDevice#release()} to release this instance when it is
- * no longer needed.
- * @return an instance of <code>IRapiDevice</code>
- * @throws RapiException if an error occurs.
- */
- public abstract IRapiDevice next() throws RapiException;
-
-} \ No newline at end of file
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiSession.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiSession.java
deleted file mode 100644
index 4b78d5663..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IRapiSession.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- * Radoslav Gerganov - [238773] [WinCE] Implement IRAPISession#CeRapiInvoke
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class is used to perform Remote API 2 operations on a connected
- * WinCE-based remote device.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @author Radoslav Gerganov
- */
-public abstract class IRapiSession extends IUnknown {
-
- public IRapiSession(int addr) {
- super(addr);
- }
-
- /**
- * Initializes (synchronously) the communication layers between the desktop
- * and the target remote device. This method must be called before calling any
- * of the other <code>IRapiSession</code> methods. Use {@link IRapiSession#uninit()}
- * to uninitialize the session.
- * @throws RapiException if an error occurs.
- */
- public abstract void init() throws RapiException;
-
- /**
- * Uninitializes the session. This method should be called last.
- * @throws RapiException if an error occurs.
- */
- public abstract void uninit() throws RapiException;
-
- /**
- * Creates, opens, or truncates a file on the remote device.
- * @param fileName file name on the remote device
- * @param desiredAccess specifies the type of access to the file
- * @param shareMode specifies how the file can be shared
- * @param creationDisposition specifies which action to take on
- * files that exist, and which action to take when files do not exist
- * @param flagsAndAttributes specifies the file attributes and flags
- * for the file
- * @return integer representing a valid handle that can be used to access the file
- * @throws RapiException if an error occurs.
- */
- public abstract int createFile(String fileName, int desiredAccess,
- int shareMode, int creationDisposition,
- int flagsAndAttributes) throws RapiException;
-
- /**
- * Reads up to <code>b.length</code> bytes of data from a remote file
- * into an array of bytes.
- * @param handle handle to the file to be read
- * @param b the buffer into which the data is read
- * @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
- * the file has been reached
- * @throws RapiException if an error occurs.
- */
- public abstract int readFile(int handle, byte[] b) throws RapiException;
-
- /**
- * Reads up to <code>len</code> bytes of data from a remote file
- * into an array of bytes.
- * @param handle handle to the file to be read
- * @param b the buffer into which the data is read
- * @param off the start offset of the data
- * @param len the maximum number of bytes read
- * @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
- * the file has been reached
- * @throws RapiException if an error occurs.
- */
- public abstract int readFile(int handle, byte[] b, int off, int len)
- throws RapiException;
-
- /**
- * Writes <code>b.length</code> bytes from the specified byte array
- * to a remote file.
- * @param handle handle to the file to which bytes will be written
- * @param b the data
- * @throws RapiException if an error occurs.
- */
- public abstract void writeFile(int handle, byte[] b) throws RapiException;
-
- /**
- * Writes <code>len</code> bytes from the specified byte array
- * starting at offset <code>off</code> to a remote file.
- * @param handle handle to the file to which bytes will be written
- * @param b the data
- * @param off the start offset in the data
- * @param len the number of bytes to write
- * @throws RapiException if an error occurs.
- */
- public abstract void writeFile(int handle, byte[] b, int off, int len)
- throws RapiException;
-
- /**
- * Closes an open file handle.
- * @param handle handle to an open file
- * @throws RapiException if an error occurs.
- */
- public abstract void closeHandle(int handle) throws RapiException;
-
- /**
- * Copies an existing file on the remote device to a new file on the
- * remote device.
- * @param existingFile the file name of the existing file
- * @param newFile the file name of the new file
- * @throws RapiException if an error occurs.
- */
- public abstract void copyFile(String existingFile, String newFile)
- throws RapiException;
-
- /**
- * Deletes the specified file on the remote device.
- * @param fileName the file to be deleted
- * @throws RapiException if an error occurs.
- */
- public abstract void deleteFile(String fileName) throws RapiException;
-
- /**
- * Renames existing file or directory on the remote device.
- * @param existingFileName the existing name
- * @param newFileName the new name
- * @throws RapiException if an error occurs.
- */
- public abstract void moveFile(String existingFileName,
- String newFileName) throws RapiException;
-
- /**
- * Creates a new directory on the remote device.
- * @param pathName the path of the directory to be created
- * @throws RapiException if an error occurs.
- */
- public abstract void createDirectory(String pathName) throws RapiException;
-
- /**
- * Deletes an existing empty directory on the remote device.
- * @param pathName the path of the directory to be deleted
- * @throws RapiException if an error occurs.
- */
- public abstract void removeDirectory(String pathName) throws RapiException;
-
- /**
- * Searches for a file or sub-directory in a directory on the remote device.
- * Use {@link IRapiSession#findNextFile(int)} to get the next found file.
- * Finally, call {@link IRapiSession#findClose(int)} to close the returned search handle.
- * @param fileName string that specifies a valid directory or path and file name.
- * This string can contain wildcard characters (* and ?)
- * @param findData [out] this object receives information about the found file
- * or sub-directory
- * @return integer representing valid search handle
- * @throws RapiException if an error occurs.
- */
- public abstract int findFirstFile(String fileName,
- RapiFindData findData) throws RapiException;
-
- /**
- * Retrieves the next file in an enumeration context.
- * @param handle search handle obtained with a call to
- * {@link IRapiSession#findFirstFile(String, RapiFindData)}
- * @return <code>RapiFindData</code> object containing information about the
- * next file/sub-directory or <code>null</code> if no matching files can be found
- */
- public abstract RapiFindData findNextFile(int handle);
-
- /**
- * Closes the specified search handle on the remote device.
- * @param handle the search handle to close
- * @throws RapiException if an error occurs.
- */
- public abstract void findClose(int handle) throws RapiException;
-
- /**
- * Retrieves information about all files and directories in the given directory on
- * the remote device.
- * @param path string containing the path in which to search for files
- * @param flags combination of filter and retrieval flags
- * @return an array of <code>RapiFindData</code> objects containing the information
- * about the found items
- * @throws RapiException if an error occurs.
- */
- public abstract RapiFindData[] findAllFiles(String path,
- int flags) throws RapiException;
-
- /**
- * Returns attributes for the specified file or directory on the remote device.
- * @param fileName string that specifies the name of a file or directory
- * @return attributes for the specified file or <code>-1</code>
- * if an error has occurred
- */
- public abstract int getFileAttributes(String fileName);
-
- /**
- * Returns the size, in bytes, of the specified file on the remote device.
- * @param handle open handle of the file whose size is being returned
- * @return the file size in bytes
- */
- public abstract long getFileSize(int handle);
-
- /**
- * Returns the time when the file was created.
- * <p>
- * The time is represented as the number of Universal Time (UT)
- * milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
- * </p>
- * @param handle handle to the file for which to get creation time
- * @return the creation time for this file
- * @throws RapiException if an error occurs.
- */
- public abstract long getFileCreationTime(int handle) throws RapiException;
-
- /**
- * Returns the time when the file was last accessed.
- * <p>
- * The time is represented as the number of Universal Time (UT)
- * milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
- * </p>
- * @param handle handle to the file for which to get last access time
- * @return the last access time for this file
- * @throws RapiException if an error occurs.
- */
- public abstract long getFileLastAccessTime(int handle) throws RapiException;
-
- /**
- * Returns the time when the file was last written to.
- * <p>
- * The time is represented as the number of Universal Time (UT)
- * milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
- * </p>
- * @param handle handle to the file for which to get last write time
- * @return the last write time for this file
- * @throws RapiException if an error occurs.
- */
- public abstract long getFileLastWriteTime(int handle) throws RapiException;
-
- /**
- * Sets the attributes of the specified file on the remote device.
- * @param fileName the target file
- * @param fileAttributes the new attributes; this parameter is combination of the
- * following values: {@link Rapi#FILE_ATTRIBUTE_ARCHIVE}, {@link Rapi#FILE_ATTRIBUTE_HIDDEN},
- * {@link Rapi#FILE_ATTRIBUTE_NORMAL}, {@link Rapi#FILE_ATTRIBUTE_READONLY},
- * {@link Rapi#FILE_ATTRIBUTE_SYSTEM}, {@link Rapi#FILE_ATTRIBUTE_TEMPORARY}
- * @throws RapiException if an error occurs.
- */
- public abstract void setFileAttributes(String fileName, int fileAttributes) throws RapiException;
-
- /**
- * Sets the last write time of the specified file.
- * <p>
- * The time is represented as the number of Universal Time (UT)
- * milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
- * </p>
- * The specified time will be truncated to fit the supported precision.
- * @param handle handle to the target file
- * @param lastWriteTime the new last write time for this file
- * @throws IllegalArgumentException if the specified time is negative
- * @throws RapiException if an error occurs.
- */
- public abstract void setFileLastWriteTime(int handle, long lastWriteTime) throws RapiException;
-
- /**
- * Creates new process on the remote device.
- * @param appName module to execute
- * @param commandLine command line arguments
- * @param creationFlags additional flags controlling the creation
- * @return <code>ProcessInformaion</code> containing information about the new process
- * @throws RapiException if an error occurs.
- */
- public abstract ProcessInformation createProcess(String appName, String commandLine,
- int creationFlags) throws RapiException;
-
- /**
- * Invokes the specified native function on the remote device passing the specified byte array as argument.
- * The native function must have the following signature:<p>
- * <code>HRESULT funcName(DWORD inpLen, BYTE *inp, DWORD *outLen, BYTE **out, IRAPIStream *stream)</code><p>
- * The native function must return <code>0</code> on success or non-zero value if an error occurs.
- * @param dllPath the name of the dll on the remote device which contains the native function
- * @param funcName the name of the native function that will be called
- * @param input byte array which will be passed to the native function; <code>inpLen</code> is initialized with
- * the length of <code>input</code> and <code>inp</code> points to a buffer with the same content as
- * <code>input</code>
- * @return byte array returned from the native function; the length and the content of the returned array
- * corresponds to <code>*outLen</code> and <code>*out</code> respectively
- * @throws RapiException if an error occurs.
- * @since org.eclipse.tm.rapi 0.2
- */
- public abstract byte[] invoke(String dllPath, String funcName, byte[] input) throws RapiException;
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IUnknown.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IUnknown.java
deleted file mode 100644
index 6eb39791a..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/IUnknown.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * Java wrapper for the native IUnknown interface.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @author Radoslav Gerganov
- */
-public abstract class IUnknown {
-
- /**
- * Pointer to the underlying <code>IUnknown</code> object.
- */
- protected int addr;
-
- public IUnknown(int addr) {
- this.addr = addr;
- }
-
- /**
- * Releases the underlying <code>IUnknown<code> object.
- */
- public void release() {
- Rapi.ReleaseIUnknown(addr);
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/ProcessInformation.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/ProcessInformation.java
deleted file mode 100644
index 361467000..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/ProcessInformation.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class contains information for a new process
- * created with {@link IRapiSession#createProcess(String, String, int)}
- *
- * @author Radoslav Gerganov
- */
-public class ProcessInformation {
- public int hProcess;
- public int hThread;
- public int dwProcessId;
- public int dwThreadId;
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/Rapi.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/Rapi.java
deleted file mode 100644
index add666188..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/Rapi.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class provides access to some native Win32 APIs and constants.
- *
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @author Radoslav Gerganov
- */
-public final class Rapi {
-
- static {
- System.loadLibrary("jrapi"); //$NON-NLS-1$
- }
-
- public static final int NOERROR = 0;
- //TODO: add more error codes
-
- public static final int GENERIC_READ = 0x80000000;
- public static final int GENERIC_WRITE = 0x40000000;
- public static final int FILE_SHARE_READ = 0x00000001;
- public static final int FILE_SHARE_WRITE = 0x00000002;
-
- public static final int CREATE_NEW = 1;
- public static final int CREATE_ALWAYS = 2;
- public static final int OPEN_EXISTING = 3;
- public static final int OPEN_ALWAYS = 4;
- public static final int TRUNCATE_EXISTING = 5;
-
- public static final int FILE_ATTRIBUTE_ARCHIVE = 0x00000020;
- public static final int FILE_ATTRIBUTE_COMPRESSED = 0x00000800;
- public static final int FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
- public static final int FILE_ATTRIBUTE_ENCRYPTED = 0x00004000;
- public static final int FILE_ATTRIBUTE_HIDDEN = 0x00000002;
- public static final int FILE_ATTRIBUTE_INROM = 0x00000040;
- public static final int FILE_ATTRIBUTE_NORMAL = 0x00000080;
- public static final int FILE_ATTRIBUTE_READONLY = 0x00000001;
- public static final int FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400;
- public static final int FILE_ATTRIBUTE_ROMMODULE = 0x00002000;
- public static final int FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200;
- public static final int FILE_ATTRIBUTE_SYSTEM = 0x00000004;
- public static final int FILE_ATTRIBUTE_TEMPORARY = 0x00000100;
-
- public static final int FILE_FLAG_WRITE_THROUGH = 0x80000000;
- public static final int FILE_FLAG_OVERLAPPED = 0x40000000;
- public static final int FILE_FLAG_RANDOM_ACCESS = 0x10000000;
- public static final int FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000;
-
- public static final int FAF_ATTRIB_CHILDREN = 0x01000;
- public static final int FAF_ATTRIB_NO_HIDDEN = 0x02000;
- public static final int FAF_FOLDERS_ONLY = 0x04000;
- public static final int FAF_NO_HIDDEN_SYS_ROMMODULES = 0x08000;
- public static final int FAF_GETTARGET = 0x10000;
-
- public static final int FAF_ATTRIBUTES = 0x01;
- public static final int FAF_CREATION_TIME = 0x02;
- public static final int FAF_LASTACCESS_TIME = 0x04;
- public static final int FAF_LASTWRITE_TIME = 0x08;
- public static final int FAF_SIZE_HIGH = 0x10;
- public static final int FAF_SIZE_LOW = 0x20;
- public static final int FAF_OID = 0x40;
- public static final int FAF_NAME = 0x80;
-
- public static final int INVALID_HANDLE_VALUE = -1;
-
- public static final long TIME_DIFF = 11644473600000L;
-
- public static final int COINIT_MULTITHREADED = 0x0;
- public static final int COINIT_APARTMENTTHREADED = 0x2;
- public static final int COINIT_DISABLE_OLE1DDE = 0x4;
- public static final int COINIT_SPEED_OVER_MEMORY = 0x8;
-
- /**
- * Initializes the library, the clients must call this method before any
- * other. The meaning of the <code>init</code> parameter and the returned
- * value is platform dependent. On Win32 platforms this method is directly
- * mapped to <code>CoInitializeEx</code>.
- *
- * @param init on Win32 it is either {@link #COINIT_APARTMENTTHREADED} or
- * {@link #COINIT_MULTITHREADED}
- * @return on Win32 this is the returned value from
- * <code>CoInitializeEx</code>
- */
- public static final int initialize(int init) {
- return CoInitializeEx(0, init);
- }
-
- /**
- * Uninitializes the library, the clients must call this method last to free any allocated resources.
- * This method is platform dependent, on Win32 it is directly mapped to <code>CoUninitialize</code>.
- */
- public static final void uninitialize() {
- CoUninitialize();
- }
-
- /**
- * Initializes the COM library.
- */
- static final native int CoInitializeEx(int pvReserved, int dwCoInit);
-
- /**
- * Closes the COM library on the current thread.
- */
- static final native void CoUninitialize();
-
- /**
- * Sets the first element of the specified array with the address of a newly
- * instantiated <code>IRAPIDesktop</code> native interface.
- *
- * @param pIRAPIDesktop an array with one element
- * @return {@link #NOERROR} if the function succeeds; otherwise an error
- * code
- */
- final static native int CreateRapiDesktop(int[] pIRAPIDesktop);
-
-
- /**
- * Invokes the <code>Release</code> method of the <code>IUnkonwn</code> object
- * having the specified address.
- * @param addr the address of the <code>IUnknown</code> object
- */
- final static native void ReleaseIUnknown(int addr);
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiConnectionInfo.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiConnectionInfo.java
deleted file mode 100644
index 6e9f818db..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiConnectionInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class contains information that describes the connection between
- * a WinCE device and a host computer.
- *
- * @author Radoslav Gerganov
- */
-public class RapiConnectionInfo {
-
- public static final int RAPI_CONNECTION_USB = 0;
- public static final int RAPI_CONNECTION_IR = 1;
- public static final int RAPI_CONNECTION_SERIAL = 2;
- public static final int RAPI_CONNECTION_NETWORK = 3;
-
- //FIXME
- //SOCKADDR_STORAGE ipaddr;
- //SOCKADDR_STORAGE hostIpaddr;
-
- public int connectionType;
-
- public String toString() {
- switch (connectionType) {
- case RAPI_CONNECTION_USB: return "USB"; //$NON-NLS-1$
- case RAPI_CONNECTION_IR: return "IR"; //$NON-NLS-1$
- case RAPI_CONNECTION_SERIAL: return "Serial"; //$NON-NLS-1$
- case RAPI_CONNECTION_NETWORK: return "Network"; //$NON-NLS-1$
- }
- return "Unknown"; //$NON-NLS-1$
- }
-
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiDeviceInfo.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiDeviceInfo.java
deleted file mode 100644
index c280fde38..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiDeviceInfo.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * This class contains information that identifies a particular WinCE device.
- *
- * @author Radoslav Gerganov
- */
-public class RapiDeviceInfo {
-
- public String id;
- public int versionMajor;
- public int versionMinor;
- public String name;
- public String platform;
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiException.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiException.java
deleted file mode 100644
index da106329b..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-/**
- * Signals that an error has occurred during execution of RAPI2 call.
- *
- * @author Radoslav Gerganov
- */
-public class RapiException extends Exception {
-
- private static final long serialVersionUID = -1833456445593343458L;
-
- private int errorCode;
-
- public RapiException(String msg) {
- super(msg);
- }
-
- public RapiException(String msg, int errCode) {
- super(msg + " errorCode: 0x" + Integer.toHexString(errCode)); //$NON-NLS-1$
- this.errorCode = errCode;
- }
-
- /**
- * Returns the error code associated with this exception.
- */
- public int getErrorCode() {
- return errorCode;
- }
-}
diff --git a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiFindData.java b/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiFindData.java
deleted file mode 100644
index dd67fc334..000000000
--- a/wince/org.eclipse.tm.rapi/src/org/eclipse/tm/rapi/RapiFindData.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Radoslav Gerganov
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Radoslav Gerganov - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.rapi;
-
-import java.util.Date;
-
-/**
- * This class describes a file found by <code>CeFindFirstFile</code>
- * or <code>CeFindAllFiles</code>
- *
- * @author Radoslav Gerganov
- */
-public class RapiFindData {
- public int fileAttributes;
- public long creationTime;
- public long lastAccessTime;
- public long lastWriteTime;
- public long fileSize;
- public int oid;
- public String fileName;
-
- public Date getCreationTime() {
- return new Date((creationTime / 10000) - Rapi.TIME_DIFF);
- }
-
- public Date getLastAccessTime() {
- return new Date((lastAccessTime / 10000) - Rapi.TIME_DIFF);
- }
-
- public Date getLastWriteTime() {
- return new Date((lastWriteTime / 10000) - Rapi.TIME_DIFF);
- }
-}
diff --git a/wince/readme.txt b/wince/readme.txt
deleted file mode 100644
index 97e97faad..000000000
--- a/wince/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-The "wince" folder holds components for communicating with Windows CE devices.
-The org.eclipse.tm.rapi bundle is thin Java wrapper over Microsoft RAPI2.
-The org.eclipse.rse.subsystems.wince bundle builds on the RAPI2 wrapper
-to provide Windows CE subsystems for RSE.
-See http://www.eclipse.org/dsdp/tm

Back to the top